-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetadataops.h
More file actions
45 lines (29 loc) · 1.13 KB
/
metadataops.h
File metadata and controls
45 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef METADATAOPS_H
#define METADATAOPS_H
#include "datatypes.h"
#include "sim_main.h"
typedef enum { BAD_ARG_VAL = -1,
NO_ACCESS_ERR,
MD_FILE_ACCESS_ERR,
MD_CORRUPT_DESCRIPTOR_ERR,
OPCMD_ACCESS_ERR,
CORRUPT_OPCMD_ERR,
CORRUPT_OPCMD_ARG_ERR,
UNBALANCED_START_END_ERR,
COMPLETE_OPCMD_FOUND_MSG,
LAST_OPCMD_FOUND_MSG} OpCodeMessages;
bool getMetaData( const char *fileName, OpCodeType **opCodeDataHead,
char *endStateMsg );
void displayMetaData( const OpCodeType *localPtr );
OpCodeType *clearMetaDataList( OpCodeType *localPtr );
OpCodeType *addNode( OpCodeType *localPtr, OpCodeType *newNode );
int getCommand( char *cmd, const char *inputStr, int index );
OpCodeMessages getOpCommand( FILE *filePtr, OpCodeType *inData );
int getNumberArg( int *number, const char *inputStr, int index );
int getStringArg( char *strArg, const char *inputStr, int index );
bool isDigit( char testChar );
int updateEndCount( int count, const char *opString );
int updateStartCount( int count, const char *opString);
bool verifyFirstStringArg( const char *strArg );
bool verifyValidCommand( char *testCmd );
#endif