This reverts commit 37aa8c3b81, reversing
changes made to d5705e42a4.
This commit is contained in:
Charles Descamps 2024-04-21 10:34:25 -07:00
parent 37aa8c3b81
commit d98c664002
28 changed files with 142 additions and 5609 deletions

View file

@ -1,74 +0,0 @@
#ifndef OS_DRIVER
#define OS_DRIVER
// header files
#include <stdio.h>
#include "StringUtils.h"
#include "configops.h"
#include "metadataops.h"
#include "simulator.h"
// ??? #include "datatypes.h"
// program constants
typedef enum {SUBSTRING_NOT_FOUND = 0, MIN_NUM_ARGS = 3, LAST_FOUR_LETTERS = 4} PRG_CONSTANTS;
typedef struct CmdLineDataStruct
{
bool programRunFlag;
bool configDisplayFlag;
bool mdDisplayFlag;
bool runSimFlag;
char fileName[STD_STR_LEN];
} CmdLineData;
// function prototypes
/*
Name: clearCmdLineStruct
Process: sets command line structure data to defaults
Booleans to false, fileName to empty string
Function Input/Parameters: pointer to command line structure (CmdLineData *)
Function Output/Parameters: pointer to command line structure (CmdLineData *)
with updated members
Function Output/Returned: none
Device Input/Device: none
Device Output/Device: none
Dependencies: none
*/
void clearCmdLineStruct(CmdLineData *clDataPtr);
/*
Name: processCmdLine
Process: checks for at least two arguments,
then sets Booleans depending on command line switches
which can be in any order,
also captures config file name which must be last arugment
Function Input/Parameters: number of arguments (int),
vector of arguments (char **)
Function Output/Parameters: pointer to command line structure (CmdLineData *)
with updated members,
set to default values if failure
to capture arguments
Function Output/Returned: Boolean result of argument capture
true if at least one switch and config file name,
false otherwise
Device Input/Device: none
Device Output/Device: none
Dependencies: ???
*/
bool processCmdLine(int numArgs, char **strVector, CmdLineData *clDataPtr);
/*
Name: showCommandLineFormat
Process: displays command line format as assistance to user
Function Input/Parameters: none
Function Output/Parameters: none
Function Output/Returned: none
Device Input/Device: none
Device Output/Monitor: data displayed as spec'd
Dependencies: printf
*/
void showCommandLineFormat();
#endif //OS_DRIVER