Skip to content

Commit

Permalink
Use constants instead of enum since value (0xffff0000) overflow INT_M…
Browse files Browse the repository at this point in the history
…AX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
  • Loading branch information
Laurent Monin committed Aug 20, 2008
1 parent 66bc3de commit de499c4
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions src/editors.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

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_DEST 0x00000100
#define EDITOR_FOR_EACH 0x00000200
#define EDITOR_SINGLE_COMMAND 0x00000400

EDITOR_ERROR_MASK = 0xffff0000
#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

#define EDITOR_ERROR_MASK 0xffff0000

};

/* return values from callback function */
enum {
Expand Down

0 comments on commit de499c4

Please sign in to comment.