+++ /dev/null
-//
-// REGISTRY.CPP - Win32 support file
-// by James L. Hammons
-// (C) 2002 Underground Software
-//
-// JLH = James Hammons <jlhamm@acm.org>
-//
-// Who When What
-// --- ---------- ------------------------------------------------------------
-// JLH 05/16/2002 Created this file
-// JLH 12/10/2002 Updated InitINIFile to take a parameter so that you can open
-// an .INI file that doesn't belong to the current module
-//
-// STILL TO BE DONE:
-//
-// - Convert to wxWidgets...
-//
-
-#warning This file not yet converted to wxWidgets!!!
-
-#if 0
-#include <windows.h>
-#include "registry.h"
-
-// Local data
-
-static char INIPath[MAX_PATH];
-static char str[4096];
-
-//
-// Initialize the application .INI file
-// Returns TRUE if succesful, FALSE otherwise...
-//
-void InitINIFile(char * path/*= NULL*/)
-{
- if (!GetModuleFileName(NULL, INIPath, MAX_PATH))
- return;
-
- if (path == NULL)
- {
- int len = lstrlen(INIPath);
- lstrcpy(INIPath + len - 4, ".ini");
- }
- else
- {
- for(int i=lstrlen(INIPath); i>=0; i--)
- {
- if (INIPath[i] == '\\')
- {
- lstrcpy(INIPath + i + 1, path);
- break;
- }
- }
- }
-}
-
-//
-// Write an int value to our .INI file
-//
-void SetINIInt(char * section, char * entry, int32 value)
-{
- const char fmtStr[] = "%d";
- char strVal[20];
-
- wsprintf(strVal, fmtStr, value);
- WritePrivateProfileString(section, entry, strVal, INIPath);
-}
-
-//
-// Write a string value to our .INI file
-//
-void SetINIString(char * section, char * entry, char * value)
-{
- WritePrivateProfileString(section, entry, value, INIPath);
-}
-
-//
-// Get an int value from our .INI file
-//
-int32 GetINIInt(char * section, char * entry, int32 _default)
-{
- return GetPrivateProfileInt(section, entry, _default, INIPath);
-}
-
-//
-// Get a string value from our .INI file
-//
-const char * GetINIString(char * section, char * entry, char * _default)
-{
- GetPrivateProfileString(section, entry, _default, str, 4096, INIPath);
-
- return str;
-}
-#endif