#include <dlgs.h>\r
\r
#include "common.h"\r
-#include "winboard.h"\r
#include "frontend.h"\r
#include "backend.h"\r
+#include "winboard.h"\r
\r
#include "wsnap.h"\r
-#include "wgamelist.h"\r
-\r
-extern BoardSize boardSize;\r
\r
/* Module globals */\r
-HWND gameListDialog = NULL;\r
-BOOLEAN gameListUp = FALSE;\r
-FILE* gameFile;\r
-char* gameFileName = NULL;\r
-\r
-/* Imports from winboard.c */\r
-extern HINSTANCE hInst;\r
-extern HWND hwndMain;\r
-extern WindowPlacement wpGameList;\r
+static BOOLEAN gameListUp = FALSE;\r
+static FILE* gameFile;\r
+static char* gameFileName = NULL;\r
\r
struct GameListStats\r
{\r
int unfinished;\r
};\r
\r
-/* [AS] Wildcard pattern matching */\r
-static BOOL HasPattern( const char * text, const char * pattern )\r
-{\r
- while( *pattern != '\0' ) {\r
- if( *pattern == '*' ) {\r
- while( *pattern == '*' ) {\r
- pattern++;\r
- }\r
-\r
- if( *pattern == '\0' ) {\r
- return TRUE;\r
- }\r
-\r
- while( *text != '\0' ) {\r
- if( HasPattern( text, pattern ) ) {\r
- return TRUE;\r
- }\r
- text++;\r
- }\r
- }\r
- else if( (*pattern == *text) || ((*pattern == '?') && (*text != '\0')) ) {\r
- pattern++;\r
- text++;\r
- continue;\r
- }\r
-\r
- return FALSE;\r
- }\r
-\r
- return TRUE;\r
-}\r
-\r
-static BOOL SearchPattern( const char * text, const char * pattern )\r
-{\r
- BOOL result = TRUE;\r
-\r
- if( pattern != NULL && *pattern != '\0' ) {\r
- if( *pattern == '*' ) {\r
- result = HasPattern( text, pattern );\r
- }\r
- else {\r
- result = FALSE;\r
-\r
- while( *text != '\0' ) {\r
- if( HasPattern( text, pattern ) ) {\r
- result = TRUE;\r
- break;\r
- }\r
- text++;\r
- }\r
- }\r
- }\r
-\r
- return result;\r
-}\r
-\r
/* [AS] Setup the game list according to the specified filter */\r
static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats )\r
{\r
newSizeX, newSizeY);\r
sizeX = newSizeX;\r
sizeY = newSizeY;\r
- }\r
+ } \r
+ else \r
+ GetActualPlacement( gameListDialog, &wpGameList );\r
\r
GameListUpdateTitle( hDlg, szDlgTitle, count, ((ListGame *) gameList.tailPred)->number, &stats );\r
}\r