aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/htmlroff
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2007-04-21 22:37:13 +0000
committerrsc <devnull@localhost>2007-04-21 22:37:13 +0000
commitd0648192ab892f41213db3a3d92b0619de995e3d (patch)
tree9e1a391cec70ca58f3dce33cb9c4f1199f6439af /src/cmd/htmlroff
parent14b4a4702c719bf185dde797999a0ba5cad5465f (diff)
downloadplan9port-d0648192ab892f41213db3a3d92b0619de995e3d.tar.gz
plan9port-d0648192ab892f41213db3a3d92b0619de995e3d.tar.bz2
plan9port-d0648192ab892f41213db3a3d92b0619de995e3d.zip
warn about \w no arg
Diffstat (limited to 'src/cmd/htmlroff')
-rw-r--r--src/cmd/htmlroff/t11.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/htmlroff/t11.c b/src/cmd/htmlroff/t11.c
index 53d68aac..dd1dd75b 100644
--- 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);