Xref: utzoo comp.unix.wizards:18297 comp.std.c:1690 Path: utzoo!attcan!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.wizards,comp.std.c Subject: Re: Need help using /usr/lib/cpp for generic text Message-ID: <3346@solo12.cs.vu.nl> Date: 22 Sep 89 22:22:05 GMT References: <838@pacific.mps.ohio-state.edu> <3323@solo10.cs.vu.nl> <2164@munnari.oz.au> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 32 ok@cs.mu.oz.au (Richard O'Keefe) writes: \... #if 0 \... ... \ #endif 0 \(a) ^ this token is not legal in dpANS C; V.3 tends not to like it What!? The rest of the line isn't ignored? And what was the very good reason the ANSI committee decided so? \(b) You should not use this technique to comment out text in a C program; new \C compilers are allowed to complain about mismatched quotes when they see \"don't" and other such text, and some _do_. I remember the discussion, but I don't recall the very good reason (here we go again) why those compilers could complain. Quality of implementation? That's another point for Sun, 'cause their cpp works. :-) \ You're going to laugh, but how about using the Bourne shell as a \condition processing facility? E.g. \ if [ ... ] ; then \ cat <<'EndOfPart' \ any old text -- almost \ EndOfPart \ else \ # equivalent of 'include' \ cat foo.inc \ fi Great! However, use `test' instead of `[' if portability is an issue. :-( -- creat(2) shouldn't have been create(2): |Maarten Litmaath @ VU Amsterdam: it shouldn't have existed at all. |maart@cs.vu.nl, mcvax!botter!maart