2021-09-15 00:06:04 +10:00
|
|
|
#ifndef COMMON_HEADER
|
|
|
|
#include "common.h"
|
|
|
|
#endif
|
|
|
|
|
2021-09-08 21:48:00 +10:00
|
|
|
#ifndef INPUT_HEADER
|
|
|
|
#define INPUT_HEADER
|
|
|
|
|
|
|
|
enum stages {
|
|
|
|
STAGE_1 = 1,
|
|
|
|
STAGE_2 = 2,
|
|
|
|
STAGE_3 = 3,
|
|
|
|
STAGE_4 = 4,
|
|
|
|
STAGE_ERROR = -1
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Gets the current stage from the command-line argument */
|
|
|
|
enum stages getStage(char *stage);
|
|
|
|
|
|
|
|
/* Checks the validity of the command line input arguments */
|
|
|
|
void checkInputArgs(int argc, char **argv);
|
|
|
|
|
|
|
|
/* Gets the expected number of arguments for a given stage */
|
|
|
|
int getExpectedArgs(enum stages stage);
|
|
|
|
|
|
|
|
/* Prints the corresponding usage strings for a given stage */
|
|
|
|
void printArgError(enum stages stage, char *errorMessage);
|
|
|
|
|
|
|
|
#endif
|