changeset 976:cee16cea5f23

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.
author zas_
date Wed, 20 Aug 2008 22:26:34 +0000
parents 8c6a8002b1d5
children 1f634178a14f
files src/editors.h
diffstat 1 files changed, 15 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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 {