diff -rup id-utils-3.2d/ChangeLog id-utils-3.2d-egp2/ChangeLog
--- id-utils-3.2d/ChangeLog	Tue Apr  6 09:45:02 1999
+++ id-utils-3.2d-egp2/ChangeLog	Fri Jan 28 12:13:49 2000
@@ -1,3 +1,26 @@
+2000-01-28  Edouard G. Parmelan  <egp@free.fr>
+
+	* libidu/scanners.c (language_help_me): call lg_help_me() only one
+	time, even if there are multi entries for the same scanner.
+	(help_me_c): help is valide for C++ and Java languages too.
+	(set_defaut_language): save language name.
+	(parse_language_map): handle default language with saved default
+	language name.
+
+1999-12-03  Edouard G. Parmelan  <egp@free.fr>
+
+	* libidu/id-lang.map: add Java and Lisp-like
+	* libidu/scanners.c (set_ushort_ctype, clear_ushort_ctype,
+	set_uchar_ctype, clear_uchar_ctype): rewrite them to allow charset
+	in brakets.
+	(ctype_c): allow dot in numbers and add support for unsigned.
+	(get_token_c): improve ``keep contents of string''.
+	(get_token_lisp, parse_args_lisp, help_me_lisp): new Lisp like
+	scanner.
+	* src/lid.c (report_grep): handle long lines.
+	* src/mkid.c (assert_writeable): duplicate file name before call
+	dirname().
+
 1999-04-06  Greg McGary  <gkm@gnu.org>
 
 	* Version 3.2d released.
diff -rup id-utils-3.2d/libidu/id-lang.map id-utils-3.2d-egp2/libidu/id-lang.map
--- id-utils-3.2d/libidu/id-lang.map	Fri Apr 18 08:43:30 1997
+++ id-utils-3.2d-egp2/libidu/id-lang.map	Fri Jan 28 10:14:03 2000
@@ -52,6 +52,8 @@
 *.cpp			C++
 *.cxx			C++
 
+*.java			Java
+
 ChangeLog*		Cdoc
 
 *.[sS]			asm --comment=;
@@ -71,7 +73,10 @@ ChangeLog*		Cdoc
 # portable object (i18n)
 *.po			po
 
-*.el			elisp
+*.el			lisp
+*.elc			lisp
+*.lisp			lisp
+*.scm			lisp
 
 *.am			make
 Makefile		make
diff -rup id-utils-3.2d/libidu/scanners.c id-utils-3.2d-egp2/libidu/scanners.c
--- id-utils-3.2d/libidu/scanners.c	Mon Apr  5 11:08:44 1999
+++ id-utils-3.2d-egp2/libidu/scanners.c	Fri Jan 28 11:11:12 2000
@@ -36,7 +36,8 @@
 
 #define DEBUG(args) /* printf args */
 
-struct obstack lang_args_obstack;
+static struct obstack lang_args_obstack;
+static char const *lang_name_default = 0;
 struct lang_args *lang_args_default = 0;
 struct lang_args *lang_args_list = 0;
 struct obstack tokens_obstack;
@@ -63,12 +64,18 @@ static struct token *get_token_text __P(
 static void *parse_args_text __P((char **argv, int argc));
 static void help_me_text __P((void));
 
+static struct token *get_token_lisp __P((FILE *in_FILE, void const *args, int *flags));
+static void *parse_args_lisp __P((char **argv, int argc));
+static void help_me_lisp __P((void));
+
 struct language languages_0[] =
 {
   { "C", parse_args_c, get_token_c, help_me_c },
   { "C++", parse_args_c, get_token_c, help_me_c },
+  { "Java", parse_args_c, get_token_c, help_me_c },
   { "asm", parse_args_asm, get_token_asm, help_me_asm },
   { "text", parse_args_text, get_token_text, help_me_text },
+  { "lisp", parse_args_lisp, get_token_lisp, help_me_lisp },
 };
 struct language const *languages_N = &languages_0[cardinalityof (languages_0)];
 
@@ -78,8 +85,17 @@ language_help_me (void)
   struct language *lang;
   for (lang = languages_0; lang < languages_N; lang++)
     {
-      putchar ('\n');
-      (*lang->lg_help_me) ();
+      struct language *seen = languages_0;
+
+      while (seen->lg_help_me != lang->lg_help_me)
+	{
+	  seen++;
+	}
+      if (seen == lang)
+	{
+	  putchar ('\n');
+	  (*lang->lg_help_me) ();
+	}
     }
 }
 
