Commit 55e845d1 authored by Alexandre Julliard's avatar Alexandre Julliard

Removed most inclusions of options.h.

Removed a few no longer used PROFILE_* functions.
parent 8c08ceb5
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "dosexe.h" #include "dosexe.h"
#include "dosvm.h" #include "dosvm.h"
#include "options.h"
#include "vga.h" #include "vga.h"
WINE_DEFAULT_DEBUG_CHANNEL(module); WINE_DEFAULT_DEBUG_CHANNEL(module);
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include "dce.h" #include "dce.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "input.h" #include "input.h"
#include "options.h"
#include "win.h" #include "win.h"
#include "winpos.h" #include "winpos.h"
#include "windef.h" #include "windef.h"
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
#include "msdos.h" #include "msdos.h"
#include "options.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dosfs); WINE_DEFAULT_DEBUG_CHANNEL(dosfs);
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
#include "heap.h" #include "heap.h"
#include "msdos.h" #include "msdos.h"
#include "ntddk.h" #include "ntddk.h"
#include "options.h"
#include "wine/server.h" #include "wine/server.h"
#include "msvcrt/excpt.h" #include "msvcrt/excpt.h"
......
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
#include "msdos.h" #include "msdos.h"
#include "options.h"
#include "task.h" #include "task.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/server.h" #include "wine/server.h"
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "options.h"
#include "wine/server.h" #include "wine/server.h"
WINE_DEFAULT_DEBUG_CHANNEL(profile); WINE_DEFAULT_DEBUG_CHANNEL(profile);
...@@ -951,50 +950,6 @@ int PROFILE_GetWineIniString( const char *section, const char *key_name, ...@@ -951,50 +950,6 @@ int PROFILE_GetWineIniString( const char *section, const char *key_name,
} }
/***********************************************************************
* PROFILE_EnumWineIniString
*
* Get a config string from the wine.ini file.
*/
BOOL PROFILE_EnumWineIniString( const char *section, int index,
char *name, int name_len, char *buffer, int len )
{
char tmp[PROFILE_MAX_LINE_LEN];
HKEY hkey;
DWORD err, type;
DWORD count = sizeof(tmp);
if (RegOpenKeyA( wine_profile_key, section, &hkey )) return FALSE;
err = RegEnumValueA( hkey, index, name, (DWORD*)&name_len, NULL, &type, tmp, &count );
RegCloseKey( hkey );
if (!err)
{
PROFILE_CopyEntry( buffer, tmp, len, TRUE );
TRACE( "('%s',%d): returning '%s'='%s'\n", section, index, name, buffer );
}
return !err;
}
/***********************************************************************
* PROFILE_GetWineIniInt
*
* Get a config integer from the wine.ini file.
*/
int PROFILE_GetWineIniInt( const char *section, const char *key_name, int def )
{
char buffer[20];
char *p;
long result;
PROFILE_GetWineIniString( section, key_name, "", buffer, sizeof(buffer) );
if (!buffer[0]) return def;
/* FIXME: strtol wrong ?? see GetPrivateProfileIntA */
result = strtol( buffer, &p, 0 );
return (p == buffer) ? 0 /* No digits at all */ : (int)result;
}
/****************************************************************************** /******************************************************************************
* *
* int PROFILE_GetWineIniBool( * int PROFILE_GetWineIniBool(
...@@ -1148,30 +1103,6 @@ void PROFILE_UsageWineIni(void) ...@@ -1148,30 +1103,6 @@ void PROFILE_UsageWineIni(void)
/* RTFM, so to say */ /* RTFM, so to say */
} }
/***********************************************************************
* PROFILE_GetStringItem
*
* Convenience function that turns a string 'xxx, yyy, zzz' into
* the 'xxx\0 yyy, zzz' and returns a pointer to the 'yyy, zzz'.
*/
char* PROFILE_GetStringItem( char* start )
{
char* lpchX, *lpch;
for (lpchX = start, lpch = NULL; *lpchX != '\0'; lpchX++ )
{
if( *lpchX == ',' )
{
if( lpch ) *lpch = '\0'; else *lpchX = '\0';
while( *(++lpchX) )
if( !PROFILE_isspace(*lpchX) ) return lpchX;
}
else if( PROFILE_isspace( *lpchX ) && !lpch ) lpch = lpchX;
else lpch = NULL;
}
if( lpch ) *lpch = '\0';
return NULL;
}
/********************* API functions **********************************/ /********************* API functions **********************************/
......
...@@ -107,6 +107,13 @@ extern int DOSFS_FindNext( const char *path, const char *short_mask, ...@@ -107,6 +107,13 @@ extern int DOSFS_FindNext( const char *path, const char *short_mask,
const char *long_mask, int drive, BYTE attr, const char *long_mask, int drive, BYTE attr,
int skip, WIN32_FIND_DATAA *entry ); int skip, WIN32_FIND_DATAA *entry );
/* profile.c */
extern int PROFILE_LoadWineIni(void);
extern void PROFILE_UsageWineIni(void);
extern int PROFILE_GetWineIniString( const char *section, const char *key_name,
const char *def, char *buffer, int len );
extern int PROFILE_GetWineIniBool( char const *section, char const *key_name, int def );
/* win32/device.c */ /* win32/device.c */
extern HANDLE DEVICE_Open( LPCSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa ); extern HANDLE DEVICE_Open( LPCSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
......
...@@ -25,25 +25,8 @@ ...@@ -25,25 +25,8 @@
extern const char *argv0; extern const char *argv0;
extern const char *full_argv0; extern const char *full_argv0;
extern unsigned int server_startticks;
extern void OPTIONS_Usage(void) WINE_NORETURN; extern void OPTIONS_Usage(void) WINE_NORETURN;
extern void OPTIONS_ParseOptions( char *argv[] ); extern void OPTIONS_ParseOptions( char *argv[] );
/* Profile functions */
extern int PROFILE_LoadWineIni(void);
extern void PROFILE_UsageWineIni(void);
extern int PROFILE_GetWineIniString( const char *section, const char *key_name,
const char *def, char *buffer, int len );
extern BOOL PROFILE_EnumWineIniString( const char *section, int index,
char *name, int name_len, char *buffer, int len );
extern int PROFILE_GetWineIniInt( const char *section, const char *key_name, int def );
extern int PROFILE_GetWineIniBool( char const *section, char const *key_name, int def );
extern char* PROFILE_GetStringItem( char* );
/* Version functions */
extern void VERSION_ParseWinVersion( const char *arg );
extern void VERSION_ParseDosVersion( const char *arg );
#endif /* __WINE_OPTIONS_H */ #endif /* __WINE_OPTIONS_H */
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "windef.h" #include "windef.h"
#include "winreg.h" #include "winreg.h"
#include "winerror.h" #include "winerror.h"
#include "options.h"
#include "file.h" #include "file.h"
#include "module.h" #include "module.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "ntddk.h" #include "ntddk.h"
#include "winnls.h" #include "winnls.h"
#include "winerror.h" #include "winerror.h"
#include "options.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DECLARE_DEBUG_CHANNEL(file); WINE_DECLARE_DEBUG_CHANNEL(file);
...@@ -61,19 +60,3 @@ FARPROC16 WINAPI FileCDR16(FARPROC16 x) ...@@ -61,19 +60,3 @@ FARPROC16 WINAPI FileCDR16(FARPROC16 x)
FIXME_(file)("(0x%8x): stub\n", (int) x); FIXME_(file)("(0x%8x): stub\n", (int) x);
return (FARPROC16)TRUE; return (FARPROC16)TRUE;
} }
/***********************************************************************
* GetTickCount (USER.13)
* GetCurrentTime (USER.15)
* GetTickCount (KERNEL32.@)
* GetSystemMSecCount (SYSTEM.6)
*
* Returns the number of milliseconds, modulo 2^32, since the start
* of the wineserver.
*/
DWORD WINAPI GetTickCount(void)
{
struct timeval t;
gettimeofday( &t, NULL );
return ((t.tv_sec * 1000) + (t.tv_usec / 1000)) - server_startticks;
}
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include "wine/server.h" #include "wine/server.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "file.h" #include "file.h"
#include "options.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -1047,10 +1046,12 @@ static void _save_at_exit(HKEY hkey,LPCSTR path) ...@@ -1047,10 +1046,12 @@ static void _save_at_exit(HKEY hkey,LPCSTR path)
static void _init_registry_saving( HKEY hkey_users_default ) static void _init_registry_saving( HKEY hkey_users_default )
{ {
int all; int all;
int period; int period = 0;
char buffer[20];
all = PROFILE_GetWineIniBool("registry","SaveOnlyUpdatedKeys",1); all = !PROFILE_GetWineIniBool("registry","SaveOnlyUpdatedKeys",1);
period = PROFILE_GetWineIniInt("registry","PeriodicSave",0); PROFILE_GetWineIniString( "registry", "PeriodicSave", "", buffer, sizeof(buffer) );
if (buffer[0]) period = atoi(buffer);
/* set saving level (0 for saving everything, 1 for saving only modified keys) */ /* set saving level (0 for saving everything, 1 for saving only modified keys) */
_set_registry_levels(1,!all,period*1000); _set_registry_levels(1,!all,period*1000);
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "file.h" #include "file.h"
#include "miscemu.h" #include "miscemu.h"
#include "msdos.h" #include "msdos.h"
#include "options.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
#include "windef.h" #include "windef.h"
#include "miscemu.h" #include "miscemu.h"
#include "msdos.h" #include "msdos.h"
#include "file.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "options.h"
/********************************************************************** /**********************************************************************
* INT_Int11Handler (WPROCS.117) * INT_Int11Handler (WPROCS.117)
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
#include <stdlib.h> #include <stdlib.h>
#include "options.h"
#include "miscemu.h" #include "miscemu.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
#include "file.h" #include "file.h"
#include "callback.h" #include "callback.h"
#include "msdos.h" #include "msdos.h"
#include "options.h"
#include "miscemu.h" #include "miscemu.h"
#include "task.h" #include "task.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <unistd.h> #include <unistd.h>
#include "windef.h" #include "windef.h"
#include "callback.h" #include "callback.h"
#include "options.h" #include "file.h"
#include "miscemu.h" #include "miscemu.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "winnls.h" #include "winnls.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "font.h" #include "font.h"
#include "options.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "gdi.h" #include "gdi.h"
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "options.h"
#include "winver.h" #include "winver.h"
#include "winnls.h" #include "winnls.h"
#include "winreg.h" #include "winreg.h"
......
...@@ -19,9 +19,6 @@ ...@@ -19,9 +19,6 @@
*/ */
#include "windows.h" #include "windows.h"
#ifdef WINELIB
#include "options.h"
#endif
#include "progman.h" #include "progman.h"
/* Class names */ /* Class names */
......
...@@ -115,7 +115,7 @@ static char *main_exe_name_ptr = main_exe_name; ...@@ -115,7 +115,7 @@ static char *main_exe_name_ptr = main_exe_name;
static HANDLE main_exe_file; static HANDLE main_exe_file;
static int main_create_flags; static int main_create_flags;
unsigned int server_startticks; static unsigned int server_startticks;
/* memory/environ.c */ /* memory/environ.c */
extern struct _ENVDB *ENV_InitStartupInfo( handle_t info_handle, size_t info_size, extern struct _ENVDB *ENV_InitStartupInfo( handle_t info_handle, size_t info_size,
...@@ -1784,6 +1784,23 @@ BOOL WINAPI AreFileApisANSI(void) ...@@ -1784,6 +1784,23 @@ BOOL WINAPI AreFileApisANSI(void)
} }
/***********************************************************************
* GetTickCount (USER.13)
* GetCurrentTime (USER.15)
* GetTickCount (KERNEL32.@)
* GetSystemMSecCount (SYSTEM.6)
*
* Returns the number of milliseconds, modulo 2^32, since the start
* of the wineserver.
*/
DWORD WINAPI GetTickCount(void)
{
struct timeval t;
gettimeofday( &t, NULL );
return ((t.tv_sec * 1000) + (t.tv_usec / 1000)) - server_startticks;
}
/********************************************************************** /**********************************************************************
* TlsAlloc [KERNEL32.@] Allocates a TLS index. * TlsAlloc [KERNEL32.@] Allocates a TLS index.
* *
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include "wine/server.h" #include "wine/server.h"
#include "wine/exception.h" #include "wine/exception.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "options.h"
#include "msvcrt/excpt.h" #include "msvcrt/excpt.h"
WINE_DEFAULT_DEBUG_CHANNEL(console); WINE_DEFAULT_DEBUG_CHANNEL(console);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment