static void prs(const char *s)
{
if (*s)
- write(STDERR_FILENO, s, strlen(s));
+ xwrite_str(STDERR_FILENO, s);
}
static void prn(unsigned u)
cp = args[1];
if (cp == NULL) {
for (vp = vlist; vp; vp = vp->next)
- varput(vp->name, 1);
+ varput(vp->name, STDOUT_FILENO);
return 0;
}
if (*cp == '-') {
static void varput(char *s, int out)
{
if (isalnum(*s) || *s == '_') {
- write(out, s, strlen(s));
- write(out, "\n", 1);
+ xwrite_str(out, s);
+ xwrite(out, "\n", 1);
}
}