diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-21 13:23:14 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-21 13:23:14 +0000 |
| commit | bf66fbc8e2380717c1fab860cfc60c78582839dd (patch) | |
| tree | 3ab3dd4df901851ff7f4345708592118766ba4aa /include | |
| parent | 6910741067913d131d931b1e6424d3b8ed43e64f (diff) | |
| download | busybox-w32-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.gz busybox-w32-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.bz2 busybox-w32-bf66fbc8e2380717c1fab860cfc60c78582839dd.zip | |
introduce LONE_CHAR (optimized strcmp with one-char string)
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index 7dc7abd7f..2fd54e789 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -263,6 +263,8 @@ extern char *xasprintf(const char *format, ...) __attribute__ ((format (printf, | |||
| 263 | //int NOT_LONE_DASH(const char *s) { return s[0] != '-' || s[1]; } | 263 | //int NOT_LONE_DASH(const char *s) { return s[0] != '-' || s[1]; } |
| 264 | #define LONE_DASH(s) ((s)[0] == '-' && !(s)[1]) | 264 | #define LONE_DASH(s) ((s)[0] == '-' && !(s)[1]) |
| 265 | #define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1]) | 265 | #define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1]) |
| 266 | #define LONE_CHAR(s,c) ((s)[0] == (c) && !(s)[1]) | ||
| 267 | #define NOT_LONE_CHAR(s,c) ((s)[0] != (c) || (s)[1]) | ||
| 266 | 268 | ||
| 267 | /* dmalloc will redefine these to it's own implementation. It is safe | 269 | /* dmalloc will redefine these to it's own implementation. It is safe |
| 268 | * to have the prototypes here unconditionally. */ | 270 | * to have the prototypes here unconditionally. */ |
| @@ -386,7 +388,9 @@ extern void bb_vperror_msg(const char *s, va_list p); | |||
| 386 | extern void bb_vinfo_msg(const char *s, va_list p); | 388 | extern void bb_vinfo_msg(const char *s, va_list p); |
| 387 | 389 | ||
| 388 | 390 | ||
| 389 | extern int bb_echo(int argc, char** argv); | 391 | /* applets which are useful from another applets */ |
| 392 | extern int bb_cat(char** argv); | ||
| 393 | extern int bb_echo(char** argv); | ||
| 390 | extern int bb_test(int argc, char** argv); | 394 | extern int bb_test(int argc, char** argv); |
| 391 | 395 | ||
| 392 | #ifndef BUILD_INDIVIDUAL | 396 | #ifndef BUILD_INDIVIDUAL |
