Ignore:
Timestamp:
Apr 9, 2008, 10:22:08 PM (17 years ago)
Author:
cinc
Message:

Portability patches for Windows, Linux, Darwin by Bird.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nom/src/nomdebug.c

    r281 r326  
    3333* ***** END LICENSE BLOCK ***** */
    3434
    35 #define INCL_DOS
    36 #define INCL_DOSFILEMGR
    37 #define INCL_DOSERRORS
    38 #define INCL_WIN
    39 #define INCL_WINWORKPLACE
    40 #define INCL_OS2MM
    41 #define INCL_MMIOOS2
    42 #define INCL_MCIOS2
    43 #define INCL_GPI
    44 #define INCL_PM
    45 
    46 #include <os2.h>
     35#ifdef __OS2__
     36# define INCL_DOS
     37# define INCL_DOSFILEMGR
     38# define INCL_DOSERRORS
     39# define INCL_WIN
     40# define INCL_WINWORKPLACE
     41# define INCL_OS2MM
     42# define INCL_MMIOOS2
     43# define INCL_MCIOS2
     44# define INCL_GPI
     45# define INCL_PM
     46# include <os2.h>
     47#endif /* __OS2__ */
     48
    4749#include <stdarg.h>
    4850#include <stdio.h>
     
    6567      g_error("The object used to call the method %s is not a valid NOM object. ", chrMethodName);
    6668    else
    67       g_error("The object for which the method %s should be called is not valid for this method.\nThe object must be some instance of class %s (or of a subclass) but is a %s.", chrMethodName, NOMClass_nomGetCreatedClassName(nomClass, NULLHANDLE),
    68                 NOMObject_nomGetClassName(nomObject, NULLHANDLE));
     69      g_error("The object for which the method %s should be called is not valid for this method.\nThe object must be some instance of class %s (or of a subclass) but is a %s.", chrMethodName, NOMClass_nomGetCreatedClassName(nomClass, NULL),
     70                NOMObject_nomGetClassName(nomObject, NULL));
    6971  }
    7072}
     
    114116
    115117  //  g_message("In %s with %s %px nomClass: %px (%s)", __FUNCTION__, chrMethodName, nomSelf, nomClass, nomClass->mtab->nomClassName);
    116   if(!nomIsObj(nomSelf) || !_nomIsANoClsCheck(nomSelf, nomClass, NULLHANDLE))
     118  if(!nomIsObj(nomSelf) || !_nomIsANoClsCheck(nomSelf, nomClass, NULL))
    117119    {
    118120      nomPrintObjectPointerErrorMsg(nomSelf, nomClass, chrMethodName);
     
    154156  nomPrintf("----- %s -----  NOMClassMgrObject: %lx\n", __FUNCTION__, NOMClassMgrObject);
    155157
    156   pgdata=_nomGetClassList(NOMClassMgrObject, NULLHANDLE);
     158  pgdata=_nomGetClassList(NOMClassMgrObject, NULL);
    157159  if(pgdata){
    158160    nomPrintf("%s: classlist: %lx\n", __FUNCTION__, pgdata);
     
    176178    nomPrintf("explicitMetaId (meta class): %s\n", *sci->nomExplicitMetaId);
    177179  else
    178     nomPrintf("explicitMetaId (meta class): NULLHANDLE\n");
     180    nomPrintf("explicitMetaId (meta class): NULL\n");
    179181  //  somPrintf("*parents: 0x%x\n", sci->parents);
    180182  nomPrintf("somClassDataStructure cds: 0x%x\n",sci->nomCds);
     
    190192
    191193
    192 void _dumpClassDataStruct(nomClassDataStructure* cds, ULONG ulNumMethods)
     194void _dumpClassDataStruct(nomClassDataStructure* cds, gulong ulNumMethods)
    193195{
    194196  int a;
     
    215217  nomPrintf("  instanceSize (this and all parents): %d 0x%x\n", mtab->ulInstanceSize, mtab->ulInstanceSize);
    216218  nomPrintf("  mtabSize: %d 0x%x\n", mtab->mtabSize, mtab->mtabSize);
    217   nomPrintf("  somMethodProcs: (%ld)\n", (mtab->mtabSize-(LONG)sizeof(nomMethodTab))/4);
     219  nomPrintf("  somMethodProcs: (%ld)\n", (mtab->mtabSize-(glong)sizeof(nomMethodTab))/4);
    218220  //  entries=sObj->mtab->entries[0];
    219221   for(a=0; a<=(mtab->mtabSize-sizeof(nomMethodTab))/4; a++)
     
    234236  nomPrintf("*classInfo: 0x%x\n", *sObj->mtab->nomClsInfo);
    235237
    236   so=(ULONG*)sObj->mtab->classInfo;
     238  so=(gulong*)sObj->mtab->classInfo;
    237239#endif
    238240  nomPrintf("className: %s\n", sObj->mtab->nomClassName);
     
    249251
    250252#if 0
    251 void _dumpStaticMTab(somStaticMethod_t* smt, ULONG ulMethod)
     253void _dumpStaticMTab(somStaticMethod_t* smt, gulong ulMethod)
    252254{
    253255  somStaticMethod_t* tmpSmt=&smt[ulMethod];
     
    262264}
    263265
    264 void _dumpOverrideMTab(somOverrideMethod_t* omt, ULONG ulMethod)
     266void _dumpOverrideMTab(somOverrideMethod_t* omt, gulong ulMethod)
    265267{
    266268  somOverrideMethod_t* tmpOmt=&omt[ulMethod];
     
    300302      tempPtr=(void*)tempPtr->next->mtab;
    301303    else
    302       tempPtr=NULLHANDLE;
     304      tempPtr=NULL;
    303305  }
    304306
     
    400402  somPrintf("  instanceSize (this and all parents): %d 0x%x\n", sObj->mtab->instanceSize, sObj->mtab->instanceSize);
    401403  somPrintf("  mtabSize: %d 0x%x\n", sObj->mtab->mtabSize, sObj->mtab->mtabSize);
    402   somPrintf("  somMethodProcs: (%ld)\n", (sObj->mtab->mtabSize-(LONG)sizeof(somMethodTab))/4);
     404  somPrintf("  somMethodProcs: (%ld)\n", (sObj->mtab->mtabSize-(glong)sizeof(somMethodTab))/4);
    403405  //  entries=sObj->mtab->entries[0];
    404406   for(a=0; a<=(sObj->mtab->mtabSize-sizeof(somMethodTab))/4; a++)
Note: See TracChangeset for help on using the changeset viewer.