Changeset 4162 for branches/GRACE/src


Ignore:
Timestamp:
Sep 2, 2000, 10:49:29 PM (25 years ago)
Author:
bird
Message:

Bugfixing, DevSegDf.h,...

Location:
branches/GRACE/src/win32k
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • branches/GRACE/src/win32k/Makefile

    r4143 r4162  
    11################################################################################
    2 # $Id: Makefile,v 1.43.4.11 2000-09-01 15:40:15 bird Exp $
     2# $Id: Makefile,v 1.43.4.12 2000-09-02 20:49:05 bird Exp $
    33#
    44# Win32k makefile.
     
    4848
    4949CFLAGS      = -q -Ge -Gs- -Gr+ -Rn -Ss+ -Mp -Wall+ppt-ppc-inl-cnv-gnr-vft-gen-uni-ext-
    50 CFLAGS16    = -c -W3 -Asfw /NTCODE16 /NDDATA16 -G2s -Zp -Zl -nologo -Fo$@ -Fa
     50CFLAGS16    = -c -W3 -Asfw /NTCODE16 /NDDATA16 -G2s -Zp -Zl -nologo
    5151CPPFLAGS    = -q -Ge -Gs- -Gr+ -Rn -Ss+ -Mp -Gx -Wall+ppt-ppc-inl-cnv-gnr-vft-
    5252ASFLAGS     = -Sv:ALP -Mb -Li
    53 LFLAGS      = /nologo /MAP /NOI /NOE /NOD /A:16
     53LFLAGS      = /nologo /MAP /NOI /NOE /NOD /A:16 /PACKCODE /PACKDATA
    5454CDEFINESB   = -DWIN32K -DRING0 -D__WIN32OS2__ -D__WINE__
    5555CDEFINESB16 = -DRING0
    5656ASDEFINES   = -D:WIN32K
     57
     58!if "$(CCENV)" == "VAC36"
     59VACLIB      = $(VACPATH)\lib\cpprni36.lib
     60!else
     61VACLIB      = $(VACPATH)\lib\cppon30.lib
     62!endif
    5763
    5864
     
    6470CFLAGS16    = $(CFLAGS16)   -Ogeitln -Gs
    6571CPPFLAGS    = $(CPPFLAGS)   -G5 -O+
    66 LFLAGS      = $(LFLAGS)     /EXEPACK:2 /NODEBUG /PACKC /PACKD
     72LFLAGS      = $(LFLAGS)     /EXEPACK:2 /NODEBUG
    6773CDEFINES    = $(CDEFINESB)  -DRELEASE
    6874CDEFINES16  = $(CDEFINESB16) -DRELEASE
     
    8389
    8490!ifdef NODEBUGINFO
    85 LFLAGS      = $(LFLAGS)     /NODEB /EXEPACK:2 /PACKD /PACKC
     91LFLAGS      = $(LFLAGS)     /NODEB /EXEPACK:2
    8692CFLAGS16    = $(CFLAGS16)   -Owis
    8793CFLAGS      = $(CFLAGS)     -O+ -Os- -Oi-
     
    105111             -I$(PDWIN32_INCLUDE)\win
    106112
    107 CINCLUDES16= -I$(WIN32KINCLUDE) \
    108              -I. \
    109              -I$(DDKPATH)\h \
    110              -I$(MSCPATH)\include \
    111              -I$(PDWIN32_INCLUDE)
     113CINCLUDES16= -I$(WIN32KINCLUDE) -I. -I$(DDKPATH)\h -I$(MSCPATH)\include -I$(PDWIN32_INCLUDE)
    112114
    113115
     
    121123.SUFFIXES: .obj .cpp .c .asm
    122124
    123 {dev16}.c{$(WIN32KOBJ)}.obj:
    124     @$(ECHO) compiling 16bit: $<
    125     @$(CC16) $(CFLAGS16) $(CDEFINES16) -Fa$(WIN32KLIST)\$(*B).s -Fo$@ $(CINCLUDES16) $<
    126125{dev16}.c.obj:
    127     @$(ECHO) compiling 16bit: $<
    128     @$(CC16) $(CFLAGS16) $(CDEFINES16) -Fa$(WIN32KLIST)\$(*B).s -Fo$(WIN32KOBJ)\$(@F) $(CINCLUDES16) $<
    129 
    130 {dev16}.c{$(WIN32KOBJ)}.obj_tst:
    131     @$(ECHO) compiling 16bit: $<
    132     @$(CC16) $(CFLAGS16) $(CDEFINES16_TST) -Fa$(WIN32KLIST)\$(*B).s -Fo$@ $(CINCLUDES16) $<
    133     @$(CP) $@ $@.obj
     126    @$(ECHO) compiling 16bit: $< ($@)
     127    $(CC16) -c $(CFLAGS16) $(CDEFINES16) $(CINCLUDES16) -Fo$(WIN32KOBJ)\$(*B).obj -Fa$(WIN32KLIST)\$(*B).s $<
     128
     129{dev16}.c.obj_init:
     130    @$(ECHO) compiling 16bit: $< ($@)
     131    $(CC16) -c $(CFLAGS16) $(CDEFINES16) $(CINCLUDES16) /NTCODE16_INIT /NDDATA16_INIT -Fo$(WIN32KOBJ)\$(*B).obj_init -Fa$(WIN32KLIST)\$(*B).s $<
     132    $(CP) $@ $@.obj
     133
    134134{dev16}.c.obj_tst:
    135135    @$(ECHO) compiling 16bit: $<
    136     @$(CC16) $(CFLAGS16) $(CDEFINES16_TST) -Fa$(WIN32KLIST)\$(*B).s -Fo$(WIN32KOBJ)\$(@F) $(CINCLUDES16) $<
    137     @$(CP) $@ $@.obj
     136    $(CC16) -c $(CFLAGS16) $(CDEFINES16_TST) $(CINCLUDES16) -Fa$(WIN32KLIST)\$(*B).s -Fo$(WIN32KOBJ)\$(@B).obj_tst $<
     137    $(CP) $@ $@.obj
     138{dev16}.c.obj_tst_init:
     139    @$(ECHO) compiling 16bit: $<
     140    $(CC16) -c $(CFLAGS16) $(CDEFINES16_TST) $(CINCLUDES16) /NDDATA16_INIT /NTCODE16_INIT -Fa$(WIN32KLIST)\$(*B).s -Fo$(WIN32KOBJ)\$(@B).obj_tst_init $<
     141    $(CP) $@ $@.obj
    138142
    139143
     
    304308all: pe2lx.exe
    305309!else
    306 all: $(WIN32KBIN)\$(NAME).sys pe2lx.exe
     310all: $(WIN32KBIN)\$(NAME).sys pe2lx.exe kRx.exe lib Win32kCC.exe
    307311!endif
    308312
     
    344348    $(WIN32KOBJ)\k32AllocMemEx.obj \
    345349    $(WIN32KOBJ)\k32QueryOTEs.obj \
    346     $(WIN32KOBJ)\mytkExecPgm.obj\
    347     $(WIN32KOBJ)\mytkStartProcess.obj
    348 
    349 
    350 OBJSINIT =\
    351     $(WIN32KOBJ)\d16init.obj \
     350    $(WIN32KOBJ)\k32QueryOptionsStatus.obj \
     351    $(WIN32KOBJ)\k32SetOptions.obj \
     352    $(WIN32KOBJ)\mytkExecPgm.obj \
     353    $(WIN32KOBJ)\mytkStartProcess.obj \
     354    $(WIN32KOBJ)\vprntf16.obj \
    352355    $(WIN32KOBJ)\d32init.obj \
    353     $(WIN32KOBJ)\ProbKrnl.obj \
    354356    $(WIN32KOBJ)\SymDB.obj \
    355     $(WIN32KOBJ)\vprntf16.obj
     357    $(WIN32KOBJ)\d16init.obj_init \
     358    $(WIN32KOBJ)\ProbKrnl.obj_init
     359
     360LASTOBJ =\
     361    $(WIN32KOBJ)\devlast.obj
    356362
    357363LIBS =\
    358 !if "$(CCENV)" == "VAC36"
    359     $(VACPATH)\lib\cpprni36.lib \
    360 !else
    361     $(VACPATH)\lib\cppon30.lib  \
    362 !endif
     364    $(VACLIB) \
    363365    $(DDKPATH)\lib\os2386.lib \
    364     $(WIN32KOBJ)\devhelp.lib
    365 
    366 LIBSINIT =\
     366    $(WIN32KOBJ)\devhelp.lib \
    367367    $(WIN32KOBJ)\clib.lib
    368368
     
    410410    $(WIN32KOBJ)\k32AllocMemEx.obj \
    411411    $(WIN32KOBJ)\k32QueryOTEs.obj \
    412     $(WIN32KOBJ)\mytkExecPgm.obj\
    413     $(WIN32KOBJ)\mytkStartProcess.obj
    414 
    415 TSTOBJSINIT = \
    416     $(WIN32KOBJ)\d16init.obj_tst \
     412    $(WIN32KOBJ)\k32QueryOptionsStatus.obj \
     413    $(WIN32KOBJ)\k32SetOptions.obj \
     414    $(WIN32KOBJ)\mytkExecPgm.obj \
     415    $(WIN32KOBJ)\mytkStartProcess.obj \
     416    $(WIN32KOBJ)\vprntf16.obj_tst \
    417417    $(WIN32KOBJ)\d32init.obj_tst \
    418     $(WIN32KOBJ)\ProbKrnl.obj_tst \
    419418    $(WIN32KOBJ)\SymDB.obj \
    420     $(WIN32KOBJ)\vprntf16.obj_tst
     419    $(WIN32KOBJ)\d16init.obj_tst_init \
     420    $(WIN32KOBJ)\ProbKrnl.obj_tst_init
     421
     422TSTLASTOBJ = $(LASTOBJ)
    421423
    422424TSTLIBS = $(LIBS)
    423425
    424 TSTLIBSINIT = $(LIBSINIT)
    425426
    426427
     
    473474################################################################################
    474475$(NAME).sys: $(WIN32KBIN)\$(NAME).sys
    475 $(WIN32KBIN)\$(NAME).sys: $(OBJS) $(LIBS) $(NAME).def \
    476             $(WIN32KOBJ)\last.lib \
    477             $(WIN32KOBJ)\init.lib \
    478             $(LIBSINIT) \
    479             makefile
     476$(WIN32KBIN)\$(NAME).sys: $(OBJS) $(LIBS) $(NAME).def $(LASTOBJ) $(LIBSINIT) makefile
    480477    -@$(ECHO) linking: $@
    481     $(LD) $(LFLAGS) @<<
     478    -4 $(LD) $(LFLAGS) @<<$(WIN32KOBJ)\$(@B).lnk
    482479/OUT:$@
    483480/MAP:$(WIN32KBIN)\$(@B).map
     
    487484$(LIBS:  =^
    488485)
    489 $(WIN32KOBJ)\last.lib
    490 $(WIN32KOBJ)\init.lib
    491 $(LIBSINIT)
     486$(LASTOBJ)
    492487$(NAME).def
    493 <<
     488<<KEEP
    494489    cd $(WIN32KBIN)
    495490    @mapsym $(*B).map > nul
     
    506501    $(CP) $(WIN32KBIN)\$@ $@
    507502
    508 $(WIN32KBIN)\$(NAME)tst.exe: \
    509             $(NAME)tst.def \
    510             $(TSTOBJS) \
    511             $(TSTLIBS) \
    512             $(WIN32KOBJ)\last.lib \
    513             $(WIN32KOBJ)\tstinit.lib \
    514             $(TSTLIBSINIT) \
    515             makefile
     503$(WIN32KBIN)\$(NAME)tst.exe: $(NAME)tst.def $(TSTOBJS) $(TSTLIBS) $(LASTOBJS) makefile
    516504    -@$(ECHO) linking: $@
    517     $(LD) $(LFLAGS) /DEBUG @<<
     505    -4 $(LD) $(LFLAGS) @<<$(WIN32KOBJ)\$(@B).lnk
     506/DEBUG
    518507/OUT:$@
    519508/MAP:$(WIN32KBIN)\$(@B).map
     
    523512$(TSTLIBS:  =^
    524513)
    525 $(WIN32KOBJ)\last.lib
    526 $(WIN32KOBJ)\tstinit.lib
    527 $(TSTLIBSINIT)
     514$(LASTOBJ)
    528515$(NAME)tst.def
    529 <<
     516<<KEEP
     517
    530518
    531519################################################################################
     
    546534
    547535################################################################################
     536# Win32k Control Center Rule.
     537################################################################################
     538Win32kCC.exe:
     539    cd utils
     540    $(MAKE_CMD)
     541    cd ..
     542
     543################################################################################
     544# kRx.EXE - Pure Rexx interpreter
     545################################################################################
     546kRx.exe:
     547    cd rexx
     548    $(MAKE_CMD)
     549    cd ..
     550
     551################################################################################
    548552# Libraries - segments are renamed for the 16-bit libraries.
    549553################################################################################
    550 DHLPOBJS = +dhcall5b.obj +dhcal11a.obj +dhcal11g.obj +dhret.obj
     554DHLPOBJS =  +$(WIN32KOBJ)\dhcall5b.obj +$(WIN32KOBJ)\dhcal11a.obj \
     555            +$(WIN32KOBJ)\dhcal11g.obj +$(WIN32KOBJ)\dhret.obj
    551556
    552557$(WIN32KOBJ)\devhelp.lib: $(DDKPATH)\lib\dhcalls.lib $(WIN32KBIN)\libconv.exe $(DHLPOBJS:+=)
     
    569574
    570575
    571 CLIBOBJS = +inp.obj +outp.obj +anfalmul.obj +anfaldiv.obj +anfalrem.obj +anfauldi.obj \
    572            +anuldiv.obj +fmemcpy.obj +anulrem.obj +anlmul.obj +__AHINCR.obj
     576CLIBOBJS =  +$(WIN32KOBJ)\inp.obj       +$(WIN32KOBJ)\outp.obj \
     577            +$(WIN32KOBJ)\anfalmul.obj  +$(WIN32KOBJ)\anfaldiv.obj \
     578            +$(WIN32KOBJ)\anfalrem.obj  +$(WIN32KOBJ)\anfauldi.obj \
     579            +$(WIN32KOBJ)\anuldiv.obj   +$(WIN32KOBJ)\fmemcpy.obj \
     580            +$(WIN32KOBJ)\anulrem.obj   +$(WIN32KOBJ)\anlmul.obj \
     581            +$(WIN32KOBJ)\__AHINCR.obj
    573582
    574583$(WIN32KOBJ)\clib.lib: $(MSCPATH)\lib\clibcep.lib $(WIN32KBIN)\libconv.exe $(CLIBOBJS:+=)
     
    588597
    589598$(WIN32KOBJ)\last.lib: $(WIN32KOBJ)\devlast.obj
    590     -@$(RM) $@ > nul 2> nul
    591     $(ILIB) $@ $**;
    592 
    593 $(WIN32KOBJ)\init.lib: $(OBJSINIT)
    594     -@$(RM) $@ > nul 2> nul
    595     $(ILIB) $@ $**;
    596 
    597 $(WIN32KOBJ)\tstinit.lib: $(TSTOBJSINIT)
    598599    -@$(RM) $@ > nul 2> nul
    599600    $(ILIB) $@ $**;
  • branches/GRACE/src/win32k/configure.cmd

    r4143 r4162  
    1 /* $Id: configure.cmd,v 1.10.4.1 2000-09-01 15:40:14 bird Exp $
     1/* $Id: configure.cmd,v 1.10.4.2 2000-09-02 20:49:06 bird Exp $
    22 *
    33 * Configuration script.
     
    108108         * Create output directories.
    109109         */
    110         'mkdir bin > nul 2> nul'
    111         'mkdir bin\release > nul 2> nul'
    112         'mkdir bin\debug > nul 2> nul'
     110        'mkdir Bin > nul 2> nul'
     111        'mkdir Bin\Release > nul 2> nul'
     112        'mkdir Bin\Debug > nul 2> nul'
    113113
    114         'mkdir list > nul 2> nul'
    115         'mkdir list\release > nul 2> nul'
    116         'mkdir list\debug > nul 2> nul'
     114        'mkdir List > nul 2> nul'
     115        'mkdir List\Release > nul 2> nul'
     116        'mkdir List\Debug > nul 2> nul'
    117117
    118         'mkdir object > nul 2> nul'
    119         'mkdir object\debug > nul 2> nul'
    120         'mkdir object\release > nul 2> nul'
     118        'mkdir Object > nul 2> nul'
     119        'mkdir Object\Debug > nul 2> nul'
     120        'mkdir Object\Release > nul 2> nul'
    121121
    122122        /*
  • branches/GRACE/src/win32k/dev16/SymDB.c

    r4117 r4162  
    1 /* $Id: SymDB.c,v 1.3.4.6 2000-08-30 04:11:23 bird Exp $
     1/* $Id: SymDB.c,v 1.3.4.7 2000-09-02 20:49:06 bird Exp $
    22*
    33* Autogenerated kernel symbol database.
     
    1212#define INCL_NOBASEAPI
    1313#include <os2.h>
     14#include "devSegDf.h"
    1415#include "probkrnl.h"
    1516#include "options.h"
    1617
    17 KRNLDBENTRY aKrnlSymDB[] =
     18KRNLDBENTRY DATA16_INIT aKrnlSymDB[] =
    1819{
    1920#ifdef ALLKERNELS
  • branches/GRACE/src/win32k/dev16/d16init.c

    r4117 r4162  
    1 /* $Id: d16init.c,v 1.6.4.4 2000-08-30 04:11:26 bird Exp $
     1/* $Id: d16init.c,v 1.6.4.5 2000-09-02 20:49:09 bird Exp $
    22 *
    33 * d16init - init routines for both drivers.
     
    3636#include <memory.h>
    3737
     38#include "devSegDf.h"
     39#undef  DATA16_INIT
     40#define DATA16_INIT
     41#undef  CODE16_INIT
     42#define CODE16_INIT
    3843#include "probkrnl.h"
    3944#include "dev1632.h"
     
    4247#include "log.h"
    4348#include "options.h"
     49
     50
    4451
    4552/**
     
    6673
    6774    pRpOut->BPBArray = NULL;
    68     pRpOut->CodeEnd  = (USHORT)&CODE16END;
    69     pRpOut->DataEnd  = (USHORT)&DATA16END;
     75    pRpOut->CodeEnd = (USHORT)&CODE16_INITSTART;
     76    pRpOut->DataEnd = (USHORT)&DATA16_INITSTART;
    7077    pRpOut->Unit     = 0;
    7178    pRpOut->rph.Status = STATUS_DONE;
     
    134141     * Fill return data.
    135142     */
    136     pRpOut->CodeEnd = (USHORT)&CODE16END;
    137     pRpOut->DataEnd = (USHORT)&DATA16END;
     143    pRpOut->CodeEnd = (USHORT)&CODE16_INITSTART;
     144    pRpOut->DataEnd = (USHORT)&DATA16_INITSTART;
    138145    pRpOut->BPBArray= NULL;
    139146    pRpOut->Unit    = 0;
     
    163170 * @param     pRp  Generic IO Control request packet.
    164171 */
    165 USHORT NEAR R0Init16(PRP_GENIOCTL pRp)
     172USHORT NEAR  R0Init16(PRP_GENIOCTL pRp)
    166173{
    167174    USHORT usRc = STATUS_DONE;
     
    244251 *                       (Since this is init code not present after init...)
    245252 */
    246 USHORT NEAR initGetDosTableData(void)
     253USHORT NEAR  initGetDosTableData(void)
    247254{
    248255    APIRET     rc;
  • branches/GRACE/src/win32k/dev16/probkrnl.c

    r4120 r4162  
    1 /* $Id: probkrnl.c,v 1.20.4.14 2000-08-30 04:45:58 bird Exp $
     1/* $Id: probkrnl.c,v 1.20.4.15 2000-09-02 20:49:10 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    6161#include <reqpkt.h>
    6262
     63#include "devSegDf.h"
     64#undef  DATA16_INIT
     65#define DATA16_INIT
     66#undef  CODE16_INIT
     67#define CODE16_INIT
    6368#include "os2krnl.h"                    /* must be included before dev1632.h! */
    6469#include "sym.h"
     
    7580*   Note: must be inited or else we'll get BSS segment                         *
    7681*******************************************************************************/
    77 /*
    78  * kernel data - !only valid during init!
    79  */
     82
    8083
    8184/*
     
    8689 *            calltab.asm has to be updated immediately!
    8790 */
    88 IMPORTKRNLSYM aImportTab[NBR_OF_KRNLIMPORTS] =
     91IMPORTKRNLSYM DATA16_GLOBAL aImportTab[NBR_OF_KRNLIMPORTS] =
    8992{/* iFound     cchName                  offObject    usSel     fType    */
    9093 /*      iObject      achName                 ulAddress  cProlog        */
     
    134137};
    135138
     139char DATA16_GLOBAL  szUsrSym[50] = {0};
     140
     141
    136142
    137143/*
     
    139145 */
    140146#if defined(DEBUGR3)
    141 static char         szUsrOS2Krnl[50] = {0};
    142 static char         szOS2Krnl[]      = {"c:\\os2krnl"};
     147static char     DATA16_INIT szUsrOS2Krnl[50] = {0};
     148static char     DATA16_INIT szOS2Krnl[]      = {"c:\\os2krnl"};
    143149#endif
    144 static char         szUsrSym[50]     = {0};
    145 static char *       apszSym[]        =
     150static char *   DATA16_INIT apszSym[]        =
    146151{
    147152    {"c:\\os2krnl.sym"},                              /* usual for debugkernel */
     
    164169
    165170/* Result from GetKernelInfo/ReadOS2Krnl. */
    166 static unsigned char cObjects = 0;
    167 static POTE          paKrnlOTEs = NULL;
     171static unsigned char DATA16_INIT cObjects = 0;
     172static POTE          DATA16_INIT paKrnlOTEs = NULL;
    168173
    169174
     
    175180    short       sErr;
    176181    const char *pszMsg;
    177 } aErrorMsgs[] =
     182} DATA16_INIT aErrorMsgs[] =
    178183{
    179184    {ERROR_PROB_KRNL_OPEN_FAILED,       "Krnl: Failed to open kernel file."},
     
    221226 */
    222227#ifdef R3TST
    223 USHORT     usFakeVerMajor = 0;
    224 USHORT     usFakeVerMinor = 0;
     228USHORT DATA16_INIT usFakeVerMajor = 0;
     229USHORT DATA16_INIT usFakeVerMinor = 0;
    225230#ifdef R3TST
    226 static ach[11] =  {0}; /* works around compiler/linker bug */
     231static DATA16_INIT ach[11] =  {0}; /* works around compiler/linker bug */
    227232#endif
    228233#endif
     
    265270static int      processFile(const char *pszFilename);
    266271
     272#if 0 /*ndef CODE16_INIT*/
     273#pragma alloc_text(CODE16_INIT, fopen, fread, fseek, fsize)
     274#pragma alloc_text(CODE16_INIT, kmemcpy, kstrstr, kstrcmp, kstrncmp, kstrnicmp, kstrlen, kstrcpy, kargncpy)
     275#pragma alloc_text(CODE16_INIT, GetErrorMsg)
     276#pragma alloc_text(CODE16_INIT, LookupKrnlEntry, VerifyPrologs, ProbeSymFile, GetKernelInfo)
     277#pragma alloc_text(CODE16_INIT, ShowResult)
     278#pragma alloc_text(CODE16_INIT, VerifyKernelVer, ReadOS2Krnl, ReadOS2Krnl2, processFile)
     279#endif
    267280
    268281
     
    490503    while (*pszSource != '\0')
    491504        *psz++ = *pszSource++;
    492 
     505    *psz = '\0';
    493506    return pszTarget;
    494507}
     
    949962{
    950963#if !defined(DEBUGR3) && !defined(EXTRACT) /* This IOCtl is not available after inittime! */
    951     static KRNLINFO KrnlInfo = {0};
     964    static KRNLINFO DATA16_INIT KrnlInfo = {0};
    952965    APIRET          rc;
    953966    HFILE           hDev0 = 0;
     
    12331246                )
    12341247            {
    1235                 #ifndef R3TST
     1248                #if 1 /* ndef R3TST */
    12361249                APIRET rc2;
    12371250                /* search on disk */
     
    12451258                        rc = rc2;
    12461259                }
     1260                if (rc == 1 || rc2 == NO_ERROR)
     1261                    rc = rc2;
    12471262                #endif
    12481263            }
     
    12531268    dprintf(("rc=%d; i=%d\n", rc, i));
    12541269    ShowResult(rc, i);
     1270
     1271    /* Copy the symbol file name to szUsrSym. */
     1272    if (szUsrSym[0] == '\0' && apszSym[i] != NULL)
     1273        kstrcpy(szUsrSym, apszSym[i]);
    12551274
    12561275    return rc;
     
    13311350{
    13321351    #if defined(DEBUGR3) || !defined(EXTRACT)
    1333     static KRNLINFO KrnlInfo = {0};
     1352    static KRNLINFO DATA16_INIT KrnlInfo = {0};
    13341353    #endif
    13351354    int            i, j;
     
    16601679     * Set paKrnlOTEs to point to an zeroed array of OTEs.
    16611680     */
    1662     static KRNLINFO KrnlInfo = {0};
     1681    static KRNLINFO DATA16_INIT  KrnlInfo = {0};
    16631682    paKrnlOTEs = &KrnlInfo.aObjects[0];
    16641683
     
    16951714        int         i;
    16961715
    1697         printf16("/* $Id: probkrnl.c,v 1.20.4.14 2000-08-30 04:45:58 bird Exp $\n"
     1716        printf16("/* $Id: probkrnl.c,v 1.20.4.15 2000-09-02 20:49:10 bird Exp $\n"
    16981717                 "*\n"
    16991718                 "* Autogenerated kernel symbol database.\n"
     
    17091728                 "#define INCL_NOBASEAPI\n"
    17101729                 "#include <os2.h>\n"
     1730                 "#include \"DevSegDf.h\"\n"
    17111731                 "#include \"probkrnl.h\"\n"
    17121732                 "#include \"options.h\"\n"
    17131733                 "\n");
    17141734
    1715         printf16("KRNLDBENTRY aKrnlSymDB[] = \n"
     1735        printf16("KRNLDBENTRY DATA16_INIT aKrnlSymDB[] = \n"
    17161736                 "{\n");
    17171737
  • branches/GRACE/src/win32k/dev16/vprntf16.c

    r4017 r4162  
    1 /* $Id: vprntf16.c,v 1.2.4.2 2000-08-15 06:16:00 bird Exp $
     1/* $Id: vprntf16.c,v 1.2.4.3 2000-09-02 20:49:10 bird Exp $
    22 *
    33 * vprintf and printf - 16-bit.
     
    3636#include <os2.h>
    3737
     38#include "devSegDf.h"                   /* Win32k segment definitions. */
     39#include "dev16.h"
    3840#include "vprntf16.h"
    3941#ifdef RING0
     
    4143#include "conio.h"
    4244#endif
    43 #include "dev16.h"
    4445
    4546/*******************************************************************************
     
    218219 * @param     args        Argument list.
    219220 */
    220 int vprintf16(const char *pszFormat, va_list args)
     221int FAR vprintf16(const char *pszFormat, va_list args)
    221222{
    222223    int cch = 0;
     
    392393 * @param     ...        Optional parameters.
    393394 */
    394 int printf16(const char *pszFormat, ...)
     395int FAR printf16(const char *pszFormat, ...)
    395396{
    396397    int     cch;
  • branches/GRACE/src/win32k/dev32/d32ElfIOCtl.c

    r2799 r4162  
    1 /* $Id: d32ElfIOCtl.c,v 1.1 2000-02-15 23:39:18 bird Exp $
     1/* $Id: d32ElfIOCtl.c,v 1.1.4.1 2000-09-02 20:49:11 bird Exp $
    22 *
    33 * Elf driver IOCtl handler function.
     
    2020#include <os2.h>
    2121
     22#include "devSegDf.h"
    2223#include "dev1632.h"
    2324#include "dev32.h"
  • branches/GRACE/src/win32k/dev32/d32Win32kIOCtl.c

    r4112 r4162  
    1 /* $Id: d32Win32kIOCtl.c,v 1.1.4.1 2000-08-29 19:47:01 bird Exp $
     1/* $Id: d32Win32kIOCtl.c,v 1.1.4.2 2000-09-02 20:49:11 bird Exp $
    22 *
    33 * Win32k driver IOCtl handler function.
     
    2222#include <os2.h>
    2323
     24#include "devSegDf.h"
    2425#include "dev1632.h"
    2526#include "dev32.h"
     
    6162                    return STATUS_DONE;
    6263                }
     64
     65                case K32_QUERYOPTIONSSTATUS:
     66                {
     67                    PK32QUERYOPTIONSSTATUS pParm = (PK32QUERYOPTIONSSTATUS)pRpIOCtl->ParmPacket;
     68                    if (pParm == NULL)
     69                        return STATUS_DONE | STERR | ERROR_I24_INVALID_PARAMETER;
     70                    pParm->rc = k32QueryOptionsStatus(pParm->pOptions, pParm->pStatus);
     71                    return STATUS_DONE;
     72                }
     73
     74                case K32_SETOPTIONS:
     75                {
     76                    PK32SETOPTIONS pParm = (PK32SETOPTIONS)pRpIOCtl->ParmPacket;
     77                    if (pParm == NULL)
     78                        return STATUS_DONE | STERR | ERROR_I24_INVALID_PARAMETER;
     79                    pParm->rc = k32SetOptions(pParm->pOptions);
     80                    return STATUS_DONE;
     81                }
     82
    6383            }
    6484            break;
  • branches/GRACE/src/win32k/dev32/d32init.c

    r4117 r4162  
    1 /* $Id: d32init.c,v 1.19.4.12 2000-08-30 04:11:28 bird Exp $
     1/* $Id: d32init.c,v 1.19.4.13 2000-09-02 20:49:11 bird Exp $
    22 *
    33 * d32init.c - 32-bits init routines.
     
    3232#include <string.h>
    3333
     34#include "devSegDf.h"
    3435#include "OS2Krnl.h"
    3536#include "options.h"
     
    166167                break;
    167168
     169            case 'j':
     170            case 'J': /* -Java:<Yes|No> */
     171                pszTmp2 = strpbrk(pszTmp, ":=/- ");
     172                options.fJava =
     173                    pszTmp2 != NULL
     174                    && (int)(pszTmp2-pszTmp) < cch-1
     175                    && (*pszTmp2 == ':' || *pszTmp2 == '=')
     176                    && (pszTmp2[1] == 'Y' || pszTmp2[1] == 'y');
     177                break;
     178
    168179            case 'l':
    169180            case 'L': /* -L[..]<:|=| >[<Y..|E..| > | <N..|D..>] */
     
    209220
    210221            case 'r':
    211             case 'R': /* ResHeap options */
     222            case 'R': /* ResHeap options or REXX option */
    212223                pszTmp2 = strpbrk(pszTmp, ":=/- ");
    213                 if (pszTmp2 != NULL && (*pszTmp2 == ':' || *pszTmp2 == '='))
    214                 {
    215                     ul = readnum(pszTmp2 + 1);
    216                     if (ul > 0x1000UL && ul < 0x700000UL) /* 4KB < ul < 7MB */
     224                if (   (pszTmp[1] == 'E' || pszTmp[1] == 'e')
     225                    && (pszTmp[2] == 'X' || pszTmp[2] == 'x'))
     226                {   /* REXX */
     227                    options.fREXXScript =
     228                        pszTmp2 != NULL
     229                        && (int)(pszTmp2-pszTmp) < cch-1
     230                        && (*pszTmp2 == ':' || *pszTmp2 == '=')
     231                        && (pszTmp2[1] == 'Y' || pszTmp2[1] == 'y');
     232                }
     233                else
     234                {   /* ResHeap options */
     235                    if (pszTmp2 != NULL && (*pszTmp2 == ':' || *pszTmp2 == '='))
    217236                    {
    218                         if (strnicmp(pszTmp, "resheapm", 8) == 0)
    219                             options.cbResHeapMax = ul;
    220                         else
    221                             options.cbResHeapInit = ul;
     237                        ul = readnum(pszTmp2 + 1);
     238                        if (ul > 0x1000UL && ul < 0x700000UL) /* 4KB < ul < 7MB */
     239                        {
     240                            if (strnicmp(pszTmp, "resheapm", 8) == 0)
     241                                options.cbResHeapMax = ul;
     242                            else
     243                                options.cbResHeapInit = ul;
     244                        }
    222245                    }
    223246                }
     
    10491072         */
    10501073        kprintf2(("VerifyImportTab32: procedure no.%d is being checked: %s addr=0x%08x iObj=%d offObj=%d\n",
    1051                   i, &_aImportTab[i].achName[0], _aImportTab[i].ulAddress,
    1052                   _aImportTab[i].iObject, _aImportTab[i].offObject));
     1074                  i, &aImportTab[i].achName[0], aImportTab[i].ulAddress,
     1075                  aImportTab[i].iObject, aImportTab[i].offObject));
    10531076
    10541077        /* Verify that it is found */
    1055         if (!_aImportTab[i].fFound)
    1056         {
    1057             if (_aImportTab[i].fType & EPT_NOT_REQ)
     1078        if (!aImportTab[i].fFound)
     1079        {
     1080            if (aImportTab[i].fType & EPT_NOT_REQ)
    10581081                continue;
    10591082            else
     
    10651088
    10661089        /* Verify read/writeable. */
    1067         if (_aImportTab[i].iObject >= pKrnlSMTE->smte_objcnt                                /* object index valid? */
    1068             || _aImportTab[i].ulAddress < pKrnlOTE[_aImportTab[i].iObject].ote_base         /* address valid? */
    1069             || _aImportTab[i].ulAddress + 16 > (pKrnlOTE[_aImportTab[i].iObject].ote_base +
    1070                                                 pKrnlOTE[_aImportTab[i].iObject].ote_size)  /* address valid? */
    1071             || _aImportTab[i].ulAddress - _aImportTab[i].offObject
    1072                != pKrnlOTE[_aImportTab[i].iObject].ote_base                                 /* offObject ok?  */
     1090        if (aImportTab[i].iObject >= pKrnlSMTE->smte_objcnt                                /* object index valid? */
     1091            || aImportTab[i].ulAddress < pKrnlOTE[aImportTab[i].iObject].ote_base          /* address valid? */
     1092            || aImportTab[i].ulAddress + 16 > (pKrnlOTE[aImportTab[i].iObject].ote_base +
     1093                                                pKrnlOTE[aImportTab[i].iObject].ote_size)  /* address valid? */
     1094            || aImportTab[i].ulAddress - aImportTab[i].offObject
     1095               != pKrnlOTE[aImportTab[i].iObject].ote_base                                 /* offObject ok?  */
    10731096            )
    10741097        {
    10751098            kprintf(("VerifyImportTab32: procedure no.%d has an invalid address or object number.!\n"
    10761099                     "                   %s  addr=0x%08x iObj=%d offObj=%d\n",
    1077                      i, &_aImportTab[i].achName[0], _aImportTab[i].ulAddress,
    1078                      _aImportTab[i].iObject, _aImportTab[i].offObject));
     1100                     i, &aImportTab[i].achName[0], aImportTab[i].ulAddress,
     1101                     aImportTab[i].iObject, aImportTab[i].offObject));
    10791102            return STATUS_DONE | STERR | ERROR_D32_INVALID_OBJ_OR_ADDR;
    10801103        }
     
    10821105
    10831106        #ifndef R3TST
    1084         if (_aImportTab[i].ulAddress < 0xff400000UL)
     1107        if (aImportTab[i].ulAddress < 0xff400000UL)
    10851108        {
    10861109            kprintf(("VerifyImportTab32: procedure no.%d has an invalid address, %#08x!\n",
    1087                      i, _aImportTab[i].ulAddress));
     1110                     i, aImportTab[i].ulAddress));
    10881111            return STATUS_DONE | STERR | ERROR_D32_INVALID_ADDRESS;
    10891112        }
    10901113        #endif
    10911114
    1092         switch (_aImportTab[i].fType & ~(EPT_BIT_MASK | EPT_NOT_REQ))
     1115        switch (aImportTab[i].fType & ~(EPT_BIT_MASK | EPT_NOT_REQ))
    10931116        {
    10941117            case EPT_PROC:
     
    10971120                 * Verify known function prolog.
    10981121                 */
    1099                 if (EPT32BitEntry(_aImportTab[i]))
     1122                if (EPT32BitEntry(aImportTab[i]))
    11001123                {
    1101                     cb = interpretFunctionProlog32((char*)_aImportTab[i].ulAddress,
    1102                                                    _aImportTab[i].fType == EPT_PROC32);
     1124                    cb = interpretFunctionProlog32((char*)aImportTab[i].ulAddress,
     1125                                                   aImportTab[i].fType == EPT_PROC32);
    11031126                    cbmin = 5; /* Size of the jump instruction */
    11041127                }
    11051128                else
    11061129                {
    1107                     cb = interpretFunctionProlog16((char*)_aImportTab[i].ulAddress,
    1108                                                    _aImportTab[i].fType == EPT_PROC16);
     1130                    cb = interpretFunctionProlog16((char*)aImportTab[i].ulAddress,
     1131                                                   aImportTab[i].fType == EPT_PROC16);
    11091132                    cbmin = 7; /* Size of the far jump instruction */
    11101133                }
     
    12041227    {
    12051228        /* EPT_VARIMPORTs are skipped */
    1206         if ((_aImportTab[i].fType & ~EPT_BIT_MASK) == EPT_VARIMPORT)
     1229        if ((aImportTab[i].fType & ~EPT_BIT_MASK) == EPT_VARIMPORT)
    12071230            continue;
    12081231        /* EPT_NOT_REQ which is not found are set pointing to the nop function provided. */
    1209         if (!_aImportTab[i].fFound && (_aImportTab[i].fType & EPT_NOT_REQ))
    1210         {
    1211             _aImportTab[i].ulAddress = auFuncs[i];
     1232        if (!aImportTab[i].fFound && (aImportTab[i].fType & EPT_NOT_REQ))
     1233        {
     1234            aImportTab[i].ulAddress = auFuncs[i];
    12121235            continue;
    12131236        }
    12141237
    1215         if (EPT32BitEntry(_aImportTab[i]))
    1216         {
    1217             cb = interpretFunctionProlog32((char*)_aImportTab[i].ulAddress, _aImportTab[i].fType == EPT_PROC32);
     1238        if (EPT32BitEntry(aImportTab[i]))
     1239        {
     1240            cb = interpretFunctionProlog32((char*)aImportTab[i].ulAddress, aImportTab[i].fType == EPT_PROC32);
    12181241            cbmin = 5; /* Size of the jump instruction */
    12191242        }
    12201243        else
    12211244        {
    1222             cb = interpretFunctionProlog16((char*)_aImportTab[i].ulAddress, _aImportTab[i].fType == EPT_PROC16);
     1245            cb = interpretFunctionProlog16((char*)aImportTab[i].ulAddress, aImportTab[i].fType == EPT_PROC16);
    12231246            cbmin = 7; /* Size of the far jump instruction */
    12241247        }
     
    12351258    for (i = 0; i < NBR_OF_KRNLIMPORTS; i++)
    12361259    {
    1237         switch (_aImportTab[i].fType & ~EPT_NOT_REQ)
     1260        switch (aImportTab[i].fType & ~EPT_NOT_REQ)
    12381261        {
    12391262            /*
     
    12451268            case EPT_PROC32:
    12461269            {
    1247                 cb = interpretFunctionProlog32((char*)_aImportTab[i].ulAddress, TRUE);
    1248                 _aImportTab[i].cbProlog = (char)cb;
     1270                cb = interpretFunctionProlog32((char*)aImportTab[i].ulAddress, TRUE);
     1271                aImportTab[i].cbProlog = (char)cb;
    12491272                if (cb >= 5 && cb + 5 < MAXSIZE_PROLOG) /* 5(1st): size of jump instruction in the function prolog which jumps to my overloading function */
    12501273                {                                       /* 5(2nd): size of jump instruction which jumps back to the original function after executing the prolog copied to the callTab entry for this function. */
     
    12521275                     * Copy function prolog which will be overwritten by the jmp to calltabl.
    12531276                     */
    1254                     memcpy(callTab[i], (void*)_aImportTab[i].ulAddress, (size_t)cb);
     1277                    memcpy(callTab[i], (void*)aImportTab[i].ulAddress, (size_t)cb);
    12551278
    12561279                    /*
     
    12601283                     */
    12611284                    callTab[i][cb] = 0xE9; /* jmp */
    1262                     *(unsigned long*)(void*)&callTab[i][cb+1] = _aImportTab[i].ulAddress + cb - (unsigned long)&callTab[i][cb+5];
     1285                    *(unsigned long*)(void*)&callTab[i][cb+1] = aImportTab[i].ulAddress + cb - (unsigned long)&callTab[i][cb+5];
    12631286
    12641287                    /*
    12651288                     * Jump from original function to my function - an cli(?) could be needed here
    12661289                     */
    1267                     *(char*)_aImportTab[i].ulAddress = 0xE9; /* jmp */
    1268                     *(unsigned long*)(_aImportTab[i].ulAddress + 1) = auFuncs[i] - (_aImportTab[i].ulAddress + 5);
     1290                    *(char*)aImportTab[i].ulAddress = 0xE9; /* jmp */
     1291                    *(unsigned long*)(aImportTab[i].ulAddress + 1) = auFuncs[i] - (aImportTab[i].ulAddress + 5);
    12691292                }
    12701293                else
     
    12871310                Int3();
    12881311
    1289                 cb = interpretFunctionProlog16((char*)_aImportTab[i].ulAddress, TRUE);
    1290                 _aImportTab[i].cbProlog = (char)cb;
     1312                cb = interpretFunctionProlog16((char*)aImportTab[i].ulAddress, TRUE);
     1313                aImportTab[i].cbProlog = (char)cb;
    12911314                if (cb >= 8 && cb + 7 < MAXSIZE_PROLOG) /* 8: size of a 16:32 jump which jumps to my overloading function (prefixed with 66h in a 16-bit segment) */
    12921315                {                                       /* 7: size of a 16:32 jump which is added to the call tab */
     
    12941317                     * Copy function prolog which is to be overwritten.
    12951318                     */
    1296                     memcpy(callTab[i], (void*)_aImportTab[i].ulAddress, (size_t)cb);
     1319                    memcpy(callTab[i], (void*)aImportTab[i].ulAddress, (size_t)cb);
    12971320
    12981321                    /*
     
    13011324                     */
    13021325                    callTab[i][cb] = 0xEA; /* jmp far ptr */
    1303                     *(unsigned long*)(void*)&callTab[i][cb+1] = _aImportTab[i].offObject;
    1304                     *(unsigned short*)(void*)&callTab[i][cb+5] = _aImportTab[i].usSel;
     1326                    *(unsigned long*)(void*)&callTab[i][cb+1] = aImportTab[i].offObject;
     1327                    *(unsigned short*)(void*)&callTab[i][cb+5] = aImportTab[i].usSel;
    13051328
    13061329                    /*
     
    13081331                     * 0x66 0xEA <four byte target address> <two byte target selector>
    13091332                     */
    1310                     *(char*)(_aImportTab[i].ulAddress    ) = 0x66;    /* operandsize prefix */
    1311                     *(char*)(_aImportTab[i].ulAddress + 1) = 0xEA;    /* jmp far ptr */
    1312                     *(unsigned long*)(_aImportTab[i].ulAddress + 2) = auFuncs[i];   /* FIXME? */
    1313                     *(unsigned short*)(_aImportTab[i].ulAddress + 6) = _R0FlatCS16; /* FIXME */
     1333                    *(char*)(aImportTab[i].ulAddress    ) = 0x66;    /* operandsize prefix */
     1334                    *(char*)(aImportTab[i].ulAddress + 1) = 0xEA;    /* jmp far ptr */
     1335                    *(unsigned long*)(aImportTab[i].ulAddress + 2) = auFuncs[i];   /* FIXME? */
     1336                    *(unsigned short*)(aImportTab[i].ulAddress + 6) = _R0FlatCS16; /* FIXME */
    13141337                }
    13151338                else
     
    13291352            case EPT_PROCIMPORT32:
    13301353            {
    1331                 cb = interpretFunctionProlog32((char*)_aImportTab[i].ulAddress, FALSE);
    1332                 _aImportTab[i].cbProlog = (char)cb;
     1354                cb = interpretFunctionProlog32((char*)aImportTab[i].ulAddress, FALSE);
     1355                aImportTab[i].cbProlog = (char)cb;
    13331356                if (cb > 0) /* Since no prolog part is copied to the function table, it's ok as long as the prolog has been recognzied. */
    13341357                {
     
    13391362                     */
    13401363                    callTab[i][0] = 0xE9; /* jmp */
    1341                     *(unsigned*)(void*)&callTab[i][1] = _aImportTab[i].ulAddress - (unsigned)&callTab[i][5];
     1364                    *(unsigned*)(void*)&callTab[i][1] = aImportTab[i].ulAddress - (unsigned)&callTab[i][5];
    13421365                }
    13431366                else
     
    13571380            case EPT_PROCIMPORT16:
    13581381            {
    1359                 cb = interpretFunctionProlog16((char*)_aImportTab[i].ulAddress, FALSE);
    1360                 _aImportTab[i].cbProlog = (char)cb;
     1382                cb = interpretFunctionProlog16((char*)aImportTab[i].ulAddress, FALSE);
     1383                aImportTab[i].cbProlog = (char)cb;
    13611384                if (cb > 0) /* Since no prolog part is copied to the function table, it's ok as long as the prolog has been recognzied. */
    13621385                {
     
    13661389                     */
    13671390                    callTab[i][0] = 0xEA; /* jmp far ptr */
    1368                     *(unsigned long*)(void*)&callTab[i][1] = _aImportTab[i].offObject;
    1369                     *(unsigned short*)(void*)&callTab[i][5] = _aImportTab[i].usSel;
     1391                    *(unsigned long*)(void*)&callTab[i][1] = aImportTab[i].offObject;
     1392                    *(unsigned short*)(void*)&callTab[i][5] = aImportTab[i].usSel;
    13701393                }
    13711394                else
     
    13891412            case EPT_VARIMPORT32:
    13901413            case EPT_VARIMPORT16:
    1391                 _aImportTab[i].cbProlog = (char)0;
    1392                 *(unsigned long*)(void*)&callTab[i][0] = _aImportTab[i].ulAddress;
    1393                 *(unsigned long*)(void*)&callTab[i][4] = _aImportTab[i].offObject;
    1394                 *(unsigned short*)(void*)&callTab[i][8] = _aImportTab[i].usSel;
    1395                 *(unsigned short*)(void*)&callTab[i][0xa] = (unsigned short)_aImportTab[i].offObject;
    1396                 *(unsigned short*)(void*)&callTab[i][0xc] = _aImportTab[i].usSel;
     1414                aImportTab[i].cbProlog = (char)0;
     1415                *(unsigned long*)(void*)&callTab[i][0] = aImportTab[i].ulAddress;
     1416                *(unsigned long*)(void*)&callTab[i][4] = aImportTab[i].offObject;
     1417                *(unsigned short*)(void*)&callTab[i][8] = aImportTab[i].usSel;
     1418                *(unsigned short*)(void*)&callTab[i][0xa] = (unsigned short)aImportTab[i].offObject;
     1419                *(unsigned short*)(void*)&callTab[i][0xc] = aImportTab[i].usSel;
    13971420                break;
    13981421
     
    14291452/**
    14301453 * -Ring-3 testing-
    1431  * Changes the entries in _aImportTab to point to their fake equivalents.
     1454 * Changes the entries in aImportTab to point to their fake equivalents.
    14321455 * @returns void
    14331456 * @param   void
    14341457 * @status  completely implemented.
    14351458 * @author  knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
    1436  * @remark  Called before the _aImportTab array is used/verified.
     1459 * @remark  Called before the aImportTab array is used/verified.
    14371460 */
    14381461VOID R3TstFixImportTab(VOID)
     
    14921515    for (i = 0; i < NBR_OF_KRNLIMPORTS; i++)
    14931516    {
    1494         switch (_aImportTab[i].fType)
     1517        switch (aImportTab[i].fType)
    14951518        {
    14961519            case EPT_PROC32:
     
    15131536        } /* switch - type */
    15141537
    1515         _aImportTab[i].ulAddress = aTstFakers[i].uAddress;
     1538        aImportTab[i].ulAddress = aTstFakers[i].uAddress;
    15161539        switch (aTstFakers[i].fObj)
    15171540        {
    15181541            case 1:
    1519                 _aImportTab[i].usSel = GetSelectorCODE32();
    1520                 _aImportTab[i].offObject = aTstFakers[i].uAddress - (unsigned)&CODE32START;
     1542                aImportTab[i].usSel = GetSelectorCODE32();
     1543                aImportTab[i].offObject = aTstFakers[i].uAddress - (unsigned)&CODE32START;
    15211544                break;
    15221545            case 2:
    1523                 _aImportTab[i].usSel = GetSelectorCODE16();
    1524                 _aImportTab[i].offObject = aTstFakers[i].uAddress - (unsigned)&CODE16START;
     1546                aImportTab[i].usSel = GetSelectorCODE16();
     1547                aImportTab[i].offObject = aTstFakers[i].uAddress - (unsigned)&CODE16START;
    15251548                break;
    15261549            case 3:
    1527                 _aImportTab[i].usSel = GetSelectorDATA32();
    1528                 _aImportTab[i].offObject = aTstFakers[i].uAddress - (unsigned)&DATA32START;
     1550                aImportTab[i].usSel = GetSelectorDATA32();
     1551                aImportTab[i].offObject = aTstFakers[i].uAddress - (unsigned)&DATA32START;
    15291552                break;
    15301553            case 4:
    1531                 _aImportTab[i].usSel = GetSelectorDATA16();
    1532                 _aImportTab[i].offObject = aTstFakers[i].uAddress - (unsigned)&DATA16START;
     1554                aImportTab[i].usSel = GetSelectorDATA16();
     1555                aImportTab[i].offObject = aTstFakers[i].uAddress - (unsigned)&DATA16START;
    15331556                break;
    15341557            default:
  • branches/GRACE/src/win32k/elf2lx/elf2lx.cpp

    r2924 r4162  
    1 /* $Id: elf2lx.cpp,v 1.3 2000-02-27 02:13:19 bird Exp $
     1/* $Id: elf2lx.cpp,v 1.3.4.1 2000-09-02 20:49:13 bird Exp $
    22 *
    33 * Elf2Lx - implementation.
     
    2828#include <newexe.h>                     /* OS/2 NE structs and definitions. */
    2929#include <exe386.h>                     /* OS/2 LX structs and definitions. */
     30
     31#include "devSegDf.h"                   /* Win32k segment definitions. */
    3032
    3133#include "malloc.h"                     /* win32k malloc (resident). Not C library! */
  • branches/GRACE/src/win32k/include/options.h

    r4107 r4162  
    1 /* $Id: options.h,v 1.10.4.3 2000-08-28 22:42:38 bird Exp $
     1/* $Id: options.h,v 1.10.4.4 2000-09-02 20:49:15 bird Exp $
    22 *
    33 * Options.
     
    5252            (unsigned short)~0,     /* usVerMajor    */     \
    5353            (unsigned short)~0,     /* usVerMinor    */     \
    54             FLAGS_PE_PE2LX,         /* fPE           */     \
     54            FLAGS_PE_MIXED,         /* fPE           */     \
    5555            INFOLEVEL_QUIET,        /* ulInfoLevel   */     \
    5656            FALSE,                  /* fElf          */     \
     
    131131#pragma pack()
    132132
    133 
    134133/*******************************************************************************
    135134*   Global Variables                                                           *
    136135*******************************************************************************/
    137 extern struct options options;      /* defined in d32globals.c */
     136extern struct options DATA16_GLOBAL options;    /* defined in d16globals.c */
    138137#if defined(__IBMC__) || defined(__IBMCPP__)
    139138    #pragma map( options , "_options"  )
  • branches/GRACE/src/win32k/include/probkrnl.h

    r4117 r4162  
    1 /* $Id: probkrnl.h,v 1.13.4.9 2000-08-30 04:11:30 bird Exp $
     1/* $Id: probkrnl.h,v 1.13.4.10 2000-09-02 20:49:15 bird Exp $
    22 *
    33 * Include file for ProbKrnl.
     
    9797*   NOTE! These are only available at init time!                               *
    9898*******************************************************************************/
    99 extern IMPORTKRNLSYM _aImportTab[NBR_OF_KRNLIMPORTS]; /* 'aImportTab' in PrbKrnl.c */
    100 extern KRNLDBENTRY   aKrnlSymDB[];      /* defined in symdb.c (for 16-bit usage) */
    101 extern KRNLDBENTRY   _aKrnlSymDB[];     /* defined in symdb.c (for 32-bit usage) */
     99extern IMPORTKRNLSYM DATA16_GLOBAL  aImportTab[NBR_OF_KRNLIMPORTS]; /* Defined in ProbKrnl.c */
     100extern char          DATA16_GLOBAL  szUsrSym[50];                   /* Defined in ProbKrnl.c */
     101extern KRNLDBENTRY   DATA16_INIT    aKrnlSymDB[];                   /* Defined in symdb.c (for 16-bit usage) */
     102
     103#if defined(__IBMC__) || defined(__IBMCPP__)
     104    #pragma map( aImportTab , "_aImportTab" )
     105    #pragma map( szUsrSym   , "_szUsrSym"   )
     106    #pragma map( aKrnlSymDB , "_aKrnlSymDB" )
     107#endif
    102108
    103109#if defined(INCL_16) && defined(MAX_DISKDD_CMD) /* 16-bit only */
    104110int ProbeKernel(PRPINITIN pReqPack);
     111
     112#if 0 /*ndef CODE16_INIT*/
     113#pragma alloc_text(CODE16_INIT, ProbeKernel)
    105114#endif
    106115
    107116#endif
    108117
     118#endif
     119
  • branches/GRACE/src/win32k/k32/k32AllocMemEx.cpp

    r4112 r4162  
    1 /* $Id: k32AllocMemEx.cpp,v 1.2.4.1 2000-08-29 19:47:02 bird Exp $
     1/* $Id: k32AllocMemEx.cpp,v 1.2.4.2 2000-09-02 20:49:16 bird Exp $
    22 *
    33 * k32AllocMemEx - Equivalent to DosAllocMem, but this one
     
    2929*******************************************************************************/
    3030#include <os2.h>
     31#include "devSegDf.h"                   /* Win32k segment definitions. */
    3132#include "OS2Krnl.h"
    3233#include "win32k.h"
  • branches/GRACE/src/win32k/ldr/ModuleBase.cpp

    r4090 r4162  
    1 /* $Id: ModuleBase.cpp,v 1.3.4.2 2000-08-25 04:47:23 bird Exp $
     1/* $Id: ModuleBase.cpp,v 1.3.4.3 2000-09-02 20:49:17 bird Exp $
    22 *
    33 * ModuleBase - Implementetation.
     
    2525#include <os2.h>                        /* OS/2 header file. */
    2626
    27 #include "malloc.h"                     /* win32k malloc. Not C library! */
     27#include "devSegDf.h"                   /* Win32k segment definitions. */
     28#include "malloc.h"                     /* Win32k malloc. Not C library! */
    2829
    2930#include <string.h>                     /* C library string.h. */
  • branches/GRACE/src/win32k/ldr/ldr.cpp

    r4090 r4162  
    1 /* $Id: ldr.cpp,v 1.7.4.4 2000-08-25 04:47:24 bird Exp $
     1/* $Id: ldr.cpp,v 1.7.4.5 2000-09-02 20:49:17 bird Exp $
    22 *
    33 * ldr.cpp - Loader helpers.
     
    2222#include <os2.h>
    2323
     24#include "devSegDf.h"
    2425#include "malloc.h"
    2526#include "new.h"
  • branches/GRACE/src/win32k/ldr/myldrEnum32bitRelRecs.cpp

    r3834 r4162  
    1 /* $Id: myldrEnum32bitRelRecs.cpp,v 1.2.4.1 2000-07-16 22:43:36 bird Exp $
     1/* $Id: myldrEnum32bitRelRecs.cpp,v 1.2.4.2 2000-09-02 20:49:19 bird Exp $
    22 *
    33 * myldrEnum32bitRelRecs - ldrEnum32bitRelRecs
     
    2424#include <stdlib.h>
    2525
     26#include "devSegDf.h"                   /* Win32k segment definitions. */
    2627#include "avl.h"
    2728#include "log.h"
  • branches/GRACE/src/win32k/ldr/myldrOpen.cpp

    r4117 r4162  
    1 /* $Id: myldrOpen.cpp,v 1.10.4.11 2000-08-30 04:11:31 bird Exp $
     1/* $Id: myldrOpen.cpp,v 1.10.4.12 2000-09-02 20:49:19 bird Exp $
    22 *
    33 * myldrOpen - ldrOpen.
     
    2626#include <os2.h>
    2727
     28#include "devSegDf.h"                   /* Win32k segment definitions. */
    2829#include "rmalloc.h"
    2930#include "malloc.h"
  • branches/GRACE/src/win32k/ldr/myldrOpenPath.cpp

    r4090 r4162  
    1 /* $Id: myldrOpenPath.cpp,v 1.1.2.3 2000-08-25 04:47:25 bird Exp $
     1/* $Id: myldrOpenPath.cpp,v 1.1.2.4 2000-09-02 20:49:20 bird Exp $
    22 *
    33 * myldrOpenPath - ldrOpenPath used to open executables we'll override
     
    2626#include <stdlib.h>
    2727
     28#include "devSegDf.h"                   /* Win32k segment definitions. */
    2829#include "log.h"
    2930#include "dev32.h"
  • branches/GRACE/src/win32k/ldr/myldrRead.cpp

    r3834 r4162  
    1 /* $Id: myldrRead.cpp,v 1.6.4.1 2000-07-16 22:43:38 bird Exp $
     1/* $Id: myldrRead.cpp,v 1.6.4.2 2000-09-02 20:49:20 bird Exp $
    22 *
    33 * myldrRead - ldrRead.
     
    2323#include <stdlib.h>
    2424
     25#include "devSegDf.h"                   /* Win32k segment definitions. */
    2526#include "log.h"
    2627#include "avl.h"
  • branches/GRACE/src/win32k/misc/OS2KTCB.c

    r3829 r4162  
    1 /* $Id: OS2KTCB.c,v 1.1 2000-07-16 22:21:17 bird Exp $
     1/* $Id: OS2KTCB.c,v 1.1.2.1 2000-09-02 20:49:21 bird Exp $
    22 *
    33 * TCB - Thread Control Block access methods.
     
    1515#include <os2.h>
    1616#include <OS2KTCB.h>
     17#include "devSegDf.h"                   /* Win32k segment definitions. */
    1718#include "options.h"
    1819
  • branches/GRACE/src/win32k/misc/env.c

    r3834 r4162  
    1 /* $Id: env.c,v 1.2.4.1 2000-07-16 22:43:39 bird Exp $
     1/* $Id: env.c,v 1.2.4.2 2000-09-02 20:49:21 bird Exp $
    22 *
    33 * Environment access functions
     
    2121#include <os2.h>
    2222
     23#include "devSegDf.h"                   /* Win32k segment definitions. */
    2324#include "dev32.h"
    2425#include "dev32hlp.h"
  • branches/GRACE/src/win32k/misc/vprintf.c

    r3834 r4162  
    1 /* $Id: vprintf.c,v 1.7.4.1 2000-07-16 22:43:41 bird Exp $
     1/* $Id: vprintf.c,v 1.7.4.2 2000-09-02 20:49:24 bird Exp $
    22 *
    33 * vprintf and printf
     
    4747#include <stdarg.h>
    4848
     49#include "devSegDf.h"                   /* Win32k segment definitions. */
    4950#include "dev32.h"
    5051#include "vprintf.h"
  • branches/GRACE/src/win32k/pe2lx/pe2lx.cpp

    r4141 r4162  
    1 /* $Id: pe2lx.cpp,v 1.18.4.11 2000-09-01 08:01:37 bird Exp $
     1/* $Id: pe2lx.cpp,v 1.18.4.12 2000-09-02 20:49:25 bird Exp $
    22 *
    33 * Pe2Lx class implementation. Ring 0 and Ring 3
     
    8080#include <newexe.h>                     /* OS/2 NE structs and definitions. */
    8181#include <exe386.h>                     /* OS/2 LX structs and definitions. */
     82
     83#include "devSegDf.h"                   /* Win32k segment definitions. */
    8284
    8385#include "malloc.h"                     /* win32k malloc (resident). Not C library! */
  • branches/GRACE/src/win32k/test/dos.c

    r3829 r4162  
    1 /* $Id: dos.c,v 1.1 2000-07-16 22:18:14 bird Exp $
     1/* $Id: dos.c,v 1.1.4.1 2000-09-02 20:49:28 bird Exp $
    22 *
    33 * Thunkers for OS/2 APIs.
     
    2222*******************************************************************************/
    2323#include <os2.h>
     24
     25#include "devSegDf.h"                   /* Win32k segment definitions. */
    2426
    2527#include "test.h"
  • branches/GRACE/src/win32k/test/fake.c

    r4117 r4162  
    1 /* $Id: fake.c,v 1.1.4.5 2000-08-30 04:11:32 bird Exp $
     1/* $Id: fake.c,v 1.1.4.6 2000-09-02 20:49:28 bird Exp $
    22 *
    33 * Fake stubs for the ldr and kernel functions we imports or overloads.
     
    2828
    2929#include <string.h>
     30
     31#include "devSegDf.h"                   /* Win32k segment definitions. */
    3032
    3133#include "log.h"
  • branches/GRACE/src/win32k/test/win32ktst.c

    r4117 r4162  
    1 /* $Id: win32ktst.c,v 1.1.4.7 2000-08-30 04:11:33 bird Exp $
     1/* $Id: win32ktst.c,v 1.1.4.8 2000-09-02 20:49:29 bird Exp $
    22 *
    33 * Win32k test module.
     
    3434#include <os2.h>
    3535#include <exe386.h>
     36
     37#include "devSegDf.h"                   /* Win32k segment definitions. */
    3638
    3739#include "malloc.h"
     
    736738    int         rc = 1;
    737739    RP32INIT    rpinit;
    738     char *      pszInitArgs = "-C1 -L:N -Verbose -Quiet -Elf:Yes -Pe:PE -Script:Yes -W4 -Heap:512000 -ResHeap:0256000 -HeapMax:4096000 -ResHeapMax:0x100000";
     740    char *      pszInitArgs = "-C1 -L:N -Verbose -Quiet -Elf:Yes -Pe:PE -Script:Yes -Rexx:NES -Java:NYes -W4 -Heap:512000 -ResHeap:0256000 -HeapMax:4096000 -ResHeapMax:0x100000";
    739741
    740742    /* $elf */
     
    757759            opt.fElf            = TRUE;
    758760            opt.fUNIXScript     = TRUE;
     761            opt.fJava           = FALSE;
     762            opt.fREXXScript     = FALSE;
    759763            opt.fPE             = FLAGS_PE_PE;
    760764            opt.fQuiet          = TRUE;
  • branches/GRACE/src/win32k/win32k.def

    r4005 r4162  
    1111
    1212SEGMENTS
    13     DATA16          class 'FAR_DATA'
    14     DATA16_BSS      class 'FAR_DATA'
    15     DATA16_CONST    class 'FAR_DATA'
    16     CODE16          class 'CODE'
    17     CODE16_IOSEG    class 'CODE'
    18     CODE32          class 'CODE'
    19     DATA32          class 'DATA'
    20     c_common        class 'DATA'
    21     BSS32           class 'BSS'
    22     _VFT            class 'CONST'
    23     CONST32_RO      class 'CONST'
    24     CALLTAB         class 'DATA'
     13    DATA16              class 'FAR_DATA'
     14    DATA16_BSS          class 'FAR_DATA'
     15    DATA16_CONST        class 'FAR_DATA'
     16    DATA16_GLOBAL       class 'FAR_DATA'
     17    DATA16_INIT         class 'FAR_DATA'
     18    DATA16_INIT_BSS     class 'FAR_DATA'
     19    DATA16_INIT_CONST   class 'FAR_DATA'
    2520
     21    CODE16              class 'CODE'
     22    CODE16_IOSEG        class 'CODE'
     23    CODE16_INIT         class 'CODE'
     24
     25    CODE32              class 'CODE'
     26
     27    DATA32              class 'DATA'
     28    c_common            class 'DATA'
     29    BSS32               class 'BSS'
     30    _VFT                class 'CONST'
     31    CONST32_RO          class 'CONST'
     32    CALLTAB             class 'DATA'
     33
  • branches/GRACE/src/win32k/win32ktst.def

    r4010 r4162  
    1212
    1313SEGMENTS
    14     DATA16          class 'FAR_DATA'
    15     DATA16_BSS      class 'FAR_DATA'
    16     DATA16_CONST    class 'FAR_DATA'
    17     CODE16          class 'CODE'
    18     CODE32          class 'CODE'
    19     CALLTAB         class 'DATA'
    20     DATA32          class 'DATA'
    21     c_common        class 'DATA'
    22     DDE4_DATA32     class 'DATA'
    23     CTOR_DTOR1      class 'DATA'
    24     CTOR_DTOR2      class 'DATA'
    25     CTOR_DTOR3      class 'DATA'
    26     _VFT            class 'CONST'
    27     CONST32_RO      class 'CONST'
    28     EH_DATA         class 'CONST'
    29     BSS32           class 'BSS'
     14    DATA16              class 'FAR_DATA'
     15    DATA16_BSS          class 'FAR_DATA'
     16    DATA16_CONST        class 'FAR_DATA'
     17    DATA16_GLOBAL       class 'FAR_DATA'
     18    DATA16_INIT         class 'FAR_DATA'
     19    DATA16_INIT_BSS     class 'FAR_DATA'
     20    DATA16_INIT_CONST   class 'FAR_DATA'
     21
     22    CODE16              class 'CODE'
     23    CODE16_IOSEG        class 'CODE'
     24    CODE16_INIT         class 'CODE'
     25
     26    CODE32              class 'CODE'
     27    CALLTAB             class 'DATA'
     28    DATA32              class 'DATA'
     29    c_common            class 'DATA'
     30    DDE4_DATA32         class 'DATA'
     31    CTOR_DTOR1          class 'DATA'
     32    CTOR_DTOR2          class 'DATA'
     33    CTOR_DTOR3          class 'DATA'
     34    _VFT                class 'CONST'
     35    CONST32_RO          class 'CONST'
     36    EH_DATA             class 'CONST'
     37    BSS32               class 'BSS'
    3038
    3139IMPORTS
Note: See TracChangeset for help on using the changeset viewer.