mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
Some more patchelttes from Larry Doolittle.
This commit is contained in:
parent
0a4f578fdc
commit
8b7a0d807a
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
static const int ASCII = 0377;
|
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 char com_fl, del_fl, sq_fl;
|
||||||
static short in_index, out_index;
|
static short in_index, out_index;
|
||||||
/* these last are pointers to static buffers declared in tr_main */
|
/* 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)
|
static unsigned int expand(const char *arg, register unsigned char *buffer)
|
||||||
{
|
{
|
||||||
unsigned char *buffer_start = buffer;
|
unsigned char *buffer_start = buffer;
|
||||||
@ -110,7 +114,7 @@ static unsigned int expand(const char *arg, register unsigned char *buffer)
|
|||||||
ac = *arg++;
|
ac = *arg++;
|
||||||
while (i <= ac)
|
while (i <= ac)
|
||||||
*buffer++ = i++;
|
*buffer++ = i++;
|
||||||
arg++; /* Skip ']' */
|
arg++; /* Skip the assumed ']' */
|
||||||
} else
|
} else
|
||||||
*buffer++ = *arg++;
|
*buffer++ = *arg++;
|
||||||
}
|
}
|
||||||
|
@ -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
|
cp $DIR/Config.h Config.h || exit
|
||||||
#mkdir -p pwd_grp
|
#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 " "
|
||||||
echo "You may now type 'make' to build busybox in this directory"
|
echo "You may now type 'make' to build busybox in this directory"
|
||||||
echo "($PWD) using the pristine sources in $DIR"
|
echo "($PWD) using the pristine sources in $DIR"
|
||||||
|
8
tr.c
8
tr.c
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
static const int ASCII = 0377;
|
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 char com_fl, del_fl, sq_fl;
|
||||||
static short in_index, out_index;
|
static short in_index, out_index;
|
||||||
/* these last are pointers to static buffers declared in tr_main */
|
/* 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)
|
static unsigned int expand(const char *arg, register unsigned char *buffer)
|
||||||
{
|
{
|
||||||
unsigned char *buffer_start = buffer;
|
unsigned char *buffer_start = buffer;
|
||||||
@ -110,7 +114,7 @@ static unsigned int expand(const char *arg, register unsigned char *buffer)
|
|||||||
ac = *arg++;
|
ac = *arg++;
|
||||||
while (i <= ac)
|
while (i <= ac)
|
||||||
*buffer++ = i++;
|
*buffer++ = i++;
|
||||||
arg++; /* Skip ']' */
|
arg++; /* Skip the assumed ']' */
|
||||||
} else
|
} else
|
||||||
*buffer++ = *arg++;
|
*buffer++ = *arg++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user