Release 950109
Thu Jan 5 13:37:42 1995 Cameron Heide (heide@ee.ualberta.ca) * [memory/global.c] GlobalCompact should now return the correct value when the largest run of free blocks includes the last block. * [windows/mdi.c] Tiling and cascading windows without any MDI children should no longer crash (assuming no-op is the correct thing to do). Sun Jan 1 23:30:25 1995 Fons Botman <botman@rabo.nl> * [objects/font.c] GetTextExtentPoint: fixed debug output, str is counted string, not zero terminated. * [if1632/relay.c] DLLRelay: when debugging_stack got segv, added upper bound for stack dump.
This commit is contained in:
parent
3a5816f87e
commit
7cbe65725a
17
ANNOUNCE
17
ANNOUNCE
|
@ -1,12 +1,13 @@
|
|||
This is release 941227 of Wine the MS Windows emulator. This is still a
|
||||
This is release 950109 of Wine the MS Windows emulator. This is still a
|
||||
developer's only release. There are many bugs and many unimplemented API
|
||||
features. Most applications still do not work.
|
||||
|
||||
Patches should be submitted to "wine-new@amscons.com". Please don't forget
|
||||
to include a ChangeLog entry. I'll try to make a new release every Sunday.
|
||||
|
||||
WHAT'S NEW with Wine-941227: (see ChangeLog for details)
|
||||
- Better BitBlt()
|
||||
WHAT'S NEW with Wine-950109: (see ChangeLog for details)
|
||||
- Compiling with -Wall. Don't panic if you get many warnings...
|
||||
- Better StretchBlt()
|
||||
- Lots of bug fixes
|
||||
|
||||
See the README file in the distribution for installation instructions.
|
||||
|
@ -15,11 +16,11 @@ Because of lags created by using mirror, this message may reach you before
|
|||
the release is available at the ftp sites. The sources will be available
|
||||
from the following locations:
|
||||
|
||||
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-941227.tar.gz
|
||||
aris.com:/pub/linux/ALPHA/Wine/development/Wine-941227.tar.gz
|
||||
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-941227.tar.gz
|
||||
ftp.funet.fi:/pub/OS/Linux/ALPHA/Wine/Wine-941227.tar.gz
|
||||
ftp.wonderland.org:/Wine/Wine-941227.tar.gz
|
||||
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-950109.tar.gz
|
||||
aris.com:/pub/linux/ALPHA/Wine/development/Wine-950109.tar.gz
|
||||
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-950109.tar.gz
|
||||
ftp.funet.fi:/pub/OS/Linux/ALPHA/Wine/Wine-950109.tar.gz
|
||||
ftp.wonderland.org:/Wine/Wine-950109.tar.gz
|
||||
|
||||
If you submitted a patch, please check to make sure it has been
|
||||
included in the new release.
|
||||
|
|
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
Thu Jan 5 13:37:42 1995 Cameron Heide (heide@ee.ualberta.ca)
|
||||
|
||||
* [memory/global.c]
|
||||
GlobalCompact should now return the correct value when the
|
||||
largest run of free blocks includes the last block.
|
||||
|
||||
* [windows/mdi.c]
|
||||
Tiling and cascading windows without any MDI children should
|
||||
no longer crash (assuming no-op is the correct thing to do).
|
||||
|
||||
Sun Jan 1 23:30:25 1995 Fons Botman <botman@rabo.nl>
|
||||
|
||||
* objects/font.c (GetTextExtentPoint):
|
||||
Fixed debug output, str is counted string, not zero terminated.
|
||||
|
||||
* if1632/relay.c (DLLRelay):
|
||||
When debugging_stack got segv, added upper bound for stack dump.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Tue Dec 27 13:35:16 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
|
||||
|
||||
* [*/Imakefile]
|
||||
|
|
|
@ -7,6 +7,7 @@ CC = gcc -D__FreeBSD__
|
|||
#endif
|
||||
|
||||
DEFINES = AutoDefines -DUSE_READLINE -DWINESTAT
|
||||
CDEBUGFLAGS = -O2 -Wall
|
||||
|
||||
/*
|
||||
* This is the second try at using Imakefiles. There are probably many
|
||||
|
|
|
@ -367,7 +367,7 @@ static void CB_Paint( HWND hWnd, HDC hDC, WORD action )
|
|||
((wndPtr->dwStyle & 0x0f) == BS_AUTORADIOBUTTON)) y += checkBoxHeight;
|
||||
else if (infoPtr->state & BUTTON_3STATE) y += 2 * checkBoxHeight;
|
||||
GRAPH_DrawBitmap( hDC, hbitmapCheckBoxes, rc.left, rc.top + delta,
|
||||
x, y, checkBoxWidth, checkBoxHeight, SRCCOPY );
|
||||
x, y, checkBoxWidth, checkBoxHeight );
|
||||
rc.left += checkBoxWidth + tm.tmAveCharWidth / 2;
|
||||
|
||||
if (action == ODA_DRAWENTIRE)
|
||||
|
|
|
@ -16,7 +16,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
|||
#include "user.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_COMBO */
|
||||
#include "debug.h"
|
||||
|
@ -271,8 +270,7 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
|
||||
GRAPH_DrawBitmap( hDC, hComboBit,
|
||||
rect.right - bm.bmWidth, 0,
|
||||
0, 0, bm.bmWidth, bm.bmHeight,
|
||||
SRCCOPY );
|
||||
0, 0, bm.bmWidth, bm.bmHeight );
|
||||
}
|
||||
EndPaint(hwnd, &paintstruct);
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
|
|
|
@ -95,7 +95,7 @@ static LONG DESKTOP_DoEraseBkgnd( HWND hwnd, HDC hdc, DESKTOPINFO *infoPtr )
|
|||
GRAPH_DrawBitmap( hdc, infoPtr->hbitmapWallPaper,
|
||||
x, y, 0, 0,
|
||||
infoPtr->bitmapSize.cx,
|
||||
infoPtr->bitmapSize.cy, SRCCOPY );
|
||||
infoPtr->bitmapSize.cy );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -104,8 +104,7 @@ static LONG DESKTOP_DoEraseBkgnd( HWND hwnd, HDC hdc, DESKTOPINFO *infoPtr )
|
|||
if (x < 0) x = 0;
|
||||
if (y < 0) y = 0;
|
||||
GRAPH_DrawBitmap( hdc, infoPtr->hbitmapWallPaper, x, y, 0, 0,
|
||||
infoPtr->bitmapSize.cx, infoPtr->bitmapSize.cy,
|
||||
SRCCOPY );
|
||||
infoPtr->bitmapSize.cx, infoPtr->bitmapSize.cy );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1091,7 +1091,7 @@ int ListBoxGetSel(HWND hwnd, WORD wIndex)
|
|||
int ListBoxDirectory(HWND hwnd, UINT attrib, LPSTR filespec)
|
||||
{
|
||||
struct dosdirent *dp;
|
||||
int x, wRet;
|
||||
int x, wRet = LB_OKAY;
|
||||
BOOL OldFlag;
|
||||
char temp[256];
|
||||
LPHEADLIST lphl;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* Menus functions
|
||||
static char RCSId[] = "$Id$";
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
static char Copyright2[] = "Copyright Alexandre Julliard, 1994";
|
||||
*/
|
||||
* Menu functions
|
||||
*
|
||||
* Copyright 1993 Martin Ayotte
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note: the style MF_MOUSESELECT is used to mark popup items that
|
||||
|
@ -18,7 +18,6 @@ static char Copyright2[] = "Copyright Alexandre Julliard, 1994";
|
|||
#include "windows.h"
|
||||
#include "syscolor.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "prototypes.h"
|
||||
#include "menu.h"
|
||||
#include "user.h"
|
||||
#include "win.h"
|
||||
|
@ -482,15 +481,13 @@ static void MENU_DrawMenuItem( HDC hdc, LPMENUITEM lpitem,
|
|||
GRAPH_DrawBitmap(hdc, lpitem->hCheckBit ? lpitem->hCheckBit :
|
||||
hStdCheck, rect.left,
|
||||
(rect.top+rect.bottom-check_bitmap_height) / 2,
|
||||
0, 0, check_bitmap_width, check_bitmap_height,
|
||||
SRCCOPY);
|
||||
0, 0, check_bitmap_width, check_bitmap_height );
|
||||
}
|
||||
else if (lpitem->hUnCheckBit != 0) /* Not checked */
|
||||
{
|
||||
GRAPH_DrawBitmap(hdc, lpitem->hUnCheckBit, rect.left,
|
||||
(rect.top+rect.bottom-check_bitmap_height) / 2,
|
||||
0, 0, check_bitmap_width, check_bitmap_height,
|
||||
SRCCOPY);
|
||||
0, 0, check_bitmap_width, check_bitmap_height );
|
||||
}
|
||||
|
||||
/* Draw the popup-menu arrow */
|
||||
|
@ -500,8 +497,7 @@ static void MENU_DrawMenuItem( HDC hdc, LPMENUITEM lpitem,
|
|||
GRAPH_DrawBitmap( hdc, hStdMnArrow,
|
||||
rect.right-arrow_bitmap_width-1,
|
||||
(rect.top+rect.bottom-arrow_bitmap_height) / 2,
|
||||
0, 0, arrow_bitmap_width, arrow_bitmap_height,
|
||||
SRCCOPY );
|
||||
0, 0, arrow_bitmap_width, arrow_bitmap_height );
|
||||
}
|
||||
|
||||
rect.left += check_bitmap_width;
|
||||
|
@ -513,8 +509,7 @@ static void MENU_DrawMenuItem( HDC hdc, LPMENUITEM lpitem,
|
|||
if (lpitem->item_flags & MF_BITMAP)
|
||||
{
|
||||
GRAPH_DrawBitmap( hdc, (HBITMAP)lpitem->hText, rect.left, rect.top,
|
||||
0, 0, rect.right-rect.left, rect.bottom-rect.top,
|
||||
SRCCOPY );
|
||||
0, 0, rect.right-rect.left, rect.bottom-rect.top );
|
||||
return;
|
||||
}
|
||||
/* No bitmap - process text if present */
|
||||
|
@ -1018,7 +1013,7 @@ static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
|||
{
|
||||
POPUPMENU *menu;
|
||||
MENUITEM *item;
|
||||
HMENU hsubmenu;
|
||||
HMENU hsubmenu = 0;
|
||||
WORD id;
|
||||
|
||||
if (!hmenu) return FALSE; /* Outside all menus */
|
||||
|
|
|
@ -163,6 +163,9 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, int nBar, RECT *lprect,
|
|||
GetClientRect( hwnd, lprect );
|
||||
vertical = ((wndPtr->dwStyle & SBS_VERT) != 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (vertical) pixels = lprect->bottom - lprect->top;
|
||||
|
@ -267,6 +270,7 @@ static void SCROLL_DrawArrows( HDC hdc, SCROLLINFO *infoPtr, RECT *rect,
|
|||
HBITMAP hbmpPrev = SelectObject( hdcMem, vertical ?
|
||||
TOP_ARROW(infoPtr->flags, top_pressed)
|
||||
: LEFT_ARROW(infoPtr->flags, top_pressed));
|
||||
SetStretchBltMode( hdc, STRETCH_DELETESCANS );
|
||||
StretchBlt( hdc, rect->left, rect->top,
|
||||
vertical ? rect->right-rect->left : arrowSize+1,
|
||||
vertical ? arrowSize+1 : rect->bottom-rect->top,
|
||||
|
@ -385,7 +389,7 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT *rect,
|
|||
if (!thumbPos) /* No thumb to draw */
|
||||
{
|
||||
PatBlt( hdc, r.left+1, r.top+1, r.right - r.left - 2,
|
||||
r.bottom - r.top - 2, SRCCOPY );
|
||||
r.bottom - r.top - 2, PATCOPY );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -394,12 +398,12 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT *rect,
|
|||
PatBlt( hdc, r.left + 1, r.top + 1,
|
||||
r.right - r.left - 2,
|
||||
thumbPos - arrowSize,
|
||||
top_selected ? NOTSRCCOPY : SRCCOPY );
|
||||
top_selected ? 0x0f0000 : PATCOPY );
|
||||
r.top += thumbPos - arrowSize;
|
||||
PatBlt( hdc, r.left + 1, r.top + SYSMETRICS_CYHSCROLL + 1,
|
||||
r.right - r.left - 2,
|
||||
r.bottom - r.top - SYSMETRICS_CYHSCROLL - 2,
|
||||
bottom_selected ? NOTSRCCOPY : SRCCOPY );
|
||||
bottom_selected ? 0x0f0000 : PATCOPY );
|
||||
r.bottom = r.top + SYSMETRICS_CYHSCROLL + 1;
|
||||
}
|
||||
else /* horizontal */
|
||||
|
@ -407,12 +411,12 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT *rect,
|
|||
PatBlt( hdc, r.left + 1, r.top + 1,
|
||||
thumbPos - arrowSize,
|
||||
r.bottom - r.top - 2,
|
||||
top_selected ? NOTSRCCOPY : SRCCOPY );
|
||||
top_selected ? 0x0f0000 : PATCOPY );
|
||||
r.left += thumbPos - arrowSize;
|
||||
PatBlt( hdc, r.left + SYSMETRICS_CYHSCROLL + 1, r.top + 1,
|
||||
r.right - r.left - SYSMETRICS_CYHSCROLL - 2,
|
||||
r.bottom - r.top - 2,
|
||||
bottom_selected ? NOTSRCCOPY : SRCCOPY );
|
||||
bottom_selected ? 0x0f0000 : PATCOPY );
|
||||
r.right = r.left + SYSMETRICS_CXVSCROLL + 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -211,6 +211,9 @@ static void PaintTextfn( HWND hwnd, HDC hdc )
|
|||
case SS_LEFTNOWORDWRAP:
|
||||
wFormat = DT_LEFT | DT_SINGLELINE | DT_EXPANDTABS | DT_VCENTER;
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (style & SS_NOPREFIX)
|
||||
|
@ -247,6 +250,9 @@ static void PaintRectfn( HWND hwnd, HDC hdc )
|
|||
case SS_WHITERECT:
|
||||
hBrush = CreateSolidBrush(color_window);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
FillRect( hdc, &rc, hBrush );
|
||||
}
|
||||
|
@ -274,6 +280,9 @@ static void PaintFramefn( HWND hwnd, HDC hdc )
|
|||
case SS_WHITEFRAME:
|
||||
hPen = CreatePen(PS_SOLID, 1, color_window);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
hBrush = CreateSolidBrush(color_window);
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <neexe.h>
|
||||
#include <segmem.h>
|
||||
#include <prototypes.h>
|
||||
#include "selectors.h"
|
||||
#include <wine.h>
|
||||
#include <dlls.h>
|
||||
|
|
|
@ -555,7 +555,7 @@ substrcmp(text, pat, len)
|
|||
if ((c = *pat) == '\0')
|
||||
return *text == '\0';
|
||||
for ( ; *text; text++)
|
||||
if (*text == c && strncmp(text, pat, len) == 0)
|
||||
if ((CHAR)*text == c && strncmp(text, pat, len) == 0)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ LONG CallWindowProc( WNDPROC func, HWND hwnd, WORD message,
|
|||
}
|
||||
else if (IS_16_BIT_ADDRESS(func))
|
||||
{
|
||||
dprintf_callback(stddeb, "CallWindowProc // 16bit func=%p !\n",
|
||||
dprintf_callback(stddeb, "CallWindowProc // 16bit func=%08x !\n",
|
||||
(unsigned int) func);
|
||||
PushOn16( CALLBACK_SIZE_WORD, hwnd );
|
||||
PushOn16( CALLBACK_SIZE_WORD, message );
|
||||
|
|
|
@ -23,8 +23,8 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
#include "dlls.h"
|
||||
#include "options.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_RELAY /* */
|
||||
/* #define DEBUG_STACK /* */
|
||||
/* #define DEBUG_RELAY */
|
||||
/* #define DEBUG_STACK */
|
||||
#include "debug.h"
|
||||
|
||||
#if 0
|
||||
|
@ -129,7 +129,9 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
|||
if(debugging_stack)
|
||||
{
|
||||
unsigned short *stack_p = (unsigned short *) seg_off;
|
||||
for (i = 0; i < 24; i++, stack_p++)
|
||||
/* FIXME: Is there an end-of-stack-pointer somewhere ? */
|
||||
int n = min(24, (0x10000 - (seg_off & 0xffff)) / sizeof(*stack_p));
|
||||
for (i = 0; i < n; i++, stack_p++)
|
||||
{
|
||||
printf("%04x ", *stack_p);
|
||||
if ((i & 7) == 7)
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
* Copyright 1993, 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#ifndef BITMAP_H
|
||||
#define BITMAP_H
|
||||
#ifndef __WINE_BITMAP_H
|
||||
#define __WINE_BITMAP_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include "windows.h"
|
||||
#include "gdi.h"
|
||||
|
||||
/* objects/bitmap.c */
|
||||
extern BOOL BITMAP_Init(void);
|
||||
|
||||
/* objects/dib.c */
|
||||
extern int DIB_GetImageWidthBytes( int width, int depth );
|
||||
extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
|
||||
/* GDI logical bitmap object */
|
||||
typedef struct
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
BITMAP bitmap;
|
||||
Pixmap pixmap;
|
||||
SIZE size; /* For SetBitmapDimension() */
|
||||
} BITMAPOBJ;
|
||||
|
||||
/* GCs used for B&W and color bitmap operations */
|
||||
extern GC BITMAP_monoGC, BITMAP_colorGC;
|
||||
|
@ -32,4 +32,15 @@ extern GC BITMAP_monoGC, BITMAP_colorGC;
|
|||
(width), (height), 32, width_bytes ); \
|
||||
}
|
||||
|
||||
#endif /* BITMAP_H */
|
||||
/* objects/bitmap.c */
|
||||
extern BOOL BITMAP_Init(void);
|
||||
extern int BITMAP_GetObject( BITMAPOBJ * bmp, int count, LPSTR buffer );
|
||||
extern BOOL BITMAP_DeleteObject( HBITMAP hbitmap, BITMAPOBJ * bitmap );
|
||||
extern HBITMAP BITMAP_SelectObject( HDC hdc, DC * dc, HBITMAP hbitmap,
|
||||
BITMAPOBJ * bmp );
|
||||
|
||||
/* objects/dib.c */
|
||||
extern int DIB_GetImageWidthBytes( int width, int depth );
|
||||
extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
|
||||
|
||||
#endif /* __WINE_BITMAP_H */
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* GDI brush definitions
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#ifndef __WINE_BRUSH_H
|
||||
#define __WINE_BRUSH_H
|
||||
|
||||
#include "gdi.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* GDI logical brush object */
|
||||
typedef struct
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGBRUSH logbrush WINE_PACKED;
|
||||
} BRUSHOBJ;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
extern BOOL BRUSH_Init(void);
|
||||
extern int BRUSH_GetObject( BRUSHOBJ * brush, int count, LPSTR buffer );
|
||||
extern BOOL BRUSH_DeleteObject( HBRUSH hbrush, BRUSHOBJ * brush );
|
||||
extern HBRUSH BRUSH_SelectObject( HDC hdc, DC * dc, HBRUSH hbrush,
|
||||
BRUSHOBJ * brush );
|
||||
|
||||
#endif /* __WINE_BRUSH_H */
|
14
include/dc.h
14
include/dc.h
|
@ -1,12 +1,20 @@
|
|||
/*
|
||||
* GDI Device Context function prototypes
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __WINE_DC_H
|
||||
#define __WINE_DC_H
|
||||
|
||||
#include "gdi.h"
|
||||
|
||||
extern void DC_InitDC( HDC hdc );
|
||||
extern int DC_SetupGCForBrush( DC * dc );
|
||||
extern int DC_SetupGCForPen( DC * dc );
|
||||
extern int DC_SetupGCForText( DC * dc );
|
||||
extern BOOL DC_SetupGCForPatBlt( DC * dc, GC gc, BOOL fMapColors );
|
||||
extern BOOL DC_SetupGCForBrush( DC * dc );
|
||||
extern BOOL DC_SetupGCForPen( DC * dc );
|
||||
extern BOOL DC_SetupGCForText( DC * dc );
|
||||
|
||||
extern const int DC_XROPfunction[];
|
||||
|
||||
|
|
281
include/debug.h
281
include/debug.h
|
@ -7,6 +7,7 @@
|
|||
|
||||
#ifdef DEBUG_NONE_EXT
|
||||
#undef DEBUG_ACCEL
|
||||
#undef DEBUG_BITBLT
|
||||
#undef DEBUG_BITMAP
|
||||
#undef DEBUG_CALLBACK
|
||||
#undef DEBUG_CARET
|
||||
|
@ -76,6 +77,7 @@
|
|||
|
||||
#ifdef DEBUG_ALL_EXT
|
||||
#define DEBUG_ACCEL
|
||||
#define DEBUG_BITBLT
|
||||
#define DEBUG_BITMAP
|
||||
#define DEBUG_CALLBACK
|
||||
#define DEBUG_CARET
|
||||
|
@ -151,6 +153,11 @@ short debug_msg_enabled[]={
|
|||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_BITBLT
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_BITMAP
|
||||
1,
|
||||
#else
|
||||
|
@ -497,8 +504,21 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_bitmap if(debug_msg_enabled[1]) fprintf
|
||||
#define debugging_bitmap debug_msg_enabled[1]
|
||||
#define dprintf_bitblt if(debug_msg_enabled[1]) fprintf
|
||||
#define debugging_bitblt debug_msg_enabled[1]
|
||||
#else
|
||||
#ifdef DEBUG_BITBLT
|
||||
#define dprintf_bitblt fprintf
|
||||
#define debugging_bitblt 1
|
||||
#else
|
||||
#define dprintf_bitblt
|
||||
#define debugging_bitblt 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_bitmap if(debug_msg_enabled[2]) fprintf
|
||||
#define debugging_bitmap debug_msg_enabled[2]
|
||||
#else
|
||||
#ifdef DEBUG_BITMAP
|
||||
#define dprintf_bitmap fprintf
|
||||
|
@ -510,8 +530,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_callback if(debug_msg_enabled[2]) fprintf
|
||||
#define debugging_callback debug_msg_enabled[2]
|
||||
#define dprintf_callback if(debug_msg_enabled[3]) fprintf
|
||||
#define debugging_callback debug_msg_enabled[3]
|
||||
#else
|
||||
#ifdef DEBUG_CALLBACK
|
||||
#define dprintf_callback fprintf
|
||||
|
@ -523,8 +543,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_caret if(debug_msg_enabled[3]) fprintf
|
||||
#define debugging_caret debug_msg_enabled[3]
|
||||
#define dprintf_caret if(debug_msg_enabled[4]) fprintf
|
||||
#define debugging_caret debug_msg_enabled[4]
|
||||
#else
|
||||
#ifdef DEBUG_CARET
|
||||
#define dprintf_caret fprintf
|
||||
|
@ -536,8 +556,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_catch if(debug_msg_enabled[4]) fprintf
|
||||
#define debugging_catch debug_msg_enabled[4]
|
||||
#define dprintf_catch if(debug_msg_enabled[5]) fprintf
|
||||
#define debugging_catch debug_msg_enabled[5]
|
||||
#else
|
||||
#ifdef DEBUG_CATCH
|
||||
#define dprintf_catch fprintf
|
||||
|
@ -549,8 +569,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_cdaudio if(debug_msg_enabled[5]) fprintf
|
||||
#define debugging_cdaudio debug_msg_enabled[5]
|
||||
#define dprintf_cdaudio if(debug_msg_enabled[6]) fprintf
|
||||
#define debugging_cdaudio debug_msg_enabled[6]
|
||||
#else
|
||||
#ifdef DEBUG_CDAUDIO
|
||||
#define dprintf_cdaudio fprintf
|
||||
|
@ -562,8 +582,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_class if(debug_msg_enabled[6]) fprintf
|
||||
#define debugging_class debug_msg_enabled[6]
|
||||
#define dprintf_class if(debug_msg_enabled[7]) fprintf
|
||||
#define debugging_class debug_msg_enabled[7]
|
||||
#else
|
||||
#ifdef DEBUG_CLASS
|
||||
#define dprintf_class fprintf
|
||||
|
@ -575,8 +595,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_clipboard if(debug_msg_enabled[7]) fprintf
|
||||
#define debugging_clipboard debug_msg_enabled[7]
|
||||
#define dprintf_clipboard if(debug_msg_enabled[8]) fprintf
|
||||
#define debugging_clipboard debug_msg_enabled[8]
|
||||
#else
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
#define dprintf_clipboard fprintf
|
||||
|
@ -588,8 +608,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_clipping if(debug_msg_enabled[8]) fprintf
|
||||
#define debugging_clipping debug_msg_enabled[8]
|
||||
#define dprintf_clipping if(debug_msg_enabled[9]) fprintf
|
||||
#define debugging_clipping debug_msg_enabled[9]
|
||||
#else
|
||||
#ifdef DEBUG_CLIPPING
|
||||
#define dprintf_clipping fprintf
|
||||
|
@ -601,8 +621,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_combo if(debug_msg_enabled[9]) fprintf
|
||||
#define debugging_combo debug_msg_enabled[9]
|
||||
#define dprintf_combo if(debug_msg_enabled[10]) fprintf
|
||||
#define debugging_combo debug_msg_enabled[10]
|
||||
#else
|
||||
#ifdef DEBUG_COMBO
|
||||
#define dprintf_combo fprintf
|
||||
|
@ -614,8 +634,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_comm if(debug_msg_enabled[10]) fprintf
|
||||
#define debugging_comm debug_msg_enabled[10]
|
||||
#define dprintf_comm if(debug_msg_enabled[11]) fprintf
|
||||
#define debugging_comm debug_msg_enabled[11]
|
||||
#else
|
||||
#ifdef DEBUG_COMM
|
||||
#define dprintf_comm fprintf
|
||||
|
@ -627,8 +647,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_cursor if(debug_msg_enabled[11]) fprintf
|
||||
#define debugging_cursor debug_msg_enabled[11]
|
||||
#define dprintf_cursor if(debug_msg_enabled[12]) fprintf
|
||||
#define debugging_cursor debug_msg_enabled[12]
|
||||
#else
|
||||
#ifdef DEBUG_CURSOR
|
||||
#define dprintf_cursor fprintf
|
||||
|
@ -640,8 +660,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dc if(debug_msg_enabled[12]) fprintf
|
||||
#define debugging_dc debug_msg_enabled[12]
|
||||
#define dprintf_dc if(debug_msg_enabled[13]) fprintf
|
||||
#define debugging_dc debug_msg_enabled[13]
|
||||
#else
|
||||
#ifdef DEBUG_DC
|
||||
#define dprintf_dc fprintf
|
||||
|
@ -653,8 +673,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dialog if(debug_msg_enabled[13]) fprintf
|
||||
#define debugging_dialog debug_msg_enabled[13]
|
||||
#define dprintf_dialog if(debug_msg_enabled[14]) fprintf
|
||||
#define debugging_dialog debug_msg_enabled[14]
|
||||
#else
|
||||
#ifdef DEBUG_DIALOG
|
||||
#define dprintf_dialog fprintf
|
||||
|
@ -666,8 +686,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dll if(debug_msg_enabled[14]) fprintf
|
||||
#define debugging_dll debug_msg_enabled[14]
|
||||
#define dprintf_dll if(debug_msg_enabled[15]) fprintf
|
||||
#define debugging_dll debug_msg_enabled[15]
|
||||
#else
|
||||
#ifdef DEBUG_DLL
|
||||
#define dprintf_dll fprintf
|
||||
|
@ -679,8 +699,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dosfs if(debug_msg_enabled[15]) fprintf
|
||||
#define debugging_dosfs debug_msg_enabled[15]
|
||||
#define dprintf_dosfs if(debug_msg_enabled[16]) fprintf
|
||||
#define debugging_dosfs debug_msg_enabled[16]
|
||||
#else
|
||||
#ifdef DEBUG_DOSFS
|
||||
#define dprintf_dosfs fprintf
|
||||
|
@ -692,8 +712,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_driver if(debug_msg_enabled[16]) fprintf
|
||||
#define debugging_driver debug_msg_enabled[16]
|
||||
#define dprintf_driver if(debug_msg_enabled[17]) fprintf
|
||||
#define debugging_driver debug_msg_enabled[17]
|
||||
#else
|
||||
#ifdef DEBUG_DRIVER
|
||||
#define dprintf_driver fprintf
|
||||
|
@ -705,8 +725,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_edit if(debug_msg_enabled[17]) fprintf
|
||||
#define debugging_edit debug_msg_enabled[17]
|
||||
#define dprintf_edit if(debug_msg_enabled[18]) fprintf
|
||||
#define debugging_edit debug_msg_enabled[18]
|
||||
#else
|
||||
#ifdef DEBUG_EDIT
|
||||
#define dprintf_edit fprintf
|
||||
|
@ -718,8 +738,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_enum if(debug_msg_enabled[18]) fprintf
|
||||
#define debugging_enum debug_msg_enabled[18]
|
||||
#define dprintf_enum if(debug_msg_enabled[19]) fprintf
|
||||
#define debugging_enum debug_msg_enabled[19]
|
||||
#else
|
||||
#ifdef DEBUG_ENUM
|
||||
#define dprintf_enum fprintf
|
||||
|
@ -731,8 +751,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_event if(debug_msg_enabled[19]) fprintf
|
||||
#define debugging_event debug_msg_enabled[19]
|
||||
#define dprintf_event if(debug_msg_enabled[20]) fprintf
|
||||
#define debugging_event debug_msg_enabled[20]
|
||||
#else
|
||||
#ifdef DEBUG_EVENT
|
||||
#define dprintf_event fprintf
|
||||
|
@ -744,8 +764,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_exec if(debug_msg_enabled[20]) fprintf
|
||||
#define debugging_exec debug_msg_enabled[20]
|
||||
#define dprintf_exec if(debug_msg_enabled[21]) fprintf
|
||||
#define debugging_exec debug_msg_enabled[21]
|
||||
#else
|
||||
#ifdef DEBUG_EXEC
|
||||
#define dprintf_exec fprintf
|
||||
|
@ -757,8 +777,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_file if(debug_msg_enabled[21]) fprintf
|
||||
#define debugging_file debug_msg_enabled[21]
|
||||
#define dprintf_file if(debug_msg_enabled[22]) fprintf
|
||||
#define debugging_file debug_msg_enabled[22]
|
||||
#else
|
||||
#ifdef DEBUG_FILE
|
||||
#define dprintf_file fprintf
|
||||
|
@ -770,8 +790,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_fixup if(debug_msg_enabled[22]) fprintf
|
||||
#define debugging_fixup debug_msg_enabled[22]
|
||||
#define dprintf_fixup if(debug_msg_enabled[23]) fprintf
|
||||
#define debugging_fixup debug_msg_enabled[23]
|
||||
#else
|
||||
#ifdef DEBUG_FIXUP
|
||||
#define dprintf_fixup fprintf
|
||||
|
@ -783,8 +803,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_font if(debug_msg_enabled[23]) fprintf
|
||||
#define debugging_font debug_msg_enabled[23]
|
||||
#define dprintf_font if(debug_msg_enabled[24]) fprintf
|
||||
#define debugging_font debug_msg_enabled[24]
|
||||
#else
|
||||
#ifdef DEBUG_FONT
|
||||
#define dprintf_font fprintf
|
||||
|
@ -796,8 +816,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_gdi if(debug_msg_enabled[24]) fprintf
|
||||
#define debugging_gdi debug_msg_enabled[24]
|
||||
#define dprintf_gdi if(debug_msg_enabled[25]) fprintf
|
||||
#define debugging_gdi debug_msg_enabled[25]
|
||||
#else
|
||||
#ifdef DEBUG_GDI
|
||||
#define dprintf_gdi fprintf
|
||||
|
@ -809,8 +829,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_graphics if(debug_msg_enabled[25]) fprintf
|
||||
#define debugging_graphics debug_msg_enabled[25]
|
||||
#define dprintf_graphics if(debug_msg_enabled[26]) fprintf
|
||||
#define debugging_graphics debug_msg_enabled[26]
|
||||
#else
|
||||
#ifdef DEBUG_GRAPHICS
|
||||
#define dprintf_graphics fprintf
|
||||
|
@ -822,8 +842,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_heap if(debug_msg_enabled[26]) fprintf
|
||||
#define debugging_heap debug_msg_enabled[26]
|
||||
#define dprintf_heap if(debug_msg_enabled[27]) fprintf
|
||||
#define debugging_heap debug_msg_enabled[27]
|
||||
#else
|
||||
#ifdef DEBUG_HEAP
|
||||
#define dprintf_heap fprintf
|
||||
|
@ -835,8 +855,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_icon if(debug_msg_enabled[27]) fprintf
|
||||
#define debugging_icon debug_msg_enabled[27]
|
||||
#define dprintf_icon if(debug_msg_enabled[28]) fprintf
|
||||
#define debugging_icon debug_msg_enabled[28]
|
||||
#else
|
||||
#ifdef DEBUG_ICON
|
||||
#define dprintf_icon fprintf
|
||||
|
@ -848,8 +868,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_int if(debug_msg_enabled[28]) fprintf
|
||||
#define debugging_int debug_msg_enabled[28]
|
||||
#define dprintf_int if(debug_msg_enabled[29]) fprintf
|
||||
#define debugging_int debug_msg_enabled[29]
|
||||
#else
|
||||
#ifdef DEBUG_INT
|
||||
#define dprintf_int fprintf
|
||||
|
@ -861,8 +881,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_key if(debug_msg_enabled[29]) fprintf
|
||||
#define debugging_key debug_msg_enabled[29]
|
||||
#define dprintf_key if(debug_msg_enabled[30]) fprintf
|
||||
#define debugging_key debug_msg_enabled[30]
|
||||
#else
|
||||
#ifdef DEBUG_KEY
|
||||
#define dprintf_key fprintf
|
||||
|
@ -874,8 +894,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_keyboard if(debug_msg_enabled[30]) fprintf
|
||||
#define debugging_keyboard debug_msg_enabled[30]
|
||||
#define dprintf_keyboard if(debug_msg_enabled[31]) fprintf
|
||||
#define debugging_keyboard debug_msg_enabled[31]
|
||||
#else
|
||||
#ifdef DEBUG_KEYBOARD
|
||||
#define dprintf_keyboard fprintf
|
||||
|
@ -887,8 +907,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_ldt if(debug_msg_enabled[31]) fprintf
|
||||
#define debugging_ldt debug_msg_enabled[31]
|
||||
#define dprintf_ldt if(debug_msg_enabled[32]) fprintf
|
||||
#define debugging_ldt debug_msg_enabled[32]
|
||||
#else
|
||||
#ifdef DEBUG_LDT
|
||||
#define dprintf_ldt fprintf
|
||||
|
@ -900,8 +920,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_listbox if(debug_msg_enabled[32]) fprintf
|
||||
#define debugging_listbox debug_msg_enabled[32]
|
||||
#define dprintf_listbox if(debug_msg_enabled[33]) fprintf
|
||||
#define debugging_listbox debug_msg_enabled[33]
|
||||
#else
|
||||
#ifdef DEBUG_LISTBOX
|
||||
#define dprintf_listbox fprintf
|
||||
|
@ -913,8 +933,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mci if(debug_msg_enabled[33]) fprintf
|
||||
#define debugging_mci debug_msg_enabled[33]
|
||||
#define dprintf_mci if(debug_msg_enabled[34]) fprintf
|
||||
#define debugging_mci debug_msg_enabled[34]
|
||||
#else
|
||||
#ifdef DEBUG_MCI
|
||||
#define dprintf_mci fprintf
|
||||
|
@ -926,8 +946,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mcianim if(debug_msg_enabled[34]) fprintf
|
||||
#define debugging_mcianim debug_msg_enabled[34]
|
||||
#define dprintf_mcianim if(debug_msg_enabled[35]) fprintf
|
||||
#define debugging_mcianim debug_msg_enabled[35]
|
||||
#else
|
||||
#ifdef DEBUG_MCIANIM
|
||||
#define dprintf_mcianim fprintf
|
||||
|
@ -939,8 +959,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mciwave if(debug_msg_enabled[35]) fprintf
|
||||
#define debugging_mciwave debug_msg_enabled[35]
|
||||
#define dprintf_mciwave if(debug_msg_enabled[36]) fprintf
|
||||
#define debugging_mciwave debug_msg_enabled[36]
|
||||
#else
|
||||
#ifdef DEBUG_MCIWAVE
|
||||
#define dprintf_mciwave fprintf
|
||||
|
@ -952,8 +972,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mdi if(debug_msg_enabled[36]) fprintf
|
||||
#define debugging_mdi debug_msg_enabled[36]
|
||||
#define dprintf_mdi if(debug_msg_enabled[37]) fprintf
|
||||
#define debugging_mdi debug_msg_enabled[37]
|
||||
#else
|
||||
#ifdef DEBUG_MDI
|
||||
#define dprintf_mdi fprintf
|
||||
|
@ -965,8 +985,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_menu if(debug_msg_enabled[37]) fprintf
|
||||
#define debugging_menu debug_msg_enabled[37]
|
||||
#define dprintf_menu if(debug_msg_enabled[38]) fprintf
|
||||
#define debugging_menu debug_msg_enabled[38]
|
||||
#else
|
||||
#ifdef DEBUG_MENU
|
||||
#define dprintf_menu fprintf
|
||||
|
@ -978,8 +998,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_menucalc if(debug_msg_enabled[38]) fprintf
|
||||
#define debugging_menucalc debug_msg_enabled[38]
|
||||
#define dprintf_menucalc if(debug_msg_enabled[39]) fprintf
|
||||
#define debugging_menucalc debug_msg_enabled[39]
|
||||
#else
|
||||
#ifdef DEBUG_MENUCALC
|
||||
#define dprintf_menucalc fprintf
|
||||
|
@ -991,8 +1011,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_message if(debug_msg_enabled[39]) fprintf
|
||||
#define debugging_message debug_msg_enabled[39]
|
||||
#define dprintf_message if(debug_msg_enabled[40]) fprintf
|
||||
#define debugging_message debug_msg_enabled[40]
|
||||
#else
|
||||
#ifdef DEBUG_MESSAGE
|
||||
#define dprintf_message fprintf
|
||||
|
@ -1004,8 +1024,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_metafile if(debug_msg_enabled[40]) fprintf
|
||||
#define debugging_metafile debug_msg_enabled[40]
|
||||
#define dprintf_metafile if(debug_msg_enabled[41]) fprintf
|
||||
#define debugging_metafile debug_msg_enabled[41]
|
||||
#else
|
||||
#ifdef DEBUG_METAFILE
|
||||
#define dprintf_metafile fprintf
|
||||
|
@ -1017,8 +1037,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_midi if(debug_msg_enabled[41]) fprintf
|
||||
#define debugging_midi debug_msg_enabled[41]
|
||||
#define dprintf_midi if(debug_msg_enabled[42]) fprintf
|
||||
#define debugging_midi debug_msg_enabled[42]
|
||||
#else
|
||||
#ifdef DEBUG_MIDI
|
||||
#define dprintf_midi fprintf
|
||||
|
@ -1030,8 +1050,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmio if(debug_msg_enabled[42]) fprintf
|
||||
#define debugging_mmio debug_msg_enabled[42]
|
||||
#define dprintf_mmio if(debug_msg_enabled[43]) fprintf
|
||||
#define debugging_mmio debug_msg_enabled[43]
|
||||
#else
|
||||
#ifdef DEBUG_MMIO
|
||||
#define dprintf_mmio fprintf
|
||||
|
@ -1043,8 +1063,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmtime if(debug_msg_enabled[43]) fprintf
|
||||
#define debugging_mmtime debug_msg_enabled[43]
|
||||
#define dprintf_mmtime if(debug_msg_enabled[44]) fprintf
|
||||
#define debugging_mmtime debug_msg_enabled[44]
|
||||
#else
|
||||
#ifdef DEBUG_MMTIME
|
||||
#define dprintf_mmtime fprintf
|
||||
|
@ -1056,8 +1076,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_module if(debug_msg_enabled[44]) fprintf
|
||||
#define debugging_module debug_msg_enabled[44]
|
||||
#define dprintf_module if(debug_msg_enabled[45]) fprintf
|
||||
#define debugging_module debug_msg_enabled[45]
|
||||
#else
|
||||
#ifdef DEBUG_MODULE
|
||||
#define dprintf_module fprintf
|
||||
|
@ -1069,8 +1089,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_msg if(debug_msg_enabled[45]) fprintf
|
||||
#define debugging_msg debug_msg_enabled[45]
|
||||
#define dprintf_msg if(debug_msg_enabled[46]) fprintf
|
||||
#define debugging_msg debug_msg_enabled[46]
|
||||
#else
|
||||
#ifdef DEBUG_MSG
|
||||
#define dprintf_msg fprintf
|
||||
|
@ -1082,8 +1102,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_msgbox if(debug_msg_enabled[46]) fprintf
|
||||
#define debugging_msgbox debug_msg_enabled[46]
|
||||
#define dprintf_msgbox if(debug_msg_enabled[47]) fprintf
|
||||
#define debugging_msgbox debug_msg_enabled[47]
|
||||
#else
|
||||
#ifdef DEBUG_MSGBOX
|
||||
#define dprintf_msgbox fprintf
|
||||
|
@ -1095,8 +1115,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_nonclient if(debug_msg_enabled[47]) fprintf
|
||||
#define debugging_nonclient debug_msg_enabled[47]
|
||||
#define dprintf_nonclient if(debug_msg_enabled[48]) fprintf
|
||||
#define debugging_nonclient debug_msg_enabled[48]
|
||||
#else
|
||||
#ifdef DEBUG_NONCLIENT
|
||||
#define dprintf_nonclient fprintf
|
||||
|
@ -1108,8 +1128,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_palette if(debug_msg_enabled[48]) fprintf
|
||||
#define debugging_palette debug_msg_enabled[48]
|
||||
#define dprintf_palette if(debug_msg_enabled[49]) fprintf
|
||||
#define debugging_palette debug_msg_enabled[49]
|
||||
#else
|
||||
#ifdef DEBUG_PALETTE
|
||||
#define dprintf_palette fprintf
|
||||
|
@ -1121,8 +1141,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_profile if(debug_msg_enabled[49]) fprintf
|
||||
#define debugging_profile debug_msg_enabled[49]
|
||||
#define dprintf_profile if(debug_msg_enabled[50]) fprintf
|
||||
#define debugging_profile debug_msg_enabled[50]
|
||||
#else
|
||||
#ifdef DEBUG_PROFILE
|
||||
#define dprintf_profile fprintf
|
||||
|
@ -1134,8 +1154,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_prop if(debug_msg_enabled[50]) fprintf
|
||||
#define debugging_prop debug_msg_enabled[50]
|
||||
#define dprintf_prop if(debug_msg_enabled[51]) fprintf
|
||||
#define debugging_prop debug_msg_enabled[51]
|
||||
#else
|
||||
#ifdef DEBUG_PROP
|
||||
#define dprintf_prop fprintf
|
||||
|
@ -1147,8 +1167,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_reg if(debug_msg_enabled[51]) fprintf
|
||||
#define debugging_reg debug_msg_enabled[51]
|
||||
#define dprintf_reg if(debug_msg_enabled[52]) fprintf
|
||||
#define debugging_reg debug_msg_enabled[52]
|
||||
#else
|
||||
#ifdef DEBUG_REG
|
||||
#define dprintf_reg fprintf
|
||||
|
@ -1160,8 +1180,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_region if(debug_msg_enabled[52]) fprintf
|
||||
#define debugging_region debug_msg_enabled[52]
|
||||
#define dprintf_region if(debug_msg_enabled[53]) fprintf
|
||||
#define debugging_region debug_msg_enabled[53]
|
||||
#else
|
||||
#ifdef DEBUG_REGION
|
||||
#define dprintf_region fprintf
|
||||
|
@ -1173,8 +1193,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_relay if(debug_msg_enabled[53]) fprintf
|
||||
#define debugging_relay debug_msg_enabled[53]
|
||||
#define dprintf_relay if(debug_msg_enabled[54]) fprintf
|
||||
#define debugging_relay debug_msg_enabled[54]
|
||||
#else
|
||||
#ifdef DEBUG_RELAY
|
||||
#define dprintf_relay fprintf
|
||||
|
@ -1186,8 +1206,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_resource if(debug_msg_enabled[54]) fprintf
|
||||
#define debugging_resource debug_msg_enabled[54]
|
||||
#define dprintf_resource if(debug_msg_enabled[55]) fprintf
|
||||
#define debugging_resource debug_msg_enabled[55]
|
||||
#else
|
||||
#ifdef DEBUG_RESOURCE
|
||||
#define dprintf_resource fprintf
|
||||
|
@ -1199,8 +1219,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_scroll if(debug_msg_enabled[55]) fprintf
|
||||
#define debugging_scroll debug_msg_enabled[55]
|
||||
#define dprintf_scroll if(debug_msg_enabled[56]) fprintf
|
||||
#define debugging_scroll debug_msg_enabled[56]
|
||||
#else
|
||||
#ifdef DEBUG_SCROLL
|
||||
#define dprintf_scroll fprintf
|
||||
|
@ -1212,8 +1232,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_selectors if(debug_msg_enabled[56]) fprintf
|
||||
#define debugging_selectors debug_msg_enabled[56]
|
||||
#define dprintf_selectors if(debug_msg_enabled[57]) fprintf
|
||||
#define debugging_selectors debug_msg_enabled[57]
|
||||
#else
|
||||
#ifdef DEBUG_SELECTORS
|
||||
#define dprintf_selectors fprintf
|
||||
|
@ -1225,8 +1245,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_stack if(debug_msg_enabled[57]) fprintf
|
||||
#define debugging_stack debug_msg_enabled[57]
|
||||
#define dprintf_stack if(debug_msg_enabled[58]) fprintf
|
||||
#define debugging_stack debug_msg_enabled[58]
|
||||
#else
|
||||
#ifdef DEBUG_STACK
|
||||
#define dprintf_stack fprintf
|
||||
|
@ -1238,8 +1258,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_stress if(debug_msg_enabled[58]) fprintf
|
||||
#define debugging_stress debug_msg_enabled[58]
|
||||
#define dprintf_stress if(debug_msg_enabled[59]) fprintf
|
||||
#define debugging_stress debug_msg_enabled[59]
|
||||
#else
|
||||
#ifdef DEBUG_STRESS
|
||||
#define dprintf_stress fprintf
|
||||
|
@ -1251,8 +1271,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_syscolor if(debug_msg_enabled[59]) fprintf
|
||||
#define debugging_syscolor debug_msg_enabled[59]
|
||||
#define dprintf_syscolor if(debug_msg_enabled[60]) fprintf
|
||||
#define debugging_syscolor debug_msg_enabled[60]
|
||||
#else
|
||||
#ifdef DEBUG_SYSCOLOR
|
||||
#define dprintf_syscolor fprintf
|
||||
|
@ -1264,8 +1284,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_task if(debug_msg_enabled[60]) fprintf
|
||||
#define debugging_task debug_msg_enabled[60]
|
||||
#define dprintf_task if(debug_msg_enabled[61]) fprintf
|
||||
#define debugging_task debug_msg_enabled[61]
|
||||
#else
|
||||
#ifdef DEBUG_TASK
|
||||
#define dprintf_task fprintf
|
||||
|
@ -1277,8 +1297,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_text if(debug_msg_enabled[61]) fprintf
|
||||
#define debugging_text debug_msg_enabled[61]
|
||||
#define dprintf_text if(debug_msg_enabled[62]) fprintf
|
||||
#define debugging_text debug_msg_enabled[62]
|
||||
#else
|
||||
#ifdef DEBUG_TEXT
|
||||
#define dprintf_text fprintf
|
||||
|
@ -1290,8 +1310,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_timer if(debug_msg_enabled[62]) fprintf
|
||||
#define debugging_timer debug_msg_enabled[62]
|
||||
#define dprintf_timer if(debug_msg_enabled[63]) fprintf
|
||||
#define debugging_timer debug_msg_enabled[63]
|
||||
#else
|
||||
#ifdef DEBUG_TIMER
|
||||
#define dprintf_timer fprintf
|
||||
|
@ -1303,8 +1323,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_utility if(debug_msg_enabled[63]) fprintf
|
||||
#define debugging_utility debug_msg_enabled[63]
|
||||
#define dprintf_utility if(debug_msg_enabled[64]) fprintf
|
||||
#define debugging_utility debug_msg_enabled[64]
|
||||
#else
|
||||
#ifdef DEBUG_UTILITY
|
||||
#define dprintf_utility fprintf
|
||||
|
@ -1316,8 +1336,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_win if(debug_msg_enabled[64]) fprintf
|
||||
#define debugging_win debug_msg_enabled[64]
|
||||
#define dprintf_win if(debug_msg_enabled[65]) fprintf
|
||||
#define debugging_win debug_msg_enabled[65]
|
||||
#else
|
||||
#ifdef DEBUG_WIN
|
||||
#define dprintf_win fprintf
|
||||
|
@ -1329,8 +1349,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_winsock if(debug_msg_enabled[65]) fprintf
|
||||
#define debugging_winsock debug_msg_enabled[65]
|
||||
#define dprintf_winsock if(debug_msg_enabled[66]) fprintf
|
||||
#define debugging_winsock debug_msg_enabled[66]
|
||||
#else
|
||||
#ifdef DEBUG_WINSOCK
|
||||
#define dprintf_winsock fprintf
|
||||
|
@ -1346,6 +1366,7 @@ extern short debug_msg_enabled[];
|
|||
#ifdef DEBUG_DEFINE_VARIABLES
|
||||
static char *debug_msg_name[] = {
|
||||
"accel",
|
||||
"bitblt",
|
||||
"bitmap",
|
||||
"callback",
|
||||
"caret",
|
||||
|
|
|
@ -1,7 +1,26 @@
|
|||
/*
|
||||
* GDI font definitions
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#ifndef __WINE_FONT_H
|
||||
#define __WINE_FONT_H
|
||||
|
||||
extern void Font_Init( void );
|
||||
#include "gdi.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* GDI logical font object */
|
||||
typedef struct
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGFONT logfont WINE_PACKED;
|
||||
} FONTOBJ;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
extern BOOL FONT_Init( void );
|
||||
extern int FONT_GetObject( FONTOBJ * font, int count, LPSTR buffer );
|
||||
extern HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font );
|
||||
|
||||
|
|
|
@ -29,14 +29,6 @@
|
|||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct tagREGION
|
||||
{
|
||||
WORD type;
|
||||
RECT box;
|
||||
Pixmap pixmap;
|
||||
Region xrgn;
|
||||
} REGION;
|
||||
|
||||
typedef struct tagGDIOBJHDR
|
||||
{
|
||||
HANDLE hNext;
|
||||
|
@ -45,45 +37,6 @@ typedef struct tagGDIOBJHDR
|
|||
WORD wMetaList;
|
||||
} GDIOBJHDR;
|
||||
|
||||
typedef struct tagBRUSHOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGBRUSH logbrush WINE_PACKED;
|
||||
} BRUSHOBJ;
|
||||
|
||||
typedef struct tagPENOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGPEN logpen WINE_PACKED;
|
||||
} PENOBJ;
|
||||
|
||||
typedef struct tagPALETTEOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGPALETTE logpalette WINE_PACKED;
|
||||
} PALETTEOBJ;
|
||||
|
||||
typedef struct tagFONTOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGFONT logfont WINE_PACKED;
|
||||
} FONTOBJ;
|
||||
|
||||
typedef struct tagBITMAPOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
BITMAP bitmap;
|
||||
Pixmap pixmap;
|
||||
SIZE size; /* For SetBitmapDimension() */
|
||||
} BITMAPOBJ;
|
||||
|
||||
typedef struct tagRGNOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
REGION region;
|
||||
} RGNOBJ;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -119,6 +72,8 @@ typedef struct
|
|||
WORD colorRes; /* 108: color resolution */
|
||||
} DeviceCaps;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
|
||||
/* Device independent DC information */
|
||||
typedef struct
|
||||
|
@ -134,6 +89,7 @@ typedef struct
|
|||
HBRUSH hBrush;
|
||||
HFONT hFont;
|
||||
HBITMAP hBitmap;
|
||||
HBITMAP hFirstBitmap; /* Bitmap selected at creation of the DC */
|
||||
HANDLE hDevice;
|
||||
HPALETTE hPalette;
|
||||
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
/*
|
||||
* Internal graphics functions prototypes
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __WINE_GRAPHICS_H
|
||||
#define __WINE_GRAPHICS_H
|
||||
|
||||
extern void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int highlight_size,
|
||||
int shadow_size, BOOL pressed );
|
||||
extern BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
||||
int xsrc, int ysrc, int width, int height, int rop );
|
||||
int xsrc, int ysrc, int width, int height );
|
||||
|
||||
#endif /* __WINE_GRAPHICS */
|
||||
#endif /* __WINE_GRAPHICS_H */
|
||||
|
|
|
@ -49,6 +49,7 @@ extern void MSG_DecPaintCount( HANDLE hQueue );
|
|||
extern void MSG_IncTimerCount( HANDLE hQueue );
|
||||
extern void MSG_DecTimerCount( HANDLE hQueue );
|
||||
extern void MSG_Synchronize();
|
||||
extern BOOL MSG_WaitXEvent( LONG maxWait );
|
||||
extern BOOL MSG_CreateSysMsgQueue( int size );
|
||||
extern void hardware_event( WORD message, WORD wParam, LONG lParam,
|
||||
int xPos, int yPos, DWORD time, DWORD extraInfo );
|
||||
|
|
|
@ -17,6 +17,10 @@ extern void inportb(struct sigcontext_struct *context);
|
|||
extern void inport(struct sigcontext_struct *context);
|
||||
extern void outportb(struct sigcontext_struct *context);
|
||||
extern void outport(struct sigcontext_struct *context);
|
||||
extern void inportb_abs(struct sigcontext_struct *context);
|
||||
extern void inport_abs(struct sigcontext_struct *context);
|
||||
extern void outportb_abs(struct sigcontext_struct *context);
|
||||
extern void outport_abs(struct sigcontext_struct *context);
|
||||
|
||||
extern void IntBarf(int i, struct sigcontext_struct *context);
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* GDI palette definitions
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#ifndef __WINE_PALETTE_H
|
||||
#define __WINE_PALETTE_H
|
||||
|
||||
#include "gdi.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* GDI logical palette object */
|
||||
typedef struct
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGPALETTE logpalette WINE_PACKED;
|
||||
} PALETTEOBJ;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
extern int PALETTE_GetObject( PALETTEOBJ * palette, int count, LPSTR buffer );
|
||||
|
||||
#endif /* __WINE_FONT_H */
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* GDI pen definitions
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#ifndef __WINE_PEN_H
|
||||
#define __WINE_PEN_H
|
||||
|
||||
#include "gdi.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* GDI logical pen object */
|
||||
typedef struct
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGPEN logpen WINE_PACKED;
|
||||
} PENOBJ;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
extern int PEN_GetObject( PENOBJ * pen, int count, LPSTR buffer );
|
||||
extern HPEN PEN_SelectObject( DC * dc, HPEN hpen, PENOBJ * pen );
|
||||
|
||||
#endif /* __WINE_PEN_H */
|
|
@ -32,7 +32,7 @@ extern HBITMAP ConvertInfoBitmap( HDC hdc, BITMAPINFO * image );
|
|||
|
||||
/* loader/signal.c */
|
||||
|
||||
extern int init_wine_signals(void);
|
||||
extern void init_wine_signals(void);
|
||||
extern void wine_debug(int signal, int * regs);
|
||||
|
||||
/* loader/wine.c */
|
||||
|
@ -57,18 +57,6 @@ extern void SpyInit(void);
|
|||
|
||||
extern BOOL WIDGETS_Init(void);
|
||||
|
||||
/* objects/palette.c */
|
||||
|
||||
extern BOOL PALETTE_Init(void);
|
||||
|
||||
/* objects/region.c */
|
||||
|
||||
extern BOOL REGION_Init(void);
|
||||
|
||||
/* windows/graphic.c */
|
||||
|
||||
extern void DrawReliefRect(HDC hdc, RECT rect, int thickness, BOOL pressed);
|
||||
|
||||
/* windows/dce.c */
|
||||
|
||||
extern void DCE_Init(void);
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* GDI region definitions
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#ifndef __WINE_REGION_H
|
||||
#define __WINE_REGION_H
|
||||
|
||||
#include "gdi.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD type;
|
||||
RECT box;
|
||||
Pixmap pixmap;
|
||||
Region xrgn;
|
||||
} REGION;
|
||||
|
||||
/* GDI logical region object */
|
||||
typedef struct
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
REGION region;
|
||||
} RGNOBJ;
|
||||
|
||||
|
||||
extern BOOL REGION_Init(void);
|
||||
extern BOOL REGION_DeleteObject( HRGN hrgn, RGNOBJ * obj );
|
||||
|
||||
#endif /* __WINE_REGION_H */
|
|
@ -2,6 +2,8 @@
|
|||
#define __WINE_SELECTORS_H
|
||||
|
||||
#include "dlls.h"
|
||||
#include "segmem.h"
|
||||
#include "windows.h"
|
||||
|
||||
extern int FindUnusedSelectors(int n_selectors);
|
||||
extern int IPCCopySelector(int i_old, unsigned long new, int swap_type);
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
|
||||
#ifdef DEBUG_NONE
|
||||
#undef DEBUG_ACCEL
|
||||
#undef DEBUG_BITBLT
|
||||
#undef DEBUG_BITMAP
|
||||
#undef DEBUG_CALLBACK
|
||||
#undef DEBUG_CARET
|
||||
|
@ -146,6 +147,7 @@
|
|||
|
||||
#ifdef DEBUG_ALL
|
||||
#define DEBUG_ACCEL
|
||||
#define DEBUG_BITBLT
|
||||
#define DEBUG_BITMAP
|
||||
#define DEBUG_CALLBACK
|
||||
#define DEBUG_CARET
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef SYSCOLOR_H
|
||||
#define SYSCOLOR_H
|
||||
|
||||
#include "gdi.h"
|
||||
#include "windows.h"
|
||||
|
||||
struct SysColorObjects
|
||||
{
|
||||
|
|
|
@ -67,14 +67,13 @@ typedef struct tagWND
|
|||
#define WIN_CLASS_STYLE(wndPtr) (WIN_CLASS_INFO(wndPtr).style)
|
||||
|
||||
/* Window functions */
|
||||
WND *WIN_FindWndPtr( HWND hwnd );
|
||||
Window WIN_GetXWindow( HWND hwnd );
|
||||
BOOL WIN_UnlinkWindow( HWND hwnd );
|
||||
BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
|
||||
HWND WIN_FindWinToRepaint( HWND hwnd );
|
||||
BOOL WIN_CreateDesktopWindow(void);
|
||||
BOOL WINPOS_IsAnActiveWindow( HWND hwnd );
|
||||
void WINPOS_ActivateChild( HWND hwnd );
|
||||
extern WND *WIN_FindWndPtr( HWND hwnd );
|
||||
extern Window WIN_GetXWindow( HWND hwnd );
|
||||
extern BOOL WIN_UnlinkWindow( HWND hwnd );
|
||||
extern BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
|
||||
extern HWND WIN_FindWinToRepaint( HWND hwnd );
|
||||
extern void WIN_SendParentNotify( HWND hwnd, WORD event, LONG lParam );
|
||||
extern BOOL WIN_CreateDesktopWindow(void);
|
||||
|
||||
extern Display * display;
|
||||
extern Screen * screen;
|
||||
|
|
|
@ -9,15 +9,6 @@
|
|||
|
||||
#define DWP_MAGIC 0x5057 /* 'WP' */
|
||||
|
||||
extern HWND WINPOS_ChangeActiveWindow( HWND hwnd, BOOL mouseMsg ); /*winpos.c*/
|
||||
extern void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
|
||||
POINT *minTrack, POINT *maxTrack ); /* winpos.c */
|
||||
extern LONG WINPOS_SendNCCalcSize( HWND hwnd, BOOL calcValidRect,
|
||||
RECT *newWindowRect, RECT *oldWindowRect,
|
||||
RECT *oldClientRect, WINDOWPOS *winpos,
|
||||
RECT *newClientRect ); /* winpos.c */
|
||||
extern LONG WINPOS_HandleWindowPosChanging( WINDOWPOS *winpos ); /* winpos.c */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD actualCount;
|
||||
|
@ -28,4 +19,15 @@ typedef struct
|
|||
WINDOWPOS winPos[1];
|
||||
} DWP;
|
||||
|
||||
|
||||
extern HWND WINPOS_NextWindowFromPoint( HWND hwnd, POINT pt );
|
||||
extern HWND WINPOS_ChangeActiveWindow( HWND hwnd, BOOL mouseMsg );
|
||||
extern void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
|
||||
POINT *minTrack, POINT *maxTrack );
|
||||
extern LONG WINPOS_SendNCCalcSize( HWND hwnd, BOOL calcValidRect,
|
||||
RECT *newWindowRect, RECT *oldWindowRect,
|
||||
RECT *oldClientRect, WINDOWPOS *winpos,
|
||||
RECT *newClientRect );
|
||||
extern LONG WINPOS_HandleWindowPosChanging( WINDOWPOS *winpos );
|
||||
|
||||
#endif /* WINPOS_H */
|
||||
|
|
|
@ -12,6 +12,7 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
#include "arch.h"
|
||||
#include "windows.h"
|
||||
#include "gdi.h"
|
||||
#include "bitmap.h"
|
||||
#include "neexe.h"
|
||||
#include "icon.h"
|
||||
#include "menu.h"
|
||||
|
@ -742,7 +743,7 @@ LoadBitmap(HANDLE instance, LPSTR bmp_name)
|
|||
}
|
||||
if(!it->value)return 0;
|
||||
dprintf_resource(stddeb,"Found %s\n",it->name);
|
||||
lp=it->value;
|
||||
lp=(long *)it->value;
|
||||
rsc_mem=(HANDLE)NULL;
|
||||
} else { /* Load from file - indent this code properly later */
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ static void win_fault(int signal, int code, struct sigcontext *scp)
|
|||
XFlush(display);
|
||||
fprintf(stderr,"In win_fault %x:%lx\n", scp->sc_cs, scp->sc_eip);
|
||||
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
wine_debug(signal, scp); /* Enter our debugger */
|
||||
wine_debug(signal, (int *)scp); /* Enter our debugger */
|
||||
#else
|
||||
fprintf(stderr,"Stack: %x:%x\n", scp->sc_ss, scp->sc_esp);
|
||||
dump = (int*) scp;
|
||||
|
@ -229,7 +229,7 @@ static void win_fault(int signal, int code, struct sigcontext *scp)
|
|||
#endif
|
||||
}
|
||||
|
||||
int init_wine_signals(void)
|
||||
void init_wine_signals(void)
|
||||
{
|
||||
#ifdef linux
|
||||
segv_act.sa_handler = (__sighandler_t) win_fault;
|
||||
|
|
|
@ -166,15 +166,6 @@ GlobalGetFreeSegments(unsigned int flags, int n_segments)
|
|||
return g_start;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* WIN16_GlobalAlloc
|
||||
*/
|
||||
HANDLE
|
||||
WIN16_GlobalAlloc(unsigned int flags, unsigned long size)
|
||||
{
|
||||
return GlobalAlloc(flags & ~GLOBAL_FLAGS_MOVEABLE, size);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* GlobalAlloc
|
||||
*/
|
||||
|
@ -289,6 +280,15 @@ GlobalAlloc(unsigned int flags, unsigned long size)
|
|||
return g->handle;
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* WIN16_GlobalAlloc
|
||||
*/
|
||||
HANDLE
|
||||
WIN16_GlobalAlloc(unsigned int flags, unsigned long size)
|
||||
{
|
||||
return GlobalAlloc(flags & ~GLOBAL_FLAGS_MOVEABLE, size);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* GlobalFree
|
||||
|
@ -549,6 +549,13 @@ GlobalCompact(unsigned int desired)
|
|||
current_free = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* One final check just in case the last block was also marked free, in
|
||||
* which case the above test against max_free doesn't occur for the
|
||||
* last run of free blocks.
|
||||
*/
|
||||
if (current_free > max_free)
|
||||
max_free = current_free;
|
||||
|
||||
return max_free << 16;
|
||||
}
|
||||
|
|
|
@ -26,11 +26,11 @@ HEAP_CheckHeap(MDESC **free_list)
|
|||
for (m = *free_list; m != NULL; m = m->next)
|
||||
{
|
||||
if (((int) m & 0xffff0000) != ((int) *free_list & 0xffff0000))
|
||||
{ dprintf_heap(stddeb,"Invalid block %08x\n",m);
|
||||
{ dprintf_heap(stddeb,"Invalid block %p\n",m);
|
||||
*(char *)0 = 0;
|
||||
}
|
||||
if (m->prev && (((int) m->prev & 0xffff0000) != ((int) *free_list & 0xffff0000)))
|
||||
{ dprintf_heap(stddeb,"Invalid prev %08x from %08x\n", m->prev, m);
|
||||
{ dprintf_heap(stddeb,"Invalid prev %p from %p\n", m->prev, m);
|
||||
*(char *)0 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ HEAP_ReAlloc(MDESC **free_list, void *old_block,
|
|||
if (m->prev != m || m->next != m ||
|
||||
((int) m & 0xffff0000) != ((int) *free_list & 0xffff0000))
|
||||
{
|
||||
fprintf(stderr,"Attempt to resize bad pointer, m = %08x, *free_list = %08x\n",
|
||||
fprintf(stderr,"Attempt to resize bad pointer, m = %p, *free_list = %p\n",
|
||||
m, free_list);
|
||||
HEAP_CheckHeap(free_list);
|
||||
return NULL;
|
||||
|
@ -235,7 +235,7 @@ HEAP_Free(MDESC **free_list, void *block)
|
|||
MDESC *m;
|
||||
MDESC *m_prev;
|
||||
|
||||
dprintf_heap(stddeb,"HeapFree: free_list %08x, block %08x\n",
|
||||
dprintf_heap(stddeb,"HeapFree: free_list %p, block %p\n",
|
||||
free_list, block);
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
|
||||
|
@ -246,7 +246,7 @@ HEAP_Free(MDESC **free_list, void *block)
|
|||
if (m_free->prev != m_free || m_free->next != m_free)
|
||||
{
|
||||
fprintf(stderr,"Attempt to free bad pointer,"
|
||||
"m_free = %08x, *free_list = %08x\n",
|
||||
"m_free = %p, *free_list = %p\n",
|
||||
m_free, free_list);
|
||||
return -1;
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ HEAP_Free(MDESC **free_list, void *block)
|
|||
else if (((int) m_free & 0xffff0000) != ((int) *free_list & 0xffff0000))
|
||||
{
|
||||
fprintf(stderr,"Attempt to free bad pointer,"
|
||||
"m_free = %08x, *free_list = %08x\n",
|
||||
"m_free = %p, *free_list = %p\n",
|
||||
m_free, free_list);
|
||||
return -1;
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ HEAP_Free(MDESC **free_list, void *block)
|
|||
if (m_prev != NULL && (int) m_prev + m_prev->length > (int) m_free)
|
||||
{
|
||||
fprintf(stderr,"Attempt to free bad pointer,"
|
||||
"m_free = %08x, m_prev = %08x (length %x)\n",
|
||||
"m_free = %p, m_prev = %p (length %x)\n",
|
||||
m_free, m_prev, m_prev->length);
|
||||
return -1;
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ HEAP_Free(MDESC **free_list, void *block)
|
|||
(int) m_free + m_free->length > ((int) m_free | 0xffff))
|
||||
{
|
||||
fprintf(stderr,"Attempt to free bad pointer,"
|
||||
"m_free = %08x (length %x), m = %08x\n",
|
||||
"m_free = %p (length %x), m = %p\n",
|
||||
m_free, m_free->length, m);
|
||||
return -1;
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ HEAP_CheckLocalHeaps(char *file,int line)
|
|||
LHEAP *lh;
|
||||
dprintf_heap(stddeb,"CheckLocalHeaps called from %s %d\n",file,line);
|
||||
for(lh=LocalHeaps; lh!=NULL; lh = lh->next)
|
||||
{ dprintf_heap(stddeb,"Checking heap %08x, free_list %08x\n",
|
||||
{ dprintf_heap(stddeb,"Checking heap %p, free_list %p\n",
|
||||
lh,lh->free_list);
|
||||
HEAP_CheckHeap(&lh->free_list);
|
||||
}
|
||||
|
@ -361,7 +361,6 @@ LHEAP *
|
|||
HEAP_LocalFindHeap(unsigned short owner)
|
||||
{
|
||||
LHEAP *lh;
|
||||
extern struct w_files *current_exe;
|
||||
|
||||
dprintf_heap(stddeb,"HEAP_LocalFindHeap: owner %04x\n", owner);
|
||||
|
||||
|
@ -383,7 +382,7 @@ HEAP_LocalInit(unsigned short owner, void *start, int length)
|
|||
{
|
||||
LHEAP *lh;
|
||||
|
||||
dprintf_heap(stddeb,"HEAP_LocalInit: owner %04x, start %08x, length %04x\n"
|
||||
dprintf_heap(stddeb,"HEAP_LocalInit: owner %04x, start %p, length %04x\n"
|
||||
,owner, start, length);
|
||||
|
||||
if (length < 2 * sizeof(MDESC))
|
||||
|
@ -398,7 +397,7 @@ HEAP_LocalInit(unsigned short owner, void *start, int length)
|
|||
lh->local_table = NULL;
|
||||
lh->delta = 0x20;
|
||||
HEAP_Init(&lh->free_list, start, length);
|
||||
dprintf_heap(stddeb,"HEAP_LocalInit: free_list %08x, length %04x, prev %08x, next %08x\n",&lh->free_list,lh->free_list->length, lh->free_list->prev,lh->free_list->next);
|
||||
dprintf_heap(stddeb,"HEAP_LocalInit: free_list %p, length %04x, prev %p, next %p\n",&lh->free_list,lh->free_list->length, lh->free_list->prev,lh->free_list->next);
|
||||
LocalHeaps = lh;
|
||||
}
|
||||
|
||||
|
@ -553,9 +552,9 @@ WIN16_LocalReAlloc(unsigned int handle, int bytes, int flags)
|
|||
void *m;
|
||||
dprintf_heap(stddeb,"WIN16_LocalReAlloc(%04X, %d, %04X); !\n",
|
||||
handle, bytes, flags);
|
||||
dprintf_heap(stddeb,"WIN16_LocalReAlloc // LOCALHEAP()=%08X !\n",
|
||||
dprintf_heap(stddeb,"WIN16_LocalReAlloc // LOCALHEAP()=%p !\n",
|
||||
LOCALHEAP());
|
||||
dprintf_heap(stddeb,"WIN16_LocalReAlloc // *LOCALHEAP()=%08X !\n",
|
||||
dprintf_heap(stddeb,"WIN16_LocalReAlloc // *LOCALHEAP()=%p !\n",
|
||||
*LOCALHEAP());
|
||||
m = HEAP_ReAlloc(LOCALHEAP(), (void *)
|
||||
(((int) *LOCALHEAP() & 0xffff0000) | (handle & 0xffff)),
|
||||
|
|
|
@ -14,9 +14,9 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
|||
#include <unistd.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include "prototypes.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "message.h"
|
||||
#include "clipboard.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
|
|
@ -61,14 +61,14 @@ BOOL GetOpenFileName(LPOPENFILENAME lpofn)
|
|||
HINSTANCE hInst;
|
||||
WND *wndPtr;
|
||||
BOOL bRet;
|
||||
printf("GetOpenFileName(%08X); !\n", lpofn);
|
||||
printf("GetOpenFileName(%p); !\n", lpofn);
|
||||
if (lpofn == NULL) return FALSE;
|
||||
printf("GetOpenFileName // Flags=%08X !\n", lpofn->Flags);
|
||||
printf("GetOpenFileName // nMaxFile=%d lpstrFile='%s' !\n",
|
||||
printf("GetOpenFileName // Flags=%08lX !\n", lpofn->Flags);
|
||||
printf("GetOpenFileName // nMaxFile=%ld lpstrFile='%s' !\n",
|
||||
lpofn->nMaxFile, lpofn->lpstrFile);
|
||||
printf("GetOpenFileName // lpstrInitialDir='%s' !\n", lpofn->lpstrInitialDir);
|
||||
printf("GetOpenFileName // lpstrFilter=%08X !\n", lpofn->lpstrFilter);
|
||||
printf("GetOpenFileName // nFilterIndex=%d !\n", lpofn->nFilterIndex);
|
||||
printf("GetOpenFileName // lpstrFilter=%p !\n", lpofn->lpstrFilter);
|
||||
printf("GetOpenFileName // nFilterIndex=%ld !\n", lpofn->nFilterIndex);
|
||||
if (lpofn->Flags & OFN_ENABLETEMPLATEHANDLE) {
|
||||
hDlgTmpl = lpofn->hInstance;
|
||||
}
|
||||
|
@ -123,13 +123,13 @@ BOOL GetSaveFileName(LPOPENFILENAME lpofn)
|
|||
HINSTANCE hInst;
|
||||
WND *wndPtr;
|
||||
BOOL bRet;
|
||||
printf("GetSaveFileName(%08X); !\n", lpofn);
|
||||
printf("GetSaveFileName(%p); !\n", lpofn);
|
||||
if (lpofn == NULL) return FALSE;
|
||||
printf("GetSaveFileName // Flags=%08X !\n", lpofn->Flags);
|
||||
printf("GetSaveFileName // nMaxFile=%d lpstrFile='%s' !\n",
|
||||
printf("GetSaveFileName // Flags=%08lX !\n", lpofn->Flags);
|
||||
printf("GetSaveFileName // nMaxFile=%ld lpstrFile='%s' !\n",
|
||||
lpofn->nMaxFile, lpofn->lpstrFile);
|
||||
printf("GetSaveFileName // lpstrInitialDir='%s' !\n", lpofn->lpstrInitialDir);
|
||||
printf("GetSaveFileName // lpstrFilter=%08X !\n", lpofn->lpstrFilter);
|
||||
printf("GetSaveFileName // lpstrFilter=%p !\n", lpofn->lpstrFilter);
|
||||
if (lpofn->Flags & OFN_ENABLETEMPLATEHANDLE) {
|
||||
hDlgTmpl = lpofn->hInstance;
|
||||
}
|
||||
|
@ -197,7 +197,6 @@ BOOL FileOpenDlgProc(HWND hWnd, WORD wMsg, WORD wParam, LONG lParam)
|
|||
HDC hMemDC;
|
||||
HBITMAP hBitmap;
|
||||
BITMAP bm;
|
||||
WND *wndPtr;
|
||||
LPMEASUREITEMSTRUCT lpmeasure;
|
||||
LPDRAWITEMSTRUCT lpdis;
|
||||
static int nDrive;
|
||||
|
@ -209,7 +208,7 @@ BOOL FileOpenDlgProc(HWND hWnd, WORD wMsg, WORD wParam, LONG lParam)
|
|||
#ifdef DEBUG_OPENDLG
|
||||
printf("FileOpenDlgProc // WM_INITDIALOG lParam=%08X\n", lParam);
|
||||
#endif
|
||||
printf("FileOpenDlgProc // WM_INITDIALOG lParam=%08X\n", lParam);
|
||||
printf("FileOpenDlgProc // WM_INITDIALOG lParam=%08lX\n", lParam);
|
||||
if (!FileDlg_Init(hWnd, lParam)) return TRUE;
|
||||
SendDlgItemMessage(hWnd, cmb1, CB_RESETCONTENT, 0, 0L);
|
||||
lpofn = (LPOPENFILENAME)lParam;
|
||||
|
@ -632,8 +631,6 @@ BOOL FileSaveDlgProc(HWND hWnd, WORD wMsg, WORD wParam, LONG lParam)
|
|||
LPMEASUREITEMSTRUCT lpmeasure;
|
||||
LPDRAWITEMSTRUCT lpdis;
|
||||
static int nDrive;
|
||||
static int OldDrive;
|
||||
static char OldPath[512];
|
||||
static char CurPath[512];
|
||||
static LPOPENFILENAME lpofn;
|
||||
|
||||
|
@ -874,7 +871,7 @@ BOOL ColorDlgProc(HWND hWnd, WORD wMsg, WORD wParam, LONG lParam)
|
|||
{
|
||||
switch (wMsg) {
|
||||
case WM_INITDIALOG:
|
||||
printf("ColorDlgProc // WM_INITDIALOG lParam=%08X\n", lParam);
|
||||
printf("ColorDlgProc // WM_INITDIALOG lParam=%08lX\n", lParam);
|
||||
ShowWindow(hWnd, SW_SHOWNORMAL);
|
||||
return (TRUE);
|
||||
|
||||
|
@ -952,7 +949,7 @@ BOOL FindTextDlgProc(HWND hWnd, WORD wMsg, WORD wParam, LONG lParam)
|
|||
{
|
||||
switch (wMsg) {
|
||||
case WM_INITDIALOG:
|
||||
printf("FindTextDlgProc // WM_INITDIALOG lParam=%08X\n", lParam);
|
||||
printf("FindTextDlgProc // WM_INITDIALOG lParam=%08lX\n", lParam);
|
||||
ShowWindow(hWnd, SW_SHOWNORMAL);
|
||||
return (TRUE);
|
||||
|
||||
|
@ -978,7 +975,7 @@ BOOL ReplaceTextDlgProc(HWND hWnd, WORD wMsg, WORD wParam, LONG lParam)
|
|||
{
|
||||
switch (wMsg) {
|
||||
case WM_INITDIALOG:
|
||||
printf("ReplaceTextDlgProc // WM_INITDIALOG lParam=%08X\n", lParam);
|
||||
printf("ReplaceTextDlgProc // WM_INITDIALOG lParam=%08lX\n", lParam);
|
||||
ShowWindow(hWnd, SW_SHOWNORMAL);
|
||||
return (TRUE);
|
||||
|
||||
|
@ -1006,7 +1003,7 @@ BOOL PrintDlg(LPPRINTDLG lpPrint)
|
|||
HANDLE hResInfo;
|
||||
WND *wndPtr;
|
||||
BOOL bRet;
|
||||
printf("PrintDlg(%08X) // Flags=%08X\n", lpPrint->Flags);
|
||||
printf("PrintDlg(%p) // Flags=%08lX\n", lpPrint, lpPrint->Flags);
|
||||
if (lpPrint->Flags & PD_PRINTSETUP)
|
||||
hResInfo = FindResource(hSysRes, MAKEINTRESOURCE(PRINTSETUPDLG), RT_DIALOG);
|
||||
else
|
||||
|
@ -1038,7 +1035,7 @@ BOOL PrintDlgProc(HWND hWnd, WORD wMsg, WORD wParam, LONG lParam)
|
|||
{
|
||||
switch (wMsg) {
|
||||
case WM_INITDIALOG:
|
||||
printf("PrintDlgProc // WM_INITDIALOG lParam=%08X\n", lParam);
|
||||
printf("PrintDlgProc // WM_INITDIALOG lParam=%08lX\n", lParam);
|
||||
ShowWindow(hWnd, SW_SHOWNORMAL);
|
||||
return (TRUE);
|
||||
|
||||
|
@ -1064,7 +1061,7 @@ BOOL PrintSetupDlgProc(HWND hWnd, WORD wMsg, WORD wParam, LONG lParam)
|
|||
{
|
||||
switch (wMsg) {
|
||||
case WM_INITDIALOG:
|
||||
printf("PrintSetupDlgProc // WM_INITDIALOG lParam=%08X\n", lParam);
|
||||
printf("PrintSetupDlgProc // WM_INITDIALOG lParam=%08lX\n", lParam);
|
||||
ShowWindow(hWnd, SW_SHOWNORMAL);
|
||||
return (TRUE);
|
||||
|
||||
|
@ -1098,7 +1095,7 @@ DWORD CommDlgExtendError(void)
|
|||
int GetFileTitle(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf)
|
||||
{
|
||||
int i, len;
|
||||
printf("GetFileTitle(%08X %08X %d); \n", lpFile, lpTitle, cbBuf);
|
||||
printf("GetFileTitle(%p %p %d); \n", lpFile, lpTitle, cbBuf);
|
||||
if (lpFile == NULL || lpTitle == NULL) return -1;
|
||||
len = strlen(lpFile);
|
||||
if (len == 0) return -1;
|
||||
|
|
|
@ -89,6 +89,43 @@ void ChopOffSlash(char *path)
|
|||
path[strlen(path)-1] = '\0';
|
||||
}
|
||||
|
||||
void ToUnix(char *s)
|
||||
{
|
||||
/* \WINDOWS\\SYSTEM => /windows/system */
|
||||
|
||||
char *p;
|
||||
|
||||
for (p = s; *p; p++)
|
||||
{
|
||||
if (*p != '\\')
|
||||
*s++ = tolower(*p);
|
||||
else {
|
||||
*s++ = '/';
|
||||
if (*(p+1) == '/' || *(p+1) == '\\')
|
||||
p++;
|
||||
}
|
||||
}
|
||||
*s = '\0';
|
||||
}
|
||||
|
||||
void ToDos(char *s)
|
||||
{
|
||||
/* /windows//system => \WINDOWS\SYSTEM */
|
||||
|
||||
char *p;
|
||||
for (p = s; *p; p++)
|
||||
{
|
||||
if (*p != '/')
|
||||
*s++ = toupper(*p);
|
||||
else {
|
||||
*s++ = '\\';
|
||||
if (*(p+1) == '/' || *(p+1) == '\\')
|
||||
p++;
|
||||
}
|
||||
}
|
||||
*s = '\0';
|
||||
}
|
||||
|
||||
void DOS_InitFS(void)
|
||||
{
|
||||
int x;
|
||||
|
@ -279,43 +316,6 @@ void DOS_SetDefaultDrive(int drive)
|
|||
CurrentDrive = drive;
|
||||
}
|
||||
|
||||
void ToUnix(char *s)
|
||||
{
|
||||
/* \WINDOWS\\SYSTEM => /windows/system */
|
||||
|
||||
char *p;
|
||||
|
||||
for (p = s; *p; p++)
|
||||
{
|
||||
if (*p != '\\')
|
||||
*s++ = tolower(*p);
|
||||
else {
|
||||
*s++ = '/';
|
||||
if (*(p+1) == '/' || *(p+1) == '\\')
|
||||
p++;
|
||||
}
|
||||
}
|
||||
*s = '\0';
|
||||
}
|
||||
|
||||
void ToDos(char *s)
|
||||
{
|
||||
/* /windows//system => \WINDOWS\SYSTEM */
|
||||
|
||||
char *p;
|
||||
for (p = s; *p; p++)
|
||||
{
|
||||
if (*p != '/')
|
||||
*s++ = toupper(*p);
|
||||
else {
|
||||
*s++ = '\\';
|
||||
if (*(p+1) == '/' || *(p+1) == '\\')
|
||||
p++;
|
||||
}
|
||||
}
|
||||
*s = '\0';
|
||||
}
|
||||
|
||||
int DOS_DisableDrive(int drive)
|
||||
{
|
||||
if (drive >= MAX_DOS_DRIVES)
|
||||
|
|
|
@ -46,6 +46,7 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, WORD msg, LPARAM lParam1, LPARAM
|
|||
{
|
||||
dprintf_driver(stdnimp,"SendDriverMessage(%04X, %04X, %08lX, %08lX);\n",
|
||||
hDriver, msg, lParam1, lParam2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -6,7 +6,6 @@ static char Copyright[] = "Copyright Scott A. Laird, Erik Bos 1993, 1994";
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
#include "keyboard.h"
|
||||
#include "stddebug.h"
|
||||
|
|
|
@ -9,7 +9,6 @@ static char Copyright[] = "Copyright Yngvi Sigurjonsson (yngvi@hafro.is), 1993"
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "prototypes.h"
|
||||
#include "regfunc.h"
|
||||
#include "windows.h"
|
||||
|
||||
|
|
|
@ -491,7 +491,6 @@ int main( int argc, char *argv[] )
|
|||
MAIN_SaveSetup();
|
||||
DOS_InitFS();
|
||||
Comm_Init();
|
||||
Font_Init();
|
||||
#ifndef WINELIB
|
||||
INT21_Init();
|
||||
#endif
|
||||
|
@ -553,7 +552,7 @@ int SetEnvironment(LPSTR lpPortName, LPSTR lpEnviron, WORD nCount)
|
|||
}
|
||||
free(lpEnv->Value);
|
||||
lpEnv->Value = malloc(nCount);
|
||||
if (lpNewEnv->Value == NULL) {
|
||||
if (lpEnv->Value == NULL) {
|
||||
printf("SetEnvironment() // Error allocating entry value !\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
|||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include "prototypes.h"
|
||||
#include "heap.h"
|
||||
#include "library.h"
|
||||
#include "win.h"
|
||||
|
|
|
@ -37,7 +37,7 @@ typedef LPSTR LPNETRESOURCE;
|
|||
int WNetGetConnection(LPSTR lpLocalName,
|
||||
LPSTR lpRemoteName, UINT FAR *cbRemoteName)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetGetConnection('%s', %08X, %08X);\n",
|
||||
printf("EMPTY STUB !!! WNetGetConnection('%s', %p, %p);\n",
|
||||
lpLocalName, lpRemoteName, cbRemoteName);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ int WNetGetCaps(WORD capability)
|
|||
*/
|
||||
UINT WNetGetUser(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetGetUser('%s', %08X, %08X);\n",
|
||||
printf("EMPTY STUB !!! WNetGetUser('%s', %p, %p);\n",
|
||||
lpLocalName, lpUserName, lpSize);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ UINT WNetGetUser(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
|
|||
*/
|
||||
UINT WNetAddConnection(LPSTR lpNetPath, LPSTR lpPassWord, LPSTR lpLocalName)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetAddConnection('%s', %08X, '%s');\n",
|
||||
printf("EMPTY STUB !!! WNetAddConnection('%s', %p, '%s');\n",
|
||||
lpNetPath, lpPassWord, lpLocalName);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ UINT WNetCancelConnection(LPSTR lpName, BOOL bForce)
|
|||
UINT WNetAddConnection2(LPSTR lpNetPath, LPSTR lpPassWord,
|
||||
LPSTR lpLocalName, LPSTR lpUserName)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetAddConnection2('%s', %08X, '%s', '%s');\n",
|
||||
printf("EMPTY STUB !!! WNetAddConnection2('%s', %p, '%s', '%s');\n",
|
||||
lpNetPath, lpPassWord, lpLocalName, lpUserName);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ UINT WNetCloseEnum(HANDLE hEnum)
|
|||
UINT WNetEnumResource(HANDLE hEnum, DWORD cRequ,
|
||||
DWORD *lpCount, LPVOID lpBuf)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetEnumResource(%04X, %08X, %08X, %08X);\n",
|
||||
printf("EMPTY STUB !!! WNetEnumResource(%04X, %08lX, %p, %p);\n",
|
||||
hEnum, cRequ, lpCount, lpBuf);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ UINT WNetEnumResource(HANDLE hEnum, DWORD cRequ,
|
|||
UINT WNetOpenEnum(DWORD dwScope, DWORD dwType,
|
||||
LPNETRESOURCE lpNet, HANDLE FAR *lphEnum)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetOpenEnum(%08X, %08X, %08X, %08X);\n",
|
||||
printf("EMPTY STUB !!! WNetOpenEnum(%08lX, %08lX, %p, %p);\n",
|
||||
dwScope, dwType, lpNet, lphEnum);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ static char Copyright [] = "Copyright (C) 1993 Miguel de Icaza";
|
|||
#include "wine.h"
|
||||
#include "windows.h"
|
||||
#include "dos_fs.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_PROFILE */
|
||||
#include "debug.h"
|
||||
|
|
28
misc/shell.c
28
misc/shell.c
|
@ -5,10 +5,10 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
#include "library.h"
|
||||
#include "shell.h"
|
||||
#include "neexe.h"
|
||||
#include "../rc/sysres.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_REG */
|
||||
|
@ -25,13 +25,13 @@ LONG RegOpenKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
|||
LPSTR ptr;
|
||||
char str[128];
|
||||
|
||||
dprintf_reg(stddeb, "RegOpenKey(%04X, %08X='%s', %08X)\n",
|
||||
dprintf_reg(stddeb, "RegOpenKey(%08lX, %p='%s', %p)\n",
|
||||
hKey, lpSubKey, lpSubKey, lphKey);
|
||||
if (lpKey == NULL) return ERROR_BADKEY;
|
||||
if (lpSubKey == NULL) return ERROR_INVALID_PARAMETER;
|
||||
if (lphKey == NULL) return ERROR_INVALID_PARAMETER;
|
||||
if (hKey != HKEY_CLASSES_ROOT) {
|
||||
dprintf_reg(stddeb,"RegOpenKey // specific key = %04X !\n", hKey);
|
||||
dprintf_reg(stddeb,"RegOpenKey // specific key = %08lX !\n", hKey);
|
||||
lpKey = (LPKEYSTRUCT)GlobalLock(hKey);
|
||||
}
|
||||
while ( (ptr = strchr(lpSubKey, '\\')) != NULL ) {
|
||||
|
@ -67,7 +67,7 @@ LONG RegOpenKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
|||
lpKey = lpKey->lpNextKey;
|
||||
}
|
||||
*lphKey = lpKey->hKey;
|
||||
dprintf_reg(stddeb,"RegOpenKey // return hKey=%04X !\n", lpKey->hKey);
|
||||
dprintf_reg(stddeb,"RegOpenKey // return hKey=%08lX !\n", lpKey->hKey);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -84,11 +84,11 @@ LONG RegCreateKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
|||
LONG dwRet;
|
||||
LPSTR ptr;
|
||||
char str[128];
|
||||
dprintf_reg(stddeb, "RegCreateKey(%04X, '%s', %08X)\n", hKey, lpSubKey, lphKey);
|
||||
dprintf_reg(stddeb, "RegCreateKey(%08lX, '%s', %p)\n", hKey, lpSubKey, lphKey);
|
||||
if (lpSubKey == NULL) return ERROR_INVALID_PARAMETER;
|
||||
if (lphKey == NULL) return ERROR_INVALID_PARAMETER;
|
||||
if (hKey != HKEY_CLASSES_ROOT) {
|
||||
dprintf_reg(stddeb,"RegCreateKey // specific key = %04X !\n", hKey);
|
||||
dprintf_reg(stddeb,"RegCreateKey // specific key = %08lX !\n", hKey);
|
||||
lpKey = (LPKEYSTRUCT)GlobalLock(hKey);
|
||||
}
|
||||
while ( (ptr = strchr(lpSubKey, '\\')) != NULL ) {
|
||||
|
@ -158,7 +158,7 @@ LONG RegCreateKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
|||
lpNewKey->lpNextKey = NULL;
|
||||
lpNewKey->lpSubLvl = NULL;
|
||||
*lphKey = hNewKey;
|
||||
dprintf_reg(stddeb,"RegCreateKey // successful '%s' key=%04X !\n", lpSubKey, hNewKey);
|
||||
dprintf_reg(stddeb,"RegCreateKey // successful '%s' key=%08lX !\n", lpSubKey, hNewKey);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ LONG RegCreateKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
|||
*/
|
||||
LONG RegCloseKey(HKEY hKey)
|
||||
{
|
||||
dprintf_reg(stdnimp, "EMPTY STUB !!! RegCloseKey(%04X);\n", hKey);
|
||||
dprintf_reg(stdnimp, "EMPTY STUB !!! RegCloseKey(%08lX);\n", hKey);
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ LONG RegCloseKey(HKEY hKey)
|
|||
*/
|
||||
LONG RegDeleteKey(HKEY hKey, LPCSTR lpSubKey)
|
||||
{
|
||||
dprintf_reg(stdnimp, "EMPTY STUB !!! RegDeleteKey(%04X, '%s');\n",
|
||||
dprintf_reg(stdnimp, "EMPTY STUB !!! RegDeleteKey(%08lX, '%s');\n",
|
||||
hKey, lpSubKey);
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
@ -193,14 +193,14 @@ LONG RegSetValue(HKEY hKey, LPCSTR lpSubKey, DWORD dwType,
|
|||
HKEY hRetKey;
|
||||
LPKEYSTRUCT lpKey;
|
||||
LONG dwRet;
|
||||
dprintf_reg(stddeb, "RegSetValue(%04X, '%s', %08X, '%s', %08X);\n",
|
||||
dprintf_reg(stddeb, "RegSetValue(%08lX, '%s', %08lX, '%s', %08lX);\n",
|
||||
hKey, lpSubKey, dwType, lpVal, dwIgnored);
|
||||
if (lpSubKey == NULL) return ERROR_INVALID_PARAMETER;
|
||||
if (lpVal == NULL) return ERROR_INVALID_PARAMETER;
|
||||
if ((dwRet = RegOpenKey(hKey, lpSubKey, &hRetKey)) != ERROR_SUCCESS) {
|
||||
dprintf_reg(stddeb, "RegSetValue // key not found ... so create it !\n");
|
||||
if ((dwRet = RegCreateKey(hKey, lpSubKey, &hRetKey)) != ERROR_SUCCESS) {
|
||||
fprintf(stderr, "RegSetValue // key creation error %04X !\n", dwRet);
|
||||
fprintf(stderr, "RegSetValue // key creation error %08lX !\n", dwRet);
|
||||
return dwRet;
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ LONG RegQueryValue(HKEY hKey, LPCSTR lpSubKey, LPSTR lpVal, LONG FAR *lpcb)
|
|||
LPKEYSTRUCT lpKey;
|
||||
LONG dwRet;
|
||||
int size;
|
||||
dprintf_reg(stddeb, "RegQueryValue(%04X, '%s', %08X, %08X);\n",
|
||||
dprintf_reg(stddeb, "RegQueryValue(%08lX, '%s', %p, %p);\n",
|
||||
hKey, lpSubKey, lpVal, lpcb);
|
||||
if (lpSubKey == NULL) return ERROR_INVALID_PARAMETER;
|
||||
if (lpVal == NULL) return ERROR_INVALID_PARAMETER;
|
||||
|
@ -317,7 +317,7 @@ HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpPa
|
|||
HINSTANCE FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)
|
||||
{
|
||||
dprintf_reg(stdnimp, "FindExecutable : Empty Stub !!!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char AppName[256], AppMisc[256];
|
||||
|
@ -399,6 +399,7 @@ HICON ExtractIcon(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex)
|
|||
HICON ExtractAssociatedIcon(HINSTANCE hInst,LPSTR lpIconPath, LPWORD lpiIcon)
|
||||
{
|
||||
dprintf_reg(stdnimp, "ExtractAssociatedIcon : Empty Stub !!!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -417,4 +418,5 @@ int RegisterShellHook(void *ptr)
|
|||
int ShellHookProc(void)
|
||||
{
|
||||
dprintf_reg(stdnimp, "ShellHookProc : Empty Stub !!!\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
10
misc/sound.c
10
misc/sound.c
|
@ -5,7 +5,7 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
|
||||
int OpenSound(void)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ int SetSoundNoise(int nSource, int nDuration)
|
|||
|
||||
int SetVoiceSound(int nVoice, long lFrequency, int nDuration)
|
||||
{
|
||||
printf("SetVoiceSound(%d, %d, %d)\n",nVoice,lFrequency, nDuration);
|
||||
printf("SetVoiceSound(%d, %ld, %d)\n",nVoice,lFrequency, nDuration);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -68,31 +68,37 @@ int StopSound(void)
|
|||
int WaitSoundState(int x)
|
||||
{
|
||||
fprintf(stderr, "WaitSoundState(%d)\n", x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SyncAllVoices(void)
|
||||
{
|
||||
fprintf(stderr, "SyncAllVoices()\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CountVoiceNotes(int x)
|
||||
{
|
||||
fprintf(stderr, "CountVoiceNotes(%d)\n", x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LPINT GetThresholdEvent(void)
|
||||
{
|
||||
fprintf(stderr, "GetThresholdEvent()\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int GetThresholdStatus(void)
|
||||
{
|
||||
fprintf(stderr, "GetThresholdStatus()\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SetVoiceThreshold(int a, int b)
|
||||
{
|
||||
fprintf(stderr, "SetVoiceThreshold(%d,%d)\n", a, b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DoBeep(void)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "prototypes.h"
|
||||
#include "regfunc.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_INT */
|
||||
|
@ -18,8 +17,8 @@ struct Win87EmInfoStruct {
|
|||
int
|
||||
WIN87_fpmath()
|
||||
{
|
||||
dprintf_int(stddeb, "_fpmath: (%x:%lx %lx %x)\n",_CONTEXT->sc_cs,
|
||||
_CONTEXT->sc_eip, _CONTEXT->sc_es, _BX & 0xffff);
|
||||
dprintf_int(stddeb, "_fpmath: (%x:%lx %x %x)\n",_CONTEXT->sc_cs,
|
||||
_CONTEXT->sc_eip, _CONTEXT->sc_es, (unsigned int)_BX & 0xffff);
|
||||
|
||||
switch(_BX & 0xffff)
|
||||
{
|
||||
|
|
|
@ -9,17 +9,12 @@
|
|||
/* #define DEBUG_INT */
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef linux
|
||||
#define inline __inline__ /* So we can compile with -ansi */
|
||||
#include <linux/sched.h> /* needed for HZ */
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
#define BCD_TO_BIN(x) ((x&15) + (x>>4)*10)
|
||||
#define BIN_TO_BCD(x) ((x%10) + ((x/10)<<4))
|
||||
|
||||
int do_int1a(struct sigcontext_struct * context){
|
||||
time_t ltime, ticks;
|
||||
time_t ltime;
|
||||
DWORD ticks;
|
||||
struct tm *bdtime;
|
||||
|
||||
if (debugging_relay) {
|
||||
|
@ -30,8 +25,7 @@ int do_int1a(struct sigcontext_struct * context){
|
|||
|
||||
switch(AH) {
|
||||
case 0:
|
||||
ltime = time(NULL);
|
||||
ticks = (int) (ltime * HZ);
|
||||
ticks = GetTickCount();
|
||||
CX = ticks >> 16;
|
||||
DX = ticks & 0x0000FFFF;
|
||||
AX = 0; /* No midnight rollover */
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "msdos.h"
|
||||
#include "registers.h"
|
||||
#include "options.h"
|
||||
#include "prototypes.h"
|
||||
#include "miscemu.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_INT */
|
||||
|
@ -485,7 +484,7 @@ void OpenExistingFile(struct sigcontext_struct *context)
|
|||
case 0x30: /* DENYREAD */
|
||||
dprintf_int(stdnimp,
|
||||
"OpenExistingFile (%s): DENYREAD changed to DENYALL\n",
|
||||
SAFEMAKEPTR(DS,DX));
|
||||
(char *)SAFEMAKEPTR(DS,DX));
|
||||
case 0x10: /* DENYALL */
|
||||
lock = LOCK_EX;
|
||||
break;
|
||||
|
@ -549,7 +548,7 @@ static void RenameFile(struct sigcontext_struct *context)
|
|||
char *newname, *oldname;
|
||||
|
||||
dprintf_int(stddeb,"int21: renaming %s to %s\n",
|
||||
SAFEMAKEPTR(DS,DX), SAFEMAKEPTR(ES,DI) );
|
||||
(char *)SAFEMAKEPTR(DS,DX), (char *)SAFEMAKEPTR(ES,DI) );
|
||||
|
||||
oldname = DOS_GetUnixFileName( SAFEMAKEPTR(DS,DX) );
|
||||
newname = DOS_GetUnixFileName( SAFEMAKEPTR(ES,DI) );
|
||||
|
@ -563,7 +562,7 @@ static void MakeDir(struct sigcontext_struct *context)
|
|||
{
|
||||
char *dirname;
|
||||
|
||||
dprintf_int(stddeb,"int21: makedir %s\n", SAFEMAKEPTR(DS,DX) );
|
||||
dprintf_int(stddeb,"int21: makedir %s\n", (char *)SAFEMAKEPTR(DS,DX) );
|
||||
|
||||
if ((dirname = DOS_GetUnixFileName( SAFEMAKEPTR(DS,DX) ))== NULL) {
|
||||
AL = CanNotMakeDir;
|
||||
|
@ -600,7 +599,7 @@ static void RemoveDir(struct sigcontext_struct *context)
|
|||
{
|
||||
char *dirname;
|
||||
|
||||
dprintf_int(stddeb,"int21: removedir %s\n", SAFEMAKEPTR(DS,DX) );
|
||||
dprintf_int(stddeb,"int21: removedir %s\n", (char *)SAFEMAKEPTR(DS,DX) );
|
||||
|
||||
if ((dirname = DOS_GetUnixFileName( SAFEMAKEPTR(DS,DX) ))== NULL) {
|
||||
AL = CanNotMakeDir;
|
||||
|
@ -1601,7 +1600,10 @@ void INT21_Init(void)
|
|||
MDESC *DosHeapDesc;
|
||||
|
||||
if ((handle = GlobalAlloc(GMEM_FIXED,sizeof(struct DosHeap))) == 0)
|
||||
myerror("out of memory");
|
||||
{
|
||||
fprintf( stderr, "INT21_Init: Out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
heap = (struct DosHeap *) GlobalLock(handle);
|
||||
HEAP_Init(&DosHeapDesc, heap, sizeof(struct DosHeap));
|
||||
|
|
|
@ -25,7 +25,7 @@ int do_int25(struct sigcontext_struct *context)
|
|||
length = CX;
|
||||
}
|
||||
dprintf_int(stdnimp, "int25: abs diskread, drive %d, sector %ld, "
|
||||
"count %ld, buffer %d\n", EAX & 0xff, begin, length, (int) dataptr);
|
||||
"count %ld, buffer %d\n", (int)EAX & 0xff, begin, length, (int) dataptr);
|
||||
|
||||
memset(dataptr, 0, length * 512);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ int do_int26(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
dprintf_int(stdnimp,"int26: abs diskwrite, drive %d, sector %ld, "
|
||||
"count %ld, buffer %d\n", EAX & 0xff, begin, length, (int) dataptr);
|
||||
"count %ld, buffer %d\n", (int)EAX & 0xff, begin, length, (int) dataptr);
|
||||
|
||||
ResetCflag;
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ DWORD WAVE_NotifyClient(UINT wDevID, WORD wMsg,
|
|||
fprintf(stderr,"WAVE_NotifyClient // can't notify client !\n");
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
|
@ -194,7 +195,7 @@ DWORD WAVE_mciOpen(DWORD dwFlags, LPMCI_WAVE_OPEN_PARMS lpParms)
|
|||
DWORD dwRet;
|
||||
char str[128];
|
||||
|
||||
dprintf_mciwave(stddeb,"WAVE_mciOpen(%08X, %08X)\n", dwFlags, lpParms);
|
||||
dprintf_mciwave(stddeb,"WAVE_mciOpen(%08lX, %p)\n", dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
wDevID = lpParms->wDeviceID;
|
||||
if (MCIWavDev[wDevID].nUseCount > 0) {
|
||||
|
@ -274,7 +275,7 @@ DWORD WAVE_mciOpen(DWORD dwFlags, LPMCI_WAVE_OPEN_PARMS lpParms)
|
|||
(LPSTR)&mmckInfo.ckid, (LPSTR)&mmckInfo.fccType,
|
||||
mmckInfo.cksize);
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciOpen // nChannels=%d nSamplesPerSec=%d\n",
|
||||
"WAVE_mciOpen // nChannels=%d nSamplesPerSec=%ld\n",
|
||||
lpWaveFormat->wf.nChannels, lpWaveFormat->wf.nSamplesPerSec);
|
||||
lpWaveFormat->wBitsPerSample = 0;
|
||||
}
|
||||
|
@ -296,7 +297,7 @@ DWORD WAVE_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
|||
#ifdef linux
|
||||
DWORD dwRet;
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciClose(%u, %08X, %08X);\n", wDevID, dwParam, lpParms);
|
||||
"WAVE_mciClose(%u, %08lX, %p);\n", wDevID, dwParam, lpParms);
|
||||
MCIWavDev[wDevID].nUseCount--;
|
||||
if (MCIWavDev[wDevID].nUseCount == 0) {
|
||||
if (MCIWavDev[wDevID].hFile != 0) {
|
||||
|
@ -326,7 +327,7 @@ DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
LPWAVEHDR lpWaveHdr;
|
||||
DWORD dwRet;
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciPlay(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciPlay(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (MCIWavDev[wDevID].hFile == 0) {
|
||||
fprintf(stderr,"WAVE_mciPlay // can't find file='%s' !\n",
|
||||
MCIWavDev[wDevID].openParms.lpstrElementName);
|
||||
|
@ -345,7 +346,7 @@ DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
/**/
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciPlay // MCI_NOTIFY %08X !\n", lpParms->dwCallback);
|
||||
"WAVE_mciPlay // MCI_NOTIFY %08lX !\n", lpParms->dwCallback);
|
||||
switch(fork()) {
|
||||
case -1:
|
||||
fprintf(stderr,
|
||||
|
@ -371,7 +372,7 @@ DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
count = mmioRead(MCIWavDev[wDevID].hFile, lpWaveHdr->lpData, lpWaveHdr->dwBufferLength);
|
||||
if (count < 1) break;
|
||||
lpWaveHdr->dwBytesRecorded = count;
|
||||
dprintf_mciwave(stddeb,"WAVE_mciPlay // before WODM_WRITE lpWaveHdr=%08X dwBytesRecorded=%u\n",
|
||||
dprintf_mciwave(stddeb,"WAVE_mciPlay // before WODM_WRITE lpWaveHdr=%p dwBytesRecorded=%lu\n",
|
||||
lpWaveHdr, lpWaveHdr->dwBytesRecorded);
|
||||
dwRet = wodMessage(0, WODM_WRITE, 0, (DWORD)lpWaveHdr, sizeof(WAVEHDR));
|
||||
}
|
||||
|
@ -381,7 +382,7 @@ DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
lpWaveHdr->lpData = NULL;
|
||||
}
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mciwave(stddeb,"WAVE_mciPlay // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
dprintf_mciwave(stddeb,"WAVE_mciPlay // MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
MCIWavDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
exit(0);
|
||||
|
@ -399,13 +400,12 @@ DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
DWORD WAVE_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
int count;
|
||||
int start, end;
|
||||
LPWAVEHDR lpWaveHdr;
|
||||
DWORD dwRet;
|
||||
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciRecord(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciRecord(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (MCIWavDev[wDevID].hFile == 0) {
|
||||
fprintf(stderr,"WAVE_mciRecord // can't find file='%s' !\n",
|
||||
MCIWavDev[wDevID].openParms.lpstrElementName);
|
||||
|
@ -433,7 +433,7 @@ DWORD WAVE_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
|||
lpWaveHdr->dwBytesRecorded = 0;
|
||||
dwRet = widMessage(0, WIDM_START, 0, 0L, 0L);
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciRecord // after WIDM_START lpWaveHdr=%08X dwBytesRecorded=%u\n",
|
||||
"WAVE_mciRecord // after WIDM_START lpWaveHdr=%p dwBytesRecorded=%lu\n",
|
||||
lpWaveHdr, lpWaveHdr->dwBytesRecorded);
|
||||
if (lpWaveHdr->dwBytesRecorded == 0) break;
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ DWORD WAVE_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
|||
lpWaveHdr->lpData = NULL;
|
||||
}
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mciwave(stddeb,"WAVE_mciRecord // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
dprintf_mciwave(stddeb,"WAVE_mciRecord // MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
MCIWavDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
|
@ -463,7 +463,7 @@ DWORD WAVE_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciStop(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciStop(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
return 0;
|
||||
#else
|
||||
|
@ -479,7 +479,7 @@ DWORD WAVE_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciPause(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciPause(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
return 0;
|
||||
#else
|
||||
|
@ -495,7 +495,7 @@ DWORD WAVE_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciResume(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciResume(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
return 0;
|
||||
#else
|
||||
|
@ -511,12 +511,12 @@ DWORD WAVE_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciSet(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciSet(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciSet // dwTimeFormat=%08X\n", lpParms->dwTimeFormat);
|
||||
"WAVE_mciSet // dwTimeFormat=%08lX\n", lpParms->dwTimeFormat);
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciSet // dwAudio=%08X\n", lpParms->dwAudio);
|
||||
"WAVE_mciSet // dwAudio=%08lX\n", lpParms->dwAudio);
|
||||
if (dwFlags & MCI_SET_TIME_FORMAT) {
|
||||
switch (lpParms->dwTimeFormat) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
|
@ -588,7 +588,7 @@ DWORD WAVE_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciStatus(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciStatus(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (dwFlags & MCI_STATUS_ITEM) {
|
||||
switch(lpParms->dwItem) {
|
||||
|
@ -667,12 +667,12 @@ DWORD WAVE_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
lpParms->dwReturn = 22050;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"WAVE_mciStatus // unknown command %04X !\n", lpParms->dwItem);
|
||||
fprintf(stderr,"WAVE_mciStatus // unknown command %08lX !\n", lpParms->dwItem);
|
||||
return MCIERR_UNRECOGNIZED_COMMAND;
|
||||
}
|
||||
}
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mciwave(stddeb,"WAVE_mciStatus // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
dprintf_mciwave(stddeb,"WAVE_mciStatus // MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
MCIWavDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
|
@ -690,7 +690,7 @@ DWORD WAVE_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciGetDevCaps(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciGetDevCaps(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (dwFlags & MCI_GETDEVCAPS_ITEM) {
|
||||
switch(lpParms->dwItem) {
|
||||
|
@ -744,7 +744,7 @@ DWORD WAVE_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"WAVE_mciInfo(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
"WAVE_mciInfo(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
lpParms->lpstrReturn = NULL;
|
||||
switch(dwFlags) {
|
||||
|
@ -790,7 +790,7 @@ DWORD wodGetDevCaps(WORD wDevID, LPWAVEOUTCAPS lpCaps, DWORD dwSize)
|
|||
int dsp_stereo = 1;
|
||||
int bytespersmpl;
|
||||
dprintf_mciwave(stddeb,
|
||||
"wodGetDevCaps(%u, %08X, %u);\n", wDevID, lpCaps, dwSize);
|
||||
"wodGetDevCaps(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
|
||||
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
|
||||
audio = open (SOUND_DEV, O_WRONLY, 0);
|
||||
if (audio == -1) return MMSYSERR_NOTENABLED;
|
||||
|
@ -837,7 +837,7 @@ DWORD wodGetDevCaps(WORD wDevID, LPWAVEOUTCAPS lpCaps, DWORD dwSize)
|
|||
}
|
||||
close(audio);
|
||||
dprintf_mciwave(stddeb,
|
||||
"wodGetDevCaps // dwFormats = %08X\n", lpCaps->dwFormats);
|
||||
"wodGetDevCaps // dwFormats = %08lX\n", lpCaps->dwFormats);
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -857,7 +857,7 @@ DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
|||
int samplesize;
|
||||
int dsp_stereo;
|
||||
dprintf_mciwave(stddeb,
|
||||
"wodOpen(%u, %08X, %08X);\n", wDevID, lpDesc, dwFlags);
|
||||
"wodOpen(%u, %p, %08lX);\n", wDevID, lpDesc, dwFlags);
|
||||
if (lpDesc == NULL) {
|
||||
fprintf(stderr,"Linux 'wodOpen' // Invalid Parameter !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
@ -925,7 +925,7 @@ DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
|||
IOCTL(audio, SNDCTL_DSP_STEREO, dsp_stereo);
|
||||
dprintf_mciwave(stddeb,"Linux 'wodOpen' // wBitsPerSample=%u !\n",
|
||||
WOutDev[wDevID].Format.wBitsPerSample);
|
||||
dprintf_mciwave(stddeb,"Linux 'wodOpen' // nSamplesPerSec=%u !\n",
|
||||
dprintf_mciwave(stddeb,"Linux 'wodOpen' // nSamplesPerSec=%lu !\n",
|
||||
WOutDev[wDevID].Format.wf.nSamplesPerSec);
|
||||
dprintf_mciwave(stddeb,"Linux 'wodOpen' // nChannels=%u !\n",
|
||||
WOutDev[wDevID].Format.wf.nChannels);
|
||||
|
@ -969,7 +969,7 @@ DWORD wodClose(WORD wDevID)
|
|||
DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,"wodWrite(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
dprintf_mciwave(stddeb,"wodWrite(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (WOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'wodWrite' // can't play !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -980,7 +980,7 @@ DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
lpWaveHdr->dwFlags |= WHDR_INQUEUE;
|
||||
dprintf_mciwave(stddeb,
|
||||
"wodWrite() // dwBytesRecorded %u !\n", lpWaveHdr->dwBytesRecorded);
|
||||
"wodWrite() // dwBytesRecorded %lu !\n", lpWaveHdr->dwBytesRecorded);
|
||||
if (write (WOutDev[wDevID].unixdev, lpWaveHdr->lpData,
|
||||
lpWaveHdr->dwBytesRecorded) != lpWaveHdr->dwBytesRecorded) {
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1004,7 +1004,7 @@ DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"wodPrepare(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
"wodPrepare(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (WOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'wodPrepare' // can't prepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1031,7 +1031,7 @@ DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"wodUnprepare(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
"wodUnprepare(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (WOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'wodUnprepare' // can't unprepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1084,7 +1084,7 @@ DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
{
|
||||
#ifdef linux
|
||||
int time;
|
||||
dprintf_mciwave(stddeb,"wodGetPosition(%u, %08X, %u);\n", wDevID, lpTime, uSize);
|
||||
dprintf_mciwave(stddeb,"wodGetPosition(%u, %p, %lu);\n", wDevID, lpTime, uSize);
|
||||
if (WOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'wodGetPosition' // can't get pos !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1094,17 +1094,17 @@ TryAGAIN:
|
|||
switch(lpTime->wType) {
|
||||
case TIME_BYTES:
|
||||
lpTime->u.cb = WOutDev[wDevID].dwTotalPlayed;
|
||||
dprintf_mciwave(stddeb,"wodGetPosition // TIME_BYTES=%u\n", lpTime->u.cb);
|
||||
dprintf_mciwave(stddeb,"wodGetPosition // TIME_BYTES=%lu\n", lpTime->u.cb);
|
||||
break;
|
||||
case TIME_SAMPLES:
|
||||
lpTime->u.sample = WOutDev[wDevID].dwTotalPlayed * 8 /
|
||||
WOutDev[wDevID].Format.wBitsPerSample;
|
||||
dprintf_mciwave(stddeb,"wodGetPosition // TIME_SAMPLES=%u\n", lpTime->u.sample);
|
||||
dprintf_mciwave(stddeb,"wodGetPosition // TIME_SAMPLES=%lu\n", lpTime->u.sample);
|
||||
break;
|
||||
case TIME_MS:
|
||||
lpTime->u.ms = WOutDev[wDevID].dwTotalPlayed /
|
||||
(WOutDev[wDevID].Format.wf.nAvgBytesPerSec / 1000);
|
||||
dprintf_mciwave(stddeb,"wodGetPosition // TIME_MS=%u\n", lpTime->u.ms);
|
||||
dprintf_mciwave(stddeb,"wodGetPosition // TIME_MS=%lu\n", lpTime->u.ms);
|
||||
break;
|
||||
case TIME_SMPTE:
|
||||
time = WOutDev[wDevID].dwTotalPlayed /
|
||||
|
@ -1141,7 +1141,7 @@ DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
|
|||
#ifdef linux
|
||||
int mixer;
|
||||
int volume;
|
||||
dprintf_mciwave(stddeb,"wodGetVolume(%u, %08X);\n", wDevID, lpdwVol);
|
||||
dprintf_mciwave(stddeb,"wodGetVolume(%u, %p);\n", wDevID, lpdwVol);
|
||||
if (lpdwVol == NULL) return MMSYSERR_NOTENABLED;
|
||||
if (WOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'wodGetVolume' // can't read volume !\n");
|
||||
|
@ -1172,7 +1172,7 @@ DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
|
|||
#ifdef linux
|
||||
int mixer;
|
||||
int volume;
|
||||
dprintf_mciwave(stddeb,"wodSetVolume(%u, %08X);\n", wDevID, dwParam);
|
||||
dprintf_mciwave(stddeb,"wodSetVolume(%u, %08lX);\n", wDevID, dwParam);
|
||||
volume = LOWORD(dwParam);
|
||||
if (WOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'wodSetVolume' // can't set volume !\n");
|
||||
|
@ -1200,7 +1200,7 @@ DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
|
|||
DWORD wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
dprintf_mciwave(stddeb,"wodMessage(%u, %04X, %08X, %08X, %08X);\n",
|
||||
dprintf_mciwave(stddeb,"wodMessage(%u, %04X, %08lX, %08lX, %08lX);\n",
|
||||
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
||||
switch(wMsg) {
|
||||
case WODM_OPEN:
|
||||
|
@ -1258,7 +1258,7 @@ DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPS lpCaps, DWORD dwSize)
|
|||
int dsp_stereo = 1;
|
||||
int bytespersmpl;
|
||||
dprintf_mciwave(stddeb,
|
||||
"widGetDevCaps(%u, %08X, %u);\n", wDevID, lpCaps, dwSize);
|
||||
"widGetDevCaps(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
|
||||
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
|
||||
audio = open (SOUND_DEV, O_RDONLY, 0);
|
||||
if (audio == -1) return MMSYSERR_NOTENABLED;
|
||||
|
@ -1303,7 +1303,7 @@ DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPS lpCaps, DWORD dwSize)
|
|||
}
|
||||
close(audio);
|
||||
dprintf_mciwave(stddeb,
|
||||
"widGetDevCaps // dwFormats = %08X\n", lpCaps->dwFormats);
|
||||
"widGetDevCaps // dwFormats = %08lX\n", lpCaps->dwFormats);
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1323,7 +1323,7 @@ DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
|||
int samplesize;
|
||||
int dsp_stereo;
|
||||
dprintf_mciwave(stddeb,
|
||||
"widOpen(%u, %08X, %08X);\n", wDevID, lpDesc, dwFlags);
|
||||
"widOpen(%u, %p, %08lX);\n", wDevID, lpDesc, dwFlags);
|
||||
if (lpDesc == NULL) {
|
||||
fprintf(stderr,"Linux 'widOpen' // Invalid Parameter !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
@ -1393,11 +1393,11 @@ DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
|||
IOCTL(audio, SNDCTL_DSP_STEREO, dsp_stereo);
|
||||
dprintf_mciwave(stddeb,"Linux 'widOpen' // wBitsPerSample=%u !\n",
|
||||
WInDev[wDevID].Format.wBitsPerSample);
|
||||
dprintf_mciwave(stddeb,"Linux 'widOpen' // nSamplesPerSec=%u !\n",
|
||||
dprintf_mciwave(stddeb,"Linux 'widOpen' // nSamplesPerSec=%lu !\n",
|
||||
WInDev[wDevID].Format.wf.nSamplesPerSec);
|
||||
dprintf_mciwave(stddeb,"Linux 'widOpen' // nChannels=%u !\n",
|
||||
WInDev[wDevID].Format.wf.nChannels);
|
||||
dprintf_mciwave(stddeb,"Linux 'widOpen' // nAvgBytesPerSec=%u\n",
|
||||
dprintf_mciwave(stddeb,"Linux 'widOpen' // nAvgBytesPerSec=%lu\n",
|
||||
WInDev[wDevID].Format.wf.nAvgBytesPerSec);
|
||||
if (WAVE_NotifyClient(wDevID, WIM_OPEN, 0L, 0L) != MMSYSERR_NOERROR) {
|
||||
fprintf(stderr,"Linux 'widOpen' // can't notify client !\n");
|
||||
|
@ -1442,7 +1442,7 @@ DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
int count = 1;
|
||||
LPWAVEHDR lpWIHdr;
|
||||
dprintf_mciwave(stddeb,
|
||||
"widAddBuffer(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
"widAddBuffer(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (WInDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'widAddBuffer' // can't do it !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1489,7 +1489,7 @@ DWORD widPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"widPrepare(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
"widPrepare(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (WInDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'widPrepare' // can't prepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1519,7 +1519,7 @@ DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"widUnprepare(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
"widUnprepare(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (WInDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'widUnprepare' // can't unprepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1559,7 +1559,7 @@ DWORD widStart(WORD wDevID)
|
|||
while(lpWIHdr != NULL) {
|
||||
lpWIHdr->dwBufferLength &= 0xFFFF;
|
||||
dprintf_mciwave(stddeb,
|
||||
"widStart // recording buf#%u=%08X size=%u \n",
|
||||
"widStart // recording buf#%u=%p size=%lu \n",
|
||||
count, lpWIHdr->lpData, lpWIHdr->dwBufferLength);
|
||||
fflush(stddeb);
|
||||
read (WInDev[wDevID].unixdev, lpWIHdr->lpData,
|
||||
|
@ -1627,7 +1627,7 @@ DWORD widGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
#ifdef linux
|
||||
int time;
|
||||
dprintf_mciwave(stddeb,
|
||||
"widGetPosition(%u, %08X, %u);\n", wDevID, lpTime, uSize);
|
||||
"widGetPosition(%u, %p, %lu);\n", wDevID, lpTime, uSize);
|
||||
if (WInDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'widGetPosition' // can't get pos !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1638,31 +1638,31 @@ TryAGAIN:
|
|||
lpTime->wType);
|
||||
dprintf_mciwave(stddeb,"widGetPosition // wBitsPerSample=%u\n",
|
||||
WInDev[wDevID].Format.wBitsPerSample);
|
||||
dprintf_mciwave(stddeb,"widGetPosition // nSamplesPerSec=%u\n",
|
||||
dprintf_mciwave(stddeb,"widGetPosition // nSamplesPerSec=%lu\n",
|
||||
WInDev[wDevID].Format.wf.nSamplesPerSec);
|
||||
dprintf_mciwave(stddeb,"widGetPosition // nChannels=%u\n",
|
||||
WInDev[wDevID].Format.wf.nChannels);
|
||||
dprintf_mciwave(stddeb,"widGetPosition // nAvgBytesPerSec=%u\n",
|
||||
dprintf_mciwave(stddeb,"widGetPosition // nAvgBytesPerSec=%lu\n",
|
||||
WInDev[wDevID].Format.wf.nAvgBytesPerSec);
|
||||
fflush(stddeb);
|
||||
switch(lpTime->wType) {
|
||||
case TIME_BYTES:
|
||||
lpTime->u.cb = WInDev[wDevID].dwTotalRecorded;
|
||||
dprintf_mciwave(stddeb,
|
||||
"widGetPosition // TIME_BYTES=%u\n", lpTime->u.cb);
|
||||
"widGetPosition // TIME_BYTES=%lu\n", lpTime->u.cb);
|
||||
break;
|
||||
case TIME_SAMPLES:
|
||||
lpTime->u.sample = WInDev[wDevID].dwTotalRecorded * 8 /
|
||||
WInDev[wDevID].Format.wBitsPerSample;
|
||||
dprintf_mciwave(stddeb,
|
||||
"widGetPosition // TIME_SAMPLES=%u\n",
|
||||
"widGetPosition // TIME_SAMPLES=%lu\n",
|
||||
lpTime->u.sample);
|
||||
break;
|
||||
case TIME_MS:
|
||||
lpTime->u.ms = WInDev[wDevID].dwTotalRecorded /
|
||||
(WInDev[wDevID].Format.wf.nAvgBytesPerSec / 1000);
|
||||
dprintf_mciwave(stddeb,
|
||||
"widGetPosition // TIME_MS=%u\n", lpTime->u.ms);
|
||||
"widGetPosition // TIME_MS=%lu\n", lpTime->u.ms);
|
||||
break;
|
||||
case TIME_SMPTE:
|
||||
time = WInDev[wDevID].dwTotalRecorded /
|
||||
|
@ -1696,7 +1696,7 @@ TryAGAIN:
|
|||
DWORD widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
dprintf_mciwave(stddeb,"widMessage(%u, %04X, %08X, %08X, %08X);\n",
|
||||
dprintf_mciwave(stddeb,"widMessage(%u, %04X, %08lX, %08lX, %08lX);\n",
|
||||
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
||||
switch(wMsg) {
|
||||
case WIDM_OPEN:
|
||||
|
|
|
@ -66,10 +66,7 @@ DWORD ANIM_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
UINT wDevID;
|
||||
int cdrom;
|
||||
dprintf_mcianim(stddeb,"ANIM_mciOpen(%08X, %08X);\n",
|
||||
dwFlags, lpParms);
|
||||
printf("ANIM_mciOpen(%08X, %08X);\n", dwFlags, lpParms);
|
||||
dprintf_mcianim(stddeb,"ANIM_mciOpen(%08lX, %p);\n", dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
wDevID = lpParms->wDeviceID;
|
||||
if (AnimDev[wDevID].nUseCount > 0) {
|
||||
|
@ -101,7 +98,7 @@ DWORD ANIM_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
AnimDev[wDevID].lpdwTrackPos = NULL;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciOpen // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"ANIM_mciOpen // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
AnimDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -118,11 +115,12 @@ DWORD ANIM_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
DWORD ANIM_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciClose(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciClose(%u, %08lX, %p);\n",
|
||||
wDevID, dwParam, lpParms);
|
||||
if (AnimDev[wDevID].lpdwTrackLen != NULL) free(AnimDev[wDevID].lpdwTrackLen);
|
||||
if (AnimDev[wDevID].lpdwTrackPos != NULL) free(AnimDev[wDevID].lpdwTrackPos);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -132,12 +130,12 @@ DWORD ANIM_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
LPMCI_GETDEVCAPS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciGetDevCaps(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciGetDevCaps(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (dwFlags & MCI_GETDEVCAPS_ITEM) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciGetDevCaps // MCI_GETDEVCAPS_ITEM dwItem=%08X;\n",
|
||||
"ANIM_mciGetDevCaps // MCI_GETDEVCAPS_ITEM dwItem=%08lX;\n",
|
||||
lpParms->dwItem);
|
||||
switch(lpParms->dwItem) {
|
||||
case MCI_GETDEVCAPS_CAN_RECORD:
|
||||
|
@ -172,7 +170,7 @@ DWORD ANIM_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
}
|
||||
}
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciGetDevCaps // lpParms->dwReturn=%08X;\n",
|
||||
"ANIM_mciGetDevCaps // lpParms->dwReturn=%08lX;\n",
|
||||
lpParms->dwReturn);
|
||||
return 0;
|
||||
#else
|
||||
|
@ -186,7 +184,7 @@ DWORD ANIM_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
DWORD ANIM_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciInfo(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciInfo(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
lpParms->lpstrReturn = NULL;
|
||||
|
@ -220,12 +218,12 @@ DWORD ANIM_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
|||
DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciStatus // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"ANIM_mciStatus // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
AnimDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -234,11 +232,11 @@ DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
switch(lpParms->dwItem) {
|
||||
case MCI_STATUS_CURRENT_TRACK:
|
||||
lpParms->dwReturn = AnimDev[wDevID].nCurTrack;
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // CURRENT_TRACK=%u!\n", lpParms->dwReturn);
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // CURRENT_TRACK=%lu!\n", lpParms->dwReturn);
|
||||
return 0;
|
||||
case MCI_STATUS_LENGTH:
|
||||
if (dwFlags & MCI_TRACK) {
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // MCI_TRACK #%u LENGTH=??? !\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // MCI_TRACK #%lu LENGTH=??? !\n",
|
||||
lpParms->dwTrack);
|
||||
if (lpParms->dwTrack > AnimDev[wDevID].nTracks)
|
||||
return MCIERR_OUTOFRANGE;
|
||||
|
@ -248,11 +246,11 @@ DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
lpParms->dwReturn = AnimDev[wDevID].dwTotalLen;
|
||||
lpParms->dwReturn = ANIM_CalcTime(wDevID,
|
||||
AnimDev[wDevID].dwTimeFormat, lpParms->dwReturn);
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // LENGTH=%u !\n", lpParms->dwReturn);
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // LENGTH=%lu !\n", lpParms->dwReturn);
|
||||
return 0;
|
||||
case MCI_STATUS_MODE:
|
||||
lpParms->dwReturn = AnimDev[wDevID].mode;
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // MCI_STATUS_MODE=%08X !\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // MCI_STATUS_MODE=%08lX !\n",
|
||||
lpParms->dwReturn);
|
||||
return 0;
|
||||
case MCI_STATUS_MEDIA_PRESENT:
|
||||
|
@ -261,7 +259,7 @@ DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
return 0;
|
||||
case MCI_STATUS_NUMBER_OF_TRACKS:
|
||||
lpParms->dwReturn = 1;
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // MCI_STATUS_NUMBER_OF_TRACKS = %u !\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // MCI_STATUS_NUMBER_OF_TRACKS = %lu !\n",
|
||||
lpParms->dwReturn);
|
||||
if (lpParms->dwReturn == (WORD)-1) return MCIERR_INTERNAL;
|
||||
return 0;
|
||||
|
@ -275,11 +273,11 @@ DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
if (lpParms->dwTrack > AnimDev[wDevID].nTracks)
|
||||
return MCIERR_OUTOFRANGE;
|
||||
lpParms->dwReturn = AnimDev[wDevID].lpdwTrackPos[lpParms->dwTrack - 1];
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // get MCI_TRACK #%u !\n", lpParms->dwTrack);
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // get MCI_TRACK #%lu !\n", lpParms->dwTrack);
|
||||
}
|
||||
lpParms->dwReturn = ANIM_CalcTime(wDevID,
|
||||
AnimDev[wDevID].dwTimeFormat, lpParms->dwReturn);
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // MCI_STATUS_POSITION=%08X !\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus // MCI_STATUS_POSITION=%08lX !\n",
|
||||
lpParms->dwReturn);
|
||||
return 0;
|
||||
case MCI_STATUS_READY:
|
||||
|
@ -291,7 +289,7 @@ DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
lpParms->dwReturn = MCI_FORMAT_MILLISECONDS;
|
||||
return 0;
|
||||
default:
|
||||
fprintf(stderr,"ANIM_mciStatus // unknown command %04X !\n", lpParms->dwItem);
|
||||
fprintf(stderr,"ANIM_mciStatus // unknown command %08lX !\n", lpParms->dwItem);
|
||||
return MCIERR_UNRECOGNIZED_COMMAND;
|
||||
}
|
||||
}
|
||||
|
@ -314,14 +312,14 @@ DWORD ANIM_CalcTime(UINT wDevID, DWORD dwFormatType, DWORD dwFrame)
|
|||
UINT wMinutes;
|
||||
UINT wSeconds;
|
||||
UINT wFrames;
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcTime(%u, %08X, %lu);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcTime(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwFrame);
|
||||
TryAGAIN:
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwTime = dwFrame / ANIMFRAMES_PERSEC * 1000;
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcTime // MILLISECONDS %u\n", dwTime);
|
||||
"ANIM_CalcTime // MILLISECONDS %lu\n", dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
wMinutes = dwFrame / ANIMFRAMES_PERMIN;
|
||||
|
@ -329,7 +327,7 @@ TryAGAIN:
|
|||
wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes -
|
||||
ANIMFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_MSF(wMinutes, wSeconds, wFrames);
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcTime // MSF %02u:%02u:%02u -> dwTime=%u\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcTime // MSF %02u:%02u:%02u -> dwTime=%lu\n",
|
||||
wMinutes, wSeconds, wFrames, dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_TMSF:
|
||||
|
@ -366,14 +364,14 @@ DWORD ANIM_CalcFrame(UINT wDevID, DWORD dwFormatType, DWORD dwTime)
|
|||
DWORD dwFrame = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcFrame(%u, %08X, %lu);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcFrame(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwTime);
|
||||
TryAGAIN:
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwFrame = dwTime * ANIMFRAMES_PERSEC / 1000;
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // MILLISECONDS %u\n", dwFrame);
|
||||
"ANIM_CalcFrame // MILLISECONDS %lu\n", dwFrame);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
dprintf_mcianim(stddeb,
|
||||
|
@ -391,7 +389,7 @@ TryAGAIN:
|
|||
MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime),
|
||||
MCI_TMSF_SECOND(dwTime), MCI_TMSF_FRAME(dwTime));
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // TMSF trackpos[%u]=%u\n",
|
||||
"ANIM_CalcFrame // TMSF trackpos[%u]=%lu\n",
|
||||
wTrack, AnimDev[wDevID].lpdwTrackPos[wTrack - 1]);
|
||||
dwFrame = AnimDev[wDevID].lpdwTrackPos[wTrack - 1];
|
||||
dwFrame += ANIMFRAMES_PERMIN * MCI_TMSF_MINUTE(dwTime);
|
||||
|
@ -416,29 +414,28 @@ DWORD ANIM_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
int start, end;
|
||||
dprintf_mcianim(stddeb,"ANIM_mciPlay(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciPlay(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
printf("ANIM_mciPlay(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
start = 0; end = AnimDev[wDevID].dwTotalLen;
|
||||
AnimDev[wDevID].nCurTrack = 1;
|
||||
if (dwFlags & MCI_FROM) {
|
||||
start = ANIM_CalcFrame(wDevID,
|
||||
AnimDev[wDevID].dwTimeFormat, lpParms->dwFrom);
|
||||
dprintf_mcianim(stddeb,"ANIM_mciPlay // MCI_FROM=%08X -> %u \n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciPlay // MCI_FROM=%08lX -> %u \n",
|
||||
lpParms->dwFrom, start);
|
||||
}
|
||||
if (dwFlags & MCI_TO) {
|
||||
end = ANIM_CalcFrame(wDevID,
|
||||
AnimDev[wDevID].dwTimeFormat, lpParms->dwTo);
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciPlay // MCI_TO=%08X -> %u \n",
|
||||
"ANIM_mciPlay // MCI_TO=%08lX -> %u \n",
|
||||
lpParms->dwTo, end);
|
||||
}
|
||||
AnimDev[wDevID].mode = MCI_MODE_PLAY;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciPlay // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"ANIM_mciPlay // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
AnimDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -455,13 +452,13 @@ DWORD ANIM_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
DWORD ANIM_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStop(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStop(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
AnimDev[wDevID].mode = MCI_MODE_STOP;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciStop // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"ANIM_mciStop // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
AnimDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -478,13 +475,13 @@ DWORD ANIM_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
DWORD ANIM_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciPause(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciPause(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
AnimDev[wDevID].mode = MCI_MODE_PAUSE;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciPause // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"ANIM_mciPause // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
AnimDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -501,13 +498,13 @@ DWORD ANIM_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
DWORD ANIM_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciResume(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciResume(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
AnimDev[wDevID].mode = MCI_MODE_STOP;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciResume // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"ANIM_mciResume // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
AnimDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -526,7 +523,7 @@ DWORD ANIM_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
|||
#ifdef linux
|
||||
DWORD dwRet;
|
||||
MCI_PLAY_PARMS PlayParms;
|
||||
dprintf_mcianim(stddeb,"ANIM_mciSeek(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciSeek(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
AnimDev[wDevID].mode = MCI_MODE_SEEK;
|
||||
|
@ -546,7 +543,7 @@ DWORD ANIM_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
|||
dwRet = ANIM_mciStop(wDevID, MCI_WAIT, (LPMCI_GENERIC_PARMS)&PlayParms);
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciSeek // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"ANIM_mciSeek // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
AnimDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -564,12 +561,12 @@ DWORD ANIM_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
|||
DWORD ANIM_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciSet(%u, %08X, %08X);\n",
|
||||
dprintf_mcianim(stddeb,"ANIM_mciSet(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
/*
|
||||
printf("ANIM_mciSet // dwTimeFormat=%08X\n", lpParms->dwTimeFormat);
|
||||
printf("ANIM_mciSet // dwAudio=%08X\n", lpParms->dwAudio);
|
||||
printf("ANIM_mciSet // dwTimeFormat=%08lX\n", lpParms->dwTimeFormat);
|
||||
printf("ANIM_mciSet // dwAudio=%08lX\n", lpParms->dwAudio);
|
||||
*/
|
||||
if (dwFlags & MCI_SET_TIME_FORMAT) {
|
||||
switch (lpParms->dwTimeFormat) {
|
||||
|
@ -594,7 +591,7 @@ DWORD ANIM_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
|||
if (dwFlags & MCI_SET_OFF) return MCIERR_UNSUPPORTED_FUNCTION;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_mciSet // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"ANIM_mciSet // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
AnimDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
|
|
@ -85,8 +85,7 @@ DWORD CDAUDIO_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
UINT wDevID;
|
||||
int cdrom;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciOpen(%08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciOpen(%08lX, %p);\n",
|
||||
dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
wDevID = lpParms->wDeviceID;
|
||||
|
@ -128,7 +127,7 @@ DWORD CDAUDIO_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
}
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciOpen // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"CDAUDIO_mciOpen // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
CDADev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -145,12 +144,13 @@ DWORD CDAUDIO_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
DWORD CDAUDIO_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciClose(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciClose(%u, %08lX, %p);\n",
|
||||
wDevID, dwParam, lpParms);
|
||||
if (CDADev[wDevID].lpdwTrackLen != NULL) free(CDADev[wDevID].lpdwTrackLen);
|
||||
if (CDADev[wDevID].lpdwTrackPos != NULL) free(CDADev[wDevID].lpdwTrackPos);
|
||||
close(CDADev[wDevID].unixdev);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -160,12 +160,12 @@ DWORD CDAUDIO_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
LPMCI_GETDEVCAPS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciGetDevCaps(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciGetDevCaps(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (dwFlags & MCI_GETDEVCAPS_ITEM) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciGetDevCaps // MCI_GETDEVCAPS_ITEM dwItem=%08X;\n",
|
||||
"CDAUDIO_mciGetDevCaps // MCI_GETDEVCAPS_ITEM dwItem=%08lX;\n",
|
||||
lpParms->dwItem);
|
||||
switch(lpParms->dwItem) {
|
||||
case MCI_GETDEVCAPS_CAN_RECORD:
|
||||
|
@ -200,7 +200,7 @@ DWORD CDAUDIO_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
}
|
||||
}
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciGetDevCaps // lpParms->dwReturn=%08X;\n",
|
||||
"CDAUDIO_mciGetDevCaps // lpParms->dwReturn=%08lX;\n",
|
||||
lpParms->dwReturn);
|
||||
return 0;
|
||||
#else
|
||||
|
@ -214,7 +214,7 @@ DWORD CDAUDIO_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
DWORD CDAUDIO_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciInfo(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciInfo(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
lpParms->lpstrReturn = NULL;
|
||||
|
@ -241,13 +241,13 @@ DWORD CDAUDIO_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
|||
DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (CDADev[wDevID].unixdev == 0) return MMSYSERR_NOTENABLED;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciStatus // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"CDAUDIO_mciStatus // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
CDADev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -257,7 +257,7 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
case MCI_STATUS_CURRENT_TRACK:
|
||||
if (!CDAUDIO_GetCDStatus(wDevID)) return MCIERR_INTERNAL;
|
||||
lpParms->dwReturn = CDADev[wDevID].nCurTrack;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // CURRENT_TRACK=%u!\n", lpParms->dwReturn);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // CURRENT_TRACK=%lu!\n", lpParms->dwReturn);
|
||||
return 0;
|
||||
case MCI_STATUS_LENGTH:
|
||||
if (CDADev[wDevID].nTracks == 0) {
|
||||
|
@ -267,7 +267,7 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
}
|
||||
}
|
||||
if (dwFlags & MCI_TRACK) {
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_TRACK #%u LENGTH=??? !\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_TRACK #%lu LENGTH=??? !\n",
|
||||
lpParms->dwTrack);
|
||||
if (lpParms->dwTrack > CDADev[wDevID].nTracks)
|
||||
return MCIERR_OUTOFRANGE;
|
||||
|
@ -277,12 +277,12 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
lpParms->dwReturn = CDADev[wDevID].dwTotalLen;
|
||||
lpParms->dwReturn = CDAUDIO_CalcTime(wDevID,
|
||||
CDADev[wDevID].dwTimeFormat, lpParms->dwReturn);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // LENGTH=%u !\n", lpParms->dwReturn);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // LENGTH=%lu !\n", lpParms->dwReturn);
|
||||
return 0;
|
||||
case MCI_STATUS_MODE:
|
||||
if (!CDAUDIO_GetCDStatus(wDevID)) return MCIERR_INTERNAL;
|
||||
lpParms->dwReturn = CDADev[wDevID].mode;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_STATUS_MODE=%08X !\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_STATUS_MODE=%08lX !\n",
|
||||
lpParms->dwReturn);
|
||||
return 0;
|
||||
case MCI_STATUS_MEDIA_PRESENT:
|
||||
|
@ -294,7 +294,7 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
return 0;
|
||||
case MCI_STATUS_NUMBER_OF_TRACKS:
|
||||
lpParms->dwReturn = CDAUDIO_GetNumberOfTracks(wDevID);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_STATUS_NUMBER_OF_TRACKS = %u !\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_STATUS_NUMBER_OF_TRACKS = %lu !\n",
|
||||
lpParms->dwReturn);
|
||||
if (lpParms->dwReturn == (WORD)-1) return MCIERR_INTERNAL;
|
||||
return 0;
|
||||
|
@ -309,11 +309,11 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
if (lpParms->dwTrack > CDADev[wDevID].nTracks)
|
||||
return MCIERR_OUTOFRANGE;
|
||||
lpParms->dwReturn = CDADev[wDevID].lpdwTrackPos[lpParms->dwTrack - 1];
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // get MCI_TRACK #%u !\n", lpParms->dwTrack);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // get MCI_TRACK #%lu !\n", lpParms->dwTrack);
|
||||
}
|
||||
lpParms->dwReturn = CDAUDIO_CalcTime(wDevID,
|
||||
CDADev[wDevID].dwTimeFormat, lpParms->dwReturn);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_STATUS_POSITION=%08X !\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_STATUS_POSITION=%08lX !\n",
|
||||
lpParms->dwReturn);
|
||||
return 0;
|
||||
case MCI_STATUS_READY:
|
||||
|
@ -325,7 +325,7 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
lpParms->dwReturn = MCI_FORMAT_MILLISECONDS;
|
||||
return 0;
|
||||
default:
|
||||
fprintf(stderr,"CDAUDIO_mciStatus // unknown command %04X !\n", lpParms->dwItem);
|
||||
fprintf(stderr,"CDAUDIO_mciStatus // unknown command %08lX !\n", lpParms->dwItem);
|
||||
return MCIERR_UNRECOGNIZED_COMMAND;
|
||||
}
|
||||
}
|
||||
|
@ -348,14 +348,14 @@ DWORD CDAUDIO_CalcTime(UINT wDevID, DWORD dwFormatType, DWORD dwFrame)
|
|||
UINT wMinutes;
|
||||
UINT wSeconds;
|
||||
UINT wFrames;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcTime(%u, %08X, %lu);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcTime(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwFrame);
|
||||
TryAGAIN:
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwTime = dwFrame / CDFRAMES_PERSEC * 1000;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcTime // MILLISECONDS %u\n",
|
||||
"CDAUDIO_CalcTime // MILLISECONDS %lu\n",
|
||||
dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
|
@ -364,7 +364,7 @@ TryAGAIN:
|
|||
wFrames = dwFrame - CDFRAMES_PERMIN * wMinutes -
|
||||
CDFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_MSF(wMinutes, wSeconds, wFrames);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcTime // MSF %02u:%02u:%02u -> dwTime=%u\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcTime // MSF %02u:%02u:%02u -> dwTime=%lu\n",
|
||||
wMinutes, wSeconds, wFrames, dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_TMSF:
|
||||
|
@ -401,14 +401,14 @@ DWORD CDAUDIO_CalcFrame(UINT wDevID, DWORD dwFormatType, DWORD dwTime)
|
|||
DWORD dwFrame = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcFrame(%u, %08X, %lu);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcFrame(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwTime);
|
||||
TryAGAIN:
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwFrame = dwTime * CDFRAMES_PERSEC / 1000;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // MILLISECONDS %u\n",
|
||||
"CDAUDIO_CalcFrame // MILLISECONDS %lu\n",
|
||||
dwFrame);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
|
@ -427,7 +427,7 @@ TryAGAIN:
|
|||
MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime),
|
||||
MCI_TMSF_SECOND(dwTime), MCI_TMSF_FRAME(dwTime));
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // TMSF trackpos[%u]=%u\n",
|
||||
"CDAUDIO_CalcFrame // TMSF trackpos[%u]=%lu\n",
|
||||
wTrack, CDADev[wDevID].lpdwTrackPos[wTrack - 1]);
|
||||
dwFrame = CDADev[wDevID].lpdwTrackPos[wTrack - 1];
|
||||
dwFrame += CDFRAMES_PERMIN * MCI_TMSF_MINUTE(dwTime);
|
||||
|
@ -605,7 +605,7 @@ DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
#ifdef linux
|
||||
int start, end;
|
||||
struct cdrom_msf msf;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (CDADev[wDevID].unixdev == 0) return MMSYSERR_NOTENABLED;
|
||||
|
@ -614,14 +614,14 @@ DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
if (dwFlags & MCI_FROM) {
|
||||
start = CDAUDIO_CalcFrame(wDevID,
|
||||
CDADev[wDevID].dwTimeFormat, lpParms->dwFrom);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay // MCI_FROM=%08X -> %u \n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay // MCI_FROM=%08lX -> %u \n",
|
||||
lpParms->dwFrom, start);
|
||||
}
|
||||
if (dwFlags & MCI_TO) {
|
||||
end = CDAUDIO_CalcFrame(wDevID,
|
||||
CDADev[wDevID].dwTimeFormat, lpParms->dwTo);
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciPlay // MCI_TO=%08X -> %u \n",
|
||||
"CDAUDIO_mciPlay // MCI_TO=%08lX -> %u \n",
|
||||
lpParms->dwTo, end);
|
||||
}
|
||||
start += CDADev[wDevID].dwFirstOffset;
|
||||
|
@ -646,7 +646,7 @@ DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
CDADev[wDevID].mode = MCI_MODE_PLAY;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciPlay // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"CDAUDIO_mciPlay // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
CDADev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -663,14 +663,14 @@ DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
DWORD CDAUDIO_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStop(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStop(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMSTOP)) return MCIERR_HARDWARE;
|
||||
CDADev[wDevID].mode = MCI_MODE_STOP;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciStop // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"CDAUDIO_mciStop // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
CDADev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -687,14 +687,14 @@ DWORD CDAUDIO_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
DWORD CDAUDIO_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPause(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPause(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMPAUSE)) return MCIERR_HARDWARE;
|
||||
CDADev[wDevID].mode = MCI_MODE_PAUSE;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciPause // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"CDAUDIO_mciPause // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
CDADev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -711,14 +711,14 @@ DWORD CDAUDIO_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
DWORD CDAUDIO_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciResume(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciResume(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMRESUME)) return MCIERR_HARDWARE;
|
||||
CDADev[wDevID].mode = MCI_MODE_STOP;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciResume // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"CDAUDIO_mciResume // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
CDADev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -737,7 +737,7 @@ DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
|||
#ifdef linux
|
||||
DWORD dwRet;
|
||||
MCI_PLAY_PARMS PlayParms;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciSeek(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciSeek(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMRESUME)) return MCIERR_HARDWARE;
|
||||
|
@ -758,7 +758,7 @@ DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
|||
dwRet = CDAUDIO_mciStop(wDevID, MCI_WAIT, (LPMCI_GENERIC_PARMS)&PlayParms);
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciSeek // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"CDAUDIO_mciSeek // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
CDADev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -776,12 +776,12 @@ DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
|||
DWORD CDAUDIO_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciSet(%u, %08X, %08X);\n",
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciSet(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
/*
|
||||
printf("CDAUDIO_mciSet // dwTimeFormat=%08X\n", lpParms->dwTimeFormat);
|
||||
printf("CDAUDIO_mciSet // dwAudio=%08X\n", lpParms->dwAudio);
|
||||
printf("CDAUDIO_mciSet // dwTimeFormat=%08lX\n", lpParms->dwTimeFormat);
|
||||
printf("CDAUDIO_mciSet // dwAudio=%08lX\n", lpParms->dwAudio);
|
||||
*/
|
||||
if (dwFlags & MCI_SET_TIME_FORMAT) {
|
||||
switch (lpParms->dwTimeFormat) {
|
||||
|
@ -818,7 +818,7 @@ DWORD CDAUDIO_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
|||
if (dwFlags & MCI_SET_OFF) return MCIERR_UNSUPPORTED_FUNCTION;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_mciSet // MCI_NOTIFY_SUCCESSFUL %08X !\n",
|
||||
"CDAUDIO_mciSet // MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
CDADev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
|
|
@ -12,20 +12,19 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
|||
#ifdef BUILTIN_MMSYSTEM
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "win.h"
|
||||
#include "user.h"
|
||||
#include "driver.h"
|
||||
#include "mmsystem.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_MIDI */
|
||||
|
||||
#define DEBUG_MIDI
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#include <linux/soundcard.h>
|
||||
#endif
|
||||
|
@ -122,6 +121,7 @@ DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg,
|
|||
printf("MIDI_NotifyClient // can't notify client !\n");
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
|
@ -196,6 +196,7 @@ LRESULT MIDI_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
|||
*/
|
||||
DWORD MIDI_ReadByte(UINT wDevID, BYTE FAR *lpbyt)
|
||||
{
|
||||
#ifdef linux
|
||||
if (lpbyt != NULL) {
|
||||
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)lpbyt,
|
||||
(long) sizeof(BYTE)) == (long) sizeof(BYTE)) {
|
||||
|
@ -204,6 +205,10 @@ DWORD MIDI_ReadByte(UINT wDevID, BYTE FAR *lpbyt)
|
|||
}
|
||||
printf("MIDI_ReadByte // error reading wDevID=%d \n", wDevID);
|
||||
return MCIERR_INTERNAL;
|
||||
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -232,7 +237,6 @@ DWORD MIDI_ReadWord(UINT wDevID, LPWORD lpw)
|
|||
DWORD MIDI_ReadLong(UINT wDevID, LPDWORD lpdw)
|
||||
{
|
||||
WORD hiword, loword;
|
||||
BYTE hibyte, lobyte;
|
||||
if (lpdw != NULL) {
|
||||
if (MIDI_ReadWord(wDevID, &hiword) == 0) {
|
||||
if (MIDI_ReadWord(wDevID, &loword) == 0) {
|
||||
|
@ -279,11 +283,12 @@ DWORD MIDI_ReadVaryLen(UINT wDevID, LPDWORD lpdw)
|
|||
*/
|
||||
DWORD MIDI_ReadMThd(UINT wDevID, DWORD dwOffset)
|
||||
{
|
||||
#ifdef linux
|
||||
DWORD toberead;
|
||||
FOURCC fourcc;
|
||||
dprintf_midi(stddeb, "MIDI_ReadMThd(%04X, %08X);\n", wDevID, dwOffset);
|
||||
dprintf_midi(stddeb, "MIDI_ReadMThd(%04X, %08lX);\n", wDevID, dwOffset);
|
||||
if (mmioSeek(MCIMidiDev[wDevID].hFile, dwOffset, SEEK_SET) != dwOffset) {
|
||||
printf("MIDI_ReadMThd // can't seek at %08X begin of 'MThd' \n", dwOffset);
|
||||
printf("MIDI_ReadMThd // can't seek at %08lX begin of 'MThd' \n", dwOffset);
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)&fourcc,
|
||||
|
@ -302,7 +307,7 @@ DWORD MIDI_ReadMThd(UINT wDevID, DWORD dwOffset)
|
|||
if (MIDI_ReadWord(wDevID, &MCIMidiDev[wDevID].nTempo) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
printf("MIDI_ReadMThd // toberead=%08X, wFormat=%04X nTracks=%04X nTempo=%04X\n",
|
||||
printf("MIDI_ReadMThd // toberead=%08lX, wFormat=%04X nTracks=%04X nTempo=%04X\n",
|
||||
toberead, MCIMidiDev[wDevID].wFormat,
|
||||
MCIMidiDev[wDevID].nTracks,
|
||||
MCIMidiDev[wDevID].nTempo);
|
||||
|
@ -312,15 +317,20 @@ DWORD MIDI_ReadMThd(UINT wDevID, DWORD dwOffset)
|
|||
Mf_division = division = read16bit ();
|
||||
*/
|
||||
return 0;
|
||||
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
DWORD MIDI_ReadMTrk(UINT wDevID, DWORD dwOffset)
|
||||
{
|
||||
#ifdef linux
|
||||
DWORD toberead;
|
||||
FOURCC fourcc;
|
||||
if (mmioSeek(MCIMidiDev[wDevID].hFile, dwOffset, SEEK_SET) != dwOffset) {
|
||||
printf("MIDI_ReadMTrk // can't seek at %08X begin of 'MThd' \n", dwOffset);
|
||||
printf("MIDI_ReadMTrk // can't seek at %08lX begin of 'MThd' \n", dwOffset);
|
||||
}
|
||||
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)&fourcc,
|
||||
(long) sizeof(FOURCC)) != (long) sizeof(FOURCC)) {
|
||||
|
@ -329,10 +339,13 @@ DWORD MIDI_ReadMTrk(UINT wDevID, DWORD dwOffset)
|
|||
if (MIDI_ReadLong(wDevID, &toberead) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
printf("MIDI_ReadMTrk // toberead=%08X\n", toberead);
|
||||
printf("MIDI_ReadMTrk // toberead=%08lX\n", toberead);
|
||||
toberead -= 3 * sizeof(WORD);
|
||||
MCIMidiDev[wDevID].dwTotalLen = toberead;
|
||||
return 0;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -342,18 +355,13 @@ DWORD MIDI_ReadMTrk(UINT wDevID, DWORD dwOffset)
|
|||
DWORD MIDI_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
int hFile;
|
||||
UINT wDevID;
|
||||
OFSTRUCT OFstruct;
|
||||
MIDIOPENDESC MidiDesc;
|
||||
DWORD dwRet;
|
||||
DWORD dwOffset;
|
||||
char str[128];
|
||||
LPSTR ptr;
|
||||
DWORD toberead;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciOpen(%08X, %08X)\n", dwFlags, lpParms);
|
||||
#endif
|
||||
|
||||
dprintf_midi( stddeb, "MIDI_mciOpen(%08lX, %p)\n", dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
wDevID = lpParms->wDeviceID;
|
||||
if (MCIMidiDev[wDevID].nUseCount > 0) {
|
||||
|
@ -394,16 +402,13 @@ DWORD MIDI_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
MCIMidiDev[wDevID].dwTotalLen = 0;
|
||||
MidiDesc.hMidi = 0;
|
||||
if (MCIMidiDev[wDevID].hFile != 0) {
|
||||
MMCKINFO mmckInfo;
|
||||
MMCKINFO ckMainRIFF;
|
||||
if (mmioDescend(MCIMidiDev[wDevID].hFile, &ckMainRIFF, NULL, 0) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciOpen // ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX \n",
|
||||
dprintf_midi(stddeb,"MIDI_mciOpen // ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX \n",
|
||||
(LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType,
|
||||
ckMainRIFF.cksize);
|
||||
#endif
|
||||
dwOffset = 0;
|
||||
if (ckMainRIFF.ckid == mmioFOURCC('R', 'M', 'I', 'D')) {
|
||||
printf("MIDI_mciOpen // is a 'RMID' file \n");
|
||||
|
@ -424,11 +429,9 @@ DWORD MIDI_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
}
|
||||
dwOffset = mmioSeek(MCIMidiDev[wDevID].hFile, 0, SEEK_CUR);
|
||||
MCIMidiDev[wDevID].dwBeginData = dwOffset;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciOpen // Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX \n",
|
||||
(LPSTR)&mmckInfo.ckid, (LPSTR)&mmckInfo.fccType,
|
||||
mmckInfo.cksize);
|
||||
#endif
|
||||
dprintf_midi(stddeb,"MIDI_mciOpen // Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX \n",
|
||||
(LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType,
|
||||
ckMainRIFF.cksize);
|
||||
}
|
||||
dwRet = modMessage(0, MODM_OPEN, 0, (DWORD)&MidiDesc, CALLBACK_NULL);
|
||||
dwRet = midMessage(0, MIDM_OPEN, 0, (DWORD)&MidiDesc, CALLBACK_NULL);
|
||||
|
@ -447,7 +450,7 @@ DWORD MIDI_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
|||
#ifdef linux
|
||||
DWORD dwRet;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciClose(%u, %08X, %08X);\n", wDevID, dwParam, lpParms);
|
||||
printf("MIDI_mciClose(%u, %08lX, %p);\n", wDevID, dwParam, lpParms);
|
||||
#endif
|
||||
if (MCIMidiDev[wDevID].dwStatus != MCI_MODE_STOP) {
|
||||
MIDI_mciStop(wDevID, MCI_WAIT, lpParms);
|
||||
|
@ -485,7 +488,7 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
LPWORD ptr;
|
||||
DWORD dwRet;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciPlay(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
printf("MIDI_mciPlay(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (MCIMidiDev[wDevID].hFile == 0) {
|
||||
printf("MIDI_mciPlay // can't find file='%s' !\n",
|
||||
|
@ -503,7 +506,7 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
}
|
||||
/**/
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
printf("MIDI_mciPlay // MCI_NOTIFY %08X !\n", lpParms->dwCallback);
|
||||
printf("MIDI_mciPlay // MCI_NOTIFY %08lX !\n", lpParms->dwCallback);
|
||||
switch(fork()) {
|
||||
case -1:
|
||||
printf("MIDI_mciPlay // Can't 'fork' process !\n");
|
||||
|
@ -540,7 +543,7 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
if (count < 1) break;
|
||||
lpMidiHdr->dwBytesRecorded = count;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciPlay // before MODM_LONGDATA lpMidiHdr=%08X dwBytesRecorded=%u\n",
|
||||
printf("MIDI_mciPlay // before MODM_LONGDATA lpMidiHdr=%p dwBytesRecorded=%lu\n",
|
||||
lpMidiHdr, lpMidiHdr->dwBytesRecorded);
|
||||
#endif
|
||||
dwRet = modMessage(0, MODM_LONGDATA, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR));
|
||||
|
@ -553,7 +556,7 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
MCIMidiDev[wDevID].dwStatus = MCI_MODE_STOP;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciPlay // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
printf("MIDI_mciPlay // MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
#endif
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
MCIMidiDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -572,13 +575,11 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
int count;
|
||||
int start, end;
|
||||
LPMIDIHDR lpMidiHdr;
|
||||
DWORD dwRet;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciRecord(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
|
||||
dprintf_midi( stddeb, "MIDI_mciRecord(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (MCIMidiDev[wDevID].hFile == 0) {
|
||||
printf("MIDI_mciRecord // can't find file='%s' !\n",
|
||||
MCIMidiDev[wDevID].openParms.lpstrElementName);
|
||||
|
@ -606,7 +607,7 @@ DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
|||
&MCIMidiDev[wDevID].dwStatus, MCIMidiDev[wDevID].dwStatus);
|
||||
lpMidiHdr->dwBytesRecorded = 0;
|
||||
dwRet = midMessage(0, MIDM_START, 0, 0L, 0L);
|
||||
printf("MIDI_mciRecord // after MIDM_START lpMidiHdr=%08X dwBytesRecorded=%u\n",
|
||||
printf("MIDI_mciRecord // after MIDM_START lpMidiHdr=%p dwBytesRecorded=%lu\n",
|
||||
lpMidiHdr, lpMidiHdr->dwBytesRecorded);
|
||||
if (lpMidiHdr->dwBytesRecorded == 0) break;
|
||||
}
|
||||
|
@ -620,7 +621,7 @@ DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
|||
MCIMidiDev[wDevID].dwStatus = MCI_MODE_STOP;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciRecord // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
printf("MIDI_mciRecord // MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
#endif
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
MCIMidiDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
|
@ -639,7 +640,7 @@ DWORD MIDI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciStop(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
printf("MIDI_mciStop(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
MCIMidiDev[wDevID].dwStatus = MCI_MODE_STOP;
|
||||
|
@ -659,7 +660,7 @@ DWORD MIDI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciPause(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
printf("MIDI_mciPause(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
return 0;
|
||||
|
@ -676,7 +677,7 @@ DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciResume(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
printf("MIDI_mciResume(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
return 0;
|
||||
|
@ -693,12 +694,12 @@ DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciSet(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
printf("MIDI_mciSet(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciSet // dwTimeFormat=%08X\n", lpParms->dwTimeFormat);
|
||||
printf("MIDI_mciSet // dwAudio=%08X\n", lpParms->dwAudio);
|
||||
printf("MIDI_mciSet // dwTimeFormat=%08lX\n", lpParms->dwTimeFormat);
|
||||
printf("MIDI_mciSet // dwAudio=%08lX\n", lpParms->dwAudio);
|
||||
#endif
|
||||
if (dwFlags & MCI_SET_TIME_FORMAT) {
|
||||
switch (lpParms->dwTimeFormat) {
|
||||
|
@ -763,7 +764,7 @@ DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciStatus(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
printf("MIDI_mciStatus(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (dwFlags & MCI_STATUS_ITEM) {
|
||||
|
@ -831,12 +832,12 @@ DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
lpParms->dwReturn = 0;
|
||||
break;
|
||||
default:
|
||||
printf("MIDI_mciStatus // unknowm command %04X !\n", lpParms->dwItem);
|
||||
printf("MIDI_mciStatus // unknowm command %08lX !\n", lpParms->dwItem);
|
||||
return MCIERR_UNRECOGNIZED_COMMAND;
|
||||
}
|
||||
}
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
printf("MIDI_mciStatus // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
printf("MIDI_mciStatus // MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
MCIMidiDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
|
@ -853,7 +854,7 @@ DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
LPMCI_GETDEVCAPS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
printf("MIDI_mciGetDevCaps(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
printf("MIDI_mciGetDevCaps(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (dwFlags & MCI_GETDEVCAPS_ITEM) {
|
||||
switch(lpParms->dwItem) {
|
||||
|
@ -900,7 +901,7 @@ DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
DWORD MIDI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
printf("MIDI_mciInfo(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
printf("MIDI_mciInfo(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
lpParms->lpstrReturn = NULL;
|
||||
switch(dwFlags) {
|
||||
|
@ -932,7 +933,7 @@ DWORD MIDI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
|||
*/
|
||||
DWORD midGetDevCaps(WORD wDevID, LPMIDIINCAPS lpCaps, DWORD dwSize)
|
||||
{
|
||||
printf("midGetDevCaps(%u, %08X, %08X);\n", wDevID, lpCaps, dwSize);
|
||||
printf("midGetDevCaps(%u, %p, %08lX);\n", wDevID, lpCaps, dwSize);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -944,7 +945,7 @@ DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
|||
#ifdef linux
|
||||
int midi;
|
||||
dprintf_midi(stddeb,
|
||||
"midOpen(%u, %08X, %08X);\n", wDevID, lpDesc, dwFlags);
|
||||
"midOpen(%u, %p, %08lX);\n", wDevID, lpDesc, dwFlags);
|
||||
if (lpDesc == NULL) {
|
||||
fprintf(stderr,"Linux 'midOpen' // Invalid Parameter !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
@ -1020,7 +1021,7 @@ DWORD midClose(WORD wDevID)
|
|||
*/
|
||||
DWORD midAddBuffer(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
{
|
||||
printf("midAddBuffer(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
printf("midAddBuffer(%u, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -1029,7 +1030,7 @@ DWORD midAddBuffer(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
|||
*/
|
||||
DWORD midPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
{
|
||||
printf("midPrepare(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
printf("midPrepare(%u, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -1038,7 +1039,7 @@ DWORD midPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
|||
*/
|
||||
DWORD midUnprepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
{
|
||||
printf("midUnprepare(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
printf("midUnprepare(%u, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1079,7 @@ DWORD midStop(WORD wDevID)
|
|||
DWORD midMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
printf("midMessage(%u, %04X, %08X, %08X, %08X);\n",
|
||||
printf("midMessage(%u, %04X, %08lX, %08lX, %08lX);\n",
|
||||
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
||||
switch(wMsg) {
|
||||
case MIDM_OPEN:
|
||||
|
@ -1115,7 +1116,7 @@ DWORD midMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
|||
*/
|
||||
DWORD modGetDevCaps(WORD wDevID, LPMIDIOUTCAPS lpCaps, DWORD dwSize)
|
||||
{
|
||||
printf("modGetDevCaps(%u, %08X, %08X);\n", wDevID, lpCaps, dwSize);
|
||||
printf("modGetDevCaps(%u, %p, %08lX);\n", wDevID, lpCaps, dwSize);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -1128,7 +1129,7 @@ DWORD modOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
|||
#ifdef linux
|
||||
int midi;
|
||||
dprintf_midi(stddeb,
|
||||
"modOpen(%u, %08X, %08X);\n", wDevID, lpDesc, dwFlags);
|
||||
"modOpen(%u, %p, %08lX);\n", wDevID, lpDesc, dwFlags);
|
||||
if (lpDesc == NULL) {
|
||||
fprintf(stderr,"Linux 'modOpen' // Invalid Parameter !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
@ -1207,9 +1208,10 @@ DWORD modClose(WORD wDevID)
|
|||
*/
|
||||
DWORD modData(WORD wDevID, DWORD dwParam)
|
||||
{
|
||||
#ifdef linux
|
||||
WORD event;
|
||||
dprintf_midi(stddeb,
|
||||
"modData(%u, %08X);\n", wDevID, dwParam);
|
||||
"modData(%u, %08lX);\n", wDevID, dwParam);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modData' // can't play !\n");
|
||||
return MIDIERR_NODEVICE;
|
||||
|
@ -1221,6 +1223,9 @@ DWORD modData(WORD wDevID, DWORD dwParam)
|
|||
"modData() // error writting unixdev !\n");
|
||||
}
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -1232,8 +1237,8 @@ DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
|||
int count;
|
||||
LPWORD ptr;
|
||||
dprintf_midi(stddeb,
|
||||
"modLongData(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
printf("modLongData(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
"modLongData(%u, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
|
||||
printf("modLongData(%u, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modLongData' // can't play !\n");
|
||||
return MIDIERR_NODEVICE;
|
||||
|
@ -1244,7 +1249,7 @@ DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
|||
lpMidiHdr->dwFlags &= ~MHDR_DONE;
|
||||
lpMidiHdr->dwFlags |= MHDR_INQUEUE;
|
||||
dprintf_midi(stddeb,
|
||||
"modLongData() // dwBytesRecorded %u !\n", lpMidiHdr->dwBytesRecorded);
|
||||
"modLongData() // dwBytesRecorded %lu !\n", lpMidiHdr->dwBytesRecorded);
|
||||
/*
|
||||
count = write (MidiOutDev[wDevID].unixdev,
|
||||
lpMidiHdr->lpData, lpMidiHdr->dwBytesRecorded);
|
||||
|
@ -1257,7 +1262,7 @@ DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
|||
}
|
||||
if (count != lpMidiHdr->dwBytesRecorded) {
|
||||
dprintf_midi(stddeb,
|
||||
"modLongData() // error writting unixdev #%d ! (%d != %d)\n",
|
||||
"modLongData() // error writting unixdev #%d ! (%d != %ld)\n",
|
||||
MidiOutDev[wDevID].unixdev, count, lpMidiHdr->dwBytesRecorded);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
@ -1280,7 +1285,7 @@ DWORD modPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_midi(stddeb,
|
||||
"modPrepare(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
"modPrepare(%u, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modPrepare' // can't prepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1307,7 +1312,7 @@ DWORD modUnprepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
|||
{
|
||||
#ifdef linux
|
||||
dprintf_midi(stddeb,
|
||||
"modUnprepare(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
"modUnprepare(%u, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modUnprepare' // can't unprepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -1333,7 +1338,7 @@ DWORD modReset(WORD wDevID)
|
|||
*/
|
||||
DWORD modGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
||||
{
|
||||
printf("modGetposition(%u, %08X, %08X);\n", wDevID, lpTime, uSize);
|
||||
printf("modGetposition(%u, %p, %08lX);\n", wDevID, lpTime, uSize);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -1344,7 +1349,7 @@ DWORD modGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
DWORD modMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
printf("modMessage(%u, %04X, %08X, %08X, %08X);\n",
|
||||
printf("modMessage(%u, %04X, %08lX, %08lX, %08lX);\n",
|
||||
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
||||
switch(wMsg) {
|
||||
case MODM_OPEN:
|
||||
|
@ -1376,5 +1381,4 @@ DWORD modMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
|||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#endif /* #ifdef BUILTIN_MMSYSTEM */
|
||||
|
|
|
@ -48,7 +48,7 @@ DWORD AUX_GetDevCaps(WORD wDevID, LPAUXCAPS lpCaps, DWORD dwSize)
|
|||
#ifdef linux
|
||||
int mixer;
|
||||
int volume;
|
||||
printf("AUX_GetDevCaps(%u, %08X, %u);\n", wDevID, lpCaps, dwSize);
|
||||
printf("AUX_GetDevCaps(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
|
||||
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
|
||||
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
|
||||
printf("AUX_GetDevCaps // mixer device not available !\n");
|
||||
|
@ -120,7 +120,7 @@ DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol)
|
|||
int mixer;
|
||||
int volume;
|
||||
int cmd;
|
||||
printf("AUX_GetVolume(%u, %08X);\n", wDevID, lpdwVol);
|
||||
printf("AUX_GetVolume(%u, %p);\n", wDevID, lpdwVol);
|
||||
if (lpdwVol == NULL) return MMSYSERR_NOTENABLED;
|
||||
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
|
||||
printf("Linux 'AUX_GetVolume' // mixer device not available !\n");
|
||||
|
@ -174,7 +174,7 @@ DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
|
|||
int mixer;
|
||||
int volume;
|
||||
int cmd;
|
||||
printf("AUX_SetVolume(%u, %08X);\n", wDevID, dwParam);
|
||||
printf("AUX_SetVolume(%u, %08lX);\n", wDevID, dwParam);
|
||||
volume = LOWORD(dwParam);
|
||||
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
|
||||
printf("Linux 'AUX_SetVolume' // mixer device not available !\n");
|
||||
|
@ -225,7 +225,7 @@ DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
|
|||
DWORD auxMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
printf("auxMessage(%u, %04X, %08X, %08X, %08X);\n",
|
||||
printf("auxMessage(%u, %04X, %08lX, %08lX, %08lX);\n",
|
||||
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
||||
switch(wMsg) {
|
||||
case AUXDM_GETDEVCAPS:
|
||||
|
|
|
@ -12,7 +12,8 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
|||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "win.h"
|
||||
#include "windows.h"
|
||||
#include "callback.h"
|
||||
#include "user.h"
|
||||
#include "driver.h"
|
||||
#include "mmsystem.h"
|
||||
|
@ -26,7 +27,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
|||
#include "debug.h"
|
||||
|
||||
|
||||
static WORD mciActiveDev = 0;
|
||||
static BOOL mmTimeStarted = FALSE;
|
||||
static MMTIME mmSysTimeMS;
|
||||
static MMTIME mmSysTimeSMPTE;
|
||||
|
@ -197,7 +197,7 @@ void WINAPI OutputDebugStr(LPCSTR str)
|
|||
BOOL DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE hDev,
|
||||
WORD wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
printf("DriverCallback(%08X, %04X, %04X, %04X, %08X, %08X, %08X); !\n",
|
||||
printf("DriverCallback(%08lX, %04X, %04X, %04X, %08lX, %08lX, %08lX); !\n",
|
||||
dwCallBack, uFlags, hDev, wMsg, dwUser, dwParam1, dwParam2);
|
||||
switch(uFlags & DCB_TYPEMASK) {
|
||||
case DCB_NULL:
|
||||
|
@ -230,7 +230,7 @@ WORD JoyGetNumDevs()
|
|||
*/
|
||||
WORD JoyGetDevCaps(WORD wID, LPJOYCAPS lpCaps, WORD wSize)
|
||||
{
|
||||
printf("EMPTY STUB !!! JoyGetDevCaps(%04X, %08X, %d);\n",
|
||||
printf("EMPTY STUB !!! JoyGetDevCaps(%04X, %p, %d);\n",
|
||||
wID, lpCaps, wSize);
|
||||
return MMSYSERR_NODRIVER;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ WORD JoyGetDevCaps(WORD wID, LPJOYCAPS lpCaps, WORD wSize)
|
|||
*/
|
||||
WORD JoyGetPos(WORD wID, LPJOYINFO lpInfo)
|
||||
{
|
||||
printf("EMPTY STUB !!! JoyGetPos(%04X, %08X);\n", wID, lpInfo);
|
||||
printf("EMPTY STUB !!! JoyGetPos(%04X, %p);\n", wID, lpInfo);
|
||||
return MMSYSERR_NODRIVER;
|
||||
}
|
||||
|
||||
|
@ -249,7 +249,7 @@ WORD JoyGetPos(WORD wID, LPJOYINFO lpInfo)
|
|||
*/
|
||||
WORD JoyGetThreshold(WORD wID, LPWORD lpThreshold)
|
||||
{
|
||||
printf("EMPTY STUB !!! JoyGetThreshold(%04X, %08X);\n", wID, lpThreshold);
|
||||
printf("EMPTY STUB !!! JoyGetThreshold(%04X, %p);\n", wID, lpThreshold);
|
||||
return MMSYSERR_NODRIVER;
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ UINT WINAPI auxGetNumDevs()
|
|||
*/
|
||||
UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize)
|
||||
{
|
||||
printf("auxGetDevCaps(%04X, %08X, %d) !\n",
|
||||
printf("auxGetDevCaps(%04X, %p, %d) !\n",
|
||||
uDeviceID, lpCaps, uSize);
|
||||
return auxMessage(uDeviceID, AUXDM_GETDEVCAPS,
|
||||
0L, (DWORD)lpCaps, (DWORD)uSize);
|
||||
|
@ -319,7 +319,7 @@ UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize)
|
|||
*/
|
||||
UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume)
|
||||
{
|
||||
printf("auxGetVolume(%04X, %08X) !\n", uDeviceID, lpdwVolume);
|
||||
printf("auxGetVolume(%04X, %p) !\n", uDeviceID, lpdwVolume);
|
||||
return auxMessage(uDeviceID, AUXDM_GETVOLUME, 0L, (DWORD)lpdwVolume, 0L);
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,7 @@ UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume)
|
|||
*/
|
||||
UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume)
|
||||
{
|
||||
printf("auxSetVolume(%04X, %08X) !\n", uDeviceID, dwVolume);
|
||||
printf("auxSetVolume(%04X, %08lX) !\n", uDeviceID, dwVolume);
|
||||
return auxMessage(uDeviceID, AUXDM_SETVOLUME, 0L, dwVolume, 0L);
|
||||
}
|
||||
|
||||
|
@ -337,8 +337,7 @@ UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume)
|
|||
*/
|
||||
DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("auxOutMessage(%04X, %04X, %08X, %08X)\n",
|
||||
printf("auxOutMessage(%04X, %04X, %08lX, %08lX)\n",
|
||||
uDeviceID, uMessage, dw1, dw2);
|
||||
return auxMessage(uDeviceID, uMessage, 0L, dw1, dw2);
|
||||
}
|
||||
|
@ -350,7 +349,7 @@ BOOL mciGetErrorString (DWORD wError, LPSTR lpstrBuffer, UINT uLength)
|
|||
{
|
||||
LPSTR msgptr;
|
||||
int maxbuf;
|
||||
printf("mciGetErrorString(%04X, %08X, %d);\n", wError, lpstrBuffer, uLength);
|
||||
printf("mciGetErrorString(%08lX, %p, %d);\n", wError, lpstrBuffer, uLength);
|
||||
if ((lpstrBuffer == NULL) || (uLength < 1)) return(FALSE);
|
||||
lpstrBuffer[0] = '\0';
|
||||
switch(wError) {
|
||||
|
@ -626,7 +625,7 @@ DWORD mciOpen(DWORD dwParam, LPMCI_OPEN_PARMS lpParms)
|
|||
char str[128];
|
||||
DWORD dwDevTyp = 0;
|
||||
UINT wDevID = 1;
|
||||
printf("mciOpen(%08X, %08X)\n", dwParam, lpParms);
|
||||
printf("mciOpen(%08lX, %p)\n", dwParam, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
while(mciDrv[wDevID].wType != 0) {
|
||||
if (++wDevID >= MAXMCIDRIVERS) {
|
||||
|
@ -637,7 +636,7 @@ DWORD mciOpen(DWORD dwParam, LPMCI_OPEN_PARMS lpParms)
|
|||
if (dwParam & MCI_OPEN_TYPE) {
|
||||
if (lpParms->lpstrDeviceType == NULL) return MCIERR_INTERNAL;
|
||||
if (dwParam & MCI_OPEN_TYPE_ID) {
|
||||
printf("MCI_OPEN // Dev=%08X !\n", lpParms->lpstrDeviceType);
|
||||
printf("MCI_OPEN // Dev=%p !\n", lpParms->lpstrDeviceType);
|
||||
dwDevTyp = (DWORD)lpParms->lpstrDeviceType;
|
||||
}
|
||||
else {
|
||||
|
@ -686,7 +685,7 @@ DWORD mciOpen(DWORD dwParam, LPMCI_OPEN_PARMS lpParms)
|
|||
printf("MCI_OPEN // No DIGITAL_VIDEO yet !\n");
|
||||
return MCIERR_DEVICE_NOT_INSTALLED;
|
||||
default:
|
||||
printf("MCI_OPEN // Invalid Device Name '%08X' !\n", lpParms->lpstrDeviceType);
|
||||
printf("MCI_OPEN // Invalid Device Name '%p' !\n", lpParms->lpstrDeviceType);
|
||||
return MCIERR_INVALID_DEVICE_NAME;
|
||||
}
|
||||
}
|
||||
|
@ -700,7 +699,7 @@ DWORD mciOpen(DWORD dwParam, LPMCI_OPEN_PARMS lpParms)
|
|||
DWORD mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
DWORD dwRet = MCIERR_INTERNAL;
|
||||
printf("mciClose(%u, %08X, %08X)\n", wDevID, dwParam, lpParms);
|
||||
printf("mciClose(%u, %08lX, %p)\n", wDevID, dwParam, lpParms);
|
||||
switch(mciDrv[wDevID].wType) {
|
||||
case MCI_DEVTYPE_CD_AUDIO:
|
||||
#ifndef WINELIB
|
||||
|
@ -747,7 +746,7 @@ DWORD mciSound(UINT wDevID, DWORD dwParam, LPMCI_SOUND_PARMS lpParms)
|
|||
DWORD mciSendCommand(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
HDRVR hDrv = 0;
|
||||
dprintf_mci(stddeb, "mciSendCommand(%04X, %04X, %08X, %08X)\n",
|
||||
dprintf_mci(stddeb, "mciSendCommand(%04X, %04X, %08lX, %08lX)\n",
|
||||
wDevID, wMsg, dwParam1, dwParam2);
|
||||
switch(wMsg) {
|
||||
case MCI_OPEN:
|
||||
|
@ -800,7 +799,7 @@ UINT mciGetDeviceID (LPCSTR lpstrName)
|
|||
DWORD WINAPI mciSendString (LPCSTR lpstrCommand,
|
||||
LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback)
|
||||
{
|
||||
printf("mciSendString('%s', %lX, %u, %X)\n",
|
||||
printf("mciSendString('%s', %p, %u, %X)\n",
|
||||
lpstrCommand, lpstrReturnString,
|
||||
uReturnLength, hwndCallback);
|
||||
return MCIERR_MISSING_COMMAND_STRING;
|
||||
|
@ -812,6 +811,7 @@ DWORD WINAPI mciSendString (LPCSTR lpstrCommand,
|
|||
BOOL WINAPI mciSetYieldProc (UINT uDeviceID,
|
||||
YIELDPROC fpYieldProc, DWORD dwYieldData)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -819,6 +819,7 @@ BOOL WINAPI mciSetYieldProc (UINT uDeviceID,
|
|||
*/
|
||||
UINT WINAPI mciGetDeviceIDFromElementID(DWORD dwElementID, LPCSTR lpstrType)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -826,6 +827,7 @@ UINT WINAPI mciGetDeviceIDFromElementID(DWORD dwElementID, LPCSTR lpstrType)
|
|||
*/
|
||||
YIELDPROC WINAPI mciGetYieldProc(UINT uDeviceID, DWORD FAR* lpdwYieldData)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -833,6 +835,7 @@ YIELDPROC WINAPI mciGetYieldProc(UINT uDeviceID, DWORD FAR* lpdwYieldData)
|
|||
*/
|
||||
HTASK WINAPI mciGetCreatorTask(UINT uDeviceID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -923,10 +926,10 @@ UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID,
|
|||
{
|
||||
HMIDI hMidiOut;
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
DWORD dwRet;
|
||||
DWORD dwRet = 0;
|
||||
BOOL bMapperFlg = FALSE;
|
||||
if (lphMidiOut != NULL) *lphMidiOut = 0;
|
||||
printf("midiOutOpen(%08X, %d, %08X, %08X, %08X);\n",
|
||||
printf("midiOutOpen(%p, %d, %08lX, %08lX, %08lX);\n",
|
||||
lphMidiOut, uDeviceID, dwCallback, dwInstance, dwFlags);
|
||||
if (uDeviceID == (UINT)MIDI_MAPPER) {
|
||||
printf("midiOutOpen // MIDI_MAPPER mode requested !\n");
|
||||
|
@ -970,7 +973,7 @@ UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut,
|
|||
MIDIHDR FAR* lpMidiOutHdr, UINT uSize)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("midiOutPrepareHeader(%04X, %08X, %d)\n",
|
||||
printf("midiOutPrepareHeader(%04X, %p, %d)\n",
|
||||
hMidiOut, lpMidiOutHdr, uSize);
|
||||
lpDesc = (LPMIDIOPENDESC) GlobalLock(hMidiOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -985,7 +988,7 @@ UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
|
|||
MIDIHDR FAR* lpMidiOutHdr, UINT uSize)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("midiOutUnprepareHeader(%04X, %08X, %d)\n",
|
||||
printf("midiOutUnprepareHeader(%04X, %p, %d)\n",
|
||||
hMidiOut, lpMidiOutHdr, uSize);
|
||||
lpDesc = (LPMIDIOPENDESC) GlobalLock(hMidiOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -999,7 +1002,7 @@ UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
|
|||
UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("midiOutShortMsg(%04X, %08X)\n", hMidiOut, dwMsg);
|
||||
printf("midiOutShortMsg(%04X, %08lX)\n", hMidiOut, dwMsg);
|
||||
lpDesc = (LPMIDIOPENDESC) GlobalLock(hMidiOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
return modMessage(0, MODM_DATA, lpDesc->dwInstance, dwMsg, 0L);
|
||||
|
@ -1012,7 +1015,7 @@ UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut,
|
|||
MIDIHDR FAR* lpMidiOutHdr, UINT uSize)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("midiOutLongMsg(%04X, %08X, %d)\n",
|
||||
printf("midiOutLongMsg(%04X, %p, %d)\n",
|
||||
hMidiOut, lpMidiOutHdr, uSize);
|
||||
lpDesc = (LPMIDIOPENDESC) GlobalLock(hMidiOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1083,7 +1086,7 @@ DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage,
|
|||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("midiOutMessage(%04X, %04X, %08X, %08X)\n",
|
||||
printf("midiOutMessage(%04X, %04X, %08lX, %08lX)\n",
|
||||
hMidiOut, uMessage, dwParam1, dwParam2);
|
||||
lpDesc = (LPMIDIOPENDESC) GlobalLock(hMidiOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1127,10 +1130,10 @@ UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID,
|
|||
{
|
||||
HMIDI hMidiIn;
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
DWORD dwRet;
|
||||
DWORD dwRet = 0;
|
||||
BOOL bMapperFlg = FALSE;
|
||||
if (lphMidiIn != NULL) *lphMidiIn = 0;
|
||||
printf("midiInOpen(%08X, %d, %08X, %08X, %08X);\n",
|
||||
printf("midiInOpen(%p, %d, %08lX, %08lX, %08lX);\n",
|
||||
lphMidiIn, uDeviceID, dwCallback, dwInstance, dwFlags);
|
||||
if (uDeviceID == (UINT)MIDI_MAPPER) {
|
||||
printf("midiInOpen // MIDI_MAPPER mode requested !\n");
|
||||
|
@ -1174,7 +1177,7 @@ UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
|
|||
MIDIHDR FAR* lpMidiInHdr, UINT uSize)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("midiInPrepareHeader(%04X, %08X, %d)\n",
|
||||
printf("midiInPrepareHeader(%04X, %p, %d)\n",
|
||||
hMidiIn, lpMidiInHdr, uSize);
|
||||
lpDesc = (LPMIDIOPENDESC) GlobalLock(hMidiIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1189,7 +1192,7 @@ UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn,
|
|||
MIDIHDR FAR* lpMidiInHdr, UINT uSize)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("midiInUnprepareHeader(%04X, %08X, %d)\n",
|
||||
printf("midiInUnprepareHeader(%04X, %p, %d)\n",
|
||||
hMidiIn, lpMidiInHdr, uSize);
|
||||
lpDesc = (LPMIDIOPENDESC) GlobalLock(hMidiIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1250,7 +1253,7 @@ DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage,
|
|||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
LPMIDIOPENDESC lpDesc;
|
||||
printf("midiInMessage(%04X, %04X, %08X, %08X)\n",
|
||||
printf("midiInMessage(%04X, %04X, %08lX, %08lX)\n",
|
||||
hMidiIn, uMessage, dwParam1, dwParam2);
|
||||
lpDesc = (LPMIDIOPENDESC) GlobalLock(hMidiIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1296,7 +1299,7 @@ UINT WINAPI waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize)
|
|||
{
|
||||
LPSTR msgptr;
|
||||
int maxbuf;
|
||||
printf("waveGetErrorText(%04X, %08X, %d);\n", uError, lpText, uSize);
|
||||
printf("waveGetErrorText(%04X, %p, %d);\n", uError, lpText, uSize);
|
||||
if ((lpText == NULL) || (uSize < 1)) return(FALSE);
|
||||
lpText[0] = '\0';
|
||||
switch(uError) {
|
||||
|
@ -1366,9 +1369,9 @@ UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID,
|
|||
{
|
||||
HWAVE hWaveOut;
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
DWORD dwRet;
|
||||
DWORD dwRet = 0;
|
||||
BOOL bMapperFlg = FALSE;
|
||||
printf("waveOutOpen(%08X, %d, %08X, %08X, %08X, %08X);\n",
|
||||
printf("waveOutOpen(%p, %d, %p, %08lX, %08lX, %08lX);\n",
|
||||
lphWaveOut, uDeviceID, lpFormat, dwCallback, dwInstance, dwFlags);
|
||||
if (dwFlags & WAVE_FORMAT_QUERY) {
|
||||
printf("waveOutOpen // WAVE_FORMAT_QUERY requested !\n");
|
||||
|
@ -1421,7 +1424,7 @@ UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut,
|
|||
WAVEHDR FAR* lpWaveOutHdr, UINT uSize)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveOutPrepareHeader(%04X, %08X, %u);\n",
|
||||
printf("waveOutPrepareHeader(%04X, %p, %u);\n",
|
||||
hWaveOut, lpWaveOutHdr, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1436,7 +1439,7 @@ UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut,
|
|||
WAVEHDR FAR* lpWaveOutHdr, UINT uSize)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveOutUnprepareHeader(%04X, %08X, %u);\n",
|
||||
printf("waveOutUnprepareHeader(%04X, %p, %u);\n",
|
||||
hWaveOut, lpWaveOutHdr, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1450,7 +1453,7 @@ UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut,
|
|||
UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr, UINT uSize)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveOutWrite(%04X, %08X, %u);\n", hWaveOut, lpWaveOutHdr, uSize);
|
||||
printf("waveOutWrite(%04X, %p, %u);\n", hWaveOut, lpWaveOutHdr, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
return wodMessage(0, WODM_WRITE, lpDesc->dwInstance,
|
||||
|
@ -1490,7 +1493,7 @@ UINT WINAPI waveOutReset(HWAVEOUT hWaveOut)
|
|||
UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpTime, UINT uSize)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveOutGetPosition(%04X, %08X, %u);\n", hWaveOut, lpTime, uSize);
|
||||
printf("waveOutGetPosition(%04X, %p, %u);\n", hWaveOut, lpTime, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
return wodMessage(0, WODM_GETPOS, lpDesc->dwInstance,
|
||||
|
@ -1576,7 +1579,7 @@ DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage,
|
|||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveOutMessage(%04X, %04X, %08X, %08X)\n",
|
||||
printf("waveOutMessage(%04X, %04X, %08lX, %08lX)\n",
|
||||
hWaveOut, uMessage, dwParam1, dwParam2);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveOut);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1624,9 +1627,9 @@ UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID,
|
|||
{
|
||||
HWAVE hWaveIn;
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
DWORD dwRet;
|
||||
DWORD dwRet = 0;
|
||||
BOOL bMapperFlg = FALSE;
|
||||
printf("waveInOpen(%08X, %d, %08X, %08X, %08X, %08X);\n",
|
||||
printf("waveInOpen(%p, %d, %p, %08lX, %08lX, %08lX);\n",
|
||||
lphWaveIn, uDeviceID, lpFormat, dwCallback, dwInstance, dwFlags);
|
||||
if (dwFlags & WAVE_FORMAT_QUERY) {
|
||||
printf("waveInOpen // WAVE_FORMAT_QUERY requested !\n");
|
||||
|
@ -1681,14 +1684,14 @@ UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn,
|
|||
WAVEHDR FAR* lpWaveInHdr, UINT uSize)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveInPrepareHeader(%04X, %08X, %u);\n",
|
||||
printf("waveInPrepareHeader(%04X, %p, %u);\n",
|
||||
hWaveIn, lpWaveInHdr, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
if (lpWaveInHdr == NULL) return MMSYSERR_INVALHANDLE;
|
||||
lpWaveInHdr->lpNext = NULL;
|
||||
lpWaveInHdr->dwBytesRecorded = 0;
|
||||
printf("waveInPrepareHeader // lpData=%08X size=%u \n",
|
||||
printf("waveInPrepareHeader // lpData=%p size=%lu \n",
|
||||
lpWaveInHdr->lpData, lpWaveInHdr->dwBufferLength);
|
||||
return widMessage(0, WIDM_PREPARE, lpDesc->dwInstance,
|
||||
(DWORD)lpWaveInHdr, uSize);
|
||||
|
@ -1702,7 +1705,7 @@ UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn,
|
|||
WAVEHDR FAR* lpWaveInHdr, UINT uSize)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveInUnprepareHeader(%04X, %08X, %u);\n",
|
||||
printf("waveInUnprepareHeader(%04X, %p, %u);\n",
|
||||
hWaveIn, lpWaveInHdr, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1722,13 +1725,13 @@ UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn,
|
|||
WAVEHDR FAR* lpWaveInHdr, UINT uSize)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveInAddBuffer(%04X, %08X, %u);\n", hWaveIn, lpWaveInHdr, uSize);
|
||||
printf("waveInAddBuffer(%04X, %p, %u);\n", hWaveIn, lpWaveInHdr, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
if (lpWaveInHdr == NULL) return MMSYSERR_INVALHANDLE;
|
||||
lpWaveInHdr->lpNext = NULL;
|
||||
lpWaveInHdr->dwBytesRecorded = 0;
|
||||
printf("waveInAddBuffer // lpData=%08X size=%u \n",
|
||||
printf("waveInAddBuffer // lpData=%p size=%lu \n",
|
||||
lpWaveInHdr->lpData, lpWaveInHdr->dwBufferLength);
|
||||
return widMessage(0, WIDM_ADDBUFFER, lpDesc->dwInstance,
|
||||
(DWORD)lpWaveInHdr, uSize);
|
||||
|
@ -1780,7 +1783,7 @@ UINT WINAPI waveInReset(HWAVEIN hWaveIn)
|
|||
UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpTime, UINT uSize)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveInGetPosition(%04X, %08X, %u);\n", hWaveIn, lpTime, uSize);
|
||||
printf("waveInGetPosition(%04X, %p, %u);\n", hWaveIn, lpTime, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
return widMessage(0, WIDM_GETPOS, lpDesc->dwInstance,
|
||||
|
@ -1806,7 +1809,7 @@ DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage,
|
|||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
printf("waveInMessage(%04X, %04X, %08X, %08X)\n",
|
||||
printf("waveInMessage(%04X, %04X, %08lX, %08lX)\n",
|
||||
hWaveIn, uMessage, dwParam1, dwParam2);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
|
@ -1872,7 +1875,7 @@ void StartMMTime()
|
|||
*/
|
||||
WORD timeGetSystemTime(LPMMTIME lpTime, WORD wSize)
|
||||
{
|
||||
printf("timeGetSystemTime(%08X, %u);\n", lpTime, wSize);
|
||||
printf("timeGetSystemTime(%p, %u);\n", lpTime, wSize);
|
||||
if (!mmTimeStarted) StartMMTime();
|
||||
return 0;
|
||||
}
|
||||
|
@ -1887,7 +1890,7 @@ WORD timeSetEvent(WORD wDelay, WORD wResol,
|
|||
WORD wNewID = 0;
|
||||
LPTIMERENTRY lpNewTimer;
|
||||
LPTIMERENTRY lpTimer = lpTimerList;
|
||||
printf("timeSetEvent(%u, %u, %08X, %08X, %04X);\n",
|
||||
printf("timeSetEvent(%u, %u, %p, %08lX, %04X);\n",
|
||||
wDelay, wResol, lpFunc, dwUser, wFlags);
|
||||
if (!mmTimeStarted) StartMMTime();
|
||||
lpNewTimer = (LPTIMERENTRY) malloc(sizeof(TIMERENTRY));
|
||||
|
@ -1899,11 +1902,11 @@ WORD timeSetEvent(WORD wDelay, WORD wResol,
|
|||
}
|
||||
if (lpTimerList == NULL) {
|
||||
lpTimerList = lpNewTimer;
|
||||
lpNewTimer->Prev == NULL;
|
||||
lpNewTimer->Prev = NULL;
|
||||
}
|
||||
else {
|
||||
lpTimer->Next == lpNewTimer;
|
||||
lpNewTimer->Prev == lpTimer;
|
||||
lpTimer->Next = lpNewTimer;
|
||||
lpNewTimer->Prev = lpTimer;
|
||||
}
|
||||
lpNewTimer->Next = NULL;
|
||||
lpNewTimer->wTimerID = wNewID + 1;
|
||||
|
@ -1939,7 +1942,7 @@ WORD timeKillEvent(WORD wID)
|
|||
*/
|
||||
WORD timeGetDevCaps(LPTIMECAPS lpCaps, WORD wSize)
|
||||
{
|
||||
printf("timeGetDevCaps(%08X, %u) !\n", lpCaps, wSize);
|
||||
printf("timeGetDevCaps(%p, %u) !\n", lpCaps, wSize);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1982,7 +1985,7 @@ HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo, DWORD dwOpenFl
|
|||
HANDLE hmmio;
|
||||
OFSTRUCT ofs;
|
||||
LPMMIOINFO lpmminfo;
|
||||
printf("mmioOpen('%s', %08X, %08X);\n", szFileName, lpmmioinfo, dwOpenFlags);
|
||||
printf("mmioOpen('%s', %p, %08lX);\n", szFileName, lpmmioinfo, dwOpenFlags);
|
||||
hFile = OpenFile(szFileName, &ofs, dwOpenFlags);
|
||||
if (hFile == -1) return 0;
|
||||
hmmio = GlobalAlloc(GMEM_MOVEABLE, sizeof(MMIOINFO));
|
||||
|
@ -2021,7 +2024,7 @@ LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
|
|||
{
|
||||
int count;
|
||||
LPMMIOINFO lpmminfo;
|
||||
dprintf_mmio(stddeb, "mmioRead(%04X, %08X, %ld);\n", hmmio, pch, cch);
|
||||
dprintf_mmio(stddeb, "mmioRead(%04X, %p, %ld);\n", hmmio, pch, cch);
|
||||
lpmminfo = (LPMMIOINFO)GlobalLock(hmmio);
|
||||
if (lpmminfo == NULL) return 0;
|
||||
count = _lread(LOWORD(lpmminfo->dwReserved2), pch, cch);
|
||||
|
@ -2038,7 +2041,7 @@ LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
|
|||
{
|
||||
int count;
|
||||
LPMMIOINFO lpmminfo;
|
||||
printf("mmioWrite(%04X, %08X, %ld);\n", hmmio, pch, cch);
|
||||
printf("mmioWrite(%04X, %p, %ld);\n", hmmio, pch, cch);
|
||||
lpmminfo = (LPMMIOINFO)GlobalLock(hmmio);
|
||||
if (lpmminfo == NULL) return 0;
|
||||
count = _lwrite(LOWORD(lpmminfo->dwReserved2), (LPSTR)pch, cch);
|
||||
|
@ -2053,7 +2056,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin)
|
|||
{
|
||||
int count;
|
||||
LPMMIOINFO lpmminfo;
|
||||
printf("mmioSeek(%04X, %08X, %d);\n", hmmio, lOffset, iOrigin);
|
||||
printf("mmioSeek(%04X, %08lX, %d);\n", hmmio, lOffset, iOrigin);
|
||||
lpmminfo = (LPMMIOINFO)GlobalLock(hmmio);
|
||||
if (lpmminfo == NULL) {
|
||||
printf("mmioSeek // can't lock hmmio=%04X !\n", hmmio);
|
||||
|
@ -2175,7 +2178,7 @@ UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
|
|||
{
|
||||
DWORD dwfcc, dwOldPos;
|
||||
LPMMIOINFO lpmminfo;
|
||||
dprintf_mmio(stddeb, "mmioDescend(%04X, %08X, %08X, %04X);\n",
|
||||
dprintf_mmio(stddeb, "mmioDescend(%04X, %p, %p, %04X);\n",
|
||||
hmmio, lpck, lpckParent, uFlags);
|
||||
if (lpck == NULL) return 0;
|
||||
lpmminfo = (LPMMIOINFO)GlobalLock(hmmio);
|
||||
|
@ -2189,7 +2192,7 @@ UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
|
|||
}
|
||||
if ((uFlags & MMIO_FINDCHUNK) || (uFlags & MMIO_FINDRIFF) ||
|
||||
(uFlags & MMIO_FINDLIST)) {
|
||||
dprintf_mmio(stddeb, "mmioDescend // MMIO_FINDxxxx dwfcc=%08X !\n", dwfcc);
|
||||
dprintf_mmio(stddeb, "mmioDescend // MMIO_FINDxxxx dwfcc=%08lX !\n", dwfcc);
|
||||
while (TRUE) {
|
||||
if (_lread(LOWORD(lpmminfo->dwReserved2), (LPSTR)lpck,
|
||||
sizeof(MMCKINFO)) < sizeof(MMCKINFO)) {
|
||||
|
@ -2197,7 +2200,7 @@ UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
|
|||
GlobalUnlock(hmmio);
|
||||
return MMIOERR_CHUNKNOTFOUND;
|
||||
}
|
||||
dprintf_mmio(stddeb, "mmioDescend // dwfcc=%08X ckid=%08X cksize=%08X !\n",
|
||||
dprintf_mmio(stddeb, "mmioDescend // dwfcc=%08lX ckid=%08lX cksize=%08lX !\n",
|
||||
dwfcc, lpck->ckid, lpck->cksize);
|
||||
if (dwfcc == lpck->ckid) break;
|
||||
dwOldPos += lpck->cksize + 2 * sizeof(DWORD);
|
||||
|
@ -2220,9 +2223,9 @@ UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
|
|||
lpck->dwDataOffset += sizeof(DWORD);
|
||||
lpmminfo->lDiskOffset = _llseek(LOWORD(lpmminfo->dwReserved2),
|
||||
lpck->dwDataOffset, SEEK_SET);
|
||||
dprintf_mmio(stddeb, "mmioDescend // lpck->ckid=%08X lpck->cksize=%ld !\n",
|
||||
dprintf_mmio(stddeb, "mmioDescend // lpck->ckid=%08lX lpck->cksize=%ld !\n",
|
||||
lpck->ckid, lpck->cksize);
|
||||
printf("mmioDescend // lpck->fccType=%08X !\n", lpck->fccType);
|
||||
printf("mmioDescend // lpck->fccType=%08lX !\n", lpck->fccType);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2251,7 +2254,7 @@ UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags)
|
|||
UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
|
||||
MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags)
|
||||
{
|
||||
printf("mmioRename('%s', '%s', %08X, %08X);\n",
|
||||
printf("mmioRename('%s', '%s', %p, %08lX);\n",
|
||||
szFileName, szNewFileName, lpmmioinfo, dwRenameFlags);
|
||||
return 0;
|
||||
}
|
||||
|
@ -2261,7 +2264,7 @@ UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
|
|||
*/
|
||||
HDRVR DrvOpen(LPSTR lpDriverName, LPSTR lpSectionName, LPARAM lParam)
|
||||
{
|
||||
printf("DrvOpen('%s', '%s', %08X);\n",
|
||||
printf("DrvOpen('%s', '%s', %08lX);\n",
|
||||
lpDriverName, lpSectionName, lParam);
|
||||
return OpenDriver(lpDriverName, lpSectionName, lParam);
|
||||
}
|
||||
|
@ -2272,7 +2275,7 @@ HDRVR DrvOpen(LPSTR lpDriverName, LPSTR lpSectionName, LPARAM lParam)
|
|||
*/
|
||||
LRESULT DrvClose(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
|
||||
{
|
||||
printf("DrvClose(%04X, %08X, %08X);\n", hDrvr, lParam1, lParam2);
|
||||
printf("DrvClose(%04X, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
|
||||
return CloseDriver(hDrvr, lParam1, lParam2);
|
||||
}
|
||||
|
||||
|
@ -2283,7 +2286,7 @@ LRESULT DrvClose(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
|
|||
LRESULT WINAPI DrvSendMessage(HDRVR hDriver, WORD msg, LPARAM lParam1, LPARAM lParam2)
|
||||
{
|
||||
DWORD dwDevID = 0;
|
||||
printf("DrvSendMessage(%04X, %04X, %08X, %08X);\n",
|
||||
printf("DrvSendMessage(%04X, %04X, %08lX, %08lX);\n",
|
||||
hDriver, msg, lParam1, lParam2);
|
||||
#ifndef WINELIB
|
||||
return CDAUDIO_DriverProc(dwDevID, hDriver, msg, lParam1, lParam2);
|
||||
|
@ -2296,6 +2299,7 @@ LRESULT WINAPI DrvSendMessage(HDRVR hDriver, WORD msg, LPARAM lParam1, LPARAM lP
|
|||
HANDLE DrvGetModuleHandle(HDRVR hDrvr)
|
||||
{
|
||||
printf("DrvGetModuleHandle(%04X);\n", hDrvr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ SRCS = \
|
|||
dc.c \
|
||||
dcvalues.c \
|
||||
dib.c \
|
||||
dither.c \
|
||||
font.c \
|
||||
gdiobj.c \
|
||||
linedda.c \
|
||||
|
|
1421
objects/bitblt.c
1421
objects/bitblt.c
File diff suppressed because it is too large
Load Diff
|
@ -204,9 +204,9 @@ LONG SetBitmapBits( HBITMAP hbitmap, LONG count, LPSTR buffer )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* BMP_DeleteObject
|
||||
* BITMAP_DeleteObject
|
||||
*/
|
||||
BOOL BMP_DeleteObject( HBITMAP hbitmap, BITMAPOBJ * bitmap )
|
||||
BOOL BITMAP_DeleteObject( HBITMAP hbitmap, BITMAPOBJ * bitmap )
|
||||
{
|
||||
XFreePixmap( display, bitmap->pixmap );
|
||||
return GDI_FreeObject( hbitmap );
|
||||
|
@ -214,9 +214,9 @@ BOOL BMP_DeleteObject( HBITMAP hbitmap, BITMAPOBJ * bitmap )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* BMP_GetObject
|
||||
* BITMAP_GetObject
|
||||
*/
|
||||
int BMP_GetObject( BITMAPOBJ * bmp, int count, LPSTR buffer )
|
||||
int BITMAP_GetObject( BITMAPOBJ * bmp, int count, LPSTR buffer )
|
||||
{
|
||||
if (count > sizeof(BITMAP)) count = sizeof(BITMAP);
|
||||
memcpy( buffer, &bmp->bitmap, count );
|
||||
|
|
129
objects/brush.c
129
objects/brush.c
|
@ -1,21 +1,20 @@
|
|||
/*
|
||||
* GDI brush objects
|
||||
*
|
||||
* Copyright 1993 Alexandre Julliard
|
||||
*
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
*/
|
||||
* Copyright 1993, 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#include "gdi.h"
|
||||
#include <stdlib.h>
|
||||
#include "brush.h"
|
||||
#include "bitmap.h"
|
||||
#include "metafile.h"
|
||||
#include "stddebug.h"
|
||||
#include "color.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
#define NB_HATCH_STYLES 6
|
||||
|
||||
static char HatchBrushes[NB_HATCH_STYLES][8] =
|
||||
static const char HatchBrushes[NB_HATCH_STYLES][8] =
|
||||
{
|
||||
{ 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00 }, /* HS_HORIZONTAL */
|
||||
{ 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 }, /* HS_VERTICAL */
|
||||
|
@ -25,6 +24,118 @@ static char HatchBrushes[NB_HATCH_STYLES][8] =
|
|||
{ 0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81 } /* HS_DIAGCROSS */
|
||||
};
|
||||
|
||||
/* Levels of each primary for dithering */
|
||||
#define PRIMARY_LEVELS 3
|
||||
#define TOTAL_LEVELS (PRIMARY_LEVELS*PRIMARY_LEVELS*PRIMARY_LEVELS)
|
||||
|
||||
/* Dithering matrix size */
|
||||
#define MATRIX_SIZE 8
|
||||
#define MATRIX_SIZE_2 (MATRIX_SIZE*MATRIX_SIZE)
|
||||
|
||||
/* Total number of possible levels for a dithered primary color */
|
||||
#define DITHER_LEVELS (MATRIX_SIZE_2 * (PRIMARY_LEVELS-1) + 1)
|
||||
|
||||
/* Dithering matrix */
|
||||
static const int dither_matrix[MATRIX_SIZE_2] =
|
||||
{
|
||||
0, 32, 8, 40, 2, 34, 10, 42,
|
||||
48, 16, 56, 24, 50, 18, 58, 26,
|
||||
12, 44, 4, 36, 14, 46, 6, 38,
|
||||
60, 28, 52, 20, 62, 30, 54, 22,
|
||||
3, 35, 11, 43, 1, 33, 9, 41,
|
||||
51, 19, 59, 27, 49, 17, 57, 25,
|
||||
15, 47, 7, 39, 13, 45, 5, 37,
|
||||
63, 31, 55, 23, 61, 29, 53, 21
|
||||
};
|
||||
|
||||
/* Mapping between (R,G,B) triples and EGA colors */
|
||||
static const int EGAmapping[TOTAL_LEVELS] =
|
||||
{
|
||||
0, /* 000000 -> 000000 */
|
||||
4, /* 00007f -> 000080 */
|
||||
12, /* 0000ff -> 0000ff */
|
||||
2, /* 007f00 -> 008000 */
|
||||
6, /* 007f7f -> 008080 */
|
||||
6, /* 007fff -> 008080 */
|
||||
10, /* 00ff00 -> 00ff00 */
|
||||
6, /* 00ff7f -> 008080 */
|
||||
14, /* 00ffff -> 00ffff */
|
||||
1, /* 7f0000 -> 800000 */
|
||||
5, /* 7f007f -> 800080 */
|
||||
5, /* 7f00ff -> 800080 */
|
||||
3, /* 7f7f00 -> 808000 */
|
||||
8, /* 7f7f7f -> 808080 */
|
||||
7, /* 7f7fff -> c0c0c0 */
|
||||
3, /* 7fff00 -> 808000 */
|
||||
7, /* 7fff7f -> c0c0c0 */
|
||||
7, /* 7fffff -> c0c0c0 */
|
||||
9, /* ff0000 -> ff0000 */
|
||||
5, /* ff007f -> 800080 */
|
||||
13, /* ff00ff -> ff00ff */
|
||||
3, /* ff7f00 -> 808000 */
|
||||
7, /* ff7f7f -> c0c0c0 */
|
||||
7, /* ff7fff -> c0c0c0 */
|
||||
11, /* ffff00 -> ffff00 */
|
||||
7, /* ffff7f -> c0c0c0 */
|
||||
15 /* ffffff -> ffffff */
|
||||
};
|
||||
|
||||
#define PIXEL_VALUE(r,g,b) \
|
||||
COLOR_mapEGAPixel[EGAmapping[((r)*PRIMARY_LEVELS+(g))*PRIMARY_LEVELS+(b)]]
|
||||
|
||||
/* X image for building dithered pixmap */
|
||||
static XImage *ditherImage = NULL;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BRUSH_Init
|
||||
*
|
||||
* Create the X image used for dithering.
|
||||
*/
|
||||
BOOL BRUSH_Init(void)
|
||||
{
|
||||
XCREATEIMAGE( ditherImage, MATRIX_SIZE, MATRIX_SIZE, screenDepth );
|
||||
return (ditherImage != NULL);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BRUSH_DitherColor
|
||||
*/
|
||||
Pixmap BRUSH_DitherColor( DC *dc, COLORREF color )
|
||||
{
|
||||
static COLORREF prevColor = 0xffffffff;
|
||||
unsigned int x, y;
|
||||
Pixmap pixmap;
|
||||
|
||||
if (color != prevColor)
|
||||
{
|
||||
int r = GetRValue( color ) * DITHER_LEVELS;
|
||||
int g = GetGValue( color ) * DITHER_LEVELS;
|
||||
int b = GetBValue( color ) * DITHER_LEVELS;
|
||||
const int *pmatrix = dither_matrix;
|
||||
|
||||
for (y = 0; y < MATRIX_SIZE; y++)
|
||||
{
|
||||
for (x = 0; x < MATRIX_SIZE; x++)
|
||||
{
|
||||
int d = *pmatrix++ * 256;
|
||||
int dr = ((r + d) / MATRIX_SIZE_2) / 256;
|
||||
int dg = ((g + d) / MATRIX_SIZE_2) / 256;
|
||||
int db = ((b + d) / MATRIX_SIZE_2) / 256;
|
||||
XPutPixel( ditherImage, x, y, PIXEL_VALUE(dr,dg,db) );
|
||||
}
|
||||
}
|
||||
prevColor = color;
|
||||
}
|
||||
|
||||
pixmap = XCreatePixmap( display, rootWindow,
|
||||
MATRIX_SIZE, MATRIX_SIZE, screenDepth );
|
||||
XPutImage( display, pixmap, BITMAP_colorGC, ditherImage, 0, 0,
|
||||
0, 0, MATRIX_SIZE, MATRIX_SIZE );
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateBrushIndirect (GDI.50)
|
||||
|
@ -172,14 +283,14 @@ int BRUSH_GetObject( BRUSHOBJ * brush, int count, LPSTR buffer )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* BRUSH_MakeSolidBrush
|
||||
* BRUSH_SelectSolidBrush
|
||||
*/
|
||||
static void BRUSH_SelectSolidBrush( DC *dc, COLORREF color )
|
||||
{
|
||||
if ((dc->w.bitsPerPixel > 1) && (screenDepth <= 8) && !COLOR_IsSolid( color ))
|
||||
{
|
||||
/* Dithered brush */
|
||||
dc->u.x.brush.pixmap = DITHER_DitherColor( dc, color );
|
||||
dc->u.x.brush.pixmap = BRUSH_DitherColor( dc, color );
|
||||
dc->u.x.brush.fillStyle = FillTiled;
|
||||
dc->u.x.brush.pixel = 0;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "gdi.h"
|
||||
#include "region.h"
|
||||
#include "metafile.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_CLIPPING */
|
||||
|
|
|
@ -114,7 +114,7 @@ static HPALETTE COLOR_InitPalette(void)
|
|||
colorTranslation = (WORD *) GDI_HEAP_ADDR( hSysColorTranslation );
|
||||
revTranslation = (WORD *) GDI_HEAP_ADDR( hRevSysColorTranslation );
|
||||
|
||||
if (COLOR_WinColormap == DefaultColormapOfScreen(screen))
|
||||
if ((COLOR_WinColormap == DefaultColormapOfScreen(screen)) && (screenDepth <= 8))
|
||||
{
|
||||
COLOR_PaletteToPixel = (int *)malloc( sizeof(int) * size );
|
||||
COLOR_PixelToPalette = (int *)malloc( sizeof(int) * size );
|
||||
|
@ -151,7 +151,7 @@ static HPALETTE COLOR_InitPalette(void)
|
|||
fprintf(stderr, "Warning: Not enough free colors. Try using the -privatemap option.\n" );
|
||||
color.pixel = color.red = color.green = color.blue = 0;
|
||||
}
|
||||
else
|
||||
else if (COLOR_PaletteToPixel)
|
||||
{
|
||||
COLOR_PaletteToPixel[pixel] = color.pixel;
|
||||
COLOR_PixelToPalette[color.pixel] = pixel;
|
||||
|
@ -254,6 +254,14 @@ int COLOR_ToPhysical( DC *dc, COLORREF color )
|
|||
WORD *mapping;
|
||||
|
||||
if (screenDepth > 8) return color;
|
||||
if (dc && (dc->w.bitsPerPixel == 1) && ((color >> 24) == 0))
|
||||
{
|
||||
if (((color >> 16) & 0xff) +
|
||||
((color >> 8) & 0xff) + (color & 0xff) > 255*3/2)
|
||||
return 1; /* white */
|
||||
else return 0; /* black */
|
||||
}
|
||||
|
||||
switch(color >> 24)
|
||||
{
|
||||
case 0: /* RGB */
|
||||
|
|
148
objects/dc.c
148
objects/dc.c
|
@ -3,8 +3,8 @@
|
|||
*
|
||||
* Copyright 1993 Alexandre Julliard
|
||||
*
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "gdi.h"
|
||||
|
@ -17,9 +17,57 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
|||
|
||||
static DeviceCaps * displayDevCaps = NULL;
|
||||
|
||||
extern const WIN_DC_INFO DCVAL_defaultValues;
|
||||
extern void CLIPPING_UpdateGCRegion( DC * dc ); /* objects/clipping.c */
|
||||
|
||||
/* Default DC values */
|
||||
static const WIN_DC_INFO DC_defaultValues =
|
||||
{
|
||||
0, /* flags */
|
||||
NULL, /* devCaps */
|
||||
0, /* hMetaFile */
|
||||
0, /* hClipRgn */
|
||||
0, /* hVisRgn */
|
||||
0, /* hGCClipRgn */
|
||||
STOCK_BLACK_PEN, /* hPen */
|
||||
STOCK_WHITE_BRUSH, /* hBrush */
|
||||
STOCK_SYSTEM_FONT, /* hFont */
|
||||
0, /* hBitmap */
|
||||
0, /* hFirstBitmap */
|
||||
0, /* hDevice */
|
||||
STOCK_DEFAULT_PALETTE, /* hPalette */
|
||||
R2_COPYPEN, /* ROPmode */
|
||||
ALTERNATE, /* polyFillMode */
|
||||
BLACKONWHITE, /* stretchBltMode */
|
||||
ABSOLUTE, /* relAbsMode */
|
||||
OPAQUE, /* backgroundMode */
|
||||
RGB( 255, 255, 255 ), /* backgroundColor */
|
||||
RGB( 0, 0, 0 ), /* textColor */
|
||||
0, /* backgroundPixel */
|
||||
0, /* textPixel */
|
||||
0, /* brushOrgX */
|
||||
0, /* brushOrgY */
|
||||
TA_LEFT | TA_TOP | TA_NOUPDATECP, /* textAlign */
|
||||
0, /* charExtra */
|
||||
0, /* breakTotalExtra */
|
||||
0, /* breakCount */
|
||||
0, /* breakExtra */
|
||||
0, /* breakRem */
|
||||
1, /* bitsPerPixel */
|
||||
MM_TEXT, /* MapMode */
|
||||
0, /* DCOrgX */
|
||||
0, /* DCOrgY */
|
||||
0, /* CursPosX */
|
||||
0, /* CursPosY */
|
||||
0, /* WndOrgX */
|
||||
0, /* WndOrgY */
|
||||
1, /* WndExtX */
|
||||
1, /* WndExtY */
|
||||
0, /* VportOrgX */
|
||||
0, /* VportOrgY */
|
||||
1, /* VportExtX */
|
||||
1 /* VportExtY */
|
||||
};
|
||||
|
||||
/* ROP code to GC function conversion */
|
||||
const int DC_XROPfunction[16] =
|
||||
{
|
||||
|
@ -109,17 +157,19 @@ void DC_InitDC( HDC hdc )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* DC_SetupDCForBrush
|
||||
* DC_SetupDCForPatBlt
|
||||
*
|
||||
* Setup dc->u.x.gc for drawing operations using current brush.
|
||||
* Return 0 if brush is BS_NULL, 1 otherwise.
|
||||
* Setup the GC for a PatBlt operation using current brush.
|
||||
* If fMapColors is TRUE, X pixels are mapped to Windows colors.
|
||||
* Return FALSE if brush is BS_NULL, TRUE otherwise.
|
||||
*/
|
||||
int DC_SetupGCForBrush( DC * dc )
|
||||
BOOL DC_SetupGCForPatBlt( DC * dc, GC gc, BOOL fMapColors )
|
||||
{
|
||||
XGCValues val;
|
||||
unsigned long mask = 0;
|
||||
unsigned long mask;
|
||||
Pixmap pixmap = 0;
|
||||
|
||||
if (dc->u.x.brush.style == BS_NULL) return 0;
|
||||
if (dc->u.x.brush.style == BS_NULL) return FALSE;
|
||||
if (dc->u.x.brush.pixel == -1)
|
||||
{
|
||||
/* Special case used for monochrome pattern brushes.
|
||||
|
@ -134,27 +184,68 @@ int DC_SetupGCForBrush( DC * dc )
|
|||
val.foreground = dc->u.x.brush.pixel;
|
||||
val.background = dc->w.backgroundPixel;
|
||||
}
|
||||
if (fMapColors && COLOR_PixelToPalette)
|
||||
{
|
||||
val.foreground = COLOR_PixelToPalette[val.foreground];
|
||||
val.background = COLOR_PixelToPalette[val.background];
|
||||
}
|
||||
|
||||
val.function = DC_XROPfunction[dc->w.ROPmode-1];
|
||||
val.fill_style = dc->u.x.brush.fillStyle;
|
||||
if ((val.fill_style==FillStippled) || (val.fill_style==FillOpaqueStippled))
|
||||
switch(val.fill_style)
|
||||
{
|
||||
case FillStippled:
|
||||
case FillOpaqueStippled:
|
||||
if (dc->w.backgroundMode==OPAQUE) val.fill_style = FillOpaqueStippled;
|
||||
val.stipple = dc->u.x.brush.pixmap;
|
||||
mask = GCStipple;
|
||||
}
|
||||
else if (val.fill_style == FillTiled)
|
||||
{
|
||||
val.tile = dc->u.x.brush.pixmap;
|
||||
break;
|
||||
|
||||
case FillTiled:
|
||||
if (fMapColors && COLOR_PixelToPalette)
|
||||
{
|
||||
register int x, y;
|
||||
XImage *image;
|
||||
pixmap = XCreatePixmap( display, rootWindow, 8, 8, screenDepth );
|
||||
image = XGetImage( display, dc->u.x.brush.pixmap, 0, 0, 8, 8,
|
||||
AllPlanes, ZPixmap );
|
||||
for (y = 0; y < 8; y++)
|
||||
for (x = 0; x < 8; x++)
|
||||
XPutPixel( image, x, y,
|
||||
COLOR_PixelToPalette[XGetPixel( image, x, y)] );
|
||||
XPutImage( display, pixmap, gc, image, 0, 0, 0, 0, 8, 8 );
|
||||
XDestroyImage( image );
|
||||
val.tile = pixmap;
|
||||
}
|
||||
else val.tile = dc->u.x.brush.pixmap;
|
||||
mask = GCTile;
|
||||
break;
|
||||
|
||||
default:
|
||||
mask = 0;
|
||||
break;
|
||||
}
|
||||
val.ts_x_origin = dc->w.DCOrgX + dc->w.brushOrgX;
|
||||
val.ts_y_origin = dc->w.DCOrgY + dc->w.brushOrgY;
|
||||
val.fill_rule = (dc->w.polyFillMode==WINDING) ? WindingRule : EvenOddRule;
|
||||
XChangeGC( display, dc->u.x.gc,
|
||||
XChangeGC( display, gc,
|
||||
GCFunction | GCForeground | GCBackground | GCFillStyle |
|
||||
GCFillRule | GCTileStipXOrigin | GCTileStipYOrigin | mask,
|
||||
&val );
|
||||
return 1;
|
||||
if (pixmap) XFreePixmap( display, pixmap );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DC_SetupDCForBrush
|
||||
*
|
||||
* Setup dc->u.x.gc for drawing operations using current brush.
|
||||
* Return FALSE if brush is BS_NULL, TRUE otherwise.
|
||||
*/
|
||||
BOOL DC_SetupGCForBrush( DC * dc )
|
||||
{
|
||||
return DC_SetupGCForPatBlt( dc, dc->u.x.gc, FALSE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -162,13 +253,13 @@ int DC_SetupGCForBrush( DC * dc )
|
|||
* DC_SetupDCForPen
|
||||
*
|
||||
* Setup dc->u.x.gc for drawing operations using current pen.
|
||||
* Return 0 if pen is PS_NULL, 1 otherwise.
|
||||
* Return FALSE if pen is PS_NULL, TRUE otherwise.
|
||||
*/
|
||||
int DC_SetupGCForPen( DC * dc )
|
||||
BOOL DC_SetupGCForPen( DC * dc )
|
||||
{
|
||||
XGCValues val;
|
||||
|
||||
if (dc->u.x.pen.style == PS_NULL) return 0;
|
||||
if (dc->u.x.pen.style == PS_NULL) return FALSE;
|
||||
val.function = DC_XROPfunction[dc->w.ROPmode-1];
|
||||
val.foreground = dc->u.x.pen.pixel;
|
||||
val.background = dc->w.backgroundPixel;
|
||||
|
@ -187,7 +278,7 @@ int DC_SetupGCForPen( DC * dc )
|
|||
XChangeGC( display, dc->u.x.gc,
|
||||
GCFunction | GCForeground | GCBackground | GCLineWidth |
|
||||
GCLineStyle | GCCapStyle | GCJoinStyle | GCFillStyle, &val );
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -195,15 +286,16 @@ int DC_SetupGCForPen( DC * dc )
|
|||
* DC_SetupGCForText
|
||||
*
|
||||
* Setup dc->u.x.gc for text drawing operations.
|
||||
* Return 0 if the font is null, 1 otherwise.
|
||||
* Return FALSE if the font is null, TRUE otherwise.
|
||||
*/
|
||||
int DC_SetupGCForText( DC * dc )
|
||||
BOOL DC_SetupGCForText( DC * dc )
|
||||
{
|
||||
XGCValues val;
|
||||
|
||||
if (!dc->u.x.font.fstruct)
|
||||
{
|
||||
FONT_SelectObject(dc, STOCK_SYSTEM_FONT, NULL);
|
||||
fprintf( stderr, "DC_SetupGCForText: fstruct is NULL. Please report this\n" );
|
||||
return FALSE;
|
||||
}
|
||||
val.function = GXcopy; /* Text is always GXcopy */
|
||||
val.foreground = dc->w.textPixel;
|
||||
|
@ -213,7 +305,7 @@ int DC_SetupGCForText( DC * dc )
|
|||
XChangeGC( display, dc->u.x.gc,
|
||||
GCFunction | GCForeground | GCBackground | GCFillStyle |
|
||||
GCFont, &val );
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -364,7 +456,7 @@ HDC CreateDC( LPSTR driver, LPSTR device, LPSTR output, LPSTR initData )
|
|||
}
|
||||
|
||||
dc->saveLevel = 0;
|
||||
memcpy( &dc->w, &DCVAL_defaultValues, sizeof(DCVAL_defaultValues) );
|
||||
memcpy( &dc->w, &DC_defaultValues, sizeof(DC_defaultValues) );
|
||||
memset( &dc->u.x, 0, sizeof(dc->u.x) );
|
||||
|
||||
dc->u.x.drawable = rootWindow;
|
||||
|
@ -421,7 +513,7 @@ HDC CreateCompatibleDC( HDC hdc )
|
|||
bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||
|
||||
dc->saveLevel = 0;
|
||||
memcpy( &dc->w, &DCVAL_defaultValues, sizeof(DCVAL_defaultValues) );
|
||||
memcpy( &dc->w, &DC_defaultValues, sizeof(DC_defaultValues) );
|
||||
memset( &dc->u.x, 0, sizeof(dc->u.x) );
|
||||
|
||||
dc->u.x.drawable = bmp->pixmap;
|
||||
|
@ -430,6 +522,7 @@ HDC CreateCompatibleDC( HDC hdc )
|
|||
dc->w.bitsPerPixel = 1;
|
||||
dc->w.devCaps = displayDevCaps;
|
||||
dc->w.hBitmap = hbitmap;
|
||||
dc->w.hFirstBitmap = hbitmap;
|
||||
dc->w.hVisRgn = CreateRectRgn( 0, 0, 1, 1 );
|
||||
|
||||
if (!dc->w.hVisRgn)
|
||||
|
@ -473,8 +566,7 @@ BOOL DeleteDC( HDC hdc )
|
|||
XFreeGC( display, dc->u.x.gc );
|
||||
}
|
||||
|
||||
if (dc->w.flags & DC_MEMORY) DeleteObject( dc->w.hBitmap );
|
||||
|
||||
if (dc->w.flags & DC_MEMORY) DeleteObject( dc->w.hFirstBitmap );
|
||||
if (dc->w.hClipRgn) DeleteObject( dc->w.hClipRgn );
|
||||
if (dc->w.hVisRgn) DeleteObject( dc->w.hVisRgn );
|
||||
if (dc->w.hGCClipRgn) DeleteObject( dc->w.hGCClipRgn );
|
||||
|
|
|
@ -8,54 +8,6 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
|||
#include "gdi.h"
|
||||
#include "metafile.h"
|
||||
|
||||
/* Default DC values */
|
||||
const WIN_DC_INFO DCVAL_defaultValues =
|
||||
{
|
||||
0, /* flags */
|
||||
NULL, /* devCaps */
|
||||
0, /* hMetaFile */
|
||||
0, /* hClipRgn */
|
||||
0, /* hVisRgn */
|
||||
0, /* hGCClipRgn */
|
||||
STOCK_BLACK_PEN, /* hPen */
|
||||
STOCK_WHITE_BRUSH, /* hBrush */
|
||||
STOCK_SYSTEM_FONT, /* hFont */
|
||||
0, /* hBitmap */
|
||||
0, /* hDevice */
|
||||
STOCK_DEFAULT_PALETTE, /* hPalette */
|
||||
R2_COPYPEN, /* ROPmode */
|
||||
ALTERNATE, /* polyFillMode */
|
||||
BLACKONWHITE, /* stretchBltMode */
|
||||
ABSOLUTE, /* relAbsMode */
|
||||
OPAQUE, /* backgroundMode */
|
||||
RGB( 255, 255, 255 ), /* backgroundColor */
|
||||
RGB( 0, 0, 0 ), /* textColor */
|
||||
0, /* backgroundPixel */
|
||||
0, /* textPixel */
|
||||
0, /* brushOrgX */
|
||||
0, /* brushOrgY */
|
||||
TA_LEFT | TA_TOP | TA_NOUPDATECP, /* textAlign */
|
||||
0, /* charExtra */
|
||||
0, /* breakTotalExtra */
|
||||
0, /* breakCount */
|
||||
0, /* breakExtra */
|
||||
0, /* breakRem */
|
||||
1, /* bitsPerPixel */
|
||||
MM_TEXT, /* MapMode */
|
||||
0, /* DCOrgX */
|
||||
0, /* DCOrgY */
|
||||
0, /* CursPosX */
|
||||
0, /* CursPosY */
|
||||
0, /* WndOrgX */
|
||||
0, /* WndOrgY */
|
||||
1, /* WndExtX */
|
||||
1, /* WndExtY */
|
||||
0, /* VportOrgX */
|
||||
0, /* VportOrgY */
|
||||
1, /* VportExtX */
|
||||
1 /* VportExtY */
|
||||
};
|
||||
|
||||
|
||||
#define DC_GET_VAL( func_type, func_name, dc_field ) \
|
||||
func_type func_name( HDC hdc ) \
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "dc.h"
|
||||
#include "gdi.h"
|
||||
#include "bitmap.h"
|
||||
#include "palette.h"
|
||||
#include "icon.h"
|
||||
#include "stddebug.h"
|
||||
#include "color.h"
|
||||
|
@ -395,7 +395,7 @@ static void DIB_SetImageBits_RLE8(WORD lines,
|
|||
* bytes are always read in pairs. [JAY]
|
||||
*/
|
||||
if (escape_code & 1)
|
||||
(*pIn++); /* Get and throw away the pad byte. */
|
||||
pIn++; /* Throw away the pad byte. */
|
||||
break;
|
||||
}
|
||||
} /* switch (escape_code) : Escape sequence */
|
||||
|
|
128
objects/dither.c
128
objects/dither.c
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
* Dithering functions
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "color.h"
|
||||
#include "gdi.h"
|
||||
#include "bitmap.h"
|
||||
|
||||
|
||||
/* Levels of each primary */
|
||||
#define PRIMARY_LEVELS 3
|
||||
#define TOTAL_LEVELS (PRIMARY_LEVELS*PRIMARY_LEVELS*PRIMARY_LEVELS)
|
||||
|
||||
/* Dithering matrix size */
|
||||
#define MATRIX_SIZE 8
|
||||
#define MATRIX_SIZE_2 (MATRIX_SIZE*MATRIX_SIZE)
|
||||
|
||||
/* Total number of possible levels for a dithered primary color */
|
||||
#define DITHER_LEVELS (MATRIX_SIZE_2 * (PRIMARY_LEVELS-1) + 1)
|
||||
|
||||
/* Dithering matrix */
|
||||
static const int dither_matrix[MATRIX_SIZE_2] =
|
||||
{
|
||||
0, 32, 8, 40, 2, 34, 10, 42,
|
||||
48, 16, 56, 24, 50, 18, 58, 26,
|
||||
12, 44, 4, 36, 14, 46, 6, 38,
|
||||
60, 28, 52, 20, 62, 30, 54, 22,
|
||||
3, 35, 11, 43, 1, 33, 9, 41,
|
||||
51, 19, 59, 27, 49, 17, 57, 25,
|
||||
15, 47, 7, 39, 13, 45, 5, 37,
|
||||
63, 31, 55, 23, 61, 29, 53, 21
|
||||
};
|
||||
|
||||
/* Mapping between (R,G,B) triples and EGA colors */
|
||||
static const int EGAmapping[TOTAL_LEVELS] =
|
||||
{
|
||||
0, /* 000000 -> 000000 */
|
||||
4, /* 00007f -> 000080 */
|
||||
12, /* 0000ff -> 0000ff */
|
||||
2, /* 007f00 -> 008000 */
|
||||
6, /* 007f7f -> 008080 */
|
||||
6, /* 007fff -> 008080 */
|
||||
10, /* 00ff00 -> 00ff00 */
|
||||
6, /* 00ff7f -> 008080 */
|
||||
14, /* 00ffff -> 00ffff */
|
||||
1, /* 7f0000 -> 800000 */
|
||||
5, /* 7f007f -> 800080 */
|
||||
5, /* 7f00ff -> 800080 */
|
||||
3, /* 7f7f00 -> 808000 */
|
||||
8, /* 7f7f7f -> 808080 */
|
||||
7, /* 7f7fff -> c0c0c0 */
|
||||
3, /* 7fff00 -> 808000 */
|
||||
7, /* 7fff7f -> c0c0c0 */
|
||||
7, /* 7fffff -> c0c0c0 */
|
||||
9, /* ff0000 -> ff0000 */
|
||||
5, /* ff007f -> 800080 */
|
||||
13, /* ff00ff -> ff00ff */
|
||||
3, /* ff7f00 -> 808000 */
|
||||
7, /* ff7f7f -> c0c0c0 */
|
||||
7, /* ff7fff -> c0c0c0 */
|
||||
11, /* ffff00 -> ffff00 */
|
||||
7, /* ffff7f -> c0c0c0 */
|
||||
15 /* ffffff -> ffffff */
|
||||
};
|
||||
|
||||
#define PIXEL_VALUE(r,g,b) \
|
||||
COLOR_mapEGAPixel[EGAmapping[((r)*PRIMARY_LEVELS+(g))*PRIMARY_LEVELS+(b)]]
|
||||
|
||||
/* X image for building dithered pixmap */
|
||||
static XImage *ditherImage = NULL;
|
||||
static char *imageData = NULL;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DITHER_Init
|
||||
*
|
||||
* Create the X image used for dithering.
|
||||
*/
|
||||
BOOL DITHER_Init(void)
|
||||
{
|
||||
XCREATEIMAGE( ditherImage, MATRIX_SIZE, MATRIX_SIZE, screenDepth );
|
||||
return (ditherImage != NULL);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DITHER_DitherColor
|
||||
*/
|
||||
Pixmap DITHER_DitherColor( DC *dc, COLORREF color )
|
||||
{
|
||||
static COLORREF prevColor = 0xffffffff;
|
||||
unsigned int x, y;
|
||||
Pixmap pixmap;
|
||||
|
||||
if (color != prevColor)
|
||||
{
|
||||
int r = GetRValue( color ) * DITHER_LEVELS;
|
||||
int g = GetGValue( color ) * DITHER_LEVELS;
|
||||
int b = GetBValue( color ) * DITHER_LEVELS;
|
||||
const int *pmatrix = dither_matrix;
|
||||
|
||||
for (y = 0; y < MATRIX_SIZE; y++)
|
||||
{
|
||||
for (x = 0; x < MATRIX_SIZE; x++)
|
||||
{
|
||||
int d = *pmatrix++ * 256;
|
||||
int dr = ((r + d) / MATRIX_SIZE_2) / 256;
|
||||
int dg = ((g + d) / MATRIX_SIZE_2) / 256;
|
||||
int db = ((b + d) / MATRIX_SIZE_2) / 256;
|
||||
XPutPixel( ditherImage, x, y, PIXEL_VALUE(dr,dg,db) );
|
||||
}
|
||||
}
|
||||
prevColor = color;
|
||||
}
|
||||
|
||||
pixmap = XCreatePixmap( display, rootWindow,
|
||||
MATRIX_SIZE, MATRIX_SIZE, screenDepth );
|
||||
XPutImage( display, pixmap, BITMAP_colorGC, ditherImage, 0, 0,
|
||||
0, 0, MATRIX_SIZE, MATRIX_SIZE );
|
||||
return pixmap;
|
||||
}
|
|
@ -10,8 +10,7 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include "user.h"
|
||||
#include "gdi.h"
|
||||
#include "font.h"
|
||||
#include "metafile.h"
|
||||
#include "callback.h"
|
||||
#include "stddebug.h"
|
||||
|
@ -55,11 +54,11 @@ struct FontStructure {
|
|||
} FontNames[32];
|
||||
int FontSize;
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Font_Init
|
||||
*/
|
||||
|
||||
void Font_Init( void )
|
||||
/***********************************************************************
|
||||
* FONT_Init
|
||||
*/
|
||||
BOOL FONT_Init( void )
|
||||
{
|
||||
char temp[1024];
|
||||
LPSTR ptr;
|
||||
|
@ -88,8 +87,10 @@ void Font_Init( void )
|
|||
FontNames[6].window = "roman"; FontNames[6].x11 = "*-times";
|
||||
FontSize = 7;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FONT_TranslateName
|
||||
*
|
||||
|
@ -212,11 +213,13 @@ void FONT_GetMetrics( LOGFONT * logfont, XFontStruct * xfont,
|
|||
metrics->tmLastChar = xfont->max_char_or_byte2;
|
||||
metrics->tmDefaultChar = xfont->default_char;
|
||||
metrics->tmBreakChar = ' ';
|
||||
metrics->tmPitchAndFamily = logfont->lfPitchAndFamily;
|
||||
metrics->tmCharSet = logfont->lfCharSet;
|
||||
metrics->tmOverhang = 0;
|
||||
metrics->tmDigitizedAspectX = 1;
|
||||
metrics->tmDigitizedAspectY = 1;
|
||||
metrics->tmPitchAndFamily = (logfont->lfPitchAndFamily&0xf0)|TMPF_DEVICE;
|
||||
if (logfont->lfPitchAndFamily & FIXED_PITCH)
|
||||
metrics->tmPitchAndFamily |= TMPF_FIXED_PITCH;
|
||||
|
||||
if (!xfont->per_char) average = metrics->tmMaxCharWidth;
|
||||
else
|
||||
|
@ -313,16 +316,29 @@ HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font )
|
|||
|
||||
if (!stockPtr || !stockPtr->fstruct)
|
||||
{
|
||||
fontStruct = FONT_MatchFont( &font->logfont, dc );
|
||||
if (!(fontStruct = FONT_MatchFont( &font->logfont, dc )))
|
||||
{
|
||||
/* If it is not a stock font, we can simply return 0 */
|
||||
if (!stockPtr) return 0;
|
||||
/* Otherwise we must try to find a substitute */
|
||||
dprintf_font(stddeb,"Loading font 'fixed' for %x\n", hfont );
|
||||
font->logfont.lfPitchAndFamily &= ~VARIABLE_PITCH;
|
||||
font->logfont.lfPitchAndFamily |= FIXED_PITCH;
|
||||
fontStruct = XLoadQueryFont( display, "fixed" );
|
||||
if (!fontStruct)
|
||||
{
|
||||
fprintf( stderr, "No system font could be found. Please check your font path.\n" );
|
||||
exit( 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fontStruct = stockPtr->fstruct;
|
||||
dprintf_font(stddeb,
|
||||
"FONT_SelectObject: Loaded font from cache %x %p\n",
|
||||
dprintf_font(stddeb,
|
||||
"FONT_SelectObject: Loaded font from cache %x %p\n",
|
||||
hfont, fontStruct );
|
||||
}
|
||||
if (!fontStruct) return 0;
|
||||
|
||||
/* Free previous font */
|
||||
|
||||
|
@ -451,8 +467,8 @@ BOOL GetTextExtentPoint( HDC hdc, LPSTR str, short count, LPSIZE size )
|
|||
size->cy = abs((dc->u.x.font.fstruct->ascent+dc->u.x.font.fstruct->descent)
|
||||
* dc->w.WndExtY / dc->w.VportExtY);
|
||||
|
||||
dprintf_font(stddeb,"GetTextExtentPoint(%d '%s' %d %p): returning %d,%d\n",
|
||||
hdc, str, count, size, size->cx, size->cy );
|
||||
dprintf_font(stddeb,"GetTextExtentPoint(%d '%*.*s' %d %p): returning %d,%d\n",
|
||||
hdc, count, count, str, count, size, size->cx, size->cy );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -669,19 +685,19 @@ int EnumFonts(HDC hDC, LPSTR lpFaceName, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
int nRet;
|
||||
int j, i = 0;
|
||||
|
||||
dprintf_font(stddeb,"EnumFonts(%04X, %08X='%s', %08X, %08X)\n",
|
||||
dprintf_font(stddeb,"EnumFonts(%04X, %p='%s', %p, %p)\n",
|
||||
hDC, lpFaceName, lpFaceName, lpEnumFunc, lpData);
|
||||
if (lpEnumFunc == NULL) return 0;
|
||||
hLog = USER_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LOGFONT) + LF_FACESIZE);
|
||||
lpLogFont = (LPLOGFONT) USER_HEAP_ADDR(hLog);
|
||||
hLog = GDI_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LOGFONT) + LF_FACESIZE);
|
||||
lpLogFont = (LPLOGFONT) GDI_HEAP_ADDR(hLog);
|
||||
if (lpLogFont == NULL) {
|
||||
dprintf_font(stddeb,"EnumFonts // can't alloc LOGFONT struct !\n");
|
||||
return 0;
|
||||
}
|
||||
hMet = USER_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(TEXTMETRIC));
|
||||
lptm = (LPTEXTMETRIC) USER_HEAP_ADDR(hMet);
|
||||
hMet = GDI_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(TEXTMETRIC));
|
||||
lptm = (LPTEXTMETRIC) GDI_HEAP_ADDR(hMet);
|
||||
if (lptm == NULL) {
|
||||
USER_HEAP_FREE(hLog);
|
||||
GDI_HEAP_FREE(hLog);
|
||||
dprintf_font(stddeb, "EnumFonts // can't alloc TEXTMETRIC struct !\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -718,7 +734,7 @@ int EnumFonts(HDC hDC, LPSTR lpFaceName, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
GetTextMetrics(hDC, lptm);
|
||||
SelectObject(hDC, hOldFont);
|
||||
DeleteObject(hFont);
|
||||
dprintf_font(stddeb,"EnumFonts // i=%d lpLogFont=%08X lptm=%08X\n", i, lpLogFont, lptm);
|
||||
dprintf_font(stddeb,"EnumFonts // i=%d lpLogFont=%p lptm=%p\n", i, lpLogFont, lptm);
|
||||
|
||||
#ifdef WINELIB
|
||||
nRet = (*lpEnumFunc)(lpLogFont, lptm, 0, lpData);
|
||||
|
@ -731,8 +747,8 @@ int EnumFonts(HDC hDC, LPSTR lpFaceName, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
break;
|
||||
}
|
||||
}
|
||||
USER_HEAP_FREE(hMet);
|
||||
USER_HEAP_FREE(hLog);
|
||||
GDI_HEAP_FREE(hMet);
|
||||
GDI_HEAP_FREE(hLog);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -753,19 +769,19 @@ int EnumFontFamilies(HDC hDC, LPSTR lpszFamily, FARPROC lpEnumFunc, LPSTR lpData
|
|||
int nRet;
|
||||
int j, i = 0;
|
||||
|
||||
dprintf_font(stddeb,"EnumFontFamilies(%04X, %08X, %08X, %08X)\n",
|
||||
dprintf_font(stddeb,"EnumFontFamilies(%04X, %p, %p, %p)\n",
|
||||
hDC, lpszFamily, lpEnumFunc, lpData);
|
||||
if (lpEnumFunc == NULL) return 0;
|
||||
hLog = USER_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LOGFONT) + LF_FACESIZE);
|
||||
lpLogFont = (LPLOGFONT) USER_HEAP_ADDR(hLog);
|
||||
hLog = GDI_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LOGFONT) + LF_FACESIZE);
|
||||
lpLogFont = (LPLOGFONT) GDI_HEAP_ADDR(hLog);
|
||||
if (lpLogFont == NULL) {
|
||||
dprintf_font(stddeb,"EnumFontFamilies // can't alloc LOGFONT struct !\n");
|
||||
return 0;
|
||||
}
|
||||
hMet = USER_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(TEXTMETRIC));
|
||||
lptm = (LPTEXTMETRIC) USER_HEAP_ADDR(hMet);
|
||||
hMet = GDI_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(TEXTMETRIC));
|
||||
lptm = (LPTEXTMETRIC) GDI_HEAP_ADDR(hMet);
|
||||
if (lptm == NULL) {
|
||||
USER_HEAP_FREE(hLog);
|
||||
GDI_HEAP_FREE(hLog);
|
||||
dprintf_font(stddeb,"EnumFontFamilies // can't alloc TEXTMETRIC struct !\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -803,7 +819,7 @@ int EnumFontFamilies(HDC hDC, LPSTR lpszFamily, FARPROC lpEnumFunc, LPSTR lpData
|
|||
GetTextMetrics(hDC, lptm);
|
||||
SelectObject(hDC, hOldFont);
|
||||
DeleteObject(hFont);
|
||||
dprintf_font(stddeb, "EnumFontFamilies // i=%d lpLogFont=%08X lptm=%08X\n", i, lpLogFont, lptm);
|
||||
dprintf_font(stddeb, "EnumFontFamilies // i=%d lpLogFont=%p lptm=%p\n", i, lpLogFont, lptm);
|
||||
|
||||
#ifdef WINELIB
|
||||
nRet = (*lpEnumFunc)(lpLogFont, lptm, 0, lpData);
|
||||
|
@ -816,8 +832,8 @@ int EnumFontFamilies(HDC hDC, LPSTR lpszFamily, FARPROC lpEnumFunc, LPSTR lpData
|
|||
break;
|
||||
}
|
||||
}
|
||||
USER_HEAP_FREE(hMet);
|
||||
USER_HEAP_FREE(hLog);
|
||||
GDI_HEAP_FREE(hMet);
|
||||
GDI_HEAP_FREE(hLog);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,13 +8,16 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "user.h"
|
||||
#include "selectors.h"
|
||||
#include "gdi.h"
|
||||
#include "color.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
#include "bitmap.h"
|
||||
#include "brush.h"
|
||||
#include "font.h"
|
||||
#include "palette.h"
|
||||
#include "pen.h"
|
||||
#include "region.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_GDI */
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -27,6 +30,7 @@ MDESC *GDI_Heap = NULL;
|
|||
#define MAX_OBJ 1024
|
||||
HANDLE *lpPenBrushList = NULL;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GDI stock objects
|
||||
*/
|
||||
|
@ -181,9 +185,13 @@ BOOL GDI_Init(void)
|
|||
|
||||
if (!REGION_Init()) return FALSE;
|
||||
|
||||
/* Initialise dithering */
|
||||
/* Initialise brush dithering */
|
||||
|
||||
if (!DITHER_Init()) return FALSE;
|
||||
if (!BRUSH_Init()) return FALSE;
|
||||
|
||||
/* Initialise fonts */
|
||||
|
||||
if (!FONT_Init()) return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -312,11 +320,11 @@ BOOL DeleteObject( HANDLE obj )
|
|||
switch(header->wMagic)
|
||||
{
|
||||
case PEN_MAGIC: return GDI_FreeObject( obj );
|
||||
case BRUSH_MAGIC: return BRUSH_DeleteObject( obj, header );
|
||||
case BRUSH_MAGIC: return BRUSH_DeleteObject( obj, (BRUSHOBJ*)header );
|
||||
case FONT_MAGIC: return GDI_FreeObject( obj );
|
||||
case PALETTE_MAGIC: return GDI_FreeObject( obj );
|
||||
case BITMAP_MAGIC: return BMP_DeleteObject( obj, header );
|
||||
case REGION_MAGIC: return REGION_DeleteObject( obj, header );
|
||||
case BITMAP_MAGIC: return BITMAP_DeleteObject( obj, (BITMAPOBJ*)header);
|
||||
case REGION_MAGIC: return REGION_DeleteObject( obj, (RGNOBJ*)header );
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -359,7 +367,7 @@ int GetObject( HANDLE handle, int count, LPSTR buffer )
|
|||
case BRUSH_MAGIC:
|
||||
return BRUSH_GetObject( (BRUSHOBJ *)ptr, count, buffer );
|
||||
case BITMAP_MAGIC:
|
||||
return BMP_GetObject( (BITMAPOBJ *)ptr, count, buffer );
|
||||
return BITMAP_GetObject( (BITMAPOBJ *)ptr, count, buffer );
|
||||
case FONT_MAGIC:
|
||||
return FONT_GetObject( (FONTOBJ *)ptr, count, buffer );
|
||||
case PALETTE_MAGIC:
|
||||
|
@ -440,10 +448,10 @@ int EnumObjects(HDC hDC, int nObjType, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
switch (nObjType) {
|
||||
case OBJ_PEN:
|
||||
wMagic = PEN_MAGIC;
|
||||
dprintf_gdi(stddeb,"EnumObjects(%04X, OBJ_PEN, %08X, %08X);\n",
|
||||
dprintf_gdi(stddeb,"EnumObjects(%04X, OBJ_PEN, %p, %p);\n",
|
||||
hDC, lpEnumFunc, lpData);
|
||||
hLog = USER_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LOGPEN));
|
||||
lpLog = (LPSTR) USER_HEAP_ADDR(hLog);
|
||||
hLog = GDI_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LOGPEN));
|
||||
lpLog = (LPSTR) GDI_HEAP_ADDR(hLog);
|
||||
if (lpLog == NULL) {
|
||||
fprintf(stderr,"EnumObjects // Unable to alloc LOGPEN struct !\n");
|
||||
return 0;
|
||||
|
@ -451,17 +459,17 @@ int EnumObjects(HDC hDC, int nObjType, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
break;
|
||||
case OBJ_BRUSH:
|
||||
wMagic = BRUSH_MAGIC;
|
||||
dprintf_gdi(stddeb,"EnumObjects(%04X, OBJ_BRUSH, %08X, %08X);\n",
|
||||
dprintf_gdi(stddeb,"EnumObjects(%04X, OBJ_BRUSH, %p, %p);\n",
|
||||
hDC, lpEnumFunc, lpData);
|
||||
hLog = USER_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LOGBRUSH));
|
||||
lpLog = (LPSTR) USER_HEAP_ADDR(hLog);
|
||||
hLog = GDI_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LOGBRUSH));
|
||||
lpLog = (LPSTR) GDI_HEAP_ADDR(hLog);
|
||||
if (lpLog == NULL) {
|
||||
fprintf(stderr,"EnumObjects // Unable to alloc LOGBRUSH struct !\n");
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"EnumObjects(%04X, %04X, %08X, %08X); // Unknown OBJ type !\n",
|
||||
fprintf(stderr,"EnumObjects(%04X, %04X, %p, %p); // Unknown OBJ type !\n",
|
||||
hDC, nObjType, lpEnumFunc, lpData);
|
||||
return 0;
|
||||
}
|
||||
|
@ -469,18 +477,18 @@ int EnumObjects(HDC hDC, int nObjType, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
for (i = 0; i < NB_STOCK_OBJECTS; i++) {
|
||||
header = StockObjects[i];
|
||||
if (header->wMagic == wMagic) {
|
||||
PEN_GetObject( (PENOBJ *)header, sizeof(LOGPEN), (LPLOGPEN)lpLog);
|
||||
BRUSH_GetObject( (BRUSHOBJ *)header, sizeof(LOGBRUSH), (LPLOGBRUSH)lpLog);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockObj lpLog=%08X lpData=%08X\n", lpLog, lpData);
|
||||
PEN_GetObject( (PENOBJ *)header, sizeof(LOGPEN), lpLog);
|
||||
BRUSH_GetObject( (BRUSHOBJ *)header, sizeof(LOGBRUSH),lpLog);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockObj lpLog=%p lpData=%p\n", lpLog, lpData);
|
||||
if (header->wMagic == BRUSH_MAGIC) {
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockBrush lbStyle=%04X\n", ((LPLOGBRUSH)lpLog)->lbStyle);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockBrush lbColor=%08X\n", ((LPLOGBRUSH)lpLog)->lbColor);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockBrush lbColor=%08lX\n", ((LPLOGBRUSH)lpLog)->lbColor);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockBrush lbHatch=%04X\n", ((LPLOGBRUSH)lpLog)->lbHatch);
|
||||
}
|
||||
if (header->wMagic == PEN_MAGIC) {
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockPen lopnStyle=%04X\n", ((LPLOGPEN)lpLog)->lopnStyle);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockPen lopnWidth=%08X\n", ((LPLOGPEN)lpLog)->lopnWidth);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockPen lopnColor=%08X\n", ((LPLOGPEN)lpLog)->lopnColor);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockPen lopnWidth=%d\n", ((LPLOGPEN)lpLog)->lopnWidth.x);
|
||||
dprintf_gdi(stddeb,"EnumObjects // StockPen lopnColor=%08lX\n", ((LPLOGPEN)lpLog)->lopnColor);
|
||||
}
|
||||
nRet = 1;
|
||||
/*
|
||||
|
@ -492,30 +500,30 @@ int EnumObjects(HDC hDC, int nObjType, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
*/
|
||||
dprintf_gdi(stddeb,"EnumObjects // after CallBack16 !\n");
|
||||
if (nRet == 0) {
|
||||
USER_HEAP_FREE(hLog);
|
||||
GDI_HEAP_FREE(hLog);
|
||||
dprintf_gdi(stddeb,"EnumObjects // EnumEnd requested by application !\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lpPenBrushList == NULL) return 0;
|
||||
dprintf_gdi(stddeb,"EnumObjects // Now DC owned objects %08X !\n", header);
|
||||
dprintf_gdi(stddeb,"EnumObjects // Now DC owned objects %p !\n", header);
|
||||
for (lphObj = lpPenBrushList; *lphObj != 0; ) {
|
||||
dprintf_gdi(stddeb,"EnumObjects // *lphObj=%04X\n", *lphObj);
|
||||
header = (GDIOBJHDR *) GDI_HEAP_ADDR(*lphObj++);
|
||||
if (header->wMagic == wMagic) {
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Obj lpLog=%08X lpData=%08X\n", lpLog, lpData);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Obj lpLog=%p lpData=%p\n", lpLog, lpData);
|
||||
if (header->wMagic == BRUSH_MAGIC) {
|
||||
BRUSH_GetObject( (BRUSHOBJ *)header, sizeof(LOGBRUSH), (LPLOGBRUSH)lpLog);
|
||||
BRUSH_GetObject( (BRUSHOBJ *)header, sizeof(LOGBRUSH), lpLog);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Brush lbStyle=%04X\n", ((LPLOGBRUSH)lpLog)->lbStyle);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Brush lbColor=%08X\n", ((LPLOGBRUSH)lpLog)->lbColor);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Brush lbColor=%08lX\n", ((LPLOGBRUSH)lpLog)->lbColor);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Brush lbHatch=%04X\n", ((LPLOGBRUSH)lpLog)->lbHatch);
|
||||
}
|
||||
if (header->wMagic == PEN_MAGIC) {
|
||||
PEN_GetObject( (PENOBJ *)header, sizeof(LOGPEN), (LPLOGPEN)lpLog);
|
||||
PEN_GetObject( (PENOBJ *)header, sizeof(LOGPEN), lpLog);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Pen lopnStyle=%04X\n", ((LPLOGPEN)lpLog)->lopnStyle);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Pen lopnWidth=%08X\n", ((LPLOGPEN)lpLog)->lopnWidth);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Pen lopnColor=%08X\n", ((LPLOGPEN)lpLog)->lopnColor);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Pen lopnWidth=%d\n", ((LPLOGPEN)lpLog)->lopnWidth.x);
|
||||
dprintf_gdi(stddeb,"EnumObjects // DC_Pen lopnColor=%08lX\n", ((LPLOGPEN)lpLog)->lopnColor);
|
||||
}
|
||||
/*
|
||||
#ifdef WINELIB
|
||||
|
@ -527,13 +535,13 @@ int EnumObjects(HDC hDC, int nObjType, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
nRet = 1;
|
||||
dprintf_gdi(stddeb,"EnumObjects // after CallBack16 !\n");
|
||||
if (nRet == 0) {
|
||||
USER_HEAP_FREE(hLog);
|
||||
GDI_HEAP_FREE(hLog);
|
||||
dprintf_gdi(stddeb,"EnumObjects // EnumEnd requested by application !\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
USER_HEAP_FREE(hLog);
|
||||
GDI_HEAP_FREE(hLog);
|
||||
dprintf_gdi(stddeb,"EnumObjects // End of enumeration !\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,9 @@ static char Copyright[] = "Copyright David W. Metcalfe, 1994";
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "windows.h"
|
||||
#include "gdi.h"
|
||||
#include "bitmap.h"
|
||||
#include "metafile.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_METAFILE */
|
||||
#include "debug.h"
|
||||
|
@ -25,8 +24,6 @@ static int HTLen; /* allocated length of handle table */
|
|||
*/
|
||||
HMETAFILE GetMetaFile(LPSTR lpFilename)
|
||||
{
|
||||
|
||||
DC *dc;
|
||||
HMETAFILE hmf;
|
||||
METAFILE *mf;
|
||||
METAHEADER *mh;
|
||||
|
@ -143,7 +140,6 @@ HMETAFILE CloseMetaFile(HDC hdc)
|
|||
METAFILE *mf;
|
||||
METAHEADER *mh;
|
||||
HMETAFILE hmf;
|
||||
char buffer[15];
|
||||
/* METARECORD *mr = (METARECORD *)&buffer;*/
|
||||
|
||||
dprintf_metafile(stddeb,"CloseMetaFile\n");
|
||||
|
@ -804,6 +800,8 @@ BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush)
|
|||
*(mr->rdParam + 1) = LOWORD(logbrush->lbColor);
|
||||
memcpy(mr->rdParam + 2, info, biSize + bmSize);
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
if (!MF_WriteRecord(dc->w.hMetaFile, mr, len))
|
||||
{
|
||||
|
@ -961,6 +959,7 @@ BOOL MF_BitBlt(DC *dcDest, short xDest, short yDest, short width,
|
|||
short height, HDC hdcSrc, short xSrc, short ySrc, DWORD rop)
|
||||
{
|
||||
fprintf(stdnimp,"MF_BitBlt: not implemented yet\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -972,4 +971,5 @@ BOOL MF_StretchBlt(DC *dcDest, short xDest, short yDest, short widthDest,
|
|||
short widthSrc, short heightSrc, DWORD rop)
|
||||
{
|
||||
fprintf(stdnimp,"MF_StretchBlt: not implemented yet\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ HBITMAP OBM_LoadOEMBitmap( WORD id )
|
|||
{
|
||||
fprintf( stderr, "Error %d creating pixmap %d\n",
|
||||
err, OBM_FIRST+id );
|
||||
pixmap = 0;
|
||||
pixmap = width = height = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -15,8 +15,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993,1994";
|
|||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include "gdi.h"
|
||||
#include "color.h"
|
||||
#include "palette.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_PALETTE */
|
||||
#include "debug.h"
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
* GDI pen objects
|
||||
*
|
||||
* Copyright 1993 Alexandre Julliard
|
||||
*
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
*/
|
||||
#include "gdi.h"
|
||||
*/
|
||||
|
||||
#include "pen.h"
|
||||
#include "metafile.h"
|
||||
#include "stddebug.h"
|
||||
#include "color.h"
|
||||
|
|
|
@ -8,7 +8,7 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993, 1994";
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "gdi.h"
|
||||
#include "region.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_REGION */
|
||||
#include "debug.h"
|
||||
|
@ -341,6 +341,7 @@ HRGN CreatePolyPolygonRgn( POINT * points, short * count,
|
|||
}
|
||||
rgnObj = (RGNOBJ *) GDI_HEAP_ADDR( hrgn );
|
||||
rgnObj->region.type = SIMPLEREGION;
|
||||
rgnObj->region.xrgn = 0;
|
||||
rgnObj->region.pixmap = 0;
|
||||
|
||||
/* Create X region */
|
||||
|
@ -354,7 +355,13 @@ HRGN CreatePolyPolygonRgn( POINT * points, short * count,
|
|||
}
|
||||
xrgn = XPolygonRegion( xpoints, *count,
|
||||
(mode == WINDING) ? WindingRule : EvenOddRule );
|
||||
if (!xrgn) break;
|
||||
if (!xrgn)
|
||||
{
|
||||
if (rgnObj->region.xrgn) XDestroyRegion( rgnObj->region.xrgn );
|
||||
free( xpoints );
|
||||
GDI_FreeObject( hrgn );
|
||||
return 0;
|
||||
}
|
||||
if (i > 0)
|
||||
{
|
||||
Region tmprgn = XCreateRegion();
|
||||
|
@ -367,11 +374,6 @@ HRGN CreatePolyPolygonRgn( POINT * points, short * count,
|
|||
}
|
||||
|
||||
free( xpoints );
|
||||
if (!xrgn)
|
||||
{
|
||||
GDI_FreeObject( hrgn );
|
||||
return 0;
|
||||
}
|
||||
XClipBox( rgnObj->region.xrgn, &rect );
|
||||
SetRect( &rgnObj->region.box, rect.x, rect.y,
|
||||
rect.x + rect.width, rect.y + rect.height);
|
||||
|
|
|
@ -52,7 +52,7 @@ static char *TEXT_NextLine(HDC hdc, char *str, int *count, char *dest,
|
|||
int numspaces;
|
||||
SIZE size;
|
||||
int lasttab = 0;
|
||||
int wb_i = 0, wb_j = 0, wb_count;
|
||||
int wb_i = 0, wb_j = 0, wb_count = 0;
|
||||
|
||||
while (*count)
|
||||
{
|
||||
|
@ -301,8 +301,8 @@ BOOL ExtTextOut( HDC hdc, short x, short y, WORD flags, LPRECT lprect,
|
|||
if (!DC_SetupGCForText( dc )) return TRUE;
|
||||
font = dc->u.x.font.fstruct;
|
||||
|
||||
dprintf_text(stddeb,"ExtTextOut: %d,%d '%s', %d flags=%d rect=%d,%d,%d,%d\n",
|
||||
x, y, str, count, flags,
|
||||
dprintf_text(stddeb,"ExtTextOut: %d,%d '%*.*s', %d flags=%d rect=%d,%d,%d,%d\n",
|
||||
x, y, count, count, str, count, flags,
|
||||
lprect->left, lprect->top, lprect->right, lprect->bottom );
|
||||
|
||||
/* Setup coordinates */
|
||||
|
@ -424,7 +424,7 @@ BOOL ExtTextOut( HDC hdc, short x, short y, WORD flags, LPRECT lprect,
|
|||
continue; /* First iteration -> no delta */
|
||||
}
|
||||
pitem->delta = dc->w.charExtra;
|
||||
if (str[i] == dc->u.x.font.metrics.tmBreakChar)
|
||||
if (str[i] == (char)dc->u.x.font.metrics.tmBreakChar)
|
||||
pitem->delta += dc->w.breakExtra;
|
||||
if (lpDx)
|
||||
{
|
||||
|
@ -565,8 +565,8 @@ LONG TEXT_TabbedTextOut( HDC hdc, int x, int y, LPSTR lpstr, int count,
|
|||
LONG TabbedTextOut( HDC hdc, short x, short y, LPSTR lpstr, short count,
|
||||
short cTabStops, LPINT lpTabPos, short nTabOrg )
|
||||
{
|
||||
dprintf_text( stddeb, "TabbedTextOut: %x %d,%d '%s' %d\n",
|
||||
hdc, x, y, lpstr, count );
|
||||
dprintf_text( stddeb, "TabbedTextOut: %x %d,%d '%*.*s' %d\n",
|
||||
hdc, x, y, count, count, lpstr, count );
|
||||
return TEXT_TabbedTextOut( hdc, x, y, lpstr, count, cTabStops,
|
||||
lpTabPos, nTabOrg, TRUE );
|
||||
}
|
||||
|
@ -578,8 +578,8 @@ LONG TabbedTextOut( HDC hdc, short x, short y, LPSTR lpstr, short count,
|
|||
DWORD GetTabbedTextExtent( HDC hdc, LPSTR lpstr, int count,
|
||||
int cTabStops, LPINT lpTabPos )
|
||||
{
|
||||
dprintf_text( stddeb, "GetTabbedTextExtent: %x '%s' %d\n",
|
||||
hdc, lpstr, count );
|
||||
dprintf_text( stddeb, "GetTabbedTextExtent: %x '%*.*s' %d\n",
|
||||
hdc, count, count, lpstr, count );
|
||||
return TEXT_TabbedTextOut( hdc, 0, 0, lpstr, count, cTabStops,
|
||||
lpTabPos, 0, FALSE );
|
||||
}
|
||||
|
|
21
rc/sysres.h
21
rc/sysres.h
|
@ -1,21 +0,0 @@
|
|||
/* sysres.h
|
||||
* This File is automatically generated. Do not edit
|
||||
*/
|
||||
#include "resource.h"
|
||||
extern unsigned char sysres_MENU_SYSMENU[];
|
||||
extern unsigned char sysres_DIALOG_2[];
|
||||
extern unsigned char sysres_DIALOG_STOP_MSGBOX[];
|
||||
extern unsigned char sysres_DIALOG_QUESTION_MSGBOX[];
|
||||
extern unsigned char sysres_DIALOG_EXCLAMATION_MSGBOX[];
|
||||
extern unsigned char sysres_DIALOG_SHELL_ABOUT_MSGBOX[];
|
||||
extern unsigned char sysres_DIALOG_3[];
|
||||
extern unsigned char sysres_DIALOG_4[];
|
||||
extern unsigned char sysres_DIALOG_11[];
|
||||
extern unsigned char sysres_DIALOG_12[];
|
||||
extern unsigned char sysres_DIALOG_5[];
|
||||
extern unsigned char sysres_DIALOG_6[];
|
||||
extern unsigned char sysres_DIALOG_7[];
|
||||
extern unsigned char sysres_DIALOG_8[];
|
||||
extern unsigned char sysres_DIALOG_9[];
|
||||
extern unsigned char sysres_DIALOG_10[];
|
||||
extern struct ResourceTable sysresTable[];
|
|
@ -1,59 +0,0 @@
|
|||
/* sysresbm.h
|
||||
* This File is automatically generated. Do not edit
|
||||
*/
|
||||
#include "resource.h"
|
||||
extern unsigned char sysresbm_CURSOR_32514[];
|
||||
extern unsigned char sysresbm_CURSOR_32648[];
|
||||
extern unsigned char sysresbm_ICON_32516[];
|
||||
extern unsigned char sysresbm_ICON_32515[];
|
||||
extern unsigned char sysresbm_ICON_32513[];
|
||||
extern unsigned char sysresbm_ICON_32514[];
|
||||
extern unsigned char sysresbm_ICON_SYSIDI_STOPICON[];
|
||||
extern unsigned char sysresbm_ICON_32512[];
|
||||
extern unsigned char sysresbm_ICON_SYSIDI_HANDHAND[];
|
||||
extern unsigned char sysresbm_ICON_WINEICON[];
|
||||
extern unsigned char sysresbm_ICON_PORTRAIT[];
|
||||
extern unsigned char sysresbm_ICON_LANDSCAP[];
|
||||
extern unsigned char sysresbm_BITMAP_32754[];
|
||||
extern unsigned char sysresbm_BITMAP_32753[];
|
||||
extern unsigned char sysresbm_BITMAP_32752[];
|
||||
extern unsigned char sysresbm_BITMAP_32751[];
|
||||
extern unsigned char sysresbm_BITMAP_32750[];
|
||||
extern unsigned char sysresbm_BITMAP_32749[];
|
||||
extern unsigned char sysresbm_BITMAP_32748[];
|
||||
extern unsigned char sysresbm_BITMAP_32747[];
|
||||
extern unsigned char sysresbm_BITMAP_32746[];
|
||||
extern unsigned char sysresbm_BITMAP_32745[];
|
||||
extern unsigned char sysresbm_BITMAP_32744[];
|
||||
extern unsigned char sysresbm_BITMAP_32743[];
|
||||
extern unsigned char sysresbm_BITMAP_32742[];
|
||||
extern unsigned char sysresbm_BITMAP_32741[];
|
||||
extern unsigned char sysresbm_BITMAP_32740[];
|
||||
extern unsigned char sysresbm_BITMAP_32739[];
|
||||
extern unsigned char sysresbm_BITMAP_32738[];
|
||||
extern unsigned char sysresbm_BITMAP_32737[];
|
||||
extern unsigned char sysresbm_BITMAP_32736[];
|
||||
extern unsigned char sysresbm_BITMAP_32735[];
|
||||
extern unsigned char sysresbm_BITMAP_32734[];
|
||||
extern unsigned char sysresbm_BITMAP_32767[];
|
||||
extern unsigned char sysresbm_BITMAP_32766[];
|
||||
extern unsigned char sysresbm_BITMAP_32765[];
|
||||
extern unsigned char sysresbm_BITMAP_32764[];
|
||||
extern unsigned char sysresbm_BITMAP_32763[];
|
||||
extern unsigned char sysresbm_BITMAP_32762[];
|
||||
extern unsigned char sysresbm_BITMAP_32761[];
|
||||
extern unsigned char sysresbm_BITMAP_32760[];
|
||||
extern unsigned char sysresbm_BITMAP_32759[];
|
||||
extern unsigned char sysresbm_BITMAP_32758[];
|
||||
extern unsigned char sysresbm_BITMAP_32757[];
|
||||
extern unsigned char sysresbm_BITMAP_32756[];
|
||||
extern unsigned char sysresbm_BITMAP_32755[];
|
||||
extern unsigned char sysresbm_BITMAP_32520[];
|
||||
extern unsigned char sysresbm_BITMAP_32521[];
|
||||
extern unsigned char sysresbm_BITMAP_32522[];
|
||||
extern unsigned char sysresbm_BITMAP_32523[];
|
||||
extern unsigned char sysresbm_BITMAP_32524[];
|
||||
extern unsigned char sysresbm_BITMAP_SMILE[];
|
||||
extern unsigned char sysresbm_BITMAP_WINELOGO[];
|
||||
extern unsigned char sysresbm_BITMAP_OBMCLOSE[];
|
||||
extern struct ResourceTable sysresbmTable[];
|
|
@ -1,5 +1,4 @@
|
|||
static char RCSId[] = "$Id: build.c,v 1.3 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
/* static char Copyright[] = "Copyright Robert J. Amstadt, 1993"; */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -679,8 +678,6 @@ OutputVariableCode(FILE *fp, char *storage, ORDDEF *odp)
|
|||
ORDVARDEF *vdp;
|
||||
int i;
|
||||
|
||||
fprintf(fp, PREFIX "%s_Ordinal_%d:\n", UpperDLLName, i);
|
||||
|
||||
vdp = odp->additional_data;
|
||||
for (i = 0; i < vdp->n_values; i++)
|
||||
{
|
||||
|
@ -697,7 +694,7 @@ OutputVariableCode(FILE *fp, char *storage, ORDDEF *odp)
|
|||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
main(int argc, char **argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
ORDDEF *odp;
|
||||
ORDFUNCDEF *fdp;
|
||||
|
@ -796,14 +793,17 @@ main(int argc, char **argv)
|
|||
break;
|
||||
|
||||
case VARTYPE_BYTE:
|
||||
fprintf(fp, PREFIX "%s_Ordinal_%d:\n", UpperDLLName, i);
|
||||
OutputVariableCode(fp, ".byte", odp);
|
||||
break;
|
||||
|
||||
case VARTYPE_WORD:
|
||||
fprintf(fp, PREFIX "%s_Ordinal_%d:\n", UpperDLLName, i);
|
||||
OutputVariableCode(fp, ".word", odp);
|
||||
break;
|
||||
|
||||
case VARTYPE_LONG:
|
||||
fprintf(fp, PREFIX "%s_Ordinal_%d:\n", UpperDLLName, i);
|
||||
OutputVariableCode(fp, ".long", odp);
|
||||
break;
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ SRCS = \
|
|||
focus.c \
|
||||
graphics.c \
|
||||
hook.c \
|
||||
icon.c \
|
||||
keyboard.c \
|
||||
mapping.c \
|
||||
mdi.c \
|
||||
|
|
|
@ -12,11 +12,11 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
|||
#include <unistd.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
#include "win.h"
|
||||
#include "gdi.h"
|
||||
#include "library.h"
|
||||
#include "neexe.h"
|
||||
#include "wine.h"
|
||||
#include "cursor.h"
|
||||
#include "stddebug.h"
|
||||
|
@ -69,11 +69,10 @@ HCURSOR LoadCursor(HANDLE instance, LPSTR cursor_name)
|
|||
for (i = 0; i < NB_SYS_CURSORS; i++)
|
||||
if (system_cursor[i].name == cursor_name)
|
||||
{
|
||||
hCursor = system_cursor[i].cursor;
|
||||
break;
|
||||
if (system_cursor[i].cursor) return system_cursor[i].cursor;
|
||||
else break;
|
||||
}
|
||||
if (i == NB_SYS_CURSORS) return 0;
|
||||
if (hCursor) return hCursor;
|
||||
}
|
||||
hCursor = GlobalAlloc(GMEM_MOVEABLE, sizeof(CURSORALLOC) + 1024L);
|
||||
if (hCursor == (HCURSOR)NULL) return 0;
|
||||
|
|
|
@ -100,7 +100,7 @@ LONG DefWindowProc( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
|
|||
}
|
||||
|
||||
case WM_SETREDRAW:
|
||||
if (wParam)
|
||||
if (!wParam)
|
||||
{
|
||||
ValidateRect( hwnd, NULL );
|
||||
wndPtr->flags |= WIN_NO_REDRAW;
|
||||
|
|
|
@ -35,12 +35,18 @@ BOOL DIALOG_Init()
|
|||
|
||||
/* Calculate the dialog base units */
|
||||
|
||||
if (!(hdc = GetDC(GetDesktopWindow()))) return FALSE;
|
||||
if (!(hdc = GetDC( 0 ))) return FALSE;
|
||||
GetTextMetrics( hdc, &tm );
|
||||
ReleaseDC( 0, hdc );
|
||||
xBaseUnit = tm.tmAveCharWidth;
|
||||
yBaseUnit = tm.tmHeight;
|
||||
dprintf_dialog(stddeb, "DIALOG_Init: base units = %d,%d\n", xBaseUnit, yBaseUnit );
|
||||
|
||||
/* Dialog units are based on a proportional system font */
|
||||
/* so we adjust them a bit for a fixed font. */
|
||||
if (tm.tmPitchAndFamily & TMPF_FIXED_PITCH) xBaseUnit = xBaseUnit * 5 / 4;
|
||||
|
||||
dprintf_dialog( stddeb, "DIALOG_Init: base units = %d,%d\n",
|
||||
xBaseUnit, yBaseUnit );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -152,7 +158,7 @@ static void DIALOG_DisplayTemplate( DLGTEMPLATE * result )
|
|||
{
|
||||
dprintf_dialog(stddeb, "DIALOG %d, %d, %d, %d\n", result->header->x, result->header->y,
|
||||
result->header->cx, result->header->cy );
|
||||
dprintf_dialog(stddeb, " STYLE %08x\n", result->header->style );
|
||||
dprintf_dialog(stddeb, " STYLE %08lx\n", result->header->style );
|
||||
dprintf_dialog(stddeb, " CAPTION '%s'\n", result->caption );
|
||||
dprintf_dialog(stddeb, " CLASS '%s'\n", result->className );
|
||||
if (result->menuName[0] == 0xff)
|
||||
|
@ -271,6 +277,8 @@ HWND CreateDialogIndirectParam( HINSTANCE hInst, LPCSTR dlgTemplate,
|
|||
ReleaseDC( 0, hdc );
|
||||
xUnit = tm.tmAveCharWidth;
|
||||
yUnit = tm.tmHeight;
|
||||
if (tm.tmPitchAndFamily & TMPF_FIXED_PITCH)
|
||||
xBaseUnit = xBaseUnit * 5 / 4; /* See DIALOG_Init() */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -464,16 +472,6 @@ int DialogBoxIndirect( HINSTANCE hInst, HANDLE dlgTemplate,
|
|||
return DialogBoxIndirectParam( hInst, dlgTemplate, owner, dlgProc, 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DialogBoxIndirectPtr
|
||||
* like DialogBoxIndirect, but expects pointer to template
|
||||
*/
|
||||
int DialogBoxIndirectPtr( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||
HWND owner, WNDPROC dlgProc)
|
||||
{
|
||||
return DialogBoxIndirectParamPtr(hInst, dlgTemplate, owner, dlgProc, 0);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DialogBoxIndirectParam (USER.240)
|
||||
|
@ -491,6 +489,7 @@ int DialogBoxIndirectParam( HINSTANCE hInst, HANDLE dlgTemplate,
|
|||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DialogBoxIndirectParamPtr
|
||||
* like DialogBoxIndirectParam, but expects pointer to template
|
||||
|
@ -504,6 +503,15 @@ int DialogBoxIndirectParamPtr(HINSTANCE hInst,LPCSTR dlgTemplate,
|
|||
return -1;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DialogBoxIndirectPtr
|
||||
* like DialogBoxIndirect, but expects pointer to template
|
||||
*/
|
||||
int DialogBoxIndirectPtr( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||
HWND owner, WNDPROC dlgProc)
|
||||
{
|
||||
return DialogBoxIndirectParamPtr(hInst, dlgTemplate, owner, dlgProc, 0);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* EndDialog (USER.88)
|
||||
|
@ -530,16 +538,16 @@ BOOL IsDialogMessage( HWND hwndDlg, LPMSG msg )
|
|||
if ((hwndDlg != msg->hwnd) && !IsChild( hwndDlg, msg->hwnd )) return FALSE;
|
||||
|
||||
/* Only the key messages get special processing */
|
||||
if ((msg->message == WM_KEYDOWN) ||
|
||||
(msg->message == WM_SYSCHAR) ||
|
||||
(msg->message == WM_CHAR))
|
||||
if ((msg->message != WM_KEYDOWN) &&
|
||||
(msg->message != WM_SYSCHAR) &&
|
||||
(msg->message != WM_CHAR))
|
||||
return FALSE;
|
||||
|
||||
dlgCode = SendMessage( msg->hwnd, WM_GETDLGCODE, 0, 0 );
|
||||
if (dlgCode & DLGC_WANTMESSAGE)
|
||||
{
|
||||
dlgCode = SendMessage( msg->hwnd, WM_GETDLGCODE, 0, 0 );
|
||||
if (dlgCode & DLGC_WANTMESSAGE)
|
||||
{
|
||||
DispatchMessage( msg );
|
||||
return TRUE;
|
||||
}
|
||||
DispatchMessage( msg );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
switch(msg->message)
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright 1993, 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993, 1994";
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
@ -15,7 +13,7 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993, 1994";
|
|||
#define PI M_PI
|
||||
#endif
|
||||
#include "dc.h"
|
||||
#include "gdi.h"
|
||||
#include "bitmap.h"
|
||||
#include "metafile.h"
|
||||
#include "syscolor.h"
|
||||
#include "stddebug.h"
|
||||
|
@ -250,6 +248,16 @@ BOOL Ellipse( HDC hdc, int left, int top, int right, int bottom )
|
|||
if (bottom < top)
|
||||
swap_int(&bottom, &top);
|
||||
|
||||
if ((dc->u.x.pen.style == PS_INSIDEFRAME) &&
|
||||
(dc->u.x.pen.width < right-left-1) &&
|
||||
(dc->u.x.pen.width < bottom-top-1))
|
||||
{
|
||||
left += dc->u.x.pen.width / 2;
|
||||
right -= (dc->u.x.pen.width + 1) / 2;
|
||||
top += dc->u.x.pen.width / 2;
|
||||
bottom -= (dc->u.x.pen.width + 1) / 2;
|
||||
}
|
||||
|
||||
if (DC_SetupGCForBrush( dc ))
|
||||
XFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
|
@ -286,7 +294,8 @@ BOOL Rectangle( HDC hdc, int left, int top, int right, int bottom )
|
|||
if (bottom < top)
|
||||
swap_int(&bottom, &top);
|
||||
|
||||
if ((left == right) || (top == bottom)) {
|
||||
if ((left == right) || (top == bottom))
|
||||
{
|
||||
if (DC_SetupGCForPen( dc ))
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left,
|
||||
|
@ -296,6 +305,16 @@ BOOL Rectangle( HDC hdc, int left, int top, int right, int bottom )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if ((dc->u.x.pen.style == PS_INSIDEFRAME) &&
|
||||
(dc->u.x.pen.width < right-left) &&
|
||||
(dc->u.x.pen.width < bottom-top))
|
||||
{
|
||||
left += dc->u.x.pen.width / 2;
|
||||
right -= (dc->u.x.pen.width + 1) / 2;
|
||||
top += dc->u.x.pen.width / 2;
|
||||
bottom -= (dc->u.x.pen.width + 1) / 2;
|
||||
}
|
||||
|
||||
if (DC_SetupGCForBrush( dc ))
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
|
@ -330,7 +349,8 @@ BOOL RoundRect( HDC hDC, short left, short top, short right, short bottom,
|
|||
y1 = YLPTODP(dc, top);
|
||||
x2 = XLPTODP(dc, right - ell_width);
|
||||
y2 = YLPTODP(dc, bottom - ell_height);
|
||||
if (DC_SetupGCForBrush(dc)) {
|
||||
if (DC_SetupGCForBrush( dc ))
|
||||
{
|
||||
XFillArc(display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + x1, dc->w.DCOrgY + y1,
|
||||
ell_width, ell_height, 90 * 64, 90 * 64);
|
||||
|
@ -428,7 +448,8 @@ int FrameRect( HDC hdc, LPRECT rect, HBRUSH hbrush )
|
|||
right = XLPTODP( dc, rect->right );
|
||||
bottom = YLPTODP( dc, rect->bottom );
|
||||
|
||||
if (DC_SetupGCForBrush( dc )) {
|
||||
if (DC_SetupGCForBrush( dc ))
|
||||
{
|
||||
PatBlt( hdc, rect->left, rect->top, 1,
|
||||
rect->bottom - rect->top, PATCOPY );
|
||||
PatBlt( hdc, rect->right - 1, rect->top, 1,
|
||||
|
@ -498,19 +519,6 @@ COLORREF GetPixel( HDC hdc, short x, short y )
|
|||
|
||||
x = dc->w.DCOrgX + XLPTODP( dc, x );
|
||||
y = dc->w.DCOrgY + YLPTODP( dc, y );
|
||||
#if 0
|
||||
if ((x < 0) || (y < 0)) return 0;
|
||||
|
||||
if (!(dc->w.flags & DC_MEMORY))
|
||||
{
|
||||
XWindowAttributes win_attr;
|
||||
|
||||
if (!XGetWindowAttributes( display, dc->u.x.drawable, &win_attr ))
|
||||
return 0;
|
||||
if (win_attr.map_state != IsViewable) return 0;
|
||||
if ((x >= win_attr.width) || (y >= win_attr.height)) return 0;
|
||||
}
|
||||
#endif
|
||||
image = XGetImage( display, dc->u.x.drawable, x, y,
|
||||
1, 1, AllPlanes, ZPixmap );
|
||||
pixel = XGetPixel( image, 0, 0 );
|
||||
|
@ -534,6 +542,8 @@ BOOL PaintRgn( HDC hdc, HRGN hrgn )
|
|||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
if (!dc) return FALSE;
|
||||
|
||||
/* FIXME: the region is supposed to be in logical coordinates */
|
||||
|
||||
/* Modify visible region */
|
||||
|
||||
if (!(prevVisRgn = SaveVisRgn( hdc ))) return FALSE;
|
||||
|
@ -627,7 +637,7 @@ void DrawFocusRect( HDC hdc, LPRECT rc )
|
|||
* Faster than CreateCompatibleDC() + SelectBitmap() + BitBlt() + DeleteDC().
|
||||
*/
|
||||
BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
||||
int xsrc, int ysrc, int width, int height, int rop )
|
||||
int xsrc, int ysrc, int width, int height )
|
||||
{
|
||||
XGCValues val;
|
||||
BITMAPOBJ *bmp;
|
||||
|
@ -636,7 +646,7 @@ BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
|||
if (!(dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ))) return FALSE;
|
||||
if (!(bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC )))
|
||||
return FALSE;
|
||||
val.function = DC_XROPfunction[(rop >> 16) & 0x0f];
|
||||
val.function = GXcopy;
|
||||
val.foreground = dc->w.textPixel;
|
||||
val.background = dc->w.backgroundPixel;
|
||||
XChangeGC(display, dc->u.x.gc, GCFunction|GCForeground|GCBackground, &val);
|
||||
|
@ -777,7 +787,7 @@ BOOL PolyPolygon( HDC hdc, LPPOINT pt, LPINT counts, WORD polygons )
|
|||
/* MF_MetaPoly(dc, META_POLYGON, pt, count); */
|
||||
return TRUE;
|
||||
}
|
||||
/* The points should be converted to device coords before */
|
||||
/* FIXME: The points should be converted to device coords before */
|
||||
/* creating the region. But as CreatePolyPolygonRgn is not */
|
||||
/* really correct either, it doesn't matter much... */
|
||||
/* At least the outline will be correct :-) */
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
|
||||
/* Warning!
|
||||
* HHOOK is not a real handle, but a 32-bit pointer to a HOOKDATA structure.
|
||||
* This is for compatibility with Windows 3.0 where HHOOK was a HOOKPROC.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright 1993 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
|
||||
#include "gdi.h"
|
||||
#include "metafile.h"
|
||||
#include "stddebug.h"
|
||||
|
|
|
@ -361,6 +361,11 @@ LONG MDICascade(HWND parent, MDICLIENTINFO *ci)
|
|||
if (ci->flagChildMaximized)
|
||||
MDIRestoreChild(parent, ci);
|
||||
|
||||
/* If there aren't any children, don't even bother.
|
||||
*/
|
||||
if (ci->nActiveChildren == 0)
|
||||
return 0;
|
||||
|
||||
GetClientRect(parent, &rect);
|
||||
spacing = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYFRAME);
|
||||
ysize = rect.bottom - 8 * spacing;
|
||||
|
@ -406,6 +411,11 @@ LONG MDITile(HWND parent, MDICLIENTINFO *ci)
|
|||
if (ci->flagChildMaximized)
|
||||
MDIRestoreChild(parent, ci);
|
||||
|
||||
/* If there aren't any children, don't even bother.
|
||||
*/
|
||||
if (ci->nActiveChildren == 0)
|
||||
return 0;
|
||||
|
||||
GetClientRect(parent, &rect);
|
||||
rows = (int) sqrt((double) ci->nActiveChildren);
|
||||
columns = ci->nActiveChildren / rows;
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
* one message queue).
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993, 1994";
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -844,7 +842,7 @@ BOOL PostMessage( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
while (hwnd) {
|
||||
if (!(wndPtr = WIN_FindWndPtr(hwnd))) break;
|
||||
if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION) {
|
||||
dprintf_msg(stddeb,"BROADCAST Message to hWnd=%04X m=%04X w=%04X l=%08X !\n",
|
||||
dprintf_msg(stddeb,"BROADCAST Message to hWnd=%04X m=%04X w=%04X l=%08lX !\n",
|
||||
hwnd, message, wParam, lParam);
|
||||
PostMessage(hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "win.h"
|
||||
#include "class.h"
|
||||
|
@ -38,8 +37,8 @@ extern BOOL AboutWine_Proc( HWND hDlg, WORD msg, WORD wParam, LONG lParam );
|
|||
|
||||
/* Some useful macros */
|
||||
#define HAS_DLGFRAME(style,exStyle) \
|
||||
(((style) & WS_DLGFRAME) && \
|
||||
(((exStyle) & WS_EX_DLGMODALFRAME) || !((style) & WS_BORDER)))
|
||||
(((exStyle) & WS_EX_DLGMODALFRAME) || \
|
||||
(((style) & WS_DLGFRAME) && !((style) & WS_BORDER)))
|
||||
|
||||
#define HAS_THICKFRAME(style) \
|
||||
(((style) & WS_THICKFRAME) && \
|
||||
|
@ -316,13 +315,18 @@ LONG NC_HandleNCHitTest( HWND hwnd, POINT pt )
|
|||
void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down )
|
||||
{
|
||||
RECT rect;
|
||||
HDC hdcMem;
|
||||
HBITMAP hbitmap;
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
NC_GetInsideRect( hwnd, &rect );
|
||||
GRAPH_DrawBitmap( hdc, hbitmapClose,
|
||||
rect.left, rect.top,
|
||||
(wndPtr->dwStyle & WS_CHILD) ? SYSMETRICS_CXSIZE : 0, 0,
|
||||
SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE,
|
||||
down ? NOTSRCCOPY : SRCCOPY );
|
||||
hdcMem = CreateCompatibleDC( hdc );
|
||||
hbitmap = SelectObject( hdcMem, hbitmapClose );
|
||||
BitBlt( hdc, rect.left, rect.top, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE,
|
||||
hdcMem, (wndPtr->dwStyle & WS_CHILD) ? SYSMETRICS_CXSIZE : 0, 0,
|
||||
down ? NOTSRCCOPY : SRCCOPY );
|
||||
SelectObject( hdcMem, hbitmap );
|
||||
DeleteDC( hdcMem );
|
||||
}
|
||||
|
||||
|
||||
|
@ -337,7 +341,7 @@ static void NC_DrawMaxButton( HWND hwnd, HDC hdc, BOOL down )
|
|||
(down ? hbitmapRestoreD : hbitmapRestore) :
|
||||
(down ? hbitmapMaximizeD : hbitmapMaximize)),
|
||||
rect.right - SYSMETRICS_CXSIZE - 1, rect.top,
|
||||
0, 0, SYSMETRICS_CXSIZE+1, SYSMETRICS_CYSIZE, SRCCOPY );
|
||||
0, 0, SYSMETRICS_CXSIZE+1, SYSMETRICS_CYSIZE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -352,7 +356,7 @@ static void NC_DrawMinButton( HWND hwnd, HDC hdc, BOOL down )
|
|||
if (wndPtr->dwStyle & WS_MAXIMIZEBOX) rect.right -= SYSMETRICS_CXSIZE + 1;
|
||||
GRAPH_DrawBitmap( hdc, (down ? hbitmapMinimizeD : hbitmapMinimize),
|
||||
rect.right - SYSMETRICS_CXSIZE - 1, rect.top,
|
||||
0, 0, SYSMETRICS_CXSIZE+1, SYSMETRICS_CYSIZE, SRCCOPY );
|
||||
0, 0, SYSMETRICS_CXSIZE+1, SYSMETRICS_CYSIZE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -544,9 +548,9 @@ void NC_DoNCPaint( HWND hwnd, HRGN hrgn, BOOL active, BOOL suppress_menupaint )
|
|||
|
||||
dprintf_nonclient(stddeb, "NC_DoNCPaint: %d %d\n", hwnd, hrgn );
|
||||
if (!wndPtr || !hrgn) return;
|
||||
if ((!(wndPtr->dwStyle & (WS_BORDER | WS_DLGFRAME | WS_THICKFRAME))) ||
|
||||
(!(wndPtr->dwStyle & WS_VISIBLE)))
|
||||
return; /* Nothing to do! */
|
||||
if (!(wndPtr->dwStyle & WS_VISIBLE)) return; /* Nothing to do */
|
||||
if (!(wndPtr->dwStyle & (WS_BORDER | WS_DLGFRAME | WS_THICKFRAME)) &&
|
||||
!(wndPtr->dwExStyle & WS_EX_DLGMODALFRAME)) return; /* Nothing to do */
|
||||
|
||||
if (hrgn == 1) hdc = GetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
||||
else
|
||||
|
@ -594,7 +598,8 @@ void NC_DoNCPaint( HWND hwnd, HRGN hrgn, BOOL active, BOOL suppress_menupaint )
|
|||
|
||||
SelectObject( hdc, sysColorObjects.hpenWindowFrame );
|
||||
|
||||
if ((wndPtr->dwStyle & WS_BORDER) || (wndPtr->dwStyle & WS_DLGFRAME))
|
||||
if ((wndPtr->dwStyle & WS_BORDER) || (wndPtr->dwStyle & WS_DLGFRAME) ||
|
||||
(wndPtr->dwExStyle & WS_EX_DLGMODALFRAME))
|
||||
{
|
||||
MoveTo( hdc, 0, 0 );
|
||||
LineTo( hdc, rect.right-1, 0 );
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright 1993 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright David W. Metcalfe, 1993";
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "windows.h"
|
||||
#include "gdi.h"
|
||||
|
|
|
@ -6,12 +6,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright David W. Metcalfe, 1993";
|
||||
static char Copyright2[] = "Copyright Alexandre Julliard, 1994";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "windows.h"
|
||||
#include "gdi.h"
|
||||
#include "syscolor.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_SYSCOLOR */
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright 1993 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
|
||||
#include "windows.h"
|
||||
#include "message.h"
|
||||
#include "stddebug.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "debug.h"
|
||||
|
||||
|
||||
static char Copyright[] = "Copyright Andrew C. Bulhak, 1993";
|
||||
/* static char Copyright[] = "Copyright Andrew C. Bulhak, 1993"; */
|
||||
|
||||
|
||||
/* MulDiv is a simple function that may as well have been
|
||||
|
@ -72,6 +72,7 @@ void OutputDebugString(LPSTR foo)
|
|||
DebugPrintString(foo);
|
||||
};
|
||||
|
||||
#if 0
|
||||
/* UTILITY_qualify(source, dest) takes the format string source and
|
||||
* changes all the parameters to correspond to Linux integer sizes
|
||||
* rather than Windows sizes. For example, it converts %i to %hi
|
||||
|
@ -109,6 +110,7 @@ loop_end:
|
|||
};
|
||||
*dest = '\0';
|
||||
};
|
||||
#endif
|
||||
|
||||
/* UTILITY_argsize() evaluates the size of the argument list that
|
||||
* accompanies a vsprintf() or wvsprintf() call.
|
||||
|
|
|
@ -20,6 +20,7 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993, 1994";
|
|||
#include "icon.h"
|
||||
#include "cursor.h"
|
||||
#include "event.h"
|
||||
#include "message.h"
|
||||
#include "winpos.h"
|
||||
#include "color.h"
|
||||
#include "stddebug.h"
|
||||
|
@ -297,7 +298,7 @@ HWND CreateWindowEx( DWORD exStyle, LPSTR className, LPSTR windowName,
|
|||
int wmcreate;
|
||||
XSetWindowAttributes win_attr;
|
||||
|
||||
dprintf_win(stddeb, "CreateWindowEx: %04X '%s' '%s' %04X %d,%d %dx%d %04X %04X %04X %08X\n",
|
||||
dprintf_win(stddeb, "CreateWindowEx: %08lX '%s' '%s' %08lX %d,%d %dx%d %04X %04X %04X %p\n",
|
||||
exStyle, className, windowName, style, x, y, width, height,
|
||||
parent, menu, instance, data);
|
||||
/* 'soundrec.exe' has negative position !
|
||||
|
@ -444,7 +445,7 @@ HWND CreateWindowEx( DWORD exStyle, LPSTR className, LPSTR windowName,
|
|||
GlobalUnlock( hCursor );
|
||||
}
|
||||
|
||||
dprintf_menu(stddeb,"CreateWindowEx // menu=%04X instance=%04X classmenu=%08X !\n",
|
||||
dprintf_menu(stddeb,"CreateWindowEx // menu=%04X instance=%04X classmenu=%p !\n",
|
||||
menu, instance, classPtr->wc.lpszMenuName);
|
||||
|
||||
if ((style & WS_CAPTION) && (style & WS_CHILD) == 0) {
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright 1993, 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993, 1994";
|
||||
|
||||
#include "sysmetrics.h"
|
||||
#include "user.h"
|
||||
#include "win.h"
|
||||
|
|
Loading…
Reference in New Issue