mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 13:45:10 +00:00
[ADD] Help screen
This commit is contained in:
parent
1f747dd016
commit
4b2ede6a66
3 changed files with 102 additions and 1 deletions
|
|
@ -58,6 +58,16 @@ typedef struct ParseeData {
|
|||
char *id;
|
||||
} ParseeData;
|
||||
|
||||
typedef struct Argument {
|
||||
bool end;
|
||||
|
||||
char argument;
|
||||
bool value_req;
|
||||
|
||||
const char *value_descr;
|
||||
const char *description;
|
||||
} Argument;
|
||||
|
||||
#define GrabString(obj, ...) JsonValueAsString(JsonGet(obj, __VA_ARGS__))
|
||||
#define GrabInteger(obj, ...) JsonValueAsInteger(JsonGet(obj, __VA_ARGS__))
|
||||
#define GrabBoolean(obj, ...) JsonValueAsBoolean(JsonGet(obj, __VA_ARGS__))
|
||||
|
|
@ -76,6 +86,19 @@ typedef struct ParseeData {
|
|||
#define MB * 1024 KB
|
||||
#define GB * 1024 MB
|
||||
|
||||
/** Generates a valid, getopt-style argument list from a end-terminated
|
||||
* argument list.
|
||||
* ------------
|
||||
* Returns: a valid string to be used in getopt and the likes[HEAP]
|
||||
* Modifies: NOTHING */
|
||||
extern char * ParseeGenerateGetopt(const Argument *list);
|
||||
|
||||
/** Generates a help screen to the logger.
|
||||
* ------------
|
||||
* Returns: NOTHING
|
||||
* Modifies: NOTHING */
|
||||
extern void ParseeGenerateHelp(const Argument *list);
|
||||
|
||||
/* Initialises a Parsee config from scratch, and writes to it
|
||||
* as JSON in the CWD. */
|
||||
extern void ParseeConfigInit(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue