Using getopt() for more coherence with the other tools

This commit is contained in:
Pierre Pronchery 2009-10-20 15:26:18 +00:00
parent edc72ad965
commit 75787b99e0

View File

@ -57,7 +57,15 @@ static int _usage(void)
/* main */
int main(int argc, char * argv[])
{
if(argc != 1)
int o;
while((o = getopt(argc, argv, "")) != -1)
switch(o)
{
default:
return _usage();
}
if(optind != argc)
return _usage();
return _tty();
}