ctags: drop vStringTerminate()

It's call is unnecesssary. Corresponds to universal-ctags commit
cfc45e3bd9000e8ce193399c7e0ecf2bbeb57977.
This commit is contained in:
Jiří Techet 2016-10-02 00:35:50 +02:00
parent 662765852f
commit 40396a392e
47 changed files with 1 additions and 122 deletions

View File

@ -460,7 +460,6 @@ Bugs to watch out for
* Inserting fields into structs in the plugin API instead of appending.
* Not breaking the plugin ABI when necessary.
* Using an idle callback that doesn't check main_status.quitting.
* Forgetting to call vStringTerminate in CTags code.
* Forgetting CRLF line endings on Windows.
* Not handling Tabs & Spaces indent mode.

View File

@ -102,7 +102,6 @@ static char* nextFileArg (FILE* const fp)
vStringPut (vs, c);
c = fgetc (fp);
} while (c != EOF && ! isspace (c));
vStringTerminate (vs);
Assert (vStringLength (vs) > 0);
result = xMalloc (vStringLength (vs) + 1, char);
strcpy (result, vStringValue (vs));
@ -127,7 +126,6 @@ static char* nextFileLine (FILE* const fp)
vStringPut (vs, c);
c = fgetc (fp);
}
vStringTerminate (vs);
if (vStringLength (vs) > 0)
{
result = xMalloc (vStringLength (vs) + 1, char);

View File

@ -212,7 +212,6 @@ static void readIdentifier (int c, vString *const name)
c = getcFromInputFile ();
} while (c != EOF && cppIsident (c));
ungetcToInputFile (c);
vStringTerminate (name);
}
static conditionalInfo *currentConditional (void)

View File

@ -431,7 +431,6 @@ static vString* substitute (
else if (*p != '\n' && *p != '\r')
vStringPut (result, *p);
}
vStringTerminate (result);
return result;
}

View File

@ -162,7 +162,6 @@ extern bool isIgnoreToken (const char *const name,
size_t tokenLen;
vStringCopyS (token, c_tags_ignore[i]);
vStringTerminate (token);
tokenLen = vStringLength (token);
if (tokenLen >= 2 && vStringChar (token, tokenLen - 1) == '*' &&

View File

@ -165,7 +165,6 @@ static vString* determineInterpreter (const char* const cmd)
; /* no-op */
for ( ; *p != '\0' && ! isspace (*p) ; ++p)
vStringPut (interpreter, (int) *p);
vStringTerminate (interpreter);
} while (strcmp (vStringValue (interpreter), "env") == 0);
return interpreter;
}

View File

@ -444,7 +444,6 @@ static vString *iFileGetLine (void)
vStringPut (File.line, c);
if (c == '\n' || (c == EOF && vStringLength (File.line) > 0))
{
vStringTerminate (File.line);
#ifdef HAVE_REGEX
if (vStringLength (File.line) > 0)
matchRegex (File.line, File.source.language);

View File

@ -439,10 +439,7 @@ extern vString *combinePathAndFile (const char *const path,
vStringCopyS (filePath, path);
if (! terminated)
{
vStringPut (filePath, OUTPUT_PATH_SEPARATOR);
vStringTerminate (filePath);
}
vStringCatS (filePath, file);
return filePath;

View File

@ -58,7 +58,7 @@ extern void vStringTruncate (vString *const string, const size_t length)
{
Assert (length <= string->length);
string->length = length;
vStringTerminate (string);
vStringPut(string, '\0');
DebugStatement ( memset (string->buffer + string->length, 0,
string->size - string->length); )
}
@ -145,7 +145,6 @@ extern void vStringNCatS (
--remain;
++p;
}
vStringTerminate (string);
}
/* Strip trailing newline from string.

View File

@ -41,7 +41,6 @@
#define vStringCopy(vs,s) vStringCopyS((vs), vStringValue((s)))
#define vStringNCopy(vs,s,l) vStringNCopyS((vs), vStringValue((s)), (l))
#define vStringChar(vs,i) ((vs)->buffer[i])
#define vStringTerminate(vs) vStringPut(vs, '\0')
#define vStringLower(vs) toLowerString((vs)->buffer)
#define vStringUpper(vs) toUpperString((vs)->buffer)

View File

@ -71,7 +71,6 @@ static void createTag(AbaqusKind kind, const char *buf)
vStringPut(name, (int) *buf);
++buf;
} while ((*buf != '\0') && (*buf != ','));
vStringTerminate(name);
makeSimpleTag(name, AbaqusKinds, kind);
vStringDelete(name);
}

View File

@ -90,21 +90,18 @@ static void findAbcTags (void)
/* if (line[1] == '%') {
vStringClear(name);
vStringCatS(name, (const char *) line);
vStringTerminate(name);
makeAbcTag(name, false);
}*/
if (line[0] == 'T') {
/*vStringClear(name);*/
vStringCatS(name, " / ");
vStringCatS(name, (const char *) line);
vStringTerminate(name);
makeAbcTag(name, false);
}
else {
vStringClear (name);
if (! isspace(*line))
vStringCatS(name, (const char*) line);
vStringTerminate(name);
}
}
vStringDelete (name);

