Ignore:
Timestamp:
Nov 30, 2001, 8:02:33 PM (24 years ago)
Author:
sandervl
Message:

removed TRACE/WARN macro redefinition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/compobj.c

    r7502 r7508  
    3737#ifdef __WIN32OS2__
    3838#include <heapstring.h>
    39 
    40 #undef FIXME
    41 #undef TRACE
    42 #ifdef DEBUG
    43 // PH 2001-11-30
    44 // this macro definition causes the control leave the scope of a
    45 // non-curly-braced preceeding if statement. Therefore,
    46 //   if (p!=NULL)
    47 //      TRACE("p->a=%d", p->a)
    48 // crashes.
    49 //
    50 // !!! ENSURE TRACES AND FIXMES WITH PRECEEDING IF STATEMENT
    51 // !!! ARE PUT INTO CURLY BRACES
    52 #define TRACE WriteLog("OLE32: %s", __FUNCTION__); WriteLog
    53 #define FIXME WriteLog("FIXME OLE32: %s", __FUNCTION__); WriteLog
    54 #else
    55 #define TRACE 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    56 #define FIXME 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    57 #endif
    5839#endif
    5940
     
    446427  BYTE *p;
    447428  int   i;
    448  
    449  
    450 #ifdef __WIN32OS2__
    451   // Note: only setup the lookup table once!
    452   static BOOL fCLSIDTableInitialized = FALSE;
    453   static BYTE table[256];
    454 #else
    455429  BYTE table[256];
    456 #endif
    457430
    458431  if (!s)
    459432          s = "{00000000-0000-0000-0000-000000000000}";
    460433  else {  /* validate the CLSID string */
    461    
    462 #ifdef __WIN32OS2__
    463     // PH: all other characters are tested up to the 38th
    464     // and cannot be zero so this test should be sufficient.
    465     if (s[38] != 0)
    466 #else
    467     if (strlen(s) != 38)
    468 #endif
     434
     435      if (strlen(s) != 38)
    469436          return CO_E_CLASSSTRING;
    470437
     
    484451
    485452  TRACE("%s -> %p\n", s, id);
    486  
    487  
    488 #ifdef __WIN32OS2__
    489   if (fCLSIDTableInitialized == FALSE)
    490   {
    491     fCLSIDTableInitialized = TRUE;
    492 #endif
    493    
    494     /* quick lookup table */
    495     memset(table, 0, 256);
    496  
    497     for (i = 0; i < 10; i++) {
    498       table['0' + i] = i;
    499     }
    500     for (i = 0; i < 6; i++) {
    501       table['A' + i] = i+10;
    502       table['a' + i] = i+10;
    503     }
    504    
    505 #ifdef __WIN32OS2__
    506   }
    507 #endif
     453
     454  /* quick lookup table */
     455  memset(table, 0, 256);
     456
     457  for (i = 0; i < 10; i++) {
     458    table['0' + i] = i;
     459  }
     460  for (i = 0; i < 6; i++) {
     461    table['A' + i] = i+10;
     462    table['a' + i] = i+10;
     463  }
    508464
    509465  /* in form {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} */
     
    15021458
    15031459  if (pServerInfo!=NULL)
    1504   {
    15051460    FIXME("() non-NULL pServerInfo not supported!\n");
    1506   }
    15071461
    15081462  /*
Note: See TracChangeset for help on using the changeset viewer.