aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>1999-04-11 13:29:35 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>1999-04-11 13:29:35 +0000
commit956c7d73fc9232d79ce22be080bc893bac31f1a7 (patch)
tree0ab6e4a0bd0779fab686493b21535fe78f05b621 /src/main.c
parent67e7e9fdb399982ef77f2c538a25a2d3af698460 (diff)
downloadcflow-956c7d73fc9232d79ce22be080bc893bac31f1a7.tar.gz
cflow-956c7d73fc9232d79ce22be080bc893bac31f1a7.tar.bz2
*** empty log message ***
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index f40ab4f..7f77490 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,6 +18,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <getopt.h>
#include <varargs.h>
#include <errno.h>
@@ -35,7 +36,7 @@ void set_level_indent(char*);
#ifdef DEBUG
#define DEBUG_OPT "D"
#endif
-#define OPTSTR "hVLvSCdxtH:p:s:glmTi:P:" DEBUG_OPT
+#define OPTSTR "hVLvSCdxtH:p:s:glMTi:P:o:m:" DEBUG_OPT
#ifdef GNU_STYLE_OPTIONS
@@ -56,10 +57,12 @@ LONGOPT longopts[] = {
"ansi", no_argument, 0, 'a',
"globals-only", no_argument, 0, 'g',
"print-level", no_argument, 0, 'l',
- "html", no_argument, 0, 'm',
+ "html", no_argument, 0, 'M',
"tree", no_argument, 0, 'T',
"level-indent", required_argument, 0, 'i',
"print", required_argument, 0, 'P',
+ "output", required_argument, 0, 'o',
+ "main", required_argument, 0, 'm',
0,
};
#else
@@ -86,6 +89,7 @@ char *progname;
#ifdef DEBUG
int debug;
#endif
+char *outname = "a.cflow";
int output_mode = OUT_TEXT;
int print_option = 0;
int verbose; /* be verbose on output */
@@ -104,6 +108,9 @@ int print_as_tree; /* Print as tree */
char level_indent[80] = " ";
+char *start_name = "main";
+
+
struct symbol_holder {
char *name;
int type;
@@ -174,7 +181,7 @@ main(argc, argv)
case 'l':
print_levels = 1;
break;
- case 'm':
+ case 'M':
output_mode = OUT_HTML;
break;
case 'T':
@@ -183,6 +190,12 @@ main(argc, argv)
case 'i':
set_level_indent(optarg);
break;
+ case 'o':
+ outname = strdup(optarg);
+ break;
+ case 'm':
+ start_name = strdup(optarg);
+ break;
#ifdef DEBUG
case 'D':
debug = 1;

Return to:

Send suggestions and report system problems to the System administrator.