View File

@ -202,7 +202,6 @@ static void findAsciidocTags(void)
while (isspace(line[end]))--end;
vStringClear(name);
vStringNCatS(name, (const char*)(&(line[start])), end - start + 1);
vStringTerminate(name);
makeAsciidocTag(name, kind);
continue;
}
@ -210,7 +209,6 @@ static void findAsciidocTags(void)
vStringClear(name);
if (! isspace(*line))
vStringCatS(name, (const char*) line);
vStringTerminate(name);
}
vStringDelete(name);
nestingLevelsFree(nestingLevels);

View File

@ -141,7 +141,6 @@ static bool readPreProc (const unsigned char *const line)
vStringPut (name, *cp);
++cp;
}
vStringTerminate (name);
result = (bool) (strcmp (vStringValue (name), "define") == 0);
if (result)
{
@ -153,7 +152,6 @@ static bool readPreProc (const unsigned char *const line)
vStringPut (name, *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, AsmKinds, K_DEFINE);
}
vStringDelete (name);
@ -232,7 +230,6 @@ static const unsigned char *readSymbol (
vStringPut (sym, *cp);
++cp;
}
vStringTerminate (sym);
}
return cp;
}
@ -248,7 +245,6 @@ static const unsigned char *readOperator (
vStringPut (operator, *cp);
++cp;
}
vStringTerminate (operator);
return cp;
}

View File

@ -119,7 +119,6 @@ static int extract_dim (char const *pos, vString * name, BasicKind kind)
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
vStringPut (name, *pos);
vStringTerminate (name);
makeSimpleTag (name, BasicKinds, kind);
/* 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);
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
vStringPut (name, *pos);
vStringTerminate (name);
makeSimpleTag (name, BasicKinds, kind);
}
@ -157,7 +155,6 @@ static char const *extract_name (char const *pos, vString * name)
vStringClear (name);
for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++)
vStringPut (name, *pos);
vStringTerminate (name);
return pos;
}

View File

@ -1330,7 +1330,6 @@ static const char *getVarType (const statementInfo *const st,
vStringPut(vt, ' ');
vStringCat(vt, t->name);
}
vStringTerminate(vt);
return vStringValue(vt);
}
@ -1786,7 +1785,6 @@ static void readIdentifier (tokenInfo *const token, const int firstChar)
vStringPut (name, c);
c = cppGetc ();
} while (cppIsident (c) || (isInputLanguage (Lang_vala) && '.' == c));
vStringTerminate (name);
cppUngetc (c); /* unget non-identifier character */
/* 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);
c = cppGetc ();
}
vStringTerminate (name);
cppUngetc (c); /* unget non-package character */
}
@ -1913,7 +1910,6 @@ static void readOperator (statementInfo *const st)
}
c = cppGetc ();
} while (! isOneOf (c, "(;") && c != EOF);
vStringTerminate (name);
}
else if (isOneOf (c, acceptable))
{
@ -1923,7 +1919,6 @@ static void readOperator (statementInfo *const st)
vStringPut (name, c);
c = cppGetc ();
} while (isOneOf (c, acceptable));
vStringTerminate (name);
}
cppUngetc (c);

View File

@ -66,11 +66,9 @@ static void findConfTags (void)
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, ConfKinds, K_SECTION);
/* remember section name */
vStringCopy (scope, name);
vStringTerminate (scope);
vStringClear (name);
continue;
}
@ -85,7 +83,6 @@ static void findConfTags (void)
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
vStringStripTrailing (name);
while (isspace ((int) *cp))
++cp;

View File

