27 lines
967 B
C
27 lines
967 B
C
|
#include <stdlib.h>
|
||
|
|
||
|
#include "argo.h"
|
||
|
#include "global.h"
|
||
|
#include "debug.h"
|
||
|
|
||
|
/**
|
||
|
* @brief Validates command line arguments passed to the program.
|
||
|
* @details This function will validate all the arguments passed to the
|
||
|
* program, returning 0 if validation succeeds and -1 if validation fails.
|
||
|
* Upon successful return, the various options that were specified will be
|
||
|
* encoded in the global variable 'global_options', where it will be
|
||
|
* accessible elsewhere in the program. For details of the required
|
||
|
* encoding, see the assignment handout.
|
||
|
*
|
||
|
* @param argc The number of arguments passed to the program from the CLI.
|
||
|
* @param argv The argument strings passed to the program from the CLI.
|
||
|
* @return 0 if validation succeeds and -1 if validation fails.
|
||
|
* @modifies global variable "global_options" to contain an encoded representation
|
||
|
* of the selected program options.
|
||
|
*/
|
||
|
|
||
|
int validargs(int argc, char **argv) {
|
||
|
// TO BE IMPLEMENTED
|
||
|
abort();
|
||
|
}
|