SWOC System
Server Wait On Clients System.
cmdlineargs.h
Go to the documentation of this file.
1 
14 /* **********************************************************************
15  * *
16  * Changelog *
17  * *
18  * Date Author Version Description *
19  * *
20  * 08/07/2015 MG 1.0.1 First release. *
21  * 09/05/2016 MG 1.0.2 Move header files to include directory. *
22  * 13/06/2016 MG 1.0.3 Adopt convention of using void in empty *
23  * function parameter lists. *
24  * 17/07/2016 MG 1.0.4 Move towards kernel coding style. *
25  * 07/05/2017 MG 1.0.5 Add --wait as a command line argument. *
26  * 12/11/2017 MG 1.0.6 Add Doxygen comments. *
27  * Add SPDX license tag. *
28  * 22/05/2018 MG 1.0.7 Make more generic for copy and paste *
29  * re-usability by using function with a *
30  * variable number of arguments. *
31  * 18/05/2019 MG 1.0.8 Merge sub-projects into one. *
32  * *
33  ************************************************************************
34  */
35 
36 #ifndef CMDLINEARGS_H
37 #define CMDLINEARGS_H
38 
39 #include <limits.h>
40 
41 #include <portability.h>
42 
43 BEGIN_C_DECLS
44 
50 #define ARG_BUF PATH_MAX
51 
53 struct cla {
54  int is_set;
55  char argument[ARG_BUF];
56 };
57 
58 int process_cla(int argc, char **argv, ...);
59 
60 int cpyarg(char *flagarg, char *srcarg);
61 
62 END_C_DECLS
63 
64 #endif /* ndef CMDLINEARGS_H */
65 
int process_cla(int argc, char **argv,...)
Process command line arguments using getopt_long.
Definition: cmdlineargs.c:63
int is_set
Is this option set on the CL.
Definition: cmdlineargs.h:52
Command line argument.
Definition: cmdlineargs.h:51
#define ARG_BUF
Argument buffer size.
Definition: cmdlineargs.h:50
int cpyarg(char *flagarg, char *srcarg)
Definition: cmdlineargs.c:235
char argument[ARG_BUF]
Argument to the option.
Definition: cmdlineargs.h:53