anon пре 9 месеци
родитељ
комит
dc399a1b86
3 измењених фајлова са 27 додато и 27 уклоњено
  1. +15
    -15
      src/fscanner.l
  2. +11
    -11
      src/main.c
  3. +1
    -1
      src/opt.c

+ 15
- 15
src/fscanner.l Прегледај датотеку

@@ -538,11 +538,11 @@ if{wsnl}*\( { /* ignore 'if' */
template = true;
}
goto ident;
/* falseTREACHED */
/* NOTREACHED */
}
("*"|{wsnl})+{identifier} { /* typedef name or modifier use */
goto ident;
/* falseTREACHED */
/* NOTREACHED */
}
.|\n { /* general identifer usage */
char *s;
@@ -649,7 +649,7 @@ if{wsnl}*\( { /* ignore 'if' */
}
/* my_yymore(); */
return(token);
/* falseTREACHED */
/* NOTREACHED */
}
}
}
@@ -657,19 +657,19 @@ if{wsnl}*\( { /* ignore 'if' */
\[ { /* array dimension (don't worry or about subscripts) */
arraydimension = true;
goto more;
/* falseTREACHED */
/* NOTREACHED */
}
\] {
arraydimension = false;
goto more;
/* falseTREACHED */
/* NOTREACHED */
}
\\\n { /* preprocessor statement is continued on next line */
/* save the '\\' to the output file, but not the '\n': */
yyleng = 1;
my_yymore();
goto eol;
/* falseTREACHED */
/* NOTREACHED */
}
\n { /* end of the line */
if (ppdefine == true) { /* end of a #define */
@@ -725,38 +725,38 @@ if{wsnl}*\( { /* ignore 'if' */
if (sdl == false)
BEGIN(IN_SQUOTE);
goto more;
/* falseTREACHED */
/* NOTREACHED */
}
<IN_SQUOTE>\' {
BEGIN(INITIAL);
goto more;
/* falseTREACHED */
/* NOTREACHED */
}
\" { /* string constant */
BEGIN(IN_DQUOTE);
goto more;
/* falseTREACHED */
/* NOTREACHED */
}
<IN_DQUOTE>\" {
BEGIN(INITIAL);
goto more;
/* falseTREACHED */
/* NOTREACHED */
}
<IN_DQUOTE,IN_SQUOTE>{
\n { /* syntax error: unexpected EOL */
BEGIN(INITIAL);
goto eol;
/* falseTREACHED */
/* NOTREACHED */
}
\\. |
. {
goto more;
/* falseTREACHED */
/* NOTREACHED */
}
\\\n { /* line continuation inside a string! */
myylineno++;
goto more;
/* falseTREACHED */
/* NOTREACHED */
}
}

@@ -787,7 +787,7 @@ if{wsnl}*\( { /* ignore 'if' */
} else {
++myylineno;
}
/* falseTREACHED */
/* NOTREACHED */
}
"*"+"/" {
/* replace the comment by a single blank */
@@ -799,7 +799,7 @@ if{wsnl}*\( { /* ignore 'if' */
"//".*\n? {
/* C++-style one-line comment */
goto eol;
/* falseTREACHED */
/* NOTREACHED */
}

{number} | /* number */


+ 11
- 11
src/main.c Прегледај датотеку

@@ -192,12 +192,12 @@ skiplist(FILE *oldrefs)

if (fscanf(oldrefs, "%d", &i) != 1) {
postfatal(PROGRAM_NAME ": cannot read list size from file %s\n", reffile);
/* falseTREACHED */
/* NOTREACHED */
}
while (--i >= 0) {
if (fscanf(oldrefs, "%*s") != 0) {
postfatal(PROGRAM_NAME ": cannot read list name from file %s\n", reffile);
/* falseTREACHED */
/* NOTREACHED */
}
}
}
@@ -388,7 +388,7 @@ main(int argc, char **argv)
/* XXX remove if/when clearerr() in dir.c does the right thing. */
if (namefile && strcmp(namefile, "-") == 0 && !buildonly) {
postfatal(PROGRAM_NAME ": Must use -b if file list comes from stdin\n");
/* falseTREACHED */
/* NOTREACHED */
}

/* make sure that tmpdir exists */
@@ -448,13 +448,13 @@ main(int argc, char **argv)
if (isuptodate == true) {
if ((oldrefs = vpfopen(reffile, "rb")) == NULL) {
postfatal(PROGRAM_NAME ": cannot open file %s\n", reffile);
/* falseTREACHED */
/* NOTREACHED */
}
/* get the crossref file version but skip the current directory */
if (fscanf(oldrefs, PROGRAM_NAME " %d %*s", &fileversion) != 1) {
postfatal(PROGRAM_NAME ": cannot read file version from file %s\n",
reffile);
/* falseTREACHED */
/* NOTREACHED */
}
if (fileversion >= 8) {

@@ -495,7 +495,7 @@ main(int argc, char **argv)
postfatal(
PROGRAM_NAME ": cannot read source file size from file %s\n",
reffile);
/* falseTREACHED */
/* NOTREACHED */
}
/* get the source file list */
srcfiles = malloc(nsrcfiles * sizeof(*srcfiles));
@@ -506,7 +506,7 @@ main(int argc, char **argv)
postfatal(
PROGRAM_NAME ": cannot read string space size from file %s\n",
reffile);
/* falseTREACHED */
/* NOTREACHED */
}
s = malloc(oldnum);
getc(oldrefs); /* skip the newline */
@@ -516,7 +516,7 @@ main(int argc, char **argv)
postfatal(
PROGRAM_NAME ": cannot read source file names from file %s\n",
reffile);
/* falseTREACHED */
/* NOTREACHED */
}
/* change newlines to nulls */
for (i = 0; i < nsrcfiles; ++i) {
@@ -557,7 +557,7 @@ main(int argc, char **argv)
PROGRAM_NAME ": cannot read source file name from file %s\n",
reffile
);
/* falseTREACHED */
/* NOTREACHED */
}
srcfiles[i] = strdup(path);
}
@@ -610,7 +610,7 @@ main(int argc, char **argv)
}
if (buildonly == true) {
myexit(0);
/* falseTREACHED */
/* NOTREACHED */
}
}
opendatabase();
@@ -636,6 +636,6 @@ main(int argc, char **argv)
screenmode_event_loop();
/* cleanup and exit */
myexit(0);
/* falseTREACHED */
/* NOTREACHED */
return 0; /* avoid warning... */
}

+ 1
- 1
src/opt.c Прегледај датотеку

@@ -115,7 +115,7 @@ char ** parse_options(int *argc, char **argv)
postfatal("\
cscope: reffile too long, cannot \
be > %d characters\n", sizeof(path) - 3);
/* falseTREACHED */
/* NOTREACHED */
}
strcpy(path, reffile);



Loading…
Откажи
Сачувај