Ignore:
Timestamp:
Jul 22, 2010, 8:20:48 PM (15 years ago)
Author:
David Azarewicz
Message:

debug statement cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OCO/branches/DAZ/drv16/strategy.cpp

    r497 r524  
    33/* SCCSID = %W% %E% */
    44/****************************************************************************
    5  *                                                                          *
    6  * Copyright (c) IBM Corporation 1994 - 1997.                               *
    7  *                                                                          *
    8  * The following IBM OS/2 source code is provided to you solely for the     *
     5 *                                                                                                                                                      *
     6 * Copyright (c) IBM Corporation 1994 - 1997.                                                           *
     7 *                                                                                                                                                      *
     8 * The following IBM OS/2 source code is provided to you solely for the         *
    99 * the purpose of assisting you in your development of OS/2 device drivers. *
    10  * You may use this code in accordance with the IBM License Agreement       *
    11  * provided in the IBM Device Driver Source Kit for OS/2.                   *
    12  *                                                                          *
     10 * You may use this code in accordance with the IBM License Agreement           *
     11 * provided in the IBM Device Driver Source Kit for OS/2.                                       *
     12 *                                                                                                                                                      *
    1313 ****************************************************************************/
    1414/**@internal %W%
     
    1717 * @version %I%
    1818 * @context Unless otherwise noted, all interfaces are Ring-0, 16-bit,
    19  *  kernel stack.
     19 *      kernel stack.
    2020 * @history
    2121 *
    2222 */
    23 extern "C" {               // 16-bit header files are not C++ aware
     23extern "C" {                       // 16-bit header files are not C++ aware
    2424#define INCL_NOPMAPI
    2525#define INCL_DOSINFOSEG
     
    3333#include <devhelp.h>
    3434#include "strategy.h"
    35 #include "rtmidi.hpp"                  // Object definition
     35#include "rtmidi.hpp"                              // Object definition
    3636#include "end.h"
    3737
     
    8484extern "C" char szAZX[];
    8585
    86 static char *pszIntelICH        = (char *)szINTEL_ICH;
     86static char *pszIntelICH                = (char *)szINTEL_ICH;
    8787static char *pszSigmatel9721_23 = (char *)szSIGMATEL_9721_23;
    88 static char *pszSBLive          = (char *)szSBLIVE;
    89 static char *pszCMedia          = (char *)szCMEDIA;
    90 static char *pszCrystal4281     = (char *)szCS4281;
    91 static char *pszALS4000         = (char *)szALS4000;
    92 static char *pszCrystal46XX     = (char *)szCS46XX;
    93 static char *pszVIA82XX         = (char *)szVIA82XX;
    94 static char *pszESS1938         = (char *)szESS1938;
    95 static char *pszVORTEX          = (char *)szVORTEX;
    96 static char *pszES1371          = (char *)szES1371;
    97 static char *pszES1370          = (char *)szES1370;
    98 static char *pszYAMAHA          = (char *)szYAMAHA;
    99 static char *pszMAESTRO         = (char *)szMAESTRO;
    100 static char *pszMAESTRO3        = (char *)szMAESTRO3;
    101 static char *pszALLEGRO         = (char *)szALLEGRO;
    102 static char *pszALI5451         = (char *)szALI5451;
    103 static char *pszSI7012          = (char *)szSI7012;
    104 static char *pszALI5455         = (char *)szALI5455;
    105 static char *pszNVIDIA          = (char *)szNVIDIA;
    106 static char *pszAMD             = (char *)szAMD;
    107 static char *pszTRIDENT         = (char *)szTRIDENT;
    108 static char *pszNEOMAGIC        = (char *)szNEOMAGIC;
    109 static char *pszFM801           = (char *)szFM801;
    110 static char *pszATIIXP          = (char *)szATIIXP;
    111 static char *pszAUDIGYLS        = (char *)szAUDIGYLS;
    112 static char *pszBT87X           = (char *)szBT87X;
    113 static char *pszAZX             = (char *)szAZX;
     88static char *pszSBLive                  = (char *)szSBLIVE;
     89static char *pszCMedia                  = (char *)szCMEDIA;
     90static char *pszCrystal4281     = (char *)szCS4281;
     91static char *pszALS4000                 = (char *)szALS4000;
     92static char *pszCrystal46XX     = (char *)szCS46XX;
     93static char *pszVIA82XX                 = (char *)szVIA82XX;
     94static char *pszESS1938                 = (char *)szESS1938;
     95static char *pszVORTEX                  = (char *)szVORTEX;
     96static char *pszES1371                  = (char *)szES1371;
     97static char *pszES1370                  = (char *)szES1370;
     98static char *pszYAMAHA                  = (char *)szYAMAHA;
     99static char *pszMAESTRO                 = (char *)szMAESTRO;
     100static char *pszMAESTRO3                = (char *)szMAESTRO3;
     101static char *pszALLEGRO                 = (char *)szALLEGRO;
     102static char *pszALI5451                 = (char *)szALI5451;
     103static char *pszSI7012                  = (char *)szSI7012;
     104static char *pszALI5455                 = (char *)szALI5455;
     105static char *pszNVIDIA                  = (char *)szNVIDIA;
     106static char *pszAMD                     = (char *)szAMD;
     107static char *pszTRIDENT                 = (char *)szTRIDENT;
     108static char *pszNEOMAGIC                = (char *)szNEOMAGIC;
     109static char *pszFM801                   = (char *)szFM801;
     110static char *pszATIIXP                  = (char *)szATIIXP;
     111static char *pszAUDIGYLS                = (char *)szAUDIGYLS;
     112static char *pszBT87X                   = (char *)szBT87X;
     113static char *pszAZX                     = (char *)szAZX;
    114114#endif /* ENABLE_HW_CERTIFICATION */
    115115
    116        BOOL fNoHardware         = FALSE;
     116           BOOL fNoHardware             = FALSE;
    117117
    118118extern void DBGCALLCONV APM_Init();
     
    126126  int d;
    127127  for (;;)
    128     {
    129 //      d = (int)(unsigned char)*string1 - (int)(unsigned char)(*string2 ^ 0x81);
    130        d = (int)(unsigned char)*string1 - (int)(unsigned char)*string2;
    131        if (d != 0 || *string1 == 0 || *string2 == 0)
    132         return d;
    133        ++string1; ++string2;
    134     }
     128        {
     129//              d = (int)(unsigned char)*string1 - (int)(unsigned char)(*string2 ^ 0x81);
     130           d = (int)(unsigned char)*string1 - (int)(unsigned char)*string2;
     131           if (d != 0 || *string1 == 0 || *string2 == 0)
     132                return d;
     133           ++string1; ++string2;
     134        }
    135135}
    136136//******************************************************************************
     
    141141
    142142  while (count != 0)
    143     {
    144         //      d = (int)(unsigned char)*string1 - (int)(unsigned char)(*string2 ^ 0x81);
    145       d = (int)(unsigned char)*string1 - (int)(unsigned char)*string2;
    146       if (d != 0 || *string1 == 0 || *string2 == 0)
    147         return d;
    148       ++string1; ++string2;
    149       --count;
    150     }
     143        {
     144                //              d = (int)(unsigned char)*string1 - (int)(unsigned char)(*string2 ^ 0x81);
     145          d = (int)(unsigned char)*string1 - (int)(unsigned char)*string2;
     146          if (d != 0 || *string1 == 0 || *string2 == 0)
     147                return d;
     148          ++string1; ++string2;
     149          --count;
     150        }
    151151  return 0;
    152152}
     
    160160   if(OSS16_AttachToPdd() != OSSERR_SUCCESS)
    161161   {
    162        DebugInt3();
    163 //      DevHelp_Beep(500, 100);
    164        goto failure;
     162           DebugInt3();
     163//              DevHelp_Beep(500, 100);
     164           goto failure;
    165165   }
    166166
     
    168168   if(OSS16_QueryDevCaps(current_device, &devCaps[0]) != OSSERR_SUCCESS)
    169169   {
    170        DebugInt3();
    171        //       DevHelp_Beep(2000, 100);
    172        goto failure;
     170           DebugInt3();
     171           //           DevHelp_Beep(2000, 100);
     172           goto failure;
    173173   }
    174174   dprintf(("Device 0 name: %s", (char FAR *)devCaps[0].szDeviceName));
    175175   if(devCaps[0].nrDevices > OSS32_MAX_AUDIOCARDS)
    176176   {
    177        DebugInt3();
    178        devCaps[0].nrDevices = OSS32_MAX_AUDIOCARDS;
     177           DebugInt3();
     178           devCaps[0].nrDevices = OSS32_MAX_AUDIOCARDS;
    179179   }
    180180   //Get caps of other devices (if present)
    181181   for(i=1;i<devCaps[0].nrDevices;i++)
    182182   {
    183        if(OSS16_QueryDevCaps(i, &devCaps[i]) != OSSERR_SUCCESS) {
    184            DebugInt3();
    185            goto failure;
    186        }
     183           if(OSS16_QueryDevCaps(i, &devCaps[i]) != OSSERR_SUCCESS) {
     184                   DebugInt3();
     185                   goto failure;
     186           }
    187187   }
    188188
     
    191191   //Check for certified audiocard/chipsets
    192192   if(!xorstrncmp(devCaps[0].szDeviceName, pszIntelICH, 6) ||
    193       !xorstrcmp(devCaps[0].szDeviceName, pszSI7012) ||
    194       !xorstrcmp(devCaps[0].szDeviceName, pszALI5455) ||
    195       !xorstrncmp(devCaps[0].szDeviceName, pszNVIDIA, 6) ||
    196       !xorstrcmp(devCaps[0].szDeviceName, pszAMD))
    197    {
    198        soundCard = INTELICH;
     193          !xorstrcmp(devCaps[0].szDeviceName, pszSI7012) ||
     194          !xorstrcmp(devCaps[0].szDeviceName, pszALI5455) ||
     195          !xorstrncmp(devCaps[0].szDeviceName, pszNVIDIA, 6) ||
     196          !xorstrcmp(devCaps[0].szDeviceName, pszAMD))
     197   {
     198           soundCard = INTELICH;
    199199   }
    200200   else
    201201   if(!xorstrcmp(devCaps[0].szDeviceName, pszSBLive))
    202202   {
    203        soundCard = SBLIVE;
     203           soundCard = SBLIVE;
    204204   }
    205205   else
    206206   if(!xorstrncmp(devCaps[0].szDeviceName, pszCMedia, 11))
    207207   {
    208        soundCard = CMEDIA;
     208           soundCard = CMEDIA;
    209209   }
    210210   else
    211211   if(!xorstrcmp(devCaps[0].szDeviceName, pszCrystal4281))
    212212   {
    213        soundCard = CS4281;
     213           soundCard = CS4281;
    214214   }
    215215   else
    216216   if(!xorstrcmp(devCaps[0].szDeviceName, pszALS4000))
    217217   {
    218        //hardware not completely full duplex; sample rates must be identical if
    219        //both playback & recording active
    220        devCaps[0].waveInCaps.ulRateFlags  |= OSS32_CAPS_PCM_RATE_HALFDUPLEX;
    221        devCaps[0].waveOutCaps.ulRateFlags |= OSS32_CAPS_PCM_RATE_HALFDUPLEX;
    222        soundCard = ALS4000;
     218           //hardware not completely full duplex; sample rates must be identical if
     219           //both playback & recording active
     220           devCaps[0].waveInCaps.ulRateFlags  |= OSS32_CAPS_PCM_RATE_HALFDUPLEX;
     221           devCaps[0].waveOutCaps.ulRateFlags |= OSS32_CAPS_PCM_RATE_HALFDUPLEX;
     222           soundCard = ALS4000;
    223223   }
    224224   else
    225225   if(!xorstrcmp(devCaps[0].szDeviceName, pszCrystal46XX))
    226226   {
    227        soundCard = CS46XX;
     227           soundCard = CS46XX;
    228228   }
    229229   else
    230230   if(!xorstrncmp(devCaps[0].szDeviceName, pszVIA82XX, 6))
    231231   {
    232        soundCard = VIA82XX;
     232           soundCard = VIA82XX;
    233233   }
    234234   else
    235235   if(!xorstrcmp(devCaps[0].szDeviceName, pszESS1938))
    236236   {
    237        soundCard = ESS1938;
     237           soundCard = ESS1938;
    238238   }
    239239   else
    240240   if(!xorstrncmp(devCaps[0].szDeviceName, pszVORTEX, 6))
    241241   {
    242        soundCard = VORTEX;
     242           soundCard = VORTEX;
    243243   }
    244244   else
    245245   if(!xorstrncmp(devCaps[0].szDeviceName, pszYAMAHA,6))
    246246   {
    247        soundCard = YAMAHA;
     247           soundCard = YAMAHA;
    248248   }
    249249   else
    250250   if(!xorstrcmp(devCaps[0].szDeviceName, pszMAESTRO))
    251251   {
    252        soundCard = MAESTRO;
    253    }
    254    else
    255        if(!xorstrcmp(devCaps[0].szDeviceName, pszMAESTRO3) ||
    256           !xorstrcmp(devCaps[0].szDeviceName, pszALLEGRO))
    257    {
    258        soundCard = MAESTRO3;
    259    }
    260    else
    261        if(!xorstrncmp(devCaps[0].szDeviceName, pszES1371, 6) ||
    262           !xorstrncmp(devCaps[0].szDeviceName, pszES1370, 6))
    263    {
    264        soundCard = ENSONIQ;
     252           soundCard = MAESTRO;
     253   }
     254   else
     255           if(!xorstrcmp(devCaps[0].szDeviceName, pszMAESTRO3) ||
     256                  !xorstrcmp(devCaps[0].szDeviceName, pszALLEGRO))
     257   {
     258           soundCard = MAESTRO3;
     259   }
     260   else
     261           if(!xorstrncmp(devCaps[0].szDeviceName, pszES1371, 6) ||
     262                  !xorstrncmp(devCaps[0].szDeviceName, pszES1370, 6))
     263   {
     264           soundCard = ENSONIQ;
    265265   }
    266266   else
    267267   if(!xorstrcmp(devCaps[0].szDeviceName, pszALI5451))
    268268   {
    269        soundCard = ALI5451;
     269           soundCard = ALI5451;
    270270   }
    271271   else
    272272   if(!xorstrncmp(devCaps[0].szDeviceName, pszTRIDENT,7))
    273273   {
    274        soundCard = TRIDENT;
     274           soundCard = TRIDENT;
    275275   }
    276276   else
    277277   if(!xorstrncmp(devCaps[0].szDeviceName, pszNEOMAGIC,5))
    278278   {
    279        soundCard = NEOMAGIC;
     279           soundCard = NEOMAGIC;
    280280   }
    281281   else
    282282   if(!xorstrncmp(devCaps[0].szDeviceName, pszFM801,5))
    283283   {
    284        soundCard = FM801;
     284           soundCard = FM801;
    285285   }
    286286   else
    287287   if(!xorstrncmp(devCaps[0].szDeviceName, pszATIIXP,7))
    288288   {
    289        soundCard = ATIIXP;
     289           soundCard = ATIIXP;
    290290   }
    291291   else
    292292   if(!xorstrncmp(devCaps[0].szDeviceName, pszAUDIGYLS,6))
    293293   {
    294        soundCard = AUDIGYLS;
     294           soundCard = AUDIGYLS;
    295295   }
    296296   else
    297297   if(!xorstrncmp(devCaps[0].szDeviceName, pszBT87X,5))
    298298   {
    299        soundCard = BT87X;
     299           soundCard = BT87X;
    300300   }
    301301   else
    302302   if(!xorstrncmp(devCaps[0].szDeviceName, pszAZX,9))
    303303   {
    304        soundCard = AZX;
     304           soundCard = AZX;
    305305   }
    306306   else {
    307 //       printk("Soundcard %s not supported", (char FAR *)devCaps[0].szDeviceName);
    308        dprintf(("Soundcard %s not supported", (char FAR *)devCaps[0].szDeviceName));
    309 //       DevHelp_Beep(1000, 50);
    310        DebugInt3();
    311        goto failure;
     307           rprintf(("Soundcard %s not supported", (char FAR *)devCaps[0].szDeviceName));
     308                //DevHelp_Beep(1000, 50);
     309           DebugInt3();
     310           goto failure;
    312311   }
    313312#endif /* ENABLE_HW_CERTIFICATION */
     
    315314
    316315failure:
    317 //    DevHelp_Beep(1000, 50);
    318     fNoHardware = TRUE;
    319     return FALSE;
     316//        DevHelp_Beep(1000, 50);
     317        fNoHardware = TRUE;
     318        return FALSE;
    320319}
    321320
     
    329328{
    330329   if(InitializeAudio() == FALSE) {
    331        return;
     330           return;
    332331   }
    333332   if(fNoHardware) return;
     
    338337   if(devCaps[0].ulCaps & OSS32_CAPS_FMSYNTH_PLAYBACK)
    339338   {
    340        dprintf(("Creating FM Synthesizer device"));
    341 
    342        // Build a FMSYNTH object.  First create a timer, then the HW object.
    343        TIMER* pFMSynthTimer =
    344            new TIMER( NULL, MIDI_TimerInterval, STREAM_FMSYNTH_PLAY );
    345        if (pFMSynthTimer->eState() != TIMER_Disabled)
    346            new FMSYNTH( pFMSynthTimer );
    347 
    348        SetHardwareType(AUDIOHW_FMSYNTH_PLAY, MIDI, OPERATION_PLAY, 1);
    349        SetHardwareType(AUDIOHW_FMSYNTH_PLAY, DATATYPE_MIDI, OPERATION_PLAY, 1);
    350        // MIDI on Warp 3
    351        SetHardwareType(AUDIOHW_FMSYNTH_PLAY, DATATYPE_NULL, OPERATION_PLAY, 1);
     339           dprintf(("Creating FM Synthesizer device"));
     340
     341           // Build a FMSYNTH object.  First create a timer, then the HW object.
     342           TIMER* pFMSynthTimer =
     343                   new TIMER( NULL, MIDI_TimerInterval, STREAM_FMSYNTH_PLAY );
     344           if (pFMSynthTimer->eState() != TIMER_Disabled)
     345                   new FMSYNTH( pFMSynthTimer );
     346
     347           SetHardwareType(AUDIOHW_FMSYNTH_PLAY, MIDI, OPERATION_PLAY, 1);
     348           SetHardwareType(AUDIOHW_FMSYNTH_PLAY, DATATYPE_MIDI, OPERATION_PLAY, 1);
     349           // MIDI on Warp 3
     350           SetHardwareType(AUDIOHW_FMSYNTH_PLAY, DATATYPE_NULL, OPERATION_PLAY, 1);
    352351   }
    353352
    354353   if((devCaps[0].ulCaps & OSS32_CAPS_MPU401_PLAYBACK) &&
    355       (devCaps[0].ulCaps & OSS32_CAPS_MPU401_CAPTURE))
    356    {
    357        dprintf(("Creating MPU401 device"));
    358 
    359        // Build the MPU401 object. First create a timer, then the HW object.
    360        TIMER* pMPUTimer =
    361            // vladest      new TIMER(NULL, MIDI_TimerInterval, STREAM_MPU401_PLAY );
    362            new TIMER(NULL, MIDI_TimerInterval, STREAM_MPU401_CAPTURE );
    363 
    364        if (pMPUTimer->eState() != TIMER_Disabled)
    365            new MPU_401(pMPUTimer);
    366 
    367 //      SetHardwareType(AUDIOHW_MPU401_PLAY, MIDI, OPERATION_PLAY, 0);
    368 //      SetHardwareType(AUDIOHW_MPU401_PLAY, DATATYPE_MIDI, OPERATION_PLAY, 0);
    369 
    370        SetHardwareType(AUDIOHW_MPU401_CAPTURE, MIDI, OPERATION_RECORD, 0);
    371        SetHardwareType(AUDIOHW_MPU401_CAPTURE, DATATYPE_MIDI, OPERATION_RECORD, 0);
    372 
    373        RTMIDI::vConnect();
     354          (devCaps[0].ulCaps & OSS32_CAPS_MPU401_CAPTURE))
     355   {
     356           dprintf(("Creating MPU401 device"));
     357
     358           // Build the MPU401 object. First create a timer, then the HW object.
     359           TIMER* pMPUTimer =
     360                   // vladest      new TIMER(NULL, MIDI_TimerInterval, STREAM_MPU401_PLAY );
     361                   new TIMER(NULL, MIDI_TimerInterval, STREAM_MPU401_CAPTURE );
     362
     363           if (pMPUTimer->eState() != TIMER_Disabled)
     364                   new MPU_401(pMPUTimer);
     365
     366//              SetHardwareType(AUDIOHW_MPU401_PLAY, MIDI, OPERATION_PLAY, 0);
     367//              SetHardwareType(AUDIOHW_MPU401_PLAY, DATATYPE_MIDI, OPERATION_PLAY, 0);
     368
     369           SetHardwareType(AUDIOHW_MPU401_CAPTURE, MIDI, OPERATION_RECORD, 0);
     370           SetHardwareType(AUDIOHW_MPU401_CAPTURE, DATATYPE_MIDI, OPERATION_RECORD, 0);
     371
     372           RTMIDI::vConnect();
    374373   }
    375374   APM_Init();
     
    380379 * Purpose:  Worker rountine for the Strategy Open function.
    381380 *
    382  * Notes:    The Strategy Open doesn't require allocation of any resources,
    383  *           and the function is treated as a NOP.  The first allocation of
    384  *          resources happens at Strategy IOCtl time, in the handler for
    385  *          the AudioInit IOCtl.
    386  *          Check to see if the VDD has claimed the hardware and return with
    387  *          the busy bit on the the request packet.
    388  *          Increment the InUseCount so we know that an OS/2 app has an
    389  *          instance open and we don't let the VDD take the hardware..
     381 * Notes:        The Strategy Open doesn't require allocation of any resources,
     382 *                       and the function is treated as a NOP.  The first allocation of
     383 *                      resources happens at Strategy IOCtl time, in the handler for
     384 *                      the AudioInit IOCtl.
     385 *                      Check to see if the VDD has claimed the hardware and return with
     386 *                      the busy bit on the the request packet.
     387 *                      Increment the InUseCount so we know that an OS/2 app has an
     388 *                      instance open and we don't let the VDD take the hardware..
    390389 *
    391390 *
     
    395394{
    396395   if (usVDDHasHardware) {
    397       prp->usStatus = RPDONE | RPERR | RPBUSY;
     396          prp->usStatus = RPDONE | RPERR | RPBUSY;
    398397   }
    399398   else {
    400       ++usInUseCount;
     399          ++usInUseCount;
    401400   }
    402401}
     
    405404void StrategyClose(PREQPACKET prp)
    406405{
    407     --usInUseCount;
    408     PSTREAM pstream = FindStream_fromFile( prp->s.open_close.usSysFileNum );
    409     if (pstream)
    410         delete pstream;
    411     else
    412         dprintf(("Close NULL stream"));;        //### Log unexpected condition.
     406        --usInUseCount;
     407        PSTREAM pstream = FindStream_fromFile( prp->s.open_close.usSysFileNum );
     408        if (pstream)
     409                delete pstream;
     410        else
     411                dprintf(("Close NULL stream"));;                //### Log unexpected condition.
    413412}
    414413//******************************************************************************
     
    416415void StrategyDeinstall(PREQPACKET prp)
    417416{
    418     while (pAudioHWList->IsElements())
    419         pAudioHWList->DestroyElement(pAudioHWList->PopHead());
     417        while (pAudioHWList->IsElements())
     418                pAudioHWList->DestroyElement(pAudioHWList->PopHead());
    420419}
    421420//******************************************************************************
     
    423422void StrategyShutdown(PREQPACKET prp)
    424423{
    425     dprintf(("StrategyShutdown %d", prp->s.shutdown.Function));
     424        dprintf(("StrategyShutdown %d", prp->s.shutdown.Function));
    426425}
    427426//******************************************************************************
     
    446445
    447446   if(fNoHardware) {
    448        prp->usStatus = RPDONE | RPERR | RPGENFAIL;
    449        return;
     447           prp->usStatus = RPDONE | RPERR | RPGENFAIL;
     448           return;
    450449   }
    451450
     
    455454
    456455   switch (prp->bCommand) {
    457       case STRATEGY_INIT:
    458         StrategyInit(prp);
    459         break;
    460       case STRATEGY_OPEN:
    461         StrategyOpen(prp);
    462         break;
    463       case STRATEGY_CLOSE:
    464         StrategyClose(prp);
    465         break;
    466       case STRATEGY_GENIOCTL:
    467         StrategyIoctl(prp, 0);
    468         break;
    469       case STRATEGY_DEINSTALL:
    470         StrategyDeinstall(prp);
    471         break;
    472       case STRATEGY_INITCOMPLETE:
    473         StrategyInitComplete(prp);
    474         break;
    475       case STRATEGY_SHUTDOWN:
    476         StrategyShutdown(prp);
    477         break;
    478       default:
    479          dprintf(("Strategy Unk:0x%x", prp->bCommand));
    480         prp->usStatus = RPDONE | RPERR | RPGENFAIL;
     456          case STRATEGY_INIT:
     457                StrategyInit(prp);
     458                break;
     459          case STRATEGY_OPEN:
     460                StrategyOpen(prp);
     461                break;
     462          case STRATEGY_CLOSE:
     463                StrategyClose(prp);
     464                break;
     465          case STRATEGY_GENIOCTL:
     466                StrategyIoctl(prp, 0);
     467                break;
     468          case STRATEGY_DEINSTALL:
     469                StrategyDeinstall(prp);
     470                break;
     471          case STRATEGY_INITCOMPLETE:
     472                StrategyInitComplete(prp);
     473                break;
     474          case STRATEGY_SHUTDOWN:
     475                StrategyShutdown(prp);
     476                break;
     477          default:
     478                 rprintf(("Strategy Unk:0x%x", prp->bCommand));
     479                prp->usStatus = RPDONE | RPERR | RPGENFAIL;
    481480   }
    482481#ifdef DEBUG
     
    493492
    494493   if(fNoHardware) {
    495        prp->usStatus = RPDONE | RPERR | RPGENFAIL;
    496        if(prp->bCommand == STRATEGY_INIT) {
    497            prp->s.init_out.usCodeEnd = 0;
    498            prp->s.init_out.usDataEnd = 0;
    499        }
    500        return;
     494           prp->usStatus = RPDONE | RPERR | RPGENFAIL;
     495           if(prp->bCommand == STRATEGY_INIT) {
     496                   prp->s.init_out.usCodeEnd = 0;
     497                   prp->s.init_out.usDataEnd = 0;
     498           }
     499           return;
    501500   }
    502501
     
    506505
    507506   switch (prp->bCommand) {
    508       case STRATEGY_INIT:
    509         prp->usStatus = RPDONE;
    510         prp->s.init_out.usCodeEnd = (USHORT) &end_of_text;
    511         prp->s.init_out.usDataEnd = (USHORT) &end_of_heap;
    512         break;
    513       case STRATEGY_OPEN:
    514         StrategyOpen(prp);
    515         break;
    516       case STRATEGY_CLOSE:
    517         StrategyClose(prp);
    518         break;
    519       case STRATEGY_GENIOCTL:
    520         StrategyIoctl(prp, 1);
    521         break;
    522       case STRATEGY_DEINSTALL:
    523         StrategyDeinstall(prp);
    524         break;
    525       case STRATEGY_INITCOMPLETE:
    526         prp->usStatus = RPDONE;
    527         break;
    528       default:
    529         prp->usStatus = RPDONE | RPERR | RPGENFAIL;
     507          case STRATEGY_INIT:
     508                prp->usStatus = RPDONE;
     509                prp->s.init_out.usCodeEnd = (USHORT) &end_of_text;
     510                prp->s.init_out.usDataEnd = (USHORT) &end_of_heap;
     511                break;
     512          case STRATEGY_OPEN:
     513                StrategyOpen(prp);
     514                break;
     515          case STRATEGY_CLOSE:
     516                StrategyClose(prp);
     517                break;
     518          case STRATEGY_GENIOCTL:
     519                StrategyIoctl(prp, 1);
     520                break;
     521          case STRATEGY_DEINSTALL:
     522                StrategyDeinstall(prp);
     523                break;
     524          case STRATEGY_INITCOMPLETE:
     525                prp->usStatus = RPDONE;
     526                break;
     527          default:
     528                prp->usStatus = RPDONE | RPERR | RPGENFAIL;
    530529   }
    531530#ifdef DEBUG
Note: See TracChangeset for help on using the changeset viewer.