ctags: drop vStringTerminate()
It's call is unnecesssary. Corresponds to universal-ctags commit cfc45e3bd9000e8ce193399c7e0ecf2bbeb57977.
This commit is contained in:
parent
662765852f
commit
40396a392e
1
HACKING
1
HACKING
@ -460,7 +460,6 @@ Bugs to watch out for
|
|||||||
* Inserting fields into structs in the plugin API instead of appending.
|
* Inserting fields into structs in the plugin API instead of appending.
|
||||||
* Not breaking the plugin ABI when necessary.
|
* Not breaking the plugin ABI when necessary.
|
||||||
* Using an idle callback that doesn't check main_status.quitting.
|
* Using an idle callback that doesn't check main_status.quitting.
|
||||||
* Forgetting to call vStringTerminate in CTags code.
|
|
||||||
* Forgetting CRLF line endings on Windows.
|
* Forgetting CRLF line endings on Windows.
|
||||||
* Not handling Tabs & Spaces indent mode.
|
* Not handling Tabs & Spaces indent mode.
|
||||||
|
|
||||||
|
@ -102,7 +102,6 @@ static char* nextFileArg (FILE* const fp)
|
|||||||
vStringPut (vs, c);
|
vStringPut (vs, c);
|
||||||
c = fgetc (fp);
|
c = fgetc (fp);
|
||||||
} while (c != EOF && ! isspace (c));
|
} while (c != EOF && ! isspace (c));
|
||||||
vStringTerminate (vs);
|
|
||||||
Assert (vStringLength (vs) > 0);
|
Assert (vStringLength (vs) > 0);
|
||||||
result = xMalloc (vStringLength (vs) + 1, char);
|
result = xMalloc (vStringLength (vs) + 1, char);
|
||||||
strcpy (result, vStringValue (vs));
|
strcpy (result, vStringValue (vs));
|
||||||
@ -127,7 +126,6 @@ static char* nextFileLine (FILE* const fp)
|
|||||||
vStringPut (vs, c);
|
vStringPut (vs, c);
|
||||||
c = fgetc (fp);
|
c = fgetc (fp);
|
||||||
}
|
}
|
||||||
vStringTerminate (vs);
|
|
||||||
if (vStringLength (vs) > 0)
|
if (vStringLength (vs) > 0)
|
||||||
{
|
{
|
||||||
result = xMalloc (vStringLength (vs) + 1, char);
|
result = xMalloc (vStringLength (vs) + 1, char);
|
||||||
|
@ -212,7 +212,6 @@ static void readIdentifier (int c, vString *const name)
|
|||||||
c = getcFromInputFile ();
|
c = getcFromInputFile ();
|
||||||
} while (c != EOF && cppIsident (c));
|
} while (c != EOF && cppIsident (c));
|
||||||
ungetcToInputFile (c);
|
ungetcToInputFile (c);
|
||||||
vStringTerminate (name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static conditionalInfo *currentConditional (void)
|
static conditionalInfo *currentConditional (void)
|
||||||
|
@ -431,7 +431,6 @@ static vString* substitute (
|
|||||||
else if (*p != '\n' && *p != '\r')
|
else if (*p != '\n' && *p != '\r')
|
||||||
vStringPut (result, *p);
|
vStringPut (result, *p);
|
||||||
}
|
}
|
||||||
vStringTerminate (result);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,6 @@ extern bool isIgnoreToken (const char *const name,
|
|||||||
size_t tokenLen;
|
size_t tokenLen;
|
||||||
|
|
||||||
vStringCopyS (token, c_tags_ignore[i]);
|
vStringCopyS (token, c_tags_ignore[i]);
|
||||||
vStringTerminate (token);
|
|
||||||
tokenLen = vStringLength (token);
|
tokenLen = vStringLength (token);
|
||||||
|
|
||||||
if (tokenLen >= 2 && vStringChar (token, tokenLen - 1) == '*' &&
|
if (tokenLen >= 2 && vStringChar (token, tokenLen - 1) == '*' &&
|
||||||
|
@ -165,7 +165,6 @@ static vString* determineInterpreter (const char* const cmd)
|
|||||||
; /* no-op */
|
; /* no-op */
|
||||||
for ( ; *p != '\0' && ! isspace (*p) ; ++p)
|
for ( ; *p != '\0' && ! isspace (*p) ; ++p)
|
||||||
vStringPut (interpreter, (int) *p);
|
vStringPut (interpreter, (int) *p);
|
||||||
vStringTerminate (interpreter);
|
|
||||||
} while (strcmp (vStringValue (interpreter), "env") == 0);
|
} while (strcmp (vStringValue (interpreter), "env") == 0);
|
||||||
return interpreter;
|
return interpreter;
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,6 @@ static vString *iFileGetLine (void)
|
|||||||
vStringPut (File.line, c);
|
vStringPut (File.line, c);
|
||||||
if (c == '\n' || (c == EOF && vStringLength (File.line) > 0))
|
if (c == '\n' || (c == EOF && vStringLength (File.line) > 0))
|
||||||
{
|
{
|
||||||
vStringTerminate (File.line);
|
|
||||||
#ifdef HAVE_REGEX
|
#ifdef HAVE_REGEX
|
||||||
if (vStringLength (File.line) > 0)
|
if (vStringLength (File.line) > 0)
|
||||||
matchRegex (File.line, File.source.language);
|
matchRegex (File.line, File.source.language);
|
||||||
|
@ -439,10 +439,7 @@ extern vString *combinePathAndFile (const char *const path,
|
|||||||
|
|
||||||
vStringCopyS (filePath, path);
|
vStringCopyS (filePath, path);
|
||||||
if (! terminated)
|
if (! terminated)
|
||||||
{
|
|
||||||
vStringPut (filePath, OUTPUT_PATH_SEPARATOR);
|
vStringPut (filePath, OUTPUT_PATH_SEPARATOR);
|
||||||
vStringTerminate (filePath);
|
|
||||||
}
|
|
||||||
vStringCatS (filePath, file);
|
vStringCatS (filePath, file);
|
||||||
|
|
||||||
return filePath;
|
return filePath;
|
||||||
|
@ -58,7 +58,7 @@ extern void vStringTruncate (vString *const string, const size_t length)
|
|||||||
{
|
{
|
||||||
Assert (length <= string->length);
|
Assert (length <= string->length);
|
||||||
string->length = length;
|
string->length = length;
|
||||||
vStringTerminate (string);
|
vStringPut(string, '\0');
|
||||||
DebugStatement ( memset (string->buffer + string->length, 0,
|
DebugStatement ( memset (string->buffer + string->length, 0,
|
||||||
string->size - string->length); )
|
string->size - string->length); )
|
||||||
}
|
}
|
||||||
@ -145,7 +145,6 @@ extern void vStringNCatS (
|
|||||||
--remain;
|
--remain;
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Strip trailing newline from string.
|
/* Strip trailing newline from string.
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#define vStringCopy(vs,s) vStringCopyS((vs), vStringValue((s)))
|
#define vStringCopy(vs,s) vStringCopyS((vs), vStringValue((s)))
|
||||||
#define vStringNCopy(vs,s,l) vStringNCopyS((vs), vStringValue((s)), (l))
|
#define vStringNCopy(vs,s,l) vStringNCopyS((vs), vStringValue((s)), (l))
|
||||||
#define vStringChar(vs,i) ((vs)->buffer[i])
|
#define vStringChar(vs,i) ((vs)->buffer[i])
|
||||||
#define vStringTerminate(vs) vStringPut(vs, '\0')
|
|
||||||
#define vStringLower(vs) toLowerString((vs)->buffer)
|
#define vStringLower(vs) toLowerString((vs)->buffer)
|
||||||
#define vStringUpper(vs) toUpperString((vs)->buffer)
|
#define vStringUpper(vs) toUpperString((vs)->buffer)
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@ static void createTag(AbaqusKind kind, const char *buf)
|
|||||||
vStringPut(name, (int) *buf);
|
vStringPut(name, (int) *buf);
|
||||||
++buf;
|
++buf;
|
||||||
} while ((*buf != '\0') && (*buf != ','));
|
} while ((*buf != '\0') && (*buf != ','));
|
||||||
vStringTerminate(name);
|
|
||||||
makeSimpleTag(name, AbaqusKinds, kind);
|
makeSimpleTag(name, AbaqusKinds, kind);
|
||||||
vStringDelete(name);
|
vStringDelete(name);
|
||||||
}
|
}
|
||||||
|
@ -90,21 +90,18 @@ static void findAbcTags (void)
|
|||||||
/* if (line[1] == '%') {
|
/* if (line[1] == '%') {
|
||||||
vStringClear(name);
|
vStringClear(name);
|
||||||
vStringCatS(name, (const char *) line);
|
vStringCatS(name, (const char *) line);
|
||||||
vStringTerminate(name);
|
|
||||||
makeAbcTag(name, false);
|
makeAbcTag(name, false);
|
||||||
}*/
|
}*/
|
||||||
if (line[0] == 'T') {
|
if (line[0] == 'T') {
|
||||||
/*vStringClear(name);*/
|
/*vStringClear(name);*/
|
||||||
vStringCatS(name, " / ");
|
vStringCatS(name, " / ");
|
||||||
vStringCatS(name, (const char *) line);
|
vStringCatS(name, (const char *) line);
|
||||||
vStringTerminate(name);
|
|
||||||
makeAbcTag(name, false);
|
makeAbcTag(name, false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
if (! isspace(*line))
|
if (! isspace(*line))
|
||||||
vStringCatS(name, (const char*) line);
|
vStringCatS(name, (const char*) line);
|
||||||
vStringTerminate(name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vStringDelete (name);
|
vStringDelete (name);
|
||||||
|
@ -202,7 +202,6 @@ static void findAsciidocTags(void)
|
|||||||
while (isspace(line[end]))--end;
|
while (isspace(line[end]))--end;
|
||||||
vStringClear(name);
|
vStringClear(name);
|
||||||
vStringNCatS(name, (const char*)(&(line[start])), end - start + 1);
|
vStringNCatS(name, (const char*)(&(line[start])), end - start + 1);
|
||||||
vStringTerminate(name);
|
|
||||||
makeAsciidocTag(name, kind);
|
makeAsciidocTag(name, kind);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -210,7 +209,6 @@ static void findAsciidocTags(void)
|
|||||||
vStringClear(name);
|
vStringClear(name);
|
||||||
if (! isspace(*line))
|
if (! isspace(*line))
|
||||||
vStringCatS(name, (const char*) line);
|
vStringCatS(name, (const char*) line);
|
||||||
vStringTerminate(name);
|
|
||||||
}
|
}
|
||||||
vStringDelete(name);
|
vStringDelete(name);
|
||||||
nestingLevelsFree(nestingLevels);
|
nestingLevelsFree(nestingLevels);
|
||||||
|
@ -141,7 +141,6 @@ static bool readPreProc (const unsigned char *const line)
|
|||||||
vStringPut (name, *cp);
|
vStringPut (name, *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
result = (bool) (strcmp (vStringValue (name), "define") == 0);
|
result = (bool) (strcmp (vStringValue (name), "define") == 0);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
@ -153,7 +152,6 @@ static bool readPreProc (const unsigned char *const line)
|
|||||||
vStringPut (name, *cp);
|
vStringPut (name, *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, AsmKinds, K_DEFINE);
|
makeSimpleTag (name, AsmKinds, K_DEFINE);
|
||||||
}
|
}
|
||||||
vStringDelete (name);
|
vStringDelete (name);
|
||||||
@ -232,7 +230,6 @@ static const unsigned char *readSymbol (
|
|||||||
vStringPut (sym, *cp);
|
vStringPut (sym, *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (sym);
|
|
||||||
}
|
}
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
@ -248,7 +245,6 @@ static const unsigned char *readOperator (
|
|||||||
vStringPut (operator, *cp);
|
vStringPut (operator, *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (operator);
|
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,6 @@ static int extract_dim (char const *pos, vString * name, BasicKind kind)
|
|||||||
|
|
||||||
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
|
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
|
||||||
vStringPut (name, *pos);
|
vStringPut (name, *pos);
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, BasicKinds, kind);
|
makeSimpleTag (name, BasicKinds, kind);
|
||||||
|
|
||||||
/* if the line contains a ',', we have multiple declarations */
|
/* if the line contains a ',', we have multiple declarations */
|
||||||
@ -141,7 +140,6 @@ static int extract_dim (char const *pos, vString * name, BasicKind kind)
|
|||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
|
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
|
||||||
vStringPut (name, *pos);
|
vStringPut (name, *pos);
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, BasicKinds, kind);
|
makeSimpleTag (name, BasicKinds, kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +155,6 @@ static char const *extract_name (char const *pos, vString * name)
|
|||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
|
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
|
||||||
vStringPut (name, *pos);
|
vStringPut (name, *pos);
|
||||||
vStringTerminate (name);
|
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1330,7 +1330,6 @@ static const char *getVarType (const statementInfo *const st,
|
|||||||
vStringPut(vt, ' ');
|
vStringPut(vt, ' ');
|
||||||
vStringCat(vt, t->name);
|
vStringCat(vt, t->name);
|
||||||
}
|
}
|
||||||
vStringTerminate(vt);
|
|
||||||
return vStringValue(vt);
|
return vStringValue(vt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1786,7 +1785,6 @@ static void readIdentifier (tokenInfo *const token, const int firstChar)
|
|||||||
vStringPut (name, c);
|
vStringPut (name, c);
|
||||||
c = cppGetc ();
|
c = cppGetc ();
|
||||||
} while (cppIsident (c) || (isInputLanguage (Lang_vala) && '.' == c));
|
} while (cppIsident (c) || (isInputLanguage (Lang_vala) && '.' == c));
|
||||||
vStringTerminate (name);
|
|
||||||
cppUngetc (c); /* unget non-identifier character */
|
cppUngetc (c); /* unget non-identifier character */
|
||||||
|
|
||||||
/* Vala supports '?' at end of a type (with or without whitespace before) for nullable types */
|
/* Vala supports '?' at end of a type (with or without whitespace before) for nullable types */
|
||||||
@ -1814,7 +1812,6 @@ static void readPackageName (tokenInfo *const token, const int firstChar)
|
|||||||
vStringPut (name, c);
|
vStringPut (name, c);
|
||||||
c = cppGetc ();
|
c = cppGetc ();
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
cppUngetc (c); /* unget non-package character */
|
cppUngetc (c); /* unget non-package character */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1913,7 +1910,6 @@ static void readOperator (statementInfo *const st)
|
|||||||
}
|
}
|
||||||
c = cppGetc ();
|
c = cppGetc ();
|
||||||
} while (! isOneOf (c, "(;") && c != EOF);
|
} while (! isOneOf (c, "(;") && c != EOF);
|
||||||
vStringTerminate (name);
|
|
||||||
}
|
}
|
||||||
else if (isOneOf (c, acceptable))
|
else if (isOneOf (c, acceptable))
|
||||||
{
|
{
|
||||||
@ -1923,7 +1919,6 @@ static void readOperator (statementInfo *const st)
|
|||||||
vStringPut (name, c);
|
vStringPut (name, c);
|
||||||
c = cppGetc ();
|
c = cppGetc ();
|
||||||
} while (isOneOf (c, acceptable));
|
} while (isOneOf (c, acceptable));
|
||||||
vStringTerminate (name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cppUngetc (c);
|
cppUngetc (c);
|
||||||
|
@ -66,11 +66,9 @@ static void findConfTags (void)
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, ConfKinds, K_SECTION);
|
makeSimpleTag (name, ConfKinds, K_SECTION);
|
||||||
/* remember section name */
|
/* remember section name */
|
||||||
vStringCopy (scope, name);
|
vStringCopy (scope, name);
|
||||||
vStringTerminate (scope);
|
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -85,7 +83,6 @@ static void findConfTags (void)
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
vStringStripTrailing (name);
|
vStringStripTrailing (name);
|
||||||
while (isspace ((int) *cp))
|
while (isspace ((int) *cp))
|
||||||
++cp;
|
++cp;
|
||||||
|
@ -63,7 +63,6 @@ static void parseSelector (vString *const string, const int firstChar)
|
|||||||
c = getcFromInputFile ();
|
c = getcFromInputFile ();
|
||||||
} while (isSelectorChar (c));
|
} while (isSelectorChar (c));
|
||||||
ungetcToInputFile (c);
|
ungetcToInputFile (c);
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void readToken (tokenInfo *const token)
|
static void readToken (tokenInfo *const token)
|
||||||
@ -224,7 +223,6 @@ static void findCssTags (void)
|
|||||||
/* we already consumed the next token, don't read it twice */
|
/* we already consumed the next token, don't read it twice */
|
||||||
readNextToken = false;
|
readNextToken = false;
|
||||||
|
|
||||||
vStringTerminate (selector);
|
|
||||||
if (CssKinds[kind].enabled)
|
if (CssKinds[kind].enabled)
|
||||||
{
|
{
|
||||||
tagEntryInfo e;
|
tagEntryInfo e;
|
||||||
|
@ -109,7 +109,6 @@ static void findDiffTags (void)
|
|||||||
tmp++;
|
tmp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
vStringTerminate(filename);
|
|
||||||
makeSimpleTag (filename, DiffKinds, K_FUNCTION);
|
makeSimpleTag (filename, DiffKinds, K_FUNCTION);
|
||||||
vStringClear (filename);
|
vStringClear (filename);
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,6 @@ static void createTag(docbookKind kind, const char *buf)
|
|||||||
vStringPut(name, (int) *buf);
|
vStringPut(name, (int) *buf);
|
||||||
++buf;
|
++buf;
|
||||||
} while ((*buf != '\0') && (*buf != '"'));
|
} while ((*buf != '\0') && (*buf != '"'));
|
||||||
vStringTerminate(name);
|
|
||||||
makeSimpleTag(name, DocBookKinds, kind);
|
makeSimpleTag(name, DocBookKinds, kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,6 @@ static const unsigned char *parseIdentifier (
|
|||||||
vStringPut (identifier, (int) *cp);
|
vStringPut (identifier, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (identifier);
|
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,10 +601,7 @@ static lineType getLineType (void)
|
|||||||
Assert (type != LTYPE_UNDETERMINED);
|
Assert (type != LTYPE_UNDETERMINED);
|
||||||
|
|
||||||
if (vStringLength (label) > 0)
|
if (vStringLength (label) > 0)
|
||||||
{
|
|
||||||
vStringTerminate (label);
|
|
||||||
makeLabelTag (label);
|
makeLabelTag (label);
|
||||||
}
|
|
||||||
vStringDelete (label);
|
vStringDelete (label);
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
@ -796,7 +793,6 @@ static vString *parseInteger (int c)
|
|||||||
vStringPut (string, c);
|
vStringPut (string, c);
|
||||||
c = getChar ();
|
c = getChar ();
|
||||||
}
|
}
|
||||||
vStringTerminate (string);
|
|
||||||
|
|
||||||
if (c == '_')
|
if (c == '_')
|
||||||
{
|
{
|
||||||
@ -835,8 +831,6 @@ static vString *parseNumeric (int c)
|
|||||||
else
|
else
|
||||||
ungetChar (c);
|
ungetChar (c);
|
||||||
|
|
||||||
vStringTerminate (string);
|
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -860,7 +854,6 @@ static void parseString (vString *const string, const int delimiter)
|
|||||||
else if (! FreeSourceForm)
|
else if (! FreeSourceForm)
|
||||||
longjmp (Exception, (int) ExceptionFixedFormat);
|
longjmp (Exception, (int) ExceptionFixedFormat);
|
||||||
}
|
}
|
||||||
vStringTerminate (string);
|
|
||||||
ParsingString = false;
|
ParsingString = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -876,7 +869,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
|
|||||||
c = getChar ();
|
c = getChar ();
|
||||||
} while (isident (c));
|
} while (isident (c));
|
||||||
|
|
||||||
vStringTerminate (string);
|
|
||||||
ungetChar (c); /* unget non-identifier character */
|
ungetChar (c); /* unget non-identifier character */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -902,7 +894,6 @@ static void checkForLabel (void)
|
|||||||
}
|
}
|
||||||
if (length > 0 && token != NULL)
|
if (length > 0 && token != NULL)
|
||||||
{
|
{
|
||||||
vStringTerminate (token->string);
|
|
||||||
makeFortranTag (token, TAG_LABEL);
|
makeFortranTag (token, TAG_LABEL);
|
||||||
deleteToken (token);
|
deleteToken (token);
|
||||||
}
|
}
|
||||||
@ -994,7 +985,6 @@ getNextChar:
|
|||||||
c = getChar ();
|
c = getChar ();
|
||||||
} while (strchr (operatorChars, c) != NULL);
|
} while (strchr (operatorChars, c) != NULL);
|
||||||
ungetChar (c);
|
ungetChar (c);
|
||||||
vStringTerminate (token->string);
|
|
||||||
token->type = TOKEN_OPERATOR;
|
token->type = TOKEN_OPERATOR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1024,7 +1014,6 @@ getNextChar:
|
|||||||
if (c == '.')
|
if (c == '.')
|
||||||
{
|
{
|
||||||
vStringPut (token->string, c);
|
vStringPut (token->string, c);
|
||||||
vStringTerminate (token->string);
|
|
||||||
token->type = TOKEN_OPERATOR;
|
token->type = TOKEN_OPERATOR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -191,7 +191,6 @@ static void parseString (vString *const string, const int delimiter)
|
|||||||
else
|
else
|
||||||
vStringPut (string, c);
|
vStringPut (string, c);
|
||||||
}
|
}
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void parseIdentifier (vString *const string, const int firstChar)
|
static void parseIdentifier (vString *const string, const int firstChar)
|
||||||
@ -202,7 +201,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
|
|||||||
vStringPut (string, c);
|
vStringPut (string, c);
|
||||||
c = getcFromInputFile ();
|
c = getcFromInputFile ();
|
||||||
} while (isIdentChar (c));
|
} while (isIdentChar (c));
|
||||||
vStringTerminate (string);
|
|
||||||
ungetcToInputFile (c); /* always unget, LF might add a semicolon */
|
ungetcToInputFile (c); /* always unget, LF might add a semicolon */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,6 @@ static void add_tag(const char *token, haskellKind kind, vString *name)
|
|||||||
for (i = 0; token[i] != '\0'; ++i)
|
for (i = 0; token[i] != '\0'; ++i)
|
||||||
vStringPut(name, token[i]);
|
vStringPut(name, token[i]);
|
||||||
|
|
||||||
vStringTerminate(name);
|
|
||||||
makeSimpleTag(name, HaskellKinds, kind);
|
makeSimpleTag(name, HaskellKinds, kind);
|
||||||
vStringClear(name);
|
vStringClear(name);
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,6 @@ another:
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, HxKinds, HXTAG_VARIABLE);
|
makeSimpleTag (name, HxKinds, HXTAG_VARIABLE);
|
||||||
|
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
@ -109,7 +108,6 @@ another:
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, HxKinds, HXTAG_METHODS);
|
makeSimpleTag (name, HxKinds, HXTAG_METHODS);
|
||||||
|
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
@ -127,7 +125,6 @@ another:
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, HxKinds, HXTAG_CLASS);
|
makeSimpleTag (name, HxKinds, HXTAG_CLASS);
|
||||||
vStringCopy(clsName,name);
|
vStringCopy(clsName,name);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
@ -145,7 +142,6 @@ another:
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, HxKinds, HXTAG_ENUM);
|
makeSimpleTag (name, HxKinds, HXTAG_ENUM);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
} else if (strncmp ((const char*) cp, "public", (size_t) 6) == 0 &&
|
} else if (strncmp ((const char*) cp, "public", (size_t) 6) == 0 &&
|
||||||
@ -175,7 +171,6 @@ another:
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, HxKinds, HXTAG_INTERFACE);
|
makeSimpleTag (name, HxKinds, HXTAG_INTERFACE);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
} else if (strncmp ((const char *) cp,"typedef",(size_t) 7) == 0 && isspace(((int) cp[7]))) {
|
} else if (strncmp ((const char *) cp,"typedef",(size_t) 7) == 0 && isspace(((int) cp[7]))) {
|
||||||
@ -188,7 +183,6 @@ another:
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, HxKinds, HXTAG_TYPEDEF);
|
makeSimpleTag (name, HxKinds, HXTAG_TYPEDEF);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,6 @@ static void makeClassTag (tokenInfo *const token, vString *const signature)
|
|||||||
{
|
{
|
||||||
vStringCopy(fulltag, token->string);
|
vStringCopy(fulltag, token->string);
|
||||||
}
|
}
|
||||||
vStringTerminate(fulltag);
|
|
||||||
if ( ! stringListHas(ClassNames, vStringValue (fulltag)) )
|
if ( ! stringListHas(ClassNames, vStringValue (fulltag)) )
|
||||||
{
|
{
|
||||||
stringListAdd (ClassNames, vStringNewCopy (fulltag));
|
stringListAdd (ClassNames, vStringNewCopy (fulltag));
|
||||||
@ -309,7 +308,6 @@ static void makeFunctionTag (tokenInfo *const token, vString *const signature)
|
|||||||
{
|
{
|
||||||
vStringCopy(fulltag, token->string);
|
vStringCopy(fulltag, token->string);
|
||||||
}
|
}
|
||||||
vStringTerminate(fulltag);
|
|
||||||
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) )
|
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) )
|
||||||
{
|
{
|
||||||
stringListAdd (FunctionNames, vStringNewCopy (fulltag));
|
stringListAdd (FunctionNames, vStringNewCopy (fulltag));
|
||||||
@ -362,7 +360,6 @@ static void parseString (vString *const string, const int delimiter)
|
|||||||
else
|
else
|
||||||
vStringPut (string, c);
|
vStringPut (string, c);
|
||||||
}
|
}
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void parseRegExp (void)
|
static void parseRegExp (void)
|
||||||
@ -403,7 +400,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
|
|||||||
vStringPut (string, c);
|
vStringPut (string, c);
|
||||||
c = getcFromInputFile ();
|
c = getcFromInputFile ();
|
||||||
} while (isIdentChar (c));
|
} while (isIdentChar (c));
|
||||||
vStringTerminate (string);
|
|
||||||
ungetcToInputFile (c); /* unget non-identifier character */
|
ungetcToInputFile (c); /* unget non-identifier character */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -708,7 +704,6 @@ static void addContext (tokenInfo* const parent, const tokenInfo* const child)
|
|||||||
vStringCatS (parent->string, ".");
|
vStringCatS (parent->string, ".");
|
||||||
}
|
}
|
||||||
vStringCatS (parent->string, vStringValue(child->string));
|
vStringCatS (parent->string, vStringValue(child->string));
|
||||||
vStringTerminate(parent->string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addToScope (tokenInfo* const token, vString* const extra)
|
static void addToScope (tokenInfo* const token, vString* const extra)
|
||||||
@ -718,7 +713,6 @@ static void addToScope (tokenInfo* const token, vString* const extra)
|
|||||||
vStringCatS (token->scope, ".");
|
vStringCatS (token->scope, ".");
|
||||||
}
|
}
|
||||||
vStringCatS (token->scope, vStringValue(extra));
|
vStringCatS (token->scope, vStringValue(extra));
|
||||||
vStringTerminate(token->scope);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1600,7 +1594,6 @@ static bool parseStatement (tokenInfo *const token, tokenInfo *const parent, boo
|
|||||||
{
|
{
|
||||||
vStringCopy(fulltag, token->string);
|
vStringCopy(fulltag, token->string);
|
||||||
}
|
}
|
||||||
vStringTerminate(fulltag);
|
|
||||||
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) &&
|
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) &&
|
||||||
! stringListHas(ClassNames, vStringValue (fulltag)) )
|
! stringListHas(ClassNames, vStringValue (fulltag)) )
|
||||||
{
|
{
|
||||||
@ -1691,7 +1684,6 @@ static bool parseStatement (tokenInfo *const token, tokenInfo *const parent, boo
|
|||||||
{
|
{
|
||||||
vStringCopy(fulltag, token->string);
|
vStringCopy(fulltag, token->string);
|
||||||
}
|
}
|
||||||
vStringTerminate(fulltag);
|
|
||||||
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) &&
|
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) &&
|
||||||
! stringListHas(ClassNames, vStringValue (fulltag)) )
|
! stringListHas(ClassNames, vStringValue (fulltag)) )
|
||||||
{
|
{
|
||||||
|
@ -181,7 +181,6 @@ static void readTokenFull (tokenInfo *const token,
|
|||||||
if (includeStringRepr)
|
if (includeStringRepr)
|
||||||
vStringPut (token->string, c);
|
vStringPut (token->string, c);
|
||||||
}
|
}
|
||||||
vStringTerminate (token->string);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,7 +195,6 @@ static void readTokenFull (tokenInfo *const token,
|
|||||||
c = getcFromInputFile ();
|
c = getcFromInputFile ();
|
||||||
}
|
}
|
||||||
while (c != EOF && isIdentChar (c));
|
while (c != EOF && isIdentChar (c));
|
||||||
vStringTerminate (token->string);
|
|
||||||
ungetcToInputFile (c);
|
ungetcToInputFile (c);
|
||||||
switch (lookupKeyword (vStringValue (token->string), Lang_json))
|
switch (lookupKeyword (vStringValue (token->string), Lang_json))
|
||||||
{
|
{
|
||||||
@ -219,7 +217,6 @@ static void pushScope (tokenInfo *const token,
|
|||||||
if (vStringLength (token->scope) > 0)
|
if (vStringLength (token->scope) > 0)
|
||||||
vStringPut (token->scope, '.');
|
vStringPut (token->scope, '.');
|
||||||
vStringCat (token->scope, parent->string);
|
vStringCat (token->scope, parent->string);
|
||||||
vStringTerminate (token->scope);
|
|
||||||
token->scopeKind = parentKind;
|
token->scopeKind = parentKind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,6 @@ static void createTag(int flags, TeXKind kind, const char * l)
|
|||||||
vStringPut(name, (int) *l);
|
vStringPut(name, (int) *l);
|
||||||
++l;
|
++l;
|
||||||
} while ((*l != '\0') && (*l != '}'));
|
} while ((*l != '\0') && (*l != '}'));
|
||||||
vStringTerminate(name);
|
|
||||||
if (name->buffer[0] != '}')
|
if (name->buffer[0] != '}')
|
||||||
makeSimpleTag(name, TeXKinds, kind);
|
makeSimpleTag(name, TeXKinds, kind);
|
||||||
}
|
}
|
||||||
@ -116,13 +115,11 @@ static void createTag(int flags, TeXKind kind, const char * l)
|
|||||||
vStringPut (name, (int) *l);
|
vStringPut (name, (int) *l);
|
||||||
++l;
|
++l;
|
||||||
} while (isalpha((int) *l) || *l == '@');
|
} while (isalpha((int) *l) || *l == '@');
|
||||||
vStringTerminate(name);
|
|
||||||
makeSimpleTag(name, TeXKinds, kind);
|
makeSimpleTag(name, TeXKinds, kind);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vStringPut(name, (int) *l);
|
vStringPut(name, (int) *l);
|
||||||
vStringTerminate(name);
|
|
||||||
makeSimpleTag(name, TeXKinds, kind);
|
makeSimpleTag(name, TeXKinds, kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,6 @@ static void extract_name (const char *begin, const char *end, vString *name)
|
|||||||
{
|
{
|
||||||
for (cp = begin ; cp != end; cp++)
|
for (cp = begin ; cp != end; cp++)
|
||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
vStringTerminate (name);
|
|
||||||
|
|
||||||
makeSimpleTag (name, LuaKinds, K_FUNCTION);
|
makeSimpleTag (name, LuaKinds, K_FUNCTION);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
|
@ -120,7 +120,6 @@ static void readIdentifier (const int first, vString *const id)
|
|||||||
c = nextChar ();
|
c = nextChar ();
|
||||||
}
|
}
|
||||||
ungetcToInputFile (c);
|
ungetcToInputFile (c);
|
||||||
vStringTerminate (id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void findMakeTags (void)
|
static void findMakeTags (void)
|
||||||
@ -208,7 +207,6 @@ static void findMakeTags (void)
|
|||||||
}
|
}
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
ungetcToInputFile (c);
|
ungetcToInputFile (c);
|
||||||
vStringTerminate (name);
|
|
||||||
vStringStripTrailing (name);
|
vStringStripTrailing (name);
|
||||||
newMacro (name);
|
newMacro (name);
|
||||||
}
|
}
|
||||||
|
@ -75,14 +75,12 @@ static void findMarkdownTags (void)
|
|||||||
else if (line[0] == '#') {
|
else if (line[0] == '#') {
|
||||||
vStringClear(name);
|
vStringClear(name);
|
||||||
vStringCatS(name, (const char *) line);
|
vStringCatS(name, (const char *) line);
|
||||||
vStringTerminate(name);
|
|
||||||
makeMarkdownTag(name, false);
|
makeMarkdownTag(name, false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
if (! isspace(*line))
|
if (! isspace(*line))
|
||||||
vStringCatS(name, (const char*) line);
|
vStringCatS(name, (const char*) line);
|
||||||
vStringTerminate(name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vStringDelete (name);
|
vStringDelete (name);
|
||||||
|
@ -107,7 +107,6 @@ static void findMatlabTags (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, MatlabKinds, K_FUNCTION);
|
makeSimpleTag (name, MatlabKinds, K_FUNCTION);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
}
|
}
|
||||||
@ -129,7 +128,6 @@ static void findMatlabTags (void)
|
|||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, MatlabKinds, K_STRUCT);
|
makeSimpleTag (name, MatlabKinds, K_STRUCT);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,6 @@ static void findNsisTags (void)
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, NsisKinds, K_FUNCTION);
|
makeSimpleTag (name, NsisKinds, K_FUNCTION);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
}
|
}
|
||||||
@ -94,7 +93,6 @@ static void findNsisTags (void)
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, NsisKinds, K_VARIABLE);
|
makeSimpleTag (name, NsisKinds, K_VARIABLE);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
}
|
}
|
||||||
@ -124,7 +122,6 @@ static void findNsisTags (void)
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, NsisKinds, K_SECTION);
|
makeSimpleTag (name, NsisKinds, K_SECTION);
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
}
|
}
|
||||||
|
@ -245,8 +245,6 @@ static void readIdentifier (lexingState * st)
|
|||||||
vStringPut (st->name, (int) *p);
|
vStringPut (st->name, (int) *p);
|
||||||
|
|
||||||
st->cp = p;
|
st->cp = p;
|
||||||
|
|
||||||
vStringTerminate (st->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the @something directives */
|
/* read the @something directives */
|
||||||
@ -264,8 +262,6 @@ static void readIdentifierObjcDirective (lexingState * st)
|
|||||||
vStringPut (st->name, (int) *p);
|
vStringPut (st->name, (int) *p);
|
||||||
|
|
||||||
st->cp = p;
|
st->cp = p;
|
||||||
|
|
||||||
vStringTerminate (st->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The lexer is in charge of reading the file.
|
/* The lexer is in charge of reading the file.
|
||||||
|
@ -304,7 +304,6 @@ static void findPerlTags (void)
|
|||||||
vStringCatS (name, "STDOUT");
|
vStringCatS (name, "STDOUT");
|
||||||
}
|
}
|
||||||
|
|
||||||
vStringTerminate (name);
|
|
||||||
TRACE("name: %s\n", name->buffer);
|
TRACE("name: %s\n", name->buffer);
|
||||||
|
|
||||||
if (0 == vStringLength(name)) {
|
if (0 == vStringLength(name)) {
|
||||||
|
@ -298,7 +298,6 @@ static void initPhpEntry (tagEntryInfo *const e, const tokenInfo *const token,
|
|||||||
{
|
{
|
||||||
Assert (parentKind >= 0);
|
Assert (parentKind >= 0);
|
||||||
|
|
||||||
vStringTerminate (fullScope);
|
|
||||||
e->extensionFields.scopeKind = &(PhpKinds[parentKind]);
|
e->extensionFields.scopeKind = &(PhpKinds[parentKind]);
|
||||||
e->extensionFields.scopeName = vStringValue (fullScope);
|
e->extensionFields.scopeName = vStringValue (fullScope);
|
||||||
}
|
}
|
||||||
@ -475,7 +474,6 @@ static void addToScope (tokenInfo *const token, const vString *const extra)
|
|||||||
if (vStringLength (token->scope) > 0)
|
if (vStringLength (token->scope) > 0)
|
||||||
vStringCatS (token->scope, SCOPE_SEPARATOR);
|
vStringCatS (token->scope, SCOPE_SEPARATOR);
|
||||||
vStringCatS (token->scope, vStringValue (extra));
|
vStringCatS (token->scope, vStringValue (extra));
|
||||||
vStringTerminate(token->scope);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isIdentChar (const int c)
|
static bool isIdentChar (const int c)
|
||||||
@ -496,7 +494,6 @@ static void parseString (vString *const string, const int delimiter)
|
|||||||
else
|
else
|
||||||
vStringPut (string, (char) c);
|
vStringPut (string, (char) c);
|
||||||
}
|
}
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reads an HereDoc or a NowDoc (the part after the <<<).
|
/* reads an HereDoc or a NowDoc (the part after the <<<).
|
||||||
@ -614,8 +611,6 @@ static void parseHeredoc (vString *const string)
|
|||||||
}
|
}
|
||||||
while (c != EOF);
|
while (c != EOF);
|
||||||
|
|
||||||
vStringTerminate (string);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
@ -631,7 +626,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
|
|||||||
c = getcFromInputFile ();
|
c = getcFromInputFile ();
|
||||||
} while (isIdentChar (c));
|
} while (isIdentChar (c));
|
||||||
ungetcToInputFile (c);
|
ungetcToInputFile (c);
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static keywordId analyzeToken (vString *const name, langType language)
|
static keywordId analyzeToken (vString *const name, langType language)
|
||||||
@ -1144,8 +1138,6 @@ static bool parseFunction (tokenInfo *const token, const tokenInfo *name)
|
|||||||
}
|
}
|
||||||
while (token->type != TOKEN_EOF && depth > 0);
|
while (token->type != TOKEN_EOF && depth > 0);
|
||||||
|
|
||||||
vStringTerminate (arglist);
|
|
||||||
|
|
||||||
makeFunctionTag (name, arglist, access, impl);
|
makeFunctionTag (name, arglist, access, impl);
|
||||||
vStringDelete (arglist);
|
vStringDelete (arglist);
|
||||||
|
|
||||||
@ -1340,7 +1332,6 @@ static bool parseNamespace (tokenInfo *const token)
|
|||||||
token->type != TOKEN_SEMICOLON &&
|
token->type != TOKEN_SEMICOLON &&
|
||||||
token->type != TOKEN_OPEN_CURLY);
|
token->type != TOKEN_OPEN_CURLY);
|
||||||
|
|
||||||
vStringTerminate (CurrentNamespace);
|
|
||||||
if (vStringLength (CurrentNamespace) > 0)
|
if (vStringLength (CurrentNamespace) > 0)
|
||||||
makeNamespacePhpTag (nsToken, CurrentNamespace);
|
makeNamespacePhpTag (nsToken, CurrentNamespace);
|
||||||
|
|
||||||
|
@ -180,7 +180,6 @@ static void addToScope (tokenInfo *const token, const vString *const extra)
|
|||||||
if (vStringLength (token->scope) > 0)
|
if (vStringLength (token->scope) > 0)
|
||||||
vStringCatS (token->scope, SCOPE_SEPARATOR);
|
vStringCatS (token->scope, SCOPE_SEPARATOR);
|
||||||
vStringCatS (token->scope, vStringValue (extra));
|
vStringCatS (token->scope, vStringValue (extra));
|
||||||
vStringTerminate (token->scope);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isIdentChar (const int c)
|
static bool isIdentChar (const int c)
|
||||||
@ -201,7 +200,6 @@ static void parseString (vString *const string, const int delimiter)
|
|||||||
else
|
else
|
||||||
vStringPut (string, (char) c);
|
vStringPut (string, (char) c);
|
||||||
}
|
}
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void parseIdentifier (vString *const string, const int firstChar)
|
static void parseIdentifier (vString *const string, const int firstChar)
|
||||||
@ -213,7 +211,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
|
|||||||
c = getcFromInputFile ();
|
c = getcFromInputFile ();
|
||||||
} while (isIdentChar (c));
|
} while (isIdentChar (c));
|
||||||
ungetcToInputFile (c);
|
ungetcToInputFile (c);
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isTokenFunction (vString *const name)
|
static bool isTokenFunction (vString *const name)
|
||||||
@ -388,7 +385,6 @@ static const char *parsePowerShellScope (tokenInfo *const token)
|
|||||||
powershellScopeLen = (size_t)(powershellScopeEnd - tokenName);
|
powershellScopeLen = (size_t)(powershellScopeEnd - tokenName);
|
||||||
/* extract the scope */
|
/* extract the scope */
|
||||||
vStringNCopyS (powershellScope, tokenName, powershellScopeLen);
|
vStringNCopyS (powershellScope, tokenName, powershellScopeLen);
|
||||||
vStringTerminate (powershellScope);
|
|
||||||
/* cut the resulting scope string from the identifier */
|
/* cut the resulting scope string from the identifier */
|
||||||
memmove (token->string->buffer,
|
memmove (token->string->buffer,
|
||||||
/* +1 to skip the leading colon */
|
/* +1 to skip the leading colon */
|
||||||
@ -488,8 +484,6 @@ static bool parseFunction (tokenInfo *const token)
|
|||||||
}
|
}
|
||||||
while (token->type != TOKEN_EOF && depth > 0);
|
while (token->type != TOKEN_EOF && depth > 0);
|
||||||
|
|
||||||
vStringTerminate (arglist);
|
|
||||||
|
|
||||||
makeFunctionTag (nameFree, arglist, access);
|
makeFunctionTag (nameFree, arglist, access);
|
||||||
vStringDelete (arglist);
|
vStringDelete (arglist);
|
||||||
|
|
||||||
|
@ -286,7 +286,6 @@ static const char *parseIdentifier (const char *cp, vString *const identifier)
|
|||||||
vStringPut (identifier, (int) *cp);
|
vStringPut (identifier, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (identifier);
|
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +312,6 @@ static void parseClass (const char *cp, vString *const class,
|
|||||||
vStringPut (inheritance, *cp);
|
vStringPut (inheritance, *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (inheritance);
|
|
||||||
}
|
}
|
||||||
makeClassTag (class, inheritance, parent, is_class_parent);
|
makeClassTag (class, inheritance, parent, is_class_parent);
|
||||||
vStringDelete (inheritance);
|
vStringDelete (inheritance);
|
||||||
@ -642,7 +640,6 @@ static bool varIsLambda (const char *cp, char **arglist)
|
|||||||
for (; *cp != 0 && *cp != ':'; cp++)
|
for (; *cp != 0 && *cp != ':'; cp++)
|
||||||
vStringPut (args, *cp);
|
vStringPut (args, *cp);
|
||||||
vStringPut (args, ')');
|
vStringPut (args, ')');
|
||||||
vStringTerminate (args);
|
|
||||||
if (arglist)
|
if (arglist)
|
||||||
*arglist = strdup (vStringValue (args));
|
*arglist = strdup (vStringValue (args));
|
||||||
vStringDelete (args);
|
vStringDelete (args);
|
||||||
@ -733,7 +730,6 @@ static void findPythonTags (void)
|
|||||||
vStringPut (name, (int) *start);
|
vStringPut (name, (int) *start);
|
||||||
++start;
|
++start;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
|
|
||||||
parent_is_class = constructParentString(nesting_levels, indent, parent);
|
parent_is_class = constructParentString(nesting_levels, indent, parent);
|
||||||
if (varIsLambda (variable, &arglist))
|
if (varIsLambda (variable, &arglist))
|
||||||
|
@ -94,7 +94,6 @@ static void createRTags (void)
|
|||||||
vStringPut(name, (int)*cp);
|
vStringPut(name, (int)*cp);
|
||||||
cp++;
|
cp++;
|
||||||
}
|
}
|
||||||
vStringTerminate(name);
|
|
||||||
|
|
||||||
/* if the string really exists, make a tag of it */
|
/* if the string really exists, make a tag of it */
|
||||||
if (vStringLength(name) > 0)
|
if (vStringLength(name) > 0)
|
||||||
@ -134,7 +133,6 @@ static void createRTags (void)
|
|||||||
if (strncasecmp((const char*)cp, "function", (size_t)8) == 0) {
|
if (strncasecmp((const char*)cp, "function", (size_t)8) == 0) {
|
||||||
/* it's a function: ident <- function(args) */
|
/* it's a function: ident <- function(args) */
|
||||||
cp += 8;
|
cp += 8;
|
||||||
vStringTerminate(name);
|
|
||||||
/* if the string really exists, make a tag of it */
|
/* if the string really exists, make a tag of it */
|
||||||
if (vStringLength(name) > 0)
|
if (vStringLength(name) > 0)
|
||||||
makeRTag(name, K_FUNCTION);
|
makeRTag(name, K_FUNCTION);
|
||||||
|
@ -186,7 +186,6 @@ static void findRestTags (void)
|
|||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
if (! isspace(*line))
|
if (! isspace(*line))
|
||||||
vStringCatS(name, (const char*) line);
|
vStringCatS(name, (const char*) line);
|
||||||
vStringTerminate(name);
|
|
||||||
}
|
}
|
||||||
vStringDelete (name);
|
vStringDelete (name);
|
||||||
nestingLevelsFree(nestingLevels);
|
nestingLevelsFree(nestingLevels);
|
||||||
|
@ -189,7 +189,6 @@ static void emitRubyTag (vString* name, rubyKind kind)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
vStringTerminate (name);
|
|
||||||
scope = nestingLevelsToScope (nesting);
|
scope = nestingLevelsToScope (nesting);
|
||||||
lvl = nestingLevelsGetCurrent (nesting);
|
lvl = nestingLevelsGetCurrent (nesting);
|
||||||
if (lvl)
|
if (lvl)
|
||||||
@ -311,7 +310,6 @@ static rubyKind parseIdentifier (
|
|||||||
/* Recognize singleton methods. */
|
/* Recognize singleton methods. */
|
||||||
if (last_char == '.')
|
if (last_char == '.')
|
||||||
{
|
{
|
||||||
vStringTerminate (name);
|
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
return parseIdentifier (cp, name, K_SINGLETON);
|
return parseIdentifier (cp, name, K_SINGLETON);
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,6 @@ static void findShTags (void)
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
while (isspace ((int) *cp))
|
while (isspace ((int) *cp))
|
||||||
++cp;
|
++cp;
|
||||||
if (*cp++ == '(')
|
if (*cp++ == '(')
|
||||||
|
@ -477,7 +477,6 @@ static void parseString (vString *const string, const int delimiter)
|
|||||||
else
|
else
|
||||||
vStringPut (string, c);
|
vStringPut (string, c);
|
||||||
}
|
}
|
||||||
vStringTerminate (string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read a C identifier beginning with "firstChar" and places it into "name".
|
/* Read a C identifier beginning with "firstChar" and places it into "name".
|
||||||
@ -491,7 +490,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
|
|||||||
vStringPut (string, c);
|
vStringPut (string, c);
|
||||||
c = getcFromInputFile ();
|
c = getcFromInputFile ();
|
||||||
} while (isIdentChar (c));
|
} while (isIdentChar (c));
|
||||||
vStringTerminate (string);
|
|
||||||
if (!isspace (c))
|
if (!isspace (c))
|
||||||
ungetcToInputFile (c); /* unget non-identifier character */
|
ungetcToInputFile (c); /* unget non-identifier character */
|
||||||
}
|
}
|
||||||
@ -679,7 +677,6 @@ static void readIdentifier (tokenInfo *const token)
|
|||||||
* vStringCatS (parent->string, ".");
|
* vStringCatS (parent->string, ".");
|
||||||
* }
|
* }
|
||||||
* vStringCatS (parent->string, vStringValue(child->string));
|
* vStringCatS (parent->string, vStringValue(child->string));
|
||||||
* vStringTerminate(parent->string);
|
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -690,7 +687,6 @@ static void addToScope (tokenInfo* const token, vString* const extra, sqlKind ki
|
|||||||
vStringCatS (token->scope, ".");
|
vStringCatS (token->scope, ".");
|
||||||
}
|
}
|
||||||
vStringCatS (token->scope, vStringValue(extra));
|
vStringCatS (token->scope, vStringValue(extra));
|
||||||
vStringTerminate(token->scope);
|
|
||||||
token->scopeKind = kind;
|
token->scopeKind = kind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@ static const unsigned char *makeTclTag (
|
|||||||
vStringPut (name, (int) *cp);
|
vStringPut (name, (int) *cp);
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
vStringTerminate (name);
|
|
||||||
makeSimpleTag (name, TclKinds, kind);
|
makeSimpleTag (name, TclKinds, kind);
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,6 @@ static void findTxt2tagsTags (void)
|
|||||||
nl = nestingLevelsGetCurrent(nls);
|
nl = nestingLevelsGetCurrent(nls);
|
||||||
}
|
}
|
||||||
|
|
||||||
vStringTerminate(name);
|
|
||||||
makeTxt2tagsTag(name, nls, K_SECTION);
|
makeTxt2tagsTag(name, nls, K_SECTION);
|
||||||
nestingLevelsPush(nls, name, K_SECTION);
|
nestingLevelsPush(nls, name, K_SECTION);
|
||||||
nestingLevelsGetCurrent(nls)->indentation = depth;
|
nestingLevelsGetCurrent(nls)->indentation = depth;
|
||||||
|
@ -200,7 +200,6 @@ static bool readIdentifier (vString *const name, int c)
|
|||||||
c = vGetc ();
|
c = vGetc ();
|
||||||
}
|
}
|
||||||
vUngetc (c);
|
vUngetc (c);
|
||||||
vStringTerminate (name);
|
|
||||||
}
|
}
|
||||||
return (bool)(name->length > 0);
|
return (bool)(name->length > 0);
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,6 @@ static bool readIdentifier (vString *const name, int c)
|
|||||||
c = vGetc ();
|
c = vGetc ();
|
||||||
}
|
}
|
||||||
vUngetc (c);
|
vUngetc (c);
|
||||||
vStringTerminate (name);
|
|
||||||
}
|
}
|
||||||
return (bool)(name->length > 0);
|
return (bool)(name->length > 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user