Some more patchelttes from Larry Doolittle.

This commit is contained in:
Mark Whitley
2001-05-24 21:31:09 +00:00
parent 0a4f578fdc
commit 8b7a0d807a
3 changed files with 17 additions and 4 deletions

View File

@@ -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++;
}