GRU - Generic Reusable Utilities
gru_cli_opt.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Otavio Piske <angusyoung@gmail.com>.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #include <stdio.h>
17 
18 #include "common/gru_colors.h"
19 #include "common/gru_portable.h"
20 
21 #ifndef GRU_CLI_OPT_H
22 #define GRU_CLI_OPT_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
34 gru_export void
35  gru_cli_option_help(const char *long_opt, const char *short_opt, const char *desc);
36 
42 gru_export void gru_cli_program_usage(const char *appname, const char *program_name);
43 
49 gru_export void gru_cli_program_description(const char *program, const char *description);
50 
55 gru_export void gru_cli_general_usage(const char *appname);
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* GRU_CLI_OPT_H */
gru_export void gru_cli_program_description(const char *program, const char *description)
Prints program description for composed programs.
Definition: gru_cli_opt.c:37
gru_export void gru_cli_program_usage(const char *appname, const char *program_name)
Prints program usage for composed program types.
Definition: gru_cli_opt.c:28
gru_export void gru_cli_general_usage(const char *appname)
Prints program basic usage.
Definition: gru_cli_opt.c:41
gru_export void gru_cli_option_help(const char *long_opt, const char *short_opt, const char *desc)
Prints CLI options help.
Definition: gru_cli_opt.c:18
#define gru_export
Definition: gru_portable.h:19