Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
This commit is contained in:
parent
77a0a5b519
commit
fa325e9b42
1021 changed files with 5688 additions and 6193 deletions
|
|
@ -55,7 +55,7 @@
|
|||
* NULL, xyzzy, sizeof(xyzzy),
|
||||
* NULL, NULL, 0
|
||||
* };
|
||||
*
|
||||
*
|
||||
* The last element must have NULL entries for the address and
|
||||
* value fields. The main() routine would then do,
|
||||
*
|
||||
|
|
@ -300,7 +300,7 @@ void DWBprefix( char *prog, char *path, int length)
|
|||
* not great, but should be good enough for now. Also probably should
|
||||
* have DWBhome() only do the lookup once, and remember the value if
|
||||
* called again.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ( strncmp(path, DWBPREFIX, len) == 0 ) {
|
||||
|
|
@ -315,4 +315,3 @@ void DWBprefix( char *prog, char *path, int length)
|
|||
} /* End of DWBprefix */
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -184,4 +184,3 @@ extern int c_isalnum;
|
|||
extern char *DWBfontdir;
|
||||
extern char *DWBntermdir;
|
||||
extern char *DWBalthyphens;
|
||||
|
||||
|
|
|
|||
|
|
@ -162,4 +162,3 @@ wcstombs(char *s, const wchar_t *pwcs, size_t n)
|
|||
}
|
||||
return p-s;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ main(int argc, char *argv[])
|
|||
save_tty();
|
||||
break;
|
||||
case 'V':
|
||||
fprintf(stdout, "%croff: DWB %s\n",
|
||||
fprintf(stdout, "%croff: DWB %s\n",
|
||||
TROFF ? 't' : 'n', DWBVERSION);
|
||||
exit(0);
|
||||
case 't':
|
||||
|
|
@ -436,12 +436,12 @@ g0:
|
|||
return(k);
|
||||
}
|
||||
if (k == FLSS) {
|
||||
copyf++;
|
||||
copyf++;
|
||||
raw++;
|
||||
i = getch0();
|
||||
if (!fi)
|
||||
flss = i;
|
||||
copyf--;
|
||||
copyf--;
|
||||
raw--;
|
||||
goto g0;
|
||||
}
|
||||
|
|
@ -456,8 +456,8 @@ g0:
|
|||
}
|
||||
if (k == fc || k == tabch || k == ldrch) {
|
||||
if ((i = setfield(k)) == 0)
|
||||
goto g0;
|
||||
else
|
||||
goto g0;
|
||||
else
|
||||
return(i);
|
||||
}
|
||||
if (k == '\b') {
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ void ptout1(void)
|
|||
j = -j;
|
||||
if (isvmot(i))
|
||||
lead += j;
|
||||
else
|
||||
else
|
||||
esc += j;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -432,13 +432,13 @@ char *plot(char *x)
|
|||
} else if (*k & 0200) {
|
||||
if (*k & 0100) {
|
||||
if (*k & 040)
|
||||
j = t.up;
|
||||
else
|
||||
j = t.up;
|
||||
else
|
||||
j = t.down;
|
||||
} else {
|
||||
if (*k & 040)
|
||||
j = t.left;
|
||||
else
|
||||
j = t.left;
|
||||
else
|
||||
j = t.right;
|
||||
}
|
||||
if ((i = *k & 037) == 0) { /* 2nd 0200 turns it off */
|
||||
|
|
@ -447,7 +447,7 @@ char *plot(char *x)
|
|||
}
|
||||
while (i--)
|
||||
oputs(j);
|
||||
} else
|
||||
} else
|
||||
oput(*k);
|
||||
}
|
||||
oputs(t.plotoff);
|
||||
|
|
@ -464,8 +464,8 @@ void move(void)
|
|||
|
||||
iesct = esct;
|
||||
if (esct += esc)
|
||||
i = "\0";
|
||||
else
|
||||
i = "\0";
|
||||
else
|
||||
i = "\n\0";
|
||||
j = t.hlf;
|
||||
p = t.right;
|
||||
|
|
@ -492,10 +492,10 @@ void move(void)
|
|||
} else { /* no half-line forward, not at line begining */
|
||||
k = lead / t.Newline;
|
||||
lead = lead % t.Newline;
|
||||
if (k > 0)
|
||||
if (k > 0)
|
||||
esc = esct;
|
||||
i = "\n";
|
||||
while (k--)
|
||||
while (k--)
|
||||
oputs(i);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ int pchar(Tchar i)
|
|||
return 0;
|
||||
}
|
||||
if (ismot(i)) {
|
||||
pchar1(i);
|
||||
pchar1(i);
|
||||
return 0;
|
||||
}
|
||||
switch (j = cbits(i)) {
|
||||
|
|
@ -213,7 +213,7 @@ void caseex(void)
|
|||
}
|
||||
|
||||
|
||||
void done(int x)
|
||||
void done(int x)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -249,7 +249,7 @@ void done(int x)
|
|||
}
|
||||
|
||||
|
||||
void done1(int x)
|
||||
void done1(int x)
|
||||
{
|
||||
error |= x;
|
||||
if (numtabp[NL].val) {
|
||||
|
|
@ -263,7 +263,7 @@ void done1(int x)
|
|||
}
|
||||
|
||||
|
||||
void done2(int x)
|
||||
void done2(int x)
|
||||
{
|
||||
ptlead();
|
||||
if (TROFF && !ascii)
|
||||
|
|
@ -272,7 +272,7 @@ void done2(int x)
|
|||
done3(x);
|
||||
}
|
||||
|
||||
void done3(int x)
|
||||
void done3(int x)
|
||||
{
|
||||
error |= x;
|
||||
flusho();
|
||||
|
|
@ -284,7 +284,7 @@ void done3(int x)
|
|||
}
|
||||
|
||||
|
||||
void edone(int x)
|
||||
void edone(int x)
|
||||
{
|
||||
frame = stk;
|
||||
nxf = frame + 1;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* troff3.c
|
||||
*
|
||||
*
|
||||
* macro and string routines, storage allocation
|
||||
*/
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ void maddhash(Contab *rp)
|
|||
}
|
||||
|
||||
void munhash(Contab *mp)
|
||||
{
|
||||
{
|
||||
Contab *p;
|
||||
Contab **lp;
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ Offset finds(int mn)
|
|||
if (contabp[i].rq == 0)
|
||||
break;
|
||||
}
|
||||
if (i == nm)
|
||||
if (i == nm)
|
||||
growcontab();
|
||||
freeslot = i + 1;
|
||||
if ((nextb = alloc()) == -1) {
|
||||
|
|
@ -531,7 +531,7 @@ Tchar rbf(void) /* return next char from blist[] block */
|
|||
else
|
||||
return(popi());
|
||||
}
|
||||
|
||||
|
||||
i = rbf0(ip);
|
||||
if (i == 0) {
|
||||
if (!app)
|
||||
|
|
@ -596,9 +596,9 @@ Offset pushi(Offset newip, int mname)
|
|||
lastpbp = pbp;
|
||||
pendt = ch = 0;
|
||||
frame = nxf;
|
||||
if (nxf->nargs == 0)
|
||||
if (nxf->nargs == 0)
|
||||
nxf += 1;
|
||||
else
|
||||
else
|
||||
nxf = (Stack *)argtop;
|
||||
return(ip = newip);
|
||||
}
|
||||
|
|
@ -624,7 +624,7 @@ int getsn(void)
|
|||
return(0);
|
||||
if (i == '(')
|
||||
return(getrq());
|
||||
else
|
||||
else
|
||||
return(i);
|
||||
}
|
||||
|
||||
|
|
@ -698,7 +698,7 @@ void collect(void)
|
|||
quote = 0;
|
||||
if (cbits(i = getch()) == '"')
|
||||
quote++;
|
||||
else
|
||||
else
|
||||
ch = i;
|
||||
while (1) {
|
||||
i = getch();
|
||||
|
|
@ -850,7 +850,7 @@ void casetl(void)
|
|||
if (ismot(delim = getch())) {
|
||||
ch = delim;
|
||||
delim = '\'';
|
||||
} else
|
||||
} else
|
||||
delim = cbits(delim);
|
||||
tp = buf;
|
||||
numtabp[HP].val = 0;
|
||||
|
|
@ -932,7 +932,7 @@ void casepm(void)
|
|||
tcnt++;
|
||||
j = contabp[i].mx;
|
||||
for (k = 1; (j = blist[bindex(j)].nextoff) != -1; )
|
||||
k++;
|
||||
k++;
|
||||
cnt++;
|
||||
kk += k;
|
||||
if (!tot)
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ void setn(void)
|
|||
i = ls;
|
||||
break;
|
||||
case 'R': /* maximal # of regs that can be addressed */
|
||||
i = 255*256 - regcnt;
|
||||
i = 255*256 - regcnt;
|
||||
break;
|
||||
case 'z':
|
||||
p = unpair(dip->curd);
|
||||
|
|
@ -137,7 +137,7 @@ void setn(void)
|
|||
cpushback(cfname[ifi]);
|
||||
return;
|
||||
case 'S':
|
||||
buf[0] = j = 0;
|
||||
buf[0] = j = 0;
|
||||
for( i = 0; tabtab[i] != 0 && i < NTAB; i++) {
|
||||
if (i > 0)
|
||||
buf[j++] = ' ';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* troff5.c
|
||||
*
|
||||
*
|
||||
* misc processing requests
|
||||
*/
|
||||
|
||||
|
|
@ -30,16 +30,16 @@ void casead(void)
|
|||
case 'c': /*centered adj*/
|
||||
admod = 1;
|
||||
break;
|
||||
case 'b':
|
||||
case 'b':
|
||||
case 'n':
|
||||
admod = 0;
|
||||
break;
|
||||
case '0':
|
||||
case '2':
|
||||
case '0':
|
||||
case '2':
|
||||
case '4':
|
||||
ad = 0;
|
||||
case '1':
|
||||
case '3':
|
||||
case '1':
|
||||
case '3':
|
||||
case '5':
|
||||
admod = (i - '0') / 2;
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ chget(int c)
|
|||
if (skip() || ismot(i = getch()) || cbits(i) == ' ' || cbits(i) == '\n') {
|
||||
ch = i;
|
||||
return(c);
|
||||
} else
|
||||
} else
|
||||
return cbits(i); /* was (i & BYTEMASK) */
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ max(int aa, int bb)
|
|||
{
|
||||
if (aa > bb)
|
||||
return(aa);
|
||||
else
|
||||
else
|
||||
return(bb);
|
||||
}
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ void casepl(void)
|
|||
skip();
|
||||
if ((i = vnumb(&pl)) == 0)
|
||||
pl = 11 * INCH; /*11in*/
|
||||
else
|
||||
else
|
||||
pl = i;
|
||||
if (numtabp[NL].val > pl)
|
||||
numtabp[NL].val = pl;
|
||||
|
|
@ -321,7 +321,7 @@ void casech(void)
|
|||
skip();
|
||||
if (!(j = getrq()))
|
||||
return;
|
||||
else
|
||||
else
|
||||
for (k = 0; k < NTRAP; k++)
|
||||
if (mlist[k] == j)
|
||||
break;
|
||||
|
|
@ -399,7 +399,7 @@ void casefm(void)
|
|||
ERROR "fm: missing filename" WARN;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < 15 && fcache[i].fp != NULL; i++) {
|
||||
if (strcmp(nextf, fcache[i].name) == 0)
|
||||
break;
|
||||
|
|
@ -418,7 +418,7 @@ void casefm(void)
|
|||
casetm1(0, fcache[i].fp);
|
||||
}
|
||||
|
||||
void casetm1(int ab, FILE *out)
|
||||
void casetm1(int ab, FILE *out)
|
||||
{
|
||||
int i, j, c;
|
||||
char *p;
|
||||
|
|
@ -444,7 +444,7 @@ void casetm1(int ab, FILE *out)
|
|||
trace = savtrac;
|
||||
}
|
||||
} else
|
||||
skip();
|
||||
skip();
|
||||
for (i = 0; i < NTM - 2; ) {
|
||||
if ((c = cbits(getch())) == '\n' || c == RIGHT)
|
||||
break;
|
||||
|
|
@ -517,7 +517,7 @@ void casesp1(int a)
|
|||
j = vnumb((int *)0);
|
||||
if (nonumb)
|
||||
j = lss;
|
||||
} else
|
||||
} else
|
||||
j = a;
|
||||
if (j == 0)
|
||||
return;
|
||||
|
|
@ -525,8 +525,8 @@ void casesp1(int a)
|
|||
j = i;
|
||||
savlss = lss;
|
||||
if (dip != d)
|
||||
i = dip->dnl;
|
||||
else
|
||||
i = dip->dnl;
|
||||
else
|
||||
i = numtabp[NL].val;
|
||||
if ((i + j) < 0)
|
||||
j = -i;
|
||||
|
|
@ -542,8 +542,8 @@ void casert(void)
|
|||
|
||||
skip();
|
||||
if (dip != d)
|
||||
p = &dip->dnl;
|
||||
else
|
||||
p = &dip->dnl;
|
||||
else
|
||||
p = &numtabp[NL].val;
|
||||
a = vnumb(p);
|
||||
if (nonumb)
|
||||
|
|
@ -594,7 +594,7 @@ e0:
|
|||
ERROR "cannot do .ev %d", nxev WARN;
|
||||
if (error)
|
||||
done2(040);
|
||||
else
|
||||
else
|
||||
edone(040);
|
||||
return;
|
||||
}
|
||||
|
|
@ -840,7 +840,7 @@ rdtty(void)
|
|||
if (read(0, &onechar, 1) == 1) {
|
||||
if (onechar == '\n')
|
||||
tty++;
|
||||
else
|
||||
else
|
||||
tty = 1;
|
||||
if (tty != 3)
|
||||
return(onechar);
|
||||
|
|
@ -878,7 +878,7 @@ void caseta(void)
|
|||
j = TABMASK;
|
||||
}
|
||||
tabtab[i] = j & TABMASK;
|
||||
if (!nonumb)
|
||||
if (!nonumb)
|
||||
switch (cbits(ch)) {
|
||||
case 'C':
|
||||
tabtab[i] |= CTAB;
|
||||
|
|
@ -976,7 +976,7 @@ void caseuf(void)
|
|||
|
||||
if (skip() || !(i = getrq()) || i == 'S' || (j = findft(i)) == -1)
|
||||
ulfont = ULFONT; /*default underline position*/
|
||||
else
|
||||
else
|
||||
ulfont = j;
|
||||
if (NROFF && ulfont == FT)
|
||||
ulfont = ULFONT;
|
||||
|
|
@ -1022,8 +1022,8 @@ void casemk(void)
|
|||
int i, j;
|
||||
|
||||
if (dip != d)
|
||||
j = dip->dnl;
|
||||
else
|
||||
j = dip->dnl;
|
||||
else
|
||||
j = numtabp[NL].val;
|
||||
if (skip()) {
|
||||
dip->mkline = j;
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ void n_setfont(int a)
|
|||
|
||||
if (a)
|
||||
i = getrq();
|
||||
else
|
||||
else
|
||||
i = getsn();
|
||||
if (!i || i == 'P') {
|
||||
j = font1;
|
||||
|
|
@ -188,7 +188,7 @@ void n_setwd(void)
|
|||
k = -k;
|
||||
base -= k;
|
||||
emsz = 0;
|
||||
} else
|
||||
} else
|
||||
continue;
|
||||
if (base < numtabp[SB].val)
|
||||
numtabp[SB].val = base;
|
||||
|
|
@ -300,7 +300,7 @@ bd0:
|
|||
if (skip() || !(i = getrq()) || (j = findft(i)) == -1) {
|
||||
if (k)
|
||||
goto bd1;
|
||||
else
|
||||
else
|
||||
return;
|
||||
}
|
||||
if (j == smnt) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Tchar gettch(void);
|
|||
|
||||
/*
|
||||
* troff7.c
|
||||
*
|
||||
*
|
||||
* text
|
||||
*/
|
||||
|
||||
|
|
@ -73,8 +73,8 @@ void tbreak(void)
|
|||
horiz(un);
|
||||
if (NROFF) {
|
||||
if (adrem % t.Adj)
|
||||
resol = t.Hor;
|
||||
else
|
||||
resol = t.Hor;
|
||||
else
|
||||
resol = t.Adj;
|
||||
} else
|
||||
resol = HOR;
|
||||
|
|
@ -113,7 +113,7 @@ void tbreak(void)
|
|||
}
|
||||
if (icf)
|
||||
icf++;
|
||||
else
|
||||
else
|
||||
ic = 0;
|
||||
ne = nwd = 0;
|
||||
un = in;
|
||||
|
|
@ -168,7 +168,7 @@ void text(void)
|
|||
nflush++;
|
||||
numtabp[HP].val = 0;
|
||||
if ((dip == d) && (numtabp[NL].val == -1)) {
|
||||
newline(1);
|
||||
newline(1);
|
||||
return;
|
||||
}
|
||||
setnel();
|
||||
|
|
@ -180,8 +180,8 @@ void text(void)
|
|||
goto t4;
|
||||
if (pendt)
|
||||
if (spcnt)
|
||||
goto t2;
|
||||
else
|
||||
goto t2;
|
||||
else
|
||||
goto t3;
|
||||
pendt++;
|
||||
if (spcnt)
|
||||
|
|
@ -226,8 +226,8 @@ t5:
|
|||
adsp = adrem = 0;
|
||||
if (ad) {
|
||||
if (nwd == 1)
|
||||
adsp = nel;
|
||||
else
|
||||
adsp = nel;
|
||||
else
|
||||
adsp = nel / (nwd - 1);
|
||||
adsp = (adsp / HOR) * HOR;
|
||||
adrem = nel - adsp*(nwd-1);
|
||||
|
|
@ -300,8 +300,8 @@ void callsp(void)
|
|||
int i;
|
||||
|
||||
if (flss)
|
||||
i = flss;
|
||||
else
|
||||
i = flss;
|
||||
else
|
||||
i = lss;
|
||||
flss = 0;
|
||||
casesp1(i);
|
||||
|
|
@ -379,7 +379,7 @@ void newline(int a)
|
|||
}
|
||||
if (dip->ditrap && !dip->ditf && dip->dnl >= dip->ditrap && dip->dimac)
|
||||
if (control(dip->dimac, 0)) {
|
||||
trap++;
|
||||
trap++;
|
||||
dip->ditf++;
|
||||
}
|
||||
return;
|
||||
|
|
@ -514,7 +514,7 @@ findt1(void)
|
|||
|
||||
if (dip != d)
|
||||
i = dip->dnl;
|
||||
else
|
||||
else
|
||||
i = numtabp[NL].val;
|
||||
return(findt(i));
|
||||
}
|
||||
|
|
@ -529,7 +529,7 @@ void eject(Stack *a)
|
|||
ejf++;
|
||||
if (a)
|
||||
ejl = a;
|
||||
else
|
||||
else
|
||||
ejl = frame;
|
||||
if (trap)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
/*
|
||||
* troff8.c
|
||||
*
|
||||
*
|
||||
* hyphenation
|
||||
*/
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ void hyphen(Tchar *wp)
|
|||
|
||||
/* this appears to sort hyphenation points into increasing order */
|
||||
*hyp++ = 0;
|
||||
if (*hyptr)
|
||||
if (*hyptr)
|
||||
for (j = 1; j; ) {
|
||||
j = 0;
|
||||
for (hyp = hyptr + 1; *hyp != 0; hyp++) {
|
||||
|
|
@ -194,7 +194,7 @@ int exword(void)
|
|||
return(0);
|
||||
w = wdstart;
|
||||
while (*e && w <= hyend && (*e & 0177) == maplow(cbits(*w))) {
|
||||
e++;
|
||||
e++;
|
||||
w++;
|
||||
}
|
||||
if (!*e) {
|
||||
|
|
@ -209,10 +209,10 @@ int exword(void)
|
|||
}
|
||||
return(1);
|
||||
} else {
|
||||
e++;
|
||||
e++;
|
||||
continue;
|
||||
}
|
||||
} else
|
||||
} else
|
||||
while (*e++)
|
||||
;
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ again:
|
|||
}
|
||||
s = s0 + i - 1;
|
||||
w = hyend;
|
||||
if (*s0 & HY_BIT)
|
||||
if (*s0 & HY_BIT)
|
||||
goto mark;
|
||||
while (s > s0) {
|
||||
w--;
|
||||
|
|
@ -273,7 +273,7 @@ mark:
|
|||
int
|
||||
maplow(int i)
|
||||
{
|
||||
if (isupper(i))
|
||||
if (isupper(i))
|
||||
i = tolower(i);
|
||||
return(i);
|
||||
}
|
||||
|
|
@ -327,7 +327,7 @@ again:
|
|||
val *= dilook('a', cbits(*w), bxh);
|
||||
else if (w == wdstart + 1)
|
||||
val *= dilook(cbits(*(w-1)), cbits(*w), bxxh);
|
||||
else
|
||||
else
|
||||
val *= dilook(cbits(*(w-1)), cbits(*w), xxh);
|
||||
val *= dilook(cbits(*w), cbits(*(w+1)), xhx);
|
||||
val *= dilook(cbits(*(w+1)), cbits(*(w+2)), hxx);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
/*
|
||||
* troff9.c
|
||||
*
|
||||
*
|
||||
* misc functions
|
||||
*/
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ void setov(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
return;
|
||||
*pbp++ = makem(w[0] / 2);
|
||||
for (k = 0; o[k]; k++)
|
||||
|
|
@ -187,7 +187,7 @@ void setvline(void)
|
|||
}
|
||||
if ((cbits(c = getch())) == delim) {
|
||||
c = BOXRULE | chbits; /*default box rule*/
|
||||
} else
|
||||
} else
|
||||
getch();
|
||||
c |= ZBIT;
|
||||
neg = 0;
|
||||
|
|
@ -342,9 +342,9 @@ Tchar setfield(int x)
|
|||
static Tchar wbuf[] = { WORDSP, 0};
|
||||
|
||||
rchar = 0;
|
||||
if (x == tabch)
|
||||
if (x == tabch)
|
||||
rchar = tabc | chbits;
|
||||
else if (x == ldrch)
|
||||
else if (x == ldrch)
|
||||
rchar = dotc | chbits;
|
||||
temp = npad = ws = 0;
|
||||
savfc = fc;
|
||||
|
|
@ -381,7 +381,7 @@ Tchar setfield(int x)
|
|||
if (pp > padptr + NPP - 1)
|
||||
break;
|
||||
goto s1;
|
||||
} else if (j == savfc)
|
||||
} else if (j == savfc)
|
||||
break;
|
||||
else if (j == '\n') {
|
||||
temp = j;
|
||||
|
|
@ -435,7 +435,7 @@ s1:
|
|||
}
|
||||
if (length)
|
||||
jj = length | MOT;
|
||||
else
|
||||
else
|
||||
jj = getch0();
|
||||
if (savepos > 0)
|
||||
pushback(wbuf);
|
||||
|
|
@ -448,14 +448,14 @@ s1:
|
|||
numtabp[HP].val += jj;
|
||||
widthp = jj;
|
||||
*fp++ = ii;
|
||||
if (fp > fbuf + FBUFSZ - 3)
|
||||
if (fp > fbuf + FBUFSZ - 3)
|
||||
break;
|
||||
}
|
||||
*fp++ = ii;
|
||||
*fp = 0;
|
||||
if (type == RTAB)
|
||||
length -= ws;
|
||||
else
|
||||
else
|
||||
length -= ws / 2; /*CTAB*/
|
||||
pushback(fbuf);
|
||||
if ((j = width(rchar)) != 0 && length > 0) {
|
||||
|
|
|
|||
|
|
@ -387,4 +387,3 @@ void (*ptpause)(void);
|
|||
void (*setfont)(int a);
|
||||
void (*setps)(void);
|
||||
void (*setwd)(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
/*
|
||||
* troff10.c
|
||||
*
|
||||
*
|
||||
* typesetter interface
|
||||
*/
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ int ptout0(Tchar *pi)
|
|||
j = -j;
|
||||
if (isvmot(i))
|
||||
lead += j;
|
||||
else
|
||||
else
|
||||
esc += j;
|
||||
return(outsize);
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ int ptout0(Tchar *pi)
|
|||
if (sfbits(i) == oldbits) {
|
||||
xfont = pfont;
|
||||
xpts = ppts;
|
||||
} else
|
||||
} else
|
||||
xbits(i, 2);
|
||||
if (k == XON) {
|
||||
extern int xon;
|
||||
|
|
@ -232,8 +232,8 @@ int ptout0(Tchar *pi)
|
|||
}
|
||||
if (iszbit(i)) {
|
||||
if (cs)
|
||||
w = -j;
|
||||
else
|
||||
w = -j;
|
||||
else
|
||||
w = 0;
|
||||
z = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ getdesc(char *name)
|
|||
chadd(s, Troffchar, Install);
|
||||
break;
|
||||
}
|
||||
/* else
|
||||
/* else
|
||||
just skip anything else */
|
||||
skipline(fin);
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ static int checkfont(char *name)
|
|||
}
|
||||
fclose(fp);
|
||||
return status;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* t6.c
|
||||
*
|
||||
*
|
||||
* width functions, sizes and fonts
|
||||
*/
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ t_width(Tchar j)
|
|||
if (sfbits(j) == oldbits) {
|
||||
xfont = pfont;
|
||||
xpts = ppts;
|
||||
} else
|
||||
} else
|
||||
xbits(j, 0);
|
||||
if (i < nchnames + ALPHABET && widcache[i].fontpts == (xfont<<8) + xpts && !setwdf)
|
||||
k = widcache[i].width;
|
||||
|
|
@ -129,7 +129,7 @@ getcw(int i)
|
|||
if (setwdf)
|
||||
numtabp[CT].val |= fp->wp[n].kern;
|
||||
} else if (n == -2) { /* \N with default width */
|
||||
|
||||
|
||||
k = fp->defaultwidth;
|
||||
} else { /* not on current font */
|
||||
nocache = 1;
|
||||
|
|
@ -153,8 +153,8 @@ getcw(int i)
|
|||
if (cs = cstab[xfont]) {
|
||||
nocache = 1;
|
||||
if (ccs = ccstab[xfont])
|
||||
x = ccs;
|
||||
else
|
||||
x = ccs;
|
||||
else
|
||||
x = xpts;
|
||||
cs = (cs * EMPTS(x)) / 36;
|
||||
}
|
||||
|
|
@ -247,7 +247,7 @@ Tchar t_setch(int c)
|
|||
return j | chbits;
|
||||
} else
|
||||
return chadd(temp, Troffchar, Install) | chbits; /* add name even if haven't seen it */
|
||||
|
||||
|
||||
#endif /*UNICODE*/
|
||||
}
|
||||
|
||||
|
|
@ -488,7 +488,7 @@ void t_setfont(int a)
|
|||
|
||||
if (a)
|
||||
i = getrq();
|
||||
else
|
||||
else
|
||||
i = getsn();
|
||||
if (!i || i == 'P') {
|
||||
j = font1;
|
||||
|
|
@ -538,7 +538,7 @@ void t_setwd(void)
|
|||
k = -k;
|
||||
base -= k;
|
||||
emsz = 0;
|
||||
} else
|
||||
} else
|
||||
continue;
|
||||
if (base < numtabp[SB].val)
|
||||
numtabp[SB].val = base;
|
||||
|
|
@ -654,7 +654,7 @@ Tchar getlg(Tchar i)
|
|||
*pbp++ = k;
|
||||
j = LIG_FF;
|
||||
}
|
||||
} else
|
||||
} else
|
||||
j = LIG_FF;
|
||||
} else {
|
||||
*pbp++ = j;
|
||||
|
|
@ -694,7 +694,7 @@ void casefp(void)
|
|||
if (i <= 0 || i > nfonts)
|
||||
ERROR "fp: bad font position %d", i WARN;
|
||||
else if (skip() || !(j = getrq()))
|
||||
ERROR "fp: no font name" WARN;
|
||||
ERROR "fp: no font name" WARN;
|
||||
else if (skip() || !getname())
|
||||
setfp(i, j, (char*) 0, 1);
|
||||
else /* 3rd argument = filename */
|
||||
|
|
@ -745,8 +745,8 @@ setfp(int pos, int f, char *truename, int print) /* mount font f at position pos
|
|||
ptfont();
|
||||
}
|
||||
if (pos == smnt) {
|
||||
smnt = 0;
|
||||
sbold = 0;
|
||||
smnt = 0;
|
||||
sbold = 0;
|
||||
}
|
||||
fontlab[pos] = f;
|
||||
if (smnt == 0 && fonts[pos].specfont)
|
||||
|
|
@ -801,7 +801,7 @@ bd0:
|
|||
if (skip() || !(i = getrq()) || (j = findft(i)) == -1) {
|
||||
if (k)
|
||||
goto bd1;
|
||||
else
|
||||
else
|
||||
return;
|
||||
}
|
||||
if (j == smnt) {
|
||||
|
|
@ -836,7 +836,7 @@ void casevs(void)
|
|||
i = inumb(&lss);
|
||||
if (nonumb)
|
||||
i = lss1;
|
||||
if (i < VERT)
|
||||
if (i < VERT)
|
||||
i = VERT;
|
||||
lss1 = lss;
|
||||
lss = i;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ extern char errbuf[];
|
|||
/* 0 and 040 don't have any graphic or other function.
|
||||
/* The few that do have a purpose (e.g., \n, \b, \t, ...
|
||||
/* are avoided by the ad hoc choices here.
|
||||
/* See ifilt[] in n1.c for others -- 1, 2, 3, 5, 6, 7, 010, 011, 012
|
||||
/* See ifilt[] in n1.c for others -- 1, 2, 3, 5, 6, 7, 010, 011, 012
|
||||
*/
|
||||
|
||||
#define LEADER 001
|
||||
|
|
@ -189,7 +189,7 @@ extern char errbuf[];
|
|||
/* 128 for parochial USA 7-bit ascii, */
|
||||
/* 256 for "European" mode with e.g., Latin-1 */
|
||||
|
||||
/* NCHARS must be greater than
|
||||
/* NCHARS must be greater than
|
||||
ALPHABET (ascii stuff) + total number of distinct char names
|
||||
from all fonts that will be run in this job (including
|
||||
unnamed ones and \N's)
|
||||
|
|
@ -303,13 +303,13 @@ extern Spnames spnames[];
|
|||
error. In this version, the array is represented by a list of blocks,
|
||||
pointed to by blist[].bp. Each block is of size BLK Tchars, and BLK
|
||||
MUST be a power of 2 for the macros below to work.
|
||||
|
||||
|
||||
The blocks associated with a particular string or macro are chained
|
||||
together in the array blist[]. Each blist[i].nextoff contains the
|
||||
Offset associated with the next block in the giant array, or -1 if
|
||||
this is the last block in the chain. If .nextoff is 0, the block is
|
||||
free.
|
||||
|
||||
|
||||
To find the right index in blist for an Offset, divide by BLK.
|
||||
*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue