Determining file types.

1998-11-30 Thread holotko
I'm engaged in writing a program in C. A part of the program needs to open a directory, read the filenames in the directory, and, for each filename read must determine whether or not the file is an image file (a jpeg of gif to be precise). If the file is an image file a process is started does

Re: Determining file types.

1998-11-30 Thread Nathan Grass
However, you should generally use the extension instead. Not only is it faster than opening every file, but the extension indicates whether the file is meant to be treated as a GIF or JPEG. It's possible that some other type of file could contain the above byte sequences by coincidence. I

Code formatting

1998-11-30 Thread James [on his mailserver]
should C code be formatted so that it fits into an 80 column display? i think it should because otherwise list and other viewers wrap the text which looks really nasty.

Re: Code formatting

1998-11-30 Thread Glynn Clements
James [on his mailserver] wrote: should C code be formatted so that it fits into an 80 column display? Yes. -- Glynn Clements [EMAIL PROTECTED]