Simplify this just a little.
This commit is contained in:
parent
ee7138ecea
commit
02513843ae
10
bin/ps/fmt.c
10
bin/ps/fmt.c
@ -30,14 +30,12 @@ fmt_puts(s, leftp)
|
||||
if (*leftp != -1) {
|
||||
len = strlen(v);
|
||||
if (len > *leftp) {
|
||||
printf("%.*s", *leftp, v);
|
||||
v[*leftp] = '\0';
|
||||
*leftp = 0;
|
||||
} else {
|
||||
printf("%s", v);
|
||||
} else
|
||||
*leftp -= len;
|
||||
}
|
||||
} else
|
||||
printf("%s", v);
|
||||
}
|
||||
printf("%s", v);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user