summaryrefslogtreecommitdiff
path: root/tools/ccanlint/file_analysis.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-03-19 16:06:27 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-03-19 16:17:33 +1030
commit624871f35e94510b9924ba733f2b878ecf2cc6cc (patch)
tree00514460e8f559eb26b2b60d42e80a969788a4f0 /tools/ccanlint/file_analysis.c
parent20ea8a370823bd73a3c96da40a4779fa6ea66462 (diff)
tools: move config.h reading to its own file
Move ccan_dir determination out to its own function, rather than implying it by the first time we get the manifest of a module.
Diffstat (limited to 'tools/ccanlint/file_analysis.c')
-rw-r--r--tools/ccanlint/file_analysis.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/tools/ccanlint/file_analysis.c b/tools/ccanlint/file_analysis.c
index d915b7ed..8760630a 100644
--- a/tools/ccanlint/file_analysis.c
+++ b/tools/ccanlint/file_analysis.c
@@ -105,40 +105,6 @@ static bool continues(const char *line)
return strends(line, "\\");
}
-/* Get token if it's equal to token. */
-bool get_token(const char **line, const char *token)
-{
- unsigned int toklen;
-
- *line += strspn(*line, " \t");
- if (cisalnum(token[0]) || token[0] == '_')
- toklen = strspn(*line, IDENT_CHARS);
- else {
- /* FIXME: real tokenizer handles ++ and other multi-chars. */
- toklen = strlen(token);
- }
-
- if (toklen == strlen(token) && !strncmp(*line, token, toklen)) {
- *line += toklen;
- return true;
- }
- return false;
-}
-
-char *get_symbol_token(void *ctx, const char **line)
-{
- unsigned int toklen;
- char *ret;
-
- *line += strspn(*line, " \t");
- toklen = strspn(*line, IDENT_CHARS);
- if (!toklen)
- return NULL;
- ret = talloc_strndup(ctx, *line, toklen);
- *line += toklen;
- return ret;
-}
-
static bool parse_hash_if(struct pp_conditions *cond, const char **line)
{
bool brackets, defined;