
#ifndef _UTIL_H_
#define _UTIL_H_

typedef enum tdeStatus_
{
	STATUS_C_OK,
	STATUS_C_Error,
	STATUS_C_UserBreak
} tdeStatus;


// Ask the user to choose a directory and return the selected directory.
// Return an empty string if no dir selected.
// Parameter is the string that will be displayed in dlg box (ie: "Choose directory" )
CString fn_csBrowseDirectory( LPCTSTR _p_szTitle, LPCTSTR _p_szDefaultDir = NULL );

// Add a line of text in the CEdit control used for displaying results.
// Line must be terminated by "\r\n" for carriage return.
void fn_vOutputLine( const TCHAR *_p_szLine );

// Read version.ini file and update GlobalData
BOOL fn_bReadVersionFile();

// Read SoundVersion.ini file and update GlobalData
BOOL fn_bReadSoundVersionFile();

// Copy sound directories into bin directory
UINT fn_uiThreadCopySoundDirectory( LPVOID _p_stParam );

// Update the file startprg.ini
void fn_vUpdateStartPrg();

// Update the file startprg.ini
void fn_vUpdateStartPrg_old();

// Disable use of bigfile for relocation tables (in startprg.ini)
void fn_vDisableRelocTableBigFile();


// Find a substring in szString1.
// Comparaison is case INSENSITIVE.
const char *stristr( const char *szString, const char *szSubString );

BOOL fn_bCheckFileExistanceInStartupDir( CString csFileName );
BOOL fn_bValidateMainDirectorySetting();
BOOL fn_bValidateBinDirectorySetting();
BOOL fn_bValidateGameExeSetting();

void fn_vMakeSndParserCommandLine( char *szCommandLine );
void fn_vGetShortExeName( char *_szShortExeName, char *_szLongExeName );


#endif

