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
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
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.
James [on his mailserver] wrote:
should C code be formatted so that it fits into an 80 column
display?
Yes.
--
Glynn Clements [EMAIL PROTECTED]