Hygiene of #define DIR "/usr/lib/news

Arthur David Olson ado at elsie.UUCP
Wed Feb 13 06:01:31 AEST 1985


The 2.11 vnews source posted lately had a thought-provoking way of doing
string catenation.  It had defines such as

	#define DIR "/usr/lib/news

and used these defines in lines such as

	system(DIR/batch");

which, after being run through the 4.1bsd C preprocessor, yields

	system("/usr/lib/news/batch");

I'm wondering what folks think of the hygiene and portability of this
technique for accomplishing string catenation.  Let me know.
--
	UUCP: ..decvax!seismo!elsie!ado    ARPA: elsie!ado at seismo.ARPA
	DEC, VAX and Elsie are Digital Equipment and Borden trademarks



More information about the Comp.lang.c mailing list