Ignore:
Timestamp:
May 28, 2000, 6:50:46 PM (25 years ago)
Author:
sandervl
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sbliveos2/trunk/drv32/init.c

    r142 r151  
    2727#include <os2.h>
    2828}
     29#include <string.h>
    2930
    3031// Device support
     
    4849const char szCopyRight1[]= "Copyright 1999, 2000 Creative Labs, Inc.\r\n";
    4950const char szCopyRight2[]= "Copyright 2000 Sander van Leeuwen (OS/2 Port)\r\n\r\n";
    50 
     51const char szCodeStartEnd[] = "Code 0x%0x - 0x%0x\r\n\r\n";
     52 
    5153typedef struct {
    5254 USHORT MsgLength;
     
    5557
    5658extern "C" WORD32 MSG_TABLE32;
     59
     60extern "C" int sprintf (char *buffer, const char *format, ...);
    5761
    5862//Print messages with DosWrite when init is done or has failed (see startup.asm)
     
    149153
    150154// Initialize device driver
    151 
    152155WORD32 DiscardableInit(RPInit __far* rp) 
    153156{
     157 char        debugmsg[64];
     158 char FAR48 *args;
     159
    154160  GetTKSSBase();
    155161  if(LockSegments()) {
    156     WriteString(ERR_ERROR, sizeof(ERR_ERROR)-1);
    157     WriteString(ERR_LOCK, sizeof(ERR_LOCK)-1);
    158     return RPDONE | RPERR;
     162        WriteString(ERR_ERROR, sizeof(ERR_ERROR)-1);
     163        WriteString(ERR_LOCK, sizeof(ERR_LOCK)-1);
     164        return RPDONE | RPERR;
    159165  }
    160166
     
    167173  WriteString(szCopyRight1, sizeof(szCopyRight1)-1);
    168174  WriteString(szCopyRight2, sizeof(szCopyRight2)-1);
     175
     176  args = __Make48Pointer(rp->In.Args);
     177  while(*args && *args == ' ') args++;
     178  while(*args && *args != ' ') args++;
     179  while(*args && *args == ' ') args++;
     180  while(*args && *args != '/') args++;
     181  if(*args) args++;
     182
     183  if(*args == 'D' || *args == 'd') {
     184        sprintf(debugmsg, szCodeStartEnd, OffsetBeginCS32, OffsetFinalCS32);
     185        WriteString(debugmsg, strlen(debugmsg));
     186  }
    169187
    170188  // Complete the installation
Note: See TracChangeset for help on using the changeset viewer.