summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Whitley2001-05-24 21:31:09 +0000
committerMark Whitley2001-05-24 21:31:09 +0000
commit8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14 (patch)
treea39a4d8d2cea7620c638b00392cec543e54e707d
parent0a4f578fdc867714e8e942add8700aa15bd80443 (diff)
downloadbusybox-8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14.zip
busybox-8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14.tar.gz
Some more patchelttes from Larry Doolittle.
-rw-r--r--coreutils/tr.c8
-rwxr-xr-xpristine_setup.sh5
-rw-r--r--tr.c8
3 files changed, 17 insertions, 4 deletions
diff --git a/coreutils/tr.c b/coreutils/tr.c
index ff0f331..07922af 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -33,7 +33,7 @@
static const int ASCII = 0377;
-/* some glabals shared across this file */
+/* some "globals" shared across this file */
static char com_fl, del_fl, sq_fl;
static short in_index, out_index;
/* 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,
}
}
+/* supported constructs:
+ * Ranges, e.g., [0-9] ==> 0123456789
+ * Escapes, e.g., \a ==> Control-G
+ */
static unsigned int expand(const char *arg, register unsigned char *buffer)
{
unsigned char *buffer_start = buffer;
@@ -110,7 +114,7 @@ static unsigned int expand(const char *arg, register unsigned char *buffer)
ac = *arg++;
while (i <= ac)
*buffer++ = i++;
- arg++; /* Skip ']' */
+ arg++; /* Skip the assumed ']' */
} else
*buffer++ = *arg++;
}
diff --git a/pristine_setup.sh b/pristine_setup.sh
index 62f3f30..9e638f9 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
cp $DIR/Config.h Config.h || exit
#mkdir -p pwd_grp
+if [ ! -r $DIR/sh.c ]; then
+ echo "Warning: no shell selected. You must make the symlink (sh.c to either"
+ echo "lash.c or hush.c) in $DIR, not here."
+fi
+
echo " "
echo "You may now type 'make' to build busybox in this directory"
echo "($PWD) using the pristine sources in $DIR"
diff --git a/tr.c b/tr.c
index ff0f331..07922af 100644
--- a/tr.c
+++ b/tr.c
@@ -33,7 +33,7 @@
static const int ASCII = 0377;
-/* some glabals shared across this file */
+/* some "globals" shared across this file */
static char com_fl, del_fl, sq_fl;
static short in_index, out_index;
/* 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,
}
}
+/* supported constructs:
+ * Ranges, e.g., [0-9] ==> 0123456789
+ * Escapes, e.g., \a ==> Control-G
+ */
static unsigned int expand(const char *arg, register unsigned char *buffer)
{
unsigned char *buffer_start = buffer;
@@ -110,7 +114,7 @@ static unsigned int expand(const char *arg, register unsigned char *buffer)
ac = *arg++;
while (i <= ac)
*buffer++ = i++;
- arg++; /* Skip ']' */
+ arg++; /* Skip the assumed ']' */
} else
*buffer++ = *arg++;
}