10#define FIRST_CONTENT_INDEX 2
11#define SECOND_CONTENT_INDEX 3
12#define DEFAULT_CLASS "def"
15int main(
int argc,
char* argv[])
17 const int NUM_OF_ARGS = argc - 1;
21 printf(
"Error: Expected 2 or more arguments, got %d\n", NUM_OF_ARGS);
22 printf(
"Usage: prlx [FLAGS] [CONTENT/IDENTIFIER] [CONTENT]\n");
27 if ( strcmp(argv[FLAG_INDEX],
"-t") == 0 )
33 else if ( task_test() != 1 )
40 const char* content = get_content_arg(argv[FIRST_CONTENT_INDEX]);
43 FLAG_TYPE flag = get_flag(argv[FLAG_INDEX]);
52 class = get_content_arg(argv[SECOND_CONTENT_INDEX]);
56 printf("Remove flag detected\n
");
59 printf("Modify flag detected\n
");
62 printf("List flag detected\n
");
65 printf("Flag error: %s is not a valid flag.\nConsult 'prlx --help' for info on flags.\n", argv[FLAG_INDEX]);
Contains functions for extracting content from the argument vector.
FLAG_TYPE
Possible flag types.
Contains the structures and procedures for hashmap-related operations.
Contains structures and functions for handling task-related operations.