@@ -132,6 +148,7 @@ int lang_args_index = 0;
 void
 set_default_language (char const *lang_name)
 {
+  lang_name_default = lang_name;
 }
 
 void
@@ -142,6 +159,21 @@ parse_language_map (char const *file_nam
   if (file_name == 0)
     file_name = LANGUAGE_MAP_FILE;
   parse_language_map_file (file_name, &lang_args_list);
+
+  if (lang_name_default)
+    {
+      struct lang_args *new_args;
+
+      new_args = OBSTACK_ALLOC (&lang_args_obstack, struct lang_args, 1);
+      if (new_args == 0)
+	error (1, 0, _("can't allocate language args: memory exhausted"));
+      new_args->la_pattern = obstack_copy0 (&lang_args_obstack, "**", 2);
+      new_args->la_args_string = 0;
+      new_args->la_next = 0;
+      new_args->la_language = get_language (lang_name_default);
+      new_args->la_args_digested = new_args->la_language->lg_parse_args (&new_args->la_args_string, 0);
+      lang_args_default = new_args;
+    }
 }
 
 struct lang_args **
@@ -297,51 +329,212 @@ tokenize_args_string (char *args_string,
   *argvp = REALLOC (argv_0, char *, *argcp);
 }
 
+
+static void _set_ushort_ctype __P((unsigned short *rct, char const *chars, int type, int not_set));
+static void _clear_ushort_ctype __P((unsigned short *rct, char const *chars, int type, int not_set));
+
+#define set_ushort_ctype(ctype, chars, type)	\
+	_set_ushort_ctype (((unsigned short *)(ctype)) + 1, chars, type, 0)
+#define clear_ushort_ctype(ctype, chars, type)	\
+	_clear_ushort_ctype (((unsigned short*)(ctype)) + 1, chars, type, 0)
+
 static void
-set_ushort_ctype (unsigned short *ctype, char const *chars, int type)
+_set_ushort_ctype (unsigned short *rct, char const *chars, int type, int not_set)
 {
-  unsigned short *rct = &ctype[1];
   unsigned char const *uc = (unsigned char const *) chars;
 
-  while (*uc)
+  if (!not_set)
+    {
+      if (*uc != '[')
+	{
+	  while (*uc)
+	    rct[*uc++] |= type;
+	  return;
+	}
+      if (*++uc == '^')
+	{
+	  int c;
+
+	  for (c = 0; c < 256; c++)
+	    rct[c] |= type;
+	  _clear_ushort_ctype (rct, uc + 1, type, 1);
+	  return;
+	}
+    }
+  if (*uc == ']')
+    rct[*uc++] |= type;
+  if (*uc == '-')
     rct[*uc++] |= type;
+  while (*uc && (*uc != ']'))
+    {
+      if (uc[1] == '-')
+	{
+	  int c;
+
+	  if (uc[2] == ']')
+	    break;
+	  for (c = (int) uc[0]; c <= (int) uc[2]; c++)
+	    rct[c] |= type;
+	  uc += 3;
+	}
+      else
+	rct[*uc++] |= type;
+
+    }
 }
 
 static void
