summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthorpej <thorpej@pkgsrc.org>2003-01-08 02:35:59 +0000
committerthorpej <thorpej@pkgsrc.org>2003-01-08 02:35:59 +0000
commitb89b6a95faaab57e0828c0e4b4acc10bd79d0410 (patch)
treed8aba6d1251df52716e35aa332d05193b94ef7c6
parent6df0e56b17a490622d9c81e6b437028ad0e1e520 (diff)
downloadpkgsrc-b89b6a95faaab57e0828c0e4b4acc10bd79d0410.tar.gz
#include statements in asm files that did not match the form:
#include "foo.h" ..or.. #include <foo.h> would cause mkid to happily loop forever. Fix this, making the scanner properly detect EOL/EOF and defined name tokens in #include statements, as well. Merge all libidu/scanners.c patches into a single patch file. Bump package revision to nb3.
-rw-r--r--devel/id-utils/Makefile4
-rw-r--r--devel/id-utils/distinfo5
-rw-r--r--devel/id-utils/patches/patch-ac223
-rw-r--r--devel/id-utils/patches/patch-aq209
4 files changed, 222 insertions, 219 deletions
diff --git a/devel/id-utils/Makefile b/devel/id-utils/Makefile
index a7258b71a75..f7650e8923d 100644
--- a/devel/id-utils/Makefile
+++ b/devel/id-utils/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.27 2002/11/30 23:21:36 salo Exp $
+# $NetBSD: Makefile,v 1.28 2003/01/08 02:35:59 thorpej Exp $
# FreeBSD Id: Makefile,v 1.4 1996/11/18 10:22:47 asami Exp
#
DISTNAME= id-utils-3.2
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=id-utils/}
diff --git a/devel/id-utils/distinfo b/devel/id-utils/distinfo
index 72f0f97bc87..2ee158f8959 100644
--- a/devel/id-utils/distinfo
+++ b/devel/id-utils/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.10 2002/06/21 12:26:32 lukem Exp $
+$NetBSD: distinfo,v 1.11 2003/01/08 02:35:59 thorpej Exp $
SHA1 (id-utils-3.2.tar.gz) = 14d96a2170745883d077fa8c436e4380f28951a5
Size (id-utils-3.2.tar.gz) = 388012 bytes
SHA1 (patch-aa) = 69cdce8f83d043ffabbec7639423e35a46a97175
SHA1 (patch-ab) = aee2109a3cce77022cf4611542130fadc3842063
-SHA1 (patch-ac) = 9d3f9004bdb5ae7b5b0bedd477cb060d416220be
+SHA1 (patch-ac) = 67667057c39e7c5df048f22d2291649280c4299a
SHA1 (patch-ad) = cd13aea19f0ac5dcdc8695ce40b409ecb15b1ec0
SHA1 (patch-ae) = 3c3d118779b18bd91e2cd3ff88c3b47ec3236396
SHA1 (patch-af) = 968b7ccaf20cda7afa781b043559e91bfb7e74d4
@@ -18,5 +18,4 @@ SHA1 (patch-am) = 137ffa727d505975b775c0a877f1ac9af9cf58a7
SHA1 (patch-an) = 6e300f1c175085fe4190e31a0f3673714b51585b
SHA1 (patch-ao) = 3fa01e9d9482695a1727a34eb8e3caf4f3572325
SHA1 (patch-ap) = 8bff727bc838b77ca6bcd859fc38803d0d8ca00c
-SHA1 (patch-aq) = 37c2fe7ca8948c2f959c77d4fea21a6ac2db0b8a
SHA1 (patch-ar) = b6249d63e76d77f1ddc29b74c8c896c42ed313f5
diff --git a/devel/id-utils/patches/patch-ac b/devel/id-utils/patches/patch-ac
index f33be0cf1bd..74be993e5ad 100644
--- a/devel/id-utils/patches/patch-ac
+++ b/devel/id-utils/patches/patch-ac
@@ -1,8 +1,28 @@
-$NetBSD: patch-ac,v 1.3 2002/01/31 13:49:21 mrg Exp $
+$NetBSD: patch-ac,v 1.4 2003/01/08 02:36:00 thorpej Exp $
---- libidu/scanners.c.orig Thu Jul 18 07:45:52 1996
-+++ libidu/scanners.c Fri Feb 1 00:20:36 2002
-@@ -65,8 +65,14 @@
+--- libidu/scanners.c.orig Tue Jan 7 18:24:27 2003
++++ libidu/scanners.c Tue Jan 7 18:24:29 2003
+@@ -44,6 +44,19 @@
+ extern void usage __P((void));
+ extern char *program_name;
+
++static char *id_0;
++static size_t id_0_len;
++#define APPEND_CHAR(C) do { \
++ if(id_0 == NULL || id == id_0 + id_0_len) { \
++ size_t __pos = id_0 ? id - id_0 : 0; \
++ id_0 = xrealloc(id_0, id_0_len + BUFSIZ); \
++ id_0_len += BUFSIZ; \
++ id = id_0 + __pos; \
++ } \
++ *id++ = (C); \
++ } while(0);
++
++
+ /****************************************************************************/
+
+ struct lang_args **parse_language_map_file __P((char const *file_name, struct lang_args **next_ptr));
+@@ -65,8 +78,14 @@
struct language languages_0[] =
{
{ "C", parse_args_c, get_token_c, help_me_c },
@@ -17,7 +37,138 @@ $NetBSD: patch-ac,v 1.3 2002/01/31 13:49:21 mrg Exp $
};
struct language const *languages_N = &languages_0[cardinalityof (languages_0)];
-@@ -906,7 +910,7 @@
+@@ -482,7 +501,6 @@
+ #define ARGS ((struct args_c const *) args)
+ static int new_line = 1;
+ unsigned short const *rct = &ARGS->ctype[1];
+- char id_0[BUFSIZ];
+ char *id = id_0;
+ int c;
+
+@@ -501,10 +519,10 @@
+ if (!ISID1ST (c))
+ goto next;
+ id = id_0;
+- *id++ = c;
++ APPEND_CHAR(c);
+ while (ISIDREST (c = getc (in_FILE)))
+- *id++ = c;
+- *id = '\0';
++ APPEND_CHAR(c);
++ APPEND_CHAR('\0');
+ if (strequ (id_0, "include"))
+ {
+ while (c == ' ' || c == '\t')
+@@ -520,7 +538,7 @@
+ c = getc (in_FILE);
+ while (c != '\n' && c != EOF && c != '"')
+ {
+- *id++ = c;
++ APPEND_CHAR(c);
+ c = getc (in_FILE);
+ }
+ *flags = TOK_STRING;
+@@ -530,16 +548,16 @@
+ c = getc (in_FILE);
+ while (c != '\n' && c != EOF && c != '>')
+ {
+- *id++ = c;
++ APPEND_CHAR(c);
+ c = getc (in_FILE);
+ }
+ *flags = TOK_STRING;
+ }
+ else if (ISID1ST (c))
+ {
+- *id++ = c;
++ APPEND_CHAR(c);
+ while (ISIDREST (c = getc (in_FILE)))
+- *id++ = c;
++ APPEND_CHAR(c);
+ *flags = TOK_NAME;
+ }
+ else
+@@ -574,14 +592,14 @@
+ {
+ case '"':
+ id = id_0;
+- *id++ = c = getc (in_FILE);
++ APPEND_CHAR(c = getc (in_FILE));
+ for (;;)
+ {
+ while (ISQ2BORING (c))
+- *id++ = c = getc (in_FILE);
++ APPEND_CHAR(c = getc (in_FILE));
+ if (c == '\\')
+ {
+- *id++ = c = getc (in_FILE);
++ APPEND_CHAR(c = getc (in_FILE));
+ continue;
+ }
+ else if (c != '"')
+@@ -662,18 +680,18 @@
+ return 0;
+ }
+ id = id_0;
+- *id++ = c;
++ APPEND_CHAR(c);
+ if (ISID1ST (c))
+ {
+ *flags = TOK_NAME;
+ while (ISIDREST (c = getc (in_FILE)))
+- *id++ = c;
++ APPEND_CHAR(c);
+ }
+ else if (ISDIGIT (c))
+ {
+ *flags = TOK_NUMBER;
+ while (ISNUMBER (c = getc (in_FILE)))
+- *id++ = c;
++ APPEND_CHAR(c);
+ }
+ else
+ {
+@@ -868,7 +886,6 @@
+ #define ARGS ((struct args_asm const *) args)
+ static int new_line = 1;
+ unsigned char const *rct = &ARGS->ctype[1];
+- char id_0[BUFSIZ];
+ char *id = id_0;
+ int c;
+
+@@ -886,18 +903,25 @@
+ if (!ISID1ST (c))
+ goto next;
+ id = id_0;
+- *id++ = c;
++ APPEND_CHAR(c);
+ while (ISIDREST (c = getc (in_FILE)))
+- *id++ = c;
+- *id = '\0';
++ APPEND_CHAR(c);
++ APPEND_CHAR('\0');
+ if (strequ (id_0, "include"))
+ {
+- while (c != '"' && c != '<')
++ while (c == ' ' || c == '\t')
+ c = getc (in_FILE);
++ if (c == '\n' || ISEOF(c))
++ {
++ new_line = 1;
++ goto top;
++ }
++ if (c != '"' && c != '<')
++ goto next;
+ id = id_0;
+- *id++ = c = getc (in_FILE);
++ APPEND_CHAR(c = getc (in_FILE));
+ while ((c = getc (in_FILE)) != '"' && c != '>')
+- *id++ = c;
++ APPEND_CHAR(c);
+ *flags = TOK_STRING;
+ obstack_grow0 (&tokens_obstack, id_0, id - id_0);
+ return (struct token *) obstack_finish (&tokens_obstack);
+@@ -906,7 +930,7 @@
|| strequ (id_0, "define")
|| strequ (id_0, "undef"))
goto next;
@@ -26,3 +177,65 @@ $NetBSD: patch-ac,v 1.3 2002/01/31 13:49:21 mrg Exp $
c = getc (in_FILE);
new_line = 1;
goto top;
+@@ -967,18 +991,18 @@
+ obstack_grow0 (&tokens_obstack, "_", 1);
+ return (struct token *) obstack_finish (&tokens_obstack);
+ }
+- *id++ = c;
++ APPEND_CHAR(c);
+ if (ISID1ST (c))
+ {
+ *flags = TOK_NAME;
+ while (ISIDREST (c = getc (in_FILE)))
+- *id++ = c;
++ APPEND_CHAR(c);
+ }
+ else if (ISNUMBER (c))
+ {
+ *flags = TOK_NUMBER;
+ while (ISNUMBER (c = getc (in_FILE)))
+- *id++ = c;
++ APPEND_CHAR(c);
+ }
+ else
+ {
+@@ -989,7 +1013,7 @@
+ goto next;
+ }
+
+- *id = '\0';
++ APPEND_CHAR('\0');
+ for (id = id_0; *id; id++)
+ if (ISIGNORE (*id))
+ goto next;
+@@ -1153,7 +1177,6 @@
+ get_token_text (FILE *in_FILE, void const *args, int *flags)
+ {
+ #define ARGS ((struct args_text const *) args)
+- static char id_0[BUFSIZ];
+ unsigned char const *rct = &ARGS->ctype[1];
+ int c;
+ char *id = id_0;
+@@ -1170,19 +1193,19 @@
+ return 0;
+ }
+ id = id_0;
+- *id++ = c;
++ APPEND_CHAR(c);
+ if (ISID1ST (c))
+ {
+ *flags = TOK_NAME;
+ while (ISIDREST (c = getc (in_FILE)))
+ if (!ISIDSQUEEZE (c))
+- *id++ = c;
++ APPEND_CHAR(c);
+ }
+ else if (ISNUMBER (c))
+ {
+ *flags = TOK_NUMBER;
+ while (ISNUMBER (c = getc (in_FILE)))
+- *id++ = c;
++ APPEND_CHAR(c);
+ }
+ else
+ {
diff --git a/devel/id-utils/patches/patch-aq b/devel/id-utils/patches/patch-aq
deleted file mode 100644
index 55fd271a743..00000000000
--- a/devel/id-utils/patches/patch-aq
+++ /dev/null
@@ -1,209 +0,0 @@
-$NetBSD: patch-aq,v 1.1 2002/04/03 16:26:58 joda Exp $
-
---- libidu/scanners.c~ Wed Apr 3 14:29:42 2002
-+++ libidu/scanners.c Wed Apr 3 14:37:59 2002
-@@ -44,6 +44,19 @@
- extern void usage __P((void));
- extern char *program_name;
-
-+static char *id_0;
-+static size_t id_0_len;
-+#define APPEND_CHAR(C) do { \
-+ if(id_0 == NULL || id == id_0 + id_0_len) { \
-+ size_t __pos = id_0 ? id - id_0 : 0; \
-+ id_0 = xrealloc(id_0, id_0_len + BUFSIZ); \
-+ id_0_len += BUFSIZ; \
-+ id = id_0 + __pos; \
-+ } \
-+ *id++ = (C); \
-+ } while(0);
-+
-+
- /****************************************************************************/
-
- struct lang_args **parse_language_map_file __P((char const *file_name, struct lang_args **next_ptr));
-@@ -488,7 +501,6 @@
- #define ARGS ((struct args_c const *) args)
- static int new_line = 1;
- unsigned short const *rct = &ARGS->ctype[1];
-- char id_0[BUFSIZ];
- char *id = id_0;
- int c;
-
-@@ -507,10 +519,10 @@
- if (!ISID1ST (c))
- goto next;
- id = id_0;
-- *id++ = c;
-+ APPEND_CHAR(c);
- while (ISIDREST (c = getc (in_FILE)))
-- *id++ = c;
-- *id = '\0';
-+ APPEND_CHAR(c);
-+ APPEND_CHAR('\0');
- if (strequ (id_0, "include"))
- {
- while (c == ' ' || c == '\t')
-@@ -526,7 +538,7 @@
- c = getc (in_FILE);
- while (c != '\n' && c != EOF && c != '"')
- {
-- *id++ = c;
-+ APPEND_CHAR(c);
- c = getc (in_FILE);
- }
- *flags = TOK_STRING;
-@@ -536,16 +548,16 @@
- c = getc (in_FILE);
- while (c != '\n' && c != EOF && c != '>')
- {
-- *id++ = c;
-+ APPEND_CHAR(c);
- c = getc (in_FILE);
- }
- *flags = TOK_STRING;
- }
- else if (ISID1ST (c))
- {
-- *id++ = c;
-+ APPEND_CHAR(c);
- while (ISIDREST (c = getc (in_FILE)))
-- *id++ = c;
-+ APPEND_CHAR(c);
- *flags = TOK_NAME;
- }
- else
-@@ -580,14 +592,14 @@
- {
- case '"':
- id = id_0;
-- *id++ = c = getc (in_FILE);
-+ APPEND_CHAR(c = getc (in_FILE));
- for (;;)
- {
- while (ISQ2BORING (c))
-- *id++ = c = getc (in_FILE);
-+ APPEND_CHAR(c = getc (in_FILE));
- if (c == '\\')
- {
-- *id++ = c = getc (in_FILE);
-+ APPEND_CHAR(c = getc (in_FILE));
- continue;
- }
- else if (c != '"')
-@@ -668,18 +680,18 @@
- return 0;
- }
- id = id_0;
-- *id++ = c;
-+ APPEND_CHAR(c);
- if (ISID1ST (c))
- {
- *flags = TOK_NAME;
- while (ISIDREST (c = getc (in_FILE)))
-- *id++ = c;
-+ APPEND_CHAR(c);
- }
- else if (ISDIGIT (c))
- {
- *flags = TOK_NUMBER;
- while (ISNUMBER (c = getc (in_FILE)))
-- *id++ = c;
-+ APPEND_CHAR(c);
- }
- else
- {
-@@ -874,7 +886,6 @@
- #define ARGS ((struct args_asm const *) args)
- static int new_line = 1;
- unsigned char const *rct = &ARGS->ctype[1];
-- char id_0[BUFSIZ];
- char *id = id_0;
- int c;
-
-@@ -892,18 +903,18 @@
- if (!ISID1ST (c))
- goto next;
- id = id_0;
-- *id++ = c;
-+ APPEND_CHAR(c);
- while (ISIDREST (c = getc (in_FILE)))
-- *id++ = c;
-- *id = '\0';
-+ APPEND_CHAR(c);
-+ APPEND_CHAR('\0');
- if (strequ (id_0, "include"))
- {
- while (c != '"' && c != '<')
- c = getc (in_FILE);
- id = id_0;
-- *id++ = c = getc (in_FILE);
-+ APPEND_CHAR(c = getc (in_FILE));
- while ((c = getc (in_FILE)) != '"' && c != '>')
-- *id++ = c;
-+ APPEND_CHAR(c);
- *flags = TOK_STRING;
- obstack_grow0 (&tokens_obstack, id_0, id - id_0);
- return (struct token *) obstack_finish (&tokens_obstack);
-@@ -973,18 +984,18 @@
- obstack_grow0 (&tokens_obstack, "_", 1);
- return (struct token *) obstack_finish (&tokens_obstack);
- }
-- *id++ = c;
-+ APPEND_CHAR(c);
- if (ISID1ST (c))
- {
- *flags = TOK_NAME;
- while (ISIDREST (c = getc (in_FILE)))
-- *id++ = c;
-+ APPEND_CHAR(c);
- }
- else if (ISNUMBER (c))
- {
- *flags = TOK_NUMBER;
- while (ISNUMBER (c = getc (in_FILE)))
-- *id++ = c;
-+ APPEND_CHAR(c);
- }
- else
- {
-@@ -995,7 +1006,7 @@
- goto next;
- }
-
-- *id = '\0';
-+ APPEND_CHAR('\0');
- for (id = id_0; *id; id++)
- if (ISIGNORE (*id))
- goto next;
-@@ -1159,7 +1170,6 @@
- get_token_text (FILE *in_FILE, void const *args, int *flags)
- {
- #define ARGS ((struct args_text const *) args)
-- static char id_0[BUFSIZ];
- unsigned char const *rct = &ARGS->ctype[1];
- int c;
- char *id = id_0;
-@@ -1176,19 +1186,19 @@
- return 0;
- }
- id = id_0;
-- *id++ = c;
-+ APPEND_CHAR(c);
- if (ISID1ST (c))
- {
- *flags = TOK_NAME;
- while (ISIDREST (c = getc (in_FILE)))
- if (!ISIDSQUEEZE (c))
-- *id++ = c;
-+ APPEND_CHAR(c);
- }
- else if (ISNUMBER (c))
- {
- *flags = TOK_NUMBER;
- while (ISNUMBER (c = getc (in_FILE)))
-- *id++ = c;
-+ APPEND_CHAR(c);
- }
- else
- {