aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-08-16 17:29:33 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-08-16 17:29:33 +0000
commit553df254eec41189593602ce2e6a7f36117e8733 (patch)
tree194e3b6d38ee489443bb04aafd577876d5044028
parent775fd9184c7788767d5be18103b8f57f1c8c1633 (diff)
downloadcflow-553df254eec41189593602ce2e6a7f36117e8733.tar.gz
cflow-553df254eec41189593602ce2e6a7f36117e8733.tar.bz2
(preprocess_option): New variable
-rw-r--r--src/cflow.h1
-rw-r--r--src/main.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/cflow.h b/src/cflow.h
index d95c4f3..3ee6f83 100644
--- a/src/cflow.h
+++ b/src/cflow.h
@@ -137,6 +137,7 @@ extern int out_line;
extern char *start_name;
extern int max_depth;
extern int debug;
+extern int preprocess_option;
extern int token_stack_length;
extern int token_stack_increase;
diff --git a/src/main.c b/src/main.c
index 1682fe3..11cec84 100644
--- a/src/main.c
+++ b/src/main.c
@@ -176,6 +176,8 @@ char *level_indent[] = { NULL, NULL };
char *level_end[] = { "", "" };
char *level_begin = "";
+int preprocess_option = 0; /* Do they want to preprocess sources? */
+
char *start_name = "main"; /* Name of start symbol */
Consptr arglist; /* List of command line arguments */
@@ -457,6 +459,7 @@ add_preproc_option(int key, const char *arg)
char *opt = xmalloc(3 + strlen(arg));
sprintf(opt, "-%c%s", key, arg);
add_name(opt);
+ preprocess_option = 1;
}
static error_t
@@ -553,7 +556,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
set_preprocessor(arg ? arg : CFLOW_PREPROC);
break;
case OPT_NO_PREPROCESS:
- set_preprocessor(NULL);
+ preprocess_option = 0;
break;
case ARGP_KEY_ARG:
add_name(arg);

Return to:

Send suggestions and report system problems to the System administrator.