pkgsrc/devel/idutils/patches/patch-ad
mef 00b0d75796 (pkgsrc)
- Add two patches, to avoid
   error: incompatible types when assigning to type '__off_t' from type 'fpos_t'
   fp_->_offset = u.f;
  - Remove one patch patch-af, which had a comment, not necessary for now
    " also look in *.mk files as makefiles.  bump pkg revision."
(upstream)
  - Update 4.2 to 4.6
    ----------------------
* Noteworthy changes in release 4.6 (2012-02-03) [stable]

** Bug fixes
  - lid -L no longer mishandles open-ended ranges like "..2" and "2.."
  - lid's -d, -o and -x options now work properly

* Noteworthy changes in release 4.5 (2010-06-17) [stable]
* Noteworthy changes in release 4.4 (2009-10-30) [beta]
                        ------------
** New features
  mkid and xtokid accept a new option --files0-from=FILE, to make them
  process only the files named in FILE.  FILE must contain a list of
  NUL-terminated file names.

** Bug fixes
  mkid and xtokid now accept language specific options via the command line.

* Noteworthy changes in release 4.3.92 (2008-10-18) [beta]
                        --------------
** Bug fixes

  fid: avoid a buffer overrun
  handle failed allocation, e.g., by strdup
  avoid potential realloc overflow
  mkid: avoid an infloop on some .el files
  all programs: detect write error on stdout

** Miscellaneous improvements

  revamp code and infrastructure, bringing it closer to coreutils' standards
  add automatically-generated man pages
  mkid recognize more suffixes: .ac, .mk, .bz2, .lzma.
  idutils is now licensed under the General Public License version 3
    or later (GPLv3+).
2014-12-15 11:35:42 +00:00

67 lines
2.4 KiB
Text

$NetBSD: patch-ad,v 1.2 2014/12/15 11:35:42 mef Exp $
More file types to support
--- libidu/scanners.c.orig 2014-11-20 22:55:49.000000000 +0900
+++ libidu/scanners.c 2014-11-20 23:00:17.000000000 +0900
@@ -77,11 +77,16 @@ static struct language languages_0[] =
{
{ "C", parse_args_c, get_token_c, help_me_c },
{ "C++", parse_args_c, get_token_c, help_me_cpp },
+ { "cpp", parse_args_c, get_token_c, help_me_cpp },
+ { "cc", parse_args_c, get_token_c, help_me_cpp },
{ "Java", parse_args_c, get_token_c, help_me_java },
{ "asm", parse_args_asm, get_token_asm, help_me_asm },
+ { "S", parse_args_asm, get_token_asm, help_me_asm },
+ { "s", parse_args_asm, get_token_asm, help_me_asm },
{ "text", parse_args_text, get_token_text, help_me_text },
{ "perl", parse_args_perl, get_token_perl, help_me_perl },
- { "lisp", parse_args_lisp, get_token_lisp, help_me_lisp }
+ { "lisp", parse_args_lisp, get_token_lisp, help_me_lisp },
+ { "make", parse_args_text, get_token_text, help_me_text }
};
static struct language const *languages_N
= &languages_0[cardinalityof (languages_0)];
@@ -1711,8 +1716,9 @@ get_token_lisp (FILE *in_FILE, void cons
{
while (is_LETTER (c = getc (in_FILE)))
*id++ = c;
- if (c != EOF)
- ungetc (c, in_FILE);
+ if (c == EOF)
+ goto out;
+ ungetc (c, in_FILE);
*flags = TOK_LITERAL;
obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer);
return (struct token *) obstack_finish (&tokens_obstack);
@@ -1729,13 +1735,17 @@ get_token_lisp (FILE *in_FILE, void cons
break;
}
} while (c != EOF);
+ if (c == EOF)
+ goto out;
goto top;
}
else if (c == '@') /* #@LENGTH ...^_ EMACS byte-code comment */
{
do {
c = getc (in_FILE);
- } while ( (c != EOF) && (c != '\037'));
+ if (c == EOF)
+ goto out;
+ } while (c != '\037');
goto top;
}
else if (c == '[') /* #[ ... ] EMACS byte-code object */
@@ -1787,8 +1797,9 @@ get_token_lisp (FILE *in_FILE, void cons
*id++ = c;
while (is_NUMBER (c = getc (in_FILE)))
*id++ = c;
- if (c != EOF)
- ungetc (c, in_FILE);
+ if (c == EOF)
+ goto out;
+ 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);