Changeset 479 for GPL/trunk/lib32


Ignore:
Timestamp:
May 1, 2010, 9:49:10 PM (16 years ago)
Author:
David Azarewicz
Message:

Cleanup compiler warnings

Location:
GPL/trunk/lib32
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/lib32/debug.c

    r421 r479  
    3434#define SIGNIFICANT_FIELD       0x0007
    3535
     36//#define COMM_DEBUG
     37
    3638BOOL  fLineTerminate=TRUE;
    3739int   DebugLevel = 1;
     
    123125
    124126      if (Power==0xF0000000)                  // 1 billion
    125          Power=0xF000000;     
     127         Power=0xF000000;
    126128      else if (Power==0xF000000)
    127129         Power=0xF00000;
     
    144146}
    145147
    146 #define DEBUG1
    147 
    148 #ifdef  DEBUG1
    149 char BuildString[1024];
    150 #endif          // DEBUG
    151 
    152 //------------------------- PrintfOut -
    153 void _cdecl DPD(int level, char *DbgStr, ...)
    154 {
    155 #ifdef DEBUG1
    156    char *BuildPtr=BuildString;
    157    char *pStr=(char *) DbgStr;
    158    char *SubStr;
    159    union {
    160          void   *VoidPtr;
    161          USHORT *WordPtr;
    162          ULONG  *LongPtr;
    163          ULONG  *StringPtr;
    164          } Parm;
    165    USHORT wBuildOption;
    166 
    167    Parm.VoidPtr=(void *) &DbgStr;
    168    Parm.StringPtr++;                            // skip size of string pointer
    169 
    170    while (*pStr)
    171       {
    172       // don't overflow target
    173       if (BuildPtr >= (char *) &BuildString[1024-2])
    174          break;
    175 
    176       switch (*pStr)
    177          {
    178          case '%':
    179             wBuildOption=0;
    180             pStr++;
    181             if (*pStr=='0')
    182                {
    183                wBuildOption|=LEADING_ZEROES;
    184                pStr++;
    185                }
    186             if (*pStr=='u')                                                         // always unsigned
    187                pStr++;
    188             if (*pStr=='#')
    189                pStr++;
    190 
    191             switch(*pStr)
    192                {
    193                case 'x':
    194                case 'X':
    195                case 'p':
    196                case 'P':
    197                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    198                   pStr++;
    199                   continue;
    200 
    201                case 'd':
    202                   BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    203                   pStr++;
    204                   continue;
    205 
    206                case 's':
    207                   SubStr=(char *)*Parm.StringPtr;
    208                   while (*BuildPtr++ = *SubStr++);
    209                   Parm.StringPtr++;
    210                   BuildPtr--;                      // remove the \0
    211                   pStr++;
    212                   continue;
    213 
    214                case 'l':
    215                   pStr++;
    216                   switch (*pStr)
    217                   {
    218                   case 'x':
    219                   case 'X':
    220                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    221                   pStr++;
    222                   continue;
    223 
    224                   case 'd':
    225                      BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    226                      pStr++;
    227                      continue;
    228                   } // end switch
    229                   continue;                        // dunno what he wants
    230 
    231                case 0:
    232                   continue;
    233                } // end switch
    234             break;
    235 
    236       case '\\':
    237          pStr++;
    238          switch (*pStr)
    239             {
    240             case 'n':
    241             *BuildPtr++=LF;
    242             pStr++;
    243             continue;
    244 
    245             case 'r':
    246             *BuildPtr++=CR;
    247             pStr++;
    248             continue;
    249 
    250             case 0:
    251             continue;
    252             break;
    253             } // end switch
    254 
    255          break;
    256          } // end switch
    257 
    258       *BuildPtr++=*pStr++;
    259       } // end while
    260 
    261    *BuildPtr=0;                                 // cauterize the string
    262    StringOut((char *) BuildString);         // print to comm port
    263 #endif                            //DEBUG
    264 }
    265 
    266 
    267 void _cdecl DPE(char *DbgStr, ...)
    268 {
    269 #ifdef DEBUG1
    270    char *BuildPtr=BuildString;
    271    char *pStr = (char *) DbgStr;
    272    char *SubStr;
    273    union {
    274          void   *VoidPtr;
    275          USHORT *WordPtr;
    276          ULONG  *LongPtr;
    277          ULONG  *StringPtr;
    278          } Parm;
    279    USHORT wBuildOption;
    280 
    281    Parm.VoidPtr=(void *) &DbgStr;
    282    Parm.StringPtr++;                            // skip size of string pointer
    283 
    284    while (*pStr)
    285       {
    286       // don't overflow target
    287       if (BuildPtr >= (char *) &BuildString[1024-2])
    288          break;
    289 
    290       switch (*pStr)
    291          {
    292          case '%':
    293             wBuildOption=0;
    294             pStr++;
    295             if (*pStr=='0')
    296                {
    297                wBuildOption|=LEADING_ZEROES;
    298                pStr++;
    299                }
    300 //            if (*pStr=='u')                                                         // always unsigned
    301 //               pStr++;
    302 
    303             switch(*pStr)
    304                {
    305                case 'x':
    306                case 'X':
    307                case 'p':
    308                case 'P':
    309                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    310                   pStr++;
    311                   continue;
    312 
    313                case 'd':
    314                case 'u':
    315                   BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    316                   pStr++;
    317                   continue;
    318 
    319                case 's':
    320                   SubStr=(char *)*Parm.StringPtr;
    321                   while (*BuildPtr++ = *SubStr++);
    322                   Parm.StringPtr++;
    323                   BuildPtr--;                      // remove the \0
    324                   pStr++;
    325                   continue;
    326 
    327                case 'c':
    328                   *BuildPtr++ = (char)*Parm.LongPtr;
    329                   Parm.LongPtr++;
    330                   pStr++;
    331                   continue;
    332 
    333                case 'l':
    334                   pStr++;
    335                   switch (*pStr)
    336                   {
    337                   case 'x':
    338                   case 'X':
    339                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    340                   pStr++;
    341                   continue;
    342 
    343                   case 'd':
    344                      BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    345                      pStr++;
    346                      continue;
    347                   } // end switch
    348                   continue;                        // dunno what he wants
    349 
    350                case 0:
    351                   continue;
    352                } // end switch
    353             break;
    354 
    355       case '\\':
    356          pStr++;
    357          switch (*pStr)
    358             {
    359             case 'n':
    360             *BuildPtr++=LF;
    361             pStr++;
    362             continue;
    363 
    364             case 'r':
    365             *BuildPtr++=CR;
    366             pStr++;
    367             continue;
    368 
    369             case 0:
    370             continue;
    371             break;
    372             } // end switch
    373 
    374          break;
    375          } // end switch
    376 
    377       *BuildPtr++=*pStr++;
    378       } // end while
    379 
    380    *BuildPtr=0;                                 // cauterize the string
    381    StringOut((char *) BuildString);         // print to comm port
    382 #endif                            //DEBUG
    383 }
    384 
    385 struct snd_info_buffer {
    386         char *buffer;           /* pointer to begin of buffer */
    387         char *curr;             /* current position in buffer */
    388         unsigned long size;     /* current size */
    389         unsigned long len;      /* total length of buffer */
    390         int stop;               /* stop flag */
    391         int error;              /* error code */
    392 };
    393 
    394 typedef struct snd_info_buffer snd_info_buffer_t;
    395 
    396 int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...)
    397 {
    398    char *BuildPtr=buffer->curr;
    399    char *pStr=(char *) fmt;
    400    char *SubStr;
    401    int   res;
    402    union {
    403          void   *VoidPtr;
    404          USHORT *WordPtr;
    405          ULONG  *LongPtr;
    406          ULONG  *StringPtr;
    407          } Parm;
    408    USHORT wBuildOption;
    409 
    410    Parm.VoidPtr=(void *) &fmt;
    411    Parm.StringPtr++;                            // skip size of string pointer
    412 
    413    if (buffer->stop || buffer->error)
    414        return 0;
    415 
    416    while (*pStr)
    417       {
    418       // don't overflow target
    419       if (BuildPtr >= (char *) &buffer->curr[buffer->len - 4])
    420          break;
    421 
    422       switch (*pStr)
    423          {
    424          case '%':
    425             wBuildOption=0;
    426             pStr++;
    427             if (*pStr=='0')
    428                {
    429                wBuildOption|=LEADING_ZEROES;
    430                pStr++;
    431                }
    432 //            if (*pStr=='u')                                                         // always unsigned
    433 //               pStr++;
    434             if (*pStr=='#')
    435                pStr++;
    436 
    437             switch(*pStr)
    438                {
    439                case 'x':
    440                case 'X':
    441                case 'p':
    442                case 'P':
    443                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    444                   pStr++;
    445                   continue;
    446 
    447                case 'd':
    448                case 'u':
    449                   BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    450                   pStr++;
    451                   continue;
    452 
    453                case 's':
    454                   SubStr=(char *)*Parm.StringPtr;
    455                   while (*BuildPtr++ = *SubStr++);
    456                   Parm.StringPtr++;
    457                   BuildPtr--;                      // remove the \0
    458                   pStr++;
    459                   continue;
    460 
    461                case 'c':
    462                   *BuildPtr++ = (char)*Parm.LongPtr;
    463                   Parm.LongPtr++;
    464                   pStr++;
    465                   continue;
    466 
    467                case 'l':
    468                   pStr++;
    469                   switch (*pStr)
    470                   {
    471                   case 'x':
    472                   case 'X':
    473                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    474                   pStr++;
    475                   continue;
    476 
    477                   case 'd':
    478                      BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    479                      pStr++;
    480                      continue;
    481                   } // end switch
    482                   continue;                        // dunno what he wants
    483 
    484                case 0:
    485                   continue;
    486                } // end switch
    487             break;
    488 
    489       case '\\':
    490          pStr++;
    491          switch (*pStr)
    492             {
    493             case 'n':
    494             *BuildPtr++=LF;
    495             pStr++;
    496             continue;
    497 
    498             case 'r':
    499             *BuildPtr++=CR;
    500             pStr++;
    501             continue;
    502 
    503             case 0:
    504             continue;
    505             break;
    506             } // end switch
    507 
    508          break;
    509          } // end switch
    510 
    511       *BuildPtr++=*pStr++;
    512       } // end while
    513 
    514    *BuildPtr=0;                                 // cauterize the string
    515 
    516    res = strlen(buffer->curr);
    517    if (buffer->size + res >= buffer->len) {
    518        buffer->stop = 1;
    519        return 0;
    520    }
    521    buffer->curr += res;
    522    buffer->size += res;
    523    return res;
    524 }
    525 
    526 #ifdef DEBUG1
     148#ifdef DEBUG
    527149//------------------------- StringOut --------------------------//
    528150
     
    546168    return psz - pszC;
    547169}
    548 //PS+++ Changes for right debug output
    549 #ifdef DEBUG
    550 short int MAGIC_COMM_PORT =  0;           // pulled from word ptr 40:0
     170
     171#ifdef COMM_DEBUG
     172short int MAGIC_COMM_PORT =  0; // pulled from word ptr 40:0
    551173
    552174
     
    562184
    563185#define DELAY   nop
    564 #else
    565 short int MAGIC_COMM_PORT =  0x0;           // pulled from word ptr 40:0
     186
     187void CharOut(char c)
     188{
     189    if( MAGIC_COMM_PORT )
     190    {
     191
     192        _asm    {
     193
     194        mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
     195        add     dx, UART_LINE_STAT
     196
     197ReadyCheck:
     198        in      al, dx                                                          // wait for comm port ready signal
     199
     200        DELAY
     201        DELAY
     202        DELAY
     203
     204        test    al, 020h
     205        jz      ReadyCheck
     206
     207        // Send the character
     208
     209        add     dx, UART_DATA - UART_LINE_STAT
     210        mov     al,c
     211        out     dx, al
     212
     213        DELAY
     214        DELAY
     215        DELAY
     216        }
     217    }
     218}
    566219#endif
    567220
     
    569222{
    570223   int len;
    571 #ifdef DEBUG
     224#ifdef COMM_DEBUG
    572225   int i;
    573226#endif /* DEBUG */
    574    
     227
    575228   len= _strnlen( DbgStr, 1024 );
    576 /*   
     229/*
    577230   while (*DbgStr)
    578231      CharOut(*DbgStr++);
    579232      */
    580 #ifdef DEBUG
     233#ifdef COMM_DEBUG
    581234   if (MAGIC_COMM_PORT)   //PS+++ If have comport - out to it
    582235   {
     
    631284#endif
    632285
    633 
    634 #ifdef DEBUG                            //--------------------------- CharOut -
    635 void CharOut(char c)
    636 {
    637     if( MAGIC_COMM_PORT )
    638     {
    639 
    640         _asm    {
    641 
    642         mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
    643         add     dx, UART_LINE_STAT
    644 
    645 ReadyCheck:
    646         in      al, dx                                                          // wait for comm port ready signal
    647 
    648         DELAY
    649         DELAY
    650         DELAY
    651 
    652         test    al, 020h
    653         jz      ReadyCheck
    654 
    655         // Send the character
    656 
    657         add     dx, UART_DATA - UART_LINE_STAT
    658         mov     al,c
    659         out     dx, al
    660 
    661         DELAY
    662         DELAY
    663         DELAY
    664         }
    665     }
    666 }
    667 #endif
     286#ifdef  DEBUG
     287char BuildString[1024];
     288#endif          // DEBUG
     289
     290//------------------------- PrintfOut -
     291void _cdecl DPD(int level, char *DbgStr, ...)
     292{
     293#ifdef DEBUG
     294   char *BuildPtr=BuildString;
     295   char *pStr=(char *) DbgStr;
     296   char *SubStr;
     297   union {
     298         void   *VoidPtr;
     299         USHORT *WordPtr;
     300         ULONG  *LongPtr;
     301         ULONG  *StringPtr;
     302         } Parm;
     303   USHORT wBuildOption;
     304
     305   Parm.VoidPtr=(void *) &DbgStr;
     306   Parm.StringPtr++;                            // skip size of string pointer
     307
     308   while (*pStr)
     309      {
     310      // don't overflow target
     311      if (BuildPtr >= (char *) &BuildString[1024-2])
     312         break;
     313
     314      switch (*pStr)
     315         {
     316         case '%':
     317            wBuildOption=0;
     318            pStr++;
     319            if (*pStr=='0')
     320               {
     321               wBuildOption|=LEADING_ZEROES;
     322               pStr++;
     323               }
     324            if (*pStr=='u')                                                         // always unsigned
     325               pStr++;
     326            if (*pStr=='#')
     327               pStr++;
     328
     329            switch(*pStr)
     330               {
     331               case 'x':
     332               case 'X':
     333               case 'p':
     334               case 'P':
     335                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     336                  pStr++;
     337                  continue;
     338
     339               case 'd':
     340                  BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     341                  pStr++;
     342                  continue;
     343
     344               case 's':
     345                  SubStr=(char *)*Parm.StringPtr;
     346                  while (*BuildPtr++ = *SubStr++);
     347                  Parm.StringPtr++;
     348                  BuildPtr--;                      // remove the \0
     349                  pStr++;
     350                  continue;
     351
     352               case 'l':
     353                  pStr++;
     354                  switch (*pStr)
     355                  {
     356                  case 'x':
     357                  case 'X':
     358                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     359                  pStr++;
     360                  continue;
     361
     362                  case 'd':
     363                     BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     364                     pStr++;
     365                     continue;
     366                  } // end switch
     367                  continue;                        // dunno what he wants
     368
     369               case 0:
     370                  continue;
     371               } // end switch
     372            break;
     373
     374      case '\\':
     375         pStr++;
     376         switch (*pStr)
     377            {
     378            case 'n':
     379            *BuildPtr++=LF;
     380            pStr++;
     381            continue;
     382
     383            case 'r':
     384            *BuildPtr++=CR;
     385            pStr++;
     386            continue;
     387
     388            case 0:
     389            continue;
     390            break;
     391            } // end switch
     392
     393         break;
     394         } // end switch
     395
     396      *BuildPtr++=*pStr++;
     397      } // end while
     398
     399   *BuildPtr=0;                                 // cauterize the string
     400   StringOut((char *) BuildString);
     401#endif                            //DEBUG
     402}
     403
     404
     405void _cdecl DPE(char *DbgStr, ...)
     406{
     407#ifdef DEBUG
     408   char *BuildPtr=BuildString;
     409   char *pStr = (char *) DbgStr;
     410   char *SubStr;
     411   union {
     412         void   *VoidPtr;
     413         USHORT *WordPtr;
     414         ULONG  *LongPtr;
     415         ULONG  *StringPtr;
     416         } Parm;
     417   USHORT wBuildOption;
     418
     419   Parm.VoidPtr=(void *) &DbgStr;
     420   Parm.StringPtr++;                            // skip size of string pointer
     421
     422   while (*pStr)
     423      {
     424      // don't overflow target
     425      if (BuildPtr >= (char *) &BuildString[1024-2])
     426         break;
     427
     428      switch (*pStr)
     429         {
     430         case '%':
     431            wBuildOption=0;
     432            pStr++;
     433            if (*pStr=='0')
     434               {
     435               wBuildOption|=LEADING_ZEROES;
     436               pStr++;
     437               }
     438//            if (*pStr=='u')                                                         // always unsigned
     439//               pStr++;
     440
     441            switch(*pStr)
     442               {
     443               case 'x':
     444               case 'X':
     445               case 'p':
     446               case 'P':
     447                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     448                  pStr++;
     449                  continue;
     450
     451               case 'd':
     452               case 'u':
     453                  BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     454                  pStr++;
     455                  continue;
     456
     457               case 's':
     458                  SubStr=(char *)*Parm.StringPtr;
     459                  while (*BuildPtr++ = *SubStr++);
     460                  Parm.StringPtr++;
     461                  BuildPtr--;                      // remove the \0
     462                  pStr++;
     463                  continue;
     464
     465               case 'c':
     466                  *BuildPtr++ = (char)*Parm.LongPtr;
     467                  Parm.LongPtr++;
     468                  pStr++;
     469                  continue;
     470
     471               case 'l':
     472                  pStr++;
     473                  switch (*pStr)
     474                  {
     475                  case 'x':
     476                  case 'X':
     477                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     478                  pStr++;
     479                  continue;
     480
     481                  case 'd':
     482                     BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     483                     pStr++;
     484                     continue;
     485                  } // end switch
     486                  continue;                        // dunno what he wants
     487
     488               case 0:
     489                  continue;
     490               } // end switch
     491            break;
     492
     493      case '\\':
     494         pStr++;
     495         switch (*pStr)
     496            {
     497            case 'n':
     498            *BuildPtr++=LF;
     499            pStr++;
     500            continue;
     501
     502            case 'r':
     503            *BuildPtr++=CR;
     504            pStr++;
     505            continue;
     506
     507            case 0:
     508            continue;
     509            break;
     510            } // end switch
     511
     512         break;
     513         } // end switch
     514
     515      *BuildPtr++=*pStr++;
     516      } // end while
     517
     518   *BuildPtr=0;                                 // cauterize the string
     519   StringOut((char *) BuildString);
     520#endif                            //DEBUG
     521}
     522
     523struct snd_info_buffer {
     524        char *buffer;           /* pointer to begin of buffer */
     525        char *curr;             /* current position in buffer */
     526        unsigned long size;     /* current size */
     527        unsigned long len;      /* total length of buffer */
     528        int stop;               /* stop flag */
     529        int error;              /* error code */
     530};
     531
     532typedef struct snd_info_buffer snd_info_buffer_t;
     533
     534int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...)
     535{
     536   char *BuildPtr=buffer->curr;
     537   char *pStr=(char *) fmt;
     538   char *SubStr;
     539   int   res;
     540   union {
     541         void   *VoidPtr;
     542         USHORT *WordPtr;
     543         ULONG  *LongPtr;
     544         ULONG  *StringPtr;
     545         } Parm;
     546   USHORT wBuildOption;
     547
     548   Parm.VoidPtr=(void *) &fmt;
     549   Parm.StringPtr++;                            // skip size of string pointer
     550
     551   if (buffer->stop || buffer->error)
     552       return 0;
     553
     554   while (*pStr)
     555      {
     556      // don't overflow target
     557      if (BuildPtr >= (char *) &buffer->curr[buffer->len - 4])
     558         break;
     559
     560      switch (*pStr)
     561         {
     562         case '%':
     563            wBuildOption=0;
     564            pStr++;
     565            if (*pStr=='0')
     566               {
     567               wBuildOption|=LEADING_ZEROES;
     568               pStr++;
     569               }
     570//            if (*pStr=='u')                                                         // always unsigned
     571//               pStr++;
     572            if (*pStr=='#')
     573               pStr++;
     574
     575            switch(*pStr)
     576               {
     577               case 'x':
     578               case 'X':
     579               case 'p':
     580               case 'P':
     581                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     582                  pStr++;
     583                  continue;
     584
     585               case 'd':
     586               case 'u':
     587                  BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     588                  pStr++;
     589                  continue;
     590
     591               case 's':
     592                  SubStr=(char *)*Parm.StringPtr;
     593                  while (*BuildPtr++ = *SubStr++);
     594                  Parm.StringPtr++;
     595                  BuildPtr--;                      // remove the \0
     596                  pStr++;
     597                  continue;
     598
     599               case 'c':
     600                  *BuildPtr++ = (char)*Parm.LongPtr;
     601                  Parm.LongPtr++;
     602                  pStr++;
     603                  continue;
     604
     605               case 'l':
     606                  pStr++;
     607                  switch (*pStr)
     608                  {
     609                  case 'x':
     610                  case 'X':
     611                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     612                  pStr++;
     613                  continue;
     614
     615                  case 'd':
     616                     BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     617                     pStr++;
     618                     continue;
     619                  } // end switch
     620                  continue;                        // dunno what he wants
     621
     622               case 0:
     623                  continue;
     624               } // end switch
     625            break;
     626
     627      case '\\':
     628         pStr++;
     629         switch (*pStr)
     630            {
     631            case 'n':
     632            *BuildPtr++=LF;
     633            pStr++;
     634            continue;
     635
     636            case 'r':
     637            *BuildPtr++=CR;
     638            pStr++;
     639            continue;
     640
     641            case 0:
     642            continue;
     643            break;
     644            } // end switch
     645
     646         break;
     647         } // end switch
     648
     649      *BuildPtr++=*pStr++;
     650      } // end while
     651
     652   *BuildPtr=0;                                 // cauterize the string
     653
     654   res = strlen(buffer->curr);
     655   if (buffer->size + res >= buffer->len) {
     656       buffer->stop = 1;
     657       return 0;
     658   }
     659   buffer->curr += res;
     660   buffer->size += res;
     661   return res;
     662}
     663
  • GPL/trunk/lib32/ioctl.c

    r470 r479  
    3838int pcm_instances(int card_id);
    3939
    40 int uniaud_set_interrupted_substream(struct snd_pcm_substream *substream)
     40void uniaud_set_interrupted_substream(struct snd_pcm_substream *substream)
    4141{
    4242    int i;
     
    257257    }
    258258    return max_ch;
    259 }
    260 
    261 void FillCaps(ULONG deviceid)
    262 {
    263     int pcms = 0;
    264 
    265     pcms = pcm_instances(deviceid);
    266 
    267     printk("pcms = %i\n", pcms); //uncommented
    268     if (!pcmcaps[deviceid])
    269     {
    270         pcmcaps[deviceid] = (POSS32_DEVCAPS)kmalloc(sizeof(OSS32_DEVCAPS)*pcms, GFP_KERNEL);
    271         if (pcmcaps[deviceid])
    272         {
    273             memset(pcmcaps[deviceid], 0, sizeof(OSS32_DEVCAPS)*pcms);
    274             GetUniaudPcmCaps1(deviceid, (void *)pcmcaps[deviceid]);
    275         }
    276     }
    277     return;
    278 }
    279 
    280 int GetUniaudPcmCaps(ULONG deviceid, void *caps)
    281 {
    282     int pcms = 0;
    283 
    284     pcms = pcm_instances(deviceid);
    285 
    286 //    printk("pcms = %i\n", pcms);
    287     if (pcmcaps[deviceid])
    288     {
    289         memcpy((unsigned char*)caps,(unsigned char*)pcmcaps[deviceid],sizeof(OSS32_DEVCAPS)*pcms);
    290         return 0;
    291     }
    292     else
    293     {
    294         return -1;
    295     }
    296259}
    297260
     
    316279    if (!pcaps || !pcms) return -1;
    317280
    318    
     281
    319282    //these structures are too big to put on the stack
    320283    pcminfo = (struct snd_pcm_info *)kmalloc(sizeof(struct snd_pcm_info)+sizeof(struct snd_pcm_hw_params), GFP_KERNEL);
     
    434397}
    435398
     399void FillCaps(ULONG deviceid)
     400{
     401    int pcms = 0;
     402
     403    pcms = pcm_instances(deviceid);
     404
     405    printk("pcms = %i\n", pcms); //uncommented
     406    if (!pcmcaps[deviceid])
     407    {
     408        pcmcaps[deviceid] = (POSS32_DEVCAPS)kmalloc(sizeof(OSS32_DEVCAPS)*pcms, GFP_KERNEL);
     409        if (pcmcaps[deviceid])
     410        {
     411            memset(pcmcaps[deviceid], 0, sizeof(OSS32_DEVCAPS)*pcms);
     412            GetUniaudPcmCaps1(deviceid, (void *)pcmcaps[deviceid]);
     413        }
     414    }
     415    return;
     416}
     417
     418int GetUniaudPcmCaps(ULONG deviceid, void *caps)
     419{
     420    int pcms = 0;
     421
     422    pcms = pcm_instances(deviceid);
     423
     424//    printk("pcms = %i\n", pcms);
     425    if (pcmcaps[deviceid])
     426    {
     427        memcpy((unsigned char*)caps,(unsigned char*)pcmcaps[deviceid],sizeof(OSS32_DEVCAPS)*pcms);
     428        return 0;
     429    }
     430    else
     431    {
     432        return -1;
     433    }
     434}
     435
    436436/*
    437437 returns power state of given card
     
    469469    }
    470470    //retrieve mixer information
    471     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    472                                     SNDRV_CTL_IOCTL_POWER_STATE, 
     471    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     472                                    SNDRV_CTL_IOCTL_POWER_STATE,
    473473                                    (ULONG)state);
    474474
     
    522522    }
    523523    //retrieve mixer information
    524     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    525                                     SNDRV_CTL_IOCTL_POWER, 
     524    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     525                                    SNDRV_CTL_IOCTL_POWER,
    526526                                    (ULONG)state);
    527527
     
    576576    }
    577577    //retrieve mixer information
    578     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    579                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     578    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     579                                    SNDRV_CTL_IOCTL_CARD_INFO,
    580580                                    (ULONG)(struct snd_ctl_card_info *)info);
    581581    if(ret) {
     
    630630    }
    631631    //retrieve mixer information
    632     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    633                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     632    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     633                                    SNDRV_CTL_IOCTL_CARD_INFO,
    634634                                    (ULONG)&pHandle->info);
    635635    if(ret) {
     
    640640    pHandle->list.offset = 0;
    641641    pHandle->list.space  = 0;
    642     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    643                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     642    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     643                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    644644                                    (ULONG)&pHandle->list);
    645645    if(ret) {
     
    695695    }
    696696    //retrieve mixer information
    697     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    698                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     697    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     698                                    SNDRV_CTL_IOCTL_CARD_INFO,
    699699                                    (ULONG)&pHandle->info);
    700700    if(ret) {
     
    705705    pHandle->list.offset = 0;
    706706    pHandle->list.space  = 0;
    707     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    708                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     707    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     708                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    709709                                    (ULONG)&pHandle->list);
    710710    if(ret) {
     
    724724    pHandle->list.space  = pHandle->list.count;
    725725    pHandle->list.pids   = pHandle->pids;
    726     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    727                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     726    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     727                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    728728                                    (ULONG)&pHandle->list);
    729729    if(ret) {
  • GPL/trunk/lib32/irq.c

    r437 r479  
    206206#endif
    207207
    208                 // HDA Hardware generates controller interrupts and stream interrupts 
     208                // HDA Hardware generates controller interrupts and stream interrupts
    209209                // the uniaud16 driver only cares about stream interrupts.
    210                 // azx_interrupt in alsa-kernel/pci/hda/hda_intel.c will return rc 2 if 
    211                 // the interrupt is from the  controller. There is no need to call uniaud16 
    212                 // for these interrupts
    213                 if ( rc == 2 ) { 
     210                // azx_interrupt in alsa-kernel/pci/hda/hda_intel.c will return rc 2 if
     211                // the interrupt is from the  controller. There is no need to call uniaud16
     212                                // for these interrupts
     213                if ( rc == 2 ) {
    214214                    fInInterrupt = FALSE;
    215215                    *pulIrq = pSlot->irqNo;
  • GPL/trunk/lib32/misc.c

    r445 r479  
    4646mem_map_t *mem_map = 0;
    4747int this_module[64] = {0};
    48                
     48
    4949#include <stdarg.h>
    5050
     
    6464
    6565    char *pszLastALSAError;
    66    
     66
    6767    pszLastALSAError= iLastError ? szLastALSAError2 : szLastALSAError1;
    6868
     
    7575        DebugInt3();
    7676    }
    77    
     77
    7878    dprintf( (pszLastALSAError) );
    7979    if(++iLastError > 1) {
     
    240240        }
    241241        return 0;
     242}
     243//******************************************************************************
     244//******************************************************************************
     245static void run_workqueue(struct workqueue_struct *wq)
     246{
     247        unsigned long flags;
     248
     249        spin_lock_irqsave(&wq->lock, flags);
     250        while (!list_empty(&wq->worklist)) {
     251                struct work_struct *work = list_entry(wq->worklist.next,
     252                                                      struct work_struct, entry);
     253                void (*f) (void *) = work->func;
     254                void *data = work->data;
     255
     256                list_del_init(wq->worklist.next);
     257                spin_unlock_irqrestore(&wq->lock, flags);
     258                clear_bit(0, &work->pending);
     259                f(data);
     260                spin_lock_irqsave(&wq->lock, flags);
     261                wake_up(&wq->work_done);
     262        }
     263        spin_unlock_irqrestore(&wq->lock, flags);
    242264}
    243265//******************************************************************************
     
    263285                spin_unlock_irq(&wq->lock);
    264286        }
    265 }
    266 //******************************************************************************
    267 //******************************************************************************
    268 static void run_workqueue(struct workqueue_struct *wq)
    269 {
    270         unsigned long flags;
    271 
    272         spin_lock_irqsave(&wq->lock, flags);
    273         while (!list_empty(&wq->worklist)) {
    274                 struct work_struct *work = list_entry(wq->worklist.next,
    275                                                       struct work_struct, entry);
    276                 void (*f) (void *) = work->func;
    277                 void *data = work->data;
    278 
    279                 list_del_init(wq->worklist.next);
    280                 spin_unlock_irqrestore(&wq->lock, flags);
    281                 clear_bit(0, &work->pending);
    282                 f(data);
    283                 spin_lock_irqsave(&wq->lock, flags);
    284                 wake_up(&wq->work_done);
    285         }
    286         spin_unlock_irqrestore(&wq->lock, flags);
    287287}
    288288//******************************************************************************
  • GPL/trunk/lib32/ossidc.cpp

    r455 r479  
    270270    }
    271271    if((ForceCard == CARD_NONE || ForceCard == CARD_AZX) &&
    272        nrCardsDetected < (OSS32_MAX_AUDIOCARDS-1) && call_module_init(alsa_card_azx_init) == 0) 
     272       nrCardsDetected < (OSS32_MAX_AUDIOCARDS-1) && call_module_init(alsa_card_azx_init) == 0)
    273273    {
    274274        fnCardExitCall[nrCardsDetected] = name_module_exit(alsa_card_azx_exit);
  • GPL/trunk/lib32/sound.c

    r475 r479  
    3636#include <stacktoflat.h>
    3737#include <stdlib.h>
     38#include <proto.h>
    3839#include "soundoss.h"
    3940
     
    11121113
    11131114#ifdef DEBUG
    1114     printk("OSS32_WaveAddBuffer N:%d hw %d app %d avail %d, orig size: %d, size %d\n",CountWv, samples_to_bytes(status.hw_ptr), samples_to_bytes(status.appl_ptr), samples_to_bytes(status.avail), size1, size);
     1115    printk("OSS32_WaveAddBuffer N:%d hw %x app %x avail %x, orig size: %x, size %x\n",CountWv, samples_to_bytes(status.hw_ptr), samples_to_bytes(status.appl_ptr), samples_to_bytes(status.avail), size1, size);
    11151116#endif
    11161117
     
    13251326}
    13261327//******************************************************************************
    1327 //******************************************************************************
    1328 
     1328
  • GPL/trunk/lib32/soundmixer.c

    r457 r479  
    8080};
    8181
    82 static unsigned char LinToLog[OSS32_MAX_VOLUME+1] = { 
     82static unsigned char LinToLog[OSS32_MAX_VOLUME+1] = {
    8383  0,   0,   0,   0,   1,   2,   2,   5,   5,  10,
    84  10,  10,  16,  19,  20,  22,  24,  25,  27,  27, 
    85  28,  28,  29,  30,  30,  35,  35,  35,  39,  39, 
    86  43,  44,  45,  47,  48,  49,  50,  51,  52,  53, 
    87  55,  56,  57,  59,  60,  62,  63,  64,  65,  66, 
     84 10,  10,  16,  19,  20,  22,  24,  25,  27,  27,
     85 28,  28,  29,  30,  30,  35,  35,  35,  39,  39,
     86 43,  44,  45,  47,  48,  49,  50,  51,  52,  53,
     87 55,  56,  57,  59,  60,  62,  63,  64,  65,  66,
    8888 67,  68,  69,  70,  71,  72,  73,  74,  74,  75,
    89  76,  77,  78,  79,  79,  80,  81,  82,  83,  84, 
    90  85,  86,  87,  88,  89,  90,  91,  92,  92,  93, 
    91  93,  94,  94,  95,  95,  96,  96,  97,  97,  98, 
     89 76,  77,  78,  79,  79,  80,  81,  82,  83,  84,
     90 85,  86,  87,  88,  89,  90,  91,  92,  92,  93,
     91 93,  94,  94,  95,  95,  96,  96,  97,  97,  98,
    9292 98,  99,  99,  99,  99, 100, 100, 100, 100, 100,
    9393 100
     
    148148    }
    149149    //retrieve mixer information
    150     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    151                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     150    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     151                                    SNDRV_CTL_IOCTL_CARD_INFO,
    152152                                    (ULONG)&pHandle->info);
    153153    if(ret) {
     
    157157    pHandle->list.offset = 0;
    158158    pHandle->list.space  = 0;
    159     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    160                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     159    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     160                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    161161                                    (ULONG)&pHandle->list);
    162162    if(ret) {
     
    172172    pHandle->list.space  = pHandle->list.count;
    173173    pHandle->list.pids   = pHandle->pids;
    174     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    175                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     174    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     175                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    176176                                    (ULONG)&pHandle->list);
    177177    if(ret) {
     
    188188
    189189    //Extract standard mixer controls from array with control names
    190     for(j=0;j<OSS_MIXER_NRDEVICES;j++) 
     190    for(j=0;j<OSS_MIXER_NRDEVICES;j++)
    191191    {
    192192        int namelen = strlen(ossid[j].name);
     
    197197        pHandle->controls[j].idxCaptureSwitch = -1;
    198198
    199         for(i=0;i<pHandle->list.count;i++) 
     199        for(i=0;i<pHandle->list.count;i++)
    200200        {
    201201            if (pHandle->pids[i].index == ossid[j].index &&
     
    209209                    break;
    210210                }
    211                 else 
    212                 {//first part of the control name is correct; now find out what 
     211                else
     212                {//first part of the control name is correct; now find out what
    213213                 //is it exactly
    214214                    char *nextword = &pHandle->pids[i].name[namelen];
     
    216216
    217217                    if(strncmp(nextword, MIXER_PLAYBACKVOLUME, sizeof(MIXER_PLAYBACKVOLUME)-1) == 0 ||
    218                        strncmp(nextword, MIXER_VOLUME, sizeof(MIXER_VOLUME)-1) == 0) 
     218                       strncmp(nextword, MIXER_VOLUME, sizeof(MIXER_VOLUME)-1) == 0)
    219219                    {//volume control
    220220                        pHandle->controls[j].idxVolume = i;
     
    222222                    else
    223223                    if(strncmp(nextword, MIXER_PLAYBACKSWITCH, sizeof(MIXER_PLAYBACKSWITCH)-1) == 0 ||
    224                        strncmp(nextword, MIXER_SWITCH, sizeof(MIXER_SWITCH)-1) == 0) 
     224                       strncmp(nextword, MIXER_SWITCH, sizeof(MIXER_SWITCH)-1) == 0)
    225225                    {//mute control
    226226                        pHandle->controls[j].idxMute = i;
     
    229229                    }
    230230                    else
    231                     if(strncmp(nextword, MIXER_SOURCE, sizeof(MIXER_SOURCE)-1) == 0) 
     231                    if(strncmp(nextword, MIXER_SOURCE, sizeof(MIXER_SOURCE)-1) == 0)
    232232                    {//source control (e.g. recording source)
    233233                        pHandle->controls[j].idxCustom = i;
     
    235235                    else
    236236                    if(strncmp(nextword, MIXER_CAPTUREROUTE, sizeof(MIXER_CAPTUREROUTE)-1) == 0 ||
    237                        strncmp(nextword, MIXER_CAPTURESWITCH, sizeof(MIXER_CAPTURESWITCH)-1) == 0) 
     237                       strncmp(nextword, MIXER_CAPTURESWITCH, sizeof(MIXER_CAPTURESWITCH)-1) == 0)
    238238                    {//source control for recording (per input)
    239239                        pHandle->controls[j].idxCaptureSwitch = i;
     
    241241                    else
    242242                    if(i == OSS_MIXER_MIC) {
    243                         if(strncmp(nextword, MIXER_BOOST, sizeof(MIXER_BOOST)-1) == 0) 
     243                        if(strncmp(nextword, MIXER_BOOST, sizeof(MIXER_BOOST)-1) == 0)
    244244                        {//mic boost switch
    245245                            pHandle->controls[j].idxCustom = i;
     
    257257
    258258    //request information about available capture sources
    259     if(pHandle->controls[OSS_MIXER_IGAIN].idxCustom != -1) 
     259    if(pHandle->controls[OSS_MIXER_IGAIN].idxCustom != -1)
    260260    {
    261         struct snd_ctl_elem_info  *pElemInfo = NULL; 
     261        struct snd_ctl_elem_info  *pElemInfo = NULL;
    262262        int                   idx, j;
    263263
     
    266266        //set operation to non-blocking
    267267        pHandle->file.f_flags = O_NONBLOCK;
    268        
     268
    269269        pHandle->rectype = RECTYPE_SELECTOR;
    270270
     
    277277
    278278        pElemInfo->value.enumerated.items = 1;
    279         for(i=0;i<pElemInfo->value.enumerated.items;i++) 
     279        for(i=0;i<pElemInfo->value.enumerated.items;i++)
    280280        {
    281281            pElemInfo->value.enumerated.item = i;
     
    307307            pHandle->idxRecCaps[j] = -1;
    308308        }
    309         for(j=0;j<OSS_MIXER_NRDEVICES;j++) 
     309        for(j=0;j<OSS_MIXER_NRDEVICES;j++)
    310310        {
    311311            if(pHandle->controls[j].idxCaptureSwitch != -1) {
     
    364364    //set operation to non-blocking
    365365    pHandle->file.f_flags = O_NONBLOCK;
    366  
     366
    367367    return OSSERR_NOT_SUPPORTED;
    368368}
     
    373373    mixerhandle          *pHandle = (mixerhandle *)streamid;
    374374    struct snd_ctl_elem_value *pElem = NULL;
    375     struct snd_ctl_elem_info  *pElemInfo; 
     375    struct snd_ctl_elem_info  *pElemInfo;
    376376    int                   ret, idx, lVol, rVol = 0, idxMute, cnt;
    377377
     378    dprintf(("OSS32_MixSetVolume line=%d\n", line));
    378379    if(pHandle == NULL || pHandle->magic != MAGIC_MIXER_ALSA32) {
    379380        printk("Invalid handle in OSS32_MixSetVolume\n");
     
    450451        idxMute = pHandle->controls[OSS_MIXER_PHONEOUT].idxMute;
    451452        break;
    452     case OSS32_MIX_VOLUME_HEADPHONE: 
     453    case OSS32_MIX_VOLUME_HEADPHONE:
    453454        idx = pHandle->controls[OSS_MIXER_HEADPHONE].idxVolume;
    454455        idxMute = pHandle->controls[OSS_MIXER_HEADPHONE].idxMute;
     
    557558    mixerhandle          *pHandle = (mixerhandle *)streamid;
    558559    struct snd_ctl_elem_value *pElem = NULL;
    559     struct snd_ctl_elem_info  *pElemInfo; 
     560    struct snd_ctl_elem_info  *pElemInfo;
    560561    int                   ret, idx = -1, lVol, rVol = 0, j, i;
    561562
     
    566567    //set operation to non-blocking
    567568    pHandle->file.f_flags = O_NONBLOCK;
    568  
     569
    569570    //too big to put on the stack
    570571    pElem = (struct snd_ctl_elem_value *)kmalloc(sizeof(struct snd_ctl_elem_value) + sizeof(struct snd_ctl_elem_info), GFP_KERNEL);
     
    591592        else {//capture switch for each input source
    592593            //first turn off all capture switches...
    593             for(j=0;j<OSS32_MIX_RECSRC_MAX;j++) 
     594            for(j=0;j<OSS32_MIX_RECSRC_MAX;j++)
    594595            {
    595596                if(pHandle->idxRecCaps[j] != -1) {
     
    641642
    642643        break;
    643    
     644
    644645    case OSS32_MIX_SWITCH_MICBOOST:
    645646        idx = pHandle->controls[OSS_MIXER_MIC].idxCustom;
     
    729730    //set operation to non-blocking
    730731    pHandle->file.f_flags = O_NONBLOCK;
    731  
     732
    732733    return OSSERR_NOT_SUPPORTED;
    733734}
     
    767768    case OSS_MIXER_BASS:
    768769        return OSS32_MIX_LEVEL_BASS;
    769     case OSS_MIXER_HEADPHONE: 
     770    case OSS_MIXER_HEADPHONE:
    770771        return OSS32_MIX_VOLUME_HEADPHONE;
    771772    case OSS_MIXER_SPEAKER:
     
    792793    pCaps->fuRecCaps  = 0;
    793794
    794     for(i=0;i<OSS_MIXER_NRDEVICES;i++) 
     795    for(i=0;i<OSS_MIXER_NRDEVICES;i++)
    795796    {
    796797        if(pHandle->controls[i].idxVolume != -1) {
    797798            ULONG volidx = OSSToALSAVolume(i);
    798             if(volidx != -1) 
     799            if(volidx != -1)
    799800                pCaps->fuCtrlCaps |= OSS32_MIX_FLAG(volidx);
    800801        }
     
    804805    //then we support intput source selection
    805806    if(pHandle->controls[OSS_MIXER_IGAIN].idxCustom != -1 ||
    806        pHandle->rectype == RECTYPE_SWITCH) 
    807     {       
     807       pHandle->rectype == RECTYPE_SWITCH)
     808    {
    808809        pCaps->fuCtrlCaps |= OSS32_MIX_FLAG(OSS32_MIX_INPUTSRC);
    809810        pCaps->fuRecCaps   = pHandle->reccaps;
     
    843844    }
    844845    //retrieve mixer information
    845     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    846                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     846    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     847                                    SNDRV_CTL_IOCTL_CARD_INFO,
    847848                                    (ULONG)&pHandle->info);
    848849    if(ret) {
     
    904905    }
    905906    //retrieve mixer information
    906     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    907                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     907    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     908                                    SNDRV_CTL_IOCTL_CARD_INFO,
    908909                                    (ULONG)&pHandle->info);
    909910    if(ret) {
  • GPL/trunk/lib32/task.c

    r305 r479  
    4646        t->next = NULL;
    4747        t->sync = 0;
    48         t->func = func;
    49         t->data = data;
     48        t->func = (void *)func; /* DAZ cast added to stop compiler warning */
     49        t->data = (void *)data; /* DAZ cast added to stop compiiler warning */
    5050}
    5151
Note: See TracChangeset for help on using the changeset viewer.