@ -63,7 +63,6 @@ static void parseSelector (vString *const string, const int firstChar)
c = getcFromInputFile ();
} while (isSelectorChar (c));
ungetcToInputFile (c);
vStringTerminate (string);
}
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 */
readNextToken = false;
vStringTerminate (selector);
if (CssKinds[kind].enabled)
{
tagEntryInfo e;

View File

@ -109,7 +109,6 @@ static void findDiffTags (void)
tmp++;
}
vStringTerminate(filename);
makeSimpleTag (filename, DiffKinds, K_FUNCTION);
vStringClear (filename);
}

View File

@ -77,7 +77,6 @@ static void createTag(docbookKind kind, const char *buf)
vStringPut(name, (int) *buf);
++buf;
} while ((*buf != '\0') && (*buf != '"'));
vStringTerminate(name);
makeSimpleTag(name, DocBookKinds, kind);
}

View File

@ -69,7 +69,6 @@ static const unsigned char *parseIdentifier (
vStringPut (identifier, (int) *cp);
++cp;
}
vStringTerminate (identifier);
return cp;
}

View File

@ -601,10 +601,7 @@ static lineType getLineType (void)
Assert (type != LTYPE_UNDETERMINED);
if (vStringLength (label) > 0)
{
vStringTerminate (label);
makeLabelTag (label);
}
vStringDelete (label);
return type;
}
@ -796,7 +793,6 @@ static vString *parseInteger (int c)
vStringPut (string, c);
c = getChar ();
}
vStringTerminate (string);
if (c == '_')
{
@ -835,8 +831,6 @@ static vString *parseNumeric (int c)
else
ungetChar (c);
vStringTerminate (string);
return string;
}
@ -860,7 +854,6 @@ static void parseString (vString *const string, const int delimiter)
else if (! FreeSourceForm)
longjmp (Exception, (int) ExceptionFixedFormat);
}
vStringTerminate (string);
ParsingString = false;
}
@ -876,7 +869,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
c = getChar ();
} while (isident (c));
vStringTerminate (string);
ungetChar (c); /* unget non-identifier character */
}
@ -902,7 +894,6 @@ static void checkForLabel (void)
}
if (length > 0 && token != NULL)
{
vStringTerminate (token->string);
makeFortranTag (token, TAG_LABEL);
deleteToken (token);
}
@ -994,7 +985,6 @@ getNextChar:
c = getChar ();
} while (strchr (operatorChars, c) != NULL);
ungetChar (c);
vStringTerminate (token->string);
token->type = TOKEN_OPERATOR;
break;
}
@ -1024,7 +1014,6 @@ getNextChar:
if (c == '.')
{
vStringPut (token->string, c);
vStringTerminate (token->string);
token->type = TOKEN_OPERATOR;
}
else

View File

@ -191,7 +191,6 @@ static void parseString (vString *const string, const int delimiter)
else
vStringPut (string, c);
}
vStringTerminate (string);
}
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);
c = getcFromInputFile ();
} while (isIdentChar (c));
vStringTerminate (string);
ungetcToInputFile (c); /* always unget, LF might add a semicolon */
}

View File

@ -104,7 +104,6 @@ static void add_tag(const char *token, haskellKind kind, vString *name)
for (i = 0; token[i] != '\0'; ++i)
vStringPut(name, token[i]);
vStringTerminate(name);
makeSimpleTag(name, HaskellKinds, kind);
vStringClear(name);
}

View File

@ -90,7 +90,6 @@ another:
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, HxKinds, HXTAG_VARIABLE);
vStringClear (name);
@ -109,7 +108,6 @@ another:
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, HxKinds, HXTAG_METHODS);
vStringClear (name);
@ -127,7 +125,6 @@ another:
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, HxKinds, HXTAG_CLASS);
vStringCopy(clsName,name);
vStringClear (name);
@ -145,7 +142,6 @@ another:
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, HxKinds, HXTAG_ENUM);
vStringClear (name);
} else if (strncmp ((const char*) cp, "public", (size_t) 6) == 0 &&
@ -175,7 +171,6 @@ another:
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, HxKinds, HXTAG_INTERFACE);
vStringClear (name);
} else if (strncmp ((const char *) cp,"typedef",(size_t) 7) == 0 && isspace(((int) cp[7]))) {
@ -188,7 +183,6 @@ another:
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, HxKinds, HXTAG_TYPEDEF);
vStringClear (name);
}

View File

