home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!utzoo!censor!animal!base!enterprise!saw
- From: saw@enterprise (Siegurd Weber)
- Subject: C++ patch for makedepend
- Message-ID: <1993Jan7.161531.16900@base>
- Summary: patch to recognize // comments in makedepend
- Keywords: C++ comments, makedepend
- Sender: usenet@base (USENET News System)
- Nntp-Posting-Host: enterprise
- Organization: Bell Canada Operations Development
- X-Newsreader: Tin 1.1 PL5
- Date: Thu, 7 Jan 1993 16:15:31 GMT
- Lines: 70
-
- Hi Folks,
- If you are using C++ and makedepend, I hope to spare you from
- a potentially hideous experience with this posting.
-
- Makedepend, or at least our version that came
- with X11R5 does not recognize C++ style comments.
- Since we had a line of the form
-
- //***************************************************
-
- as part of our standard header, makedepend gobbled up
- the rest of the file in search for the terminating */.
-
- The following patch will add the recognition of
- C++ style comments to makedepend.
-
- If you would rather not change your makedepend, simply
- make sure that you do not have any //* in your source.
-
- Enjoy,
- Sieg
-
- PS. Thanks to Todd Brunhoff the original author of makedepend for
- this great utility program.
-
-
- *** main.c Thu Jan 7 10:05:00 1993
- --- ../main.c Wed Jan 6 16:06:39 1993
- ***************
- *** 398,403 ****
- --- 398,421 ----
- }
- continue;
- }
- + /* case to consume C++ style comments starting with //.
- + * "//" comments will cause a problem if they contain /*
- + * in which case makedepend sets the rest of the file
- + * to white space.
- + */
- + else if (*p == '/' && *(p+1) == '/') {
- + *p++ = ' ', *p++ = ' ';
- +
- + while (*p) {
- + if (*p == '\n'){
- + *p = ' ';
- + lineno++;
- + break;
- + }
- + *p++ = ' ';
- + }
- + continue;
- + }
- else if (*p == '\n') {
- lineno++;
- if (*bol == '#') {
-
-
- --
- ************************************************************
- * ******************************************************** *
- * * Sieg Weber - Teso International * *
- * * 1617 Digby St. * *
- * * Ottawa, ONT. K1G 0P5 * *
- * * 1617 Digby St. * *
- * * (613) 731 3163 saw@stam.qe.bell.ca * *
- * * Consultant (OOA, OOD, C++, X, Motif, Un*x) * *
- * ******************************************************** *
- ************************************************************
-
-
-