Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.190
 
1.191
 
MAIN:plunky:20140528085242
 
cpp.c
_>110110  *   character WARN followed by the argument number.
 111111  * - The value element points to the end of the string, to simplify
 112112  *   pushback onto the input queue.
<>113 - *
  113+ *
114114  * The first character (from the end) in the replacement list is
 115115  * the number of arguments:
 116116  *   VARG  - ends with ellipsis, next char is argcount without ellips.
 117117  *   OBJCT - object-type macro
<>118 - *   0     - empty parenthesis, foo()
  118+ *   0     - empty parenthesis, foo()
119119  *   1->   - number of args.
 120120  *
 121121  * WARN is used:
 122122  *      - in stored replacement lists to tell that an argument comes
 123123  *      - When expanding replacement lists to tell that the list ended.
 124124  *
 125125  * To ensure that an already expanded identifier won't get expanded
<>126 - * again a EBLOCK char + its number is stored directly before any
  126+ * again a EBLOCK char + its number is stored directly before any
127127  * expanded identifier.
 128128  */
 129129 
     
 !
168168                 case 'A': /* assembler input */
 169169                         Aflag++;
 170170                         break;
<>171 -                        
  171+
172172                 case 'C': /* Do not discard comments */
 173173                         Cflag++;
 174174                         break;
     
 !
242242                                                 savch('$');
 243243                                         savch(*cp);
 244244                                 }
<>245 -                                savstr((const usch *)"");
  245+                                savstr((const usch *)"");
246246                                 if (Mxfile) { savch(' '); savstr(Mxfile); }
 247247                                 savch(0);
 248248                                 Mxfile = fn;
     
 !
513513         /*
 514514          * On MacOS, we may have to do some clever stuff
 515515          * to resolve framework headers.
<>516 -         */
  516+         */
517517         if (fsrch_macos_framework(fn, (const usch *)"/Library/Frameworks/") == 1)
 518518                 return 1;
 519519         if (fsrch_macos_framework(fn, (const usch *)"/System/Library/Frameworks/") == 1)
     
 !
880880 #else
 881881                                 continue;
 882882 #endif
<>883 -                        }
  883+                        }
884884 in2:                    if (narg < 0) {
 885885                                 /* no meaning in object-type macro */
 886886                                 savch('#');
     
 !
12151215  */
 12161216 static void
 12171217 insblock(int bnr)
<>1218 -{
  1218+{
12191219         usch *bp = stringbuf;
 12201220         int c, i;
<>1221 - 
  1221+
12221222         IMP("IB");
 12231223         readmac++;
 12241224         while ((c = sloscan()) != WARN) {
     
 !
12461246         stringbuf = bp;
 12471247         readmac--;
 12481248         IMP("IBRET");
<>1249 -}
  1249+}
12501250 
 12511251 /* Delete next WARN on the input stream */
 12521252 static void
 12531253 delwarn(void)
<>1254 -{
  1254+{
12551255         usch *bp = stringbuf;
 12561256         int c;
<>1257 - 
  1257+
12581258         IMP("DELWARN");
 12591259         while ((c = sloscan()) != WARN) {
 12601260                 if (c == CMNT) {
     
 !
12721272         unpstr(bp);
 12731273         stringbuf = bp;
 12741274         IMP("DELWRET");
<>1275 -}
  1275+}
12761276 
 12771277 /*
 12781278  * Handle defined macro keywords found on input stream.
     
 !
13361336                                 /*
 13371337                                  * Tricky: if this is the last identifier
 13381338                                  * in the expanded list, and it is defined
<>1339 -                                 * as a function-like macro, then push it
  1339+                                 * as a function-like macro, then push it
13401340                                  * back on the input stream and let fastscan
 13411341                                  * handle it as a new macro.
 13421342                                  * BUT: if this macro is blocked then this
     
 !
14691469          * Be careful about the expand/noexpand balance.
 14701470          * Store read data on heap meanwhile.
 14711471          * For directive        #define foo() kaka
<>1472 -         * If input is          <NEX><NEX>foo<EXP>()<EXP> then
 1473 -         * output should be     <NEX><NEX><EXP>kaka<EXP>.
  1472+         * If input is          <NEX><NEX>foo<EXP>()<EXP> then
  1473+         * output should be     <NEX><NEX><EXP>kaka<EXP>.
14741474          */
 14751475         bp = stringbuf;
 14761476         while (iswsnl(ch = cinput()))
     
 !
16621662                 while (args[i] < stringbuf && iswsnl(stringbuf[-1]))
 16631663                         stringbuf--;
 16641664                 savch('\0');
<>1665 -                
  1665+
16661666         }
 16671667         if (narg == 0 && ellips == 0)
 16681668                 while ((c = sloscan()) == WSPACE || c == '\n')
     
 !
17371737 #endif
 17381738                         if (sp[2] != CONC && !snuff && sp[-1] != CONC) {
 17391739                                 /*
<>1740 -                                 * Expand an argument; 6.10.3.1:
  1740+                                 * Expand an argument; 6.10.3.1:
17411741                                  * "A parameter in the replacement list,
 17421742                                  *  is replaced by the corresponding argument
 17431743                                  *  after all macros contained therein have
     
 !
17801780 /*
 17811781  * Do a (correct) expansion of a WARN-terminated buffer of tokens.
 17821782  * Data is read from the lex buffer, result on lex buffer, WARN-terminated.
<>1783 - * Expansion blocking is not altered here unless when tokens are
  1783+ * Expansion blocking is not altered here unless when tokens are
17841784  * concatenated, in which case they are removed.
 17851785  */
 17861786 void
     
 !
20252025         static usch buf[12];
 20262026         usch *b = buf;
 20272027         int m = 0;
<>2028 -        
  2028+
20292029         if (num < 0)
 20302030                 num = -num, m = 1;
 20312031         do {
     
 !
20392039 }
 20402040 
 20412041 /*
<>2042 - * similar to sprintf, but only handles %c, %s and %d.
  2042+ * similar to sprintf, but only handles %c, %s and %d.
20432043  * saves result on heap.
 20442044  */
 20452045 static void
     
 !
20902090 /*
 20912091  * Symbol table stuff.
 20922092  * The data structure used is a patricia tree implementation using only
<>2093 - * bytes to store offsets. 
  2093+ * bytes to store offsets.
<_20942094  * The information stored is (lower address to higher):
 20952095  *
 20962096  *      unsigned char bitno[2]; bit number in the string
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-31 05:51 +0100