Jerry Feldman
[Fri, 30 May 2003 22:15:29 -0400]: void GetOne()
<nitpick> This isn't a valid Prototype in ISO C, because the compiler can't distinguish between an empty parameter list and K&R definitions. So it should be void GetOne(void) </nitpick> I would agree with your nitpick here, but C89 very specifically allows
On Sat, 31 May 2003 05:49:51 +0200
Philipp Thomas
int main()
<nitpick> Same here, this should be int main (void) </nitpick> Main is rarely used with a void argument list, but I guess it is more correct to specify void.
And you should have added that on Linux this needs to be linked against libncurses to get the lowlevel termio functions. Not true. Termios(3) is not dependent upon libncurses at all. I think you are confusing termio with termios. Check the man page for termios. The termios functions are in libc. gaf@gaf:~/src> nm /usr/lib/libncurses.a | grep tcgetattr U tcgetattr Note that this is an external reference. gaf@gaf:~/src> nm /usr/lib/libc.a | grep tcgetattr U __tcgetattr tcgetattr.o: 00000000 T __tcgetattr 00000000 W tcgetattr U __tcgetattr
In this case, in libc, tcgetattr is a weak symbol and __tcgetattr is the
actual function name.
--
Jerry Feldman