Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.o
*.output
Src/c_gram.c
Src/c_gram.h
Src/lexer.c
Src/uno
Src/uno_global
Src/uno_local
6 changes: 5 additions & 1 deletion Doc/uno.1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ as a whole. The local check applies to the use of
local variables of any type, the global check applies
to the use of global pointers only.
.PP
\*U can suppress warnings on lines by adding filename and
line number, separated by a tab, in uno_suppress file.
This does not suppress reports generated by uno_global in global analyses.
.PP
The first group of options allows for the definition of
compiler directives on the command line, to guide the
preprocessing of the sources.
Expand All @@ -59,7 +63,7 @@ for include files.
.B "-Uname"
Remove any definitions of name, where name is a
reserved symbol that may be predefined by the preprocessor.
If present, this action supersedes the possible use of
If present, this action supersedes the possible use of
.B "-D"
for the same symbol, irrespective of the order in which
these options are given.
Expand Down
1 change: 1 addition & 0 deletions Src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ all: uno uno_local uno_global

install: all
cp uno uno_local uno_global $(BINDIR)
cp ../Doc/uno.1 /usr/local/share/man/man1/.

self_test: c_gram.c lexer.c
./mk_uno_suppress
Expand Down
9 changes: 6 additions & 3 deletions Src/uno.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ uno_usage(void)
fprintf(stderr, "\t-Lname replace uno_local with name\n");
fprintf(stderr, "\t-Gname replace uno_global with name\n");
fprintf(stderr, "\t-n ignore preprocessing directives in source files\n");
fprintf(stderr, "\t-o arg ignored, for modest compatability with cc arguments\n");
fprintf(stderr, "\t-o arg ignored, for modest compatibility with cc arguments\n");
fprintf(stderr, "\t-m uno.dfn use master (type) definitions file uno.dfn\n");
fprintf(stderr, "\t-x f declare f to be a function that does not return\n\n");
fprintf(stderr, "\t-x f declare f to be a function that does not return.\n"
"\t\t\tOptional: Add :n where n is the number of parameters.\n");
fprintf(stderr, "\t-V print version number and exit\n");
fprintf(stderr, "\t-s print symbol table information and exit\n\n");
fprintf(stderr, "\t-l or -c perform only local analysis, not global\n");
Expand All @@ -76,7 +77,9 @@ uno_usage(void)
fprintf(stderr, "\t-t more detailed execution traces (global analysis)\n");
fprintf(stderr, "\t-u complain about redundancies of all sorts\n");
fprintf(stderr, "\t-v verbose mode (mostly for debugging)\n");
fprintf(stderr, "\t-w more picky, includes -u and -t\n");
fprintf(stderr, "\t-w more picky, includes -u and -t\n\n");
fprintf(stderr, "\tWarning can be suppressed by adding the filename and line"
" number, separated by a tab, in uno_suppress file.\n" );
exit(1);
}

Expand Down
18 changes: 10 additions & 8 deletions Src/uno_lts.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,20 +663,22 @@ custom_exit(const char *s)
{ EX *nx;
char *col;

nx = (EX *) emalloc(sizeof(EX));
nx->f = (char *) emalloc(strlen(s)+1);
strcpy(nx->f, s);

col = strchr(s, ':');
if (col)
{ *col = '\0';
col++;
nx->has_arg = 1;
nx->arg_val = atoi(col);
}
else
{ nx->has_arg = 0;
nx->arg_val = 0;
}

nx = (EX *) emalloc(sizeof(EX));
nx->f = (char *) emalloc(strlen(s)+1);
strcpy(nx->f, s);
if (col)
{ nx->has_arg = 1;
nx->arg_val = atoi(col);
} else
nx->has_arg = 0;
nx->nxt = exs;
exs = nx;
}
Expand Down