diff options
author | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-09-14 16:59:11 +0000 |
---|---|---|
committer | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-09-14 16:59:11 +0000 |
commit | 23f62fc6f3b8d01a953266ddd404c392b128c952 (patch) | |
tree | a6de7890b9cffd9bef96ebc8b326d63435955219 | |
parent | b4f3cff6f5e77ce0a0edb12e6a5811d0063080ca (diff) | |
download | busybox-w32-23f62fc6f3b8d01a953266ddd404c392b128c952.tar.gz busybox-w32-23f62fc6f3b8d01a953266ddd404c392b128c952.tar.bz2 busybox-w32-23f62fc6f3b8d01a953266ddd404c392b128c952.zip |
split libbb: moved xregcomp separatelly for speed up recompile
-rw-r--r-- | editors/awk.c | 2 | ||||
-rw-r--r-- | editors/sed.c | 2 | ||||
-rw-r--r-- | findutils/grep.c | 2 | ||||
-rw-r--r-- | include/libbb.h | 2 | ||||
-rw-r--r-- | include/xregex.h | 31 | ||||
-rw-r--r-- | libbb/xregcomp.c | 2 | ||||
-rw-r--r-- | miscutils/devfsd.c | 3 |
7 files changed, 36 insertions, 8 deletions
diff --git a/editors/awk.c b/editors/awk.c index 3ee677304..6e81e23a9 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <math.h> | 29 | #include <math.h> |
30 | #include <ctype.h> | 30 | #include <ctype.h> |
31 | #include <getopt.h> | 31 | #include <getopt.h> |
32 | #include <regex.h> | ||
33 | 32 | ||
33 | #include "xregex.h" | ||
34 | #include "busybox.h" | 34 | #include "busybox.h" |
35 | 35 | ||
36 | 36 | ||
diff --git a/editors/sed.c b/editors/sed.c index 166e837da..3b0cebda6 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -79,12 +79,12 @@ | |||
79 | 79 | ||
80 | #include <stdio.h> | 80 | #include <stdio.h> |
81 | #include <unistd.h> /* for getopt() */ | 81 | #include <unistd.h> /* for getopt() */ |
82 | #include <regex.h> | ||
83 | #include <string.h> /* for strdup() */ | 82 | #include <string.h> /* for strdup() */ |
84 | #include <errno.h> | 83 | #include <errno.h> |
85 | #include <ctype.h> /* for isspace() */ | 84 | #include <ctype.h> /* for isspace() */ |
86 | #include <stdlib.h> | 85 | #include <stdlib.h> |
87 | #include "busybox.h" | 86 | #include "busybox.h" |
87 | #include "xregex.h" | ||
88 | 88 | ||
89 | typedef struct sed_cmd_s { | 89 | typedef struct sed_cmd_s { |
90 | /* Ordered by alignment requirements: currently 36 bytes on x86 */ | 90 | /* Ordered by alignment requirements: currently 36 bytes on x86 */ |
diff --git a/findutils/grep.c b/findutils/grep.c index e796294f3..a705df912 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -27,10 +27,10 @@ | |||
27 | #include <stdio.h> | 27 | #include <stdio.h> |
28 | #include <stdlib.h> | 28 | #include <stdlib.h> |
29 | #include <getopt.h> | 29 | #include <getopt.h> |
30 | #include <regex.h> | ||
31 | #include <string.h> | 30 | #include <string.h> |
32 | #include <errno.h> | 31 | #include <errno.h> |
33 | #include "busybox.h" | 32 | #include "busybox.h" |
33 | #include "xregex.h" | ||
34 | 34 | ||
35 | 35 | ||
36 | /* options */ | 36 | /* options */ |
diff --git a/include/libbb.h b/include/libbb.h index 024f33f76..71ba8feac 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <stdarg.h> | 29 | #include <stdarg.h> |
30 | #include <sys/stat.h> | 30 | #include <sys/stat.h> |
31 | #include <sys/types.h> | 31 | #include <sys/types.h> |
32 | #include <regex.h> | ||
33 | #include <termios.h> | 32 | #include <termios.h> |
34 | #include <stdint.h> | 33 | #include <stdint.h> |
35 | 34 | ||
@@ -476,7 +475,6 @@ extern void vfork_daemon_rexec(int nochdir, int noclose, | |||
476 | int argc, char **argv, char *foreground_opt); | 475 | int argc, char **argv, char *foreground_opt); |
477 | extern int get_terminal_width_height(int fd, int *width, int *height); | 476 | extern int get_terminal_width_height(int fd, int *width, int *height); |
478 | extern unsigned long get_ug_id(const char *s, long (*my_getxxnam)(const char *)); | 477 | extern unsigned long get_ug_id(const char *s, long (*my_getxxnam)(const char *)); |
479 | extern void xregcomp(regex_t *preg, const char *regex, int cflags); | ||
480 | 478 | ||
481 | #define HASH_SHA1 1 | 479 | #define HASH_SHA1 1 |
482 | #define HASH_MD5 2 | 480 | #define HASH_MD5 2 |
diff --git a/include/xregex.h b/include/xregex.h new file mode 100644 index 000000000..394ce3bae --- /dev/null +++ b/include/xregex.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Busybox xregcomp utility routine | ||
4 | * | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell | ||
21 | * Permission has been granted to redistribute this code under the GPL. | ||
22 | * | ||
23 | */ | ||
24 | #ifndef __BB_REGEX__ | ||
25 | #define __BB_REGEX__ | ||
26 | |||
27 | #include <sys/types.h> | ||
28 | #include <regex.h> | ||
29 | extern void xregcomp(regex_t *preg, const char *regex, int cflags); | ||
30 | |||
31 | #endif | ||
diff --git a/libbb/xregcomp.c b/libbb/xregcomp.c index fa6c0fa2b..c28ca659d 100644 --- a/libbb/xregcomp.c +++ b/libbb/xregcomp.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #include <stdio.h> | 24 | #include <stdio.h> |
25 | #include "libbb.h" | 25 | #include "libbb.h" |
26 | #include <regex.h> | 26 | #include "xregex.h" |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 24b91be5c..fb9c64375 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -49,8 +49,8 @@ | |||
49 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. | 49 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #include "libbb.h" | ||
53 | #include "busybox.h" | 52 | #include "busybox.h" |
53 | #include "xregex.h" | ||
54 | #include <unistd.h> | 54 | #include <unistd.h> |
55 | #include <stdio.h> | 55 | #include <stdio.h> |
56 | #include <stdlib.h> | 56 | #include <stdlib.h> |
@@ -68,7 +68,6 @@ | |||
68 | #include <fcntl.h> | 68 | #include <fcntl.h> |
69 | #include <syslog.h> | 69 | #include <syslog.h> |
70 | #include <signal.h> | 70 | #include <signal.h> |
71 | #include <regex.h> | ||
72 | #include <errno.h> | 71 | #include <errno.h> |
73 | #include <sys/sysmacros.h> | 72 | #include <sys/sysmacros.h> |
74 | 73 | ||