plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit d0648192ab892f41213db3a3d92b0619de995e3d
parent 14b4a4702c719bf185dde797999a0ba5cad5465f
Author: rsc <devnull@localhost>
Date:   Sat, 21 Apr 2007 22:37:13 +0000

warn about \w no arg

Diffstat:
Msrc/cmd/htmlroff/t11.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/cmd/htmlroff/t11.c b/src/cmd/htmlroff/t11.c @@ -72,8 +72,13 @@ e_w(void) { Rune *a; Rune buf[40]; - + static Rune zero; + a = getqarg(); + if(a == nil){ + warn("no arg for \\w"); + a = &zero; + } runesnprint(buf, sizeof buf, "%ld", runestrlen(a)); pushinputstring(buf); nr(L("st"), 0);