-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.h
More file actions
35 lines (27 loc) · 832 Bytes
/
options.h
File metadata and controls
35 lines (27 loc) · 832 Bytes
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
/* -*- C -*- */
#ifndef OPTIONS_H_
#define OPTIONS_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* value -> arg value to be processed
* target -> uint64_t to receive the result; must be pre-initialzed
* with the default to use if the value doesn't parse
* what -> string that says what the value is, for use in error messages
*/
void processNumericArg(const char* value, uint64_t *target, const char* what);
/*
* source -> string the form <FIRST>[<SEP><REMAINDER>]
* Sets "first" to point to <FIRST>, "remainder" to point to either
* <REMAINDER> or to the empty string.
*
* NOTE: "source" is modified (<SEP>, if present, is replaced by a
* null terminator).
*/
void split(char* source, char where, char** first, char** remainder);
#ifdef __cplusplus
}
#endif
#endif /* OPTIONS_H_ */