From 003ab519c36430f6df51e0e6e2aa528476894161 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Mon, 28 May 2012 13:58:00 -0700 Subject: [PATCH] bug #36229: changed STATE_* from define to enum enabling better compiler checks --- engineoutput.c | 2 +- engineoutput.h | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/engineoutput.c b/engineoutput.c index aa7cc49..0752428 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -124,7 +124,7 @@ MakeEngineOutputTitle () // back end, due to front-end wrapper for SetWindowText, and new SetIcon arguments void -SetEngineState (int which, int state, char * state_data) +SetEngineState (int which, enum ENGINE_STATE state, char * state_data) { int x_which = 1 - which; diff --git a/engineoutput.h b/engineoutput.h index 7007c16..b0a2c31 100644 --- a/engineoutput.h +++ b/engineoutput.h @@ -51,17 +51,13 @@ #define ICON_SIZE 14 -#define STATE_UNKNOWN -1 -#define STATE_THINKING 0 -#define STATE_IDLE 1 -#define STATE_PONDERING 2 -#define STATE_ANALYZING 3 +enum ENGINE_STATE { STATE_UNKNOWN, STATE_THINKING, STATE_IDLE, STATE_PONDERING, STATE_ANALYZING }; extern int windowMode; extern char exclusionHeader[]; // back-end called by front-end -void SetEngineState( int which, int state, char * state_data ); +void SetEngineState( int which, enum ENGINE_STATE state, char * state_data ); // front-end called by back-end void SetEngineColorIcon( int which ); @@ -70,7 +66,7 @@ void DoSetWindowText(int which, int field, char *s_label); void InsertIntoMemo( int which, char * text, int where ); void DoClearMemo(int which); void ResizeWindowControls( int mode ); -int EngineOutputDialogExists(); +int EngineOutputDialogExists(); void SetEngineOutputTitle( char *title ); void InitEngineOutput P((Option *opt, Option *memo2)); // XB only void DrawWidgetIcon P((Option *opt, int nIcon)); // XB only -- 1.7.0.4