(error_at_line): Use strerror portably here, too,
[gnulib.git] / lib / getversion.c
index eca2945..0f440c7 100644 (file)
@@ -1,5 +1,5 @@
 /* getversion.c -- select backup filename type
-   Copyright (C) 1990 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998 Free Software Foundation, Inc.
 
    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
    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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "backupfile.h"
 
-#ifdef STDC_HEADERS
-#include <stdlib.h>
+#if STDC_HEADERS
+# include <stdlib.h>
 #endif
 
 int argmatch ();
@@ -28,12 +32,12 @@ void invalid_arg ();
 
 extern char *program_name;
 
-static char *backup_args[] =
+static const char *const backup_args[] =
 {
   "never", "simple", "nil", "existing", "t", "numbered", 0
 };
 
-static enum backup_type backup_types[] =
+static const enum backup_type backup_types[] =
 {
   simple, simple, numbered_existing, numbered_existing, numbered, numbered
 };
@@ -42,8 +46,7 @@ static enum backup_type backup_types[] =
    Unique abbreviations are accepted. */
 
 enum backup_type
-get_version (version)
-     char *version;
+get_version (const char *version)
 {
   int i;