4 * Copyright 1994 Alexandre Julliard
6 static char Copyright[] = "Copyright Alexandre Julliard, 1994";
13 #ifdef MALLOC_DEBUGGING
17 #include <X11/Xresource.h>
18 #include <X11/Xutil.h>
19 #include <X11/cursorfont.h>
27 #include "prototypes.h"
29 #define DEBUG_DEFINE_VARIABLES
33 const char people
[] = "Wine is available thanks to the work of "\
34 "Bob Amstadt, Dag Asheim, Martin Ayotte, Ross Biro, Erik Bos, Fons Botman, "\
35 "John Brezak, Andrew Bulhak, John Burton, Paul Falstad, Olaf Flebbe, "\
36 "Peter Galbavy, Cameron Heide, Jeffrey Hsu, Miguel de Icaza, "\
37 "Alexandre Julliard, Jon Konrath, Scott A. Laird, Martin von Loewis, "\
38 "Kenneth MacDonald, Peter MacDonald, William Magro, David Metcalfe, "\
39 "Michael Patra, John Richardson, Johannes Ruscheinski, Thomas Sandford, "\
40 "Constantine Sapuntzakis, Bernd Schmidt, Yngvi Sigurjonsson, Rick Sladkey, "\
41 "William Smith, Erik Svendsen, Goran Thyni, Jimmy Tirtawangsa, Jon Tombs, "\
42 "Linus Torvalds, Michael Veksler, Carl Williams, Karl Guenter Wuensch, "\
43 "Eric Youngdale, and James Youngman.";
45 #define WINE_CLASS "Wine" /* Class name for resources */
47 typedef struct tagENVENTRY
{
51 struct tagENVENTRY
*Prev
;
52 struct tagENVENTRY
*Next
;
53 } ENVENTRY
, *LPENVENTRY
;
55 LPENVENTRY lpEnvList
= NULL
;
60 int screenWidth
= 0, screenHeight
= 0; /* Desktop window dimensions */
61 int screenDepth
= 0; /* Screen depth to use */
62 int desktopX
= 0, desktopY
= 0; /* Desktop window position (if any) */
64 struct options Options
=
65 { /* default options */
66 NULL
, /* spyFilename */
67 NULL
, /* desktopGeometry */
68 NULL
, /* programName */
69 FALSE
, /* usePrivateMap */
70 FALSE
, /* synchronous */
71 FALSE
, /* backing store */
72 SW_SHOWNORMAL
, /* cmdShow */
74 FALSE
, /* AllowReadOnly */
75 FALSE
/* Enhanced mode */
79 static XrmOptionDescRec optionsTable
[] =
81 { "-backingstore", ".backingstore", XrmoptionNoArg
, (caddr_t
)"on" },
82 { "-desktop", ".desktop", XrmoptionSepArg
, (caddr_t
)NULL
},
83 { "-depth", ".depth", XrmoptionSepArg
, (caddr_t
)NULL
},
84 { "-display", ".display", XrmoptionSepArg
, (caddr_t
)NULL
},
85 { "-iconic", ".iconic", XrmoptionNoArg
, (caddr_t
)"on" },
86 { "-name", ".name", XrmoptionSepArg
, (caddr_t
)NULL
},
87 { "-privatemap", ".privatemap", XrmoptionNoArg
, (caddr_t
)"on" },
88 { "-synchronous", ".synchronous", XrmoptionNoArg
, (caddr_t
)"on" },
89 { "-spy", ".spy", XrmoptionSepArg
, (caddr_t
)NULL
},
90 { "-debug", ".debug", XrmoptionNoArg
, (caddr_t
)"on" },
91 { "-debugmsg", ".debugmsg", XrmoptionSepArg
, (caddr_t
)NULL
},
92 { "-dll", ".dll", XrmoptionSepArg
, (caddr_t
)NULL
},
93 { "-allowreadonly", ".allowreadonly", XrmoptionNoArg
, (caddr_t
)"on" },
94 { "-enhanced", ".enhanced", XrmoptionNoArg
, (caddr_t
)"off"}
97 #define NB_OPTIONS (sizeof(optionsTable) / sizeof(optionsTable[0]))
100 "Usage: %s [options] program_name [arguments]\n" \
103 " -depth n Change the depth to use for multiple-depth screens\n" \
104 " -desktop geom Use a desktop window of the given geometry\n" \
105 " -display name Use the specified display\n" \
106 " -iconic Start as an icon\n" \
107 " -debug Enter debugger before starting application\n" \
108 " -name name Set the application name\n" \
109 " -privatemap Use a private color map\n" \
110 " -synchronous Turn on synchronous display mode\n" \
111 " -backingstore Turn on backing store\n" \
112 " -spy file Turn on message spying to the specified file\n" \
113 " -debugmsg name Turn debugging-messages on or off\n" \
114 " -dll name Enable or disable built-in DLLs\n" \
115 " -allowreadonly Read only files may be opened in write mode\n" \
116 " -enhanced Start wine in enhanced mode\n"
120 /***********************************************************************
123 static void MAIN_Usage( char *name
)
125 fprintf( stderr
, USAGE
, name
);
130 /***********************************************************************
131 * MAIN_GetProgramName
133 * Get the program name. The name is specified by (in order of precedence):
134 * - the option '-name'.
135 * - the environment variable 'WINE_NAME'.
136 * - the last component of argv[0].
138 static char *MAIN_GetProgramName( int argc
, char *argv
[] )
143 for (i
= 1; i
< argc
-1; i
++)
144 if (!strcmp( argv
[i
], "-name" )) return argv
[i
+1];
145 if ((p
= getenv( "WINE_NAME" )) != NULL
) return p
;
146 if ((p
= strrchr( argv
[0], '/' )) != NULL
) return p
+1;
151 /***********************************************************************
154 * Fetch the value of resource 'name' using the correct instance name.
155 * 'name' must begin with '.' or '*'
157 static int MAIN_GetResource( XrmDatabase db
, char *name
, XrmValue
*value
)
159 char *buff_instance
, *buff_class
;
163 buff_instance
= (char *)malloc(strlen(Options
.programName
)+strlen(name
)+1);
164 buff_class
= (char *)malloc( strlen(WINE_CLASS
) + strlen(name
) + 1 );
166 strcpy( buff_instance
, Options
.programName
);
167 strcat( buff_instance
, name
);
168 strcpy( buff_class
, WINE_CLASS
);
169 strcat( buff_class
, name
);
170 retval
= XrmGetResource( db
, buff_instance
, buff_class
, &dummy
, value
);
171 free( buff_instance
);
177 /***********************************************************************
180 * Turns specific debug messages on or off, according to "options".
181 * Returns TRUE if parsing was successfull
185 BOOL
ParseDebugOptions(char *options
)
188 if (strlen(options
)<3)
192 if ((*options
!='+')&&(*options
!='-'))
194 if (strchr(options
,','))
195 l
=strchr(options
,',')-options
;
198 if (!strncasecmp(options
+1,"all",l
-1))
201 for (i
=0;i
<sizeof(debug_msg_enabled
)/sizeof(short);i
++)
202 debug_msg_enabled
[i
]=(*options
=='+');
207 for (i
=0;i
<sizeof(debug_msg_enabled
)/sizeof(short);i
++)
208 if (debug_msg_name
&& (!strncasecmp(options
+1,debug_msg_name
[i
],l
-1)))
210 debug_msg_enabled
[i
]=(*options
=='+');
213 if (i
==sizeof(debug_msg_enabled
)/sizeof(short))
218 while((*options
==',')&&(*(++options
)));
227 /***********************************************************************
228 * MAIN_ParseDLLOptions
230 * Set runtime DLL usage flags
232 static BOOL
MAIN_ParseDLLOptions(char *options
)
236 if (strlen(options
)<3)
240 if ((*options
!='+')&&(*options
!='-'))
242 if (strchr(options
,','))
243 l
=strchr(options
,',')-options
;
244 else l
=strlen(options
);
245 for (i
=0;i
<N_BUILTINS
;i
++)
246 if (!strncasecmp(options
+1,dll_builtin_table
[i
].name
,l
-1))
248 dll_builtin_table
[i
].used
= (*options
=='+');
255 while((*options
==',')&&(*(++options
)));
264 /***********************************************************************
267 * Parse command line options and open display.
269 static void MAIN_ParseOptions( int *argc
, char *argv
[] )
273 XrmDatabase db
= XrmGetFileDatabase("/usr/lib/X11/app-defaults/Wine");
275 /* Parse command line */
276 Options
.programName
= MAIN_GetProgramName( *argc
, argv
);
277 XrmParseCommand( &db
, optionsTable
, NB_OPTIONS
,
278 Options
.programName
, argc
, argv
);
281 /* Need to assemble command line and pass it to WinMain */
283 if (*argc
< 2 || strcasecmp(argv
[1], "-h") == 0)
284 MAIN_Usage( argv
[0] );
289 if (MAIN_GetResource( db
, ".display", &value
)) display_name
= value
.addr
;
290 else display_name
= NULL
;
292 if (!(display
= XOpenDisplay( display_name
)))
294 fprintf( stderr
, "%s: Can't open display: %s\n",
295 argv
[0], display_name
? display_name
: "" );
299 /* Get all options */
300 if (MAIN_GetResource( db
, ".iconic", &value
))
301 Options
.cmdShow
= SW_SHOWMINIMIZED
;
302 if (MAIN_GetResource( db
, ".privatemap", &value
))
303 Options
.usePrivateMap
= TRUE
;
304 if (MAIN_GetResource( db
, ".synchronous", &value
))
305 Options
.synchronous
= TRUE
;
306 if (MAIN_GetResource( db
, ".backingstore", &value
))
307 Options
.backingstore
= TRUE
;
308 if (MAIN_GetResource( db
, ".debug", &value
))
309 Options
.debug
= TRUE
;
310 if (MAIN_GetResource( db
, ".allowreadonly", &value
))
311 Options
.allowReadOnly
= TRUE
;
312 if (MAIN_GetResource( db
, ".enhanced", &value
))
313 Options
.enhanced
= TRUE
;
314 if (MAIN_GetResource( db
, ".spy", &value
))
315 Options
.spyFilename
= value
.addr
;
316 if (MAIN_GetResource( db
, ".depth", &value
))
317 screenDepth
= atoi( value
.addr
);
318 if (MAIN_GetResource( db
, ".desktop", &value
))
319 Options
.desktopGeometry
= value
.addr
;
321 if (MAIN_GetResource( db
, ".debugoptions", &value
))
322 ParseDebugOptions((char*)value
.addr
);
324 if (MAIN_GetResource( db
, ".debugmsg", &value
))
326 #ifndef DEBUG_RUNTIME
327 fprintf(stderr
,"%s: Option \"-debugmsg\" not implemented.\n" \
328 " Recompile with DEBUG_RUNTIME in include/stddebug.h defined.\n",
332 if (ParseDebugOptions((char*)value
.addr
)==FALSE
)
335 fprintf(stderr
,"%s: Syntax: -debugmsg +xxx,... or -debugmsg -xxx,...\n",argv
[0]);
336 fprintf(stderr
,"Example: -debugmsg +all,-heap turn on all messages except heap messages\n");
337 fprintf(stderr
,"Available message types:\n");
338 fprintf(stderr
,"%-9s ","all");
339 for(i
=0;i
<sizeof(debug_msg_enabled
)/sizeof(short);i
++)
340 if(debug_msg_name
[i
])
341 fprintf(stderr
,"%-9s%c",debug_msg_name
[i
],
342 (((i
+2)%8==0)?'\n':' '));
343 fprintf(stderr
,"\n\n");
349 if(MAIN_GetResource( db
, ".dll", &value
))
350 if(MAIN_ParseDLLOptions((char*)value
.addr
)==FALSE
)
353 fprintf(stderr
,"%s: Syntax: -dll +xxx,... or -dll -xxx,...\n",argv
[0]);
354 fprintf(stderr
,"Example: -dll -ole2 Do not use emulated OLE2.DLL\n");
355 fprintf(stderr
,"Available DLLs\n");
356 for(i
=0;i
<N_BUILTINS
;i
++)
357 fprintf(stderr
,"%-9s%c",dll_builtin_table
[i
].name
,
358 (((i
+2)%8==0)?'\n':' '));
359 fprintf(stderr
,"\n\n");
365 /***********************************************************************
368 static void MAIN_CreateDesktop( int argc
, char *argv
[] )
371 unsigned int width
= 640, height
= 480; /* Default size = 640x480 */
372 char *name
= "Wine desktop";
373 XSizeHints
*size_hints
;
375 XClassHint
*class_hints
;
376 XSetWindowAttributes win_attr
;
377 XTextProperty window_name
;
379 flags
= XParseGeometry( Options
.desktopGeometry
,
380 &desktopX
, &desktopY
, &width
, &height
);
382 screenHeight
= height
;
386 win_attr
.event_mask
= ExposureMask
| KeyPressMask
| KeyReleaseMask
|
387 PointerMotionMask
| ButtonPressMask
|
388 ButtonReleaseMask
| EnterWindowMask
|
390 win_attr
.cursor
= XCreateFontCursor( display
, XC_top_left_arrow
);
392 rootWindow
= XCreateWindow( display
, DefaultRootWindow(display
),
393 desktopX
, desktopY
, width
, height
, 0,
394 CopyFromParent
, InputOutput
, CopyFromParent
,
395 CWEventMask
| CWCursor
, &win_attr
);
397 /* Set window manager properties */
399 size_hints
= XAllocSizeHints();
400 wm_hints
= XAllocWMHints();
401 class_hints
= XAllocClassHint();
402 if (!size_hints
|| !wm_hints
|| !class_hints
)
404 fprintf( stderr
, "Not enough memory for window manager hints.\n" );
407 size_hints
->min_width
= size_hints
->max_width
= width
;
408 size_hints
->min_height
= size_hints
->max_height
= height
;
409 size_hints
->flags
= PMinSize
| PMaxSize
;
410 if (flags
& (XValue
| YValue
)) size_hints
->flags
|= USPosition
;
411 if (flags
& (WidthValue
| HeightValue
)) size_hints
->flags
|= USSize
;
412 else size_hints
->flags
|= PSize
;
414 wm_hints
->flags
= InputHint
| StateHint
;
415 wm_hints
->input
= True
;
416 wm_hints
->initial_state
= NormalState
;
417 class_hints
->res_name
= argv
[0];
418 class_hints
->res_class
= "Wine";
420 XStringListToTextProperty( &name
, 1, &window_name
);
421 XSetWMProperties( display
, rootWindow
, &window_name
, &window_name
,
422 argv
, argc
, size_hints
, wm_hints
, class_hints
);
425 XFree( class_hints
);
429 XMapWindow( display
, rootWindow
);
433 XKeyboardState keyboard_state
;
435 /***********************************************************************
438 static void MAIN_SaveSetup(void)
440 XGetKeyboardControl(display
, &keyboard_state
);
443 /***********************************************************************
446 static void MAIN_RestoreSetup(void)
448 XKeyboardControl keyboard_value
;
450 keyboard_value
.key_click_percent
= keyboard_state
.key_click_percent
;
451 keyboard_value
.bell_percent
= keyboard_state
.bell_percent
;
452 keyboard_value
.bell_pitch
= keyboard_state
.bell_pitch
;
453 keyboard_value
.bell_duration
= keyboard_state
.bell_duration
;
454 keyboard_value
.auto_repeat_mode
= keyboard_state
.global_auto_repeat
;
456 XChangeKeyboardControl(display
, KBKeyClickPercent
| KBBellPercent
|
457 KBBellPitch
| KBBellDuration
| KBAutoRepeatMode
, &keyboard_value
);
460 static void malloc_error()
462 fprintf(stderr
,"malloc is not feeling well. Good bye\n");
466 static void called_at_exit(void)
473 /***********************************************************************
476 int main( int argc
, char *argv
[] )
485 setlocale(LC_CTYPE
,"");
489 MAIN_ParseOptions( &argc
, argv
);
491 #ifdef MALLOC_DEBUGGING
494 char *trace
=getenv("MALLOC_TRACE");
497 dprintf_malloc(stddeb
,"MALLOC_TRACE not set. No trace generated\n");
500 dprintf_malloc(stddeb
,"malloc trace goes to %s\n",trace
);
503 mcheck(malloc_error
);
507 screen
= DefaultScreenOfDisplay( display
);
508 screenWidth
= WidthOfScreen( screen
);
509 screenHeight
= HeightOfScreen( screen
);
510 if (screenDepth
) /* -depth option specified */
512 depth_list
= XListDepths(display
,DefaultScreen(display
),&depth_count
);
513 for (i
= 0; i
< depth_count
; i
++)
514 if (depth_list
[i
] == screenDepth
) break;
516 if (i
>= depth_count
)
518 fprintf( stderr
, "%s: Depth %d not supported on this screen.\n",
519 Options
.programName
, screenDepth
);
523 else screenDepth
= DefaultDepthOfScreen( screen
);
524 if (Options
.synchronous
) XSynchronize( display
, True
);
525 if (Options
.desktopGeometry
) MAIN_CreateDesktop( argc
, argv
);
526 else rootWindow
= DefaultRootWindow( display
);
530 atexit(called_at_exit
);
532 on_exit (called_at_exit
, 0);
535 ret_val
= _WinMain( argc
, argv
);
540 /***********************************************************************
541 * MessageBeep (USER.104)
543 void MessageBeep(WORD i
)
548 /***********************************************************************
549 * GetVersion (KERNEL.3)
551 LONG
GetVersion(void)
553 return( 0x03300a03 ); /* dos 3.30 & win 3.10 */
556 /***********************************************************************
557 * GetWinFlags (KERNEL.132)
559 LONG
GetWinFlags(void)
561 if (Options
.enhanced
)
562 return (WF_STANDARD
| WF_ENHANCED
| WF_CPU286
| WF_PMODE
| WF_80x87
);
564 return (WF_STANDARD
| WF_CPU286
| WF_PMODE
| WF_80x87
);
567 /***********************************************************************
568 * SetEnvironment (GDI.132)
570 int SetEnvironment(LPSTR lpPortName
, LPSTR lpEnviron
, WORD nCount
)
573 LPENVENTRY lpEnv
= lpEnvList
;
574 printf("SetEnvironnement('%s', '%s', %d) !\n",
575 lpPortName
, lpEnviron
, nCount
);
576 if (lpPortName
== NULL
) return -1;
577 while (lpEnv
!= NULL
) {
578 if (lpEnv
->Name
!= NULL
&& strcmp(lpEnv
->Name
, lpPortName
) == 0) {
579 if (nCount
== 0 || lpEnviron
== NULL
) {
580 if (lpEnv
->Prev
!= NULL
) lpEnv
->Prev
->Next
= lpEnv
->Next
;
581 if (lpEnv
->Next
!= NULL
) lpEnv
->Next
->Prev
= lpEnv
->Prev
;
585 printf("SetEnvironnement() // entry deleted !\n");
589 lpEnv
->Value
= malloc(nCount
);
590 if (lpEnv
->Value
== NULL
) {
591 printf("SetEnvironment() // Error allocating entry value !\n");
594 memcpy(lpEnv
->Value
, lpEnviron
, nCount
);
595 lpEnv
->wSize
= nCount
;
596 printf("SetEnvironnement() // entry modified !\n");
599 if (lpEnv
->Next
== NULL
) break;
602 if (nCount
== 0 || lpEnviron
== NULL
) return -1;
603 printf("SetEnvironnement() // new entry !\n");
604 lpNewEnv
= malloc(sizeof(ENVENTRY
));
605 if (lpNewEnv
== NULL
) {
606 printf("SetEnvironment() // Error allocating new entry !\n");
609 if (lpEnvList
== NULL
) {
610 lpEnvList
= lpNewEnv
;
611 lpNewEnv
->Prev
= NULL
;
614 lpEnv
->Next
= lpNewEnv
;
615 lpNewEnv
->Prev
= lpEnv
;
617 lpNewEnv
->Next
= NULL
;
618 lpNewEnv
->Name
= malloc(strlen(lpPortName
) + 1);
619 if (lpNewEnv
->Name
== NULL
) {
620 printf("SetEnvironment() // Error allocating entry name !\n");
623 strcpy(lpNewEnv
->Name
, lpPortName
);
624 lpNewEnv
->Value
= malloc(nCount
);
625 if (lpNewEnv
->Value
== NULL
) {
626 printf("SetEnvironment() // Error allocating entry value !\n");
629 memcpy(lpNewEnv
->Value
, lpEnviron
, nCount
);
630 lpNewEnv
->wSize
= nCount
;
634 /***********************************************************************
635 * GetEnvironment (GDI.134)
637 int GetEnvironment(LPSTR lpPortName
, LPSTR lpEnviron
, WORD nMaxSiz
)
640 LPENVENTRY lpEnv
= lpEnvList
;
641 printf("GetEnvironnement('%s', '%s', %d) !\n",
642 lpPortName
, lpEnviron
, nMaxSiz
);
643 while (lpEnv
!= NULL
) {
644 if (lpEnv
->Name
!= NULL
&& strcmp(lpEnv
->Name
, lpPortName
) == 0) {
645 nCount
= min(nMaxSiz
, lpEnv
->wSize
);
646 memcpy(lpEnviron
, lpEnv
->Value
, nCount
);
647 printf("GetEnvironnement() // found '%s' !\n", lpEnviron
);
652 printf("GetEnvironnement() // not found !\n");
656 /***********************************************************************
657 * GetTimerResolution (USER.14)
659 LONG
GetTimerResolution(void)
664 /***********************************************************************
665 * SystemParametersInfo (USER.483)
667 BOOL
SystemParametersInfo (UINT uAction
, UINT uParam
, void FAR
*lpvParam
, UINT fuWinIni
)
671 XKeyboardState keyboard_state
;
672 XKeyboardControl keyboard_value
;
675 fprintf(stderr
, "SystemParametersInfo: action %d, param %x, flag %x\n",
676 uAction
, uParam
, fuWinIni
);
680 XGetKeyboardControl(display
, &keyboard_state
);
681 if (keyboard_state
.bell_percent
== 0)
682 *(BOOL
*) lpvParam
= FALSE
;
684 *(BOOL
*) lpvParam
= TRUE
;
688 *(INT
*) lpvParam
= 1;
691 case SPI_GETFASTTASKSWITCH
:
692 *(BOOL
*) lpvParam
= FALSE
;
695 case SPI_GETGRIDGRANULARITY
:
696 *(INT
*) lpvParam
= 1;
699 case SPI_GETICONTITLEWRAP
:
700 *(BOOL
*) lpvParam
= FALSE
;
703 case SPI_GETKEYBOARDDELAY
:
704 *(INT
*) lpvParam
= 1;
707 case SPI_GETKEYBOARDSPEED
:
708 *(WORD
*) lpvParam
= 30;
711 case SPI_GETMENUDROPALIGNMENT
:
712 *(BOOL
*) lpvParam
= FALSE
;
715 case SPI_GETSCREENSAVEACTIVE
:
716 *(BOOL
*) lpvParam
= FALSE
;
719 case SPI_GETSCREENSAVETIMEOUT
:
720 XGetScreenSaver(display
, &timeout
, &temp
,&temp
,&temp
);
721 *(INT
*) lpvParam
= timeout
* 1000;
724 case SPI_ICONHORIZONTALSPACING
:
725 if (lpvParam
== NULL
)
726 fprintf(stderr
, "SystemParametersInfo: Horizontal icon spacing set to %d\n.", uParam
);
728 *(INT
*) lpvParam
= 50;
731 case SPI_ICONVERTICALSPACING
:
732 if (lpvParam
== NULL
)
733 fprintf(stderr
, "SystemParametersInfo: Vertical icon spacing set to %d\n.", uParam
);
735 *(INT
*) lpvParam
= 50;
740 keyboard_value
.bell_percent
= -1;
742 keyboard_value
.bell_percent
= 0;
743 XChangeKeyboardControl(display
, KBBellPercent
,
747 case SPI_SETSCREENSAVEACTIVE
:
749 XActivateScreenSaver(display
);
751 XResetScreenSaver(display
);
754 case SPI_SETSCREENSAVETIMEOUT
:
755 XSetScreenSaver(display
, uParam
, 60, DefaultBlanking
,
759 case SPI_SETDESKWALLPAPER
:
760 return (SetDeskWallPaper((LPSTR
) lpvParam
));
763 case SPI_SETDESKPATTERN
:
764 if ((INT
) uParam
== -1) {
765 GetProfileString("Desktop", "Pattern",
766 "170 85 170 85 170 85 170 85",
767 buffer
, sizeof(buffer
) );
768 return (DESKTOP_SetPattern((LPSTR
) buffer
));
770 return (DESKTOP_SetPattern((LPSTR
) lpvParam
));
773 case SPI_GETICONTITLELOGFONT
:
775 LPLOGFONT lpLogFont
= (LPLOGFONT
)lpvParam
;
776 lpLogFont
->lfHeight
= 10;
777 lpLogFont
->lfWidth
= 0;
778 lpLogFont
->lfEscapement
= lpLogFont
->lfOrientation
= 0;
779 lpLogFont
->lfWeight
= FW_NORMAL
;
780 lpLogFont
->lfItalic
= lpLogFont
->lfStrikeOut
= lpLogFont
->lfUnderline
= FALSE
;
781 lpLogFont
->lfCharSet
= ANSI_CHARSET
;
782 lpLogFont
->lfOutPrecision
= OUT_DEFAULT_PRECIS
;
783 lpLogFont
->lfClipPrecision
= CLIP_DEFAULT_PRECIS
;
784 lpLogFont
->lfPitchAndFamily
= DEFAULT_PITCH
| FF_SWISS
;
789 case SPI_SETDOUBLECLKHEIGHT
:
790 case SPI_SETDOUBLECLICKTIME
:
791 case SPI_SETDOUBLECLKWIDTH
:
792 case SPI_SETFASTTASKSWITCH
:
793 case SPI_SETKEYBOARDDELAY
:
794 case SPI_SETKEYBOARDSPEED
:
795 fprintf(stderr
, "SystemParametersInfo: option %d ignored.\n", uParam
);
799 fprintf(stderr
, "SystemParametersInfo: unknown option %d.\n", uParam
);
805 /***********************************************************************
806 * HMEMCPY (KERNEL.348)
808 void hmemcpy(void FAR
*hpvDest
, const void FAR
*hpvSource
, long cbCopy
)
810 memcpy(hpvDest
, hpvSource
, cbCopy
);
813 /***********************************************************************
816 void Copy(LPVOID lpSource
, LPVOID lpDest
, WORD nBytes
)
818 memcpy(lpDest
, lpSource
, nBytes
);
821 /***********************************************************************
822 * SWAPMOUSEBUTTON (USER.186)
824 BOOL
SwapMouseButton(BOOL fSwap
)
826 return 0; /* don't swap */
829 /***********************************************************************
830 * FileCDR (KERNEL.130)
832 void FileCDR(FARPROC x
)
834 printf("FileCDR(%8x)\n", (int) x
);