]> code.delx.au - gnu-emacs/commitdiff
automatically generated from GPLed version
authorPaul Eggert <eggert@twinsun.com>
Tue, 27 May 1997 03:15:29 +0000 (03:15 +0000)
committerPaul Eggert <eggert@twinsun.com>
Tue, 27 May 1997 03:15:29 +0000 (03:15 +0000)
lib-src/getopt.c
lib-src/getopt.h
lib-src/getopt1.c
src/strftime.c

index 19f3f0565921089c21c78ba2d26772a390b7d790..f622fc375ee37c7c4176de05407fe72e61f3542d 100644 (file)
@@ -6,25 +6,23 @@
    Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
        Free Software Foundation, Inc.
 
-   the C library, however.  The master source lives in /gd/gnu/lib.
-
-NOTE: The canonical source of this file is maintained with the GNU C Library.
-Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-
-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 2, 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
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.  */
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+   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 2, 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
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
 \f
 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
    Ditto for AIX 3.2 and <stdlib.h>.  */
index c4549243230faf938e75b9666ebbe3355302ba50..062bb87cfe583f7faadaf5eb834edc67950ff450 100644 (file)
@@ -1,25 +1,23 @@
 /* Declarations for getopt.
    Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
 
-   the C library, however.  The master source lives in /gd/gnu/lib.
-
-NOTE: The canonical source of this file is maintained with the GNU C Library.
-Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-
-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 2, 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
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.  */
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+   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 2, 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
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
 
 #ifndef _GETOPT_H
 #define _GETOPT_H 1
index b51be7f1bc3e6660403419a33aed5c97a01292ce..af8e681965740e72dbfd83c6238e705c94ffc964 100644 (file)
@@ -1,25 +1,23 @@
 /* getopt_long and getopt_long_only entry points for GNU getopt.
    Copyright (C) 1987,88,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
 
-   the C library, however.  The master source lives in /gd/gnu/lib.
-
-NOTE: The canonical source of this file is maintained with the GNU C Library.
-Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-
-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 2, 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
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.  */
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+   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 2, 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
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
 \f
 #ifdef HAVE_CONFIG_H
 #include <config.h>
index c0cc077b072611b71ece102899cd755f77044ac6..abd039f5b24983d9e9393f5a8bf4e05fb927de2a 100644 (file)
@@ -177,6 +177,7 @@ localtime_r (t, tp)
 /* Some systems lack the `memset' function and we don't want to
    introduce additional dependencies.  */
 static const char spaces[16] = "                ";
+static const char zeroes[16] = "0000000000000000";
 
 # define memset_space(P, Len) \
   do {                                                                       \
@@ -191,11 +192,26 @@ static const char spaces[16] = "                ";
       }                                                                              \
     while (_len > 0);                                                        \
   } while (0)
+
+# define memset_zero(P, Len) \
+  do {                                                                       \
+    int _len = (Len);                                                        \
+                                                                             \
+    do                                                                       \
+      {                                                                              \
+       int _this = _len > 16 ? 16 : _len;                                    \
+       memcpy ((P), zeroes, _this);                                          \
+       (P) += _this;                                                         \
+       _len -= _this;                                                        \
+      }                                                                              \
+    while (_len > 0);                                                        \
+  } while (0)
 #else
 # define memset_space(P, Len) (memset ((P), ' ', (Len)), (P) += (Len))
+# define memset_zero(P, Len) (memset ((P), '0', (Len)), (P) += (Len))
 #endif
 
-#define        add(n, f) \
+#define        add(n, f)                                                             \
   do                                                                         \
     {                                                                        \
       int _n = (n);                                                          \
@@ -206,7 +222,12 @@ static const char spaces[16] = "                ";
       if (p)                                                                 \
        {                                                                     \
          if (_delta > 0)                                                     \
-           memset_space (p, _delta);                                         \
+           {                                                                 \
+             if (pad == '0')                                                 \
+               memset_zero (p, _delta);                                      \
+             else                                                            \
+               memset_space (p, _delta);                                     \
+           }                                                                 \
          f;                                                                  \
          p += _n;                                                            \
        }                                                                     \