More robust command line parsing

Allow multiple spaces or tabs between keyword and argument, also set
hostname only once.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
Claudio Matsuoka committed 2008-05-16 09:19:29 -03:00
1 parent 3158733ced
commit 2ffafc3d03
3 files changed
+28 -20

No files matched your search

+12
View File
@@ -157,4 +157,16 @@ int run_parts(char *dir, ...)
return 0;
}
/*
* Other convenience functions
*/
void chomp(char *s)
{
char *x;
if ((x = strchr((s), 0x0a)) != NULL)
*x = 0;
}
#endif