Add a compile-time check to ensure that filetype

and filetype_letter have the same number of elements.
This commit is contained in:
Jim Meyering committed 2006-08-09 09:45:17 +00:00
1 parent ff7f318ae1
commit a5e7cc0811
2 files changed
+7 -1

No files matched your search

+3
View File
@@ -1,5 +1,8 @@
2006-08-09 Jim Meyering <jim@meyering.net>
* src/ls.c: Add a compile-time check to ensure that filetype
and filetype_letter have the same number of elements.
* tests/misc/sort-rand: Remove use of --seed=S.
2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
+4 -1
View File
@@ -162,9 +162,12 @@ enum filetype
/* Display letters and indicators for each filetype.
Keep these in sync with enum filetype. */
static char const filetype_letter[] = "?pcdb-lswd";
/* Ensure that filetype and filetype_letter have the same
number of elements. */
verify (sizeof filetype_letter - 1 == arg_directory + 1);
#define FILETYPE_INDICATORS \
{ \
C_ORPHAN, C_FIFO, C_CHR, C_DIR, C_BLK, C_FILE, \