Changeset 151 for sbliveos2/trunk/drv32/init.c
- Timestamp:
- May 28, 2000, 6:50:46 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sbliveos2/trunk/drv32/init.c
r142 r151 27 27 #include <os2.h> 28 28 } 29 #include <string.h> 29 30 30 31 // Device support … … 48 49 const char szCopyRight1[]= "Copyright 1999, 2000 Creative Labs, Inc.\r\n"; 49 50 const char szCopyRight2[]= "Copyright 2000 Sander van Leeuwen (OS/2 Port)\r\n\r\n"; 50 51 const char szCodeStartEnd[] = "Code 0x%0x - 0x%0x\r\n\r\n"; 52 51 53 typedef struct { 52 54 USHORT MsgLength; … … 55 57 56 58 extern "C" WORD32 MSG_TABLE32; 59 60 extern "C" int sprintf (char *buffer, const char *format, ...); 57 61 58 62 //Print messages with DosWrite when init is done or has failed (see startup.asm) … … 149 153 150 154 // Initialize device driver 151 152 155 WORD32 DiscardableInit(RPInit __far* rp) 153 156 { 157 char debugmsg[64]; 158 char FAR48 *args; 159 154 160 GetTKSSBase(); 155 161 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; 159 165 } 160 166 … … 167 173 WriteString(szCopyRight1, sizeof(szCopyRight1)-1); 168 174 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 } 169 187 170 188 // Complete the installation
Note:
See TracChangeset
for help on using the changeset viewer.