diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
commit | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch) | |
tree | f053238978479e408a2b83571443e132f30586ab /src/cmd/tbl/t5.c | |
parent | c0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff) | |
parent | 3d1382b98a502d0c34d5ba2c462396acc515016e (diff) | |
download | plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2 plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/tbl/t5.c')
-rw-r--r-- | src/cmd/tbl/t5.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/cmd/tbl/t5.c b/src/cmd/tbl/t5.c index e23784be..c50077e7 100644 --- a/src/cmd/tbl/t5.c +++ b/src/cmd/tbl/t5.c @@ -28,7 +28,7 @@ gettbl(void) while (*cstore++) ; continue; - } else + } else instead[nlin] = 0; if (nodata(nlin)) { if (ch = oneh(nlin)) @@ -46,11 +46,11 @@ gettbl(void) table[nlin] = (struct colstr *) alocv((ncol + 2) * sizeof(table[0][0])); if (cstore[1] == 0) switch (cstore[0]) { - case '_': - fullbot[nlin] = '-'; + case '_': + fullbot[nlin] = '-'; continue; - case '=': - fullbot[nlin] = '='; + case '=': + fullbot[nlin] = '='; continue; } stynum[nlin] = nslin; @@ -60,7 +60,7 @@ gettbl(void) table[nlin][icol].rcol = 0; ch = 1; if (match(cstore, "T{")) { /* text follows */ - table[nlin][icol].col = + table[nlin][icol].col = (char *)(uintptr)gettext(cstore, nlin, icol, font[icol][stynum[nlin]], csize[icol][stynum[nlin]]); @@ -81,7 +81,7 @@ gettbl(void) } while (ctype(nlin, icol + 1) == 's') /* spanning */ table[nlin][++icol].col = ""; - if (ch == '\0') + if (ch == '\0') break; } while (++icol < ncol + 2) { @@ -95,7 +95,7 @@ gettbl(void) } last = cstore; permute(); - if (textflg) + if (textflg) untext(); return; } @@ -108,11 +108,11 @@ nodata(int il) for (c = 0; c < ncol; c++) { switch (ctype(il, c)) { - case 'c': - case 'n': - case 'r': - case 'l': - case 's': + case 'c': + case 'n': + case 'r': + case 'l': + case 's': case 'a': return(0); } @@ -169,17 +169,17 @@ permute(void) int vspand(int ir, int ij, int ifform) { - if (ir < 0) + if (ir < 0) return(0); if (ir >= nlin) return(0); - if (instead[ir]) + if (instead[ir]) return(0); - if (ifform == 0 && ctype(ir, ij) == '^') + if (ifform == 0 && ctype(ir, ij) == '^') return(1); - if (table[ir][ij].rcol != 0) + if (table[ir][ij].rcol != 0) return(0); - if (fullbot[ir]) + if (fullbot[ir]) return(0); return(vspen(table[ir][ij].col)); } @@ -188,11 +188,9 @@ vspand(int ir, int ij, int ifform) int vspen(char *s) { - if (s == 0) + if (s == 0) return(0); - if (!point(s)) + if (!point(s)) return(0); return(match(s, SPAN)); } - - |