mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
Removed most inclusions of options.h.
Removed a few no longer used PROFILE_* functions.
This commit is contained in:
parent
8c08ceb56c
commit
55e845d11b
@ -45,7 +45,6 @@
|
||||
#include "wine/debug.h"
|
||||
#include "dosexe.h"
|
||||
#include "dosvm.h"
|
||||
#include "options.h"
|
||||
#include "vga.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(module);
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "dce.h"
|
||||
#include "wine/debug.h"
|
||||
#include "input.h"
|
||||
#include "options.h"
|
||||
#include "win.h"
|
||||
#include "winpos.h"
|
||||
#include "windef.h"
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include "file.h"
|
||||
#include "heap.h"
|
||||
#include "msdos.h"
|
||||
#include "options.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(dosfs);
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include "heap.h"
|
||||
#include "msdos.h"
|
||||
#include "ntddk.h"
|
||||
#include "options.h"
|
||||
#include "wine/server.h"
|
||||
#include "msvcrt/excpt.h"
|
||||
|
||||
|
@ -60,7 +60,6 @@
|
||||
#include "file.h"
|
||||
#include "heap.h"
|
||||
#include "msdos.h"
|
||||
#include "options.h"
|
||||
#include "task.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/server.h"
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "file.h"
|
||||
#include "heap.h"
|
||||
#include "wine/debug.h"
|
||||
#include "options.h"
|
||||
#include "wine/server.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(profile);
|
||||
@ -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(
|
||||
@ -1148,30 +1103,6 @@ void PROFILE_UsageWineIni(void)
|
||||
/* 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 **********************************/
|
||||
|
||||
|
@ -107,6 +107,13 @@ extern int DOSFS_FindNext( const char *path, const char *short_mask,
|
||||
const char *long_mask, int drive, BYTE attr,
|
||||
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 */
|
||||
extern HANDLE DEVICE_Open( LPCSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
|
||||
|
||||
|
@ -25,25 +25,8 @@
|
||||
|
||||
extern const char *argv0;
|
||||
extern const char *full_argv0;
|
||||
extern unsigned int server_startticks;
|
||||
|
||||
extern void OPTIONS_Usage(void) WINE_NORETURN;
|
||||
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 */
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "windef.h"
|
||||
#include "winreg.h"
|
||||
#include "winerror.h"
|
||||
#include "options.h"
|
||||
#include "file.h"
|
||||
#include "module.h"
|
||||
#include "wine/debug.h"
|
||||
|
17
misc/main.c
17
misc/main.c
@ -35,7 +35,6 @@
|
||||
#include "ntddk.h"
|
||||
#include "winnls.h"
|
||||
#include "winerror.h"
|
||||
#include "options.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DECLARE_DEBUG_CHANNEL(file);
|
||||
@ -61,19 +60,3 @@ FARPROC16 WINAPI FileCDR16(FARPROC16 x)
|
||||
FIXME_(file)("(0x%8x): stub\n", (int) x);
|
||||
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 @@
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "file.h"
|
||||
#include "options.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@ -1047,10 +1046,12 @@ static void _save_at_exit(HKEY hkey,LPCSTR path)
|
||||
static void _init_registry_saving( HKEY hkey_users_default )
|
||||
{
|
||||
int all;
|
||||
int period;
|
||||
int period = 0;
|
||||
char buffer[20];
|
||||
|
||||
all = PROFILE_GetWineIniBool("registry","SaveOnlyUpdatedKeys",1);
|
||||
period = PROFILE_GetWineIniInt("registry","PeriodicSave",0);
|
||||
all = !PROFILE_GetWineIniBool("registry","SaveOnlyUpdatedKeys",1);
|
||||
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_registry_levels(1,!all,period*1000);
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "file.h"
|
||||
#include "miscemu.h"
|
||||
#include "msdos.h"
|
||||
#include "options.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include "windef.h"
|
||||
#include "miscemu.h"
|
||||
#include "msdos.h"
|
||||
#include "file.h"
|
||||
#include "wine/debug.h"
|
||||
#include "options.h"
|
||||
|
||||
/**********************************************************************
|
||||
* INT_Int11Handler (WPROCS.117)
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
#include "options.h"
|
||||
#include "miscemu.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include "file.h"
|
||||
#include "callback.h"
|
||||
#include "msdos.h"
|
||||
#include "options.h"
|
||||
#include "miscemu.h"
|
||||
#include "task.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <unistd.h>
|
||||
#include "windef.h"
|
||||
#include "callback.h"
|
||||
#include "options.h"
|
||||
#include "file.h"
|
||||
#include "miscemu.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "winnls.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "font.h"
|
||||
#include "options.h"
|
||||
#include "wine/debug.h"
|
||||
#include "gdi.h"
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "options.h"
|
||||
#include "winver.h"
|
||||
#include "winnls.h"
|
||||
#include "winreg.h"
|
||||
|
@ -19,9 +19,6 @@
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#ifdef WINELIB
|
||||
#include "options.h"
|
||||
#endif
|
||||
#include "progman.h"
|
||||
|
||||
/* Class names */
|
||||
|
@ -115,7 +115,7 @@ static char *main_exe_name_ptr = main_exe_name;
|
||||
static HANDLE main_exe_file;
|
||||
static int main_create_flags;
|
||||
|
||||
unsigned int server_startticks;
|
||||
static unsigned int server_startticks;
|
||||
|
||||
/* memory/environ.c */
|
||||
extern struct _ENVDB *ENV_InitStartupInfo( handle_t info_handle, size_t info_size,
|
||||
@ -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.
|
||||
*
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include "wine/server.h"
|
||||
#include "wine/exception.h"
|
||||
#include "wine/debug.h"
|
||||
#include "options.h"
|
||||
#include "msvcrt/excpt.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(console);
|
||||
|
Loading…
Reference in New Issue
Block a user