Xref: utzoo comp.sources.bugs:722 comp.lang.c:7037 comp.lang.c++:754 Path: utzoo!mnetor!uunet!husc6!rutgers!mtune!codas!usfvax2!pdn!tsc3b21!crash From: crash@tsc3b21.UUCP (Frank (crash) Edwards) Newsgroups: comp.sources.bugs,comp.lang.c,comp.lang.c++ Subject: patch to PD cpp Message-ID: <236@tsc3b21.UUCP> Date: 2 Feb 88 14:07:32 GMT Organization: Transportation Systems Consulting, Inc, Palm Harbor FL Lines: 30 Keywords: cpp preprocessor I have a single patch for the C preprocessor which was posted to mod.sources many moons ago. A local archiver had it available when I needed it, and in using it I received "end-of-input" messages where I shouldn't have. It turns out, after much debugging time, that the token parser *WILL* recognize an opening comment token ("/*") if it is contained within double quotes!! In the NetHack2.2 source, are subroutine calls which contain this particular sequence (do_name.c, for one). The following two lines will check for the '/*' combination in the skip_until_newline routine. It probably shouldn't be done there, but you know how these quick little fixes get ;-). File: cpp6.c, routine skipnl() 132a133,134 > if (c == '\\') get(); > else if (c == '"') instring = !instring; "Use the Source, Luke. Feel it flow through your fingertips..." ----- Frank (crash) Edwards ...!codas!usfvax2!{pdn,jc3b21}!tsc3b21!crash TSC in Palm Harbor, FL Phone: (813) 785-0583 (voice) The Sweat Shop /-------------------------------------------------------------------------\ | These opinions are not those of my employer, his wife, either of their | | children, or their parakeet. In fact, he probably doesn't even know | | that I've said this! And I prefer it that way! | \-------------------------------------------------------------------------/