Update to version 2.2.
Major changes are: - Add casts to prevent compiler warnings. - Allow for more than 10 positional parameters.
This commit is contained in:
parent
ae8d8df80d
commit
c37074d89f
8 changed files with 5 additions and 291 deletions
|
@ -1,7 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.2 2004/11/09 21:32:59 darcy Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2005/01/04 13:29:08 darcy Exp $
|
||||
#
|
||||
|
||||
DISTNAME= generate-2.1
|
||||
DISTNAME= generate-2.2
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ftp://ftp.druid.net/pub/distrib/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.3 2004/12/18 19:05:54 minskim Exp $
|
||||
$NetBSD: distinfo,v 1.4 2005/01/04 13:29:08 darcy Exp $
|
||||
|
||||
SHA1 (generate-2.1.tgz) = 36f6a0088e01a067ea13f87cfdc186589479262b
|
||||
Size (generate-2.1.tgz) = 28471 bytes
|
||||
SHA1 (patch-aa) = 2681a9f31a6c6de2b33bfe90c8c7a87b58ac0072
|
||||
SHA1 (patch-ab) = 355d4c7e8421afb73c184b488b17de8d2e2c99d8
|
||||
SHA1 (patch-ac) = 9e6266c4b71b3f681c45dff7ba70a3f601cc136e
|
||||
SHA1 (patch-ad) = dbac0ca4aee6fc217d3002690f5d2d7b0d2f07cb
|
||||
SHA1 (patch-ae) = c1609b29b510cabc1461b306b67977a94ee3fcf5
|
||||
SHA1 (patch-af) = 600bdb35f83f243b02e16ecf894dd685147597a4
|
||||
SHA1 (generate-2.2.tgz) = fbd17b29226f683edc80f96b660c3e74fbec05c9
|
||||
Size (generate-2.2.tgz) = 28661 bytes
|
||||
|
|
|
@ -1,127 +0,0 @@
|
|||
$NetBSD: patch-aa,v 1.1 2004/12/18 19:05:54 minskim Exp $
|
||||
|
||||
--- generate.c.orig 2004-11-09 14:16:42.000000000 -0600
|
||||
+++ generate.c
|
||||
@@ -337,7 +337,7 @@ replace_macro(const char *src, char *dst
|
||||
for (k = 0; k < 10; k++)
|
||||
param[k] = "";
|
||||
|
||||
- if (isdigit(*buf))
|
||||
+ if (isdigit((unsigned char)*buf))
|
||||
{
|
||||
if (buf[1] && buf[1] != ':')
|
||||
fatal("Invalid macro call");
|
||||
@@ -380,25 +380,25 @@ replace_macro(const char *src, char *dst
|
||||
|
||||
for (ptr = calcbuf; *ptr;)
|
||||
{
|
||||
- while (isspace(*ptr))
|
||||
+ while (isspace((unsigned char)*ptr))
|
||||
ptr++;
|
||||
|
||||
- if (!isdigit(*ptr))
|
||||
+ if (!isdigit((unsigned char)*ptr))
|
||||
fatal("Invalid digit");
|
||||
|
||||
num = strtol(ptr, &ptr, 0);
|
||||
|
||||
- while (isspace(*ptr))
|
||||
+ while (isspace((unsigned char)*ptr))
|
||||
ptr++;
|
||||
|
||||
if (*ptr == '-')
|
||||
{
|
||||
ptr++;
|
||||
|
||||
- while (isspace(*ptr))
|
||||
+ while (isspace((unsigned char)*ptr))
|
||||
ptr++;
|
||||
|
||||
- if (!isdigit(*ptr))
|
||||
+ if (!isdigit((unsigned char)*ptr))
|
||||
fatal("Invalid expression");
|
||||
|
||||
to = strtol(ptr, &ptr, 0);
|
||||
@@ -429,7 +429,7 @@ replace_macro(const char *src, char *dst
|
||||
|
||||
replace_macro(buf + 2, calcbuf, pre_param);
|
||||
e1 = calcbuf;
|
||||
- while (isspace(*e1))
|
||||
+ while (isspace((unsigned char)*e1))
|
||||
e1++;
|
||||
|
||||
e2 = e1;
|
||||
@@ -443,7 +443,7 @@ replace_macro(const char *src, char *dst
|
||||
|
||||
if (*e2)
|
||||
(*e2++ = 0);
|
||||
- while (isspace(*e2))
|
||||
+ while (isspace((unsigned char)*e2))
|
||||
e2++;
|
||||
|
||||
e3 = e2;
|
||||
@@ -475,7 +475,7 @@ replace_macro(const char *src, char *dst
|
||||
{
|
||||
*p++ = 0;
|
||||
|
||||
- while (isspace(*p))
|
||||
+ while (isspace((unsigned char)*p))
|
||||
p++;
|
||||
|
||||
param[k++] = p;
|
||||
@@ -737,10 +737,10 @@ find_key(char *s)
|
||||
else
|
||||
return (-1);
|
||||
|
||||
- if (*p && !isspace(*p))
|
||||
+ if (*p && !isspace((unsigned char)*p))
|
||||
return (-1);
|
||||
|
||||
- while (isspace(*p))
|
||||
+ while (isspace((unsigned char)*p))
|
||||
p++;
|
||||
|
||||
strcpy(s, p);
|
||||
@@ -769,13 +769,13 @@ make_path(char *p)
|
||||
static char *
|
||||
split_line(char *s)
|
||||
{
|
||||
- while (*s && !isspace(*s))
|
||||
+ while (*s && !isspace((unsigned char)*s))
|
||||
s++;
|
||||
|
||||
if (*s)
|
||||
*s++ = 0;
|
||||
|
||||
- while (isspace(*s))
|
||||
+ while (isspace((unsigned char)*s))
|
||||
s++;
|
||||
|
||||
return (s);
|
||||
@@ -822,7 +822,7 @@ get_input(FILE * in_fp, int if_flag)
|
||||
p = pp;
|
||||
sprintf(cur_line_str, "%d", xline);
|
||||
|
||||
- while (isspace(*p))
|
||||
+ while (isspace((unsigned char)*p))
|
||||
p++;
|
||||
|
||||
if (!*p)
|
||||
@@ -842,7 +842,7 @@ get_input(FILE * in_fp, int if_flag)
|
||||
}
|
||||
|
||||
/* undocumented - probably unneeded */
|
||||
- if (!p[1] || isspace(p[1])) /* comment */
|
||||
+ if (!p[1] || isspace((unsigned char)p[1])) /* comment */
|
||||
continue;
|
||||
|
||||
if ((cmd = find_key(p)) == AT_ENDIF)
|
||||
@@ -1129,7 +1129,7 @@ get_input(FILE * in_fp, int if_flag)
|
||||
|
||||
for (; *p; p = q)
|
||||
{
|
||||
- while (*p && isspace(*p))
|
||||
+ while (*p && isspace((unsigned char)*p))
|
||||
p++;
|
||||
|
||||
if (*p == '\'' || *p == '"')
|
|
@ -1,22 +0,0 @@
|
|||
$NetBSD: patch-ab,v 1.1 2004/12/18 19:05:54 minskim Exp $
|
||||
|
||||
--- expr.c.orig 2004-11-09 14:16:42.000000000 -0600
|
||||
+++ expr.c
|
||||
@@ -47,7 +47,7 @@ nexttoken(void)
|
||||
|
||||
/* just in case */
|
||||
if (p)
|
||||
- while (isspace(*p))
|
||||
+ while (isspace((unsigned char)*p))
|
||||
p++;
|
||||
|
||||
if ((!p || !*p) && (p = xstrtok(&x)) == NULL)
|
||||
@@ -56,7 +56,7 @@ nexttoken(void)
|
||||
return;
|
||||
}
|
||||
|
||||
- if ((*p == '-' && isdigit(p[1])) || isdigit(*p))
|
||||
+ if ((*p == '-' && isdigit((unsigned char)p[1])) || isdigit((unsigned char)*p))
|
||||
{
|
||||
tokval = strtol(p, &p, 0);
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
$NetBSD: patch-ac,v 1.1 2004/12/18 19:05:54 minskim Exp $
|
||||
|
||||
--- getarg.c.orig 2004-11-09 14:16:42.000000000 -0600
|
||||
+++ getarg.c
|
||||
@@ -330,7 +330,7 @@ initargs(const char *env_str)
|
||||
int j = 0;
|
||||
|
||||
/* skip leading space */
|
||||
- while (isspace(*env_str))
|
||||
+ while (isspace((unsigned char)*env_str))
|
||||
env_str++;
|
||||
|
||||
/* trivial case */
|
||||
@@ -364,13 +364,13 @@ initargs(const char *env_str)
|
||||
}
|
||||
|
||||
/* space is end of string */
|
||||
- if (isspace(*env_str))
|
||||
+ if (isspace((unsigned char)*env_str))
|
||||
{
|
||||
*p++ = 0;
|
||||
env_args[++j] = p;
|
||||
|
||||
/* skip white space */
|
||||
- while (*env_str && isspace(*env_str))
|
||||
+ while (*env_str && isspace((unsigned char)*env_str))
|
||||
env_str++;
|
||||
}
|
||||
else if (*env_str == '\\')
|
||||
@@ -518,7 +518,7 @@ getarg(const char *opts)
|
||||
/* Note the following code does not allow leading
|
||||
spaces or all spaces in an argument */
|
||||
|
||||
- while (isspace(pargv[xoptind][++sp]))
|
||||
+ while (isspace((unsigned char)pargv[xoptind][++sp]))
|
||||
;
|
||||
|
||||
if(pargv[xoptind][sp])
|
||||
@@ -536,7 +536,7 @@ getarg(const char *opts)
|
||||
}
|
||||
else if (*cp == ';')
|
||||
{
|
||||
- while (isspace(pargv[xoptind][++sp]))
|
||||
+ while (isspace((unsigned char)pargv[xoptind][++sp]))
|
||||
;
|
||||
|
||||
if (pargv[xoptind][sp])
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-ad,v 1.1 2004/12/18 19:05:54 minskim Exp $
|
||||
|
||||
--- getline.c.orig 2004-11-09 14:16:42.000000000 -0600
|
||||
+++ getline.c
|
||||
@@ -197,7 +197,7 @@ getline(INPUT_STREAM fp, char *buf)
|
||||
(*linenum)++; /* keep track of current line */
|
||||
|
||||
/* lose trailing spaces */
|
||||
- for (i++; i && isspace(buf[i - 1]); i--)
|
||||
+ for (i++; i && isspace((unsigned char)buf[i - 1]); i--)
|
||||
buf[i - 1] = 0;
|
||||
|
||||
if (i)
|
|
@ -1,40 +0,0 @@
|
|||
$NetBSD: patch-ae,v 1.1 2004/12/18 19:05:54 minskim Exp $
|
||||
|
||||
--- sockunix.c.orig 2004-11-09 14:16:42.000000000 -0600
|
||||
+++ sockunix.c
|
||||
@@ -34,7 +34,7 @@ sock_open(const char *str, const char *m
|
||||
char buf[MAXDNAME], *p;
|
||||
|
||||
/* just in case */
|
||||
- while (isspace(*str))
|
||||
+ while (isspace((unsigned char)*str))
|
||||
str++;
|
||||
|
||||
/* prevent buffer overrun */
|
||||
@@ -45,7 +45,7 @@ sock_open(const char *str, const char *m
|
||||
strcpy(buf, str);
|
||||
|
||||
/* there should be no spaces in the spec */
|
||||
- for (p = buf; *p && !isspace(*p); p++)
|
||||
+ for (p = buf; *p && !isspace((unsigned char)*p); p++)
|
||||
;
|
||||
|
||||
*p = 0;
|
||||
@@ -64,7 +64,7 @@ sock_open(const char *str, const char *m
|
||||
|
||||
/* nowadays one can find domains starting with digits so this gets
|
||||
a little trickier than it used to */
|
||||
- for (; *p && (*p == '.' || isdigit(*p)); p++)
|
||||
+ for (; *p && (*p == '.' || isdigit((unsigned char)*p)); p++)
|
||||
;
|
||||
|
||||
/* if p is pointing at zero byte then it's a dotted IP address */
|
||||
@@ -89,7 +89,7 @@ sock_open(const char *str, const char *m
|
||||
}
|
||||
|
||||
/* get TCP port number */
|
||||
- if (isdigit(service[0]))
|
||||
+ if (isdigit((unsigned char)service[0]))
|
||||
sock_in.sin_port = strtol(service, NULL, 0);
|
||||
else
|
||||
{
|
|
@ -1,31 +0,0 @@
|
|||
$NetBSD: patch-af,v 1.1 2004/12/18 19:05:54 minskim Exp $
|
||||
|
||||
--- xstrtok.c.orig 2004-11-09 14:16:42.000000000 -0600
|
||||
+++ xstrtok.c
|
||||
@@ -55,7 +55,7 @@ xstrtok(XSTRTOK *xinfo)
|
||||
|
||||
/* special case for space delimiter */
|
||||
if (*xinfo->delim == ' ')
|
||||
- while (isspace(*scan))
|
||||
+ while (isspace((unsigned char)*scan))
|
||||
scan++;
|
||||
|
||||
/* are we finished with the line? */
|
||||
@@ -85,7 +85,7 @@ xstrtok(XSTRTOK *xinfo)
|
||||
for (dscan = xinfo->delim; *dscan != '\0';) /* increment is in body */
|
||||
{
|
||||
/* have we found a delimiter? */
|
||||
- if ((*xinfo->delim == ' ' && isspace(*scan)) || *scan == *dscan++)
|
||||
+ if ((*xinfo->delim == ' ' && isspace((unsigned char)*scan)) || *scan == *dscan++)
|
||||
{
|
||||
xinfo->scanpoint = scan + 1; /* point to next character */
|
||||
*scan = '\0'; /* terminate the token */
|
||||
@@ -112,7 +112,7 @@ xstrtok(XSTRTOK *xinfo)
|
||||
for (dscan = xinfo->delim; *dscan != '\0';) /* increment is in body */
|
||||
{
|
||||
/* have we found a delimiter? */
|
||||
- if ((*xinfo->delim == ' ' && isspace(*scan)) || *scan == *dscan++)
|
||||
+ if ((*xinfo->delim == ' ' && isspace((unsigned char)*scan)) || *scan == *dscan++)
|
||||
{
|
||||
xinfo->scanpoint = scan + 1; /* point to next character */
|
||||
*scan = '\0'; /* terminate the token */
|
Loading…
Reference in a new issue