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/htmlroff/t2.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/htmlroff/t2.c')
-rw-r--r-- | src/cmd/htmlroff/t2.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/cmd/htmlroff/t2.c b/src/cmd/htmlroff/t2.c index 54481d0a..1831660e 100644 --- a/src/cmd/htmlroff/t2.c +++ b/src/cmd/htmlroff/t2.c @@ -3,14 +3,14 @@ /* * Section 2 - Font and character size control. */ - + /* 2.1 - Character set */ /* XXX * * \C'name' - character named name * \N'n' - character number * \(xx - two-letter character - * \- + * \- * \` * \' * ` @@ -24,10 +24,10 @@ getqarg(void) static Rune buf[MaxLine]; int c; Rune *p, *e; - + p = buf; - e = p+sizeof buf-1; - + e = p + nelem(buf) - 1; + if(getrune() != '\'') return nil; while(p < e){ @@ -60,7 +60,7 @@ e_paren(void) { int c, cc; Rune buf[2], r; - + if((c = getrune()) < 0 || c == '\n') goto error; if((cc = getrune()) < 0 || cc == '\n') @@ -71,7 +71,7 @@ e_paren(void) if(r == Runeerror) warn("unknown char %C(%C%C", backslash, c, cc); return r; - + error: warn("malformed %C(xx", backslash); return 0; @@ -92,7 +92,7 @@ ft(Rune *f) { int i; int fn; - + if(f && runestrcmp(f, L("P")) == 0) f = nil; if(f == nil) @@ -131,7 +131,7 @@ fp(int i, Rune *f) } runestrecpy(fonttab[i], fonttab[i]+sizeof fonttab[i], f); } - + int e_f(void) { @@ -177,7 +177,7 @@ void r_ps(int argc, Rune **argv) { Rune *p; - + if(argc == 1 || argv[1][0] == 0) ps(0); else{ @@ -195,7 +195,7 @@ int e_s(void) { int c, cc, ccc, n, twodigit; - + c = getnext(); if(c < 0) return 0; @@ -253,7 +253,7 @@ t2init(void) fp(3, L("B")); fp(4, L("BI")); fp(5, L("CW")); - + nr(L(".s"), 10); nr(L(".s0"), 10); @@ -271,4 +271,3 @@ t2init(void) addesc('N', e_N, 0); /* \- \' \` are handled in html.c */ } - |