IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2006, 1:32:23 PM (20 years ago)
Author:
jhoblitt
Message:

bug #790 - remove psErrorText.h and inline all error codes. all newly inlined error codes are wrapped with the _() macro from future gettextification

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src

    • Property svn:ignore
      •  

        old new  
        1010libpslib.la.temp
        1111config.h.in
        12 psErrorText.h
        1312*.bb
        1413*.bbg
  • trunk/psLib/src/sys/psMemory.c

    r7901 r8232  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.74 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2006-07-14 02:26:25 $
     10*  @version $Revision: 1.75 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2006-08-08 23:32:23 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3333#include "psLine.h"
    3434#include "psRegion.h"
    35 #include "psErrorText.h"
     35
    3636
    3737#define P_PS_MEMMAGIC (psPtr )0xdeadbeef   // Magic number in psMemBlock header
     
    126126    if (ptr->refCounter < 1) {
    127127        psError(PS_ERR_MEMORY_CORRUPTION, false,
    128                 PS_ERRORTEXT_psMemory_MULTIPLE_FREE,
     128                _("Block %lu, allocated at %s:%d, freed multiple times at %s:%d."),
    129129                (unsigned long)ptr->id, ptr->file, ptr->lineno, file, lineno);
    130130    }
     
    148148    if (m == NULL) {
    149149        psError(PS_ERR_MEMORY_CORRUPTION, true,
    150                 PS_ERRORTEXT_psMemory_NULL_BLOCK);
     150                _("NULL memory block found."));
    151151        return 1;
    152152    }
     
    155155        // using an unreferenced block of memory, are you?
    156156        psError(PS_ERR_MEMORY_CORRUPTION, true,
    157                 PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE,
     157                _("Memory block %lu was freed but still being used."),
    158158                (unsigned long)m->id);
    159159        return 1;
     
    162162    if (m->startblock != P_PS_MEMMAGIC || m->endblock != P_PS_MEMMAGIC) {
    163163        psError(PS_ERR_MEMORY_CORRUPTION, true,
    164                 PS_ERRORTEXT_psMemory_UNDERFLOW,
     164                _("Memory block %lu is corrupted; buffer underflow detected."),
    165165                (unsigned long)m->id);
    166166        return 1;
     
    168168    if (*(psPtr *)((int8_t *) (m + 1) + m->userMemorySize) != P_PS_MEMMAGIC) {
    169169        psError(PS_ERR_MEMORY_CORRUPTION, true,
    170                 PS_ERRORTEXT_psMemory_OVERFLOW,
     170                _("Memory block %lu is corrupted; buffer overflow detected."),
    171171                (unsigned long)m->id);
    172172        return 1;
     
    506506        psMemBlock* ptr = ((psMemBlock* ) vptr) - 1;
    507507
    508         psAbort(__func__,PS_ERRORTEXT_psMemory_MULTIPLE_FREE,
     508        psAbort(__func__,_("Block %lu, allocated at %s:%d, freed multiple times at %s:%d."),
    509509                (unsigned long)ptr->id, ptr->file, ptr->lineno, filename, lineno);
    510510    }
Note: See TracChangeset for help on using the changeset viewer.