# HG changeset patch # User zas_ # Date 1219271194 0 # Node ID cee16cea5f23acf019cab2d77715e50cb3062484 # Parent 8c6a8002b1d5ec73e4b9fd0a322171005d423153 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small. diff -r 8c6a8002b1d5 -r cee16cea5f23 src/editors.h --- a/src/editors.h Wed Aug 20 22:19:35 2008 +0000 +++ b/src/editors.h Wed Aug 20 22:26:34 2008 +0000 @@ -14,26 +14,25 @@ #ifndef EDITORS_H #define EDITORS_H -enum { - EDITOR_KEEP_FS = 0x00000001, - EDITOR_VERBOSE = 0x00000002, - EDITOR_VERBOSE_MULTI = 0x00000004, - EDITOR_DEST = 0x00000100, - EDITOR_FOR_EACH = 0x00000200, - EDITOR_SINGLE_COMMAND = 0x00000400, +#define EDITOR_KEEP_FS 0x00000001 +#define EDITOR_VERBOSE 0x00000002 +#define EDITOR_VERBOSE_MULTI 0x00000004 + +#define EDITOR_DEST 0x00000100 +#define EDITOR_FOR_EACH 0x00000200 +#define EDITOR_SINGLE_COMMAND 0x00000400 - EDITOR_ERROR_EMPTY = 0x00020000, - EDITOR_ERROR_SYNTAX = 0x00040000, - EDITOR_ERROR_INCOMPATIBLE = 0x00080000, - EDITOR_ERROR_NO_FILE = 0x00100000, - EDITOR_ERROR_CANT_EXEC = 0x00200000, - EDITOR_ERROR_STATUS = 0x00400000, - EDITOR_ERROR_SKIPPED = 0x00800000, +#define EDITOR_ERROR_EMPTY 0x00020000 +#define EDITOR_ERROR_SYNTAX 0x00040000 +#define EDITOR_ERROR_INCOMPATIBLE 0x00080000 +#define EDITOR_ERROR_NO_FILE 0x00100000 +#define EDITOR_ERROR_CANT_EXEC 0x00200000 +#define EDITOR_ERROR_STATUS 0x00400000 +#define EDITOR_ERROR_SKIPPED 0x00800000 - EDITOR_ERROR_MASK = 0xffff0000 +#define EDITOR_ERROR_MASK 0xffff0000 -}; /* return values from callback function */ enum {