/* * Main function. * * Copyright 1994 Alexandre Julliard */ #include "config.h" #include #include #include #include #include #include #ifdef MALLOC_DEBUGGING # include #endif #include "winbase.h" #include "winsock.h" #include "heap.h" #include "msdos.h" #include "options.h" #include "debugtools.h" #include "debugdefs.h" #include "module.h" #include "winnls.h" #include "windef.h" #include "wingdi.h" #include "wine/winuser16.h" #include "tweak.h" #include "winerror.h" /*********************************************************************** * MAIN_ParseDebugOptions * * Turns specific debug messages on or off, according to "options". */ void MAIN_ParseDebugOptions( const char *arg ) { /* defined in relay32/relay386.c */ extern char **debug_relay_includelist; extern char **debug_relay_excludelist; /* defined in relay32/snoop.c */ extern char **debug_snoop_includelist; extern char **debug_snoop_excludelist; int i; int l, cls; char *options = strdup(arg); l = strlen(options); if (l<2) goto error; if (options[l-1]=='\n') options[l-1]='\0'; do { if ((*options!='+')&&(*options!='-')){ int j; for(j=0; j 0x56 */ /*x57*/ /*LANG_ENTRY_BEGIN( "??", KONKANI ) LANG_ENTRY_END( KONKANI ) */ /* 0x58 -> ... */ LANG_ENTRY_BEGIN( "eo", ESPERANTO ) /* not official */ LANG_ENTRY_END( ESPERANTO ) LANG_ENTRY_BEGIN( "wa", WALON ) /* not official */ LANG_ENTRY_END( WALON ) end_MAIN_GetLanguageID: if (Charset) free(charset); free(dialect); return ret; } /*********************************************************************** * MAIN_WineInit * * Wine initialisation and command-line parsing */ void MAIN_WineInit(void) { #ifdef MALLOC_DEBUGGING char *trace; mcheck(NULL); if (!(trace = getenv("MALLOC_TRACE"))) { MESSAGE( "MALLOC_TRACE not set. No trace generated\n" ); } else { MESSAGE( "malloc trace goes to %s\n", trace ); mtrace(); } #endif setbuf(stdout,NULL); setbuf(stderr,NULL); setlocale(LC_CTYPE,""); } /*********************************************************************** * Beep (KERNEL32.11) */ BOOL WINAPI Beep( DWORD dwFreq, DWORD dwDur ) { static char beep = '\a'; /* dwFreq and dwDur are ignored by Win95 */ if (isatty(2)) write( 2, &beep, 1 ); return TRUE; } /*********************************************************************** * FileCDR (KERNEL.130) */ FARPROC16 WINAPI FileCDR16(FARPROC16 x) { FIXME_(file)("(0x%8x): stub\n", (int) x); return (FARPROC16)TRUE; } /*********************************************************************** * GetTickCount (USER.13) (KERNEL32.299) * * Returns the number of milliseconds, modulo 2^32, since the start * of the current session. */ DWORD WINAPI GetTickCount(void) { struct timeval t; gettimeofday( &t, NULL ); return (t.tv_sec * 1000) + (t.tv_usec / 1000); }