IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 390 for trunk/archive/pslib


Ignore:
Timestamp:
Apr 2, 2004, 4:36:53 AM (22 years ago)
Author:
rhl
Message:

Fixed calls to psError

Location:
trunk/archive/pslib/src/Utils
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/src/Utils/dlist.c

    r267 r390  
    187187       
    188188        if (which < 0 || which >= list->n) { // out of bounds
    189             psError(__func__, "Index %d is not in range [0..%d] for list 0x%x", which, list->n, list);
     189            psError(__func__, PS_ERR_BAD_INDEX, 1, "Index %d is not in range [0..%d] for list 0x%x", which, list->n, list);
    190190            return NULL;
    191191        }
     
    281281{
    282282    if (where != PS_DLIST_HEAD && where != PS_DLIST_TAIL) {
    283         psError(__func__, "Invalid where argument: %d; assuming PS_DLIST_HEAD", where);
     283        psError(__func__, PS_ERR_UNKNOWN, 1, "Invalid where argument: %d; assuming PS_DLIST_HEAD", where);
    284284        where = PS_DLIST_HEAD;
    285285    }
  • trunk/archive/pslib/src/Utils/tst_memory.c

    r267 r390  
    2525static void *my_MemExhaustedCB(size_t size)
    2626{
    27     psError(__func__, "Bye bye sweet world\n");
     27    psError(__func__, ENOMEM, 1, "Bye bye sweet world\n");
    2828   
    2929    return NULL;
     
    7474    str = psRealloc(str, 20);
    7575    psFree(str);
    76 #if 1
     76#if 0
    7777    /*
    7878     * An illegal double-free
     
    8181#endif
    8282
    83 #if 1
     83#if 0
    8484    /*
    8585     * Free memory not allocated with psAlloc
     
    8888#endif
    8989
    90 #if 0
     90#if 1
    9191    /*
    9292     * Ask for more memory than we can get
     
    137137     */
    138138    if(psMemCheckCorruption(1)) {
    139         psError(__func__, "Detected corrupted memory\n\n");
     139        psError(__func__, PS_ERR_MEMORY_CORRUPTION, 1, "Detected corrupted memory\n\n");
    140140    }
    141141    /*
  • trunk/archive/pslib/src/Utils/tst_trace.c

    r267 r390  
    1313   
    1414    if(psMemCheckCorruption(0)) {
    15         psError(__func__, "Detected corrupted memory\n\n");
     15        psError(__func__, PS_ERR_MEMORY_CORRUPTION, PS_NEW_ERROR, "Detected corrupted memory\n");
    1616    }
    1717   
Note: See TracChangeset for help on using the changeset viewer.