X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=50d297822bc0b09e344cbeb22437ee1d47ebf691;hb=18c9024957df2892adb21cd851cb7a27b9502d54;hp=31d36ff3af77153460c7583a2e2b6d8d26489259;hpb=d5c36d4669c2f625af7c280c5a4ebdc4ba284e95;p=xboard.git diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index 31d36ff..50d2978 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -1,7 +1,7 @@ /* * wgamelist.c -- Game list window for WinBoard * - * Copyright 1995,2009 Free Software Foundation, Inc. + * Copyright 1995, 2009, 2010 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -54,62 +54,6 @@ struct GameListStats int unfinished; }; -/* [AS] Wildcard pattern matching */ -static BOOL HasPattern( const char * text, const char * pattern ) -{ - while( *pattern != '\0' ) { - if( *pattern == '*' ) { - while( *pattern == '*' ) { - pattern++; - } - - if( *pattern == '\0' ) { - return TRUE; - } - - while( *text != '\0' ) { - if( HasPattern( text, pattern ) ) { - return TRUE; - } - text++; - } - } - else if( (*pattern == *text) || ((*pattern == '?') && (*text != '\0')) ) { - pattern++; - text++; - continue; - } - - return FALSE; - } - - return TRUE; -} - -static BOOL SearchPattern( const char * text, const char * pattern ) -{ - BOOL result = TRUE; - - if( pattern != NULL && *pattern != '\0' ) { - if( *pattern == '*' ) { - result = HasPattern( text, pattern ); - } - else { - result = FALSE; - - while( *text != '\0' ) { - if( HasPattern( text, pattern ) ) { - result = TRUE; - break; - } - text++; - } - } - } - - return result; -} - /* [AS] Setup the game list according to the specified filter */ static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats ) {