wrote in comp.lang.c:
Quote:
> Most .h files contains a header like the following:
> #ifndef _STDIO_H
> # define _STDIO_H 1
> ....
> Is there any tool to generate this header automatically from a plain
> header file?
Actually only header files should have macros using that format. The
C language standard reserves all symbols beginning with two
underscores in a row, or an underscore followed by an upper case
letter, for the implementation, that is the compiler.
You should provide include guards in header files that you write
yourself, but if you are going to write a file named, for example,
header.h, how hard is it to write these two lines at the top:
#ifndef HEADER_H
#define HEADER_H
...then add the contents of your header, and a final line at the
bottom:
#endif
If that is really too much trouble, just think how hard it is going to
be to get the rest of the contents, in between those lines, right.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq