Fix wget error message and add (and use) chomp library function.

This commit is contained in:
Matt Kraai
2001-02-01 16:49:30 +00:00
parent bd018b1bab
commit 05e782ddd3
15 changed files with 31 additions and 24 deletions

View File

@ -1760,6 +1760,19 @@ char *format(unsigned long val, unsigned long hr)
}
#endif
#if defined(BB_GREP) || defined(BB_HOSTNAME) || defined(BB_SED) || defined(BB_TAR) || defined(BB_WGET) || defined(BB_XARGS)
void chomp(char *s)
{
size_t len = strlen(s);
if (len == 0)
return;
if (s[len-1] == '\n')
s[len-1] = '\0';
}
#endif
/* END CODE */
/*
Local Variables: