diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/include/libbb.h b/include/libbb.h index 3f3e033fe..64d1f2fcb 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1180,19 +1180,24 @@ void bb_sanitize_stdio(void) FAST_FUNC; | |||
1180 | int sanitize_env_if_suid(void) FAST_FUNC; | 1180 | int sanitize_env_if_suid(void) FAST_FUNC; |
1181 | 1181 | ||
1182 | 1182 | ||
1183 | /* For top, ps. Some argv[i] are replaced by malloced "-opt" strings */ | ||
1184 | void make_all_argv_opts(char **argv) FAST_FUNC; | ||
1183 | char* single_argv(char **argv) FAST_FUNC; | 1185 | char* single_argv(char **argv) FAST_FUNC; |
1184 | extern const char *const bb_argv_dash[]; /* "-", NULL */ | 1186 | extern const char *const bb_argv_dash[]; /* { "-", NULL } */ |
1185 | extern const char *opt_complementary; | ||
1186 | #if ENABLE_LONG_OPTS || ENABLE_FEATURE_GETOPT_LONG | ||
1187 | #define No_argument "\0" | ||
1188 | #define Required_argument "\001" | ||
1189 | #define Optional_argument "\002" | ||
1190 | extern const char *applet_long_options; | ||
1191 | #endif | ||
1192 | extern uint32_t option_mask32; | 1187 | extern uint32_t option_mask32; |
1188 | //TODO: get rid of this global variable. How about a trick where optstring can be | ||
1189 | // "^optchars""\0""complementary" (the leading "^" is an indicator)? | ||
1190 | extern const char *opt_complementary; | ||
1193 | uint32_t getopt32(char **argv, const char *applet_opts, ...) FAST_FUNC; | 1191 | uint32_t getopt32(char **argv, const char *applet_opts, ...) FAST_FUNC; |
1194 | /* For top, ps. Some argv[i] are replaced by malloced "-opt" strings */ | 1192 | # define No_argument "\0" |
1195 | void make_all_argv_opts(char **argv) FAST_FUNC; | 1193 | # define Required_argument "\001" |
1194 | # define Optional_argument "\002" | ||
1195 | #if ENABLE_LONG_OPTS | ||
1196 | uint32_t getopt32long(char **argv, const char *optstring, const char *longopts, ...) FAST_FUNC; | ||
1197 | #else | ||
1198 | #define getopt32long(argv,optstring,longopts,...) \ | ||
1199 | getopt32(argv,optstring,##__VA_ARGS__) | ||
1200 | #endif | ||
1196 | /* BSD-derived getopt() functions require that optind be set to 1 in | 1201 | /* BSD-derived getopt() functions require that optind be set to 1 in |
1197 | * order to reset getopt() state. This used to be generally accepted | 1202 | * order to reset getopt() state. This used to be generally accepted |
1198 | * way of resetting getopt(). However, glibc's getopt() | 1203 | * way of resetting getopt(). However, glibc's getopt() |