Curt Binder wrote: > > while(n > 0) > This should be: while (n!=EOF) read() will return an EOF when you try to read past the end of the file. The only way to detect an EOF is to attempt reading past the end. ============================================================= Avenir Web's Linux Discussion List List info: //www.freelists.org/cgi-bin/webpage?webpage_id=13 To unsubscribe: email linux-discussion-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject line. Administrative contact: weez@xxxxxxxxxxxxx =============================================================