summaryrefslogtreecommitdiff
path: root/devel/id-utils
diff options
context:
space:
mode:
authorjoda <joda@pkgsrc.org>2002-04-03 16:26:54 +0000
committerjoda <joda@pkgsrc.org>2002-04-03 16:26:54 +0000
commit293ac01406a10538d9e0ea65f6ff912ced8f3844 (patch)
treecc45d15bd54731d6319e22db481bbcdfd5af8b7d /devel/id-utils
parentd362c2a8bf57be7e29a117f25123e84b1a45e94d (diff)
downloadpkgsrc-293ac01406a10538d9e0ea65f6ff912ced8f3844.tar.gz
don't limit symbol length to BUFSIZ, and similarly don't limit lid
line length to BUFSIZ; it should now be possible to index the mozilla source
Diffstat (limited to 'devel/id-utils')
-rw-r--r--devel/id-utils/distinfo4
-rw-r--r--devel/id-utils/patches/patch-aq209
-rw-r--r--devel/id-utils/patches/patch-ar47
3 files changed, 259 insertions, 1 deletions
diff --git a/devel/id-utils/distinfo b/devel/id-utils/distinfo
index c2b55324378..e1e289351c7 100644
--- a/devel/id-utils/distinfo
+++ b/devel/id-utils/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2002/03/01 01:38:47 jmc Exp $
+$NetBSD: distinfo,v 1.9 2002/04/03 16:26:54 joda Exp $
SHA1 (id-utils-3.2.tar.gz) = 14d96a2170745883d077fa8c436e4380f28951a5
Size (id-utils-3.2.tar.gz) = 388012 bytes
@@ -18,3 +18,5 @@ 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-aq b/devel/id-utils/patches/patch-aq
new file mode 100644
index 00000000000..55fd271a743
--- /dev/null
+++ b/devel/id-utils/patches/patch-aq
@@ -0,0 +1,209 @@
+$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
+ {
diff --git a/devel/id-utils/patches/patch-ar b/devel/id-utils/patches/patch-ar
new file mode 100644
index 00000000000..868074e41e5
--- /dev/null
+++ b/devel/id-utils/patches/patch-ar
@@ -0,0 +1,47 @@
+$NetBSD: patch-ar,v 1.1 2002/04/03 16:27:03 joda Exp $
+
+--- src/lid.c~ Wed Apr 3 15:02:41 2002
++++ src/lid.c Wed Apr 3 16:01:38 2002
+@@ -532,7 +532,8 @@
+ void
+ report_grep (char const *name, struct file_link **flinkv)
+ {
+- char line[BUFSIZ];
++ char *line = xmalloc(BUFSIZ);
++ size_t line_len = BUFSIZ;
+ char const *pattern = 0;
+ regex_t compiled;
+ int line_number;
+@@ -568,8 +569,14 @@
+ }
+
+ line_number = 0;
+- while (fgets (&line[1], sizeof (line) - 1, gid_FILE))
++ while (fgets (line + 1, line_len - 1, gid_FILE))
+ {
++ while(strlen(line) == line_len - 1 && line[line_len - 2] != '\n') {
++ line = xrealloc(line, line_len + BUFSIZ);
++ line_len += BUFSIZ;
++ if(fgets(line + strlen(line), BUFSIZ, gid_FILE) == NULL)
++ break;
++ }
+ line_number++;
+ if (pattern)
+ {
+@@ -585,6 +592,7 @@
+ }
+ fclose (gid_FILE);
+ }
++ free(line);
+ }
+
+ void
+@@ -1314,7 +1322,7 @@
+ continue;
+ }
+ /* march down both strings as long as we match */
+- while (*++name == *++line)
++ while (*name != '\0' && *++name == *++line)
+ ;
+ /* is this the end of `name', is there a word delimiter ?? */
+ if (*name == '\0' && !IS_ALNUM (*line))