Subject: Mailing list and assn1 (This message is being sent to all CPSC 332 students) You are receiving this message because you are thought to be a student or TA in CPSC 322. If you are not, please let me know and I'll delete you from the list. If you are a student and don't receive the message please also let me know ;-). ---------- If you lose or delete this message, old messages may be found in the msgs directory with name msg.001 etc. ------------ Assignment 1 is available in the assns directory. It is due at midnight Friday. ---------- How to compile: gcc -g -Wall main.c should produce NO COMPILER WARNINGS: The following collection of header files seems sufficient to eliminate warnings on both my Linux and Sun system. #include #include #include #include #include #include #include ---------- A question has been asked regarding how to detect end of file with low level I/O. The answer is that the proper way is the same as with standard library I/O. If the value returned by the read() function is <= 0 you may asssume end of file has occured: if ((len = read(0, buf, 1)) <= 0) { printf("End of file \n"); } else { printf("I just read %d bytes \n", len); } Any method that depends upon the use of mythical or mystical symbols such as EOF almost certainly WILL NOT WORK RELIABLY. -----------