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

Bugfixing, DevSegDf.h,...

Location:
branches/GRACE/src/win32k/dev16
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.