Skip to content
Snippets Groups Projects
Commit 36ca1368 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Release 940602

Sat May 28 12:03:23 1994  Bob Amstadt  (bob@pooh)

	* miscemu/int21.c (OpenExistingFile): 
	OpenExistingFile needed to return handle in AX register instead
	of the BX register.

	* miscemu/int21.c (ioctlGetDeviceInfo): 
	Added a little code to give a fake result for normal files.

Wed May 25 21:55:38 1994  Bob Amstadt  (bob@pooh)

	* [memory/global.c]
	return value from GlobalSize was completely wrong.

	* [miscemu/int21.h]
	fixed bug in FindFirst.  Directory pointer (dp) was not placed in
	dta correctly.

	* [tools/build.c]
	fixed creation of pop.h to guarantee that flags are restored correctly.

	* [misc/comm.c]
	changed all occurance of strncmp() to strncasecmp().
	BuildCommDCB() should not require that OpenComm() be called first.

	* [loader/selector.c]
	Heap initialized to size of full segment less stack size and 
	automatic data size.

Sat May 28 09:14:33 1994  Rick Sladkey  (jrs@world.std.com)

	* [controls/listbox.c]
	Correct typos in ListBoxResetContent where lpls variable is
	used where lsls2 variable is meant.  Don't call USER_HEAP_FREE
	twice on the same handle if hData and hMem are the same.

	* [debugger/opcodes/i386-dis.c]
	Add new name array names_rmw for table driven decoding of the
	16-bit mod/rm field.  Omit large case statement in OP_E and
	replace with array reference to match existing coding style.
	Add new static variable machine with value 286 or 386 to
	correctly decode mod/rm field in either 16 or 32 bit modes.
	Set it in print_insn_i{2,3}86.  In OP_E use it to decide how
	to decode mod/rm.  While the code was correct for 16 bit code,
	it was improperly decoding mod/rm fields on word prefixed
	32 bit instructions.

	* [debugger/debug.l]
	Recognize new token ABORT.   Recognize single letters 'p'
	and 'q' as tokens.

	* [debugger/dbg.y]
	Add new token ABORT.  Allow print command to be invoked by
	'p' and quit command by 'q', ala GDB.  Change lots of '};'
	to just '}'.  Add static dummy_regs to wine_debug so that
	wine_debug(0, NULL) doesn't core dump with qmagic.

	* [debugger/info.c]
	Correct syntax of break command in helptext and omit former
	comment about probable bugginess of the disassembly since it
	is now correct.  Change fprintf of first backtrace stack
	frame to match that of the second and subsequent frames.

	* [loader/selector.c]
	Change construction of command line in CreatePSP from creating
	a string that looks like "arg1 arg2 \r" to "arg1 arg2".  A DOS
	PSP command line looks like " arg1 arg2\r" with the length not
	including the trailing "\r" but that is not how Windows does it.

	* [loader/library.c]
	Change uses of %s to print strings in GetModuleHandle to %x so
	that string IDs don't cause a core dump with qmagic.  Handle
	converting a string id to a literal module handle.  For
	example, GetModuleHandle((LPSTR) 0x57) now returns 0x57 if
	it is a real module handle.

	* [misc/message.c]
	In MessageBox, translate a NULL title argument to the string "Error".

	* [misc/profile.c]
	In GetSetProfile translate a NULL Default argument to "".  Any
	caller whose Default argument is NULL is buggy, but CHARMAP does it
	anyway.

	* [objects/font.c]
	Add NULL pointer checks in EnumFontFamilies to prevent core dumps.

Sat May 28 20:01:51 1994 Jon Tombs (jon@gtex02.us.es) 

	* New options/resourses nosaveunders and nobackingstore.  By 
	default backingstore and saveunders are now enabled, these use 
	more memory but avoids those slow (sometimes multiple) redraws 
	caused be exposure events.

May 30, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)

	* [misc/driver.c] New file
	Skeleton for 'Installable Wine Drivers' functions. :-)
	* [misc/audio.c] New file
	Skeleton for basic 'Audio Driver' functions.
	* [misc/network.c] New file
	Stubs for few networking functions.

	* [misc/mmsystem.c]
	More coding ... a dust in a galaxy ...
	* [misc/shell.c]
	Some coding for 'RegXXX' functions ... a dust in the wind ...

	* [misc/profile.c]
	Bug fix in GetSetProfile(), bad enumeration if KeyName == NULL.

	* [objects/gdi.c]
	New function CreateDiscardableBitmap(), it just calling 
	CreateCompatibleBitmap() for now. It's get 'clock.exe' running ! :-)

	* [controls/listbox.c]
	* [controls/combo.c]
	New font member assigned to SYSTEM_FONT as default.
	Added processing for WM_SETFONT message;


