pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/generate Add (unsigned char) casts to ctype func...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9bacb28700ad
branches:  trunk
changeset: 485689:9bacb28700ad
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Sat Dec 18 19:05:54 2004 +0000

description:
Add (unsigned char) casts to ctype function arguments.

diffstat:

 devel/generate/distinfo         |    8 ++-
 devel/generate/patches/patch-aa |  127 ++++++++++++++++++++++++++++++++++++++++
 devel/generate/patches/patch-ab |   22 ++++++
 devel/generate/patches/patch-ac |   47 ++++++++++++++
 devel/generate/patches/patch-ad |   13 ++++
 devel/generate/patches/patch-ae |   40 ++++++++++++
 devel/generate/patches/patch-af |   31 +++++++++
 7 files changed, 287 insertions(+), 1 deletions(-)

diffs (truncated from 319 to 300 lines):

diff -r 4b9bcda13238 -r 9bacb28700ad devel/generate/distinfo
--- a/devel/generate/distinfo   Sat Dec 18 18:51:39 2004 +0000
+++ b/devel/generate/distinfo   Sat Dec 18 19:05:54 2004 +0000
@@ -1,4 +1,10 @@
-$NetBSD: distinfo,v 1.2 2004/11/09 21:32:59 darcy Exp $
+$NetBSD: distinfo,v 1.3 2004/12/18 19:05:54 minskim 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
diff -r 4b9bcda13238 -r 9bacb28700ad devel/generate/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/generate/patches/patch-aa   Sat Dec 18 19:05:54 2004 +0000
@@ -0,0 +1,127 @@
+$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 == '"')
diff -r 4b9bcda13238 -r 9bacb28700ad devel/generate/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/generate/patches/patch-ab   Sat Dec 18 19:05:54 2004 +0000
@@ -0,0 +1,22 @@
+$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);
+               
diff -r 4b9bcda13238 -r 9bacb28700ad devel/generate/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/generate/patches/patch-ac   Sat Dec 18 19:05:54 2004 +0000
@@ -0,0 +1,47 @@
+$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])
diff -r 4b9bcda13238 -r 9bacb28700ad devel/generate/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/generate/patches/patch-ad   Sat Dec 18 19:05:54 2004 +0000
@@ -0,0 +1,13 @@
+$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)
diff -r 4b9bcda13238 -r 9bacb28700ad devel/generate/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/generate/patches/patch-ae   Sat Dec 18 19:05:54 2004 +0000
@@ -0,0 +1,40 @@
+$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
+       {
diff -r 4b9bcda13238 -r 9bacb28700ad devel/generate/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/generate/patches/patch-af   Sat Dec 18 19:05:54 2004 +0000
@@ -0,0 +1,31 @@
+$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++;
+ 



Home | Main Index | Thread Index | Old Index