X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fbackupfile.c;h=32ffaeaa7b31473af888449615910547e2746c25;hb=4142fa04c1b8254b53ec1060f8a774e73e3ffcb8;hp=ae61cbd1b1da6d80059fddb9924c667f61afa37f;hpb=222b0486b7db1b09293e05512873d633440efcb3;p=gnulib.git diff --git a/lib/backupfile.c b/lib/backupfile.c index ae61cbd1b..32ffaeaa7 100644 --- a/lib/backupfile.c +++ b/lib/backupfile.c @@ -38,9 +38,7 @@ #include -#if HAVE_UNISTD_H -# include -#endif +#include #if HAVE_DIRENT_H # include @@ -334,7 +332,7 @@ find_backup_file_name (char const *file, enum backup_type backup_type) static char const * const backup_args[] = { - /* In a series of synonyms, present the most meaning full first, so + /* In a series of synonyms, present the most meaningful first, so that argmatch_valid be more readable. */ "none", "off", "simple", "never", @@ -351,6 +349,10 @@ static const enum backup_type backup_types[] = numbered_backups, numbered_backups }; +/* Ensure that these two vectors have the same number of elements, + not counting the final NULL in the first one. */ +ARGMATCH_VERIFY (backup_args, backup_types); + /* Return the type of backup specified by VERSION. If VERSION is NULL or the empty string, return numbered_existing_backups. If VERSION is invalid or ambiguous, fail with a diagnostic appropriate