autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.61a-319


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.61a-319-g7fb34e3
Date: Sat, 08 Dec 2007 10:40:19 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fb34e3eec4e64db248dc62bba8bf0e4af963750

The branch, master has been updated
       via  7fb34e3eec4e64db248dc62bba8bf0e4af963750 (commit)
      from  7d3ffc74fd0070640e67bb1f4659de1b7c1f6bc8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7fb34e3eec4e64db248dc62bba8bf0e4af963750
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Dec 8 11:39:34 2007 +0100

    Sync from Automake.
    
    * lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm,
    lib/Autom4te/Struct.pm, lib/Autom4te/XFile.pm: Likewise.
    * lib/Autom4te/FileUtils.pm (open_quote): New function.
    (update_file, contents): Use it.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                    |    6 ++++++
 lib/Autom4te/Channels.pm     |    6 +++---
 lib/Autom4te/Configure_ac.pm |    6 +++---
 lib/Autom4te/FileUtils.pm    |   40 +++++++++++++++++++++++++++++++++-------
 lib/Autom4te/Struct.pm       |    6 +++---
 lib/Autom4te/XFile.pm        |    8 ++++----
 6 files changed, 52 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5c59f9f..5d49b2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-12-08  Ralf Wildenhues  <address@hidden>
 
+       Sync from Automake.
+       * lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm,
+       lib/Autom4te/Struct.pm, lib/Autom4te/XFile.pm: Likewise.
+       * lib/Autom4te/FileUtils.pm (open_quote): New function.
+       (update_file, contents): Use it.
+
        * Makefile.am (autom4te-update): Rewrite for git.
 
 2007-12-04  Ralf Wildenhues  <address@hidden>
diff --git a/lib/Autom4te/Channels.pm b/lib/Autom4te/Channels.pm
index 9840a3a..7324f28 100644
--- a/lib/Autom4te/Channels.pm
+++ b/lib/Autom4te/Channels.pm
@@ -1,9 +1,9 @@
 # Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
 
-# This program is free software: you can redistribute it and/or modify
+# This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
 
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib/Autom4te/Configure_ac.pm b/lib/Autom4te/Configure_ac.pm
index 48a1d19..3ed65f4 100644
--- a/lib/Autom4te/Configure_ac.pm
+++ b/lib/Autom4te/Configure_ac.pm
@@ -1,9 +1,9 @@
 # Copyright (C) 2003, 2005, 2006  Free Software Foundation, Inc.
 
-# This program is free software: you can redistribute it and/or modify
+# This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
 
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
index 3c9c1ba..819a7c3 100644
--- a/lib/Autom4te/FileUtils.pm
+++ b/lib/Autom4te/FileUtils.pm
@@ -1,9 +1,9 @@
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2007  Free Software Foundation, Inc.
 
-# This program is free software: you can redistribute it and/or modify
+# This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
 
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -44,12 +44,38 @@ use Autom4te::ChannelDefs;
 use vars qw (@ISA @EXPORT);
 
 @ISA = qw (Exporter);
address@hidden = qw (&contents
address@hidden = qw (&open_quote &contents
              &find_file &mtime
              &update_file &up_to_date_p
              &xsystem &xqx &dir_has_case_matching_file &reset_dir_cache);
 
 
+=item C<open_quote ($file_name)>
+
+Quote C<$file_name> for open.
+
+=cut
+
+# $FILE_NAME
+# open_quote ($FILE_NAME)
+# -----------------------
+# If the string $S is a well-behaved file name, simply return it.
+# If it starts with white space, prepend `./', if it ends with
+# white space, add `\0'.  Return the new string.
+sub open_quote($)
+{
+  my ($s) = @_;
+  if ($s =~ m/^\s/)
+    {
+      $s = "./$s";
+    }
+  if ($s =~ m/\s$/)
+    {
+      $s = "$s\0";
+    }
+  return $s;
+}
+
 =item C<find_file ($file_name, @include)>
 
 Return the first path for a C<$file_name> in the C<include>s.
@@ -139,7 +165,7 @@ sub update_file ($$;$)
 
   if ($to eq '-')
     {
-      my $in = new IO::File ("$from");
+      my $in = new IO::File ("< " . open_quote ($from));
       my $out = new IO::File (">-");
       while ($_ = $in->getline)
        {
@@ -303,7 +329,7 @@ sub contents ($)
   my ($file) = @_;
   verb "reading $file";
   local $/;                    # Turn on slurp-mode.
-  my $f = new Autom4te::XFile "< $file";
+  my $f = new Autom4te::XFile "< " . open_quote ($file);
   my $contents = $f->getline;
   $f->close;
   return $contents;
diff --git a/lib/Autom4te/Struct.pm b/lib/Autom4te/Struct.pm
index 89c885c..2035719 100644
--- a/lib/Autom4te/Struct.pm
+++ b/lib/Autom4te/Struct.pm
@@ -1,10 +1,10 @@
 # autoconf -- create `configure' using m4 macros
 # Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
 
-# This program is free software: you can redistribute it and/or modify
+# This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
 
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib/Autom4te/XFile.pm b/lib/Autom4te/XFile.pm
index 55ff2a1..8d6e70a 100644
--- a/lib/Autom4te/XFile.pm
+++ b/lib/Autom4te/XFile.pm
@@ -1,9 +1,9 @@
 # Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
 
-# This program is free software: you can redistribute it and/or modify
+# This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
 
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -64,7 +64,7 @@ Autom4te::XFile - supply object methods for filehandles with 
error handling
 C<Autom4te::XFile> inherits from C<IO::File>.  It provides the method
 C<name> returning the file name.  It provides dying version of the
 methods C<close>, C<lock> (corresponding to C<flock>), C<new>,
-C<open>, C<seek>, and C<trunctate>.  It also overrides the C<getline>
+C<open>, C<seek>, and C<truncate>.  It also overrides the C<getline>
 and C<getlines> methods to translate C<\r\n> to C<\n>.
 
 =head1 SEE ALSO


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]