X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetversion.c;h=0f440c71cc9a57cc73004d4627cb36444ac60481;hb=52f500aca3ae022b4dbd65bd9aa61e78cd0aa73c;hp=4ae705a55af0c123e47c4155dac8aeffc23bf408;hpb=6d8337bfc808cddc275899c03482eceb6aff8547;p=gnulib.git diff --git a/lib/getversion.c b/lib/getversion.c index 4ae705a55..0f440c71c 100644 --- a/lib/getversion.c +++ b/lib/getversion.c @@ -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 @@ -17,14 +17,14 @@ /* Written by David MacKenzie */ -#ifdef HAVE_CONFIG_H -#include +#if HAVE_CONFIG_H +# include #endif #include "backupfile.h" -#ifdef STDC_HEADERS -#include +#if STDC_HEADERS +# include #endif int argmatch (); @@ -32,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 }; @@ -46,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;