Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.91
 
1.92
 
MAIN:plunky:20121029172313
 
token.c
_>113113         --ifiles->curptr;
 114114         if (ifiles->curptr < ifiles->bbuf)
 115115                 error("pushback buffer full");
 116116         *ifiles->curptr = (usch)c;
 117117 }
 118118 
<>119 -static int
  119+static void
120120 eatcmnt(void)
 121121 {
 122122         int ch;
 123123 
 124124         if (Cflag) { PUTCH('/'); PUTCH('*'); }
 125125         for (;;) {
 126126                 ch = inch();
 127127                 if (ch == '\n') {
 128128                         ifiles->lineno++;
 129129                         if (!Cflag) PUTCH('\n');
 130130                 }
 131131                 if (ch == -1)
<>132 -                        return -1;
  132+                        break;
133133                 if (ch == '*') {
 134134                         ch = inch();
 135135                         if (ch == '/') {
 136136                                 if (Cflag) {
 137137                                         PUTCH('*');
 138138                                         PUTCH('/');
     
 !
142142                         }
 143143                         unch(ch);
 144144                         ch = '*';
 145145                 }
 146146                 if (Cflag) PUTCH(ch);
 147147         }
<>148 -        return 0;
149148 }
 150149 
 151150 /*
 152151  * Scan quickly the input file searching for:
 153152  *      - '#' directives
 154153  *      - keywords (if not flslvl)
     
 !
192191                                 do {
 193192                                         if (Cflag) PUTCH(ch);
 194193                                         ch = inch();
 195194                                 } while (ch != -1 && ch != '\n');
 196195                                 goto xloop;
 197196                         } else if (ch == '*') {
<>198 -                                if (eatcmnt() == -1)
 199 -                                        return;
  197+                                eatcmnt();
  198+                                continue;
200199                         } else {
 201200                                 PUTCH('/');
 202201                                 goto xloop;
 203202                         }
 204203                         break;
 205204 
     
 !
210209                         break;
 211210 
 212211                 case '\\':
 213212                         if ((ch = NXTCH()) == '\n') {
 214213                                 ifiles->lineno++;
 215214                                 continue;
<>216 -                        } else {
 217 -                                PUTCH('\\');
218215                         }
<> 216+                        PUTCH('\\');
219217                         goto xloop;
 220218 
 221219                 case '\n': /* newlines, for pp directives */
 222220                         while (nnl > 0) { PUTCH('\n'); nnl--; ifiles->lineno++; }
 223221 run2:                   ifiles->lineno++;
 224222                         do {
 225223                                 PUTCH(ch);
 226224 run:                            ch = NXTCH();
 227225                                 if (ch == '/') {
 228226                                         ch = NXTCH();
 229227                                         if (ch == '/')
 230228                                                 goto cppcmt;
 231229                                         if (ch == '*') {
<>232 -                                                if (eatcmnt() == -1)
 233 -                                                        return;
  230+                                                eatcmnt();
234231                                                 goto run;
<>235 -                                        }
  232+                                        }
236233                                         unch(ch);
 237234                                         ch = '/';
 238235                                 }
 239236                         } while (ch == ' ' || ch == '\t');
 240237                         if (ch == '\\') {
 241238                                 ch = NXTCH();
     
 !
249246                                 continue;
 250247                         } else if (ch == '%') {
 251248                                 ch = NXTCH();
 252249                                 if (ch == ':') {
 253250                                         ppdir();
 254251                                         continue;
<>255 -                                } else {
 256 -                                        unch(ch);
 257 -                                        ch = '%';
258252                                 }
<> 253+                                unch(ch);
  254+                                ch = '%';
259255                         } else if (ch == '?') {
 260256                                 if ((ch = chktg()) == '#') {
 261257                                         ppdir();
 262258                                         continue;
 263259                                 } else if (ch == 0)
 264260                                         ch = '?';
     
 !
298294 nxt:                            ch = NXTCH();
 299295                                 if (ch == '\\') {
 300296                                         ch = NXTCH();
 301297                                         if (ch == '\n') {
 302298                                                 nnl++;
 303299                                                 goto nxt;
<>304 -                                        } else {
 305 -                                                unch(ch);
 306 -                                                ch = '\\';
307300                                         }
<> 301+                                        unch(ch);
  302+                                        ch = '\\';
<_308303                                 }
 309304                                 if (spechr[ch] & C_EP) {
 310305                                         PUTCH(ch);
 311306                                         ch = NXTCH();
 312307                                         if (ch == '-' || ch == '+')
 313308                                                 continue;
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-18 12:29 +0100