'
This commit is contained in:
parent
6bca1e84fb
commit
750bf77846
1 changed files with 0 additions and 31 deletions
|
|
@ -1,31 +0,0 @@
|
|||
// Error Codes
|
||||
#define INVALID_ARG 2
|
||||
|
||||
#include <dirent.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// TODO:
|
||||
// Look at perror for stdlib functions
|
||||
// Create an enum for error handling
|
||||
|
||||
int handle_args(int argc, char **argv)
|
||||
{
|
||||
int flags = 0;
|
||||
for (int i = 1; i < argc; i++)
|
||||
{
|
||||
if (strcmp(argv[i], "-h"))
|
||||
errx(INVALID_ARG, "-h: not implemented");
|
||||
else if (strcmp(argv[i], "-f"))
|
||||
errx(INVALID_ARG, "-f: not implemented");
|
||||
else if (strcmp(argv[i], "-p"))
|
||||
errx(INVALID_ARG, "-p: not implemented");
|
||||
else
|
||||
errx(INVALID_ARG, ": Pleaase give an argument");
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{}
|
||||
Loading…
Add table
Add a link
Reference in a new issue