-
Notifications
You must be signed in to change notification settings - Fork 1
/
flags.h
48 lines (36 loc) · 965 Bytes
/
flags.h
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
46
47
48
/*
FLAGS
Flags are used to indicate certain system settings. DEBUG, INFO,
STATS, TAIL, and STEP are user-set, while LIB is used in the
process of loading the library functions.
*/
#ifndef FLAGS_GUARD
#define FLAGS_GUARD
#include <stdbool.h>
#include <stdio.h>
#include "keywords.h"
extern int DEBUG;
extern int INFO;
extern int STATS;
extern int TAIL;
extern int STEP;
/* LIB keeps print functions from printing during
library loading (see print.c) */
extern int LIB;
/* flag names */
#define DEBUG_NAME "DEBUG"
#define INFO_NAME "INFO"
#define STATS_NAME "STATS"
#define TAIL_NAME "TAIL"
#define STEP_NAME "STEP"
/* flag manipulation */
void switch_flag(char* flag_command);
void toggle_val(int* flag);
void repl_switch(void);
void demo_switch(void);
/* LIB has its own dedicated toggle function
to make read.c more readable */
void toggle_LIB(void);
/* from read.c (redundant declaration?) */
int streq(char* str1, char* str2);
#endif