-clear_ushort_ctype (unsigned short *ctype, char const *chars, int type)
+_clear_ushort_ctype (unsigned short *rct, char const *chars, int type, int not_set)
 {
-  unsigned short *rct = &ctype[1];
   unsigned char const *uc = (unsigned char const *) chars;
 
+  if (!not_set)
+    {
+      if (*uc != '[')
+	{
+	  while (*uc)
+	    rct[*uc++] &= ~type;
+	  return;
+	}
+      if (*++uc == '^')
+	{
+	  int c;
+
+	  for (c = 0; c < 256; c++)
+	    rct[c] &= ~type;
+	  _set_ushort_ctype (rct, uc + 1, type, 1);
+	  return;
+	}
+    }
+  if (*uc == ']')
+    rct[*uc++] &= ~type;
+  if (*uc == '-')
+    rct[*uc++] &= ~type;
+  while (*uc && (*uc != ']'))
+    {
+      if (uc[1] == '-')
+	{
+	  int c;
+
+	  if (uc[2] == ']')
+	    break;
+	  for (c = (int) uc[0]; c <= (int) uc[2]; c++)
+	    rct[c] &= ~type;
+	  uc += 3;
+	}
+      else
+	rct[*uc++] &= ~type;
+
+    }
   while (*uc)
     rct[*uc++] &= ~type;
 }
 
+static void _set_uchar_ctype __P((unsigned char *rct, char const *chars, int type, int not_set));
+static void _clear_uchar_ctype __P((unsigned char *rct, char const *chars, int type, int not_set));
+
+#define set_uchar_ctype(ctype, chars, type)	\
+	_set_uchar_ctype (((unsigned char *)(ctype)) + 1, chars, type, 0)
+#define clear_uchar_ctype(ctype, chars, type)	\
+	_clear_uchar_ctype (((unsigned char *)(ctype)) + 1, chars, type, 0)
+
 static void
-set_uchar_ctype (unsigned char *ctype, char const *chars, int type)
+_set_uchar_ctype (unsigned char *rct, char const *chars, int type, int not_set)
 {
-  unsigned char *rct = &ctype[1];
   unsigned char const *uc = (unsigned char const *) chars;
 
-  while (*uc)
+  if (!not_set)
+    {
+      if (*uc != '[')
+	{
+	  while (*uc)
+	    rct[*uc++] |= type;
+	  return;
+	}
+      if (*++uc == '^')
+	{
+	  int c;
+
+	  for (c = 0; c < 256; c++)
+	    rct[c] |= type;
+	  _clear_uchar_ctype (rct, uc + 1, type, 1);
+	  return;
+	}
+    }
+  if (*uc == ']')
+    rct[*uc++] |= type;
+  if (*uc == '-')
     rct[*uc++] |= type;
+  while (*uc && (*uc != ']'))
+    {
+      if (uc[1] == '-')
+	{
+	  int c;
+
+	  if (uc[2] == ']')
+	    break;
+	  for (c = (int) uc[0]; c <= (int) uc[2]; c++)
+	    rct[c] |= type;
+	  uc += 3;
+	}
+      else
+	rct[*uc++] |= type;
+
+    }
 }
 
 static void
-clear_uchar_ctype (unsigned char *ctype, char const *chars, int type)
+_clear_uchar_ctype (unsigned char *rct, char const *chars, int type, int not_set)
 {
-  unsigned char *rct = &ctype[1];
   unsigned char const *uc = (unsigned char const *) chars;
 
+  if (!not_set)
+    {
+      if (*uc != '[')
+	{
+	  while (*uc)
+	    rct[*uc++] &= ~type;
+	  return;
+	}
+      if (*++uc == '^')
+	{
+	  int c;
+
+	  for (c = 0; c < 256; c++)
+	    rct[c] &= ~type;
+	  _set_uchar_ctype (rct, uc + 1, type, 1);
+	  return;
+	}
+    }
+  if (*uc == ']')
+    rct[*uc++] &= ~type;
+  if (*uc == '-')
+    rct[*uc++] &= ~type;
+  while (*uc && (*uc != ']'))
+    {
+      if (uc[1] == '-')
+	{
+	  int c;
+
+	  if (uc[2] == ']')
+	    break;
+	  for (c = (int) uc[0]; c <= (int) uc[2]; c++)
+	    rct[c] &= ~type;
+	  uc += 3;
+	}
+      else
+	rct[*uc++] &= ~type;
+
+    }
   while (*uc)
     rct[*uc++] &= ~type;
 }
 
