what is the ELF header for an executable linux binary
what is the ELF header for an executable linux binary
I have Linux Mint running on a dell Inspiron 1545 and it's awesome :D the only thing is that the wireless NIC compatibility is a little tricky... But the rest of the hardware rocks!
Thanks for your reply. Yeah I kind of figured something like that, im glad I gave up on the excise or else I would still be trying it. So thanks, I guess I just wont mess with it.
heres the source code in a text file [file name=replacetab.txt size=489]http://www.linux.com/media/kunena/attachments/legacy/files/replacetab.txt[/file]
Hi, i have a c question. My program is supposed to replace all the backspace char (hitting backspace) with \b, the tab char with \t the \ (slash) char with \\
my problem is everything works in my program except for printing backspace.
for example:
Input: asdf1234(hit tab)12(hit backspace)34( hit \ char )
Output: asdf1234\t134\\
as you can see \t and \\ are used in place of tab and \
but backspace merely deletes a char instead of just printing \b
i heard somewhere that the terminal reads and deals with backspaces before the program, could this be the reason getchar() cannot get a value when backspace is hit? I don't know if its true or not. The following code is what i wrote in responce to an exersice in k&r second edition.
heres the code:
#include <stdio.h>
/* Write a program to copy its input to its output, replacing each tab by /t, each backspace by \b, and each backslash by \\. This makes tabs and backspaces visible in an unambiguous way. */
main()
{
int c;
while((c=getchar()) != EOF) {
if(c=='\t') {
c = c - '\t';
printf("\\t");
}
if(c=='\\') {
c = c - '\\';
printf("\\\\");
}
if(c=='\b') { //c doesn't like this code
c = c - '\b';
printf("\\b");
}
putchar(c);
}
}
I never thought of that lol, yeah it would be really cool to run MythTV on the Wii. I guess when you open the source up anything is possible. Yeah I was never really opposed to the idea, it would actually be really cool to run Linux on the Wii. I guess what I was trying to say, is that I thought it might prove to be somewhat difficult in developing the project to support gaming, such as playing animal crossing. I am probably wrong, my standpoint is merely speculative. However when applying Linux to the Wii, for example as you stated with MythTv, I can see allot of value for having Linux installed. Plus like you, I would also like to install Linux on the Wii just to tell people I did lol. Having Linux run on a Wii would indeed provide unique benefits.
This sounds very interesting! And I'm sure the Linux kernel would run just as good on a Wii as any other device. Getting Wii run Linux, would no doubt allow us to customize special uses for the Wii the designers did not intend (somewhat like custom firmware). However I don't see the project succeeding to the point in which Linux will exceed the gaming capabilities set by the original Wii OS. We might be able to get the Wii to run Home brewed games, and Linux might very well run more efficiently then the original OS but I don't think its..... meh w/e It would still be interesting to run Linux on the Wii, so good luck and hope it works out.
We seem to want to run Linux on everything these days :D but at least its for good reason. I think if I was to install Linux on a Wii it would be because you never know what your getting in closed source... It gives me chills because it makes me feel like I'm in a dark room :s
heres the code in a text file for the changed program. [file name=percent2.txt size=289]http://www.linux.com/media/kunena/attachments/legacy/files/percent2.txt[/file]
I figured out how to do it in c. I had to look at chapter 5.10 to figure out how to pass arguments to the program. Heres the changed code:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
if (argc != 3) {
fprintf(stderr, "Usage: %s NUMBER1 NUMBER2\n", argv[0]);
return EXIT_FAILURE;
}
printf("%.2f\n", strtod(argv[1], NULL) / strtod(argv[2], NULL) * 100.0);
return 0;
}
thanks! yeah that will work
The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.
Join / Linux Training / Board