@ -282,7 +282,6 @@ static void makeClassTag (tokenInfo *const token, vString *const signature)
{
vStringCopy(fulltag, token->string);
}
vStringTerminate(fulltag);
if ( ! stringListHas(ClassNames, vStringValue (fulltag)) )
{
stringListAdd (ClassNames, vStringNewCopy (fulltag));
@ -309,7 +308,6 @@ static void makeFunctionTag (tokenInfo *const token, vString *const signature)
{
vStringCopy(fulltag, token->string);
}
vStringTerminate(fulltag);
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) )
{
stringListAdd (FunctionNames, vStringNewCopy (fulltag));
@ -362,7 +360,6 @@ static void parseString (vString *const string, const int delimiter)
else
vStringPut (string, c);
}
vStringTerminate (string);
}
static void parseRegExp (void)
@ -403,7 +400,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
vStringPut (string, c);
c = getcFromInputFile ();
} while (isIdentChar (c));
vStringTerminate (string);
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, vStringValue(child->string));
vStringTerminate(parent->string);
}
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, vStringValue(extra));
vStringTerminate(token->scope);
}
/*
@ -1600,7 +1594,6 @@ static bool parseStatement (tokenInfo *const token, tokenInfo *const parent, boo
{
vStringCopy(fulltag, token->string);
}
vStringTerminate(fulltag);
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) &&
! stringListHas(ClassNames, vStringValue (fulltag)) )
{
@ -1691,7 +1684,6 @@ static bool parseStatement (tokenInfo *const token, tokenInfo *const parent, boo
{
vStringCopy(fulltag, token->string);
}
vStringTerminate(fulltag);
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) &&
! stringListHas(ClassNames, vStringValue (fulltag)) )
{

View File

@ -181,7 +181,6 @@ static void readTokenFull (tokenInfo *const token,
if (includeStringRepr)
vStringPut (token->string, c);
}
vStringTerminate (token->string);
break;
}
@ -196,7 +195,6 @@ static void readTokenFull (tokenInfo *const token,
c = getcFromInputFile ();
}
while (c != EOF && isIdentChar (c));
vStringTerminate (token->string);
ungetcToInputFile (c);
switch (lookupKeyword (vStringValue (token->string), Lang_json))
{
@ -219,7 +217,6 @@ static void pushScope (tokenInfo *const token,
if (vStringLength (token->scope) > 0)
vStringPut (token->scope, '.');
vStringCat (token->scope, parent->string);
vStringTerminate (token->scope);
token->scopeKind = parentKind;
}

View File

@ -105,7 +105,6 @@ static void createTag(int flags, TeXKind kind, const char * l)
vStringPut(name, (int) *l);
++l;
} while ((*l != '\0') && (*l != '}'));
vStringTerminate(name);
if (name->buffer[0] != '}')
makeSimpleTag(name, TeXKinds, kind);
}
@ -116,13 +115,11 @@ static void createTag(int flags, TeXKind kind, const char * l)
vStringPut (name, (int) *l);
++l;
} while (isalpha((int) *l) || *l == '@');
vStringTerminate(name);
makeSimpleTag(name, TeXKinds, kind);
}
else
{
vStringPut(name, (int) *l);
vStringTerminate(name);
makeSimpleTag(name, TeXKinds, kind);
}

View File

@ -79,7 +79,6 @@ static void extract_name (const char *begin, const char *end, vString *name)
{
for (cp = begin ; cp != end; cp++)
vStringPut (name, (int) *cp);
vStringTerminate (name);
makeSimpleTag (name, LuaKinds, K_FUNCTION);
vStringClear (name);

View File

@ -120,7 +120,6 @@ static void readIdentifier (const int first, vString *const id)
c = nextChar ();
}
ungetcToInputFile (c);
vStringTerminate (id);
}
static void findMakeTags (void)
@ -208,7 +207,6 @@ static void findMakeTags (void)
}
if (c == '\n')
ungetcToInputFile (c);
vStringTerminate (name);
vStringStripTrailing (name);
newMacro (name);
}

View File

@ -75,14 +75,12 @@ static void findMarkdownTags (void)
else if (line[0] == '#') {
vStringClear(name);
vStringCatS(name, (const char *) line);
vStringTerminate(name);
makeMarkdownTag(name, false);
}
else {
vStringClear (name);
if (! isspace(*line))
vStringCatS(name, (const char*) line);
vStringTerminate(name);
}
}
vStringDelete (name);

View File

@ -107,7 +107,6 @@ static void findMatlabTags (void)
}
}
vStringTerminate (name);
makeSimpleTag (name, MatlabKinds, K_FUNCTION);
vStringClear (name);
}
@ -129,7 +128,6 @@ static void findMatlabTags (void)
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, MatlabKinds, K_STRUCT);
vStringClear (name);
}

View File

@ -68,7 +68,6 @@ static void findNsisTags (void)
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, NsisKinds, K_FUNCTION);
vStringClear (name);
}
@ -94,7 +93,6 @@ static void findNsisTags (void)
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, NsisKinds, K_VARIABLE);
vStringClear (name);
}
@ -124,7 +122,6 @@ static void findNsisTags (void)
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, NsisKinds, K_SECTION);
vStringClear (name);
}

View File

@ -245,8 +245,6 @@ static void readIdentifier (lexingState * st)
vStringPut (st->name, (int) *p);
st->cp = p;
vStringTerminate (st->name);
}
/* read the @something directives */
@ -264,8 +262,6 @@ static void readIdentifierObjcDirective (lexingState * st)
vStringPut (st->name, (int) *p);
st->cp = p;
vStringTerminate (st->name);
}
/* The lexer is in charge of reading the file.

View File

@ -304,7 +304,6 @@ static void findPerlTags (void)
vStringCatS (name, "STDOUT");
}
vStringTerminate (name);
TRACE("name: %s\n", name->buffer);
if (0 == vStringLength(name)) {

View File

@ -298,7 +298,6 @@ static void initPhpEntry (tagEntryInfo *const e, const tokenInfo *const token,
{
Assert (parentKind >= 0);
vStringTerminate (fullScope);
e->extensionFields.scopeKind = &(PhpKinds[parentKind]);
e->extensionFields.scopeName = vStringValue (fullScope);
}
@ -475,7 +474,6 @@ static void addToScope (tokenInfo *const token, const vString *const extra)
if (vStringLength (token->scope) > 0)
vStringCatS (token->scope, SCOPE_SEPARATOR);
vStringCatS (token->scope, vStringValue (extra));
vStringTerminate(token->scope);
}
static bool isIdentChar (const int c)
@ -496,7 +494,6 @@ static void parseString (vString *const string, const int delimiter)
else
vStringPut (string, (char) c);
}
vStringTerminate (string);
}
/* reads an HereDoc or a NowDoc (the part after the <<<).
@ -614,8 +611,6 @@ static void parseHeredoc (vString *const string)
}
while (c != EOF);
vStringTerminate (string);
return;
error:
@ -631,7 +626,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
c = getcFromInputFile ();
} while (isIdentChar (c));
ungetcToInputFile (c);
vStringTerminate (string);
}
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);
vStringTerminate (arglist);
makeFunctionTag (name, arglist, access, impl);
vStringDelete (arglist);
@ -1340,7 +1332,6 @@ static bool parseNamespace (tokenInfo *const token)
token->type != TOKEN_SEMICOLON &&
token->type != TOKEN_OPEN_CURLY);
vStringTerminate (CurrentNamespace);
if (vStringLength (CurrentNamespace) > 0)
makeNamespacePhpTag (nsToken, CurrentNamespace);

View File

@ -180,7 +180,6 @@ static void addToScope (tokenInfo *const token, const vString *const extra)
if (vStringLength (token->scope) > 0)
vStringCatS (token->scope, SCOPE_SEPARATOR);
vStringCatS (token->scope, vStringValue (extra));
vStringTerminate (token->scope);
}
static bool isIdentChar (const int c)
@ -201,7 +200,6 @@ static void parseString (vString *const string, const int delimiter)
else
vStringPut (string, (char) c);
}
vStringTerminate (string);
}
static void parseIdentifier (vString *const string, const int firstChar)
@ -213,7 +211,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
c = getcFromInputFile ();
} while (isIdentChar (c));
ungetcToInputFile (c);
vStringTerminate (string);
}
static bool isTokenFunction (vString *const name)
@ -388,7 +385,6 @@ static const char *parsePowerShellScope (tokenInfo *const token)
powershellScopeLen = (size_t)(powershellScopeEnd - tokenName);
/* extract the scope */
vStringNCopyS (powershellScope, tokenName, powershellScopeLen);
vStringTerminate (powershellScope);
/* cut the resulting scope string from the identifier */
memmove (token->string->buffer,
/* +1 to skip the leading colon */
@ -488,8 +484,6 @@ static bool parseFunction (tokenInfo *const token)
}
while (token->type != TOKEN_EOF && depth > 0);
vStringTerminate (arglist);
makeFunctionTag (nameFree, arglist, access);
vStringDelete (arglist);