-/*************** C & C++ ****************************************************/
+/*************** C & C++ & Java *********************************************/
 
 #define I1	0x0001		/* 1st char of an identifier [a-zA-Z_] */
 #define DG	0x0002		/* decimal digit [0-9] */
-#define NM	0x0004		/* extra chars in a hex or long number [a-fA-FxXlL] */
+#define NM	0x0004		/* extra chars in a hex or long number [a-fA-FxXlLuU.] */
 #define C1	0x0008		/* C comment introduction char: / */
 #define C2	0x0010		/* C comment termination  char: * */
 #define Q1	0x0020		/* single quote: ' */
@@ -360,7 +553,7 @@ clear_uchar_ctype (unsigned char *ctype,
 #define ISEOF(c)	((rct)[c] & (EF))	/* EOF */
 #define ISID1ST(c)	((rct)[c] & (I1))	/* 1st char of an identifier */
 #define ISIDREST(c)	((rct)[c] & (I1|DG))	/* rest of an identifier */
-#define ISSTRKEEP(c)	((rct)[c] & (I1|DG|SK))	/* keep contents of string */
+#define ISSTRKEEP(c)	((rct)[c] & (SK))	/* keep contents of string */
 #define ISSPACE(c)	((rct)[c] & (WS))	/* white space character */
 
 /* The `BORING' classes should be skipped over until something
@@ -382,16 +575,16 @@ static unsigned short ctype_c[257] =
 /*020*/ 0,	0,	0,	0,	0,	0,	0,	0,
 /*030*/ 0,	0,	0,	0,	0,	0,	0,	0,
 /*040*/ 0,	0,	Q2,	0,	0,	0,	0,	Q1,
-/*050*/ 0,	0,	C2,	0,	0,	0,	0,	C1,
+/*050*/ 0,	0,	C2,	0,	0,	0,	NM,	C1,
 /*060*/ DG,	DG,	DG,	DG,	DG,	DG,	DG,	DG,
 /*070*/ DG,	DG,	0,	0,	0,	0,	0,	0,
 /*100*/ 0,	I1|NM,	I1|NM,	I1|NM,	I1|NM,	I1|NM,	I1|NM,	I1,
 /*110*/ I1,	I1,	I1,	I1,	I1|NM,	I1,	I1,	I1,
-/*120*/ I1,	I1,	I1,	I1,	I1,	I1,	I1,	I1,
+/*120*/ I1,	I1,	I1,	I1,	I1,	I1|NM,	I1,	I1,
 /*130*/ I1|NM,	I1,	I1,	0,	ES,	0,	0,	I1,
 /*140*/ 0,	I1|NM,	I1|NM,	I1|NM,	I1|NM,	I1|NM,	I1|NM,	I1,
 /*150*/ I1,	I1,	I1,	I1,	I1|NM,	I1,	I1,	I1,
-/*160*/ I1,	I1,	I1,	I1,	I1,	I1,	I1,	I1,
+/*160*/ I1,	I1,	I1,	I1,	I1,	I1|NM,	I1,	I1,
 /*170*/ I1|NM,	I1,	I1,	0,	0,	0,	0,	0,
   /* FIXME: latin-1 */
 };
