Mail Archives: djgpp/1997/12/17/04:43:06
On Tue, 16 Dec 1997, Hans 'the Beez' Bezemer wrote:
> > All you are doing is polluting the macro namespace. If some header
> > file uses 'begin' or 'end' for any purpose, it will break. Macros
> > should not be used frivolously.
>
> It has it's own header file, called easyc.h
>
> > static char *fill(char *beg, char *end); /* oops */
>
> After tens of compilers and platforms I've never encountered the problem.
> "token", yes. "begin", never.
I won't get into the C/Pascal controversy. However, usage of simple
words like `begin' and `end' as macros is indeed bad idea if the
macros are defined in a header that should be included by other
programs.
In general, macro names should not be usurped by libraries, unless
they begin with an underscore, like in __DJGPP__ or __MSDOS__. ANSI C
says that any other name is free to be used by applications, and a
good library should not get in the way of applications.
- Raw text -