compare strings, strcmp

Richard O'Keefe ok at mudla.cs.mu.OZ.AU
Sat Nov 18 17:35:52 AEST 1989


In article <1989Nov17.234542.3556 at aqdata.uucp>, sullivan at aqdata.uucp (Michael T. Sullivan) writes:
: From article <11635 at smoke.BRL.MIL>, by gwyn at smoke.BRL.MIL (Doug Gwyn):
: > I guess if you believe in the Indian Hills Style Guide it might.
: Secondly, it still sounds like a pretty good suggestion to me.
: StrEq doesn't set off warning flags that it is even a macro,
: much less a macro with a warning comment in some include file.

Anyone who relies on unsafe macro names being written in capitals is
asking for trouble.  Common practice has been to use all caps even for
#defined constants, e.g.
	#define NULL 0
	#define EOF (-1)
In a great many important cases, all caps has NOT meant "unsafe", it has
just meant "macro".  Further, there are some well-established unsafe
macros whose names don't contain any capitals at all, obscure things like
	getc
	putc
	putchar
It doesn't seem like a good idea to place any reliance on a convention which
hasn't been followed in the old C library itself.



More information about the Comp.lang.c mailing list