@@ -416,7 +609,7 @@ static void
 help_me_c (void)
 {
   printf (_("\
-C language:\n\
+C, C++ and Java languages:\n\
   -k,--keep=CHARS        Allow CHARS in single-token strings, keep the result\n\
   -i,--ignore=CHARS      Allow CHARS in single-token strings, toss the result\n\
   -u,--strip-underscore  Strip a leading underscore from single-token strings\n\
@@ -587,36 +780,61 @@ next:
   switch (c)
     {
     case '"':
-      id = scanner_buffer;
-      *id++ = c = getc (in_FILE);
-      for (;;)
+      c = getc (in_FILE);
+      if (ISSTRKEEP(c))
 	{
-	  while (ISQ2BORING (c))
-	    *id++ = c = getc (in_FILE);
-	  if (c == '\\')
+ident_in_string:
+	  id = scanner_buffer;
+	  *id++ = c;
+	  for (;;)
 	    {
-	      *id++ = c = getc (in_FILE);
-	      continue;
-	    }
-	  else if (c != '"')
-	    goto next;
-	  break;
+	      while (ISQ2BORING (c) && ISSTRKEEP(c))
+		*id++ = c = getc (in_FILE);
+	      if (c == '\\')
+		{
+		  *id++ = c = getc (in_FILE);
+		  if (ISSTRKEEP('\\'))
+		    {
+		      c = getc (in_FILE);
+		      continue;
+		    }
+		  --id;
+		  ungetc ('"', in_FILE);
+		}
+	      else if (!ISSTRKEEP(c) && (c != '"'))
+		{
+		  ungetc (c, in_FILE);
+		  ungetc ('"', in_FILE);
+		}
+	      break;
+	  }
+	  *--id = '\0';
+	  *flags = TOK_STRING;
+	  if (ARGS->strip_underscore && scanner_buffer[0] == '_' && scanner_buffer[1])
+	    obstack_grow0 (&tokens_obstack, scanner_buffer + 1, id - scanner_buffer - 1);
+	  else
+	    obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer);
+	  return (struct token *) obstack_finish (&tokens_obstack);
 	}
-      *--id = '\0';
-      id = scanner_buffer;
-      while (ISSTRKEEP (*id))
-	id++;
-      if (*id || id == scanner_buffer)
+      else
 	{
-	  c = getc (in_FILE);
-	  goto next;
+	  for (;;)
+	    {
+	      while (ISQ2BORING (c) && !ISSTRKEEP(c))
+		c = getc (in_FILE);
+	      if (c == '\\')
+		{
+		  c = getc (in_FILE);
+		  c = getc (in_FILE);
+		  continue;
+		}
+	      else if (ISSTRKEEP(c) && (c != '"'))
+		goto ident_in_string;
+	      else if (c == '"')
+		c = getc(in_FILE);
+	      goto next;
+	    }
 	}
-      *flags = TOK_STRING;
-      if (ARGS->strip_underscore && scanner_buffer[0] == '_' && scanner_buffer[1])
-	obstack_grow0 (&tokens_obstack, scanner_buffer + 1, id - scanner_buffer - 1);
-      else
-	obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer);
-      return (struct token *) obstack_finish (&tokens_obstack);
 
     case '\'':
       c = getc (in_FILE);
@@ -1194,3 +1412,274 @@ top:
 #undef ISEOF
 #undef ISBORING
 #undef ISIDSQUEEZE
+
+
+
+/*************** Lisp *******************************************************/
+
+#define DIGIT			(1<<0)	/* [0-9] */
+#define LETTER			(1<<1)	/* [a-zA-Z] */
+#define IDENT0			(1<<2)	/* [!$%&*:/<=>?^_~] */
+#define IDENT		 	(1<<3)	/* [-+.@] */
+
+#define RADIX			(1<<4)	/* [bodxieBODXIE] */
+#define NUMBER			(1<<5)	/* [-@#.0-9a-fA-FesfdlESFDL] */
+
+#define is_DIGIT(c)	(ctype_lisp[c] & DIGIT)
+#define is_LETTER(c)	(ctype_lisp[c] & LETTER)
+#define is_IDENT0(c)	(ctype_lisp[c] & (LETTER | IDENT0))
+#define is_IDENT(c)	(ctype_lisp[c] & (LETTER | IDENT0 | DIGIT | IDENT))
+#define is_RADIX(c)	(ctype_lisp[c] & RADIX)
+#define is_NUMBER(c)	(ctype_lisp[c] & (RADIX | NUMBER))
+
+
+static unsigned char _ctype_lisp[257] = { 0, };
+static unsigned char *ctype_lisp = _ctype_lisp + 1;
+static int ctype_lisp_inited = 0;
+
+static void init_ctype_lisp (void)
+{
+  if (ctype_lisp_inited)
+    return;
+  ctype_lisp_inited = 1;
+
+  set_uchar_ctype (_ctype_lisp, "[0-9]", DIGIT);
+  set_uchar_ctype (_ctype_lisp, "[a-zA-Z]", LETTER);
+  set_uchar_ctype (_ctype_lisp, "[a-zA-Z!$%&*:/<=>?^_~]", IDENT0);
+  set_uchar_ctype (_ctype_lisp, "[-+.@]", IDENT);
+
+  set_uchar_ctype (_ctype_lisp, "[bodxieBODXIE]", RADIX);
+  set_uchar_ctype (_ctype_lisp, "[-@#.0-9a-fA-FesfdlESFDL]", NUMBER);
+}
+
+
+#if 0
+struct args_lisp
+{
+  unsigned char *ctype;
+};
+
+static struct args_lisp args_lisp = { };
+
+static struct option const long_options_lisp[] =
+{
+  { "comment", required_argument, 0, 'c' },
+  { "keep", required_argument, 0, 'k' },
+  { "ignore", required_argument, 0, 'i' },
+  { "strip-underscore", no_argument, 0, 'u' },
+  { "no-cpp", no_argument, 0, 'p' },
+  { 0 }
+};
+#endif
+
+static void
+help_me_lisp (void)
+{
+  printf (_("\
+Lisp language:\n\
+"));
+}
+
+static void *
+parse_args_lisp (char **argv, int argc)
+{
+  return NULL;
+}
+
+/* Grab the next identifier the assembly language source file. This
+   state machine is built for speed, not elegance.  */
+
+static struct token *
+get_token_lisp (FILE *in_FILE, void const *args, int *flags)
+{
+#define ARGS ( (struct args_lisp const *) args)
+  unsigned char *id = scanner_buffer;
+  int c;
+
+  if (!ctype_lisp_inited)
+    init_ctype_lisp ();
+  obstack_blank (&tokens_obstack, OFFSETOF_TOKEN_NAME);
+
+top:
+  c = getc (in_FILE);
+recheck:
+    switch (c)
+      {
+      case EOF:
+	obstack_free (&tokens_obstack, obstack_finish (&tokens_obstack));
+	return 0;
+
+      case '(': case ')':
+      case '\'': case '`':		/* quote, quasiquote */
+	goto top;
+
+      case ',':				/* unquote */
+	c = getc (in_FILE);
+	if (c == '@')			/* unquote-splicing */
+	  goto top;
+	goto recheck;
+
+      case ';':				/* comment */
+	do {
+	  c = getc (in_FILE);
+	} while ( (c != EOF) && (c != '\n'));
+	goto top;
+
+      case '"':				/* string with or without ansi-C escapes */
+      string:
+	do {
+	  c = getc (in_FILE);
+	  if (c == '\\')
+	    {
+	      c = getc (in_FILE);
+	      continue;
+	    }
+	} while ( (c != EOF) && (c != '"'));
+	goto top;
+    
+      case '.':
+      case '+': case '-':
+	id = scanner_buffer;
+	*id++ = c;
+	c = getc (in_FILE);
+	if (is_DIGIT (c) ||
+	    (scanner_buffer[0] != '.' && (c == '.' || c == 'i' || c == 'I')))
+	  goto number;
+	if (c != EOF)
+	  ungetc (c, in_FILE);
+	goto ident;
+
+      case '#':
+	id = scanner_buffer;
+	*id++ = c;
+
+	c = getc (in_FILE);
+	if (c == EOF)
+	  goto top;
+	else if (is_RADIX (c))
+	  goto number;
+	else if (c == '\\')	/* #\... literal Character */
+	  {
+	    *id++ = c;
+	    c = getc (in_FILE);
+	    *id++ = c;
+	    if (is_LETTER (c))
+	      {
+		while (is_LETTER (c = getc (in_FILE)))
+		  *id++ = c;
+		if (c != EOF)
+		  ungetc (c, in_FILE);
+	      }
+	    *flags = TOK_LITERAL;
+	    obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer);
+	    return (struct token *) obstack_finish (&tokens_obstack);
+	  }
+	else if (c == '(')	/* # (...) vector vi%) */
+	  goto top;
+	else if (c == '"')	/* #"..." Bigloo: string with ansi-C escape */
+	  goto string;
+	else if (c == '!')	/* #!... Kawa key/eof/null/... */
+	  {
+	    while (is_LETTER (c = getc (in_FILE)))
+	      *id++ = c;
+	    if (c != EOF)
+	      ungetc (c, in_FILE);
+	    *flags = TOK_LITERAL;
+	    obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer);
+	    return (struct token *) obstack_finish (&tokens_obstack);
+	  }
+	else if (c == '|')	/* #|...|# Guile/Kawa multi-lines comment */
+	  {
+	    do {
+	      c = getc (in_FILE);
+	      if (c == '|')
+		{
+		  while ( (c = getc (in_FILE)) == '|')
+		    ;
+		  if (c == '#')
+		    break;
+		}
+	    } while (c != EOF);
+	    goto top;
+	  }
+	else if (c == '@')	/* #@LENGTH ...^_ EMACS byte-code comment */
+	  {
+	    do {
+	      c = getc (in_FILE);
+	    } while ( (c != EOF) && (c != '\037'));
+	    goto top;
+	  }
+	else if (c == '[')	/* #[ ... ] EMACS byte-code object */
+	  goto top;
+	/* Ignore invalide #-construct */
+	goto top;
+
+      case '[': case ']':		/* EMACS vector aka # (...) in Scheme */
+	/* EMACS vector object vs Kawa ident */
+	/* rational: Kawa ident could not start with [ nor with ] */
+	goto top;
+
+      default:
+	if (is_IDENT0 (c))
+	  {
+	    id = scanner_buffer;
+	    *id++ = c;
+	ident:
+	    /* Emacs end-of-vector vs Kawa ident: allow [] as a part of an ident. */
+	    for (;;)
+	      {
+		while (is_IDENT (c = getc (in_FILE)))
+		  *id++ = c;
+		if (c == '[')
+		  {
+		    c = getc (in_FILE);
+		    if (c == ']')
+		      {
+			*id++ = '[';
+			*id++ = ']';
+			continue;
+		      }
+		    if (c != EOF)
+		      ungetc (c, in_FILE);
+		    ungetc ('[', in_FILE);
+		  }
+		break;
+	      }
+	    if (c != EOF)
+	      ungetc (c, in_FILE);
+	    *flags = TOK_NAME | TOK_LITERAL;
+	    obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer);
+	    return (struct token *) obstack_finish (&tokens_obstack);
+	  }
+	else if (is_DIGIT (c))
+	  {
+	    id = scanner_buffer;
+	number:
+	    *id++ = c;
+	    while (is_NUMBER (c = getc (in_FILE)))
+	      *id++ = c;
+	    if (c != EOF)
+	      ungetc (c, in_FILE);
+	    *flags = TOK_NUMBER | TOK_LITERAL;
+	    obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer);
+	    return (struct token *) obstack_finish (&tokens_obstack);
+	  }
+      }
+    goto top;
+	
+#undef ARGS
+}
+#undef DIGIT
+#undef LETTER
+#undef IDENT0
+#undef IDENT
+
+#undef RADIX
+#undef NUMBER
+
+#undef is_DIGIT
+#undef is_LETTER
+#undef is_IDENT0
+#undef is_IDENT
+#undef is_RADIX
+#undef is_NUMBER
diff -rup id-utils-3.2d/src/lid.c id-utils-3.2d-egp2/src/lid.c
--- id-utils-3.2d/src/lid.c	Sun Apr  4 22:34:03 1999
+++ id-utils-3.2d-egp2/src/lid.c	Fri Jan 28 10:02:40 2000
@@ -395,6 +395,8 @@ main (int argc, char **argv)
   argv += optind;
   if (argc == 0)
     {
+      /* strtok() in GNU libc 2 need a writable string to change
+	 the last \0 with a new one :( */
       static char dot[] = ".";
       static char *dotp = dot;
       argc = 1;
@@ -530,7 +532,8 @@ report_filenames (char const *name, stru
 void
 report_grep (char const *name, struct file_link **flinkv)
 {
-  char line[1<<020];
+  char *line;
+  int line_sz;
   char const *pattern = 0;
   regex_t compiled;
   char *file_name = ALLOCA (char, PATH_MAX);
@@ -551,6 +554,8 @@ report_grep (char const *name, struct fi
 	}
     }
 
+  line = ALLOCA(char, BUFSIZ);
+  line_sz = BUFSIZ;
   line[0] = ' ';		/* sentinel */
   while (*flinkv)
     {
@@ -565,8 +570,23 @@ report_grep (char const *name, struct fi
 	  continue;
 	}
 
-      while (fgets (line + 1, sizeof (line) - 1, gid_FILE))
+      while (fgets (line + 1, line_sz - 1, gid_FILE))
 	{
+	  if ((strlen (line) == line_sz - 1) && (line[line_sz - 2] != '\n'))
+	    {
+	      char *eol;
+
+	      /* read the full line */
+	      do {
+		eol = line;
+		line = ALLOCA (char, line_sz + BUFSIZ);
+		memcpy (line, eol, line_sz);
+		eol = line + line_sz - 1;
+		line_sz += BUFSIZ;
+		if (fgets (eol, BUFSIZ, gid_FILE) == NULL)
+		  break;
+	      } while ((strlen (eol) == BUFSIZ - 1) && (eol[BUFSIZ - 2] != '\n'));
+	    }
 	  line_number++;
 	  if (pattern)
 	    {
diff -rup id-utils-3.2d/src/mkid.c id-utils-3.2d-egp2/src/mkid.c
--- id-utils-3.2d/src/mkid.c	Tue Apr  6 09:40:41 1999
+++ id-utils-3.2d-egp2/src/mkid.c	Fri Jan 28 10:02:40 2000
@@ -262,6 +262,8 @@ main (int argc, char **argv)
   /* If no file or directory options exist, walk the current directory.  */
   if (argc == 0)
     {
+      /* strtok() in GNU libc 2 need a writable string to change
+	 the last \0 with a new one :( */
       static char dot[] = ".";
       static char *dotp = dot;
       argc = 1;
@@ -350,7 +352,14 @@ assert_writeable (char const *file_name)
     {
       if (errno == ENOENT)
 	{
-	  char const *dir_name = dirname (file_name);
+	  /* Under some system, dirname() sometimes places a null byte          
+	     in the path name after the next to last element, so the          
+	     content of path must be disposable.  */
+	  char *file_name2 = ALLOCA (char, strlen (file_name) + 1);
+	  char *dir_name;
+	  strcpy (file_name2, file_name);
+	  dir_name = dirname (file_name2);
+
 	  if (!dir_name || !*dir_name)
 	    dir_name = ".";
 	  if (access (dir_name, 06) < 0)