View File

@ -286,7 +286,6 @@ static const char *parseIdentifier (const char *cp, vString *const identifier)
vStringPut (identifier, (int) *cp);
++cp;
}
vStringTerminate (identifier);
return cp;
}
@ -313,7 +312,6 @@ static void parseClass (const char *cp, vString *const class,
vStringPut (inheritance, *cp);
++cp;
}
vStringTerminate (inheritance);
}
makeClassTag (class, inheritance, parent, is_class_parent);
vStringDelete (inheritance);
@ -642,7 +640,6 @@ static bool varIsLambda (const char *cp, char **arglist)
for (; *cp != 0 && *cp != ':'; cp++)
vStringPut (args, *cp);
vStringPut (args, ')');
vStringTerminate (args);
if (arglist)
*arglist = strdup (vStringValue (args));
vStringDelete (args);
@ -733,7 +730,6 @@ static void findPythonTags (void)
vStringPut (name, (int) *start);
++start;
}
vStringTerminate (name);
parent_is_class = constructParentString(nesting_levels, indent, parent);
if (varIsLambda (variable, &arglist))

View File

@ -94,7 +94,6 @@ static void createRTags (void)
vStringPut(name, (int)*cp);
cp++;
}
vStringTerminate(name);
/* if the string really exists, make a tag of it */
if (vStringLength(name) > 0)
@ -134,7 +133,6 @@ static void createRTags (void)
if (strncasecmp((const char*)cp, "function", (size_t)8) == 0) {
/* it's a function: ident <- function(args) */
cp += 8;
vStringTerminate(name);
/* if the string really exists, make a tag of it */
if (vStringLength(name) > 0)
makeRTag(name, K_FUNCTION);

View File

@ -186,7 +186,6 @@ static void findRestTags (void)
vStringClear (name);
if (! isspace(*line))
vStringCatS(name, (const char*) line);
vStringTerminate(name);
}
vStringDelete (name);
nestingLevelsFree(nestingLevels);

