mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
warn about \w no arg
This commit is contained in:
parent
14b4a4702c
commit
d0648192ab
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue