L4Re - L4 Runtime Environment
parse_cmd.h
Go to the documentation of this file.
1 
9 /*
10  * (c) 2003-2009 Author(s)
11  * economic rights: Technische Universit├Ąt Dresden (Germany)
12  * This file is part of TUD:OS and distributed under the terms of the
13  * GNU Lesser General Public License 2.1.
14  * Please see the COPYING-LGPL-2.1 file for details.
15  */
16 
17 #ifndef __PARSE_CMD_H
18 #define __PARSE_CMD_H
19 
20 #include <stdarg.h>
21 #include <l4/sys/compiler.h>
22 
28 
33  PARSE_CMD_INT,
34  PARSE_CMD_SWITCH,
35  PARSE_CMD_STRING,
36  PARSE_CMD_FN,
37  PARSE_CMD_FN_ARG,
38  PARSE_CMD_INC,
39  PARSE_CMD_DEC,
40 };
41 
45 typedef L4_CV void (*parse_cmd_fn_t)(int);
46 
50 typedef L4_CV void (*parse_cmd_fn_arg_t)(int, const char*, int);
51 
53 
140 L4_CV int parse_cmdline(int *argc, const char***argv, char arg0, ...);
141 L4_CV int parse_cmdlinev(int *argc, const char***argv, char arg0, va_list va);
142 L4_CV int parse_cmdline_extra(const char*argv0, const char*line, char delim,
143  char arg0,...);
144 
148 #endif
149 
parse_cmd_type
Types for parsing.
Definition: parse_cmd.h:32
#define EXTERN_C_END
End section with C types and functions.
Definition: compiler.h:187
L4 compiler related defines.
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition: compiler.h:186
#define L4_CV
Define calling convention.
Definition: linkage.h:44
void(* parse_cmd_fn_t)(int)
Function type for PARSE_CMD_FN.
Definition: parse_cmd.h:45
void(* parse_cmd_fn_arg_t)(int, const char *, int)
Function type for PARSE_CMD_FN_ARG.
Definition: parse_cmd.h:50
int parse_cmdline(int *argc, const char ***argv, char arg0,...)
Parse the command-line for specified arguments and store the values into variables.