Add a usage function
This commit is contained in:
parent
7d38e2bf78
commit
aa7697833e
11
main.c
11
main.c
@ -35,6 +35,12 @@ void blockHost(FILE *hostsFile, char *host)
|
||||
fputs(blockRule, hostsFile);
|
||||
}
|
||||
|
||||
void usage()
|
||||
{
|
||||
fprintf(stdout, "Usage: ");
|
||||
fprintf(stdout, "hb [add] <sitename>\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Entrypoint.
|
||||
*/
|
||||
@ -58,6 +64,11 @@ int main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stdout, "Soon to be implemented!\n");
|
||||
}
|
||||
else if (strcmp(argv[i], "-h") == 0)
|
||||
{
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (hostsFile != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user