View File

@ -189,7 +189,6 @@ static void emitRubyTag (vString* name, rubyKind kind)
return;
}
vStringTerminate (name);
scope = nestingLevelsToScope (nesting);
lvl = nestingLevelsGetCurrent (nesting);
if (lvl)
@ -311,7 +310,6 @@ static rubyKind parseIdentifier (
/* Recognize singleton methods. */
if (last_char == '.')
{
vStringTerminate (name);
vStringClear (name);
return parseIdentifier (cp, name, K_SINGLETON);
}

View File

@ -80,7 +80,6 @@ static void findShTags (void)
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
while (isspace ((int) *cp))
++cp;
if (*cp++ == '(')

View File

@ -477,7 +477,6 @@ static void parseString (vString *const string, const int delimiter)
else
vStringPut (string, c);
}
vStringTerminate (string);
}
/* 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);
c = getcFromInputFile ();
} while (isIdentChar (c));
vStringTerminate (string);
if (!isspace (c))
ungetcToInputFile (c); /* unget non-identifier character */
}
@ -679,7 +677,6 @@ static void readIdentifier (tokenInfo *const token)
* vStringCatS (parent->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, vStringValue(extra));
vStringTerminate(token->scope);
token->scopeKind = kind;
}

View File

@ -48,7 +48,6 @@ static const unsigned char *makeTclTag (
vStringPut (name, (int) *cp);
++cp;
}
vStringTerminate (name);
makeSimpleTag (name, TclKinds, kind);
return cp;
}

View File

@ -169,7 +169,6 @@ static void findTxt2tagsTags (void)
nl = nestingLevelsGetCurrent(nls);
}
vStringTerminate(name);
makeTxt2tagsTag(name, nls, K_SECTION);
nestingLevelsPush(nls, name, K_SECTION);
nestingLevelsGetCurrent(nls)->indentation = depth;

View File

@ -200,7 +200,6 @@ static bool readIdentifier (vString *const name, int c)
c = vGetc ();
}
vUngetc (c);
vStringTerminate (name);
}
return (bool)(name->length > 0);
}

View File

@ -167,7 +167,6 @@ static bool readIdentifier (vString *const name, int c)
c = vGetc ();
}
vUngetc (c);
vStringTerminate (name);
}
return (bool)(name->length > 0);
}