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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.o
*.exe
3 changes: 2 additions & 1 deletion Src/uno.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ uno_usage(void)
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-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 Down
24 changes: 13 additions & 11 deletions Src/uno_lts.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ lts_redirect(State *s)
frame->s = s;
frame->nxt = stck;
stck = frame;

if (s->n->hdr.which == NODE_T)
{ switch (s->n->hdr.type) {
case TN_JUMP:
Expand Down 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 Expand Up @@ -1213,7 +1215,7 @@ static void
uno_shared(void)
{ SymRef *r;
int stc;

for (r = globuse; r; r = r->nxt)
{ stc = r->status;

Expand Down Expand Up @@ -3631,7 +3633,7 @@ lts_for(State *n, for_node *forn)
t->hdr.deftyp = forn->test->hdr.deftyp;
#endif
}
t->cond = forn->test;
t->cond = forn->test;
t->then_n = ts->n; /* just for form, */
t->else_n = es->n; /* the real info is in tr */

Expand Down