Tweak to make troff compile silently.
This commit is contained in:
parent
e98091cf8d
commit
1f72bc47fe
8 changed files with 13 additions and 17 deletions
|
|
@ -99,6 +99,7 @@ extern int pnlist[];
|
||||||
extern int po1;
|
extern int po1;
|
||||||
extern int po;
|
extern int po;
|
||||||
extern int ppts;
|
extern int ppts;
|
||||||
|
#define print troffprint
|
||||||
extern int print;
|
extern int print;
|
||||||
extern FILE *ptid;
|
extern FILE *ptid;
|
||||||
extern int pto;
|
extern int pto;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ int lseek(int, long, int);
|
||||||
int close(int);
|
int close(int);
|
||||||
int getpid(void);
|
int getpid(void);
|
||||||
#endif
|
#endif
|
||||||
|
char *unsharp(char*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* c1.c
|
* c1.c
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ mbstowcs(wchar_t *pwcs, const char *s, size_t n)
|
||||||
size_t
|
size_t
|
||||||
wcstombs(char *s, const wchar_t *pwcs, size_t n)
|
wcstombs(char *s, const wchar_t *pwcs, size_t n)
|
||||||
{
|
{
|
||||||
int /*i,*/ d;
|
int d;
|
||||||
long c;
|
long c;
|
||||||
char *p, *pe;
|
char *p, *pe;
|
||||||
char buf[3];
|
char buf[3];
|
||||||
|
|
|
||||||
|
|
@ -828,7 +828,7 @@ n1:
|
||||||
if (p[0] == '-' && p[1] == 0) {
|
if (p[0] == '-' && p[1] == 0) {
|
||||||
ifile = stdin;
|
ifile = stdin;
|
||||||
strcpy(cfname[ifi], "stdin");
|
strcpy(cfname[ifi], "stdin");
|
||||||
} else if ((ifile = fopen(p, "r")) == NULL) {
|
} else if ((ifile = fopen(unsharp(p), "r")) == NULL) {
|
||||||
ERROR "cannot open file %s", p WARN;
|
ERROR "cannot open file %s", p WARN;
|
||||||
nfo -= mflg;
|
nfo -= mflg;
|
||||||
done(02);
|
done(02);
|
||||||
|
|
@ -936,7 +936,7 @@ void caseso(void)
|
||||||
|
|
||||||
lgf++;
|
lgf++;
|
||||||
nextf[0] = 0;
|
nextf[0] = 0;
|
||||||
if (skip() || !getname() || (fp = fopen(nextf, "r")) == NULL || ifi >= NSO) {
|
if (skip() || !getname() || (fp = fopen(unsharp(nextf), "r")) == NULL || ifi >= NSO) {
|
||||||
ERROR "can't open file %s", nextf WARN;
|
ERROR "can't open file %s", nextf WARN;
|
||||||
done(02);
|
done(02);
|
||||||
}
|
}
|
||||||
|
|
@ -1005,7 +1005,7 @@ void casecf(void)
|
||||||
nextf[0] = 0;
|
nextf[0] = 0;
|
||||||
if (!skip() && getname()) {
|
if (!skip() && getname()) {
|
||||||
if (strncmp("<<", nextf, 2) != 0) {
|
if (strncmp("<<", nextf, 2) != 0) {
|
||||||
if ((fd = fopen(nextf, "r")) == NULL) {
|
if ((fd = fopen(unsharp(nextf), "r")) == NULL) {
|
||||||
ERROR "can't open file %s", nextf WARN;
|
ERROR "can't open file %s", nextf WARN;
|
||||||
done(02);
|
done(02);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ void n_ptinit(void)
|
||||||
/* hyphalg = 0; /* for testing */
|
/* hyphalg = 0; /* for testing */
|
||||||
|
|
||||||
strcat(termtab, devname);
|
strcat(termtab, devname);
|
||||||
if ((fp = fopen(termtab, "r")) == NULL) {
|
if ((fp = fopen(unsharp(termtab), "r")) == NULL) {
|
||||||
ERROR "cannot open %s", termtab WARN;
|
ERROR "cannot open %s", termtab WARN;
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@ void casefm(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fcache[i].fp == NULL) {
|
if (fcache[i].fp == NULL) {
|
||||||
if( (fcache[i].fp = fopen(nextf, "w")) == NULL) {
|
if( (fcache[i].fp = fopen(unsharp(nextf), "w")) == NULL) {
|
||||||
ERROR "fm: cannot open %s", nextf WARN;
|
ERROR "fm: cannot open %s", nextf WARN;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -461,19 +461,13 @@ static int texit(Tchar *start, Tchar *end) /* hyphenate as in tex, return # foun
|
||||||
characters. sigh.
|
characters. sigh.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern char *unsharp(char*);
|
|
||||||
|
|
||||||
static char *texhyphens;
|
|
||||||
|
|
||||||
static int readpats(void)
|
static int readpats(void)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char buf[200], buf1[200];
|
char buf[200], buf1[200];
|
||||||
|
|
||||||
if(texhyphens == 0)
|
if ((fp = fopen(unsharp(TEXHYPHENS), "r")) == NULL
|
||||||
texhyphens = unsharp(TEXHYPHENS);
|
&& (fp = fopen(unsharp(DWBalthyphens), "r")) == NULL) {
|
||||||
if ((fp = fopen(texhyphens, "r")) == NULL
|
|
||||||
&& (fp = fopen(DWBalthyphens, "r")) == NULL) {
|
|
||||||
ERROR "warning: can't find hyphen.tex" WARN;
|
ERROR "warning: can't find hyphen.tex" WARN;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ getdesc(char *name)
|
||||||
char cmd[100], s[100];
|
char cmd[100], s[100];
|
||||||
int i, v;
|
int i, v;
|
||||||
|
|
||||||
if ((fin = fopen(name, "r")) == NULL)
|
if ((fin = fopen(unsharp(name), "r")) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
while (fscanf(fin, "%s", cmd) != EOF) {
|
while (fscanf(fin, "%s", cmd) != EOF) {
|
||||||
if (strcmp(cmd, "res") == 0) {
|
if (strcmp(cmd, "res") == 0) {
|
||||||
|
|
@ -65,7 +65,7 @@ static int checkfont(char *name)
|
||||||
char buf[300], buf2[300];
|
char buf[300], buf2[300];
|
||||||
int i, status = -1;
|
int i, status = -1;
|
||||||
|
|
||||||
if ((fp = fopen(name, "r")) == NULL)
|
if ((fp = fopen(unsharp(name), "r")) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
for (i = 1; i <= 10; i++) {
|
for (i = 1; i <= 10; i++) {
|
||||||
if (fgets(buf, sizeof buf, fp) == NULL)
|
if (fgets(buf, sizeof buf, fp) == NULL)
|
||||||
|
|
@ -100,7 +100,7 @@ getfont(char *name, int pos) /* create width tab for font */
|
||||||
/* fprintf(stderr, "read font %s onto %d\n", name, pos); */
|
/* fprintf(stderr, "read font %s onto %d\n", name, pos); */
|
||||||
if (checkfont(name) == -1)
|
if (checkfont(name) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
if ((fin = fopen(name, "r")) == NULL)
|
if ((fin = fopen(unsharp(name), "r")) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
for (i = 0; i < ALPHABET; i++)
|
for (i = 0; i < ALPHABET; i++)
|
||||||
chtemp[i] = chinit; /* zero out to begin with */
|
chtemp[i] = chinit; /* zero out to begin with */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue