mirror of
https://github.com/reactos/wine.git
synced 2025-01-19 10:13:01 +00:00
Release 941210
Wed Dec 7 14:52:25 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [controls/listbox.c] Fixed problems due to new scroll-bar code. * [loader/signal.c] [miscemu/ioports.c] Handle I/O opcodes that use an absolute address. * [objects/text.c] Implemented TabbedTextOut(). Sat Dec 3 18:53:08 1994 Kenneth MacDonald <K.MacDonald@ed.ac.uk> * [objects/metafile.c] Implemented GetMetafile(). Fixed bug in PlayMetaFile() when reading disc based metafile records. Added META_POLYPOLYGON, META_DELETEOBJECT and META_EOF to PlayMetaFileRecord(). Wed Nov 30 06:32:25 1994 Martin von Loewis (martin@cs.csufresno.edu) * [Imakefile] wine.sym: Remove gcc2_compiled and friends * [controls/listbox.c][if1632/relay.c][if1632/relay.c] [loader/resource.c][memory/heap.c][objects/dib.c][windows/dialog.c] Replace #ifdef DEBUG_XXX with if(debugging_xxx){ * [if1632/call.S] CallToLibMain: New function * [if1632/relay.c][include/options.h][misc/main.c] [miscemu/int1a.c][miscemu/int21.c][miscemu/kernel.c] removed Options.relay_debug * [include/heap.h] HEAP_OWNER: Use ds instead of cs:ip * [loader/ne_image.c] LoadNEImage: Remember current exe, handle nodata dlls InitNEDLL: handle nodata dlls, call CallToLibMain * [loader/selector.c] CreateSelectors: Initialize auto_data_sel with 0 * [memory/heap.c] HEAP_CheckHeap: Check prev HEAP_CheckLocalHeaps: new function * [misc/profile] Remember and dump only changed profiles * [tools/makedebug] Introduce debugging_xxx flags Sun Nov 27 23:13:22 MET 1994 <erik@xs4all.nl> * [clipboard.h color.h dc.h dos_fs.h event.h font.h graphics.h if1632.h kernel.h library.h miscemu.h ne_image.h nonclient.h pe_image.h selectors.h wintypes.h] Added. * [*/*] - Commented all 'static char copyright statements', see misc/main.c - moved prototypes to headers files, fixed wrong prototypes. - *please* add a header file for each .c if you need to export things. * [misc/main.c] Added one static string which list the names of the contributors. Fri Nov 25 16:24:27 MET 1994 Dag Asheim (dash@ifi.uio.no) * [Configure] Made the support for multiple languages more automatic. Added a [fonts] section to the wine.conf file. Made the defaults better. Generally cleaned it up. * [rc/sysres_No.rc] [rc/sysres_De.rc] [rc/sysres.c] Norwegian resources and small fixes to the german resources. Wed Nov 23 20:28:59 1994 Martin von Loewis (martin@cs.csufresno.edu) * [debugger/break.c] bark(), toggle_next(), should_continue(): New functions insert_break(): Fixed, adds write access to page before writing wine_bp.next_addr: new structure field * [debugger/dbg.y] Changed symbol's value to be it's value instead of the value pointed to by the symbol. Changed SIGTRAP handling to allow continuation after break point * [misc/shell.c] ShellAbout(): Load resource from memory
This commit is contained in:
parent
ecc3712ddf
commit
234bc24db1
97
ChangeLog
97
ChangeLog
@ -1,3 +1,100 @@
|
||||
----------------------------------------------------------------------
|
||||
Wed Dec 7 14:52:25 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
|
||||
|
||||
* [controls/listbox.c]
|
||||
Fixed problems due to new scroll-bar code.
|
||||
|
||||
* [loader/signal.c] [miscemu/ioports.c]
|
||||
Handle I/O opcodes that use an absolute address.
|
||||
|
||||
* [objects/text.c]
|
||||
Implemented TabbedTextOut().
|
||||
|
||||
Sat Dec 3 18:53:08 1994 Kenneth MacDonald <K.MacDonald@ed.ac.uk>
|
||||
|
||||
* [objects/metafile.c]
|
||||
Implemented GetMetafile().
|
||||
Fixed bug in PlayMetaFile() when reading disc based metafile records.
|
||||
Added META_POLYPOLYGON, META_DELETEOBJECT and META_EOF to
|
||||
PlayMetaFileRecord().
|
||||
|
||||
Wed Nov 30 06:32:25 1994 Martin von Loewis (martin@cs.csufresno.edu)
|
||||
|
||||
* [Imakefile]
|
||||
wine.sym: Remove gcc2_compiled and friends
|
||||
|
||||
* [controls/listbox.c][if1632/relay.c][if1632/relay.c]
|
||||
[loader/resource.c][memory/heap.c][objects/dib.c][windows/dialog.c]
|
||||
Replace #ifdef DEBUG_XXX with if(debugging_xxx){
|
||||
|
||||
* [if1632/call.S]
|
||||
CallToLibMain: New function
|
||||
|
||||
* [if1632/relay.c][include/options.h][misc/main.c]
|
||||
[miscemu/int1a.c][miscemu/int21.c][miscemu/kernel.c]
|
||||
removed Options.relay_debug
|
||||
|
||||
* [include/heap.h]
|
||||
HEAP_OWNER: Use ds instead of cs:ip
|
||||
|
||||
* [loader/ne_image.c]
|
||||
LoadNEImage: Remember current exe, handle nodata dlls
|
||||
InitNEDLL: handle nodata dlls, call CallToLibMain
|
||||
|
||||
* [loader/selector.c]
|
||||
CreateSelectors: Initialize auto_data_sel with 0
|
||||
|
||||
* [memory/heap.c]
|
||||
HEAP_CheckHeap: Check prev
|
||||
HEAP_CheckLocalHeaps: new function
|
||||
|
||||
* [misc/profile]
|
||||
Remember and dump only changed profiles
|
||||
|
||||
* [tools/makedebug]
|
||||
Introduce debugging_xxx flags
|
||||
|
||||
Sun Nov 27 23:13:22 MET 1994 <erik@xs4all.nl>
|
||||
|
||||
* [clipboard.h color.h dc.h dos_fs.h event.h font.h graphics.h
|
||||
if1632.h kernel.h library.h miscemu.h ne_image.h nonclient.h
|
||||
pe_image.h selectors.h wintypes.h]
|
||||
Added.
|
||||
|
||||
* [*/*]
|
||||
- Commented all 'static char copyright statements', see misc/main.c
|
||||
- moved prototypes to headers files, fixed wrong prototypes.
|
||||
- *please* add a header file for each .c if you need to export
|
||||
things.
|
||||
|
||||
* [misc/main.c]
|
||||
Added one static string which list the names of the contributors.
|
||||
|
||||
Fri Nov 25 16:24:27 MET 1994 Dag Asheim (dash@ifi.uio.no)
|
||||
|
||||
* [Configure]
|
||||
Made the support for multiple languages more automatic. Added
|
||||
a [fonts] section to the wine.conf file. Made the defaults
|
||||
better. Generally cleaned it up.
|
||||
|
||||
* [rc/sysres_No.rc] [rc/sysres_De.rc] [rc/sysres.c]
|
||||
Norwegian resources and small fixes to the german resources.
|
||||
|
||||
Wed Nov 23 20:28:59 1994 Martin von Loewis (martin@cs.csufresno.edu)
|
||||
|
||||
* [debugger/break.c]
|
||||
bark(), toggle_next(), should_continue(): New functions
|
||||
insert_break(): Fixed, adds write access to page before writing
|
||||
wine_bp.next_addr: new structure field
|
||||
|
||||
* [debugger/dbg.y]
|
||||
Changed symbol's value to be it's value instead of the value
|
||||
pointed to by the symbol.
|
||||
Changed SIGTRAP handling to allow continuation after break point
|
||||
|
||||
* [misc/shell.c]
|
||||
ShellAbout(): Load resource from memory
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
|
||||
|
||||
|
129
Configure
129
Configure
@ -5,9 +5,14 @@
|
||||
: ${EDITOR:=vi}
|
||||
: ${PAGER:=more}
|
||||
|
||||
WINELIB=''
|
||||
SHORTNAMES=''
|
||||
XPM=''
|
||||
LANG=not_matching
|
||||
NEWBUILD=''
|
||||
ALLDEFINES=''
|
||||
|
||||
# Ask question 'str' and sets 'var' reply (defaulting to 'def' on CR)
|
||||
# Ask question 'str' and set 'var' to reply (defaulting to 'def' on CR)
|
||||
prompt ()
|
||||
{
|
||||
str="$1"
|
||||
@ -30,29 +35,6 @@ if [ "$input" = 'l' -o "$input" = 'L' ]
|
||||
then
|
||||
WINELIB='#define WINELIB -DWINELIB'
|
||||
ALLDEFINES="$ALLDEFINES -DWINELIB"
|
||||
else
|
||||
WINELIB=''
|
||||
|
||||
# Commented out until the processor emulator starts to work.
|
||||
#
|
||||
# echo
|
||||
# echo -n 'Use processor emulator (*DOES*NOT*WORK*YET*) (Y/N) [N]? '
|
||||
# read input
|
||||
# if [ "$input" = 'y' -o "$input" = 'Y' ]
|
||||
# then
|
||||
# PROCEMU='#define PROCEMU'
|
||||
# ALLDEFINES="$ALLDEFINES -DPROCEMU"
|
||||
# echo
|
||||
# echo -n 'bochs directory [/usr/src/bochs]? '
|
||||
# read input
|
||||
# if [ "$input" = '' ]
|
||||
# then
|
||||
# ALLDEFINES="$ALLDEFINES -DPROC_EMU_DIR=/usr/src/bochs"
|
||||
# else
|
||||
# ALLDEFINES="$ALLDEFINES -DPROC_EMU_DIR="$input
|
||||
# fi
|
||||
# fi
|
||||
|
||||
fi
|
||||
|
||||
echo
|
||||
@ -62,8 +44,6 @@ if [ "$input" = 'y' -o "$input" = 'Y' ]
|
||||
then
|
||||
SHORTNAMES='#define ShortNames -DSHORTNAMES'
|
||||
ALLDEFINES="$ALLDEFINES -DSHORTNAMES"
|
||||
else
|
||||
SHORTNAMES=''
|
||||
fi
|
||||
|
||||
echo
|
||||
@ -73,14 +53,33 @@ if [ "$input" = 'y' -o "$input" = 'Y' ]
|
||||
then
|
||||
XPM='#define USE_XPM'
|
||||
ALLDEFINES="$ALLDEFINES -DUSE_XPM"
|
||||
else
|
||||
XPM=''
|
||||
fi
|
||||
|
||||
LANGS=`echo En rc/sysres_*.rc | sed -e 's/rc\/sysres_//g' -e 's/\.rc//g' -e 's/ /\//g;'`
|
||||
while expr "$LANGS" : ".*$LANG" == 0 > /dev/null
|
||||
do
|
||||
prompt "Language ($LANGS)" LANG En
|
||||
if expr "$LANGS" : ".*$LANG" == 0 > /dev/null
|
||||
then
|
||||
echo "\"$LANG\" is not a supported language."
|
||||
fi
|
||||
done
|
||||
ALLDEFINES="$ALLDEFINES -ALANG\($LANG\)"
|
||||
|
||||
if [ "`(domainname)`" = 'amscons.com' ]
|
||||
then
|
||||
echo
|
||||
echo -n 'New build program (Y/N) [N]? '
|
||||
read input
|
||||
if [ "$input" = 'y' -o "$input" = 'Y' ]
|
||||
then
|
||||
NEWBUILD='#define NewBuild -DNEWBUILD'
|
||||
ALLDEFINES="$ALLDEFINES -DNEWBUILD"
|
||||
fi
|
||||
fi
|
||||
|
||||
prompt "Global configfile name" WINE_CONFIGFILE /usr/local/etc/wine.conf
|
||||
|
||||
WINE_INI_GLOBAL='#define WINE_INI_GLOBAL "'$WINE_CONFIGFILE'"'
|
||||
|
||||
if [ -r $WINE_CONFIGFILE ]
|
||||
then
|
||||
DEFAULT_ANS=N
|
||||
@ -108,18 +107,22 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
case `awk 'BEGIN {s=0} {if ($3=="msdos") s++} END {print s}' /etc/fstab` in
|
||||
0) CF_C=/c;;
|
||||
1) CF_C=`awk '{if ($3=="msdos") print $2}' /etc/fstab`;;
|
||||
*) CF_C=`awk '{if ($3=="msdos") {print $2;exit}}' /etc/fstab`;;
|
||||
esac
|
||||
|
||||
prompt "Which directory do you want to use as A:" CF_A /a
|
||||
CF_A=`mount | awk '/^\/dev\/fd/ {print $3;exit} END {print "/a"}'`
|
||||
prompt "Which directory do you want to use as A:" CF_A $CF_A
|
||||
CF_C=`awk '{if ($3=="msdos") {print $2;exit}} END {print "/c"}' /etc/fstab`
|
||||
prompt "Which directory do you want to use as C:" CF_C $CF_C
|
||||
prompt "Where is the Windows directory" CF_Windows 'c:\windows'
|
||||
prompt "Where is the System directory" CF_System 'c:\windows\system'
|
||||
prompt "Where should Windows apps store temp files" CF_Temp 'c:\temp'
|
||||
prompt "Which path should be used to find executables and DLL's" CF_Path 'c:\windows;c:\windows\system'
|
||||
if [ -r "$CF_C/autoexec.bat" ]
|
||||
then
|
||||
CF_Temp=`tr A-Z a-z < "$CF_C/autoexec.batX" | sed -n 's/^ *set *temp= *\(c:.*[a-z]\).*/\1/p'`
|
||||
fi
|
||||
if [ -z "$CF_Temp" ]
|
||||
then
|
||||
CF_Temp='c:\temp'
|
||||
fi
|
||||
prompt "Where should Windows apps store temp files" CF_Temp $CF_Temp
|
||||
prompt "Which path should be used to find progs/DLL's" CF_Path "$CF_Windows;$CF_System"
|
||||
prompt "Where is sysres.dll" CF_SystemResources `pwd`/sysres.dll
|
||||
prompt "Where is COM1" CF_Com1 '/dev/cua0'
|
||||
prompt "Where is COM2" CF_Com2 '/dev/cua1'
|
||||
@ -135,9 +138,7 @@ Here is the list of messages:\
|
||||
|
||||
prompt "Exclude which messages from the log" CF_Exclude 'WM_SIZE;WM_TIMER'
|
||||
|
||||
echo
|
||||
echo "The config file $WINE_CONFIGFILE now looks like this:"
|
||||
tee $WINE_CONFIGFILE << EOF
|
||||
cat > $WINE_CONFIGFILE << EOF
|
||||
[drives]
|
||||
A=$CF_A
|
||||
C=$CF_C
|
||||
@ -149,6 +150,16 @@ Temp=$CF_Temp
|
||||
Path=$CF_Path
|
||||
SystemResources=$CF_SystemResources
|
||||
|
||||
[fonts]
|
||||
system=*-helvetica
|
||||
mssansserif=*-helvetica
|
||||
msserif=*-times
|
||||
fixedsys=*-fixed
|
||||
arial=*-helvetica
|
||||
helv=*-helvetica
|
||||
roman=*-times
|
||||
default=*-*
|
||||
|
||||
[serialports]
|
||||
Com1=$CF_Com1
|
||||
Com2=$CF_Com2
|
||||
@ -161,6 +172,12 @@ File=$CF_File
|
||||
Exclude=$CF_Exclude
|
||||
EOF
|
||||
|
||||
echo
|
||||
sed '1 i\
|
||||
The config file '"$WINE_CONFIGFILE"' now looks like this:\
|
||||
\
|
||||
' < $WINE_CONFIGFILE | $PAGER
|
||||
|
||||
echo
|
||||
echo -n "Do you want to edit it using $EDITOR (Y/N) [N]? "
|
||||
read input
|
||||
@ -175,23 +192,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
prompt "Language (En/De)" LANG En
|
||||
ALLDEFINES="$ALLDEFINES -ALANG\($LANG\)"
|
||||
|
||||
NEWBUILD=''
|
||||
if [ "`(domainname)`" = 'amscons.com' ]
|
||||
then
|
||||
echo
|
||||
echo -n 'New build program (Y/N) [N]? '
|
||||
read input
|
||||
if [ "$input" = 'y' -o "$input" = 'Y' ]
|
||||
then
|
||||
NEWBUILD='#define NewBuild -DNEWBUILD'
|
||||
ALLDEFINES="$ALLDEFINES -DNEWBUILD"
|
||||
fi
|
||||
fi
|
||||
|
||||
NEWLINUXLDT=''
|
||||
if grep -s seg_not_present /usr/include/linux/ldt.h 2> /dev/null
|
||||
then
|
||||
ALLDEFINES="$ALLDEFINES -DNEW_LDT_STRUCT"
|
||||
@ -203,12 +203,12 @@ $WINELIB
|
||||
$SHORTNAMES
|
||||
$XPM
|
||||
$NEWBUILD
|
||||
$WINE_INI_GLOBAL
|
||||
$ENDIAN
|
||||
$PROCEMUDIR
|
||||
#define WINE_INI_GLOBAL "$WINE_CONFIGFILE"
|
||||
#define AutoDefines $ALLDEFINES
|
||||
EOF
|
||||
|
||||
echo
|
||||
echo "Creating Makefiles. This may take a while."
|
||||
xmkmf -a
|
||||
|
||||
if [ 0 -lt `find . -name "*.rej" -print | wc -l` ]
|
||||
@ -223,5 +223,8 @@ List of "*.rej" files:
|
||||
|
||||
EOF
|
||||
find . -name "*.rej" -print
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Configure finished. Do 'make' to compile Wine."
|
||||
|
@ -107,6 +107,19 @@ a specific type of message in just one c-source-file, put the corresponding
|
||||
#define DEBUG_XXXX or #undefine DEBUG_XXXX between #include<stddebug.h> and
|
||||
#include <debug.h> in that specific file. In addition you can change the
|
||||
types of displayed messages by supplying the "-debugmsg" option to Wine.
|
||||
If your debugging code is more complex than just printf, you can use the
|
||||
symbols debugging_XXX as well. These are true when XXX is enabled, either
|
||||
permanent or in the command line. So instead of writing
|
||||
|
||||
#ifdef DEBUG_WIN
|
||||
DumpSomeStructure(&str);
|
||||
#endif
|
||||
|
||||
write
|
||||
if(debugging_win)DumpSomeStructure(&str);
|
||||
Don't worry about the inefficiency of the test. If it is permanently
|
||||
disabled (thus debugging_win is 0 at compile time), the compiler will
|
||||
eliminate the dead code.
|
||||
|
||||
The file handle "stddeb" is intended for displaying standard informational
|
||||
messages, whereas "stdnimp" is intended for displaying messages concerning
|
||||
|
@ -106,7 +106,7 @@ NormalLibraryTarget(wine,$(LIBOBJS) $(COMMONOBJS))
|
||||
#endif
|
||||
|
||||
wine.sym: wine
|
||||
nm wine|sort >wine.sym
|
||||
nm wine|grep -v _compiled|sort >wine.sym
|
||||
|
||||
clean::
|
||||
$(RM) wine.sym
|
||||
|
@ -3,23 +3,17 @@
|
||||
* Copyright (C) 1993 Johannes Ruscheinski
|
||||
* Copyright (C) 1993 David Metcalfe
|
||||
* Copyright (C) 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright1[] = "Copyright Johannes Ruscheinski, 1993";
|
||||
static char Copyright2[] = "Copyright David Metcalfe, 1993";
|
||||
static char Copyright3[] = "Copyright Alexandre Julliard, 1994";
|
||||
*/
|
||||
|
||||
#include "button.h"
|
||||
#include "win.h"
|
||||
#include "user.h"
|
||||
#include "syscolor.h"
|
||||
|
||||
|
||||
/* windows/graphics.c */
|
||||
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 );
|
||||
#include "graphics.h"
|
||||
#include "button.h"
|
||||
|
||||
extern void DEFWND_SetText( HWND hwnd, LPSTR text ); /* windows/defwnd.c */
|
||||
|
||||
|
@ -3,9 +3,8 @@
|
||||
*
|
||||
* Copyright Martin Ayotte, 1993
|
||||
*
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -20,15 +19,8 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_COMBO */
|
||||
/* #undef DEBUG_COMBO */
|
||||
#include "debug.h"
|
||||
|
||||
/* windows/graphics.c */
|
||||
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 );
|
||||
|
||||
#include "graphics.h"
|
||||
|
||||
HBITMAP hComboBit = 0;
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
* Desktop window class.
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
@ -13,11 +13,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
#include <unistd.h>
|
||||
#include "win.h"
|
||||
#include "desktop.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
extern BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
||||
int xsrc, int ysrc, int width, int height,
|
||||
int rop ); /* graphics.c */
|
||||
#include "dos_fs.h"
|
||||
#include "graphics.h"
|
||||
|
||||
/***********************************************************************
|
||||
* DESKTOP_LoadBitmap
|
||||
@ -35,7 +32,7 @@ static HBITMAP DESKTOP_LoadBitmap( HDC hdc, char *filename )
|
||||
|
||||
/* Read all the file into memory */
|
||||
|
||||
if (!(unixFileName = GetUnixFileName( filename ))) return 0;
|
||||
if (!(unixFileName = DOS_GetUnixFileName( filename ))) return 0;
|
||||
if ((file = open( unixFileName, O_RDONLY )) == -1) return 0;
|
||||
size = lseek( file, 0, SEEK_END );
|
||||
if (!(buffer = (char *)malloc( size )))
|
||||
@ -151,7 +148,7 @@ LONG DesktopWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
/***********************************************************************
|
||||
* SetDeskPattern (USER.279)
|
||||
*/
|
||||
BOOL SetDeskPattern()
|
||||
BOOL SetDeskPattern(void)
|
||||
{
|
||||
char buffer[100];
|
||||
GetProfileString( "desktop", "Pattern", "(None)", buffer, 100 );
|
||||
|
@ -4,9 +4,9 @@
|
||||
* Copyright David W. Metcalfe, 1994
|
||||
*
|
||||
* Release 3, July 1994
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright David W. Metcalfe, 1994";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -3,10 +3,8 @@
|
||||
*
|
||||
* Copyright Martin Ayotte, 1993
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -17,12 +15,9 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "msdos.h"
|
||||
#include "wine.h"
|
||||
#include "listbox.h"
|
||||
#include "prototypes.h"
|
||||
#include "dos_fs.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_LISTBOX */
|
||||
/* #undef DEBUG_LISTBOX */
|
||||
#include "debug.h"
|
||||
|
||||
#define GMEM_ZEROINIT 0x0040
|
||||
@ -91,14 +86,8 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
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, ListMaxFirstVisible(lphl), TRUE);
|
||||
ShowScrollBar(hwnd, SB_VERT, FALSE);
|
||||
}
|
||||
if (wndPtr->dwStyle & WS_HSCROLL) {
|
||||
SetScrollRange(hwnd, SB_HORZ, 1, 1, TRUE);
|
||||
ShowScrollBar(hwnd, SB_HORZ, FALSE);
|
||||
}
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl), TRUE);
|
||||
SetScrollRange(hwnd, SB_HORZ, 1, 1, TRUE);
|
||||
if ((wndPtr->dwStyle & LBS_OWNERDRAWFIXED) == LBS_OWNERDRAWFIXED) {
|
||||
}
|
||||
return 0;
|
||||
@ -242,7 +231,6 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
if (y < 4) {
|
||||
if (lphl->FirstVisible > 1) {
|
||||
lphl->FirstVisible--;
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
UpdateWindow(hwnd);
|
||||
@ -253,7 +241,6 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
if (y > (rect.bottom - 4)) {
|
||||
if (lphl->FirstVisible < ListMaxFirstVisible(lphl)) {
|
||||
lphl->FirstVisible++;
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
UpdateWindow(hwnd);
|
||||
@ -287,12 +274,12 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
hWndCtl = GetNextDlgTabItem(lphl->hWndLogicParent,
|
||||
hwnd, !(GetKeyState(VK_SHIFT) < 0));
|
||||
SetFocus(hWndCtl);
|
||||
#ifdef DEBUG_LISTBOX
|
||||
if(debugging_listbox){
|
||||
if ((GetKeyState(VK_SHIFT) < 0))
|
||||
dprintf_listbox(stddeb,"ListBox PreviousDlgTabItem %04X !\n", hWndCtl);
|
||||
else
|
||||
dprintf_listbox(stddeb,"ListBox NextDlgTabItem %04X !\n", hWndCtl);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case VK_HOME:
|
||||
lphl->ItemFocused = 0;
|
||||
@ -342,8 +329,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
SendMessage(lphl->hWndLogicParent, WM_COMMAND,
|
||||
wndPtr->wIDmenu, MAKELONG(hwnd, LBN_SELCHANGE));
|
||||
}
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
UpdateWindow(hwnd);
|
||||
break;
|
||||
@ -357,9 +343,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
if (wParam == 0) break;
|
||||
break;
|
||||
case WM_SETREDRAW:
|
||||
#ifdef DEBUG_LISTBOX
|
||||
printf("ListBox WM_SETREDRAW hWnd=%04X w=%04X !\n", hwnd, wParam);
|
||||
#endif
|
||||
dprintf_listbox(stddeb,"ListBox WM_SETREDRAW hWnd=%04X w=%04X !\n", hwnd, wParam);
|
||||
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
|
||||
if (lphl == NULL) return 0;
|
||||
lphl->bRedrawFlag = wParam;
|
||||
@ -489,9 +473,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
wParam);
|
||||
lphl = ListBoxGetStorageHeader(hwnd);
|
||||
lphl->FirstVisible = wParam;
|
||||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
UpdateWindow(hwnd);
|
||||
break;
|
||||
@ -553,10 +535,6 @@ void StdDrawListBox(HWND hwnd)
|
||||
MAKELONG(hwnd, CTLCOLOR_LISTBOX));
|
||||
if (hBrush == (HBRUSH)NULL) hBrush = GetStockObject(WHITE_BRUSH);
|
||||
GetClientRect(hwnd, &rect);
|
||||
/*
|
||||
if (wndPtr->dwStyle & WS_VSCROLL) rect.right -= 16;
|
||||
if (wndPtr->dwStyle & WS_HSCROLL) rect.bottom -= 16;
|
||||
*/
|
||||
FillRect(hdc, &rect, hBrush);
|
||||
maxwidth = rect.right;
|
||||
rect.right = lphl->ColumnsWidth;
|
||||
@ -608,13 +586,6 @@ void StdDrawListBox(HWND hwnd)
|
||||
}
|
||||
EndOfPaint:
|
||||
EndPaint( hwnd, &ps );
|
||||
if ((lphl->ItemsCount > lphl->ItemsVisible) &
|
||||
(wndPtr->dwStyle & WS_VSCROLL)) {
|
||||
/*
|
||||
InvalidateRect(wndPtr->hWndVScroll, NULL, TRUE);
|
||||
UpdateWindow(wndPtr->hWndVScroll);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -644,8 +615,6 @@ void OwnerDrawListBox(HWND hwnd)
|
||||
MAKELONG(hwnd, CTLCOLOR_LISTBOX));
|
||||
if (hBrush == (HBRUSH)NULL) hBrush = GetStockObject(WHITE_BRUSH);
|
||||
GetClientRect(hwnd, &rect);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL) rect.right -= 16;
|
||||
if (wndPtr->dwStyle & WS_HSCROLL) rect.bottom -= 16;
|
||||
FillRect(hdc, &rect, hBrush);
|
||||
maxwidth = rect.right;
|
||||
rect.right = lphl->ColumnsWidth;
|
||||
@ -704,14 +673,6 @@ void OwnerDrawListBox(HWND hwnd)
|
||||
}
|
||||
EndOfPaint:
|
||||
EndPaint( hwnd, &ps );
|
||||
if ((lphl->ItemsCount > lphl->ItemsVisible) &
|
||||
(wndPtr->dwStyle & WS_VSCROLL)) {
|
||||
/*
|
||||
InvalidateRect(wndPtr->hWndVScroll, NULL, TRUE);
|
||||
UpdateWindow(wndPtr->hWndVScroll);
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -729,8 +690,6 @@ int ListBoxFindMouse(HWND hwnd, int X, int Y)
|
||||
lpls = lphl->lpFirst;
|
||||
if (lpls == NULL) return LB_ERR;
|
||||
GetClientRect(hwnd, &rect);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL) rect.right -= 16;
|
||||
if (wndPtr->dwStyle & WS_HSCROLL) rect.bottom -= 16;
|
||||
h = w2 = 0;
|
||||
w = lphl->ColumnsWidth;
|
||||
for(i = 1; i <= lphl->ItemsCount; i++) {
|
||||
@ -882,18 +841,12 @@ int ListBoxInsertString(HWND hwnd, UINT uIndex, LPSTR newstr)
|
||||
if (((wndPtr->dwStyle & LBS_OWNERDRAWVARIABLE) == LBS_OWNERDRAWVARIABLE) ||
|
||||
((wndPtr->dwStyle & LBS_OWNERDRAWFIXED) == LBS_OWNERDRAWFIXED))
|
||||
ListBoxAskMeasure(wndPtr, lphl, lplsnew);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl),
|
||||
(lphl->FirstVisible != 1 && lphl->bRedrawFlag));
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl),
|
||||
(lphl->FirstVisible != 1 && lphl->bRedrawFlag));
|
||||
if (lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_HORZ, 1, lphl->ItemsVisible /
|
||||
lphl->ItemsPerColumn + 1,
|
||||
(lphl->FirstVisible != 1 && lphl->bRedrawFlag));
|
||||
if (((lphl->ItemsCount - lphl->FirstVisible) == lphl->ItemsVisible) &&
|
||||
(lphl->ItemsVisible != 0)) {
|
||||
if (wndPtr->dwStyle & WS_VSCROLL) ShowScrollBar(hwnd, SB_VERT, TRUE);
|
||||
if (wndPtr->dwStyle & WS_HSCROLL) ShowScrollBar(hwnd, SB_HORZ, TRUE);
|
||||
}
|
||||
if ((lphl->FirstVisible <= uIndex) &&
|
||||
((lphl->FirstVisible + lphl->ItemsVisible) >= uIndex)) {
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
@ -977,17 +930,10 @@ int ListBoxDeleteString(HWND hwnd, UINT uIndex)
|
||||
lphl->ItemsCount--;
|
||||
if (lpls->hData != 0) LIST_HEAP_FREE(lphl, lpls->hData);
|
||||
if (lpls->hMem != 0) LIST_HEAP_FREE(lphl, lpls->hMem);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl), TRUE);
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl), TRUE);
|
||||
if (lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_HORZ, 1, lphl->ItemsVisible /
|
||||
lphl->ItemsPerColumn + 1, TRUE);
|
||||
if (lphl->ItemsCount < lphl->ItemsVisible) {
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
ShowScrollBar(hwnd, SB_VERT, FALSE);
|
||||
if (wndPtr->dwStyle & WS_HSCROLL)
|
||||
ShowScrollBar(hwnd, SB_HORZ, FALSE);
|
||||
}
|
||||
if ((lphl->FirstVisible <= uIndex) &&
|
||||
((lphl->FirstVisible + lphl->ItemsVisible) >= uIndex)) {
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
@ -1056,15 +1002,10 @@ int ListBoxResetContent(HWND hwnd)
|
||||
if ((wndPtr->dwStyle && LBS_NOTIFY) != 0)
|
||||
SendMessage(lphl->hWndLogicParent, WM_COMMAND,
|
||||
wndPtr->wIDmenu, MAKELONG(hwnd, LBN_SELCHANGE));
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl), TRUE);
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl), TRUE);
|
||||
if (lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_HORZ, 1, lphl->ItemsVisible /
|
||||
lphl->ItemsPerColumn + 1, TRUE);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
ShowScrollBar(hwnd, SB_VERT, FALSE);
|
||||
if (wndPtr->dwStyle & WS_HSCROLL)
|
||||
ShowScrollBar(hwnd, SB_HORZ, FALSE);
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
UpdateWindow(hwnd);
|
||||
return TRUE;
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Menus functions
|
||||
*/
|
||||
static char RCSId[] = "$Id$";
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
static char Copyright2[] = "Copyright Alexandre Julliard, 1994";
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note: the style MF_MOUSESELECT is used to mark popup items that
|
||||
@ -11,7 +11,6 @@ static char Copyright2[] = "Copyright Alexandre Julliard, 1994";
|
||||
* This is probably not the meaning this style has in MS-Windows.
|
||||
*/
|
||||
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -23,14 +22,13 @@ static char Copyright2[] = "Copyright Alexandre Julliard, 1994";
|
||||
#include "menu.h"
|
||||
#include "user.h"
|
||||
#include "win.h"
|
||||
#include "library.h"
|
||||
#include "message.h"
|
||||
#include "graphics.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_MENU */
|
||||
/* #undef DEBUG_MENU */
|
||||
/* #define DEBUG_MENUCALC */
|
||||
/* #undef DEBUG_MENUCALC */
|
||||
/* #define DEBUG_MENUSHORTCUT */
|
||||
/* #undef DEBUG_MENUSHORTCUT */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -60,12 +58,6 @@ static BOOL fEndMenuCalled = FALSE;
|
||||
|
||||
|
||||
extern void NC_DrawSysButton(HWND hwnd, HDC hdc, BOOL down); /* nonclient.c */
|
||||
extern void CURSOR_SetWinCursor( HWND hwnd, HCURSOR hcursor ); /* cursor.c */
|
||||
extern BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
||||
int xsrc, int ysrc, int width, int height,
|
||||
int rop ); /* graphics.c */
|
||||
|
||||
extern HINSTANCE hSysRes;
|
||||
|
||||
static HBITMAP hStdCheck = 0;
|
||||
static HBITMAP hStdMnArrow = 0;
|
||||
|
@ -2,13 +2,12 @@
|
||||
* Interface code to SCROLLBAR widget
|
||||
*
|
||||
* Copyright Martin Ayotte, 1993
|
||||
* Copyright Alexandre Julliard, 1994
|
||||
*
|
||||
* Small fixes and implemented SB_THUMBPOSITION
|
||||
* by Peter Broadhurst, 940611
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
@ -18,10 +17,10 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
#include "sysmetrics.h"
|
||||
#include "scroll.h"
|
||||
#include "user.h"
|
||||
#include "graphics.h"
|
||||
#include "win.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_SCROLL */
|
||||
/* #undef DEBUG_SCROLL */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -48,10 +47,6 @@ static HBITMAP hRgArrowI = 0;
|
||||
(((flags)&ESB_DISABLE_RIGHT) ? hRgArrowI : ((pressed) ? hRgArrowD:hRgArrow))
|
||||
|
||||
|
||||
/* windows/graphics.c */
|
||||
extern void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int highlight_size,
|
||||
int shadow_size, BOOL pressed );
|
||||
|
||||
/* Minimum size of the rectangle between the arrows */
|
||||
#define SCROLL_MIN_RECT 4
|
||||
|
||||
@ -805,7 +800,8 @@ void SetScrollRange(HWND hwnd, int nBar, int MinVal, int MaxVal, BOOL bRedraw)
|
||||
|
||||
if (!(infoPtr = SCROLL_GetScrollInfo( hwnd, nBar ))) return;
|
||||
|
||||
dprintf_scroll( stddeb,"SetScrollRange min=%d max=%d\n", MinVal, MaxVal );
|
||||
dprintf_scroll( stddeb,"SetScrollRange hwnd=%x bar=%d min=%d max=%d\n",
|
||||
hwnd, nBar, MinVal, MaxVal );
|
||||
|
||||
/* Invalid range -> range is set to (0,0) */
|
||||
if ((MinVal > MaxVal) || ((long)MaxVal - MinVal > 32767L))
|
||||
@ -815,8 +811,8 @@ void SetScrollRange(HWND hwnd, int nBar, int MinVal, int MaxVal, BOOL bRedraw)
|
||||
infoPtr->MinVal = MinVal;
|
||||
infoPtr->MaxVal = MaxVal;
|
||||
|
||||
/* Non-client scroll-bar is hidden iff range is (0,0) */
|
||||
if (nBar != SB_CTL) ShowScrollBar( hwnd, nBar, (MinVal || MaxVal) );
|
||||
/* Non-client scroll-bar is hidden if min==max */
|
||||
if (nBar != SB_CTL) ShowScrollBar( hwnd, nBar, (MinVal != MaxVal) );
|
||||
if (bRedraw) SCROLL_RefreshScrollBar( hwnd, nBar );
|
||||
}
|
||||
|
||||
@ -842,7 +838,7 @@ void ShowScrollBar( HWND hwnd, WORD wBar, BOOL fShow )
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if (!wndPtr) return;
|
||||
dprintf_scroll( stddeb, "ShowScrollBar: %x %d %d\n", hwnd, wBar, fShow );
|
||||
dprintf_scroll( stddeb, "ShowScrollBar: hwnd=%x bar=%d on=%d\n", hwnd, wBar, fShow );
|
||||
|
||||
switch(wBar)
|
||||
{
|
||||
|
@ -3,9 +3,8 @@
|
||||
*
|
||||
* Copyright David W. Metcalfe, 1993
|
||||
*
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright David W. Metcalfe, 1993";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
@ -98,10 +97,12 @@ LONG StaticWndProc(HWND hWnd, WORD uMsg, WORD wParam, LONG lParam)
|
||||
return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
|
||||
case WM_CREATE:
|
||||
if (style < 0L || style > LAST_STATIC_TYPE) {
|
||||
if (style < 0L || style > LAST_STATIC_TYPE)
|
||||
{
|
||||
fprintf( stderr, "STATIC: Unknown style 0x%02lx\n", style );
|
||||
lResult = -1L;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* initialise colours */
|
||||
color_windowframe = GetSysColor(COLOR_WINDOWFRAME);
|
||||
color_background = GetSysColor(COLOR_BACKGROUND);
|
||||
@ -116,11 +117,11 @@ LONG StaticWndProc(HWND hWnd, WORD uMsg, WORD wParam, LONG lParam)
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
if (staticPaintFunc[style])
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
BeginPaint( hWnd, &ps );
|
||||
(staticPaintFunc[style])( hWnd, ps.hdc );
|
||||
if (staticPaintFunc[style])
|
||||
(staticPaintFunc[style])( hWnd, ps.hdc );
|
||||
EndPaint( hWnd, &ps );
|
||||
}
|
||||
break;
|
||||
|
@ -2,9 +2,9 @@
|
||||
* Windows widgets (built-in window classes)
|
||||
*
|
||||
* Copyright 1993 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
*/
|
||||
|
||||
#include "win.h"
|
||||
#include "button.h"
|
||||
|
@ -1,11 +1,19 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#ifdef linux
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#define N_BP 25
|
||||
|
||||
extern int dbg_mode;
|
||||
|
||||
struct wine_bp{
|
||||
unsigned long addr;
|
||||
unsigned long next_addr;
|
||||
char in_use;
|
||||
char enabled;
|
||||
unsigned char databyte;
|
||||
@ -13,13 +21,19 @@ struct wine_bp{
|
||||
|
||||
static struct wine_bp wbp[N_BP] = {{0,},};
|
||||
|
||||
void info_break()
|
||||
static int current_bp = -1;
|
||||
static int cont_mode=0; /* 0 - continuous execution
|
||||
1 - advancing after breakpoint
|
||||
2 - single step - not implemented
|
||||
*/
|
||||
|
||||
void info_break(void)
|
||||
{
|
||||
int j;
|
||||
fprintf(stderr,"Breakpoint status\n");
|
||||
for(j=0; j<N_BP; j++)
|
||||
if(wbp[j].in_use)
|
||||
fprintf(stderr,"%d: %c %8.8x\n", j, (wbp[j].enabled ? 'y' : 'n'),
|
||||
fprintf(stderr,"%d: %c %8lx\n", j, (wbp[j].enabled ? 'y' : 'n'),
|
||||
wbp[j].addr);
|
||||
}
|
||||
|
||||
@ -48,11 +62,34 @@ void add_break(unsigned long addr)
|
||||
wbp[j].in_use = 1;
|
||||
wbp[j].enabled = 1;
|
||||
wbp[j].addr = addr;
|
||||
wbp[j].next_addr = 0;
|
||||
return;
|
||||
}
|
||||
fprintf(stderr,"No more breakpoints\n");
|
||||
}
|
||||
|
||||
static void bark()
|
||||
{
|
||||
static int barked=0;
|
||||
if(barked)return;
|
||||
barked=1;
|
||||
perror("Sorry, can't set break point");
|
||||
#ifdef linux
|
||||
{struct utsname buf;
|
||||
uname(&buf);
|
||||
if(strcmp(buf.sysname,"Linux")==0)
|
||||
{ if(strcmp(buf.release,"1.1.62")<0)
|
||||
fprintf(stderr,"Your current Linux release is %s. "
|
||||
"You should upgrade to 1.1.62 or higher\n"
|
||||
"Alternatively, in /usr/src/linux/fs/exec.c,"
|
||||
" change MAP_SHARED to MAP_PRIVATE.\n", buf.release);
|
||||
} else
|
||||
fprintf(stderr,"Why did you compile for Linux, while your system is"
|
||||
" actually %s?\n",buf.sysname);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void insert_break(int flag)
|
||||
{
|
||||
unsigned char * pnt;
|
||||
@ -61,6 +98,20 @@ void insert_break(int flag)
|
||||
for(j=0; j<N_BP; j++)
|
||||
if(wbp[j].enabled)
|
||||
{
|
||||
/* There are a couple of problems with this. On Linux prior to
|
||||
1.1.62, this call fails (ENOACCESS) due to a bug in fs/exec.c.
|
||||
This code is currently not tested at all on BSD.
|
||||
How do I determine the page size in a more symbolic manner?
|
||||
And why does mprotect need that start address of the page
|
||||
in the first place?
|
||||
Not that portability matters, this code is i386 only anyways...
|
||||
How do I get the old protection in order to restore it later on?
|
||||
*/
|
||||
if(mprotect((caddr_t)(wbp[j].addr & (~4095)), 4096,
|
||||
PROT_READ|PROT_WRITE|PROT_EXEC) == -1){
|
||||
bark();
|
||||
return;
|
||||
}
|
||||
pnt = (unsigned char *) wbp[j].addr;
|
||||
if(flag) {
|
||||
wbp[j].databyte = *pnt;
|
||||
@ -68,6 +119,7 @@ void insert_break(int flag)
|
||||
} else {
|
||||
*pnt = wbp[j].databyte;
|
||||
}
|
||||
mprotect((caddr_t)(wbp[j].addr & ~4095), 4096, PROT_READ|PROT_EXEC);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,3 +134,27 @@ int get_bpnum(unsigned int addr)
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void toggle_next(int num)
|
||||
{
|
||||
unsigned int addr;
|
||||
addr=wbp[num].addr;
|
||||
if(wbp[num].next_addr == 0)
|
||||
wbp[num].next_addr=addr+print_insn(addr,addr,stderr,dbg_mode);
|
||||
wbp[num].addr=wbp[num].next_addr;
|
||||
wbp[num].next_addr=addr;
|
||||
}
|
||||
|
||||
int should_continue(int bpnum)
|
||||
{
|
||||
if(bpnum<0)return 0;
|
||||
toggle_next(bpnum);
|
||||
if(bpnum==current_bp){
|
||||
current_bp=-1;
|
||||
cont_mode=0;
|
||||
return 1;
|
||||
}
|
||||
cont_mode=1;
|
||||
current_bp=bpnum;
|
||||
return 0;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ void mode_command(int);
|
||||
%token BACKTRACE
|
||||
%token INFO
|
||||
%token STACK
|
||||
%token SEGMENTS
|
||||
%token REG
|
||||
%token REGS
|
||||
%token NUM
|
||||
@ -83,7 +84,7 @@ x_command:
|
||||
|
||||
print:
|
||||
'p'
|
||||
| print
|
||||
| PRINT
|
||||
|
||||
print_command:
|
||||
print expr '\n' { examine_memory(((unsigned int) &$2 ), 1, 'x'); }
|
||||
@ -107,15 +108,16 @@ print:
|
||||
|
||||
expr: NUM { $$ = $1; }
|
||||
| REG { if(regval) $$ = regval[$1]; else application_not_running();}
|
||||
| symbol { $$ = *((unsigned int *) $1); }
|
||||
| symbol { $$ = $1; }
|
||||
| expr '+' NUM { $$ = $1 + $3; }
|
||||
| expr '-' NUM { $$ = $1 - $3; }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
| '*' expr { $$ = *((unsigned int *) $2); }
|
||||
|
||||
infocmd: INFO REGS { info_reg(); }
|
||||
| INFO STACK { info_stack(); }
|
||||
| INFO BREAK { info_break(); }
|
||||
infocmd: INFO REGS { info_reg(); }
|
||||
| INFO STACK { info_stack(); }
|
||||
| INFO BREAK { info_break(); }
|
||||
| INFO SEGMENTS { print_ldt(); }
|
||||
|
||||
|
||||
%%
|
||||
@ -187,17 +189,21 @@ wine_debug(int signal, int * regs)
|
||||
}
|
||||
|
||||
/* Remove the breakpoints from memory... */
|
||||
fprintf(stderr,"Removing BPs\n");
|
||||
insert_break(0);
|
||||
|
||||
/* If we stopped on a breakpoint, report this fact */
|
||||
if(signal == SIGTRAP)
|
||||
{
|
||||
unsigned int addr;
|
||||
int bpnum;
|
||||
addr = SC_EIP(dbg_mask);
|
||||
if((addr & 0xffff0000) == 0 && dbg_mode == 16)
|
||||
addr |= SC_CS << 16;
|
||||
fprintf(stderr,"Stopped on breakpoint %d\n", get_bpnum(addr));
|
||||
if(should_continue(bpnum=get_bpnum(addr))){
|
||||
insert_break(1);
|
||||
return;
|
||||
}
|
||||
fprintf(stderr,"Stopped on breakpoint %d\n", bpnum);
|
||||
}
|
||||
|
||||
/* Show where we crashed */
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/* Lexical scanner for command line parsing in the Wine debugger
|
||||
*
|
||||
* Version 1.0
|
||||
@ -53,12 +51,12 @@ IDENTIFIER [_a-zA-Z\.~][_a-zA-Z0-9\.~]*
|
||||
"?" { return HELP; }
|
||||
|
||||
"0x"+{HEXDIGIT}+ {
|
||||
sscanf(yytext, "%lx", &yylval);
|
||||
sscanf(yytext, "%x", &yylval);
|
||||
return NUM;
|
||||
}
|
||||
|
||||
{DIGIT}+ {
|
||||
sscanf(yytext, "%ld", &yylval);
|
||||
sscanf(yytext, "%d", &yylval);
|
||||
return NUM;
|
||||
}
|
||||
|
||||
@ -80,7 +78,7 @@ $cs { yylval = RN_CS; return REG;}
|
||||
$ss { yylval = RN_SS; return REG;}
|
||||
|
||||
info|inf|in { return INFO; }
|
||||
|
||||
segments|segm { return SEGMENTS; }
|
||||
break|brea|bre { return BREAK; }
|
||||
enable|enabl|enab|ena { return ENABLE;}
|
||||
disable|disabl|disab|disa|dis { return DISABLE; }
|
||||
@ -183,8 +181,7 @@ dbg_read(char * buf, int size){
|
||||
}
|
||||
|
||||
/* Strip whitespace from the start and end of STRING. */
|
||||
stripwhite (string)
|
||||
char *string;
|
||||
void stripwhite (char *string)
|
||||
{
|
||||
register int i = 0;
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <neexe.h>
|
||||
#include <segmem.h>
|
||||
#include <prototypes.h>
|
||||
#include "selectors.h"
|
||||
#include <wine.h>
|
||||
#include <dlls.h>
|
||||
|
||||
|
@ -202,7 +202,7 @@ void examine_memory(int addr, int count, char format){
|
||||
pnt = (char *) addr;
|
||||
for(i=0; i<count; i++)
|
||||
{
|
||||
fprintf(stderr," %02.2x", (*pnt++) & 0xff);
|
||||
fprintf(stderr," %02x", (*pnt++) & 0xff);
|
||||
if ((i % 32) == 7) {
|
||||
fprintf(stderr,"\n");
|
||||
print_address((unsigned int) pnt, stderr);
|
||||
|
@ -1565,7 +1565,7 @@ OP_E (bytemode)
|
||||
{
|
||||
if (mod == 0 && rm == 6)
|
||||
{
|
||||
sprintf (scratchbuf, "0x%04.4x", get16 ());
|
||||
sprintf (scratchbuf, "0x%04x", get16 ());
|
||||
oappend (scratchbuf);
|
||||
return 0;
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
**
|
||||
** History and file completion functions for editline library.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include "editline.h"
|
||||
|
||||
|
||||
#if defined(NEED_STRDUP)
|
||||
/*
|
||||
** Return an allocated copy of a string.
|
||||
|
@ -163,9 +163,17 @@ A(CallToInit16:)
|
||||
* 10 target cs
|
||||
* 12 target ds
|
||||
* 14 target cx (only CallTo16cx)
|
||||
* 16 target di
|
||||
*/
|
||||
.align 4
|
||||
.globl A(CallTo16), A(CallTo16cx)
|
||||
.globl A(CallTo16), A(CallTo16cx), A(CallToLibMain)
|
||||
A(CallToLibMain:)
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
movw 16(%ebp),%di
|
||||
movw 0,%si
|
||||
movw 0,%es
|
||||
jmp L1
|
||||
A(CallTo16:)
|
||||
A(CallTo16cx:)
|
||||
pushl %ebp
|
||||
@ -174,7 +182,7 @@ A(CallTo16cx:)
|
||||
/*
|
||||
* Get target address and new ds
|
||||
*/
|
||||
movl 8(%ebp),%eax
|
||||
L1: movl 8(%ebp),%eax
|
||||
movl %eax,jump_target
|
||||
lea jump_target,%edx
|
||||
movw 12(%ebp),%ax
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef WINELIB
|
||||
/*
|
||||
static char RCSId[] = "$Id: wine.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -11,10 +13,8 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include <setjmp.h>
|
||||
#include "dlls.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_CALLBACK */
|
||||
/* #undef DEBUG_CALLBACK */
|
||||
#include "debug.h"
|
||||
|
||||
#include "if1632.h"
|
||||
|
||||
extern SEGDESC Segments[];
|
||||
extern unsigned short IF1632_Saved16_ss;
|
||||
@ -188,13 +188,15 @@ LONG CallWindowProc( WNDPROC func, HWND hwnd, WORD message,
|
||||
/* default */
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "wine: Unknown wine callback %08x\n", func);
|
||||
fprintf(stderr, "wine: Unknown wine callback %08x\n",
|
||||
(unsigned int) func);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else if (IS_16_BIT_ADDRESS(func))
|
||||
{
|
||||
dprintf_callback(stddeb, "CallWindowProc // 16bit func=%p !\n", func);
|
||||
dprintf_callback(stddeb, "CallWindowProc // 16bit func=%p !\n",
|
||||
(unsigned int) func);
|
||||
PushOn16( CALLBACK_SIZE_WORD, hwnd );
|
||||
PushOn16( CALLBACK_SIZE_WORD, message );
|
||||
PushOn16( CALLBACK_SIZE_WORD, wParam );
|
||||
@ -204,7 +206,8 @@ LONG CallWindowProc( WNDPROC func, HWND hwnd, WORD message,
|
||||
}
|
||||
else
|
||||
{
|
||||
dprintf_callback(stddeb, "CallWindowProc // 32bit func=%08X !\n", func);
|
||||
dprintf_callback(stddeb, "CallWindowProc // 32bit func=%08X !\n",
|
||||
(unsigned int) func);
|
||||
return (*func)(hwnd, message, wParam, lParam);
|
||||
}
|
||||
}
|
||||
@ -319,11 +322,12 @@ int Catch (LPCATCHBUF cbuf)
|
||||
|
||||
memcpy (stack16, sb -> stack_part, STACK_DEPTH_16);
|
||||
dprintf_catch (stddeb, "Been thrown here: %d, retval = %d\n",
|
||||
sb, retval);
|
||||
(int) sb, (int) retval);
|
||||
free ((void *) sb);
|
||||
return (retval);
|
||||
} else {
|
||||
dprintf_catch (stddeb, "Will somtime get thrown here: %d\n", sb);
|
||||
dprintf_catch (stddeb, "Will somtime get thrown here: %d\n",
|
||||
(int) sb);
|
||||
return (retval);
|
||||
}
|
||||
}
|
||||
@ -331,7 +335,7 @@ int Catch (LPCATCHBUF cbuf)
|
||||
void Throw (LPCATCHBUF cbuf, int val)
|
||||
{
|
||||
sb = *((struct special_buffer **)cbuf);
|
||||
dprintf_catch (stddeb, "Throwing to: %d\n", sb);
|
||||
dprintf_catch (stddeb, "Throwing to: %d\n", (int) sb);
|
||||
longjmp (sb -> buffer, val);
|
||||
}
|
||||
#endif /* !WINELIB */
|
||||
|
@ -129,7 +129,7 @@ length 490
|
||||
#121 pascal Death
|
||||
#122 pascal ReSurRection
|
||||
123 pascal16 PlayMetaFile(word word) PlayMetaFile(1 2)
|
||||
#124 pascal GetMetaFile
|
||||
124 pascal16 GetMetaFile(ptr) GetMetaFile(1)
|
||||
125 pascal16 CreateMetaFile(ptr) CreateMetaFile(1)
|
||||
126 pascal16 CloseMetaFile(word) CloseMetaFile(1)
|
||||
127 pascal16 DeleteMetaFile(word) DeleteMetaFile(1)
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: relay.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -8,21 +10,29 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#ifdef linux
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/head.h>
|
||||
#include <linux/ldt.h>
|
||||
#include <linux/segment.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#include "neexe.h"
|
||||
#include "segmem.h"
|
||||
#include "prototypes.h"
|
||||
#include "dlls.h"
|
||||
#include "options.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_RELAY /* */
|
||||
/* #define DEBUG_STACK /* */
|
||||
#include "debug.h"
|
||||
|
||||
#define DEBUG_RELAY /* */
|
||||
#if 0
|
||||
/* Make make_debug think these were really used */
|
||||
dprintf_relay
|
||||
dprintf_stack
|
||||
#endif
|
||||
|
||||
#ifdef WINELIB
|
||||
#define WineLibSkip(x) 0
|
||||
@ -103,11 +113,9 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
||||
ordinal = func_num & 0xffff;
|
||||
dll_p = &dll_builtin_table[dll_id].dll_table[ordinal];
|
||||
|
||||
#ifdef DEBUG_RELAY
|
||||
if (Options.relay_debug)
|
||||
if (debugging_relay)
|
||||
{
|
||||
unsigned int *ret_addr;
|
||||
unsigned short *stack_p;
|
||||
|
||||
ret_addr = (unsigned int *) ((char *) seg_off + 0x14);
|
||||
printf("Call %s (%s.%d), stack=%04x:%04x, ",
|
||||
@ -119,18 +127,18 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
||||
IF1632_Saved16_esp, IF1632_Saved16_ebp,
|
||||
IF1632_Saved16_ss);
|
||||
|
||||
#ifdef DEBUG_STACK
|
||||
stack_p = (unsigned short *) seg_off;
|
||||
for (i = 0; i < 24; i++, stack_p++)
|
||||
{
|
||||
printf("%04x ", *stack_p);
|
||||
if ((i & 7) == 7)
|
||||
printf("\n");
|
||||
if(debugging_stack)
|
||||
{
|
||||
unsigned short *stack_p = (unsigned short *) seg_off;
|
||||
for (i = 0; i < 24; i++, stack_p++)
|
||||
{
|
||||
printf("%04x ", *stack_p);
|
||||
if ((i & 7) == 7)
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
#endif /* DEBUG_STACK */
|
||||
}
|
||||
#endif /* DEBUG_RELAY */
|
||||
} /* DEBUG_RELAY */
|
||||
|
||||
/*
|
||||
* Make sure we have a handler defined for this call.
|
||||
@ -206,15 +214,13 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
||||
arg_table[12], arg_table[13], arg_table[14],
|
||||
arg_table[15]);
|
||||
|
||||
#ifdef DEBUG_RELAY
|
||||
if (Options.relay_debug)
|
||||
if (debugging_relay)
|
||||
{
|
||||
printf("Returning %08x from %s (%s.%d)\n",
|
||||
ret_val,
|
||||
dll_p->export_name,
|
||||
dll_builtin_table[dll_id].dll_name, ordinal);
|
||||
}
|
||||
#endif
|
||||
|
||||
Stack16Frame = saved_Stack16Frame;
|
||||
return ret_val;
|
||||
|
@ -7,65 +7,61 @@ name winsock
|
||||
id 9
|
||||
length 155
|
||||
|
||||
1 pascal accept(word ptr ptr) Winsock_accept(1 2 3)
|
||||
2 pascal bind(word ptr word) Winsock_bind(1 2 3)
|
||||
3 pascal closesocket(word) Winsock_closesocket(1)
|
||||
4 pascal connect(word ptr word) Winsock_connect(1 2 3)
|
||||
5 pascal getpeername(word ptr ptr) Winsock_getpeername(1 2 3)
|
||||
6 pascal getsockname(word ptr ptr) Winsock_getsockname(1 2 3)
|
||||
7 pascal getsockopt(word word word ptr ptr)
|
||||
Winsock_getsockopt(1 2 3 4 5)
|
||||
8 pascal htonl(long) Winsock_htonl(1)
|
||||
9 pascal htons(word) Winsock_htons(1)
|
||||
10 pascal inet_addr(long) Winsock_inet_addr(1)
|
||||
11 pascal inet_ntoa(long) Winsock_inet_ntoa(1)
|
||||
12 pascal ioctlsocket(word long ptr) Winsock_ioctlsocket(1 2 3)
|
||||
13 pascal listen(word word) Winsock_listen(1 2)
|
||||
14 pascal ntohl(long) Winsock_ntohl(1)
|
||||
15 pascal ntohs(word) Winsock_ntohs(1)
|
||||
16 pascal recv(word ptr word word) Winsock_recv(1 2 3 4)
|
||||
17 pascal recvfrom(word ptr word word ptr ptr)
|
||||
Winsock_recvfrom(1 2 3 4 5 6)
|
||||
18 pascal select(word ptr ptr ptr ptr word)
|
||||
Winsock_select(1 2 3 4 5 6)
|
||||
19 pascal send(word ptr word word) Winsock_send(1 2 3 4)
|
||||
20 pascal sendto(word ptr word word ptr ptr)
|
||||
Winsock_sendto(1 2 3 4 5 6)
|
||||
21 pascal setsockopt(word word word ptr word)
|
||||
Winsock_setsockopt(1 2 3 4 5)
|
||||
22 pascal shutdown(word word) Winsock_shutdown(1 2)
|
||||
23 pascal socket(word word word) Winsock_socket(1 2 3)
|
||||
|
||||
51 pascal gethostbyaddr(ptr word word) Winsock_gethostbyaddr(1 2 3)
|
||||
52 pascal gethostbyname(ptr) Winsock_gethostbyname(1)
|
||||
53 pascal getprotobyname(ptr) Winsock_getprotobyname(1)
|
||||
54 pascal getprotobynumber(word) Winsock_getprotobynumber(1)
|
||||
55 pascal getservbyname(ptr ptr) Winsock_getservbyname(1 2)
|
||||
56 pascal getservbyport(word ptr) Winsock_getservbyport(1 2)
|
||||
57 pascal gethostname(ptr word) Winsock_gethostname(1 2)
|
||||
|
||||
101 pascal WSAAsyncSelect(word word word long)
|
||||
WSAAsyncSelect(1 2 3 4)
|
||||
102 pascal WSAAsyncGetHostByAddr(word word ptr word word ptr word)
|
||||
WSAAsyncGetHostByAddr(1 2 3 4 5 6 7)
|
||||
103 pascal WSAAsyncGetHostByName(word word ptr ptr word)
|
||||
WSAAsyncGetHostByName(1 2 3 4 5)
|
||||
104 pascal WSAAsyncGetProtoByNumber(word word word ptr word)
|
||||
WSAAsyncGetProtoByNumber(1 2 3 4 5)
|
||||
105 pascal WSAAsyncGetProtoByName(word word ptr ptr word)
|
||||
WSAAsyncGetProtoByName(1 2 3 4 5)
|
||||
106 pascal WSAAsyncGetServByPort(word word word ptr ptr word)
|
||||
WSAAsyncGetServByPort(1 2 3 4 5 6)
|
||||
107 pascal WSAAsyncGetServByName(word word ptr ptr ptr word)
|
||||
WSAAsyncGetServByName(1 2 3 4 5 6)
|
||||
108 pascal WSACancelAsyncRequest(word) WSACancelAsyncRequest(1)
|
||||
109 pascal WSASetBlockingHook() WSASetBlockingHook()
|
||||
110 pascal WSAUnhookBlockingHook() WSAUnhookBlockingHook()
|
||||
111 pascal WSAGetLastError() WSAGetLastError()
|
||||
112 pascal WSASetLastError(word) WSASetLastError(1)
|
||||
113 pascal WSACancelBlockingCall() WSACancelBlockingCall()
|
||||
114 pascal WSAIsBlocking() WSAIsBlocking()
|
||||
115 pascal WSAStartup(word ptr) WSAStartup(1 2)
|
||||
116 pascal WSACleanup() WSACleanup()
|
||||
|
||||
151 pascal __WSAFDIsSet(word ptr) WSAFDIsSet(1 2)
|
||||
1 pascal16 accept(word ptr ptr) WINSOCK_accept(1 2 3)
|
||||
2 pascal16 bind(word ptr word) WINSOCK_bind(1 2 3)
|
||||
3 pascal16 closesocket(word) WINSOCK_closesocket(1)
|
||||
4 pascal16 connect(word ptr word) WINSOCK_connect(1 2 3)
|
||||
5 pascal16 getpeername(word ptr ptr) WINSOCK_getpeername(1 2 3)
|
||||
6 pascal16 getsockname(word ptr ptr) WINSOCK_getsockname(1 2 3)
|
||||
7 pascal16 getsockopt(word word word ptr ptr) WINSOCK_getsockopt(1 2 3 4 5)
|
||||
8 pascal htonl(long) WINSOCK_htonl(1)
|
||||
9 pascal16 htons(word) WINSOCK_htons(1)
|
||||
10 pascal inet_addr(long) WINSOCK_inet_addr(1)
|
||||
11 pascal inet_ntoa(long) WINSOCK_inet_ntoa(1)
|
||||
12 pascal16 ioctlsocket(word long ptr) WINSOCK_ioctlsocket(1 2 3)
|
||||
13 pascal16 listen(word word) WINSOCK_listen(1 2)
|
||||
14 pascal ntohl(long) WINSOCK_ntohl(1)
|
||||
15 pascal16 ntohs(word) WINSOCK_ntohs(1)
|
||||
16 pascal16 recv(word ptr word word) WINSOCK_recv(1 2 3 4)
|
||||
17 pascal16 recvfrom(word ptr word word ptr ptr)
|
||||
WINSOCK_recvfrom(1 2 3 4 5 6)
|
||||
18 pascal16 select(word ptr ptr ptr ptr word)
|
||||
WINSOCK_select(1 2 3 4 5 6)
|
||||
19 pascal16 send(word ptr word word) WINSOCK_send(1 2 3 4)
|
||||
20 pascal16 sendto(word ptr word word ptr ptr)
|
||||
WINSOCK_sendto(1 2 3 4 5 6)
|
||||
21 pascal16 setsockopt(word word word ptr word)
|
||||
WINSOCK_setsockopt(1 2 3 4 5)
|
||||
22 pascal16 shutdown(word word) WINSOCK_shutdown(1 2)
|
||||
23 pascal16 socket(word word word) WINSOCK_socket(1 2 3)
|
||||
51 pascal gethostbyaddr(ptr word word) WINSOCK_gethostbyaddr(1 2 3)
|
||||
52 pascal gethostbyname(ptr) WINSOCK_gethostbyname(1)
|
||||
53 pascal getprotobyname(ptr) WINSOCK_getprotobyname(1)
|
||||
54 pascal getprotobynumber(word) WINSOCK_getprotobynumber(1)
|
||||
55 pascal getservbyname(ptr ptr) WINSOCK_getservbyname(1 2)
|
||||
56 pascal getservbyport(word ptr) WINSOCK_getservbyport(1 2)
|
||||
57 pascal gethostname(ptr word) WINSOCK_gethostname(1 2)
|
||||
101 pascal16 WSAAsyncSelect(word word word long)
|
||||
WSAAsyncSelect(1 2 3 4)
|
||||
102 pascal16 WSAAsyncGetHostByAddr(word word ptr word word ptr word)
|
||||
WSAAsyncGetHostByAddr(1 2 3 4 5 6 7)
|
||||
103 pascal16 WSAAsyncGetHostByName(word word ptr ptr word)
|
||||
WSAAsyncGetHostByName(1 2 3 4 5)
|
||||
104 pascal16 WSAAsyncGetProtoByNumber(word word word ptr word)
|
||||
WSAAsyncGetProtoByNumber(1 2 3 4 5)
|
||||
105 pascal16 WSAAsyncGetProtoByName(word word ptr ptr word)
|
||||
WSAAsyncGetProtoByName(1 2 3 4 5)
|
||||
106 pascal16 WSAAsyncGetServByPort(word word word ptr ptr word)
|
||||
WSAAsyncGetServByPort(1 2 3 4 5 6)
|
||||
107 pascal16 WSAAsyncGetServByName(word word ptr ptr ptr word)
|
||||
WSAAsyncGetServByName(1 2 3 4 5 6)
|
||||
108 pascal16 WSACancelAsyncRequest(word) WSACancelAsyncRequest(1)
|
||||
109 pascal16 WSASetBlockingHook() WSASetBlockingHook()
|
||||
110 pascal16 WSAUnhookBlockingHook() WSAUnhookBlockingHook()
|
||||
111 pascal16 WSAGetLastError() WSAGetLastError()
|
||||
112 pascal WSASetLastError(word) WSASetLastError(1)
|
||||
113 pascal16 WSACancelBlockingCall() WSACancelBlockingCall()
|
||||
114 pascal16 WSAIsBlocking() WSAIsBlocking()
|
||||
115 pascal WSAStartup(word ptr) WSAStartup(1 2)
|
||||
116 pascal WSACleanup() WSACleanup()
|
||||
151 pascal16 __WSAFDIsSet(word ptr) WSAFDIsSet(1 2)
|
||||
|
@ -19,6 +19,6 @@
|
||||
#define CONV_CHAR_TO_LONG(a) (a)
|
||||
#define CONV_SHORT_TO_LONG(a) (a)
|
||||
|
||||
#define CONV_BITMAPINFO
|
||||
#define CONV_BITMAPCOREHEADER
|
||||
#define CONV_BITMAPINFO(a) /* */
|
||||
#define CONV_BITMAPCOREHEADER(a) /* */
|
||||
#endif
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
extern BOOL ATOM_Init(void);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HANDLE next;
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include "windows.h"
|
||||
|
||||
extern BOOL BITMAP_Init(void);
|
||||
|
||||
/* GCs used for B&W and color bitmap operations */
|
||||
extern GC BITMAP_monoGC, BITMAP_colorGC;
|
||||
|
||||
|
@ -16,5 +16,6 @@
|
||||
extern int CallTo16(unsigned int csip, unsigned short ds);
|
||||
extern int CallBack16(void *func, int n_args, ...);
|
||||
|
||||
extern BOOL CallGrayStringProc(FARPROC func, HDC hdc, LPARAM lParam, INT cch);
|
||||
|
||||
#endif /* CALLBACK_H */
|
||||
|
7
include/clipboard.h
Normal file
7
include/clipboard.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef __WINE_CLIPBOARD_H
|
||||
#define __WINE_CLIPBOARD_H
|
||||
|
||||
extern void CLIPBOARD_ReadSelection(Window w,Atom prop);
|
||||
void CLIPBOARD_ReleaseSelection(HWND hwnd);
|
||||
|
||||
#endif /* __WINE_CLIPBOARD_H */
|
14
include/color.h
Normal file
14
include/color.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef __WINE_COLOR_H
|
||||
#define __WINE_COLOR_H
|
||||
|
||||
#include "gdi.h"
|
||||
|
||||
extern HPALETTE COLOR_Init(void);
|
||||
extern int COLOR_ToPhysical( DC *dc, COLORREF color );
|
||||
extern void COLOR_SetMapping( DC *dc, HANDLE, WORD );
|
||||
extern BOOL COLOR_IsSolid( COLORREF color );
|
||||
|
||||
extern Colormap COLOR_WinColormap;
|
||||
extern int COLOR_mapEGAPixel[16];
|
||||
|
||||
#endif /* __WINE_COLOR_H */
|
@ -1,13 +1,6 @@
|
||||
/*
|
||||
* Communications header
|
||||
*
|
||||
* 93 Erik Bos (erik@trashcan.hacktic.nl)
|
||||
*/
|
||||
|
||||
#ifndef COMM_H
|
||||
#define COMM_H
|
||||
|
||||
|
||||
#define MAX_PORTS 16
|
||||
|
||||
struct DosDeviceStruct {
|
||||
@ -19,4 +12,7 @@ struct DosDeviceStruct {
|
||||
int baudrate;
|
||||
};
|
||||
|
||||
extern void Comm_Init(void);
|
||||
extern void Comm_DeInit(void);
|
||||
|
||||
#endif /* COMM_H */
|
||||
|
@ -4,6 +4,8 @@
|
||||
* Copyright Martin Ayotte, 1993
|
||||
*
|
||||
*/
|
||||
#ifndef __WINE_CURSOR_H
|
||||
#define __WINE_CURSOR_H
|
||||
|
||||
typedef struct {
|
||||
BYTE Width;
|
||||
@ -25,3 +27,6 @@ typedef struct {
|
||||
Cursor xcursor;
|
||||
} CURSORALLOC;
|
||||
|
||||
extern void CURSOR_SetWinCursor( HWND hwnd, HCURSOR hcursor ); /* cursor.c */
|
||||
|
||||
#endif /* __WINE_CURSOR_H */
|
||||
|
13
include/dc.h
Normal file
13
include/dc.h
Normal file
@ -0,0 +1,13 @@
|
||||
#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 const int DC_XROPfunction[];
|
||||
|
||||
#endif /* __WINE_DC_H */
|
258
include/debug.h
258
include/debug.h
@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define stddeb stdout
|
||||
#define stdnimp stderr
|
||||
#define stdnimp stdout
|
||||
|
||||
/* Do not remove this line or change anything below this line */
|
||||
|
||||
@ -59,9 +59,11 @@
|
||||
#undef DEBUG_PROP
|
||||
#undef DEBUG_REG
|
||||
#undef DEBUG_REGION
|
||||
#undef DEBUG_RELAY
|
||||
#undef DEBUG_RESOURCE
|
||||
#undef DEBUG_SCROLL
|
||||
#undef DEBUG_SELECTORS
|
||||
#undef DEBUG_STACK
|
||||
#undef DEBUG_STRESS
|
||||
#undef DEBUG_SYSCOLOR
|
||||
#undef DEBUG_TASK
|
||||
@ -126,9 +128,11 @@
|
||||
#define DEBUG_PROP
|
||||
#define DEBUG_REG
|
||||
#define DEBUG_REGION
|
||||
#define DEBUG_RELAY
|
||||
#define DEBUG_RESOURCE
|
||||
#define DEBUG_SCROLL
|
||||
#define DEBUG_SELECTORS
|
||||
#define DEBUG_STACK
|
||||
#define DEBUG_STRESS
|
||||
#define DEBUG_SYSCOLOR
|
||||
#define DEBUG_TASK
|
||||
@ -407,6 +411,11 @@ short debug_msg_enabled[]={
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_RELAY
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_RESOURCE
|
||||
1,
|
||||
#else
|
||||
@ -422,6 +431,11 @@ short debug_msg_enabled[]={
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_STACK
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_STRESS
|
||||
1,
|
||||
#else
|
||||
@ -471,641 +485,859 @@ extern short debug_msg_enabled[];
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_accel if(debug_msg_enabled[0]) fprintf
|
||||
#define debugging_accel debug_msg_enabled[0]
|
||||
#else
|
||||
#ifdef DEBUG_ACCEL
|
||||
#define dprintf_accel fprintf
|
||||
#define debugging_accel 1
|
||||
#else
|
||||
#define dprintf_accel
|
||||
#define debugging_accel 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_bitmap if(debug_msg_enabled[1]) fprintf
|
||||
#define debugging_bitmap debug_msg_enabled[1]
|
||||
#else
|
||||
#ifdef DEBUG_BITMAP
|
||||
#define dprintf_bitmap fprintf
|
||||
#define debugging_bitmap 1
|
||||
#else
|
||||
#define dprintf_bitmap
|
||||
#define debugging_bitmap 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_callback if(debug_msg_enabled[2]) fprintf
|
||||
#define debugging_callback debug_msg_enabled[2]
|
||||
#else
|
||||
#ifdef DEBUG_CALLBACK
|
||||
#define dprintf_callback fprintf
|
||||
#define debugging_callback 1
|
||||
#else
|
||||
#define dprintf_callback
|
||||
#define debugging_callback 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_caret if(debug_msg_enabled[3]) fprintf
|
||||
#define debugging_caret debug_msg_enabled[3]
|
||||
#else
|
||||
#ifdef DEBUG_CARET
|
||||
#define dprintf_caret fprintf
|
||||
#define debugging_caret 1
|
||||
#else
|
||||
#define dprintf_caret
|
||||
#define debugging_caret 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_catch if(debug_msg_enabled[4]) fprintf
|
||||
#define debugging_catch debug_msg_enabled[4]
|
||||
#else
|
||||
#ifdef DEBUG_CATCH
|
||||
#define dprintf_catch fprintf
|
||||
#define debugging_catch 1
|
||||
#else
|
||||
#define dprintf_catch
|
||||
#define debugging_catch 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_cdaudio if(debug_msg_enabled[5]) fprintf
|
||||
#define debugging_cdaudio debug_msg_enabled[5]
|
||||
#else
|
||||
#ifdef DEBUG_CDAUDIO
|
||||
#define dprintf_cdaudio fprintf
|
||||
#define debugging_cdaudio 1
|
||||
#else
|
||||
#define dprintf_cdaudio
|
||||
#define debugging_cdaudio 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_class if(debug_msg_enabled[6]) fprintf
|
||||
#define debugging_class debug_msg_enabled[6]
|
||||
#else
|
||||
#ifdef DEBUG_CLASS
|
||||
#define dprintf_class fprintf
|
||||
#define debugging_class 1
|
||||
#else
|
||||
#define dprintf_class
|
||||
#define debugging_class 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_clipboard if(debug_msg_enabled[7]) fprintf
|
||||
#define debugging_clipboard debug_msg_enabled[7]
|
||||
#else
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
#define dprintf_clipboard fprintf
|
||||
#define debugging_clipboard 1
|
||||
#else
|
||||
#define dprintf_clipboard
|
||||
#define debugging_clipboard 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_clipping if(debug_msg_enabled[8]) fprintf
|
||||
#define debugging_clipping debug_msg_enabled[8]
|
||||
#else
|
||||
#ifdef DEBUG_CLIPPING
|
||||
#define dprintf_clipping fprintf
|
||||
#define debugging_clipping 1
|
||||
#else
|
||||
#define dprintf_clipping
|
||||
#define debugging_clipping 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_combo if(debug_msg_enabled[9]) fprintf
|
||||
#define debugging_combo debug_msg_enabled[9]
|
||||
#else
|
||||
#ifdef DEBUG_COMBO
|
||||
#define dprintf_combo fprintf
|
||||
#define debugging_combo 1
|
||||
#else
|
||||
#define dprintf_combo
|
||||
#define debugging_combo 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_comm if(debug_msg_enabled[10]) fprintf
|
||||
#define debugging_comm debug_msg_enabled[10]
|
||||
#else
|
||||
#ifdef DEBUG_COMM
|
||||
#define dprintf_comm fprintf
|
||||
#define debugging_comm 1
|
||||
#else
|
||||
#define dprintf_comm
|
||||
#define debugging_comm 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_cursor if(debug_msg_enabled[11]) fprintf
|
||||
#define debugging_cursor debug_msg_enabled[11]
|
||||
#else
|
||||
#ifdef DEBUG_CURSOR
|
||||
#define dprintf_cursor fprintf
|
||||
#define debugging_cursor 1
|
||||
#else
|
||||
#define dprintf_cursor
|
||||
#define debugging_cursor 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dc if(debug_msg_enabled[12]) fprintf
|
||||
#define debugging_dc debug_msg_enabled[12]
|
||||
#else
|
||||
#ifdef DEBUG_DC
|
||||
#define dprintf_dc fprintf
|
||||
#define debugging_dc 1
|
||||
#else
|
||||
#define dprintf_dc
|
||||
#define debugging_dc 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dialog if(debug_msg_enabled[13]) fprintf
|
||||
#define debugging_dialog debug_msg_enabled[13]
|
||||
#else
|
||||
#ifdef DEBUG_DIALOG
|
||||
#define dprintf_dialog fprintf
|
||||
#define debugging_dialog 1
|
||||
#else
|
||||
#define dprintf_dialog
|
||||
#define debugging_dialog 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dll if(debug_msg_enabled[14]) fprintf
|
||||
#define debugging_dll debug_msg_enabled[14]
|
||||
#else
|
||||
#ifdef DEBUG_DLL
|
||||
#define dprintf_dll fprintf
|
||||
#define debugging_dll 1
|
||||
#else
|
||||
#define dprintf_dll
|
||||
#define debugging_dll 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dosfs if(debug_msg_enabled[15]) fprintf
|
||||
#define debugging_dosfs debug_msg_enabled[15]
|
||||
#else
|
||||
#ifdef DEBUG_DOSFS
|
||||
#define dprintf_dosfs fprintf
|
||||
#define debugging_dosfs 1
|
||||
#else
|
||||
#define dprintf_dosfs
|
||||
#define debugging_dosfs 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_driver if(debug_msg_enabled[16]) fprintf
|
||||
#define debugging_driver debug_msg_enabled[16]
|
||||
#else
|
||||
#ifdef DEBUG_DRIVER
|
||||
#define dprintf_driver fprintf
|
||||
#define debugging_driver 1
|
||||
#else
|
||||
#define dprintf_driver
|
||||
#define debugging_driver 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_edit if(debug_msg_enabled[17]) fprintf
|
||||
#define debugging_edit debug_msg_enabled[17]
|
||||
#else
|
||||
#ifdef DEBUG_EDIT
|
||||
#define dprintf_edit fprintf
|
||||
#define debugging_edit 1
|
||||
#else
|
||||
#define dprintf_edit
|
||||
#define debugging_edit 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_enum if(debug_msg_enabled[18]) fprintf
|
||||
#define debugging_enum debug_msg_enabled[18]
|
||||
#else
|
||||
#ifdef DEBUG_ENUM
|
||||
#define dprintf_enum fprintf
|
||||
#define debugging_enum 1
|
||||
#else
|
||||
#define dprintf_enum
|
||||
#define debugging_enum 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_event if(debug_msg_enabled[19]) fprintf
|
||||
#define debugging_event debug_msg_enabled[19]
|
||||
#else
|
||||
#ifdef DEBUG_EVENT
|
||||
#define dprintf_event fprintf
|
||||
#define debugging_event 1
|
||||
#else
|
||||
#define dprintf_event
|
||||
#define debugging_event 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_exec if(debug_msg_enabled[20]) fprintf
|
||||
#define debugging_exec debug_msg_enabled[20]
|
||||
#else
|
||||
#ifdef DEBUG_EXEC
|
||||
#define dprintf_exec fprintf
|
||||
#define debugging_exec 1
|
||||
#else
|
||||
#define dprintf_exec
|
||||
#define debugging_exec 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_file if(debug_msg_enabled[21]) fprintf
|
||||
#define debugging_file debug_msg_enabled[21]
|
||||
#else
|
||||
#ifdef DEBUG_FILE
|
||||
#define dprintf_file fprintf
|
||||
#define debugging_file 1
|
||||
#else
|
||||
#define dprintf_file
|
||||
#define debugging_file 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_fixup if(debug_msg_enabled[22]) fprintf
|
||||
#define debugging_fixup debug_msg_enabled[22]
|
||||
#else
|
||||
#ifdef DEBUG_FIXUP
|
||||
#define dprintf_fixup fprintf
|
||||
#define debugging_fixup 1
|
||||
#else
|
||||
#define dprintf_fixup
|
||||
#define debugging_fixup 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_font if(debug_msg_enabled[23]) fprintf
|
||||
#define debugging_font debug_msg_enabled[23]
|
||||
#else
|
||||
#ifdef DEBUG_FONT
|
||||
#define dprintf_font fprintf
|
||||
#define debugging_font 1
|
||||
#else
|
||||
#define dprintf_font
|
||||
#define debugging_font 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_gdi if(debug_msg_enabled[24]) fprintf
|
||||
#define debugging_gdi debug_msg_enabled[24]
|
||||
#else
|
||||
#ifdef DEBUG_GDI
|
||||
#define dprintf_gdi fprintf
|
||||
#define debugging_gdi 1
|
||||
#else
|
||||
#define dprintf_gdi
|
||||
#define debugging_gdi 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_graphics if(debug_msg_enabled[25]) fprintf
|
||||
#define debugging_graphics debug_msg_enabled[25]
|
||||
#else
|
||||
#ifdef DEBUG_GRAPHICS
|
||||
#define dprintf_graphics fprintf
|
||||
#define debugging_graphics 1
|
||||
#else
|
||||
#define dprintf_graphics
|
||||
#define debugging_graphics 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_heap if(debug_msg_enabled[26]) fprintf
|
||||
#define debugging_heap debug_msg_enabled[26]
|
||||
#else
|
||||
#ifdef DEBUG_HEAP
|
||||
#define dprintf_heap fprintf
|
||||
#define debugging_heap 1
|
||||
#else
|
||||
#define dprintf_heap
|
||||
#define debugging_heap 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_icon if(debug_msg_enabled[27]) fprintf
|
||||
#define debugging_icon debug_msg_enabled[27]
|
||||
#else
|
||||
#ifdef DEBUG_ICON
|
||||
#define dprintf_icon fprintf
|
||||
#define debugging_icon 1
|
||||
#else
|
||||
#define dprintf_icon
|
||||
#define debugging_icon 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_int if(debug_msg_enabled[28]) fprintf
|
||||
#define debugging_int debug_msg_enabled[28]
|
||||
#else
|
||||
#ifdef DEBUG_INT
|
||||
#define dprintf_int fprintf
|
||||
#define debugging_int 1
|
||||
#else
|
||||
#define dprintf_int
|
||||
#define debugging_int 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_key if(debug_msg_enabled[29]) fprintf
|
||||
#define debugging_key debug_msg_enabled[29]
|
||||
#else
|
||||
#ifdef DEBUG_KEY
|
||||
#define dprintf_key fprintf
|
||||
#define debugging_key 1
|
||||
#else
|
||||
#define dprintf_key
|
||||
#define debugging_key 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_keyboard if(debug_msg_enabled[30]) fprintf
|
||||
#define debugging_keyboard debug_msg_enabled[30]
|
||||
#else
|
||||
#ifdef DEBUG_KEYBOARD
|
||||
#define dprintf_keyboard fprintf
|
||||
#define debugging_keyboard 1
|
||||
#else
|
||||
#define dprintf_keyboard
|
||||
#define debugging_keyboard 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_ldt if(debug_msg_enabled[31]) fprintf
|
||||
#define debugging_ldt debug_msg_enabled[31]
|
||||
#else
|
||||
#ifdef DEBUG_LDT
|
||||
#define dprintf_ldt fprintf
|
||||
#define debugging_ldt 1
|
||||
#else
|
||||
#define dprintf_ldt
|
||||
#define debugging_ldt 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_listbox if(debug_msg_enabled[32]) fprintf
|
||||
#define debugging_listbox debug_msg_enabled[32]
|
||||
#else
|
||||
#ifdef DEBUG_LISTBOX
|
||||
#define dprintf_listbox fprintf
|
||||
#define debugging_listbox 1
|
||||
#else
|
||||
#define dprintf_listbox
|
||||
#define debugging_listbox 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mci if(debug_msg_enabled[33]) fprintf
|
||||
#define debugging_mci debug_msg_enabled[33]
|
||||
#else
|
||||
#ifdef DEBUG_MCI
|
||||
#define dprintf_mci fprintf
|
||||
#define debugging_mci 1
|
||||
#else
|
||||
#define dprintf_mci
|
||||
#define debugging_mci 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mcianim if(debug_msg_enabled[34]) fprintf
|
||||
#define debugging_mcianim debug_msg_enabled[34]
|
||||
#else
|
||||
#ifdef DEBUG_MCIANIM
|
||||
#define dprintf_mcianim fprintf
|
||||
#define debugging_mcianim 1
|
||||
#else
|
||||
#define dprintf_mcianim
|
||||
#define debugging_mcianim 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mciwave if(debug_msg_enabled[35]) fprintf
|
||||
#define debugging_mciwave debug_msg_enabled[35]
|
||||
#else
|
||||
#ifdef DEBUG_MCIWAVE
|
||||
#define dprintf_mciwave fprintf
|
||||
#define debugging_mciwave 1
|
||||
#else
|
||||
#define dprintf_mciwave
|
||||
#define debugging_mciwave 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mdi if(debug_msg_enabled[36]) fprintf
|
||||
#define debugging_mdi debug_msg_enabled[36]
|
||||
#else
|
||||
#ifdef DEBUG_MDI
|
||||
#define dprintf_mdi fprintf
|
||||
#define debugging_mdi 1
|
||||
#else
|
||||
#define dprintf_mdi
|
||||
#define debugging_mdi 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_menu if(debug_msg_enabled[37]) fprintf
|
||||
#define debugging_menu debug_msg_enabled[37]
|
||||
#else
|
||||
#ifdef DEBUG_MENU
|
||||
#define dprintf_menu fprintf
|
||||
#define debugging_menu 1
|
||||
#else
|
||||
#define dprintf_menu
|
||||
#define debugging_menu 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_menucalc if(debug_msg_enabled[38]) fprintf
|
||||
#define debugging_menucalc debug_msg_enabled[38]
|
||||
#else
|
||||
#ifdef DEBUG_MENUCALC
|
||||
#define dprintf_menucalc fprintf
|
||||
#define debugging_menucalc 1
|
||||
#else
|
||||
#define dprintf_menucalc
|
||||
#define debugging_menucalc 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_message if(debug_msg_enabled[39]) fprintf
|
||||
#define debugging_message debug_msg_enabled[39]
|
||||
#else
|
||||
#ifdef DEBUG_MESSAGE
|
||||
#define dprintf_message fprintf
|
||||
#define debugging_message 1
|
||||
#else
|
||||
#define dprintf_message
|
||||
#define debugging_message 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_metafile if(debug_msg_enabled[40]) fprintf
|
||||
#define debugging_metafile debug_msg_enabled[40]
|
||||
#else
|
||||
#ifdef DEBUG_METAFILE
|
||||
#define dprintf_metafile fprintf
|
||||
#define debugging_metafile 1
|
||||
#else
|
||||
#define dprintf_metafile
|
||||
#define debugging_metafile 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_midi if(debug_msg_enabled[41]) fprintf
|
||||
#define debugging_midi debug_msg_enabled[41]
|
||||
#else
|
||||
#ifdef DEBUG_MIDI
|
||||
#define dprintf_midi fprintf
|
||||
#define debugging_midi 1
|
||||
#else
|
||||
#define dprintf_midi
|
||||
#define debugging_midi 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmio if(debug_msg_enabled[42]) fprintf
|
||||
#define debugging_mmio debug_msg_enabled[42]
|
||||
#else
|
||||
#ifdef DEBUG_MMIO
|
||||
#define dprintf_mmio fprintf
|
||||
#define debugging_mmio 1
|
||||
#else
|
||||
#define dprintf_mmio
|
||||
#define debugging_mmio 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmtime if(debug_msg_enabled[43]) fprintf
|
||||
#define debugging_mmtime debug_msg_enabled[43]
|
||||
#else
|
||||
#ifdef DEBUG_MMTIME
|
||||
#define dprintf_mmtime fprintf
|
||||
#define debugging_mmtime 1
|
||||
#else
|
||||
#define dprintf_mmtime
|
||||
#define debugging_mmtime 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_module if(debug_msg_enabled[44]) fprintf
|
||||
#define debugging_module debug_msg_enabled[44]
|
||||
#else
|
||||
#ifdef DEBUG_MODULE
|
||||
#define dprintf_module fprintf
|
||||
#define debugging_module 1
|
||||
#else
|
||||
#define dprintf_module
|
||||
#define debugging_module 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_msg if(debug_msg_enabled[45]) fprintf
|
||||
#define debugging_msg debug_msg_enabled[45]
|
||||
#else
|
||||
#ifdef DEBUG_MSG
|
||||
#define dprintf_msg fprintf
|
||||
#define debugging_msg 1
|
||||
#else
|
||||
#define dprintf_msg
|
||||
#define debugging_msg 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_msgbox if(debug_msg_enabled[46]) fprintf
|
||||
#define debugging_msgbox debug_msg_enabled[46]
|
||||
#else
|
||||
#ifdef DEBUG_MSGBOX
|
||||
#define dprintf_msgbox fprintf
|
||||
#define debugging_msgbox 1
|
||||
#else
|
||||
#define dprintf_msgbox
|
||||
#define debugging_msgbox 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_nonclient if(debug_msg_enabled[47]) fprintf
|
||||
#define debugging_nonclient debug_msg_enabled[47]
|
||||
#else
|
||||
#ifdef DEBUG_NONCLIENT
|
||||
#define dprintf_nonclient fprintf
|
||||
#define debugging_nonclient 1
|
||||
#else
|
||||
#define dprintf_nonclient
|
||||
#define debugging_nonclient 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_palette if(debug_msg_enabled[48]) fprintf
|
||||
#define debugging_palette debug_msg_enabled[48]
|
||||
#else
|
||||
#ifdef DEBUG_PALETTE
|
||||
#define dprintf_palette fprintf
|
||||
#define debugging_palette 1
|
||||
#else
|
||||
#define dprintf_palette
|
||||
#define debugging_palette 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_profile if(debug_msg_enabled[49]) fprintf
|
||||
#define debugging_profile debug_msg_enabled[49]
|
||||
#else
|
||||
#ifdef DEBUG_PROFILE
|
||||
#define dprintf_profile fprintf
|
||||
#define debugging_profile 1
|
||||
#else
|
||||
#define dprintf_profile
|
||||
#define debugging_profile 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_prop if(debug_msg_enabled[50]) fprintf
|
||||
#define debugging_prop debug_msg_enabled[50]
|
||||
#else
|
||||
#ifdef DEBUG_PROP
|
||||
#define dprintf_prop fprintf
|
||||
#define debugging_prop 1
|
||||
#else
|
||||
#define dprintf_prop
|
||||
#define debugging_prop 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_reg if(debug_msg_enabled[51]) fprintf
|
||||
#define debugging_reg debug_msg_enabled[51]
|
||||
#else
|
||||
#ifdef DEBUG_REG
|
||||
#define dprintf_reg fprintf
|
||||
#define debugging_reg 1
|
||||
#else
|
||||
#define dprintf_reg
|
||||
#define debugging_reg 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_region if(debug_msg_enabled[52]) fprintf
|
||||
#define debugging_region debug_msg_enabled[52]
|
||||
#else
|
||||
#ifdef DEBUG_REGION
|
||||
#define dprintf_region fprintf
|
||||
#define debugging_region 1
|
||||
#else
|
||||
#define dprintf_region
|
||||
#define debugging_region 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_resource if(debug_msg_enabled[53]) fprintf
|
||||
#define dprintf_relay if(debug_msg_enabled[53]) fprintf
|
||||
#define debugging_relay debug_msg_enabled[53]
|
||||
#else
|
||||
#ifdef DEBUG_RELAY
|
||||
#define dprintf_relay fprintf
|
||||
#define debugging_relay 1
|
||||
#else
|
||||
#define dprintf_relay
|
||||
#define debugging_relay 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_resource if(debug_msg_enabled[54]) fprintf
|
||||
#define debugging_resource debug_msg_enabled[54]
|
||||
#else
|
||||
#ifdef DEBUG_RESOURCE
|
||||
#define dprintf_resource fprintf
|
||||
#define debugging_resource 1
|
||||
#else
|
||||
#define dprintf_resource
|
||||
#define debugging_resource 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_scroll if(debug_msg_enabled[54]) fprintf
|
||||
#define dprintf_scroll if(debug_msg_enabled[55]) fprintf
|
||||
#define debugging_scroll debug_msg_enabled[55]
|
||||
#else
|
||||
#ifdef DEBUG_SCROLL
|
||||
#define dprintf_scroll fprintf
|
||||
#define debugging_scroll 1
|
||||
#else
|
||||
#define dprintf_scroll
|
||||
#define debugging_scroll 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_selectors if(debug_msg_enabled[55]) fprintf
|
||||
#define dprintf_selectors if(debug_msg_enabled[56]) fprintf
|
||||
#define debugging_selectors debug_msg_enabled[56]
|
||||
#else
|
||||
#ifdef DEBUG_SELECTORS
|
||||
#define dprintf_selectors fprintf
|
||||
#define debugging_selectors 1
|
||||
#else
|
||||
#define dprintf_selectors
|
||||
#define debugging_selectors 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_stress if(debug_msg_enabled[56]) fprintf
|
||||
#define dprintf_stack if(debug_msg_enabled[57]) fprintf
|
||||
#define debugging_stack debug_msg_enabled[57]
|
||||
#else
|
||||
#ifdef DEBUG_STACK
|
||||
#define dprintf_stack fprintf
|
||||
#define debugging_stack 1
|
||||
#else
|
||||
#define dprintf_stack
|
||||
#define debugging_stack 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_stress if(debug_msg_enabled[58]) fprintf
|
||||
#define debugging_stress debug_msg_enabled[58]
|
||||
#else
|
||||
#ifdef DEBUG_STRESS
|
||||
#define dprintf_stress fprintf
|
||||
#define debugging_stress 1
|
||||
#else
|
||||
#define dprintf_stress
|
||||
#define debugging_stress 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_syscolor if(debug_msg_enabled[57]) fprintf
|
||||
#define dprintf_syscolor if(debug_msg_enabled[59]) fprintf
|
||||
#define debugging_syscolor debug_msg_enabled[59]
|
||||
#else
|
||||
#ifdef DEBUG_SYSCOLOR
|
||||
#define dprintf_syscolor fprintf
|
||||
#define debugging_syscolor 1
|
||||
#else
|
||||
#define dprintf_syscolor
|
||||
#define debugging_syscolor 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_task if(debug_msg_enabled[58]) fprintf
|
||||
#define dprintf_task if(debug_msg_enabled[60]) fprintf
|
||||
#define debugging_task debug_msg_enabled[60]
|
||||
#else
|
||||
#ifdef DEBUG_TASK
|
||||
#define dprintf_task fprintf
|
||||
#define debugging_task 1
|
||||
#else
|
||||
#define dprintf_task
|
||||
#define debugging_task 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_text if(debug_msg_enabled[59]) fprintf
|
||||
#define dprintf_text if(debug_msg_enabled[61]) fprintf
|
||||
#define debugging_text debug_msg_enabled[61]
|
||||
#else
|
||||
#ifdef DEBUG_TEXT
|
||||
#define dprintf_text fprintf
|
||||
#define debugging_text 1
|
||||
#else
|
||||
#define dprintf_text
|
||||
#define debugging_text 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_timer if(debug_msg_enabled[60]) fprintf
|
||||
#define dprintf_timer if(debug_msg_enabled[62]) fprintf
|
||||
#define debugging_timer debug_msg_enabled[62]
|
||||
#else
|
||||
#ifdef DEBUG_TIMER
|
||||
#define dprintf_timer fprintf
|
||||
#define debugging_timer 1
|
||||
#else
|
||||
#define dprintf_timer
|
||||
#define debugging_timer 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_utility if(debug_msg_enabled[61]) fprintf
|
||||
#define dprintf_utility if(debug_msg_enabled[63]) fprintf
|
||||
#define debugging_utility debug_msg_enabled[63]
|
||||
#else
|
||||
#ifdef DEBUG_UTILITY
|
||||
#define dprintf_utility fprintf
|
||||
#define debugging_utility 1
|
||||
#else
|
||||
#define dprintf_utility
|
||||
#define debugging_utility 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_win if(debug_msg_enabled[62]) fprintf
|
||||
#define dprintf_win if(debug_msg_enabled[64]) fprintf
|
||||
#define debugging_win debug_msg_enabled[64]
|
||||
#else
|
||||
#ifdef DEBUG_WIN
|
||||
#define dprintf_win fprintf
|
||||
#define debugging_win 1
|
||||
#else
|
||||
#define dprintf_win
|
||||
#define debugging_win 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_winsock if(debug_msg_enabled[63]) fprintf
|
||||
#define dprintf_winsock if(debug_msg_enabled[65]) fprintf
|
||||
#define debugging_winsock debug_msg_enabled[65]
|
||||
#else
|
||||
#ifdef DEBUG_WINSOCK
|
||||
#define dprintf_winsock fprintf
|
||||
#define debugging_winsock 1
|
||||
#else
|
||||
#define dprintf_winsock
|
||||
#define debugging_winsock 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -1166,9 +1398,11 @@ static char *debug_msg_name[] = {
|
||||
"prop",
|
||||
"reg",
|
||||
"region",
|
||||
"relay",
|
||||
"resource",
|
||||
"scroll",
|
||||
"selectors",
|
||||
"stack",
|
||||
"stress",
|
||||
"syscolor",
|
||||
"task",
|
||||
|
@ -9,6 +9,11 @@
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
extern BOOL DIALOG_Init(void);
|
||||
extern HWND DIALOG_GetFirstTabItem( HWND hwndDlg );
|
||||
extern int DialogBoxIndirectPtr( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||
HWND owner, WNDPROC dlgProc);
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Dialog info structure.
|
||||
|
35
include/dos_fs.h
Normal file
35
include/dos_fs.h
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef __WINE_DOS_FS_H
|
||||
#define __WINE_DOS_FS_H
|
||||
|
||||
#include <wintypes.h>
|
||||
|
||||
extern void DOS_InitFS(void);
|
||||
extern WORD DOS_GetEquipment(void);
|
||||
extern int DOS_ValidDrive(int drive);
|
||||
extern int DOS_GetDefaultDrive(void);
|
||||
extern void DOS_SetDefaultDrive(int drive);
|
||||
extern void ToUnix(char *s);
|
||||
extern void ToDos(char *s);
|
||||
extern void ChopOffSlash(char *string);
|
||||
extern int DOS_DisableDrive(int drive);
|
||||
extern int DOS_EnableDrive(int drive);
|
||||
extern char *DOS_GetUnixFileName(char *dosfilename);
|
||||
extern char *DOS_GetDosFileName(char *unixfilename);
|
||||
extern char *DOS_GetCurrentDir(int drive);
|
||||
extern int DOS_ChangeDir(int drive, char *dirname);
|
||||
extern int DOS_MakeDir(int drive, char *dirname);
|
||||
extern int DOS_GetSerialNumber(int drive, unsigned long *serialnumber);
|
||||
extern int DOS_SetSerialNumber(int drive, unsigned long serialnumber);
|
||||
extern char *DOS_GetVolumeLabel(int drive);
|
||||
extern int DOS_SetVolumeLabel(int drive, char *label);
|
||||
extern int DOS_GetFreeSpace(int drive, long *size, long *available);
|
||||
extern char *DOS_FindFile(char *buffer, int buflen, char *rootname, char **extensions, char *path);
|
||||
extern char *WineIniFileName(void);
|
||||
extern char *WinIniFileName(void);
|
||||
extern struct dosdirent *DOS_opendir(char *dosdirname);
|
||||
extern struct dosdirent *DOS_readdir(struct dosdirent *de);
|
||||
extern void DOS_closedir(struct dosdirent *de);
|
||||
|
||||
extern char WindowsPath[256];
|
||||
|
||||
#endif /* __WINE_DOS_FS_H */
|
7
include/event.h
Normal file
7
include/event.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef __WINE_EVENT_H
|
||||
#define __WINE_EVENT_H
|
||||
|
||||
extern void EVENT_ProcessEvent( XEvent *event ); /* event.c */
|
||||
extern void EVENT_RegisterWindow( Window w, HWND hwnd ); /* event.c */
|
||||
|
||||
#endif /* __WINE_EVENT_H */
|
8
include/font.h
Normal file
8
include/font.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef __WINE_FONT_H
|
||||
#define __WINE_FONT_H
|
||||
|
||||
extern void Font_Init( void );
|
||||
extern int FONT_GetObject( FONTOBJ * font, int count, LPSTR buffer );
|
||||
extern HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font );
|
||||
|
||||
#endif /* __WINE_FONT_H */
|
@ -299,6 +299,7 @@ extern MDESC *GDI_Heap;
|
||||
|
||||
#endif
|
||||
|
||||
extern BOOL GDI_Init(void);
|
||||
extern HANDLE GDI_AllocObject( WORD, WORD );
|
||||
extern BOOL GDI_FreeObject( HANDLE );
|
||||
extern GDIOBJHDR * GDI_GetObjPtr( HANDLE, WORD );
|
||||
@ -307,5 +308,6 @@ extern Display * display;
|
||||
extern Screen * screen;
|
||||
extern Window rootWindow;
|
||||
extern int screenWidth, screenHeight, screenDepth;
|
||||
extern int desktopX, desktopY; /* misc/main.c */
|
||||
|
||||
#endif /* GDI_H */
|
||||
|
9
include/graphics.h
Normal file
9
include/graphics.h
Normal file
@ -0,0 +1,9 @@
|
||||
#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 );
|
||||
|
||||
#endif /* __WINE_GRAPHICS */
|
@ -35,11 +35,24 @@ extern void *HEAP_Alloc(MDESC **free_list, int flags, int bytes);
|
||||
extern int HEAP_Free(MDESC **free_list, void *block);
|
||||
extern void *HEAP_ReAlloc(MDESC **free_list, void *old_block,
|
||||
int new_size, unsigned int flags);
|
||||
|
||||
extern LHEAP *HEAP_LocalFindHeap(unsigned short owner);
|
||||
extern unsigned int HEAP_LocalSize(MDESC **free_list, unsigned int handle);
|
||||
extern void HEAP_LocalInit(unsigned short owner, void *start, int length);
|
||||
|
||||
extern void *WIN16_LocalAlloc(int flags, int bytes);
|
||||
extern int WIN16_LocalCompact(int min_free);
|
||||
extern unsigned int WIN16_LocalFlags(unsigned int handle);
|
||||
extern unsigned int WIN16_LocalFree(unsigned int handle);
|
||||
extern void *WIN16_LocalLock(unsigned int handle);
|
||||
extern void *WIN16_LocalReAlloc(unsigned int handle, int flags, int bytes);
|
||||
extern unsigned int WIN16_LocalUnlock(unsigned int handle);
|
||||
|
||||
#if 0
|
||||
#define HEAP_OWNER (Segments[Stack16Frame[11] >> 3].owner)
|
||||
#endif
|
||||
/* Use ds instead of owner of cs */
|
||||
#define HEAP_OWNER Stack16Frame[6]
|
||||
#define LOCALHEAP() (&HEAP_LocalFindHeap(HEAP_OWNER)->free_list)
|
||||
#define LOCALATOMTABLE() (&HEAP_LocalFindHeap(HEAP_OWNER)->local_table)
|
||||
|
||||
|
19
include/if1632.h
Normal file
19
include/if1632.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef __WINE_IF1632_H
|
||||
#define __WINE_IF1632_H
|
||||
|
||||
#include <wintypes.h>
|
||||
|
||||
extern int CallToInit16(unsigned long csip, unsigned long sssp,
|
||||
unsigned short ds);
|
||||
extern int CallTo16cx(unsigned long csip, unsigned long dscx);
|
||||
extern int CallToDllEntry(unsigned long csip, unsigned long dscx, unsigned short di);
|
||||
extern int CallBack16(void *func, int n_args, ...);
|
||||
extern void *CALLBACK_MakeProcInstance(void *func, int instance);
|
||||
extern void CallLineDDAProc(FARPROC func, short xPos, short yPos, long lParam);
|
||||
extern void winestat(void);
|
||||
extern int DLLRelay(unsigned int func_num, unsigned int seg_off);
|
||||
extern struct dll_table_entry_s *FindDLLTable(char *dll_name);
|
||||
extern int FindOrdinalFromName(struct dll_table_entry_s *dll_table, char *func_name);
|
||||
extern int ReturnArg(int arg);
|
||||
|
||||
#endif /* __WINE_IF1632_H */
|
4
include/kernel.h
Normal file
4
include/kernel.h
Normal file
@ -0,0 +1,4 @@
|
||||
extern int KERNEL_LockSegment(int segment);
|
||||
extern int KERNEL_UnlockSegment(int segment);
|
||||
extern KERNEL_InitTask(void);
|
||||
extern int KERNEL_WaitEvent(int task);
|
14
include/library.h
Normal file
14
include/library.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef __WINE_LIBRARY_H
|
||||
#define __WINE_LIBRARY_H
|
||||
|
||||
extern HINSTANCE hInstMain;
|
||||
extern HINSTANCE hSysRes;
|
||||
extern struct w_files *GetFileInfo(unsigned short instance);
|
||||
extern int IsDLLLoaded(char *name);
|
||||
extern void InitDLL(struct w_files *wpnt);
|
||||
extern void InitializeLoadedDLLs(struct w_files *wpnt);
|
||||
extern HINSTANCE LoadImage(char *module, int filetype, int change_dir);
|
||||
|
||||
extern struct dll_name_table_entry_s dll_builtin_table[];
|
||||
|
||||
#endif /* __WINE_LIBRARY_H */
|
@ -14,8 +14,8 @@ typedef LISTSTRUCT FAR* LPLISTSTRUCT;
|
||||
|
||||
|
||||
typedef struct tagHEADLIST {
|
||||
short FirstVisible;
|
||||
short ItemsCount;
|
||||
UINT FirstVisible;
|
||||
UINT ItemsCount;
|
||||
short ItemsVisible;
|
||||
short ColumnsVisible;
|
||||
short ItemsPerColumn;
|
||||
|
@ -11,6 +11,9 @@
|
||||
#include "windows.h"
|
||||
|
||||
#define MDI_MAXLISTLENGTH 64
|
||||
extern LONG MDIClientWndProc(HWND hwnd, WORD message,
|
||||
WORD wParam, LONG lParam); /* mdi.c */
|
||||
|
||||
|
||||
typedef struct mdi_child_info_s
|
||||
{
|
||||
|
@ -8,6 +8,15 @@
|
||||
|
||||
#define MENU_MAGIC 0x554d /* 'MU' */
|
||||
|
||||
extern BOOL MENU_Init(void);
|
||||
extern WORD MENU_GetMenuBarHeight( HWND hwnd, WORD menubarWidth,
|
||||
int orgX, int orgY ); /* menu.c */
|
||||
extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT pt ); /* menu.c */
|
||||
extern void MENU_TrackKbdMenuBar( HWND hwnd, WORD wParam ); /* menu.c */
|
||||
extern WORD MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
|
||||
HWND hwnd, BOOL suppress_draw ); /* menu.c */
|
||||
extern HMENU CopySysMenu(); /* menu.c */
|
||||
|
||||
|
||||
typedef struct tagMENUITEM
|
||||
{
|
||||
|
25
include/miscemu.h
Normal file
25
include/miscemu.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef __WINE_MISCEMU_H
|
||||
#define __WINE_MISCEMU_H
|
||||
|
||||
extern int do_int10(struct sigcontext_struct *);
|
||||
extern int do_int13(struct sigcontext_struct *);
|
||||
extern int do_int15(struct sigcontext_struct *);
|
||||
extern int do_int16(struct sigcontext_struct *);
|
||||
extern int do_int1a(struct sigcontext_struct *);
|
||||
extern int do_int21(struct sigcontext_struct *);
|
||||
extern int do_int25(struct sigcontext_struct *);
|
||||
extern int do_int26(struct sigcontext_struct *);
|
||||
extern int do_int2a(struct sigcontext_struct *);
|
||||
extern int do_int2f(struct sigcontext_struct *);
|
||||
extern int do_int31(struct sigcontext_struct *);
|
||||
|
||||
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 IntBarf(int i, struct sigcontext_struct *context);
|
||||
|
||||
extern void INT21_Init(void);
|
||||
|
||||
#endif /* __WINE_MISCEMU_H */
|
@ -1,7 +1,9 @@
|
||||
#ifndef __MSDOS_H
|
||||
#define __MSDOS_H
|
||||
|
||||
#include <dirent.h>
|
||||
#include <windows.h>
|
||||
#include "comm.h"
|
||||
|
||||
struct dosdirent {
|
||||
int inuse;
|
||||
@ -30,6 +32,10 @@ struct fcb {
|
||||
#define DOSVERSION 0x0330;
|
||||
#define MAX_DOS_DRIVES 26
|
||||
|
||||
extern WORD ExtendedError;
|
||||
extern struct DosDeviceStruct COM[MAX_PORTS];
|
||||
extern struct DosDeviceStruct LPT[MAX_PORTS];
|
||||
|
||||
#define segment(a) ((DWORD)(a) >> 16)
|
||||
#define offset(a) ((DWORD)(a) & 0xffff)
|
||||
|
||||
|
10
include/ne_image.h
Normal file
10
include/ne_image.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef __WINE_NE_IMAGE_H
|
||||
#define __WINE_NE_IMAGE_H
|
||||
|
||||
extern int NE_FixupSegment(struct w_files *wpnt, int segment_num);
|
||||
extern int NE_unloadImage(struct w_files *wpnt);
|
||||
extern int NE_StartProgram(struct w_files *wpnt);
|
||||
extern void NE_InitDLL(struct w_files *wpnt);
|
||||
extern HINSTANCE NE_LoadImage(struct w_files *wpnt);
|
||||
|
||||
#endif /* __WINE_NE_IMAGE_H */
|
13
include/nonclient.h
Normal file
13
include/nonclient.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef __WINE_NONCLIENT_H
|
||||
#define __WINE_NONCLIENT_H
|
||||
|
||||
extern LONG NC_HandleNCPaint( HWND hwnd, HRGN hrgn );
|
||||
extern LONG NC_HandleNCActivate( HWND hwnd, WORD wParam );
|
||||
extern LONG NC_HandleNCCalcSize( HWND hwnd, NCCALCSIZE_PARAMS *params );
|
||||
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT pt );
|
||||
extern LONG NC_HandleNCLButtonDown( HWND hwnd, WORD wParam, LONG lParam );
|
||||
extern LONG NC_HandleNCLButtonDblClk( HWND hwnd, WORD wParam, LONG lParam );
|
||||
extern LONG NC_HandleSysCommand( HWND hwnd, WORD wParam, POINT pt );
|
||||
extern LONG NC_HandleSetCursor( HWND hwnd, WORD wParam, LONG lParam );
|
||||
|
||||
#endif /* __WINE_NONCLIENT_H */
|
@ -16,7 +16,6 @@ struct options
|
||||
int synchronous; /* X synchronous mode */
|
||||
int backingstore; /* Use backing store */
|
||||
short cmdShow;
|
||||
int relay_debug;
|
||||
int debug;
|
||||
};
|
||||
|
||||
|
10
include/pe_image.h
Normal file
10
include/pe_image.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef __WINE_PE_IMAGE_H
|
||||
#define __WINE_PE_IMAGE_H
|
||||
|
||||
extern int PE_unloadImage(struct w_files *wpnt);
|
||||
extern int PE_StartProgram(struct w_files *wpnt);
|
||||
extern void PE_InitDLL(struct w_files *wpnt);
|
||||
extern HINSTANCE PE_LoadImage(struct w_files *wpnt);
|
||||
extern void my_wcstombs(char * result, u_short * source, int len);
|
||||
|
||||
#endif /* __WINE_PE_IMAGE_H */
|
@ -10,22 +10,12 @@
|
||||
|
||||
#include "neexe.h"
|
||||
#include "segmem.h"
|
||||
#include "wine.h"
|
||||
#include "heap.h"
|
||||
#include "msdos.h"
|
||||
#include "windows.h"
|
||||
|
||||
#ifndef WINELIB
|
||||
|
||||
/* loader/dump.c */
|
||||
|
||||
extern void PrintFileHeader(struct ne_header_s *ne_header);
|
||||
extern void PrintSegmentTable(struct ne_segment_table_entry_s *seg_table,
|
||||
int nentries);
|
||||
extern void PrintRelocationTable(char *exe_ptr,
|
||||
struct ne_segment_table_entry_s *seg_entry_p,
|
||||
int segment);
|
||||
|
||||
/* loader/ldtlib.c */
|
||||
|
||||
struct segment_descriptor *
|
||||
@ -37,153 +27,40 @@ int set_ldt_entry(int entry, unsigned long base, unsigned int limit,
|
||||
|
||||
/* loader/resource.c */
|
||||
|
||||
extern int OpenResourceFile(HANDLE instance);
|
||||
extern HBITMAP ConvertCoreBitmap( HDC hdc, BITMAPCOREHEADER * image );
|
||||
extern HBITMAP ConvertInfoBitmap( HDC hdc, BITMAPINFO * image );
|
||||
|
||||
/* loader/selector.c */
|
||||
|
||||
extern int FindUnusedSelectors(int n_selectors);
|
||||
extern int IPCCopySelector(int i_old, unsigned long new, int swap_type);
|
||||
extern WORD AllocSelector(WORD old_selector);
|
||||
extern unsigned int PrestoChangoSelector(unsigned src_selector, unsigned dst_selector);
|
||||
extern WORD AllocDStoCSAlias(WORD ds_selector);
|
||||
extern WORD FreeSelector(WORD sel);
|
||||
extern SEGDESC *CreateNewSegments(int code_flag, int read_only, int length,
|
||||
int n_segments);
|
||||
extern SEGDESC *GetNextSegment(unsigned int flags, unsigned int limit);
|
||||
extern unsigned int GetEntryDLLName(char *dll_name, char *function, int *sel,
|
||||
int *addr);
|
||||
extern unsigned int GetEntryDLLOrdinal(char *dll_name, int ordinal, int *sel,
|
||||
int *addr);
|
||||
|
||||
/* loader/signal.c */
|
||||
|
||||
extern int init_wine_signals(void);
|
||||
extern void wine_debug(int signal, int * regs);
|
||||
|
||||
/* loader/wine.c */
|
||||
|
||||
extern void myerror(const char *s);
|
||||
extern void load_mz_header (int, struct mz_header_s *);
|
||||
extern void load_ne_header (int, struct ne_header_s *);
|
||||
|
||||
extern char *GetFilenameFromInstance(unsigned short instance);
|
||||
extern HINSTANCE LoadImage(char *modulename, int filetype, int change_dir);
|
||||
extern int _WinMain(int argc, char **argv);
|
||||
extern void InitializeLoadedDLLs();
|
||||
|
||||
/* if1632/relay.c */
|
||||
|
||||
extern int CallBack16(void *func, int n_args, ...);
|
||||
extern void *CALLBACK_MakeProcInstance(void *func, int instance);
|
||||
extern void CallLineDDAProc(FARPROC func, short xPos, short yPos, long lParam);
|
||||
extern void winestat(void);
|
||||
|
||||
/* if1632/callback.c */
|
||||
|
||||
extern int DLLRelay(unsigned int func_num, unsigned int seg_off);
|
||||
extern struct dll_table_entry_s *FindDLLTable(char *dll_name);
|
||||
extern int FindOrdinalFromName(struct dll_table_entry_s *dll_table, char *func_name);
|
||||
extern int ReturnArg(int arg);
|
||||
|
||||
/* miscemu/int1a.c */
|
||||
|
||||
extern do_int1A(struct sigcontext_struct *context);
|
||||
|
||||
/* miscemu/int21.c */
|
||||
|
||||
extern do_int21(struct sigcontext_struct *context);
|
||||
|
||||
/* miscemu/kernel.c */
|
||||
|
||||
extern int KERNEL_LockSegment(int segment);
|
||||
extern int KERNEL_UnlockSegment(int segment);
|
||||
extern KERNEL_InitTask();
|
||||
extern void KERNEL_InitTask(void);
|
||||
extern int KERNEL_WaitEvent(int task);
|
||||
|
||||
/* misc/comm.c */
|
||||
|
||||
void Comm_Init(void);
|
||||
void Comm_DeInit(void);
|
||||
|
||||
/* misc/dos_fs.c */
|
||||
|
||||
extern void DOS_InitFS(void);
|
||||
extern WORD DOS_GetEquipment(void);
|
||||
extern int DOS_ValidDrive(int drive);
|
||||
extern int DOS_GetDefaultDrive(void);
|
||||
extern void DOS_SetDefaultDrive(int drive);
|
||||
extern void ToUnix(char *s);
|
||||
extern void ToDos(char *s);
|
||||
extern void ChopOffSlash(char *string);
|
||||
extern int DOS_DisableDrive(int drive);
|
||||
extern int DOS_EnableDrive(int drive);
|
||||
extern char *GetUnixFileName(char *dosfilename);
|
||||
extern char *DOS_GetCurrentDir(int drive);
|
||||
extern int DOS_ChangeDir(int drive, char *dirname);
|
||||
extern int DOS_MakeDir(int drive, char *dirname);
|
||||
extern int DOS_GetSerialNumber(int drive, unsigned long *serialnumber);
|
||||
extern int DOS_SetSerialNumber(int drive, unsigned long serialnumber);
|
||||
extern char *DOS_GetVolumeLabel(int drive);
|
||||
extern int DOS_SetVolumeLabel(int drive, char *label);
|
||||
extern int DOS_GetFreeSpace(int drive, long *size, long *available);
|
||||
extern char *FindFile(char *buffer, int buflen, char *rootname, char **extensions, char *path);
|
||||
extern char *WineIniFileName(void);
|
||||
extern char *WinIniFileName(void);
|
||||
extern struct dosdirent *DOS_opendir(char *dosdirname);
|
||||
extern struct dosdirent *DOS_readdir(struct dosdirent *de);
|
||||
extern void DOS_closedir(struct dosdirent *de);
|
||||
|
||||
/* misc/profile.c */
|
||||
|
||||
extern void sync_profiles(void);
|
||||
|
||||
/* misc/spy.c */
|
||||
|
||||
extern void SpyInit(void);
|
||||
|
||||
/* controls/desktop.c */
|
||||
|
||||
extern BOOL DESKTOP_SetPattern(char *pattern);
|
||||
|
||||
/* controls/widget.c */
|
||||
|
||||
extern BOOL WIDGETS_Init(void);
|
||||
|
||||
/* memory/heap.c */
|
||||
|
||||
extern void HEAP_Init(MDESC **free_list, void *start, int length);
|
||||
extern void *HEAP_Alloc(MDESC **free_list, int flags, int bytes);
|
||||
extern void *HEAP_ReAlloc(MDESC **free_list, void *old_block, int new_size, unsigned int flags);
|
||||
extern int HEAP_Free(MDESC **free_list, void *block);
|
||||
extern LHEAP *HEAP_LocalFindHeap(unsigned short owner);
|
||||
extern void HEAP_LocalInit(unsigned short owner, void *start, int length);
|
||||
extern void *WIN16_LocalAlloc(int flags, int bytes);
|
||||
extern int WIN16_LocalCompact(int min_free);
|
||||
extern unsigned int WIN16_LocalFlags(unsigned int handle);
|
||||
extern unsigned int WIN16_LocalFree(unsigned int handle);
|
||||
extern unsigned int WIN16_LocalInit(unsigned int segment, unsigned int start, unsigned int end);
|
||||
extern void *WIN16_LocalLock(unsigned int handle);
|
||||
extern void *WIN16_LocalReAlloc(unsigned int handle, int flags, int bytes);
|
||||
extern unsigned int WIN16_LocalSize(unsigned int handle);
|
||||
extern unsigned int WIN16_LocalUnlock(unsigned int handle);
|
||||
|
||||
/* objects/bitmaps.c */
|
||||
|
||||
extern BOOL BITMAP_Init(void);
|
||||
|
||||
/* objects/color.c */
|
||||
|
||||
extern BOOL COLOR_Init(void);
|
||||
|
||||
/* objects/dib.c */
|
||||
|
||||
extern int DIB_BitmapInfoSize(BITMAPINFO *info, WORD coloruse);
|
||||
|
||||
/* objects/gdiobj.c */
|
||||
|
||||
extern BOOL GDI_Init(void);
|
||||
|
||||
/* objects/palette.c */
|
||||
|
||||
extern BOOL PALETTE_Init(void);
|
||||
@ -200,17 +77,5 @@ extern void DrawReliefRect(HDC hdc, RECT rect, int thickness, BOOL pressed);
|
||||
|
||||
extern void DCE_Init(void);
|
||||
|
||||
/* windows/dialog.c */
|
||||
|
||||
extern BOOL DIALOG_Init(void);
|
||||
|
||||
/* windows/syscolor.c */
|
||||
|
||||
extern void SYSCOLOR_Init(void);
|
||||
|
||||
/* windows/sysmetrics.c */
|
||||
|
||||
extern void SYSMETRICS_Init(void);
|
||||
|
||||
#endif /* WINELIB */
|
||||
#endif /* _WINE_PROTOTYPES_H */
|
||||
|
@ -29,8 +29,8 @@
|
||||
#define ES context->sc_es
|
||||
#define SS context->sc_ss
|
||||
|
||||
#define DI context->sc_edi
|
||||
#define SI context->sc_esi
|
||||
#define DI ((WORD)context->sc_edi)
|
||||
#define SI ((WORD)context->sc_esi)
|
||||
#define SP context->sc_esp
|
||||
#ifndef __FreeBSD__
|
||||
#define EFL context->sc_eflags
|
||||
|
@ -20,7 +20,8 @@ typedef struct
|
||||
} SCROLLINFO;
|
||||
|
||||
extern LONG ScrollBarWndProc( HWND hwnd, WORD uMsg, WORD wParam, LONG lParam );
|
||||
|
||||
extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, int nBar );
|
||||
extern void SCROLL_HandleScrollEvent( HWND hwnd, int nBar,
|
||||
WORD msg, POINT pt); /* scroll.c */
|
||||
|
||||
#endif /* SCROLL_H */
|
||||
|
25
include/selectors.h
Normal file
25
include/selectors.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef __WINE_SELECTORS_H
|
||||
#define __WINE_SELECTORS_H
|
||||
|
||||
#include "dlls.h"
|
||||
|
||||
extern int FindUnusedSelectors(int n_selectors);
|
||||
extern int IPCCopySelector(int i_old, unsigned long new, int swap_type);
|
||||
extern WORD AllocSelector(WORD old_selector);
|
||||
extern unsigned int PrestoChangoSelector(unsigned src_selector, unsigned dst_selector);
|
||||
extern WORD AllocDStoCSAlias(WORD ds_selector);
|
||||
extern SEGDESC *CreateSelectors(struct w_files * wpnt);
|
||||
extern WORD FreeSelector(WORD sel);
|
||||
|
||||
extern SEGDESC *CreateNewSegments(int code_flag, int read_only, int length,
|
||||
int n_segments);
|
||||
extern SEGDESC *GetNextSegment(unsigned int flags, unsigned int limit);
|
||||
|
||||
extern unsigned int GetEntryDLLName(char *dll_name, char *function, int *sel,
|
||||
int *addr);
|
||||
extern unsigned int GetEntryDLLOrdinal(char *dll_name, int ordinal, int *sel,
|
||||
int *addr);
|
||||
extern unsigned int GetEntryPointFromOrdinal(struct w_files * wpnt,
|
||||
int ordinal);
|
||||
|
||||
#endif /* __WINE_SELECTORS_H */
|
@ -129,9 +129,11 @@
|
||||
#undef DEBUG_PROP
|
||||
#undef DEBUG_REG
|
||||
#undef DEBUG_REGION
|
||||
#undef DEBUG_RELAY
|
||||
#undef DEBUG_RESOURCE
|
||||
#undef DEBUG_SCROLL
|
||||
#undef DEBUG_SELECTORS
|
||||
#undef DEBUG_STACK
|
||||
#undef DEBUG_STRESS
|
||||
#undef DEBUG_SYSCOLOR
|
||||
#undef DEBUG_TASK
|
||||
@ -196,9 +198,11 @@
|
||||
#define DEBUG_PROP
|
||||
#define DEBUG_REG
|
||||
#define DEBUG_REGION
|
||||
#define DEBUG_RELAY
|
||||
#define DEBUG_RESOURCE
|
||||
#define DEBUG_SCROLL
|
||||
#define DEBUG_SELECTORS
|
||||
#define DEBUG_STACK
|
||||
#define DEBUG_STRESS
|
||||
#define DEBUG_SYSCOLOR
|
||||
#define DEBUG_TASK
|
||||
|
@ -34,6 +34,7 @@ struct SysColorObjects
|
||||
HBRUSH hbrushBtnHighlight; /* COLOR_BTNHIGHLIGHT */
|
||||
};
|
||||
|
||||
extern void SYSCOLOR_Init(void);
|
||||
extern struct SysColorObjects sysColorObjects;
|
||||
|
||||
#endif /* SYSCOLOR_H */
|
||||
|
@ -48,8 +48,7 @@
|
||||
#define SYSMETRICS_CYDOUBLECLK sysMetrics[SM_CYDOUBLECLK]
|
||||
#define SYSMETRICS_MENUDROPALIGNMENT sysMetrics[SM_MENUDROPALIGNMENT]
|
||||
|
||||
|
||||
extern void SYSMETRICS_Init(void);
|
||||
extern short sysMetrics[SM_CMETRICS];
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -72,6 +72,7 @@ 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 );
|
||||
|
||||
|
@ -3,87 +3,14 @@
|
||||
#ifndef WINDOWS_H
|
||||
#define WINDOWS_H
|
||||
|
||||
#ifndef _WINARGS
|
||||
#include <wintypes.h>
|
||||
|
||||
typedef short INT;
|
||||
typedef unsigned short UINT;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned long DWORD;
|
||||
typedef unsigned short BOOL;
|
||||
typedef unsigned char BYTE;
|
||||
typedef long LONG;
|
||||
typedef UINT WPARAM;
|
||||
typedef LONG LPARAM;
|
||||
typedef LONG LRESULT;
|
||||
typedef WORD HANDLE;
|
||||
typedef DWORD HHOOK;
|
||||
typedef char *LPSTR;
|
||||
typedef const char *LPCSTR;
|
||||
typedef char *NPSTR;
|
||||
typedef INT *LPINT;
|
||||
typedef UINT *LPUINT;
|
||||
typedef WORD *LPWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef LONG *LPLONG;
|
||||
typedef void *LPVOID;
|
||||
typedef long (*FARPROC)();
|
||||
typedef FARPROC DLGPROC;
|
||||
typedef int CATCHBUF[9];
|
||||
typedef int *LPCATCHBUF;
|
||||
typedef FARPROC HOOKPROC;
|
||||
#define DECLARE_HANDLE(a) typedef HANDLE a;
|
||||
#pragma pack(1)
|
||||
|
||||
DECLARE_HANDLE(HTASK);
|
||||
DECLARE_HANDLE(HDRVR);
|
||||
DECLARE_HANDLE(HWND);
|
||||
DECLARE_HANDLE(HDC);
|
||||
DECLARE_HANDLE(HCLASS);
|
||||
DECLARE_HANDLE(HCURSOR);
|
||||
DECLARE_HANDLE(HFONT);
|
||||
DECLARE_HANDLE(HPEN);
|
||||
DECLARE_HANDLE(HRGN);
|
||||
DECLARE_HANDLE(HPALETTE);
|
||||
DECLARE_HANDLE(HICON);
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
DECLARE_HANDLE(HMENU);
|
||||
DECLARE_HANDLE(HBITMAP);
|
||||
DECLARE_HANDLE(HBRUSH);
|
||||
DECLARE_HANDLE(LOCALHANDLE);
|
||||
DECLARE_HANDLE(HMETAFILE);
|
||||
DECLARE_HANDLE(HDWP);
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define CW_USEDEFAULT ((INT)0x8000)
|
||||
#define FAR
|
||||
#define NEAR
|
||||
#define PASCAL
|
||||
#define VOID void
|
||||
#define WINAPI PASCAL
|
||||
#define CALLBACK PASCAL
|
||||
#ifndef NULL
|
||||
#define NULL (void *)0
|
||||
#endif
|
||||
|
||||
#define LOBYTE(w) ((BYTE)(w))
|
||||
#define HIBYTE(w) ((BYTE)((UINT)(w) >> 8))
|
||||
|
||||
#define LOWORD(l) ((WORD)(l))
|
||||
#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
|
||||
|
||||
#define MAKELONG(low, high) ((LONG)(((WORD)(low)) | \
|
||||
(((DWORD)((WORD)(high))) << 16)))
|
||||
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct { INT x, y; } POINT;
|
||||
typedef struct {
|
||||
INT x;
|
||||
INT y;
|
||||
} POINT;
|
||||
typedef POINT *PPOINT;
|
||||
typedef POINT *NPPOINT;
|
||||
typedef POINT *LPPOINT;
|
||||
@ -116,13 +43,6 @@ typedef PAINTSTRUCT *PPAINTSTRUCT;
|
||||
typedef PAINTSTRUCT *NPPAINTSTRUCT;
|
||||
typedef PAINTSTRUCT *LPPAINTSTRUCT;
|
||||
|
||||
#ifdef WINELIB
|
||||
#define WINE_PACKED
|
||||
#else
|
||||
#define WINE_PACKED __attribute__ ((packed))
|
||||
#endif
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Window classes */
|
||||
|
||||
@ -2363,7 +2283,6 @@ typedef METAFILEPICT *LPMETAFILEPICT;
|
||||
#define Fn(ret,name,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11,t12,a12,t13,a13,t14,a14) ret name(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12,t13 a13,t14 a14);
|
||||
|
||||
int wsprintf(LPSTR a,LPSTR b,...);
|
||||
#endif
|
||||
|
||||
/* Implemented functions */
|
||||
|
||||
|
@ -32,21 +32,16 @@ struct sigcontext_struct {
|
||||
unsigned long oldmask;
|
||||
unsigned long cr2;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
#define WINE_DATA_SELECTOR 0x2b
|
||||
#define WINE_CODE_SELECTOR 0x23
|
||||
#endif
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#define WINE_DATA_SELECTOR 0x27
|
||||
#define WINE_CODE_SELECTOR 0x1f
|
||||
#endif
|
||||
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#include <signal.h>
|
||||
#define sigcontext_struct sigcontext
|
||||
#define HZ 100
|
||||
#define WINE_DATA_SELECTOR 0x27
|
||||
#define WINE_CODE_SELECTOR 0x1f
|
||||
#endif
|
||||
|
||||
#endif /* WINE_H */
|
||||
|
@ -9,6 +9,15 @@
|
||||
|
||||
#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;
|
||||
|
92
include/wintypes.h
Normal file
92
include/wintypes.h
Normal file
@ -0,0 +1,92 @@
|
||||
#ifndef __WINE_WINTYPES_H
|
||||
#define __WINE_WINTYPES_H
|
||||
|
||||
typedef short INT;
|
||||
typedef unsigned short UINT;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned long DWORD;
|
||||
typedef unsigned short BOOL;
|
||||
typedef unsigned char BYTE;
|
||||
typedef long LONG;
|
||||
typedef UINT WPARAM;
|
||||
typedef LONG LPARAM;
|
||||
typedef LONG LRESULT;
|
||||
typedef WORD HANDLE;
|
||||
typedef DWORD HHOOK;
|
||||
typedef char *LPSTR;
|
||||
typedef const char *LPCSTR;
|
||||
typedef char *NPSTR;
|
||||
typedef INT *LPINT;
|
||||
typedef UINT *LPUINT;
|
||||
typedef WORD *LPWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef LONG *LPLONG;
|
||||
typedef void *LPVOID;
|
||||
typedef long (*FARPROC)();
|
||||
typedef FARPROC DLGPROC;
|
||||
typedef int CATCHBUF[9];
|
||||
typedef int *LPCATCHBUF;
|
||||
typedef FARPROC HOOKPROC;
|
||||
|
||||
#define DECLARE_HANDLE(a) typedef HANDLE a;
|
||||
|
||||
DECLARE_HANDLE(HTASK);
|
||||
DECLARE_HANDLE(HDRVR);
|
||||
DECLARE_HANDLE(HWND);
|
||||
DECLARE_HANDLE(HDC);
|
||||
DECLARE_HANDLE(HCLASS);
|
||||
DECLARE_HANDLE(HCURSOR);
|
||||
DECLARE_HANDLE(HFONT);
|
||||
DECLARE_HANDLE(HPEN);
|
||||
DECLARE_HANDLE(HRGN);
|
||||
DECLARE_HANDLE(HPALETTE);
|
||||
DECLARE_HANDLE(HICON);
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
DECLARE_HANDLE(HMENU);
|
||||
DECLARE_HANDLE(HBITMAP);
|
||||
DECLARE_HANDLE(HBRUSH);
|
||||
DECLARE_HANDLE(LOCALHANDLE);
|
||||
DECLARE_HANDLE(HMETAFILE);
|
||||
DECLARE_HANDLE(HDWP);
|
||||
DECLARE_HANDLE(HDROP);
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define CW_USEDEFAULT ((INT)0x8000)
|
||||
#define FAR
|
||||
#define NEAR
|
||||
#define PASCAL
|
||||
#define VOID void
|
||||
#define WINAPI PASCAL
|
||||
#define CALLBACK PASCAL
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (void *)0
|
||||
#endif
|
||||
|
||||
#ifdef WINELIB
|
||||
#define WINE_PACKED
|
||||
#else
|
||||
#define WINE_PACKED __attribute__ ((packed))
|
||||
#endif
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
#define LOBYTE(w) ((BYTE)(w))
|
||||
#define HIBYTE(w) ((BYTE)((UINT)(w) >> 8))
|
||||
|
||||
#define LOWORD(l) ((WORD)(l))
|
||||
#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
|
||||
|
||||
#define MAKELONG(low, high) ((LONG)(((WORD)(low)) | \
|
||||
(((DWORD)((WORD)(high))) << 16)))
|
||||
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#endif /* __WINE_WINTYPES_H */
|
@ -1,7 +1,8 @@
|
||||
#ifndef WINELIB
|
||||
/*
|
||||
static char RCSId[] = "$Id: dump.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef WINELIB
|
||||
/*
|
||||
static char RCSId[] = "$Id: ldt.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,13 +1,13 @@
|
||||
#ifndef WINELIB
|
||||
/*
|
||||
static char RCSId[] = "$Id: ldtlib.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_LDT */
|
||||
/* #undef DEBUG_LDT */
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef linux
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Module & Library functions
|
||||
*/
|
||||
static char Copyright[] = "Copyright 1993, 1994 Martin Ayotte, Robert J. Amstadt, Erik Bos";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -13,24 +13,21 @@ static char Copyright[] = "Copyright 1993, 1994 Martin Ayotte, Robert J. Amstadt
|
||||
#include "neexe.h"
|
||||
#include "segmem.h"
|
||||
#include "dlls.h"
|
||||
#include "wine.h"
|
||||
#include "if1632.h"
|
||||
#include "wineopts.h"
|
||||
#include "arch.h"
|
||||
#include "options.h"
|
||||
#include "prototypes.h"
|
||||
#include "dos_fs.h"
|
||||
#include "windows.h"
|
||||
#include "task.h"
|
||||
#include "toolhelp.h"
|
||||
#include "selectors.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_MODULE */
|
||||
/* #undef DEBUG_MODULE */
|
||||
#include "debug.h"
|
||||
|
||||
extern char WindowsPath[256];
|
||||
extern struct dll_name_table_entry_s dll_builtin_table[];
|
||||
extern char *GetDosFileName(char *);
|
||||
|
||||
extern HANDLE hSysRes;
|
||||
#include "prototypes.h"
|
||||
#include "library.h"
|
||||
#include "ne_image.h"
|
||||
#include "pe_image.h"
|
||||
|
||||
struct w_files *wine_files = NULL;
|
||||
static char *DLL_Extensions[] = { "dll", NULL };
|
||||
@ -58,8 +55,7 @@ void ExtractDLLName(char *libname, char *temp)
|
||||
}
|
||||
}
|
||||
|
||||
struct w_files *
|
||||
GetFileInfo(unsigned short instance)
|
||||
struct w_files *GetFileInfo(unsigned short instance)
|
||||
{
|
||||
register struct w_files *w = wine_files;
|
||||
|
||||
@ -86,9 +82,9 @@ int IsDLLLoaded(char *name)
|
||||
void InitDLL(struct w_files *wpnt)
|
||||
{
|
||||
if (wpnt->ne)
|
||||
InitNEDLL(wpnt);
|
||||
NE_InitDLL(wpnt);
|
||||
else
|
||||
InitPEDLL(wpnt);
|
||||
PE_InitDLL(wpnt);
|
||||
}
|
||||
|
||||
void InitializeLoadedDLLs(struct w_files *wpnt)
|
||||
@ -154,7 +150,7 @@ HINSTANCE LoadImage(char *module, int filetype, int change_dir)
|
||||
/*
|
||||
* search file
|
||||
*/
|
||||
fullname = FindFile(buffer, sizeof(buffer), module,
|
||||
fullname = DOS_FindFile(buffer, sizeof(buffer), module,
|
||||
(filetype == EXE ? EXE_Extensions : DLL_Extensions),
|
||||
WindowsPath);
|
||||
if (fullname == NULL)
|
||||
@ -164,7 +160,7 @@ HINSTANCE LoadImage(char *module, int filetype, int change_dir)
|
||||
return 2;
|
||||
}
|
||||
|
||||
fullname = GetDosFileName(fullname);
|
||||
fullname = DOS_GetDosFileName(fullname);
|
||||
|
||||
dprintf_module(stddeb,"LoadImage: loading %s (%s)\n [%s]\n",
|
||||
module, buffer, fullname);
|
||||
@ -225,7 +221,7 @@ HINSTANCE LoadImage(char *module, int filetype, int change_dir)
|
||||
/*
|
||||
* Stick this file into the list of loaded files so we don't try to reload
|
||||
* it again if another module references this module. Do this before
|
||||
* calling loadNEImage because we might get back here before loadNEImage
|
||||
* calling NE_LoadImage because we might get back here before NE_loadImage
|
||||
* returns.
|
||||
*/
|
||||
if(wine_files == NULL)
|
||||
@ -239,9 +235,9 @@ HINSTANCE LoadImage(char *module, int filetype, int change_dir)
|
||||
wpnt->next = NULL;
|
||||
|
||||
if (header[0] == 'N' && header[1] == 'E')
|
||||
handle = LoadNEImage(wpnt);
|
||||
handle = NE_LoadImage(wpnt);
|
||||
if (header[0] == 'P' && header[1] == 'E')
|
||||
handle = LoadPEImage(wpnt);
|
||||
handle = PE_LoadImage(wpnt);
|
||||
wpnt->hinstance = handle;
|
||||
|
||||
if (handle > 32) {
|
||||
@ -365,7 +361,7 @@ int GetModuleFileName(HANDLE hModule, LPSTR lpFileName, short nSize)
|
||||
/* check loaded dlls */
|
||||
if ((w = GetFileInfo(hModule)) == NULL)
|
||||
return 0;
|
||||
str = GetDosFileName(w->filename);
|
||||
str = DOS_GetDosFileName(w->filename);
|
||||
if (nSize > strlen(str)) nSize = strlen(str) + 1;
|
||||
strncpy(lpFileName, str, nSize);
|
||||
dprintf_module(stddeb,"GetModuleFileName copied '%s' return %d \n", lpFileName, nSize);
|
||||
@ -406,9 +402,9 @@ void FreeLibrary(HANDLE hLib)
|
||||
if (lpMod->Count == 1) {
|
||||
wpnt = GetFileInfo(hLib);
|
||||
if (wpnt->ne)
|
||||
NEunloadImage(wpnt);
|
||||
NE_UnloadImage(wpnt);
|
||||
else
|
||||
PEunloadImage(wpnt);
|
||||
PE_UnloadImage(wpnt);
|
||||
if (hLib != (HANDLE)NULL) GlobalFree(hLib);
|
||||
if (lpMod->ModuleName != NULL) free(lpMod->ModuleName);
|
||||
if (lpMod->FileName != NULL) free(lpMod->FileName);
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: wine.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
@ -11,26 +12,24 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include <errno.h>
|
||||
#include "neexe.h"
|
||||
#include "segmem.h"
|
||||
#include "prototypes.h"
|
||||
#include "dos_fs.h"
|
||||
#include "dlls.h"
|
||||
#include "wine.h"
|
||||
#include "library.h"
|
||||
#include "windows.h"
|
||||
#include "wineopts.h"
|
||||
#include "arch.h"
|
||||
#include "dos_fs.h"
|
||||
#include "task.h"
|
||||
#include "prototypes.h"
|
||||
#include "options.h"
|
||||
#include "if1632.h"
|
||||
#include "ne_image.h"
|
||||
#include "pe_image.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_DLL */
|
||||
/* #undef DEBUG_DLL */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
char *GetDosFileName(char *unixfilename);
|
||||
extern char WindowsPath[256];
|
||||
|
||||
char **Argv;
|
||||
int Argc;
|
||||
HINSTANCE hSysRes;
|
||||
HINSTANCE hSysRes, hInstMain;
|
||||
unsigned short WIN_StackSize;
|
||||
unsigned short WIN_HeapSize;
|
||||
|
||||
@ -55,8 +54,8 @@ myerror(const char *s)
|
||||
int _WinMain(int argc, char **argv)
|
||||
{
|
||||
char *p, filename[256];
|
||||
HANDLE hTaskMain;
|
||||
HINSTANCE hInstMain;
|
||||
HANDLE hTaskMain;
|
||||
|
||||
struct w_files *wpnt;
|
||||
#ifdef WINESTAT
|
||||
char * cp;
|
||||
@ -73,11 +72,11 @@ int _WinMain(int argc, char **argv)
|
||||
filename[p - Argv[0]] = '\0';
|
||||
strcat(WindowsPath, ";");
|
||||
if (strchr(filename, '/'))
|
||||
strcat(WindowsPath, GetDosFileName(filename));
|
||||
strcat(WindowsPath, DOS_GetDosFileName(filename));
|
||||
else
|
||||
strcat(WindowsPath, filename);
|
||||
}
|
||||
|
||||
|
||||
if ((hInstMain = LoadImage(Argv[0], EXE, 1)) < 32) {
|
||||
fprintf(stderr, "wine: can't load %s!.\n", Argv[0]);
|
||||
exit(1);
|
||||
@ -97,6 +96,7 @@ int _WinMain(int argc, char **argv)
|
||||
dprintf_dll(stddeb,"System Resources Loaded // hSysRes='%04X'\n",
|
||||
hSysRes);
|
||||
|
||||
|
||||
#ifdef WINESTAT
|
||||
cp = strrchr(argv[0], '/');
|
||||
if(!cp) cp = argv[0];
|
||||
@ -117,9 +117,9 @@ int _WinMain(int argc, char **argv)
|
||||
wine_debug(0, NULL);
|
||||
|
||||
if (wpnt->ne)
|
||||
StartNEprogram(wpnt);
|
||||
return(NE_StartProgram(wpnt));
|
||||
else
|
||||
StartPEprogram(wpnt);
|
||||
return(PE_StartProgram(wpnt));
|
||||
}
|
||||
|
||||
#endif /* #ifndef WINELIB */
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: wine.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
@ -8,180 +9,63 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
#ifdef linux
|
||||
#include <linux/head.h>
|
||||
#include <linux/ldt.h>
|
||||
#include <linux/segment.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "neexe.h"
|
||||
#include "segmem.h"
|
||||
#include "prototypes.h"
|
||||
#include "dlls.h"
|
||||
#include "wine.h"
|
||||
#include "windows.h"
|
||||
#include "wineopts.h"
|
||||
#include "arch.h"
|
||||
#include "options.h"
|
||||
#include "library.h"
|
||||
#include "if1632.h"
|
||||
#include "selectors.h"
|
||||
#include "ne_image.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
extern HANDLE CreateNewTask(HINSTANCE hInst);
|
||||
extern void InitializeLoadedDLLs(struct w_files *wpnt);
|
||||
extern int CallToInit16(unsigned long csip, unsigned long sssp,
|
||||
unsigned short ds);
|
||||
extern int CallTo16cx(unsigned long csip, unsigned long dscx);
|
||||
extern void CallTo32();
|
||||
extern char WindowsPath[256];
|
||||
extern unsigned short WIN_StackSize;
|
||||
extern unsigned short WIN_HeapSize;
|
||||
|
||||
int FixupSegment(struct w_files *, int);
|
||||
void FixupFunctionPrologs(struct w_files *);
|
||||
char *GetModuleName(struct w_files * wpnt, int index, char *buffer);
|
||||
|
||||
#ifndef WINELIB
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
void load_ne_header (int fd, struct ne_header_s *ne_header)
|
||||
{
|
||||
if (read(fd, ne_header, sizeof(struct ne_header_s))
|
||||
!= sizeof(struct ne_header_s))
|
||||
{
|
||||
myerror("Unable to read NE header from file");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**********************************************************************
|
||||
* LoadNEImage
|
||||
* Load one NE format executable into memory
|
||||
*/
|
||||
HINSTANCE LoadNEImage(struct w_files *wpnt)
|
||||
{
|
||||
unsigned int read_size, status, segment;
|
||||
int i;
|
||||
|
||||
wpnt->ne = malloc(sizeof(struct ne_data));
|
||||
wpnt->ne->resnamtab = NULL;
|
||||
wpnt->ne->ne_header = malloc(sizeof(struct ne_header_s));
|
||||
lseek(wpnt->fd, wpnt->mz_header->ne_offset, SEEK_SET);
|
||||
load_ne_header(wpnt->fd, wpnt->ne->ne_header);
|
||||
|
||||
#ifndef WINELIB
|
||||
/*
|
||||
* Create segment selectors.
|
||||
*/
|
||||
status = lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->segment_tab_offset,
|
||||
SEEK_SET);
|
||||
read_size = wpnt->ne->ne_header->n_segment_tab *
|
||||
sizeof(struct ne_segment_table_entry_s);
|
||||
wpnt->ne->seg_table = (struct ne_segment_table_entry_s *) malloc(read_size);
|
||||
if (read(wpnt->fd, wpnt->ne->seg_table, read_size) != read_size)
|
||||
myerror("Unable to read segment table header from file");
|
||||
wpnt->ne->selector_table = CreateSelectors(wpnt);
|
||||
wpnt->hinstance = (wpnt->ne->
|
||||
selector_table[wpnt->ne->ne_header->auto_data_seg-1].
|
||||
selector);
|
||||
#endif
|
||||
/* Get the lookup table. This is used for looking up the addresses
|
||||
of functions that are exported */
|
||||
|
||||
read_size = wpnt->ne->ne_header->entry_tab_length;
|
||||
wpnt->ne->lookup_table = (char *) malloc(read_size);
|
||||
lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->entry_tab_offset, SEEK_SET);
|
||||
if (read(wpnt->fd, wpnt->ne->lookup_table, read_size) != read_size)
|
||||
myerror("Unable to read lookup table header from file");
|
||||
|
||||
/* Get the iname table. This is used for looking up the names
|
||||
of functions that are exported */
|
||||
|
||||
status = lseek(wpnt->fd, wpnt->ne->ne_header->nrname_tab_offset, SEEK_SET);
|
||||
read_size = wpnt->ne->ne_header->nrname_tab_length;
|
||||
wpnt->ne->nrname_table = (char *) malloc(read_size);
|
||||
if (read(wpnt->fd, wpnt->ne->nrname_table, read_size) != read_size)
|
||||
myerror("Unable to read nrname table header from file");
|
||||
|
||||
status = lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->rname_tab_offset, SEEK_SET);
|
||||
read_size = wpnt->ne->ne_header->moduleref_tab_offset -
|
||||
wpnt->ne->ne_header->rname_tab_offset;
|
||||
wpnt->ne->rname_table = (char *) malloc(read_size);
|
||||
if (read(wpnt->fd, wpnt->ne->rname_table, read_size) != read_size)
|
||||
myerror("Unable to read rname table header from file");
|
||||
|
||||
/*
|
||||
* Now load any DLLs that this module refers to.
|
||||
*/
|
||||
for(i=0; i<wpnt->ne->ne_header->n_mod_ref_tab; i++)
|
||||
{
|
||||
char buff[14];
|
||||
GetModuleName(wpnt, i + 1, buff);
|
||||
|
||||
if (strcasecmp(buff, wpnt->name) != 0 )
|
||||
LoadImage(buff, DLL, 0);
|
||||
}
|
||||
#ifndef WINELIB
|
||||
/* fixup references */
|
||||
|
||||
for (segment = 0; segment < wpnt->ne->ne_header->n_segment_tab; segment++)
|
||||
if (FixupSegment(wpnt, segment) < 0)
|
||||
myerror("fixup failed.");
|
||||
|
||||
FixupFunctionPrologs(wpnt);
|
||||
InitializeLoadedDLLs(wpnt);
|
||||
#endif
|
||||
return(wpnt->hinstance);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* GetImportedName
|
||||
*/
|
||||
char *
|
||||
GetImportedName(int fd, struct mz_header_s *mz_header,
|
||||
struct ne_header_s *ne_header, int name_offset, char *buffer)
|
||||
static
|
||||
char *NE_GetImportedName(struct w_files *wpnt, int name_offset, char *buffer)
|
||||
{
|
||||
int length;
|
||||
int status;
|
||||
|
||||
status = lseek(fd, mz_header->ne_offset + ne_header->iname_tab_offset +
|
||||
name_offset, SEEK_SET);
|
||||
length = 0;
|
||||
read(fd, &length, 1); /* Get the length byte */
|
||||
length = CONV_CHAR_TO_LONG (length);
|
||||
read(fd, buffer, length);
|
||||
BYTE length;
|
||||
|
||||
lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->iname_tab_offset + name_offset, SEEK_SET);
|
||||
read(wpnt->fd, &length, 1); /* Get the length byte */
|
||||
read(wpnt->fd, buffer, length);
|
||||
buffer[length] = 0;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
struct w_files *current_exe;
|
||||
WORD current_nodata=0xfd00;
|
||||
/**********************************************************************
|
||||
* GetModuleName
|
||||
*/
|
||||
char *
|
||||
GetModuleName(struct w_files * wpnt, int index, char *buffer)
|
||||
static char *NE_GetModuleName(struct w_files *wpnt, int index, char *buffer)
|
||||
{
|
||||
int fd = wpnt->fd;
|
||||
struct mz_header_s *mz_header = wpnt->mz_header;
|
||||
struct ne_header_s *ne_header = wpnt->ne->ne_header;
|
||||
int length;
|
||||
WORD name_offset, status;
|
||||
BYTE length;
|
||||
WORD name_offset;
|
||||
int i;
|
||||
|
||||
status = lseek(fd, mz_header->ne_offset + ne_header->moduleref_tab_offset +
|
||||
2*(index - 1), SEEK_SET);
|
||||
name_offset = 0;
|
||||
read(fd, &name_offset, 2);
|
||||
lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->moduleref_tab_offset + 2 * (index - 1), SEEK_SET);
|
||||
read(wpnt->fd, &name_offset, 2);
|
||||
name_offset = CONV_SHORT (name_offset);
|
||||
status = lseek(fd, mz_header->ne_offset + ne_header->iname_tab_offset +
|
||||
name_offset, SEEK_SET);
|
||||
length = 0;
|
||||
read(fd, &length, 1); /* Get the length byte */
|
||||
length = CONV_CHAR_TO_LONG (length);
|
||||
read(fd, buffer, length);
|
||||
|
||||
lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->iname_tab_offset + name_offset, SEEK_SET);
|
||||
read(wpnt->fd, &length, 1); /* Get the length byte */
|
||||
read(wpnt->fd, buffer, length);
|
||||
buffer[length] = 0;
|
||||
|
||||
/* Module names are always upper case */
|
||||
@ -191,33 +75,23 @@ GetModuleName(struct w_files * wpnt, int index, char *buffer)
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
#ifndef WINELIB
|
||||
/**********************************************************************
|
||||
* FixupSegment
|
||||
* NE_FixupSegment
|
||||
*/
|
||||
int
|
||||
FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
int NE_FixupSegment(struct w_files *wpnt, int segment_num)
|
||||
{
|
||||
struct mz_header_s *mz_header = wpnt->mz_header;
|
||||
struct ne_header_s *ne_header = wpnt->ne->ne_header;
|
||||
struct ne_segment_table_entry_s *seg_table = wpnt->ne->seg_table;
|
||||
struct segment_descriptor_s *selector_table = wpnt->ne->selector_table;
|
||||
struct relocation_entry_s *rep, *rep1;
|
||||
struct ne_segment_table_entry_s *seg;
|
||||
struct segment_descriptor_s *sel;
|
||||
int status;
|
||||
int status, ordinal, i, n_entries, additive;
|
||||
unsigned short *sp;
|
||||
unsigned int selector, address;
|
||||
unsigned int next_addr;
|
||||
int ordinal;
|
||||
char dll_name[257];
|
||||
char func_name[257];
|
||||
int i, n_entries;
|
||||
int additive;
|
||||
unsigned int selector, address, next_addr;
|
||||
unsigned char dll_name[257], func_name[257];
|
||||
|
||||
seg = &seg_table[segment_num];
|
||||
seg = &wpnt->ne->seg_table[segment_num];
|
||||
sel = &selector_table[segment_num];
|
||||
|
||||
dprintf_fixup(stddeb, "Segment fixups for %s, segment %d, selector %x\n",
|
||||
@ -235,7 +109,7 @@ FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
i = 0x10000;
|
||||
|
||||
status = lseek(wpnt->fd, seg->seg_data_offset *
|
||||
(1 << ne_header->align_shift_count) + i, SEEK_SET);
|
||||
(1 << wpnt->ne->ne_header->align_shift_count) + i, SEEK_SET);
|
||||
n_entries = 0;
|
||||
read(wpnt->fd, &n_entries, sizeof(short int));
|
||||
rep = (struct relocation_entry_s *)
|
||||
@ -262,7 +136,7 @@ FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
additive = 1;
|
||||
|
||||
case NE_RELTYPE_ORDINAL:
|
||||
if (GetModuleName(wpnt, rep->target1,
|
||||
if (NE_GetModuleName(wpnt, rep->target1,
|
||||
dll_name) == NULL)
|
||||
{
|
||||
fprintf(stderr, "NE_RELTYPE_ORDINAL failed");
|
||||
@ -290,17 +164,13 @@ FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
additive = 1;
|
||||
|
||||
case NE_RELTYPE_NAME:
|
||||
if (GetModuleName(wpnt, rep->target1, dll_name)
|
||||
== NULL)
|
||||
{
|
||||
fprintf(stderr,"NE_RELTYPE_NAME failed");
|
||||
if (NE_GetModuleName(wpnt, rep->target1, dll_name) == NULL) {
|
||||
fprintf(stderr,"NE_RELTYPE_NAME failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (GetImportedName(wpnt->fd, mz_header, ne_header,
|
||||
rep->target2, func_name) == NULL)
|
||||
{
|
||||
fprintf(stderr,"getimportedname failed");
|
||||
if (NE_GetImportedName(wpnt, rep->target2, func_name) == NULL) {
|
||||
fprintf(stderr,"NE_getimportedname failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -314,9 +184,8 @@ FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
myerror(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
dprintf_fixup(stddeb,"%d: %s %s.%d: %04x:%04x\n", i + 1,
|
||||
func_name, dll_name, ordinal, selector, address);
|
||||
/* dprintf_fixup(stddeb,"%d: %s %s.%d: %04x:%04x\n", i + 1,
|
||||
func_name, dll_name, ordinal, selector, address);*/
|
||||
break;
|
||||
|
||||
case NE_RELTYPE_INTERNAL:
|
||||
@ -443,14 +312,14 @@ FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NEunloadImage(struct w_files *wpnt)
|
||||
int NE_unloadImage(struct w_files *wpnt)
|
||||
{
|
||||
dprintf_fixup(stdnimp, "NEunloadImage() called!\n");
|
||||
/* free resources, image */
|
||||
return 1;
|
||||
}
|
||||
|
||||
int StartNEprogram(struct w_files *wpnt)
|
||||
int NE_StartProgram(struct w_files *wpnt)
|
||||
{
|
||||
int cs_reg, ds_reg, ss_reg, ip_reg, sp_reg;
|
||||
/*
|
||||
@ -468,28 +337,37 @@ int StartNEprogram(struct w_files *wpnt)
|
||||
return CallToInit16(cs_reg << 16 | ip_reg, ss_reg << 16 | sp_reg, ds_reg);
|
||||
}
|
||||
|
||||
void InitNEDLL(struct w_files *wpnt)
|
||||
void NE_InitDLL(struct w_files *wpnt)
|
||||
{
|
||||
int cs_reg, ds_reg, ip_reg, cx_reg, rv;
|
||||
int cs_reg, ds_reg, ip_reg, cx_reg, di_reg, rv;
|
||||
extern struct w_files *current_exe;
|
||||
/*
|
||||
* Is this a library?
|
||||
*/
|
||||
if (wpnt->ne->ne_header->format_flags & 0x8000)
|
||||
{
|
||||
if (!(wpnt->ne->ne_header->format_flags & 0x0001))
|
||||
{
|
||||
/* Not SINGLEDATA */
|
||||
fprintf(stderr, "Library is not marked SINGLEDATA\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ds_reg = wpnt->ne->selector_table[wpnt->ne->
|
||||
if (!(wpnt->ne->ne_header->format_flags & 0x0001))
|
||||
if(wpnt->ne->ne_header->format_flags & NE_FFLAGS_MULTIPLEDATA
|
||||
|| wpnt->ne->ne_header->auto_data_seg)
|
||||
{
|
||||
/* Not SINGLEDATA */
|
||||
fprintf(stderr, "Library is not marked SINGLEDATA\n");
|
||||
exit(1);
|
||||
} else { /* DATA NONE DLL */
|
||||
ds_reg = current_exe->ne->selector_table[
|
||||
current_exe->ne->ne_header->auto_data_seg-1].selector;
|
||||
cx_reg = 0;
|
||||
} else { /* DATA SINGLE DLL */
|
||||
ds_reg = wpnt->ne->selector_table[wpnt->ne->
|
||||
ne_header->auto_data_seg-1].selector;
|
||||
cs_reg = wpnt->ne->selector_table[wpnt->ne->ne_header->cs-1].selector;
|
||||
ip_reg = wpnt->ne->ne_header->ip;
|
||||
|
||||
cx_reg = wpnt->ne->ne_header->local_heap_length;
|
||||
|
||||
cx_reg = wpnt->ne->ne_header->local_heap_length;
|
||||
}
|
||||
|
||||
cs_reg = wpnt->ne->selector_table[wpnt->ne->ne_header->cs-1].selector;
|
||||
ip_reg = wpnt->ne->ne_header->ip;
|
||||
|
||||
di_reg = wpnt->hinstance;
|
||||
|
||||
if (cs_reg) {
|
||||
dprintf_dll(stddeb,"Initializing %s, cs:ip %04x:%04x, ds %04x, cx %04x\n",
|
||||
wpnt->name, cs_reg, ip_reg, ds_reg, cx_reg);
|
||||
@ -501,4 +379,101 @@ void InitNEDLL(struct w_files *wpnt)
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* NE_LoadImage
|
||||
* Load one NE format executable into memory
|
||||
*/
|
||||
HINSTANCE NE_LoadImage(struct w_files *wpnt)
|
||||
{
|
||||
unsigned int read_size, status, segment;
|
||||
int i;
|
||||
|
||||
wpnt->ne = malloc(sizeof(struct ne_data));
|
||||
wpnt->ne->resnamtab = NULL;
|
||||
wpnt->ne->ne_header = malloc(sizeof(struct ne_header_s));
|
||||
|
||||
lseek(wpnt->fd, wpnt->mz_header->ne_offset, SEEK_SET);
|
||||
if (read(wpnt->fd, wpnt->ne->ne_header, sizeof(struct ne_header_s))
|
||||
!= sizeof(struct ne_header_s))
|
||||
myerror("Unable to read NE header from file");
|
||||
if(!(wpnt->ne->ne_header->format_flags & NE_FFLAGS_LIBMODULE)){
|
||||
if(current_exe)printf("Warning: more than one EXE\n");
|
||||
current_exe=wpnt;
|
||||
}
|
||||
|
||||
#ifndef WINELIB
|
||||
/*
|
||||
* Create segment selectors.
|
||||
*/
|
||||
status = lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->segment_tab_offset,
|
||||
SEEK_SET);
|
||||
read_size = wpnt->ne->ne_header->n_segment_tab *
|
||||
sizeof(struct ne_segment_table_entry_s);
|
||||
wpnt->ne->seg_table = (struct ne_segment_table_entry_s *) malloc(read_size);
|
||||
if (read(wpnt->fd, wpnt->ne->seg_table, read_size) != read_size)
|
||||
myerror("Unable to read segment table header from file");
|
||||
wpnt->ne->selector_table = CreateSelectors(wpnt);
|
||||
if(wpnt->ne->ne_header->auto_data_seg==0)
|
||||
{
|
||||
printf("DATA NONE DLL %s\n",wpnt->name);
|
||||
wpnt->hinstance=current_nodata++;
|
||||
} else
|
||||
wpnt->hinstance = (wpnt->ne->
|
||||
selector_table[wpnt->ne->ne_header->auto_data_seg-1].
|
||||
selector);
|
||||
if (wpnt->hinstance == 0)
|
||||
wpnt->hinstance = 0xf000;
|
||||
#endif
|
||||
/* Get the lookup table. This is used for looking up the addresses
|
||||
of functions that are exported */
|
||||
|
||||
read_size = wpnt->ne->ne_header->entry_tab_length;
|
||||
wpnt->ne->lookup_table = (char *) malloc(read_size);
|
||||
lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->entry_tab_offset, SEEK_SET);
|
||||
if (read(wpnt->fd, wpnt->ne->lookup_table, read_size) != read_size)
|
||||
myerror("Unable to read lookup table header from file");
|
||||
|
||||
/* Get the iname table. This is used for looking up the names
|
||||
of functions that are exported */
|
||||
|
||||
status = lseek(wpnt->fd, wpnt->ne->ne_header->nrname_tab_offset, SEEK_SET);
|
||||
read_size = wpnt->ne->ne_header->nrname_tab_length;
|
||||
wpnt->ne->nrname_table = (char *) malloc(read_size);
|
||||
if (read(wpnt->fd, wpnt->ne->nrname_table, read_size) != read_size)
|
||||
myerror("Unable to read nrname table header from file");
|
||||
|
||||
status = lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->rname_tab_offset, SEEK_SET);
|
||||
read_size = wpnt->ne->ne_header->moduleref_tab_offset -
|
||||
wpnt->ne->ne_header->rname_tab_offset;
|
||||
wpnt->ne->rname_table = (char *) malloc(read_size);
|
||||
if (read(wpnt->fd, wpnt->ne->rname_table, read_size) != read_size)
|
||||
myerror("Unable to read rname table header from file");
|
||||
|
||||
/*
|
||||
* Now load any DLLs that this module refers to.
|
||||
*/
|
||||
for(i=0; i<wpnt->ne->ne_header->n_mod_ref_tab; i++)
|
||||
{
|
||||
char buff[14];
|
||||
NE_GetModuleName(wpnt, i + 1, buff);
|
||||
|
||||
if (strcasecmp(buff, wpnt->name) != 0 )
|
||||
LoadImage(buff, DLL, 0);
|
||||
}
|
||||
#ifndef WINELIB
|
||||
/* fixup references */
|
||||
|
||||
for (segment = 0; segment < wpnt->ne->ne_header->n_segment_tab; segment++)
|
||||
if (NE_FixupSegment(wpnt, segment) < 0)
|
||||
myerror("fixup failed.");
|
||||
|
||||
FixupFunctionPrologs(wpnt);
|
||||
InitializeLoadedDLLs(wpnt);
|
||||
#endif
|
||||
return(wpnt->hinstance);
|
||||
}
|
||||
|
||||
#endif /* !WINELIB */
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: ne_resource.c,v 1.4 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -13,6 +14,8 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include "peexe.h"
|
||||
#include "arch.h"
|
||||
#include "dlls.h"
|
||||
#include "library.h"
|
||||
#include "heap.h"
|
||||
#include "resource.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "dlls.h"
|
||||
#include "neexe.h"
|
||||
#include "peexe.h"
|
||||
#include "pe_image.h"
|
||||
|
||||
#define MAP_ANONYMOUS 0x20
|
||||
|
||||
@ -133,10 +134,10 @@ static void dump_table(struct w_files *wpnt)
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* LoadPEImage
|
||||
* PE_LoadImage
|
||||
* Load one PE format executable into memory
|
||||
*/
|
||||
HINSTANCE LoadPEImage(struct w_files *wpnt)
|
||||
HINSTANCE PE_LoadImage(struct w_files *wpnt)
|
||||
{
|
||||
int i, result;
|
||||
|
||||
@ -159,8 +160,8 @@ HINSTANCE LoadPEImage(struct w_files *wpnt)
|
||||
for(i=0; i < wpnt->pe->pe_header->coff.NumberOfSections; i++)
|
||||
{
|
||||
if(!load_addr) {
|
||||
result = xmmap(0, wpnt->pe->pe_seg[i].Size_Of_Raw_Data, 7, MAP_PRIVATE,
|
||||
wpnt->fd, wpnt->pe->pe_seg[i].PointerToRawData);
|
||||
result = xmmap((char *)0, wpnt->pe->pe_seg[i].Size_Of_Raw_Data, 7,
|
||||
MAP_PRIVATE, wpnt->fd, wpnt->pe->pe_seg[i].PointerToRawData);
|
||||
load_addr = (unsigned int) result - wpnt->pe->pe_seg[i].Virtual_Address;
|
||||
} else {
|
||||
result = xmmap((char *) load_addr + wpnt->pe->pe_seg[i].Virtual_Address,
|
||||
@ -190,20 +191,20 @@ HINSTANCE LoadPEImage(struct w_files *wpnt)
|
||||
return (wpnt->hinstance);
|
||||
}
|
||||
|
||||
int PEunloadImage(struct w_files *wpnt)
|
||||
int PE_UnloadImage(struct w_files *wpnt)
|
||||
{
|
||||
printf("PEunloadImage() called!\n");
|
||||
/* free resources, image, unmap */
|
||||
return 1;
|
||||
}
|
||||
|
||||
int StartPEprogram(struct w_files *wpnt)
|
||||
int PE_StartProgram(struct w_files *wpnt)
|
||||
{
|
||||
printf("StartPEprogram() called!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void InitPEDLL(struct w_files *wpnt)
|
||||
void PE_InitDLL(struct w_files *wpnt)
|
||||
{
|
||||
/* Is this a library? */
|
||||
if (wpnt->pe->pe_header->coff.Characteristics & IMAGE_FILE_DLL) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) 1994 Erik Bos <erik@hacktic.nl>
|
||||
* (c) 1994 Erik Bos <erik@xs4all.nl>
|
||||
*
|
||||
* based on Eric Youndale's pe-test and:
|
||||
*
|
||||
@ -17,10 +17,10 @@
|
||||
#include "neexe.h"
|
||||
#include "peexe.h"
|
||||
#include "dlls.h"
|
||||
#include "pe_image.h"
|
||||
#include "resource.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_RESOURCE */
|
||||
/* #undef DEBUG_RESOURCE */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: resource.c,v 1.4 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -9,27 +10,22 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include "arch.h"
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
#include "gdi.h"
|
||||
#include "wine.h"
|
||||
#include "neexe.h"
|
||||
#include "icon.h"
|
||||
#include "menu.h"
|
||||
#include "accel.h"
|
||||
#include "dlls.h"
|
||||
#include "resource.h"
|
||||
#include "library.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_RESOURCE */
|
||||
/* #undef DEBUG_RESOURCE */
|
||||
/* #define DEBUG_ACCEL */
|
||||
/* #undef DEBUG_ACCEL */
|
||||
#include "debug.h"
|
||||
#include "../rc/sysresbm.h"
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
RESOURCE *Top = NULL;
|
||||
extern HINSTANCE hSysRes;
|
||||
|
||||
extern int NE_FindResource(HANDLE, LPSTR, LPSTR, RESOURCE *);
|
||||
extern int PE_FindResource(HANDLE, LPSTR, LPSTR, RESOURCE *);
|
||||
@ -50,13 +46,13 @@ HANDLE FindResource(HANDLE instance, LPSTR name, LPSTR type)
|
||||
RESOURCE *r;
|
||||
HANDLE rh;
|
||||
|
||||
#ifdef DEBUG_RESOURCE
|
||||
if(debugging_resource){
|
||||
printf("FindResource(%04X", instance);
|
||||
PrintId(name);
|
||||
PrintId(type);
|
||||
printf(")\n");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
if (instance == (HANDLE)NULL)
|
||||
instance = hSysRes;
|
||||
|
||||
@ -364,11 +360,11 @@ HICON LoadIcon(HANDLE instance, LPSTR icon_name)
|
||||
int image_size;
|
||||
HBITMAP hbmpOld1, hbmpOld2;
|
||||
|
||||
#ifdef DEBUG_RESOURCE
|
||||
if(debugging_resource){
|
||||
printf("LoadIcon(%04X", instance);
|
||||
PrintId(icon_name);
|
||||
printf(")\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!(hdc = GetDC(GetDesktopWindow()))) return 0;
|
||||
rsc_mem = RSC_LoadResource(instance, icon_name, (LPSTR) NE_RSCTYPE_GROUP_ICON,
|
||||
@ -545,11 +541,11 @@ HANDLE LoadAccelerators(HANDLE instance, LPSTR lpTableName)
|
||||
ACCELHEADER *lpAccelTbl;
|
||||
int i, image_size, n;
|
||||
|
||||
#ifdef DEBUG_ACCEL
|
||||
if(debugging_accel){
|
||||
printf("LoadAccelerators(%04X", instance);
|
||||
PrintId(lpTableName);
|
||||
printf(")\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
rsc_mem = RSC_LoadResource(instance, lpTableName, (LPSTR) NE_RSCTYPE_ACCELERATOR,
|
||||
&image_size);
|
||||
@ -696,11 +692,11 @@ HMENU LoadMenu(HINSTANCE instance, char *menu_name)
|
||||
HANDLE hMenu_desc;
|
||||
MENU_HEADER *menu_desc;
|
||||
|
||||
#ifdef DEBUG_MENU
|
||||
if(debugging_menu){
|
||||
printf("LoadMenu(%04X", instance);
|
||||
PrintId(menu_name);
|
||||
printf(")\n");
|
||||
#endif
|
||||
}
|
||||
if (menu_name == NULL)
|
||||
return 0;
|
||||
|
||||
@ -725,11 +721,11 @@ LoadBitmap(HANDLE instance, LPSTR bmp_name)
|
||||
int image_size;
|
||||
int size;
|
||||
|
||||
#ifdef DEBUG_RESOURCE
|
||||
if(debugging_resource){
|
||||
printf("LoadBitmap(%04X", instance);
|
||||
PrintId(bmp_name);
|
||||
printf(")\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!instance) {
|
||||
struct ResourceTable *it;
|
||||
@ -737,7 +733,7 @@ LoadBitmap(HANDLE instance, LPSTR bmp_name)
|
||||
if (hbitmap)
|
||||
return hbitmap;
|
||||
/* Load from sysresbm */
|
||||
dprintf_resource(stddeb,"Searching for %d\n",bmp_name);
|
||||
dprintf_resource(stddeb,"Searching for %d\n", (int) bmp_name);
|
||||
for(it=sysresbmTable;it->value;it++){
|
||||
if(it->type==NE_RSCTYPE_BITMAP)
|
||||
if((((int)bmp_name & 0xFFFF0000) == 0))
|
||||
|
@ -1,7 +1,8 @@
|
||||
#ifndef WINELIB
|
||||
/*
|
||||
static char RCSId[] = "$Id: selector.c,v 1.3 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -10,7 +11,6 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/mman.h>
|
||||
#include <linux/unistd.h>
|
||||
@ -27,11 +27,11 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include "neexe.h"
|
||||
#include "segmem.h"
|
||||
#include "wine.h"
|
||||
#include "if1632.h"
|
||||
#include "windows.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_SELECTORS */
|
||||
/* #undef DEBUG_SELECTORS */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -854,6 +854,7 @@ CreateSelectors(struct w_files * wpnt)
|
||||
int old_length, file_image_length;
|
||||
int saved_old_length;
|
||||
|
||||
auto_data_sel=0;
|
||||
/*
|
||||
* Allocate memory for the table to keep track of all selectors.
|
||||
*/
|
||||
@ -966,6 +967,7 @@ CreateSelectors(struct w_files * wpnt)
|
||||
}
|
||||
}
|
||||
|
||||
if(!auto_data_sel)dprintf_selectors(stddeb,"Warning: No auto_data_sel\n");
|
||||
s = selectors;
|
||||
for (i = 0; i < ne_header->n_segment_tab; i++, s++)
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <setjmp.h>
|
||||
@ -20,20 +21,12 @@
|
||||
#endif
|
||||
|
||||
#include "wine.h"
|
||||
#include "dos_fs.h"
|
||||
#include "segmem.h"
|
||||
#include "prototypes.h"
|
||||
#include "miscemu.h"
|
||||
#include "win.h"
|
||||
|
||||
extern int do_int10(struct sigcontext_struct *);
|
||||
extern int do_int13(struct sigcontext_struct *);
|
||||
extern int do_int15(struct sigcontext_struct *);
|
||||
extern int do_int16(struct sigcontext_struct *);
|
||||
extern int do_int25(struct sigcontext_struct *);
|
||||
extern int do_int26(struct sigcontext_struct *);
|
||||
extern int do_int2a(struct sigcontext_struct *);
|
||||
extern int do_int2f(struct sigcontext_struct *);
|
||||
extern int do_int31(struct sigcontext_struct *);
|
||||
|
||||
#if !defined(BSD4_4) || defined(linux) || defined(__FreeBSD__)
|
||||
char * cstack[4096];
|
||||
#endif
|
||||
@ -75,7 +68,7 @@ int do_int(int intnum, struct sigcontext_struct *scp)
|
||||
case 0x13: return do_int13(scp);
|
||||
case 0x15: return do_int15(scp);
|
||||
case 0x16: return do_int16(scp);
|
||||
case 0x1A: return do_int1A(scp);
|
||||
case 0x1a: return do_int1a(scp);
|
||||
case 0x21: return do_int21(scp);
|
||||
|
||||
case 0x22:
|
||||
@ -157,6 +150,26 @@ static void win_fault(int signal, int code, struct sigcontext *scp)
|
||||
scp->sc_eip += 2; /* Bypass the int instruction */
|
||||
break;
|
||||
|
||||
case 0xe4: /* inb al,XX */
|
||||
inportb_abs(scp);
|
||||
scp->sc_eip += 2;
|
||||
break;
|
||||
|
||||
case 0xe5: /* in ax,XX */
|
||||
inport_abs(scp);
|
||||
scp->sc_eip += 2;
|
||||
break;
|
||||
|
||||
case 0xe6: /* outb XX,al */
|
||||
outportb_abs(scp);
|
||||
scp->sc_eip += 2;
|
||||
break;
|
||||
|
||||
case 0xe7: /* out XX,ax */
|
||||
outport_abs(scp);
|
||||
scp->sc_eip += 2;
|
||||
break;
|
||||
|
||||
case 0xec: /* inb al,dx */
|
||||
inportb(scp);
|
||||
scp->sc_eip++;
|
||||
|
@ -1,30 +1,26 @@
|
||||
/*
|
||||
* Tasks functions
|
||||
*/
|
||||
*
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include "windows.h"
|
||||
#include "wine.h"
|
||||
#include "if1632.h"
|
||||
#include "task.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_TASK */
|
||||
/* #undef DEBUG_TASK */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
static LPWINETASKENTRY lpTaskList = NULL;
|
||||
static int nTaskCount = 0;
|
||||
|
||||
/**********************************************************************
|
||||
* GetCurrentTask [KERNEL.36]
|
||||
*/
|
||||
HTASK GetCurrentTask()
|
||||
HTASK GetCurrentTask(void)
|
||||
{
|
||||
LPWINETASKENTRY lpTask = lpTaskList;
|
||||
int pid = getpid();
|
||||
@ -43,7 +39,7 @@ HTASK GetCurrentTask()
|
||||
/**********************************************************************
|
||||
* GetNumTasks [KERNEL.152]
|
||||
*/
|
||||
WORD GetNumTasks()
|
||||
WORD GetNumTasks(void)
|
||||
{
|
||||
dprintf_task(stddeb,"GetNumTasks() returned %d !\n", nTaskCount);
|
||||
return nTaskCount;
|
||||
@ -89,7 +85,8 @@ BOOL EnumTaskWindows(HANDLE hTask, FARPROC lpEnumFunc, LONG lParam)
|
||||
BOOL bRet;
|
||||
int count = 0;
|
||||
LPWINETASKENTRY lpTask = lpTaskList;
|
||||
dprintf_task(stddeb,"EnumTaskWindows(%04X, %08X, %08X) !\n", hTask, lpEnumFunc, lParam);
|
||||
dprintf_task(stddeb,"EnumTaskWindows(%04X, %08X, %08X) !\n", hTask,
|
||||
(unsigned int) lpEnumFunc, (unsigned int) lParam);
|
||||
while (TRUE) {
|
||||
if (lpTask->te.hTask == hTask) break;
|
||||
if (lpTask == NULL) {
|
||||
|
@ -1,18 +1,21 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: global.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
*/
|
||||
|
||||
#define GLOBAL_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "windows.h"
|
||||
#include "prototypes.h"
|
||||
#include "toolhelp.h"
|
||||
#include "heap.h"
|
||||
#include "segmem.h"
|
||||
#include "selectors.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_HEAP /* */
|
||||
/* #undef DEBUG_HEAP /* */
|
||||
/* #define DEBUG_HEAP */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -182,7 +185,7 @@ GlobalAlloc(unsigned int flags, unsigned long size)
|
||||
GDESC *g_prev;
|
||||
void *m;
|
||||
|
||||
dprintf_heap(stddeb,"GlobalAlloc flags %4X, size %d\n", flags, size);
|
||||
dprintf_heap(stddeb,"GlobalAlloc flags %4X, size %ld\n", flags, size);
|
||||
|
||||
if (size == 0) size = 1;
|
||||
|
||||
@ -259,7 +262,7 @@ GlobalAlloc(unsigned int flags, unsigned long size)
|
||||
* We have a new block. Let's create a GDESC entry for it.
|
||||
*/
|
||||
g = malloc(sizeof(*g));
|
||||
dprintf_heap(stddeb,"New GDESC %08x\n", g);
|
||||
dprintf_heap(stddeb,"New GDESC %08x\n", (unsigned int) g);
|
||||
if (g == NULL)
|
||||
return 0;
|
||||
|
||||
@ -356,7 +359,7 @@ GlobalLock(unsigned int block)
|
||||
|
||||
g->lock_count++;
|
||||
|
||||
dprintf_heap(stddeb,"GlobalLock: returning %08x\n", g->addr);
|
||||
dprintf_heap(stddeb,"GlobalLock: returning %08x\n",(unsigned int)g->addr);
|
||||
return g->addr;
|
||||
}
|
||||
|
||||
@ -621,7 +624,7 @@ GlobalReAlloc(unsigned int block, unsigned int new_size, unsigned int flags)
|
||||
{
|
||||
GDESC *g_new;
|
||||
GDESC *g_start = g;
|
||||
int old_segments = g_start->length;
|
||||
/* int old_segments = g_start->length;*/
|
||||
unsigned short next_handle = g_start->handle;
|
||||
|
||||
for (i = 1; i <= n_segments; i++, g = g->next)
|
||||
@ -815,7 +818,7 @@ DWORD GetFreeSpace(UINT wFlags)
|
||||
if (free_map[i] == 1)
|
||||
total_free++;
|
||||
|
||||
dprintf_heap(stddeb,"GetFreeSpace // return %ld !\n", total_free << 16);
|
||||
dprintf_heap(stddeb,"GetFreeSpace // return %ld !\n", (long) (total_free << 16));
|
||||
return total_free << 16;
|
||||
}
|
||||
|
||||
|
101
memory/heap.c
101
memory/heap.c
@ -1,5 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: heap.c,v 1.3 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -8,9 +10,9 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include "segmem.h"
|
||||
#include "heap.h"
|
||||
#include "regfunc.h"
|
||||
#include "dlls.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_HEAP /* */
|
||||
/* #undef DEBUG_HEAP /* */
|
||||
/* #define DEBUG_HEAP */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -22,8 +24,16 @@ HEAP_CheckHeap(MDESC **free_list)
|
||||
MDESC *m;
|
||||
|
||||
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);
|
||||
*(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);
|
||||
*(char *)0 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
@ -49,11 +59,9 @@ HEAP_Alloc(MDESC **free_list, int flags, int bytes)
|
||||
{
|
||||
MDESC *m, *m_new;
|
||||
|
||||
dprintf_heap(stddeb,"HeapAlloc: free_list %08x, flags %x, bytes %d\n",
|
||||
free_list, flags, bytes);
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
dprintf_heap(stddeb,"HeapAlloc: free_list %08x(%08x), flags %x, bytes %d\n",
|
||||
(unsigned int) free_list, (unsigned int) *free_list, flags, bytes);
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
|
||||
/*
|
||||
* Find free block big enough.
|
||||
@ -86,10 +94,9 @@ HEAP_Alloc(MDESC **free_list, int flags, int bytes)
|
||||
m->flags = 0;
|
||||
if (flags & GLOBAL_FLAGS_ZEROINIT)
|
||||
memset(m + 1, 0, bytes);
|
||||
dprintf_heap(stddeb,"HeapAlloc: returning %08x\n", (m + 1));
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
dprintf_heap(stddeb,"HeapAlloc: returning %08x\n",
|
||||
(unsigned int) (m + 1));
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
return (void *) (m + 1);
|
||||
}
|
||||
}
|
||||
@ -110,17 +117,14 @@ HEAP_Alloc(MDESC **free_list, int flags, int bytes)
|
||||
m->flags = 0;
|
||||
if (flags & GLOBAL_FLAGS_ZEROINIT)
|
||||
memset(m + 1, 0, bytes);
|
||||
dprintf_heap(stddeb,"HeapAlloc: returning %08x\n", (m + 1));
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
dprintf_heap(stddeb,"HeapAlloc: returning %08x\n",
|
||||
(unsigned int) (m + 1));
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
return (void *) (m + 1);
|
||||
}
|
||||
|
||||
dprintf_heap(stddeb,"HeapAlloc: returning %08x\n", 0);
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -143,15 +147,19 @@ HEAP_ReAlloc(MDESC **free_list, void *old_block,
|
||||
*/
|
||||
m = (MDESC *) old_block - 1;
|
||||
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc new_size=%d !\n", new_size);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc old_block=%08X !\n", old_block);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc m=%08X free_list=%08X !\n", m,free_list);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc m->prev=%08X !\n", m->prev);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc m->next=%08X !\n", m->next);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc *free_list=%08X !\n", *free_list);
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc new_size=%d !\n",
|
||||
(unsigned int) new_size);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc old_block=%08X !\n",
|
||||
(unsigned int) old_block);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc m=%08X free_list=%08X !\n",
|
||||
(unsigned int) m, (unsigned int) free_list);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc m->prev=%08X !\n",
|
||||
(unsigned int) m->prev);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc m->next=%08X !\n",
|
||||
(unsigned int) m->next);
|
||||
dprintf_heap(stddeb,"HEAP_ReAlloc *free_list=%08X !\n",
|
||||
(unsigned int) *free_list);
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
|
||||
if (m->prev != m || m->next != m ||
|
||||
((int) m & 0xffff0000) != ((int) *free_list & 0xffff0000))
|
||||
@ -179,9 +187,7 @@ HEAP_ReAlloc(MDESC **free_list, void *old_block,
|
||||
return NULL;
|
||||
memcpy(new_p, old_block, m->length);
|
||||
HEAP_Free(free_list, old_block);
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
return new_p;
|
||||
}
|
||||
|
||||
@ -214,9 +220,7 @@ HEAP_ReAlloc(MDESC **free_list, void *old_block,
|
||||
HEAP_Free(free_list, m_free + 1);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
return old_block;
|
||||
}
|
||||
|
||||
@ -233,9 +237,7 @@ HEAP_Free(MDESC **free_list, void *block)
|
||||
|
||||
dprintf_heap(stddeb,"HeapFree: free_list %08x, block %08x\n",
|
||||
free_list, block);
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
|
||||
/*
|
||||
* Validate pointer.
|
||||
@ -332,12 +334,26 @@ HEAP_Free(MDESC **free_list, void *block)
|
||||
m_free->next = NULL;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_HEAP
|
||||
HEAP_CheckHeap(free_list);
|
||||
#endif
|
||||
if(debugging_heap)HEAP_CheckHeap(free_list);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* HEAP_CheckLocalHeaps
|
||||
*/
|
||||
void
|
||||
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",
|
||||
lh,lh->free_list);
|
||||
HEAP_CheckHeap(&lh->free_list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* HEAP_LocalFindHeap
|
||||
*/
|
||||
@ -345,15 +361,17 @@ LHEAP *
|
||||
HEAP_LocalFindHeap(unsigned short owner)
|
||||
{
|
||||
LHEAP *lh;
|
||||
extern struct w_files *current_exe;
|
||||
|
||||
dprintf_heap(stddeb,"HEAP_LocalFindHeap: owner %04x\n", owner);
|
||||
|
||||
|
||||
for (lh = LocalHeaps; lh != NULL; lh = lh->next)
|
||||
{
|
||||
if (lh->selector == owner)
|
||||
return lh;
|
||||
}
|
||||
|
||||
dprintf_heap(stddeb,"Warning: Local heap not found\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -380,6 +398,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);
|
||||
LocalHeaps = lh;
|
||||
}
|
||||
|
||||
@ -408,7 +427,7 @@ WIN16_LocalAlloc(int flags, int bytes)
|
||||
void *m;
|
||||
|
||||
dprintf_heap(stddeb,"WIN16_LocalAlloc: flags %x, bytes %d\n", flags,bytes);
|
||||
dprintf_heap(stddeb," called from segment %04x\n", Stack16Frame[11]);
|
||||
dprintf_heap(stddeb," called from segment %04x, ds=%04x\n", Stack16Frame[11],Stack16Frame[6]);
|
||||
|
||||
m = HEAP_Alloc(LOCALHEAP(), flags, bytes);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id$";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1994";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -73,7 +73,7 @@ static BOOL ATOM_InitTable( ATOMTABLE ** table, WORD entries )
|
||||
}
|
||||
else
|
||||
{
|
||||
handle = LocalAlign ( LMEM_MOVEABLE, sizeof(ATOMTABLE) +
|
||||
handle = (HANDLE) LocalAlign ( LMEM_MOVEABLE, sizeof(ATOMTABLE) +
|
||||
(entries-1) * sizeof(HANDLE) );
|
||||
if (!handle)
|
||||
return FALSE;
|
||||
|
@ -2,9 +2,8 @@
|
||||
* 'Wine' Clipboard function handling
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -18,9 +17,8 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
#include "prototypes.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "clipboard.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_CLIPBOARD /* */
|
||||
/* #undef DEBUG_CLIPBOARD /* */
|
||||
#include "debug.h"
|
||||
|
||||
typedef struct tagCLIPFORMAT {
|
||||
@ -304,6 +302,8 @@ BOOL ChangeClipboardChain(HWND hWnd, HWND hWndNext)
|
||||
{
|
||||
dprintf_clipboard(stdnimp,
|
||||
"ChangeClipboardChain(%04X, %04X) !\n", hWnd, hWndNext);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -343,6 +343,8 @@ int GetPriorityClipboardFormat(WORD FAR *lpPriorityList, short nCount)
|
||||
{
|
||||
dprintf_clipboard(stdnimp,
|
||||
"GetPriorityClipboardFormat(%p, %d) !\n", lpPriorityList, nCount);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,19 +2,22 @@
|
||||
* COMMDLG functions
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
*/
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
*/
|
||||
|
||||
/*
|
||||
#define DEBUG_OPENDLG
|
||||
#define DEBUG_OPENDLG_DRAW
|
||||
*/
|
||||
|
||||
#include "stdio.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "dialog.h"
|
||||
#include "win.h"
|
||||
#include "user.h"
|
||||
#include "message.h"
|
||||
#include "library.h"
|
||||
#include "heap.h"
|
||||
#include "commdlg.h"
|
||||
#include "dlgs.h"
|
||||
@ -22,8 +25,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
#define OPENFILEDLG2 11
|
||||
#define SAVEFILEDLG2 12
|
||||
|
||||
|
||||
extern HINSTANCE hSysRes;
|
||||
static DWORD CommDlgLastError = 0;
|
||||
|
||||
static HBITMAP hFolder = 0;
|
||||
|
@ -25,9 +25,10 @@
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
#include "wine.h"
|
||||
#include "windows.h"
|
||||
#include "msdos.h"
|
||||
#include "prototypes.h"
|
||||
/* #include "dos_fs.h" */
|
||||
#include "autoconf.h"
|
||||
#include "comm.h"
|
||||
#include "stddebug.h"
|
||||
@ -178,8 +179,6 @@ WORD DOS_GetEquipment(void)
|
||||
int parallelports = 0;
|
||||
int serialports = 0;
|
||||
int x;
|
||||
extern struct DosDeviceStruct COM[MAX_PORTS];
|
||||
extern struct DosDeviceStruct LPT[MAX_PORTS];
|
||||
|
||||
/* borrowed from Ralph Brown's interrupt lists
|
||||
|
||||
@ -255,7 +254,7 @@ int DOS_ValidDirectory(char *name)
|
||||
char *dirname;
|
||||
struct stat s;
|
||||
dprintf_dosfs(stddeb, "DOS_ValidDirectory: '%s'\n", name);
|
||||
if ((dirname = GetUnixFileName(name)) == NULL)
|
||||
if ((dirname = DOS_GetUnixFileName(name)) == NULL)
|
||||
return 0;
|
||||
if (stat(dirname,&s))
|
||||
return 0;
|
||||
@ -392,7 +391,7 @@ static void GetUnixDirName(char *rootdir, char *name)
|
||||
|
||||
}
|
||||
|
||||
char *GetUnixFileName(char *dosfilename)
|
||||
char *DOS_GetUnixFileName(char *dosfilename)
|
||||
{
|
||||
/* a:\windows\system.ini => /dos/windows/system.ini */
|
||||
|
||||
@ -418,7 +417,7 @@ char *GetUnixFileName(char *dosfilename)
|
||||
return(temp);
|
||||
}
|
||||
|
||||
char *GetDosFileName(char *unixfilename)
|
||||
char *DOS_GetDosFileName(char *unixfilename)
|
||||
{
|
||||
int i;
|
||||
static char temp[256], rootdir[256];
|
||||
@ -555,7 +554,7 @@ int DOS_GetFreeSpace(int drive, long *size, long *available)
|
||||
return 1;
|
||||
}
|
||||
|
||||
char *FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
||||
char *DOS_FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
||||
char *path)
|
||||
{
|
||||
char *workingpath, *dirname, *rootname, **e;
|
||||
@ -566,7 +565,7 @@ char *FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
||||
|
||||
if (strchr(filename, '\\') != NULL)
|
||||
{
|
||||
strncpy(buffer, GetUnixFileName(filename), buflen);
|
||||
strncpy(buffer, DOS_GetUnixFileName(filename), buflen);
|
||||
stat( buffer, &filestat);
|
||||
if (S_ISREG(filestat.st_mode))
|
||||
return buffer;
|
||||
@ -580,7 +579,7 @@ char *FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
||||
return buffer;
|
||||
}
|
||||
|
||||
dprintf_dosfs(stddeb,"FindFile: looking for %s\n", filename);
|
||||
dprintf_dosfs(stddeb,"DOS_FindFile: looking for %s\n", filename);
|
||||
rootnamelen = strlen(filename);
|
||||
rootname = strdup(filename);
|
||||
ToUnix(rootname);
|
||||
@ -591,7 +590,7 @@ char *FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
||||
dirname = strtok(NULL, ";"))
|
||||
{
|
||||
if (strchr(dirname, '\\') != NULL)
|
||||
d = opendir( GetUnixFileName(dirname) );
|
||||
d = opendir( DOS_GetUnixFileName(dirname) );
|
||||
else
|
||||
d = opendir( dirname );
|
||||
|
||||
@ -618,7 +617,7 @@ char *FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
||||
if (found)
|
||||
{
|
||||
if (strchr(dirname, '\\') != NULL)
|
||||
strncpy(buffer, GetUnixFileName(dirname), buflen);
|
||||
strncpy(buffer, DOS_GetUnixFileName(dirname), buflen);
|
||||
else
|
||||
strncpy(buffer, dirname, buflen);
|
||||
|
||||
@ -679,7 +678,7 @@ char *WinIniFileName(void)
|
||||
|
||||
name = malloc(1024);
|
||||
|
||||
strcpy(name, GetUnixFileName(WindowsDirectory));
|
||||
strcpy(name, DOS_GetUnixFileName(WindowsDirectory));
|
||||
strcat(name, "/");
|
||||
strcat(name, "win.ini");
|
||||
|
||||
@ -732,7 +731,7 @@ struct dosdirent *DOS_opendir(char *dosdirname)
|
||||
if (x == MAX_OPEN_DIRS)
|
||||
return NULL;
|
||||
|
||||
if ((unixdirname = GetUnixFileName(dosdirname)) == NULL)
|
||||
if ((unixdirname = DOS_GetUnixFileName(dosdirname)) == NULL)
|
||||
return NULL;
|
||||
|
||||
strcpy(temp, unixdirname);
|
||||
|
@ -2,9 +2,8 @@
|
||||
* Wine Drivers functions
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
@ -13,13 +12,11 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
#include "dlls.h"
|
||||
#include "driver.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_DRIVER /* */
|
||||
/* #undef DEBUG_DRIVER /* */
|
||||
#include "debug.h"
|
||||
|
||||
LPDRIVERITEM lpDrvItemList = NULL;
|
||||
|
||||
void LoadStartupDrivers()
|
||||
void LoadStartupDrivers(void)
|
||||
{
|
||||
HDRVR hDrv;
|
||||
char str[256];
|
||||
|
@ -2,9 +2,9 @@
|
||||
* Escape() function.
|
||||
*
|
||||
* Copyright 1994 Bob Amstadt
|
||||
*/
|
||||
|
||||
*
|
||||
static char Copyright[] = "Copyright Bob Amstadt, 1994";
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
16
misc/exec.c
16
misc/exec.c
@ -11,11 +11,12 @@
|
||||
#include "segmem.h"
|
||||
#include "prototypes.h"
|
||||
#include "dlls.h"
|
||||
#include "wine.h"
|
||||
#include "windows.h"
|
||||
#include "if1632.h"
|
||||
#include "callback.h"
|
||||
#include "library.h"
|
||||
#include "ne_image.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_EXEC /* */
|
||||
/* #undef DEBUG_EXEC /* */
|
||||
#include "debug.h"
|
||||
|
||||
#define HELP_CONTEXT 0x0001
|
||||
@ -33,8 +34,6 @@
|
||||
#define HELP_MULTIKEY 0x0201
|
||||
#define HELP_SETWINPOS 0x0203
|
||||
|
||||
extern struct w_files * wine_files;
|
||||
|
||||
typedef struct {
|
||||
WORD wEnvSeg;
|
||||
LPSTR lpCmdLine;
|
||||
@ -44,9 +43,6 @@ typedef struct {
|
||||
|
||||
typedef BOOL (CALLBACK * LPFNWINMAIN)(HANDLE, HANDLE, LPSTR, int);
|
||||
|
||||
|
||||
extern int CallToInit16(unsigned long csip, unsigned long sssp,
|
||||
unsigned short ds);
|
||||
HANDLE CreateNewTask(HINSTANCE hInst);
|
||||
|
||||
#ifndef WINELIB
|
||||
@ -113,7 +109,7 @@ void StartNewTask(HINSTANCE hInst)
|
||||
dprintf_exec(stddeb,"StartNewTask() // before FixupSegment !\n");
|
||||
for(w = wpnt; w; w = w->next) {
|
||||
for (segment = 0; segment < w->ne->ne_header->n_segment_tab; segment++) {
|
||||
if (FixupSegment(w, segment) < 0) {
|
||||
if (NE_FixupSegment(w, segment) < 0) {
|
||||
myerror("fixup failed.");
|
||||
}
|
||||
}
|
||||
@ -227,6 +223,8 @@ BOOL ExitWindows(DWORD dwReserved, WORD wRetCode)
|
||||
{
|
||||
dprintf_exec(stdnimp,"EMPTY STUB !!! ExitWindows(%08lX, %04X) !\n",
|
||||
dwReserved, wRetCode);
|
||||
|
||||
exit(wRetCode);
|
||||
}
|
||||
|
||||
|
||||
|
46
misc/file.c
46
misc/file.c
@ -8,7 +8,7 @@
|
||||
* NOV 93 Erik Bos (erik@xs4all.nl)
|
||||
* - removed ParseDosFileName, and DosDrive structures.
|
||||
* - structures dynamically configured at runtime.
|
||||
* - _lopen modified to use GetUnixFileName.
|
||||
* - _lopen modified to use DOS_GetUnixFileName.
|
||||
* - Existing functions modified to use dosfs functions.
|
||||
* - Added _llseek, _lcreat, GetDriveType, GetTempDrive,
|
||||
* GetWindowsDirectory, GetSystemDirectory, GetTempFileName.
|
||||
@ -22,7 +22,7 @@
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include "prototypes.h"
|
||||
#include "dos_fs.h"
|
||||
#include "regfunc.h"
|
||||
#include "windows.h"
|
||||
#include "wine.h"
|
||||
@ -30,20 +30,11 @@
|
||||
#include "registers.h"
|
||||
#include "options.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_FILE /* */
|
||||
/* #undef DEBUG_FILE /* */
|
||||
#include "debug.h"
|
||||
|
||||
#define MAX_PATH 255
|
||||
|
||||
char WindowsDirectory[256], SystemDirectory[256], TempDirectory[256];
|
||||
extern char WindowsPath[256];
|
||||
|
||||
extern char WindowsPath[];
|
||||
extern WORD ExtendedError;
|
||||
|
||||
|
||||
char *GetDosFileName(char *unixfilename);
|
||||
|
||||
/***************************************************************************
|
||||
_lopen
|
||||
@ -56,7 +47,7 @@ INT _lopen (LPSTR lpPathName, INT iReadWrite)
|
||||
char *UnixFileName;
|
||||
|
||||
dprintf_file(stddeb, "_lopen: open('%s', %X);\n", lpPathName, iReadWrite);
|
||||
if ((UnixFileName = GetUnixFileName(lpPathName)) == NULL)
|
||||
if ((UnixFileName = DOS_GetUnixFileName(lpPathName)) == NULL)
|
||||
return HFILE_ERROR;
|
||||
iReadWrite &= 0x000F;
|
||||
handle = open (UnixFileName, iReadWrite);
|
||||
@ -122,7 +113,6 @@ INT _lclose (INT hFile)
|
||||
**************************************************************************/
|
||||
INT OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
||||
{
|
||||
int handle;
|
||||
#ifndef PROCEMU
|
||||
struct sigcontext_struct ccontext;
|
||||
/* To make macros like EAX happy */
|
||||
@ -155,7 +145,7 @@ INT OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
||||
ofs->nErrCode = 0;
|
||||
*((int*)ofs->reserved) = 0;
|
||||
|
||||
if ((unixfilename = GetUnixFileName (ofs->szPathName)) == NULL)
|
||||
if ((unixfilename = DOS_GetUnixFileName (ofs->szPathName)) == NULL)
|
||||
{
|
||||
errno_to_doserr();
|
||||
ofs->nErrCode = ExtendedError;
|
||||
@ -181,23 +171,23 @@ INT OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
||||
{
|
||||
char temp[MAX_PATH+1];
|
||||
strcpy (filename, lpFileName);
|
||||
if ( (!stat(GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
if ( (!stat(DOS_GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
break;
|
||||
GetWindowsDirectory (filename,MAX_PATH);
|
||||
if ((!filename[0])||(filename[strlen(filename)-1]!='\\'))
|
||||
strcat(filename, "\\");
|
||||
strcat (filename, lpFileName);
|
||||
if ( (!stat(GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
if ( (!stat(DOS_GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
break;
|
||||
GetSystemDirectory (filename,MAX_PATH);
|
||||
if ((!filename[0])||(filename[strlen(filename)-1]!='\\'))
|
||||
strcat(filename, "\\");
|
||||
strcat (filename, lpFileName);
|
||||
if ( (!stat(GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
if ( (!stat(DOS_GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
break;
|
||||
if (!FindFile(temp,MAX_PATH,lpFileName,NULL,WindowsPath))
|
||||
if (!DOS_FindFile(temp,MAX_PATH,lpFileName,NULL,WindowsPath))
|
||||
{
|
||||
strcpy(filename, GetDosFileName(temp));
|
||||
strcpy(filename, DOS_GetDosFileName(temp));
|
||||
break;
|
||||
}
|
||||
strcpy (filename, lpFileName);
|
||||
@ -224,7 +214,7 @@ INT OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
||||
|
||||
/* Now on to getting some information about that file */
|
||||
|
||||
if (res = stat(GetUnixFileName(ofs->szPathName), &s))
|
||||
if ((res = stat(DOS_GetUnixFileName(ofs->szPathName), &s)))
|
||||
{
|
||||
errno_to_doserr();
|
||||
ofs->nErrCode = ExtendedError;
|
||||
@ -232,21 +222,21 @@ INT OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
||||
}
|
||||
|
||||
now = localtime (&s.st_mtime);
|
||||
|
||||
|
||||
if (action & OF_VERIFY)
|
||||
verify_time = *((int*)ofs->reserved);
|
||||
|
||||
|
||||
*((WORD*)(&ofs->reserved[2]))=
|
||||
((now->tm_hour * 0x2000) + (now->tm_min * 0x20) + (now->tm_sec / 2));
|
||||
*((WORD*)(&ofs->reserved[0]))=
|
||||
((now->tm_year * 0x200) + (now->tm_mon * 0x20) + now->tm_mday);
|
||||
|
||||
if (action & OF_EXIST)
|
||||
return 0;
|
||||
|
||||
|
||||
if (action & OF_VERIFY)
|
||||
return (verify_time != *((int*)ofs->reserved));
|
||||
|
||||
|
||||
if (action & OF_EXIST)
|
||||
return 0;
|
||||
|
||||
/* Now we are actually going to open the file. According to Microsoft's
|
||||
Knowledge Basis, this is done by calling int 21h, ax=3dh. */
|
||||
@ -317,7 +307,7 @@ INT _lcreat (LPSTR lpszFilename, INT fnAttribute)
|
||||
|
||||
dprintf_file(stddeb, "_lcreat: filename %s, attributes %d\n",
|
||||
lpszFilename, fnAttribute);
|
||||
if ((UnixFileName = GetUnixFileName(lpszFilename)) == NULL)
|
||||
if ((UnixFileName = DOS_GetUnixFileName(lpszFilename)) == NULL)
|
||||
return HFILE_ERROR;
|
||||
handle = open (UnixFileName, O_CREAT | O_TRUNC | O_WRONLY, 426);
|
||||
|
||||
@ -422,6 +412,8 @@ INT GetTempFileName(BYTE bDriveLetter, LPCSTR lpszPrefixString, UINT uUnique, LP
|
||||
WORD SetErrorMode(WORD x)
|
||||
{
|
||||
dprintf_file(stdnimp,"wine: SetErrorMode %4x (ignored)\n",x);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: keyboard.c,v 1.2 1993/09/13 18:52:02 scott Exp $";
|
||||
static char Copyright[] = "Copyright Scott A. Laird, Erik Bos 1993, 1994";
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -8,8 +10,7 @@ static char Copyright[] = "Copyright Scott A. Laird, Erik Bos 1993, 1994";
|
||||
#include "windows.h"
|
||||
#include "keyboard.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_KEYBOARD /* */
|
||||
/* #undef DEBUG_KEYBOARD /* */
|
||||
/* #define DEBUG_KEYBOARD */
|
||||
#include "debug.h"
|
||||
|
||||
int ToAscii(WORD wVirtKey, WORD wScanCode, LPSTR lpKeyState,
|
||||
|
10
misc/lstr.c
10
misc/lstr.c
@ -1,5 +1,6 @@
|
||||
/*
|
||||
static char Copyright[] = "Copyright Yngvi Sigurjonsson (yngvi@hafro.is), 1993";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -164,15 +165,14 @@ char FAR* AnsiPrev(/*const*/ char FAR* start,char FAR* current)
|
||||
return (current==start)?start:current-1;
|
||||
}
|
||||
|
||||
static char Oem2Ansi[256];
|
||||
static char Ansi2Oem[256];
|
||||
BYTE Oem2Ansi[256], Ansi2Oem[256];
|
||||
|
||||
void InitOemAnsiTranslations(void)
|
||||
{
|
||||
static int inited=0; /* should called called in some init function*/
|
||||
int transfile,i;
|
||||
if(inited) return;
|
||||
if(transfile=open("oem2ansi.trl",O_RDONLY)){
|
||||
if((transfile=open("oem2ansi.trl",O_RDONLY))){
|
||||
read(transfile,Oem2Ansi,256);
|
||||
close(transfile);
|
||||
}
|
||||
@ -180,7 +180,7 @@ void InitOemAnsiTranslations(void)
|
||||
for(i=0;i<256;i++) /* Needs some fixing */
|
||||
Oem2Ansi[i]=i;
|
||||
}
|
||||
if(transfile=open("ansi2oem.trl",O_RDONLY)){
|
||||
if((transfile=open("ansi2oem.trl",O_RDONLY))){
|
||||
read(transfile,Ansi2Oem,256);
|
||||
close(transfile);
|
||||
}
|
||||
|
69
misc/main.c
69
misc/main.c
@ -2,10 +2,9 @@
|
||||
* Main function.
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
*
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -15,15 +14,30 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
#include <X11/Xresource.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include "wine.h"
|
||||
#include "msdos.h"
|
||||
#include "windows.h"
|
||||
#include "comm.h"
|
||||
#include "miscemu.h"
|
||||
#include "winsock.h"
|
||||
#include "options.h"
|
||||
#include "dos_fs.h"
|
||||
#include "desktop.h"
|
||||
#include "prototypes.h"
|
||||
#include "texts.h"
|
||||
#define DEBUG_DEFINE_VARIABLES
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
extern ButtonTexts ButtonText;
|
||||
|
||||
static char people[] = "People who have generously donated time to the Wine " \
|
||||
"project include Bob Amstadt, Martin Ayotte, Erik Bos, John Brezak, "\
|
||||
"Andrew Bulhak, John Burton, Peter Galbavy, Jeffery Hsu, Miguel de Icaza, " \
|
||||
"Alexandre Julliard, Scott A. Laird, Peter MacDonald, David Metcalfe, " \
|
||||
"John Richardson, Johannes Ruscheinski, Yngvi Sigurjonsson, Linus Torvalds, " \
|
||||
"Carl Williams, Karl Guenter Wuensch, and Eric Youngdale. ";
|
||||
|
||||
#define WINE_CLASS "Wine" /* Class name for resources */
|
||||
|
||||
typedef struct tagENVENTRY {
|
||||
@ -44,8 +58,6 @@ int screenWidth = 0, screenHeight = 0; /* Desktop window dimensions */
|
||||
int screenDepth = 0; /* Screen depth to use */
|
||||
int desktopX = 0, desktopY = 0; /* Desktop window position (if any) */
|
||||
|
||||
extern ButtonTexts ButtonText;
|
||||
|
||||
struct options Options =
|
||||
{ /* default options */
|
||||
NULL, /* spyFilename */
|
||||
@ -71,7 +83,6 @@ static XrmOptionDescRec optionsTable[] =
|
||||
{ "-synchronous", ".synchronous", XrmoptionNoArg, (caddr_t)"on" },
|
||||
{ "-spy", ".spy", XrmoptionSepArg, (caddr_t)NULL },
|
||||
{ "-debug", ".debug", XrmoptionNoArg, (caddr_t)"on" },
|
||||
{ "-relaydbg", ".relaydbg", XrmoptionNoArg, (caddr_t)"on" },
|
||||
{ "-debugmsg", ".debugmsg", XrmoptionSepArg, (caddr_t)NULL }
|
||||
};
|
||||
|
||||
@ -91,7 +102,7 @@ static XrmOptionDescRec optionsTable[] =
|
||||
" -synchronous Turn on synchronous display mode\n" \
|
||||
" -backingstore Turn on backing store\n" \
|
||||
" -spy file Turn on message spying to the specified file\n" \
|
||||
" -relaydbg Display call relay information\n" \
|
||||
" -relaydbg Obsolete. Use -debugmsg +relay instead\n" \
|
||||
" -debugmsg name Turn debugging-messages on or off\n"
|
||||
|
||||
|
||||
@ -165,7 +176,6 @@ static int MAIN_GetResource( XrmDatabase db, char *name, XrmValue *value )
|
||||
static void MAIN_GetButtonText( XrmDatabase db, char *name, ButtonDesc *Button)
|
||||
{
|
||||
XrmValue value;
|
||||
char Hotkey;
|
||||
char *i;
|
||||
|
||||
if (MAIN_GetResource( db, name, &value))
|
||||
@ -294,8 +304,6 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
|
||||
Options.synchronous = TRUE;
|
||||
if (MAIN_GetResource( db, ".backingstore", &value ))
|
||||
Options.backingstore = TRUE;
|
||||
if (MAIN_GetResource( db, ".relaydbg", &value ))
|
||||
Options.relay_debug = TRUE;
|
||||
if (MAIN_GetResource( db, ".debug", &value ))
|
||||
Options.debug = TRUE;
|
||||
if (MAIN_GetResource( db, ".spy", &value))
|
||||
@ -346,9 +354,9 @@ static void MAIN_CreateDesktop( int argc, char *argv[] )
|
||||
int flags;
|
||||
unsigned int width = 640, height = 480; /* Default size = 640x480 */
|
||||
char *name = "Wine desktop";
|
||||
XSizeHints size_hints;
|
||||
XWMHints wm_hints;
|
||||
XClassHint class_hints;
|
||||
XSizeHints *size_hints;
|
||||
XWMHints *wm_hints;
|
||||
XClassHint *class_hints;
|
||||
XSetWindowAttributes win_attr;
|
||||
XTextProperty window_name;
|
||||
|
||||
@ -372,22 +380,33 @@ static void MAIN_CreateDesktop( int argc, char *argv[] )
|
||||
|
||||
/* Set window manager properties */
|
||||
|
||||
size_hints.min_width = size_hints.max_width = width;
|
||||
size_hints.min_height = size_hints.max_height = height;
|
||||
size_hints.flags = PMinSize | PMaxSize;
|
||||
if (flags & (XValue | YValue)) size_hints.flags |= USPosition;
|
||||
if (flags & (WidthValue | HeightValue)) size_hints.flags |= USSize;
|
||||
else size_hints.flags |= PSize;
|
||||
size_hints = XAllocSizeHints();
|
||||
wm_hints = XAllocWMHints();
|
||||
class_hints = XAllocClassHint();
|
||||
if (!size_hints || !wm_hints || !class_hints)
|
||||
{
|
||||
fprintf( stderr, "Not enough memory for window manager hints.\n" );
|
||||
exit(1);
|
||||
}
|
||||
size_hints->min_width = size_hints->max_width = width;
|
||||
size_hints->min_height = size_hints->max_height = height;
|
||||
size_hints->flags = PMinSize | PMaxSize;
|
||||
if (flags & (XValue | YValue)) size_hints->flags |= USPosition;
|
||||
if (flags & (WidthValue | HeightValue)) size_hints->flags |= USSize;
|
||||
else size_hints->flags |= PSize;
|
||||
|
||||
wm_hints.flags = InputHint | StateHint;
|
||||
wm_hints.input = True;
|
||||
wm_hints.initial_state = NormalState;
|
||||
class_hints.res_name = argv[0];
|
||||
class_hints.res_class = "Wine";
|
||||
wm_hints->flags = InputHint | StateHint;
|
||||
wm_hints->input = True;
|
||||
wm_hints->initial_state = NormalState;
|
||||
class_hints->res_name = argv[0];
|
||||
class_hints->res_class = "Wine";
|
||||
|
||||
XStringListToTextProperty( &name, 1, &window_name );
|
||||
XSetWMProperties( display, rootWindow, &window_name, &window_name,
|
||||
argv, argc, &size_hints, &wm_hints, &class_hints );
|
||||
argv, argc, size_hints, wm_hints, class_hints );
|
||||
XFree( size_hints );
|
||||
XFree( wm_hints );
|
||||
XFree( class_hints );
|
||||
|
||||
/* Map window */
|
||||
|
||||
|
@ -2,10 +2,9 @@
|
||||
* 'Wine' MessageBox function handling
|
||||
*
|
||||
* Copyright 1993 Martin Ayotte
|
||||
*/
|
||||
|
||||
*
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -18,11 +17,11 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
#include <unistd.h>
|
||||
#include "prototypes.h"
|
||||
#include "heap.h"
|
||||
#include "library.h"
|
||||
#include "win.h"
|
||||
#include "texts.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_MSGBOX */
|
||||
/* #undef DEBUG_MSGBOX */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -40,7 +39,6 @@ ButtonTexts ButtonText = {
|
||||
"&Ignore", 'I'
|
||||
};
|
||||
|
||||
extern HINSTANCE hSysRes;
|
||||
extern HBITMAP hUpArrow;
|
||||
|
||||
typedef struct tagMSGBOX {
|
||||
@ -80,13 +78,13 @@ int MessageBox(HWND hWnd, LPSTR str, LPSTR title, WORD type)
|
||||
wndPtr = WIN_FindWndPtr(hWnd);
|
||||
if (wndPtr == NULL) {
|
||||
hInst = hSysRes;
|
||||
dprintf_msgbox(stddeb,"MessageBox(NULL, %08X='%s', %08X='%s', %04X)\n",
|
||||
str, str, title, title, type);
|
||||
dprintf_msgbox(stddeb,"MessageBox(NULL, str='%s', title='%s', %04X)\n",
|
||||
str, title, type);
|
||||
}
|
||||
else {
|
||||
hInst = wndPtr->hInstance;
|
||||
dprintf_msgbox(stddeb,"MessageBox(%04X, %08X='%s', %08X='%s', %04X)\n",
|
||||
hWnd, str, str, title, title, type);
|
||||
dprintf_msgbox(stddeb,"MessageBox(%04X, str='%s', title='%s', %04X)\n",
|
||||
hWnd, str, title, type);
|
||||
}
|
||||
lpmb = (LPMSGBOX) malloc(sizeof(MSGBOX));
|
||||
memset(lpmb, 0, sizeof(MSGBOX));
|
||||
|
@ -14,23 +14,21 @@
|
||||
* has a NULL KeyValue returning a list of KeyNames, and a NULL
|
||||
* AppName undefined. I changed GetSetProfile to match. This makes
|
||||
* PROGMAN.EXE do the right thing.
|
||||
*/
|
||||
|
||||
*
|
||||
static char Copyright [] = "Copyright (C) 1993 Miguel de Icaza";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "wine.h"
|
||||
#include "windows.h"
|
||||
#include "dos_fs.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_PROFILE */
|
||||
/* #undef DEBUG_PROFILE */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#define STRSIZE 255
|
||||
#define xmalloc(x) malloc(x)
|
||||
#define overflow (next == &CharBuffer [STRSIZE-1])
|
||||
@ -53,6 +51,7 @@ typedef struct TProfile {
|
||||
char *FileName;
|
||||
TSecHeader *Section;
|
||||
struct TProfile *link;
|
||||
int changed;
|
||||
} TProfile;
|
||||
|
||||
TProfile *Current = 0;
|
||||
@ -80,13 +79,13 @@ static char *GetIniFileName(char *name)
|
||||
return name;
|
||||
|
||||
if (strchr(name, '\\'))
|
||||
return GetUnixFileName(name);
|
||||
return DOS_GetUnixFileName(name);
|
||||
|
||||
GetWindowsDirectory(temp, sizeof(temp) );
|
||||
strcat(temp, "\\");
|
||||
strcat(temp, name);
|
||||
|
||||
return GetUnixFileName(temp);
|
||||
return DOS_GetUnixFileName(temp);
|
||||
}
|
||||
|
||||
static TSecHeader *load (char *filename)
|
||||
@ -223,6 +222,7 @@ static short GetSetProfile (int set, LPSTR AppName, LPSTR KeyName,
|
||||
New->link = Base;
|
||||
New->FileName = strdup (FileName);
|
||||
New->Section = load (FileName);
|
||||
New->changed = FALSE;
|
||||
Base = New;
|
||||
section = New->Section;
|
||||
Current = New;
|
||||
@ -253,9 +253,7 @@ static short GetSetProfile (int set, LPSTR AppName, LPSTR KeyName,
|
||||
p += slen;
|
||||
}
|
||||
*p = '\0';
|
||||
#ifdef DEBUG_PROFILE
|
||||
printf("GetSetProfile // normal end of enum !\n");
|
||||
#endif
|
||||
dprintf_profile(stddeb,"GetSetProfile // normal end of enum !\n");
|
||||
return (Size - 2 - left);
|
||||
}
|
||||
for (key = section->Keys; key; key = key->link){
|
||||
@ -264,6 +262,7 @@ static short GetSetProfile (int set, LPSTR AppName, LPSTR KeyName,
|
||||
if (set){
|
||||
free (key->Value);
|
||||
key->Value = strdup (Default ? Default : "");
|
||||
Current->changed=TRUE;
|
||||
return 1;
|
||||
}
|
||||
ReturnedString [Size-1] = 0;
|
||||
@ -289,6 +288,7 @@ static short GetSetProfile (int set, LPSTR AppName, LPSTR KeyName,
|
||||
new_key (section, KeyName, Default);
|
||||
section->link = Current->Section;
|
||||
Current->Section = section;
|
||||
Current->changed = TRUE;
|
||||
} else {
|
||||
ReturnedString [Size-1] = 0;
|
||||
strncpy (ReturnedString, Default, Size-1);
|
||||
@ -375,6 +375,8 @@ static void dump_profile (TProfile *p)
|
||||
if (!p)
|
||||
return;
|
||||
dump_profile (p->link);
|
||||
if(!p->changed)
|
||||
return;
|
||||
if ((profile = fopen (GetIniFileName(p->FileName), "w")) != NULL){
|
||||
dump_sections (profile, p->Section);
|
||||
fclose (profile);
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Windows Properties Functions
|
||||
*/
|
||||
*
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -158,7 +158,8 @@ BOOL SetProp(HWND hWnd, LPSTR lpStr, HANDLE hData)
|
||||
GlobalUnlock(wndPtr->hProp);
|
||||
return FALSE;
|
||||
}
|
||||
dprintf_prop(stddeb, "SetProp // entry allocated %08X\n", lpNewProp);
|
||||
dprintf_prop(stddeb, "SetProp // entry allocated %08X\n",
|
||||
(unsigned int) lpNewProp);
|
||||
if (lpProp == NULL) {
|
||||
wndPtr->hProp = hNewProp;
|
||||
lpNewProp->lpPrevProp = NULL;
|
||||
@ -199,7 +200,7 @@ int EnumProps(HWND hWnd, FARPROC lpEnumFunc)
|
||||
LPPROPENTRY lpProp;
|
||||
LPSTR str;
|
||||
int nRet;
|
||||
printf("EnumProps(%04X, %08X)\n", hWnd, lpEnumFunc);
|
||||
printf("EnumProps(%04X, %08X)\n", hWnd, (unsigned int) lpEnumFunc);
|
||||
wndPtr = WIN_FindWndPtr(hWnd);
|
||||
if (wndPtr == NULL) {
|
||||
printf("EnumProps // Bad Window handle !\n");
|
||||
|
@ -2,9 +2,9 @@
|
||||
* Rectangle-related functions
|
||||
*
|
||||
* Copyright 1993 Alexandre Julliard
|
||||
*/
|
||||
|
||||
*
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
|
10
misc/shell.c
10
misc/shell.c
@ -7,19 +7,15 @@
|
||||
#include <unistd.h>
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
#include "library.h"
|
||||
#include "shell.h"
|
||||
#include "../rc/sysres.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_REG */
|
||||
/* #undef DEBUG_REG */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
LPKEYSTRUCT lphRootKey = NULL;
|
||||
|
||||
DECLARE_HANDLE(HDROP);
|
||||
|
||||
extern HINSTANCE hSysRes;
|
||||
|
||||
/*************************************************************************
|
||||
* RegOpenKey [SHELL.1]
|
||||
*/
|
||||
@ -344,7 +340,7 @@ INT ShellAbout(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon)
|
||||
else
|
||||
*AppMisc = 0;
|
||||
|
||||
return DialogBox(hSysRes, "SHELL_ABOUT_MSGBOX", hWnd, (WNDPROC)AboutDlgProc);
|
||||
return DialogBoxIndirectPtr(hSysRes, sysres_DIALOG_SHELL_ABOUT_MSGBOX, hWnd, (WNDPROC)AboutDlgProc);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: heap.c,v 1.3 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -68,7 +70,7 @@ int WaitSoundState(int x)
|
||||
fprintf(stderr, "WaitSoundState(%d)\n", x);
|
||||
}
|
||||
|
||||
SyncAllVoices(void)
|
||||
int SyncAllVoices(void)
|
||||
{
|
||||
fprintf(stderr, "SyncAllVoices()\n");
|
||||
}
|
||||
@ -83,7 +85,7 @@ LPINT GetThresholdEvent(void)
|
||||
fprintf(stderr, "GetThresholdEvent()\n");
|
||||
}
|
||||
|
||||
GetThresholdStatus(void)
|
||||
int GetThresholdStatus(void)
|
||||
{
|
||||
fprintf(stderr, "GetThresholdStatus()\n");
|
||||
}
|
||||
|
25
misc/user.c
25
misc/user.c
@ -1,30 +1,31 @@
|
||||
/*
|
||||
static char RCSId[] = "$Id: user.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "prototypes.h"
|
||||
#include "atom.h"
|
||||
#include "gdi.h"
|
||||
#include "dlls.h"
|
||||
#include "selectors.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "menu.h"
|
||||
#include "dialog.h"
|
||||
#include "syscolor.h"
|
||||
#include "win.h"
|
||||
#include "windows.h"
|
||||
#include "prototypes.h"
|
||||
#include "user.h"
|
||||
#include "message.h"
|
||||
|
||||
#define USER_HEAP_SIZE 0x10000
|
||||
|
||||
|
||||
MDESC *USER_Heap = NULL;
|
||||
|
||||
|
||||
extern BOOL ATOM_Init();
|
||||
extern BOOL GDI_Init();
|
||||
extern void SYSMETRICS_Init();
|
||||
extern BOOL MENU_Init();
|
||||
extern BOOL WIN_CreateDesktopWindow();
|
||||
|
||||
#ifndef WINELIB
|
||||
/***********************************************************************
|
||||
* USER_HeapInit
|
||||
*/
|
||||
static BOOL USER_HeapInit()
|
||||
static BOOL USER_HeapInit(void)
|
||||
{
|
||||
struct segment_descriptor_s * s;
|
||||
s = GetNextSegment( 0, 0x10000 );
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user