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
1 change: 1 addition & 0 deletions src/cmd/tbl/t.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ void choochar(void); /*tc.c*/
int point(char *);

void error(char *); /*te.c*/
void warn(char *);
char *gets1(char *, int);
void un1getc(int);
int get1char(void);
Expand Down
14 changes: 12 additions & 2 deletions src/cmd/tbl/t4.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,18 @@ readspec(void)
default:
if (c != tab) {
char buf[64];
sprint(buf, "bad table specification character %c", c);
error(buf);
if (sawchar)
if (c != '\'') {
sprint(buf, "unrecognized column modifier character '%c'", c);
warn(buf);
} else {
sprint(buf, "unrecognized column modifier character \"%c\"", c);
warn(buf);
}
else {
sprint(buf, "bad table specification character %c", c);
error(buf);
}
}
case ' ': /* note this is also case tab */
continue;
Expand Down
7 changes: 7 additions & 0 deletions src/cmd/tbl/te.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ error(char *s)
}


void
warn(char *s)
{
fprint(2, "\n%s:%d: warning: %s\n", ifile, iline, s);
}


char *
gets1(char *s, int size)
{
Expand Down