IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8232 for trunk/psLib/src/sys


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:
7 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/psConfigure.c

    r7646 r8232  
    1313 *  @author Robert DeSonia, MHPCC
    1414 *
    15  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2006-06-23 01:59:15 $
     15 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2006-08-08 23:32:23 $
    1717 *
    1818 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2828#include "psError.h"
    2929#include "psConfigure.h"
    30 #include "psErrorText.h"
     30
    3131#include "config.h"
    3232
     
    9898        if (!p_psTimeInit(timeConfig)) {
    9999            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    100                     PS_ERRORTEXT_psConfigure_INITIALIZATION_FAILED, "psTime");
     100                    _("Failed to initialize %s."), "psTime");
    101101            return;
    102102        }
     
    104104    if (!p_psEOCInit()) {
    105105        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    106                 PS_ERRORTEXT_psConfigure_INITIALIZATION_FAILED, "psEOC");
     106                _("Failed to initialize %s."), "psEOC");
    107107        return;
    108108    }
     
    125125    if (!p_psTimeFinalize()) {
    126126        psError(PS_ERR_UNKNOWN, false,
    127                 PS_ERRORTEXT_psConfigure_FINALIZATION_FAILED, "psTime");
     127                _("Failed to finalize %s."), "psTime");
    128128        return;
    129129    }
     
    132132    if (!p_psEOCFinalize()) {
    133133        psError(PS_ERR_UNKNOWN, false,
    134                 PS_ERRORTEXT_psConfigure_FINALIZATION_FAILED, "psEOC");
     134                _("Failed to finalize %s."), "psEOC");
    135135        return;
    136136    }
  • trunk/psLib/src/sys/psErrorCodes.c.in

    r7967 r8232  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2006-07-25 01:27:48 $
     9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2006-08-08 23:32:23 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2020#include "psMemory.h"
    2121
    22 #include "psErrorText.h"
     22
    2323
    2424static psErrorDescription staticErrorCodes[] = {
  • trunk/psLib/src/sys/psLogMsg.c

    r8098 r8232  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2006-08-03 03:26:28 $
     13 *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2006-08-08 23:32:23 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3636#include "psString.h"
    3737
    38 #include "psErrorText.h"
     38
    3939
    4040#define MIN_LOG_LEVEL 0
     
    165165        default:
    166166            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    167                     PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr);
     167                    _("Unknown logging keyword %c."), *ptr);
    168168            return false;
    169169        }
     
    210210
    211211        if (fileD == 0) {
    212             psError(PS_ERR_IO, true, PS_ERRORTEXT_psLogMsg_OPEN_FILE_FAILED,
     212            psError(PS_ERR_IO, true, _("Could not open file '%s' for output."),
    213213                    location);
    214214            psFree(protocolLocation);
  • 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    }
  • trunk/psLib/src/sys/psString.c

    r7912 r8232  
    1313 *  @author David Robbins, MHPCC
    1414 *
    15  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2006-07-15 02:50:51 $
     15 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2006-08-08 23:32:23 $
    1717 *
    1818 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2828#include "psAbort.h"
    2929
    30 #include "psErrorText.h"
     30
    3131
    3232static void stringFree(psString string)
     
    7878        // Log error message and return NULL
    7979        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    80                 PS_ERRORTEXT_psString_NCHAR_NEGATIVE,
     80                _("Can not copy a negative number of characters (%d)."),
    8181                nChar);
    8282        return NULL;
  • trunk/psLib/src/sys/psTrace.c

    r7571 r8232  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-06-15 00:22:54 $
     11 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-08-08 23:32:23 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151#include "psLogMsg.h"
    5252
    53 #include "psErrorText.h"
     53
    5454
    5555static p_psComponent* cRoot = NULL; // The root of the trace component
     
    132132        if (NULL == currentNode->subcomp[i]) {
    133133            psLogMsg("p_psTraceReset", PS_LOG_WARN,
    134                      PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
     134                     _("Sub-component %d of node %s in trace tree is NULL."),
    135135                     i, currentNode->name);
    136136        } else {
     
    165165    if (strcmp("", addNodeName) == 0) {
    166166        psError(PS_ERR_BAD_PARAMETER_NULL,true,
    167                 PS_ERRORTEXT_psTrace_ADD_NULL_COMPONENT);
     167                _("Failed to add null component to trace tree."));
    168168        return false;
    169169    }
     
    177177    if (addNodeName[0] != '.') {
    178178        psError(PS_ERR_BAD_PARAMETER_VALUE,true,
    179                 PS_ERRORTEXT_psTrace_MALFORMED_COMPONENT_NAME,
     179                _("Failed to add '%s' to the root component tree; component must start with '.'."),
    180180                addNodeName);
    181181        return false;
     
    274274    if ( !componentAdd(compName, level) ) {
    275275        psError(PS_ERR_UNKNOWN, false,
    276                 PS_ERRORTEXT_psTrace_FAILED_TO_ADD_COMPONENT,
     276                _("Failed to set trace level (%d) to '%s'."),
    277277                level,
    278278                compName);
     
    346346            if (NULL == currentNode->subcomp[i]) {
    347347                psLogMsg("p_psTraceReset", PS_LOG_WARN,
    348                          PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
     348                         _("Sub-component %d of node %s in trace tree is NULL."),
    349349                         i, currentNode->name);
    350350            }
     
    504504    if (NULL == comp) {
    505505        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    506                 PS_ERRORTEXT_psTrace_NULL_TRACETREE,
     506                _("Function %s called on a NULL trace level tree."),
    507507                __func__);
    508508        return;
     
    705705        default:
    706706            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    707                     PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr);
     707                    _("Unknown logging keyword %c."), *ptr);
    708708            return false;
    709709        }
Note: See TracChangeset for help on using the changeset viewer.