diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 02:52:20 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 02:52:20 +0000 |
commit | defc1ea34074e7882724c460260d307cdf981a70 (patch) | |
tree | fca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /libbb/compare_string_array.c | |
parent | 26bc57d8b26425f23f4be974cce7bf35c95c9a1a (diff) | |
download | busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.tar.gz busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.tar.bz2 busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.zip |
*: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
Diffstat (limited to 'libbb/compare_string_array.c')
-rw-r--r-- | libbb/compare_string_array.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index ec7f94e79..43c59e8e0 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | /* returns the array index of the string */ | 8 | /* returns the array index of the string */ |
9 | /* (index of first match is returned, or -1) */ | 9 | /* (index of first match is returned, or -1) */ |
10 | int index_in_str_array(const char *const string_array[], const char *key) | 10 | int FAST_FUNC index_in_str_array(const char *const string_array[], const char *key) |
11 | { | 11 | { |
12 | int i; | 12 | int i; |
13 | 13 | ||
@@ -19,7 +19,7 @@ int index_in_str_array(const char *const string_array[], const char *key) | |||
19 | return -1; | 19 | return -1; |
20 | } | 20 | } |
21 | 21 | ||
22 | int index_in_strings(const char *strings, const char *key) | 22 | int FAST_FUNC index_in_strings(const char *strings, const char *key) |
23 | { | 23 | { |
24 | int idx = 0; | 24 | int idx = 0; |
25 | 25 | ||
@@ -36,7 +36,7 @@ int index_in_strings(const char *strings, const char *key) | |||
36 | /* returns the array index of the string, even if it matches only a beginning */ | 36 | /* returns the array index of the string, even if it matches only a beginning */ |
37 | /* (index of first match is returned, or -1) */ | 37 | /* (index of first match is returned, or -1) */ |
38 | #ifdef UNUSED | 38 | #ifdef UNUSED |
39 | int index_in_substr_array(const char *const string_array[], const char *key) | 39 | int FAST_FUNC index_in_substr_array(const char *const string_array[], const char *key) |
40 | { | 40 | { |
41 | int i; | 41 | int i; |
42 | int len = strlen(key); | 42 | int len = strlen(key); |
@@ -51,7 +51,7 @@ int index_in_substr_array(const char *const string_array[], const char *key) | |||
51 | } | 51 | } |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | int index_in_substrings(const char *strings, const char *key) | 54 | int FAST_FUNC index_in_substrings(const char *strings, const char *key) |
55 | { | 55 | { |
56 | int len = strlen(key); | 56 | int len = strlen(key); |
57 | 57 | ||
@@ -68,7 +68,7 @@ int index_in_substrings(const char *strings, const char *key) | |||
68 | return -1; | 68 | return -1; |
69 | } | 69 | } |
70 | 70 | ||
71 | const char *nth_string(const char *strings, int n) | 71 | const char* FAST_FUNC nth_string(const char *strings, int n) |
72 | { | 72 | { |
73 | while (n) { | 73 | while (n) { |
74 | n--; | 74 | n--; |