Import upstream version 1.29
[debian/tar] / gnu / exclude.c
index e2eb34be7dd8cc432f3b613c8dd156eca53f395f..20dedf7e1b0142f546893d72cb8ae45a56b6188b 100644 (file)
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
 /* exclude.c -- exclude file names
 
-   Copyright (C) 1992-1994, 1997, 1999-2007, 2009-2014 Free Software
+   Copyright (C) 1992-1994, 1997, 1999-2007, 2009-2015 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -394,7 +392,7 @@ exclude_fnmatch (char const *pattern, char const *f, int options)
   return matched;
 }
 
-bool
+static bool
 exclude_patopts (struct patopts const *opts, char const *f)
 {
   int options = opts->options;
@@ -670,8 +668,8 @@ add_exclude_fp (void (*add_func) (struct exclude *, char const *, int, void *),
 static void
 call_addfn (struct exclude *ex, char const *pattern, int options, void *data)
 {
-  void (*addfn) (struct exclude *, char const *, int) = data;
-  addfn (ex, pattern, options);
+  void (**addfnptr) (struct exclude *, char const *, int) = data;
+  (*addfnptr) (ex, pattern, options);
 }
 
 int
@@ -688,7 +686,7 @@ add_exclude_file (void (*add_func) (struct exclude *, char const *, int),
   else if (! (in = fopen (file_name, "r")))
     return -1;
 
-  rc = add_exclude_fp (call_addfn, ex, in, options, line_end, add_func);
+  rc = add_exclude_fp (call_addfn, ex, in, options, line_end, &add_func);
 
   if (!use_stdin && fclose (in) != 0)
     rc = -1;