Skip to content

Commit

Permalink
Remove unused functions from options.c/h
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Oct 8, 2016
1 parent 2f1ad02 commit ed6d24b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 59 deletions.
53 changes: 0 additions & 53 deletions ctags/main/options.c
Expand Up @@ -197,56 +197,3 @@ extern bool isIgnoreToken (const char *const name,
}
return result;
}

void addIgnoreListFromFile (const char *const fileName)
{
stringList* tokens = stringListNewFromFile (fileName);
if (Option.ignore == NULL)
Option.ignore = tokens;
else
stringListCombine (Option.ignore, tokens);
}

extern void processExcludeOption (const char *const option CTAGS_ATTR_UNUSED,
const char *const parameter)
{
if (parameter [0] == '\0')
freeList (&Excluded);
else if (parameter [0] == '@')
{
stringList* const new = stringListNewFromFile (parameter + 1);
if (Excluded == NULL)
Excluded = new;
else
stringListCombine (Excluded, new);
}
else
{
vString *const item = vStringNewInit (parameter);
if (Excluded == NULL)
Excluded = stringListNew ();
stringListAdd (Excluded, item);
}
}

extern bool isExcludedFile (const char* const name)
{
const char* base = baseFilename (name);
bool result = false;
if (Excluded != NULL)
{
result = stringListFileMatched (Excluded, base);
if (! result && name != base)
result = stringListFileMatched (Excluded, name);
}
return result;
}



/*
* Generic option parsing
*/
#define readOptionConfiguration
#define initOptions
#define freeOptionResources
6 changes: 0 additions & 6 deletions ctags/main/options.h
Expand Up @@ -98,12 +98,6 @@ extern void freeList (stringList** const pString);
extern void setDefaultTagFileName (void);

extern bool isIncludeFile (const char *const fileName);
extern bool isExcludedFile (const char* const name);
extern bool isIgnoreToken (const char *const name, bool *const pIgnoreParens, const char **const replacement);
extern void readOptionConfiguration (void);
extern void initOptions (void);
extern void freeOptionResources (void);

void addIgnoreListFromFile (const char *const fileName);

#endif /* CTAGS_MAIN_OPTIONS_H */

0 comments on commit ed6d24b

Please sign in to comment.