diff options
author | Mark Whitley <markw@lineo.com> | 2001-05-24 21:31:09 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2001-05-24 21:31:09 +0000 |
commit | 8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14 (patch) | |
tree | a39a4d8d2cea7620c638b00392cec543e54e707d | |
parent | 0a4f578fdc867714e8e942add8700aa15bd80443 (diff) | |
download | busybox-w32-8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14.tar.gz busybox-w32-8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14.tar.bz2 busybox-w32-8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14.zip |
Some more patchelttes from Larry Doolittle.
-rw-r--r-- | coreutils/tr.c | 8 | ||||
-rwxr-xr-x | pristine_setup.sh | 5 | ||||
-rw-r--r-- | tr.c | 8 |
3 files changed, 17 insertions, 4 deletions
diff --git a/coreutils/tr.c b/coreutils/tr.c index ff0f331ff..07922af17 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | static const int ASCII = 0377; | 34 | static const int ASCII = 0377; |
35 | 35 | ||
36 | /* some glabals shared across this file */ | 36 | /* some "globals" shared across this file */ |
37 | static char com_fl, del_fl, sq_fl; | 37 | static char com_fl, del_fl, sq_fl; |
38 | static short in_index, out_index; | 38 | static short in_index, out_index; |
39 | /* these last are pointers to static buffers declared in tr_main */ | 39 | /* these last are pointers to static buffers declared in tr_main */ |
@@ -90,6 +90,10 @@ static void map(register unsigned char *string1, unsigned int string1_len, | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | /* supported constructs: | ||
94 | * Ranges, e.g., [0-9] ==> 0123456789 | ||
95 | * Escapes, e.g., \a ==> Control-G | ||
96 | */ | ||
93 | static unsigned int expand(const char *arg, register unsigned char *buffer) | 97 | static unsigned int expand(const char *arg, register unsigned char *buffer) |
94 | { | 98 | { |
95 | unsigned char *buffer_start = buffer; | 99 | unsigned char *buffer_start = buffer; |
@@ -110,7 +114,7 @@ static unsigned int expand(const char *arg, register unsigned char *buffer) | |||
110 | ac = *arg++; | 114 | ac = *arg++; |
111 | while (i <= ac) | 115 | while (i <= ac) |
112 | *buffer++ = i++; | 116 | *buffer++ = i++; |
113 | arg++; /* Skip ']' */ | 117 | arg++; /* Skip the assumed ']' */ |
114 | } else | 118 | } else |
115 | *buffer++ = *arg++; | 119 | *buffer++ = *arg++; |
116 | } | 120 | } |
diff --git a/pristine_setup.sh b/pristine_setup.sh index 62f3f3075..9e638f96e 100755 --- a/pristine_setup.sh +++ b/pristine_setup.sh | |||
@@ -34,6 +34,11 @@ sed -e "s?BB_SRC_DIR =.*?BB_SRC_DIR = $DIR?" <$DIR/Makefile >Makefile || exit | |||
34 | cp $DIR/Config.h Config.h || exit | 34 | cp $DIR/Config.h Config.h || exit |
35 | #mkdir -p pwd_grp | 35 | #mkdir -p pwd_grp |
36 | 36 | ||
37 | if [ ! -r $DIR/sh.c ]; then | ||
38 | echo "Warning: no shell selected. You must make the symlink (sh.c to either" | ||
39 | echo "lash.c or hush.c) in $DIR, not here." | ||
40 | fi | ||
41 | |||
37 | echo " " | 42 | echo " " |
38 | echo "You may now type 'make' to build busybox in this directory" | 43 | echo "You may now type 'make' to build busybox in this directory" |
39 | echo "($PWD) using the pristine sources in $DIR" | 44 | echo "($PWD) using the pristine sources in $DIR" |
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | static const int ASCII = 0377; | 34 | static const int ASCII = 0377; |
35 | 35 | ||
36 | /* some glabals shared across this file */ | 36 | /* some "globals" shared across this file */ |
37 | static char com_fl, del_fl, sq_fl; | 37 | static char com_fl, del_fl, sq_fl; |
38 | static short in_index, out_index; | 38 | static short in_index, out_index; |
39 | /* these last are pointers to static buffers declared in tr_main */ | 39 | /* these last are pointers to static buffers declared in tr_main */ |
@@ -90,6 +90,10 @@ static void map(register unsigned char *string1, unsigned int string1_len, | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | /* supported constructs: | ||
94 | * Ranges, e.g., [0-9] ==> 0123456789 | ||
95 | * Escapes, e.g., \a ==> Control-G | ||
96 | */ | ||
93 | static unsigned int expand(const char *arg, register unsigned char *buffer) | 97 | static unsigned int expand(const char *arg, register unsigned char *buffer) |
94 | { | 98 | { |
95 | unsigned char *buffer_start = buffer; | 99 | unsigned char *buffer_start = buffer; |
@@ -110,7 +114,7 @@ static unsigned int expand(const char *arg, register unsigned char *buffer) | |||
110 | ac = *arg++; | 114 | ac = *arg++; |
111 | while (i <= ac) | 115 | while (i <= ac) |
112 | *buffer++ = i++; | 116 | *buffer++ = i++; |
113 | arg++; /* Skip ']' */ | 117 | arg++; /* Skip the assumed ']' */ |
114 | } else | 118 | } else |
115 | *buffer++ = *arg++; | 119 | *buffer++ = *arg++; |
116 | } | 120 | } |