Using getopt() for more coherence with the other tools
This commit is contained in:
parent
edc72ad965
commit
75787b99e0
10
src/tty.c
10
src/tty.c
|
@ -57,7 +57,15 @@ static int _usage(void)
|
||||||
/* main */
|
/* main */
|
||||||
int main(int argc, char * argv[])
|
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 _usage();
|
||||||
return _tty();
|
return _tty();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user