Some code refactoring and cleanup; one small bug fix
[xboard.git] / winboard / wevalgraph.c
index be51991..21fd1e4 100644 (file)
@@ -37,9 +37,6 @@
 #include "frontend.h"\r
 #include "backend.h"\r
 \r
-/* Imports from winboard.c */\r
-extern BOOLEAN evalGraphDialogUp; // should be back-end variable, and defined here\r
-\r
 /* Module globals */ // used to communicate between back-end and front-end part\r
 static ChessProgramStats_Move * currPvInfo;\r
 static int currFirst = 0;\r
@@ -347,11 +344,6 @@ void PaintEvalGraph( void )
     DrawHistograms();\r
 }\r
 \r
-Boolean EvalGraphIsUp()\r
-{\r
-    return evalGraphDialogUp;\r
-}\r
-\r
 // ------------------------------------------ front-end starts here ----------------------------------------------\r
 \r
 #include <commdlg.h>\r
@@ -362,18 +354,12 @@ Boolean EvalGraphIsUp()
 \r
 #define WM_REFRESH_GRAPH    (WM_USER + 1)\r
 \r
-void EvalGraphSet( int first, int last, int current, ChessProgramStats_Move * pvInfo );\r
-void EvalGraphPopUp();\r
-void EvalGraphPopDown();\r
-Boolean EvalGraphIsUp();\r
-\r
 // calls of front-end part into back-end part\r
 extern int GetMoveIndexFromPoint( int x, int y );\r
 extern void PaintEvalGraph( void );\r
 \r
 /* Imports from winboard.c */\r
-extern HWND evalGraphDialog;\r
-extern BOOLEAN evalGraphDialogUp; // should be back-end, really\r
+static BOOLEAN evalGraphDialogUp; // should be back-end, really\r
 \r
 extern HINSTANCE hInst;\r
 extern HWND hwndMain;\r
@@ -388,6 +374,11 @@ static HBITMAP hbmPB = NULL;
 static HPEN pens[6]; // [HGM] put all pens in one array\r
 static HBRUSH hbrHist[3] = { NULL, NULL, NULL };\r
 \r
+Boolean EvalGraphIsUp()\r
+{\r
+    return evalGraphDialogUp;\r
+}\r
+\r
 // [HGM] front-end, added as wrapper to avoid use of LineTo and MoveToEx in other routines (so they can be back-end) \r
 static void DrawSegment( int x, int y, int *lastX, int *lastY, int penType )\r
 {\r