Tue May 31 20:34:25 EDT 1994  John Richardson <jrichard@cs.uml.edu>

        * [windows/event.c]
        Added AsyncMouseButtonsStates array for GetAsyncKeyState.

        * [windows/keyboard.c]
        Implemented beginning of GetAsyncKeyState.

Wed May 25 23:35:03 1994  David Metcalfe <david@prism.demon.co.uk>

        * [objects/metafile.c] [include/metafile.h]
          [windows/mapping.c] [objects/clipping.c] [objects/bitblt.c]
          [windows/dc.c]
        Further metafile support.
parent 1f57929b
No related branches found
Tags wine-940602
No related merge requests found
----------------------------------------------------------------------
Sat May 28 12:03:23 1994 Bob Amstadt (bob@pooh)
* miscemu/int21.c (OpenExistingFile):
OpenExistingFile needed to return handle in AX register instead
of the BX register.
* miscemu/int21.c (ioctlGetDeviceInfo):
Added a little code to give a fake result for normal files.
Wed May 25 21:55:38 1994 Bob Amstadt (bob@pooh)
* [memory/global.c]
return value from GlobalSize was completely wrong.
* [miscemu/int21.h]
fixed bug in FindFirst. Directory pointer (dp) was not placed in
dta correctly.
* [tools/build.c]
fixed creation of pop.h to guarantee that flags are restored correctly.
* [misc/comm.c]
changed all occurance of strncmp() to strncasecmp().
BuildCommDCB() should not require that OpenComm() be called first.
* [loader/selector.c]
Heap initialized to size of full segment less stack size and
automatic data size.
Sat May 28 09:14:33 1994 Rick Sladkey (jrs@world.std.com)
* [controls/listbox.c]
Correct typos in ListBoxResetContent where lpls variable is
used where lsls2 variable is meant. Don't call USER_HEAP_FREE
twice on the same handle if hData and hMem are the same.
* [debugger/opcodes/i386-dis.c]
Add new name array names_rmw for table driven decoding of the
16-bit mod/rm field. Omit large case statement in OP_E and
replace with array reference to match existing coding style.
Add new static variable machine with value 286 or 386 to
correctly decode mod/rm field in either 16 or 32 bit modes.
Set it in print_insn_i{2,3}86. In OP_E use it to decide how
to decode mod/rm. While the code was correct for 16 bit code,
it was improperly decoding mod/rm fields on word prefixed
32 bit instructions.
* [debugger/debug.l]
Recognize new token ABORT. Recognize single letters 'p'
and 'q' as tokens.
* [debugger/dbg.y]
Add new token ABORT. Allow print command to be invoked by
'p' and quit command by 'q', ala GDB. Change lots of '};'
to just '}'. Add static dummy_regs to wine_debug so that
wine_debug(0, NULL) doesn't core dump with qmagic.
* [debugger/info.c]
Correct syntax of break command in helptext and omit former
comment about probable bugginess of the disassembly since it
is now correct. Change fprintf of first backtrace stack
frame to match that of the second and subsequent frames.
* [loader/selector.c]
Change construction of command line in CreatePSP from creating
a string that looks like "arg1 arg2 \r" to "arg1 arg2". A DOS
PSP command line looks like " arg1 arg2\r" with the length not
including the trailing "\r" but that is not how Windows does it.
* [loader/library.c]
Change uses of %s to print strings in GetModuleHandle to %x so
that string IDs don't cause a core dump with qmagic. Handle
converting a string id to a literal module handle. For
example, GetModuleHandle((LPSTR) 0x57) now returns 0x57 if
it is a real module handle.
* [misc/message.c]
In MessageBox, translate a NULL title argument to the string "Error".
* [misc/profile.c]
In GetSetProfile translate a NULL Default argument to "". Any
caller whose Default argument is NULL is buggy, but CHARMAP does it
anyway.
* [objects/font.c]
Add NULL pointer checks in EnumFontFamilies to prevent core dumps.
Sat May 28 20:01:51 1994 Jon Tombs (jon@gtex02.us.es)
* New options/resourses nosaveunders and nobackingstore. By
default backingstore and saveunders are now enabled, these use
more memory but avoids those slow (sometimes multiple) redraws
caused be exposure events.
May 30, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/driver.c] New file
Skeleton for 'Installable Wine Drivers' functions. :-)
* [misc/audio.c] New file
Skeleton for basic 'Audio Driver' functions.
* [misc/network.c] New file
Stubs for few networking functions.
* [misc/mmsystem.c]
More coding ... a dust in a galaxy ...
* [misc/shell.c]
Some coding for 'RegXXX' functions ... a dust in the wind ...
* [misc/profile.c]
Bug fix in GetSetProfile(), bad enumeration if KeyName == NULL.
* [objects/gdi.c]
New function CreateDiscardableBitmap(), it just calling
CreateCompatibleBitmap() for now. It's get 'clock.exe' running ! :-)
* [controls/listbox.c]
* [controls/combo.c]
New font member assigned to SYSTEM_FONT as default.
Added processing for WM_SETFONT message;
Tue May 31 20:34:25 EDT 1994 John Richardson <jrichard@cs.uml.edu>
* [windows/event.c]
Added AsyncMouseButtonsStates array for GetAsyncKeyState.
* [windows/keyboard.c]
Implemented beginning of GetAsyncKeyState.
Wed May 25 23:35:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [objects/metafile.c] [include/metafile.h]
[windows/mapping.c] [objects/clipping.c] [objects/bitblt.c]
[windows/dc.c]
Further metafile support.
----------------------------------------------------------------------
Mon May 23 15:07:36 1994 Bob Amstadt (bob@pooh)
......@@ -30,7 +167,7 @@ Mon May 23 00:48:25 1994 Rick Sladkey (jrs@world.std.com)
* [windows/dialog.c]
Fix inadvertent printing of string IDs as strings.
May 16, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
May 23, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [controls/menu.c]
New functions GetMenuItemCount(), GetMenuItemID().
......
......@@ -197,6 +197,17 @@ bob@amscons.com
7. WHAT'S NEW
WHAT'S NEW with Wine-940602: (see ChangeLog for details)
- CLOCK.EXE runs.
- ABORT command added to debugger.
- Windows environment is now imported from the UNIX environment.
- Use of save unders and backing store are now the default. Resource
and command line options have been added to disable these things.
- Assorted new driver functions
- GetAsyncKeyState()
- More metafile support
- and many many bug fixes!
WHAT'S NEW with Wine-940524: (see ChangeLog for details)
- New menu functions
- EnumObjects()
......
......@@ -673,7 +673,7 @@ void EDIT_WriteTextLine(HWND hwnd, RECT *rect, int y)
int col, off = 0;
int sbl, sel, sbc, sec;
RECT rc;
div_t num;
BOOL trunc = FALSE;
WND *wndPtr = WIN_FindWndPtr(hwnd);
EDITSTATE *es = (EDITSTATE *)EDIT_HEAP_ADDR((HANDLE)(*(wndPtr->wExtra)));
......
......@@ -78,6 +78,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
lphl->hWndLogicParent = (HWND)HIWORD(createStruct->lpCreateParams);
else
lphl->hWndLogicParent = GetParent(hwnd);
lphl->hFont = GetStockObject(SYSTEM_FONT);
lphl->ColumnsWidth = wndPtr->rectClient.right - wndPtr->rectClient.left;
if (wndPtr->dwStyle & WS_VSCROLL) {
SetScrollRange(hwnd, SB_VERT, 1, lphl->ItemsCount, TRUE);
......@@ -330,6 +331,14 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
InvalidateRect(hwnd, NULL, TRUE);
UpdateWindow(hwnd);
break;
case WM_SETFONT:
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
if (lphl == NULL) return 0;
if (wParam == 0)
lphl->hFont = GetStockObject(SYSTEM_FONT);
else
lphl->hFont = wParam;
if (wParam == 0) break;
case WM_PAINT:
wndPtr = WIN_FindWndPtr(hwnd);
if ((wndPtr->dwStyle & LBS_OWNERDRAWFIXED) == LBS_OWNERDRAWFIXED) {
......@@ -514,6 +523,7 @@ void StdDrawListBox(HWND hwnd)
}
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
if (lphl == NULL) goto EndOfPaint;
SelectObject(hdc, lphl->hFont);
hBrush = SendMessage(lphl->hWndLogicParent, WM_CTLCOLOR, (WORD)hdc,
MAKELONG(hwnd, CTLCOLOR_LISTBOX));
if (hBrush == (HBRUSH)NULL) hBrush = GetStockObject(WHITE_BRUSH);
......@@ -986,8 +996,9 @@ int ListBoxResetContent(HWND hwnd)
#ifdef DEBUG_LISTBOX
printf("ResetContent #%u\n", i);
#endif
if (lpls2->hData != 0) USER_HEAP_FREE(lpls->hData);
if (lpls2->hMem != 0) USER_HEAP_FREE(lpls->hMem);
if (lpls2->hData != 0 && lpls2->hData != lpls2->hMem)
USER_HEAP_FREE(lpls2->hData);
if (lpls2->hMem != 0) USER_HEAP_FREE(lpls2->hMem);
}
if (lpls == NULL) break;
}
......@@ -1093,6 +1104,7 @@ int ListBoxGetSel(HWND hwnd, WORD wIndex)
int ListBoxDirectory(HWND hwnd, UINT attrib, LPSTR filespec)
{
struct dosdirent *dp;
struct dosdirent *newdp;
struct stat st;
int x, wRet;
char temp[256];
......@@ -1100,9 +1112,8 @@ int ListBoxDirectory(HWND hwnd, UINT attrib, LPSTR filespec)
fprintf(stderr,"ListBoxDirectory: %s, %4x\n",filespec,attrib);
#endif
if ((dp = (struct dosdirent *)DOS_opendir(filespec)) ==NULL) return 0;
while (1) {
dp = (struct dosdirent *)DOS_readdir(dp);
if (!dp->inuse) break;
while (dp = (struct dosdirent *)DOS_readdir(dp)) {
if (!dp->inuse) break;
#ifdef DEBUG_LISTBOX
printf("ListBoxDirectory %08X '%s' !\n", dp->filename, dp->filename);
#endif
......
......@@ -43,6 +43,7 @@ void mode_command(int);
%token NO_SYMBOL
%token SYMBOLFILE
%token DEFINE
%token ABORT
%%
......@@ -52,17 +53,20 @@ void mode_command(int);
line: '\n'
| infocmd '\n'
| error '\n' { yyerrok; }
| QUIT '\n' { exit(0); };
| HELP '\n' { dbg_help(); };
| CONT '\n' { return; };
| SYMBOLFILE IDENTIFIER '\n' { read_symboltable($2); };
| DEFINE IDENTIFIER expr '\n' { add_hash($2, $3); };
| MODE NUM { mode_command($2); };
| ENABLE NUM { enable_break($2); };
| DISABLE NUM { disable_break($2); };
| BREAK '*' expr { add_break($3); };
| QUIT '\n' { exit(0); }
| 'q' '\n' { exit(0); }
| HELP '\n' { dbg_help(); }
| CONT '\n' { return; }
| 'c' '\n' { return; }
| ABORT '\n' { kill(getpid(), SIGABRT); }
| SYMBOLFILE IDENTIFIER '\n' { read_symboltable($2); }
| DEFINE IDENTIFIER expr '\n' { add_hash($2, $3); }
| MODE NUM { mode_command($2); }
| ENABLE NUM { enable_break($2); }
| DISABLE NUM { disable_break($2); }
| BREAK '*' expr { add_break($3); }
| x_command
| BACKTRACE '\n' { dbg_bt(); };
| BACKTRACE '\n' { dbg_bt(); }
| print_command
| deposit_command
......@@ -73,12 +77,18 @@ deposit_command:
x_command:
'x' expr '\n' { examine_memory($2, 1, 'x'); };
| 'x' '/' fmt expr '\n' { examine_memory($4, 1, $3); };
| 'x' '/' NUM fmt expr '\n' { examine_memory($5, $3, $4); };
'x' expr '\n' { examine_memory($2, 1, 'x'); }
| 'x' '/' fmt expr '\n' { examine_memory($4, 1, $3); }
| 'x' '/' NUM fmt expr '\n' { examine_memory($5, $3, $4); }
print:
'p'
| print
print_command:
PRINT expr '\n' { examine_memory(((unsigned int) &$2 ), 1, 'x'); };
print expr '\n' { examine_memory(((unsigned int) &$2 ), 1, 'x'); }
| print '/' fmt expr '\n' { examine_memory((unsigned int) &$4, 1, $3); }
| print '/' NUM fmt expr '\n' { examine_memory((unsigned int) &$5, $3, $4); }
fmt: 'x' { $$ = 'x'; }
| 'd' { $$ = 'd'; }
......@@ -92,20 +102,20 @@ x_command:
if($$ == 0xffffffff) {
fprintf(stderr,"Symbol %s not found\n", $1);
YYERROR;
};
};
}
}
expr: NUM { $$ = $1; }
| REG { if(regval) $$ = regval[$1]; else application_not_running();}
| symbol { $$ = *((unsigned int *) $1); }
| expr '+' NUM { $$ = $1 + $3; }
| expr '-' NUM { $$ = $1 - $3; };
| '(' expr ')' { $$ = $2; };
| '*' expr { $$ = *((unsigned int *) $2); };
| expr '-' NUM { $$ = $1 - $3; }
| '(' expr ')' { $$ = $2; }
| '*' expr { $$ = *((unsigned int *) $2); }
infocmd: INFO REGS { info_reg(); }
| INFO STACK { info_stack(); };
| INFO BREAK { info_break(); };
| INFO STACK { info_stack(); }
| INFO BREAK { info_break(); }
%%
......@@ -141,8 +151,10 @@ wine_debug(int signal, int * regs)
#ifdef YYDEBUG
yydebug = 0;
#endif
static int dummy_regs[32];
yyin = stdin;
regval = regs;
regval = regs ? regs : dummy_regs;
#ifdef linux
if((SC_CS & 7) != 7) {
......@@ -151,7 +163,7 @@ wine_debug(int signal, int * regs)
} else {
dbg_mask = 0xffff;
dbg_mode = 16;
};
}
#endif
#ifdef __NetBSD__
if(SC_CS == 0x1f) {
......@@ -160,7 +172,7 @@ wine_debug(int signal, int * regs)
} else {
dbg_mask = 0xffff;
dbg_mode = 16;
};
}
#endif
fprintf(stderr,"In %d bit mode.\n", dbg_mode);
......@@ -170,7 +182,7 @@ wine_debug(int signal, int * regs)
if(!loaded_symbols){
loaded_symbols++;
load_entrypoints();
};
}
#endif
/* Remove the breakpoints from memory... */
......@@ -187,7 +199,7 @@ wine_debug(int signal, int * regs)
}
/* Show where we crashed */
if(regval)
if(regs)
examine_memory(SC_EIP(dbg_mask), 1, 'i');
issue_prompt();
......
......@@ -98,6 +98,7 @@ cont|con|co { return CONT; }
symbolfile|symbolfil|symbolfi|symbolf|symbol|symbo|symb { return SYMBOLFILE; }
define|defin|defi|def|de { return DEFINE; }
abort|abor|abo { return ABORT; }
print|prin|pri|pr { return PRINT; }
mode { return MODE; }
......@@ -106,13 +107,15 @@ regs|reg|re { return REGS; }
stack|stac|sta|st { return STACK; }
x { return 'x'; }
p { return 'p'; }
x { return 'x'; }
d { return 'd'; }
i { return 'i'; }
w { return 'w'; }
b { return 'b'; }
s { return 's'; }
c { return 'c'; }
q { return 'q'; }
{IDENTIFIER} {yylval = (int) make_symbol(yytext);
return IDENTIFIER;
......
......@@ -222,7 +222,7 @@ char * helptext[] = {
"of the commands that gdb would accept. The commands currently",
"are:\n",
" info [reg,stack,break]",
" break <addr>",
" break *<addr>",
" enable bpnum",
" disable bpnum",
" help",
......@@ -246,10 +246,6 @@ char * helptext[] = {
" symbolfile command. Symbols can also be defined individually with",
" the define command.",
"",
"The disassembly code seems to work most of the time, but it does get",
"a little confused at times. The 16 bit mode probably has not been used",
"much so there are probably bugs.",
"",
NULL};
void dbg_help(){
......@@ -286,7 +282,7 @@ void dbg_bt(){
}
fprintf(stderr,"Backtrace:\n");
fprintf(stderr,"%d: %4.4x:%4.4x\n", frameno++, SC_CS, SC_EIP(dbg_mask));
fprintf(stderr,"%d %4.4x:%4.4x\n", frameno++, SC_CS, SC_EIP(dbg_mask));
cs = SC_CS;
frame = (struct frame *) ((SC_EBP(dbg_mask) & ~1) | (SC_SS << 16));
......
......@@ -703,6 +703,9 @@ static char *names8[] = {
static char *names_seg[] = {
"%es","%cs","%ss","%ds","%fs","%gs","%?","%?",
};
static char *names_rmw[] = {
"%bx,%si","%bx,%di","%bp,%si","%bp,%di","%si","%di","%bp","%bx",
};
struct dis386 grps[][8] = {
/* GRP1b */
......@@ -950,8 +953,9 @@ ckprefix ()
}
}
static int machine;
static int dflag;
static int aflag;
static int aflag;
static char op1out[100], op2out[100], op3out[100];
static int op_address[3], op_ad, op_index[3];
......@@ -1140,6 +1144,7 @@ print_insn_i286 (pc, info)
bfd_vma pc;
disassemble_info *info;
{
machine = 286;
dflag = 0;
aflag = 0;
return print_insn_i286_or_i386 (pc, info);
......@@ -1150,6 +1155,7 @@ print_insn_i386 (pc, info)
bfd_vma pc;
disassemble_info *info;
{
machine = 386;
dflag = 1;
aflag = 1;
return print_insn_i286_or_i386 (pc, info, 36);
......@@ -1555,7 +1561,7 @@ OP_E (bytemode)
append_prefix ();
if (bytemode == w_mode || (bytemode == v_mode && !dflag))
if (machine == 286)
{
if (mod == 0 && rm == 6)
{
......@@ -1579,33 +1585,8 @@ OP_E (bytemode)
oappend (scratchbuf);
}
switch (rm)
{
case 0:
oappend ("(%bx,%si)");
break;
case 1:
oappend ("(%bx,%di)");
break;
case 2:
oappend ("(%bp,%si)");
break;
case 3:
oappend ("(%bp,%di)");
break;
case 4:
oappend ("(%si)");
break;
case 5:
oappend ("(%di)");
break;
case 6:
oappend ("(%bp)");
break;
case 7:
oappend ("(%bx)");
break;
}
sprintf (scratchbuf, "(%s)", names_rmw[rm]);
oappend (scratchbuf);
return 0;
}
......
......@@ -155,7 +155,7 @@ LONG CallWindowProc( FARPROC func, HWND hwnd, WORD message,
user_tab = FindDLLTable("USER");
/* DefWindowProc */
if (user_tab[104].address == address)
if (user_tab[107].address == address)
return DefWindowProc(hwnd, message, wParam, lParam);
/* DefDlgProc */
......
......@@ -127,7 +127,7 @@ length 490
117 pascal SetDCOrg(word s_word s_word) SetDCOrg(1 2 3)
#121 pascal Death
#122 pascal ReSurRection
#123 pascal PlayMetaFile
123 pascal PlayMetaFile(word word) PlayMetaFile(1 2)
#124 pascal GetMetaFile
125 pascal CreateMetaFile(ptr) CreateMetaFile(1)
126 pascal CloseMetaFile(word) CloseMetaFile(1)
......@@ -148,7 +148,8 @@ length 490
153 pascal CreateIC(ptr ptr ptr ptr) CreateIC(1 2 3 4)
154 pascal GetNearestColor(word long) GetNearestColor(1 2)
#155 pascal QueryAbort
#156 pascal CreateDiscardableBitmap
156 pascal CreateDiscardableBitmap(word word word)
CreateDiscardableBitmap(1 2 3)
#159 pascal GetMetaFileBits
#160 pascal SetMetaFileBits
161 pascal PtInRegion(word s_word s_word) PtInRegion(1 2 3)
......@@ -159,6 +160,7 @@ length 490
172 pascal SetRectRgn(word s_word s_word s_word s_word) SetRectRgn(1 2 3 4 5)
173 pascal GetClipRgn(word) GetClipRgn(1)
#175 pascal EnumMetaFile
176 pascal PlayMetaFileRecord(word ptr ptr word) PlayMetaFileRecord(1 2 3 4)
179 pascal GetDCState(word) GetDCState(1)
180 pascal SetDCState(word word) SetDCState(1 2)
181 pascal RectInRegionOld(word ptr) RectInRegion(1 2)
......
......@@ -18,7 +18,7 @@ length 415
12 pascal LocalFlags(word) WIN16_LocalFlags(1)
13 pascal LocalCompact(word) WIN16_LocalCompact(1)
14 return LocalNotify 4 0
15 pascal GlobalAlloc(word long) GlobalAlloc(1 2)
15 pascal GlobalAlloc(word long) WIN16_GlobalAlloc(1 2)
16 pascal GlobalReAlloc(word long word) GlobalReAlloc(1 2 3)
17 pascal GlobalFree(word) GlobalFree(1)
18 pascal GlobalLock(word) GlobalLock(1)
......@@ -203,7 +203,7 @@ length 415
#204 SWAPRECORDING
#205 CVWBREAK
#206 ALLOCSELECTORARRAY
#207 ISDBCSLEADBYTE
207 return IsDBCSLeadByte 2 0
#310 LOCALHANDLEDELTA
#311 GETSETKERNELDOSPROC
#314 DEBUGDEFINESEGMENT
......
......@@ -12,5 +12,7 @@
popl %ecx
popl %eax
add $16,%esp
popfl
popl %gs:return_value
add $20,%esp
pushl %gs:return_value
popfl
......@@ -258,7 +258,7 @@ length 540
#246 EXITWINDOWSEXEC
247 pascal GetCursor() GetCursor()
248 pascal GetOpenClipboardWindow() GetOpenClipboardWindow()
#249 GETASYNCKEYSTATE
249 pascal GetAsyncKeyState(word) GetAsyncKeyState(1)
#250 GETMENUSTATE
#251 SENDDRIVERMESSAGE
#252 OPENDRIVER
......@@ -413,13 +413,13 @@ length 540
#509 WNETUNWATCHQUEUE
#510 WNETLOCKQUEUEDATA
#511 WNETUNLOCKQUEUEDATA
#512 WNETGETCONNECTION
512 pascal WNetGetConnection(ptr ptr ptr) WNetGetConnection(1 2 3)
#513 WNETGETCAPS
#514 WNETDEVICEMODE
#515 WNETBROWSEDIALOG
#516 WNETGETUSER
#517 WNETADDCONNECTION
#518 WNETCANCELCONNECTION
516 pascal WNetGetUser(ptr ptr ptr) WNetGetUser(1 2 3)
517 pascal WNetAddConnection(ptr ptr ptr) WNetAddConnection(1 2 3)
518 pascal WNetCancelConnection(ptr word) WNetCancelConnection(1 2)
#519 WNETGETERROR
#520 WNETGETERRORTEXT
#521 WNETENABLE
......
......@@ -26,6 +26,7 @@ typedef struct tagHEADLIST {
void *lpFirst;
DWORD dwStyle;
HWND hWndLogicParent;
HFONT hFont;
} HEADLIST;
typedef HEADLIST FAR* LPHEADLIST;
......
......@@ -19,13 +19,16 @@ typedef struct tagMETAFILE
char Filename[80]; /* metafile name, if disk based */
int hFile; /* MSDOS file handle for metafile */
HANDLE hMetaHdr; /* handle of metafile header */
int MetaOffset; /* offset of current record in metafile */
int MetaOffset; /* offset of current record in metafile */
HANDLE hBuffer; /* handle of buffer for disk based metafiles */
} METAFILE;
typedef METAFILE *LPMETAFILE;
BOOL MF_WriteRecord(HMETAFILE hmf, METARECORD *mr, WORD rlen);
int MF_AddHandle(HANDLETABLE *ht, WORD htlen, HANDLE hobj);
int MF_AddHandleInternal(HANDLE hobj);
BOOL MF_MetaParam0(DC *dc, short func);
BOOL MF_MetaParam1(DC *dc, short func, short param1);
BOOL MF_MetaParam2(DC *dc, short func, short param1, short param2);
BOOL MF_MetaParam4(DC *dc, short func, short param1, short param2,
......@@ -35,9 +38,9 @@ BOOL MF_MetaParam6(DC *dc, short func, short param1, short param2,
BOOL MF_MetaParam8(DC *dc, short func, short param1, short param2,
short param3, short param4, short param5,
short param6, short param7, short param8);
BOOL MF_CreateBrushIndirect(DC *dc, LOGBRUSH *logbrush);
BOOL MF_CreatePatternBrush(DC *dc, LOGBRUSH *logbrush);
BOOL MF_CreatePenIndirect(DC *dc, LOGPEN *logpen);
BOOL MF_CreateBrushIndirect(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush);
BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush);
BOOL MF_CreatePenIndirect(DC *dc, HPEN hPen, LOGPEN *logpen);
BOOL MF_TextOut(DC *dc, short x, short y, LPSTR str, short count);
BOOL MF_MetaPoly(DC *dc, short func, LPPOINT pt, short count);
......
......@@ -251,7 +251,7 @@ UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
UINT WINAPI waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID,
const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
const LPWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
UINT WINAPI waveOutClose(HWAVEOUT hWaveOut);
UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut,
WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
......@@ -278,7 +278,7 @@ UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps,
UINT uSize);
UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID,
const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
const LPWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
UINT WINAPI waveInClose(HWAVEIN hWaveIn);
UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn,
WAVEHDR FAR* lpWaveInHdr, UINT uSize);
......@@ -1385,6 +1385,32 @@ typedef struct {
typedef MCI_OVLY_LOAD_PARMS FAR * LPMCI_OVLY_LOAD_PARMS;
/**************************************************************
* Linux MMSYSTEM Internals & Sample Audio Drivers
*/
typedef struct {
DWORD dwCallback;
DWORD dwInstance;
HMIDIOUT hMidi;
DWORD dwFlags;
} PORTALLOC;
typedef PORTALLOC FAR *LPPORTALLOC;
BOOL DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE hDev,
WORD wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
DWORD auxMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
DWORD midMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
DWORD modMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
DWORD widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
DWORD wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
#endif /* MMSYSTEM_H */
......@@ -14,6 +14,8 @@ struct options
char * programName; /* To use when loading resources */
int usePrivateMap;
int synchronous;
int nobackingstore;
int nosaveunders;
short cmdShow;
int relay_debug;
int debug;
......
......@@ -82,7 +82,7 @@ extern void load_ne_header (int, struct ne_header_s *);
extern char *GetFilenameFromInstance(unsigned short instance);
extern struct w_files *GetFileInfo(unsigned short instance);
extern HINSTANCE LoadImage(char *modulename, int filetype);
extern HINSTANCE LoadImage(char *modulename, int filetype, int change_dir);
extern int _WinMain(int argc, char **argv);
extern void InitializeLoadedDLLs();
extern int FixupSegment(struct w_files * wpnt, int segment_num);
......
......@@ -46,11 +46,18 @@ HANDLE GetModuleHandle(LPSTR lpModuleName)
{
register struct w_files *w = wine_files;
int i;
printf("GetModuleHandle('%s');\n", lpModuleName);
printf("GetModuleHandle('%x');\n", lpModuleName);
printf("GetModuleHandle // searching in loaded modules\n");
while (w) {
/* printf("GetModuleHandle // '%s' \n", w->name); */
if (strcasecmp(w->name, lpModuleName) == 0) {
/* printf("GetModuleHandle // '%x' \n", w->name); */
if (((int) lpModuleName & 0xffff0000) == 0) {
if (w->hinstance == (int) lpModuleName) {
printf("GetModuleHandle('%x') return %04X \n",
lpModuleName, w->hinstance);
return w->hinstance;
}
}
else if (strcasecmp(w->name, lpModuleName) == 0) {
printf("GetModuleHandle('%s') return %04X \n",
lpModuleName, w->hinstance);
return w->hinstance;
......@@ -60,13 +67,20 @@ HANDLE GetModuleHandle(LPSTR lpModuleName)
printf("GetModuleHandle // searching in builtin libraries\n");
for (i = 0; i < N_BUILTINS; i++) {
if (dll_builtin_table[i].dll_name == NULL) break;
if (strcasecmp(dll_builtin_table[i].dll_name, lpModuleName) == 0) {
printf("GetModuleHandle('%s') return %04X \n",
if (((int) lpModuleName & 0xffff0000) == 0) {
if (0xFF00 + i == (int) lpModuleName) {
printf("GetModuleHandle('%s') return %04X \n",
lpModuleName, w->hinstance);
return 0xFF + i;
}
}
else if (strcasecmp(dll_builtin_table[i].dll_name, lpModuleName) == 0) {
printf("GetModuleHandle('%x') return %04X \n",
lpModuleName, 0xFF00 + i);
return (0xFF00 + i);
}
}
printf("GetModuleHandle('%s') not found !\n", lpModuleName);
printf("GetModuleHandle('%x') not found !\n", lpModuleName);
return 0;
}
......@@ -192,7 +206,7 @@ HANDLE LoadLibrary(LPSTR libname)
lpNewMod->FileName = (LPSTR) malloc(strlen(libname));
if (lpNewMod->FileName != NULL)
strcpy(lpNewMod->FileName, libname);
lpNewMod->hInst = LoadImage(libname, DLL);
lpNewMod->hInst = LoadImage(libname, DLL, 0);
lpNewMod->Count = 1;
printf("LoadLibrary returned Library hInst=%04X\n", lpNewMod->hInst);
GlobalUnlock(hModule);
......@@ -315,7 +329,7 @@ FARPROC GetProcAddress(HANDLE hModule, char *proc_name)
break;
}
cpnt += len + 2;
};
}
if (ordinal == 0)
{
printf("GetProcAddress // function '%s' not found !\n", proc_name);
......
......@@ -60,9 +60,12 @@ SEGDESC Segments[MAX_SELECTORS];
extern void KERNEL_Ordinal_102();
extern void UNIXLIB_Ordinal_0();
extern char *WIN_ProgramName;
extern char WindowsPath[256];
extern char **Argv;
extern int Argc;
extern char **environ;
/**********************************************************************
* FindUnusedSelectors
......@@ -709,7 +712,9 @@ LPSTR GetDOSEnvironment(void)
static SEGDESC *
CreateEnvironment(void)
{
char **e;
char *p;
unsigned short *w;
SEGDESC * s;
s = CreateNewSegments(0, 0, PAGE_SIZE, 1);
......@@ -717,15 +722,36 @@ CreateEnvironment(void)
return NULL;
/*
* Fill environment with meaningless babble.
* Fill environment with Windows path, the Unix environment,
* and program name.
*/
p = (char *) s->base_addr;
strcpy(p, "PATH=C:\\WINDOWS");
strcpy(p, "PATH=");
strcat(p, WindowsPath);
p += strlen(p) + 1;
for (e = environ; *e; e++)
{
if (strncasecmp(*e, "path", 4))
{
strcpy(p, *e);
p += strlen(p) + 1;
}
}
*p++ = '\0';
*p++ = 11;
*p++ = 0;
strcpy(p, "C:\\TEST.EXE");
w = (unsigned short *) p;
*w = strlen(WIN_ProgramName);
strcpy(p + 2, WIN_ProgramName);
/*
* Display environment
*/
fprintf(stderr, "Environment at %08.8x\n", s->base_addr);
for (p = s->base_addr; *p; p += strlen(p) + 1)
fprintf(stderr, " %s\n", p);
p += 3;
fprintf(stderr, " Program: %s\n", p);
return s;
}
......@@ -769,12 +795,13 @@ CreatePSP(void)
strlen(Argv[i]) > 124)
break;
if (i != 1)
*p1++ = ' ';
for (p2 = Argv[i]; *p2 != '\0'; )
*p1++ = *p2++;
*p1++ = ' ';
}
*p1++ = '\r';
*p1 = '\0';
psp->pspCommandTailCount = strlen(psp->pspCommandTail);
......@@ -903,7 +930,8 @@ CreateSelectors(struct w_files * wpnt)
Segments[s->selector >> 3].owner = auto_data_sel;
if (s->selector == auto_data_sel)
HEAP_LocalInit(auto_data_sel, s->base_addr + saved_old_length,
ne_header->local_heap_length);
0x10000 - 2 - saved_old_length
- ne_header->stack_length);
}
if(!EnvironmentSelector) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment