aboutsummaryrefslogtreecommitdiffstats
path: root/troff/troff.d/t6.c
diff options
context:
space:
mode:
Diffstat (limited to 'troff/troff.d/t6.c')
-rw-r--r--troff/troff.d/t6.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/troff/troff.d/t6.c b/troff/troff.d/t6.c
index b1ae66504c63..33c5229f71a3 100644
--- a/troff/troff.d/t6.c
+++ b/troff/troff.d/t6.c
@@ -73,6 +73,8 @@
#include "troff.h"
#include "fontmap.h"
+int ps2cc(const char *name);
+
/* fitab[f][c] is 0 if c is not on font f */
/* if it's non-zero, c is in fontab[f] at position
* fitab[f][c].
@@ -108,7 +110,7 @@ static int _ps2cc(const char *name, int create);
int
width(register tchar j)
{
- register int i, k;
+ size_t i, k;
_minflg = minflg;
minflg = minspc = 0;
@@ -128,7 +130,7 @@ width(register tchar j)
return(k);
}
i = cbits(j);
- if (html && i >= NCHARS)
+ if (html && i >= (size_t)NCHARS)
i = ' ';
if (i < ' ') {
if (i == '\b')
@@ -207,7 +209,7 @@ zapwcache(int s)
}
int
-getcw(register int i)
+getcw(size_t i)
{
register int k;
register int *p;
@@ -404,7 +406,7 @@ abscw(int n) /* return index of abs char n in fontab[], etc. */
int
onfont(tchar c)
{
- int k = cbits(c);
+ size_t k = cbits(c);
int f = fbits(c);
if (k <= ' ')
@@ -519,7 +521,8 @@ kzap(int f)
static tchar
findchar(tchar c)
{
- int f, i;
+ int f;
+ size_t i;
f = fbits(c);
c = cbits(c);
@@ -573,7 +576,8 @@ getkw(tchar c, tchar e)
{
struct knode *kp;
struct afmtab *a;
- int f, g, i, j, k, n, s, I, J;
+ int f, g, i, j, k, n, s;
+ size_t I, J;
double z;
if (isxfunc(c, CHAR))
@@ -724,7 +728,7 @@ static const struct amap {
tchar
setch(int delim) {
- register int j;
+ size_t j;
char temp[NC];
tchar c, e[2] = {0, 0};
int f;
@@ -831,7 +835,7 @@ tchar setabs(void) /* set absolute char from \C'...' */
n = 0;
n = inumb(&n);
getch();
- if (nonumb || n + nchtab + 128 >= NCHARS)
+ if (nonumb || n + nchtab + 128 >= (size_t)NCHARS)
return 0;
return n + nchtab + 128;
}
@@ -2067,7 +2071,6 @@ loadafm(int nf, int rq, char *file, char *supply, int required, enum spec spec)
struct afmtab *a;
int i, have = 0;
struct namecache *np;
- size_t l;
zapwcache(0);
if (nf < 0)
@@ -2252,7 +2255,8 @@ void
casehidechar(void)
{
int savfont = font, savfont1 = font1;
- int i, j;
+ int j;
+ size_t i;
tchar k;
if (skip(1))
@@ -2871,7 +2875,7 @@ tr2un(tchar i, int f)
a = afmtab[n];
if (a->unitab && i < a->nunitab && a->unitab[i])
return a->unitab[i];
- if (i - 32 >= nchtab + 128)
+ if ((size_t)i - 32 >= nchtab + 128)
i -= nchtab + 128;
if ((n = a->fitab[i - 32]) < a->nchars &&
a->nametab[n] != NULL)