diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/connect/global.h | 1 | ||||
-rw-r--r-- | storage/connect/inihandl.c | 35 | ||||
-rw-r--r-- | storage/connect/os.h | 8 | ||||
-rw-r--r-- | storage/connect/osutil.c | 3 | ||||
-rw-r--r-- | storage/connect/osutil.h | 6 |
5 files changed, 21 insertions, 32 deletions
diff --git a/storage/connect/global.h b/storage/connect/global.h index 4bc7b8f4e9f..963b5047e1a 100644 --- a/storage/connect/global.h +++ b/storage/connect/global.h @@ -44,7 +44,6 @@ #define CRLF 2 #else // !WIN32 #define CRLF 1 -#define BOOL my_bool #endif // !WIN32 /***********************************************************************/ diff --git a/storage/connect/inihandl.c b/storage/connect/inihandl.c index 6c13faf58c8..f2d60cb207c 100644 --- a/storage/connect/inihandl.c +++ b/storage/connect/inihandl.c @@ -36,9 +36,6 @@ // The types and variables used locally //typedef int bool; typedef unsigned int uint; -#define DWORD int -#define TRUE 1 -#define FALSE 0 #define SVP(S) ((S) ? S : "<null>") #define _strlwr(P) strlwr(P) //OB: changed this line #define MAX_PATHNAME_LEN 256 @@ -81,7 +78,7 @@ typedef struct tagPROFILESECTION { } PROFILESECTION; typedef struct { - bool changed; + BOOL changed; PROFILESECTION *section; //char *dos_name; //char *unix_name; @@ -116,7 +113,7 @@ static char PROFILE_WineIniUsed[MAX_PATHNAME_LEN] = ""; static const char hex[16] = "0123456789ABCDEF"; -bool WritePrivateProfileString(LPCSTR section, LPCSTR entry, +BOOL WritePrivateProfileString(LPCSTR section, LPCSTR entry, LPCSTR string, LPCSTR filename ); /*********************************************************************** * PROFILE_CopyEntry @@ -350,7 +347,7 @@ static PROFILESECTION *PROFILE_Load( FILE *file ) * * Flush the current profile to disk if changed. ***********************************************************************/ -static bool PROFILE_FlushFile(void) +static BOOL PROFILE_FlushFile(void) { //char *p, buffer[MAX_PATHNAME_LEN]; //const char *unix_name; @@ -436,7 +433,7 @@ static void PROFILE_ReleaseFile(void) * * Open a profile file, checking the cached file first. ***********************************************************************/ -static bool PROFILE_Open(LPCSTR filename) +static BOOL PROFILE_Open(LPCSTR filename) { //char buffer[MAX_PATHNAME_LEN]; //char *p; @@ -565,7 +562,7 @@ static bool PROFILE_Open(LPCSTR filename) * * Delete a section from a profile tree. ***********************************************************************/ -static bool PROFILE_DeleteSection(PROFILESECTION* *section, LPCSTR name) +static BOOL PROFILE_DeleteSection(PROFILESECTION* *section, LPCSTR name) { while (*section) { if ((*section)->name[0] && !stricmp((*section)->name, name)) { @@ -589,7 +586,7 @@ static bool PROFILE_DeleteSection(PROFILESECTION* *section, LPCSTR name) * * Delete a key from a profile tree. ***********************************************************************/ -static bool PROFILE_DeleteKey(PROFILESECTION* *section, +static BOOL PROFILE_DeleteKey(PROFILESECTION* *section, LPCSTR section_name, LPCSTR key_name) { while (*section) { @@ -656,7 +653,7 @@ void PROFILE_DeleteAllKeys(LPCSTR section_name) static PROFILEKEY *PROFILE_Find(PROFILESECTION* *section, const char *section_name, const char *key_name, - bool create, bool create_always) + BOOL create, BOOL create_always) { const char *p; int seclen, keylen; @@ -747,8 +744,8 @@ static PROFILEKEY *PROFILE_Find(PROFILESECTION* *section, * If return_values is TRUE, also include the corresponding values. ***********************************************************************/ static int PROFILE_GetSection(PROFILESECTION *section, LPCSTR section_name, - LPSTR buffer, uint len, bool handle_env, - bool return_values) + LPSTR buffer, uint len, + BOOL handle_env, BOOL return_values) { PROFILEKEY *key; @@ -927,8 +924,8 @@ static int PROFILE_GetString(LPCSTR section, LPCSTR key_name, * * Set a profile string. ***********************************************************************/ -static bool PROFILE_SetString(LPCSTR section_name, LPCSTR key_name, - LPCSTR value, bool create_always) +static BOOL PROFILE_SetString(LPCSTR section_name, LPCSTR key_name, + LPCSTR value, BOOL create_always) { if (!key_name) { /* Delete a whole section */ if (trace > 1) @@ -1026,7 +1023,7 @@ char *PROFILE_GetStringItem(char* start) static int PROFILE_GetPrivateProfileString(LPCSTR section, LPCSTR entry, LPCSTR def_val, LPSTR buffer, uint len, LPCSTR filename, - bool allow_section_name_copy) + BOOL allow_section_name_copy) { int ret; LPSTR pDefVal = NULL; @@ -1143,10 +1140,10 @@ int GetPrivateProfileSection(LPCSTR section, LPSTR buffer, /*********************************************************************** * WritePrivateProfileStringA (KERNEL32.@) ***********************************************************************/ -bool WritePrivateProfileString(LPCSTR section, LPCSTR entry, +BOOL WritePrivateProfileString(LPCSTR section, LPCSTR entry, LPCSTR string, LPCSTR filename) { - bool ret = FALSE; + BOOL ret = FALSE; EnterCriticalSection( &PROFILE_CritSect ); @@ -1176,10 +1173,10 @@ bool WritePrivateProfileString(LPCSTR section, LPCSTR entry, /*********************************************************************** * WritePrivateProfileSectionA (KERNEL32.@) ***********************************************************************/ -bool WritePrivateProfileSection(LPCSTR section, +BOOL WritePrivateProfileSection(LPCSTR section, LPCSTR string, LPCSTR filename ) { - bool ret = FALSE; + BOOL ret = FALSE; LPSTR p ; EnterCriticalSection(&PROFILE_CritSect); diff --git a/storage/connect/os.h b/storage/connect/os.h index dde202b8344..282eab1d9d7 100644 --- a/storage/connect/os.h +++ b/storage/connect/os.h @@ -26,6 +26,7 @@ typedef unsigned char BYTE; typedef char *LPSTR; typedef char *LPTSTR; typedef char *PSZ; +typedef long BOOL; typedef int INT; #if !defined(NODW) /* @@ -39,13 +40,6 @@ typedef unsigned long DWORD; #undef HANDLE typedef int HANDLE; -/* TODO-BAR: remove this */ -#ifdef __cplusplus -typedef int bool; -#else -#define bool my_bool -#endif - #define stricmp strcasecmp #define _stricmp strcasecmp #define strnicmp strncasecmp diff --git a/storage/connect/osutil.c b/storage/connect/osutil.c index 5b32f0f5a3b..f59f6d2517f 100644 --- a/storage/connect/osutil.c +++ b/storage/connect/osutil.c @@ -17,7 +17,6 @@ my_bool CloseFileHandle(HANDLE h) //#include <ctype.h> #include <fcntl.h> -#define DWORD int extern FILE *debug; /***********************************************************************/ @@ -195,7 +194,7 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength) return absPath; } /* end of _fullpath */ -bool MessageBeep(uint i) +BOOL MessageBeep(uint i) { // Fixme return TRUE; diff --git a/storage/connect/osutil.h b/storage/connect/osutil.h index a2cada9833f..bbc4f3d2def 100644 --- a/storage/connect/osutil.h +++ b/storage/connect/osutil.h @@ -29,7 +29,7 @@ int GetLastError(); void _splitpath(const char*, char*, char*, char*, char*); void _makepath(char*, const char*, const char*, const char*, const char*); char *_fullpath(char *absPath, const char *relPath, size_t maxLength); -bool MessageBeep(uint); +BOOL MessageBeep(uint); unsigned long _filelength(int fd); int GetPrivateProfileString( @@ -48,7 +48,7 @@ uint GetPrivateProfileInt( LPCTSTR lpFileName // initialization file name ); -bool WritePrivateProfileString( +BOOL WritePrivateProfileString( LPCTSTR lpAppName, // section name LPCTSTR lpKeyName, // key name LPCTSTR lpString, // string to add @@ -62,7 +62,7 @@ int GetPrivateProfileSection( LPCTSTR lpFileName // initialization file name ); -bool WritePrivateProfileSection( +BOOL WritePrivateProfileSection( LPCTSTR lpAppName, // section name LPCTSTR lpString, // data LPCTSTR lpFileName // file name |