IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7300 for trunk/psLib/src/sys


Ignore:
Timestamp:
Jun 2, 2006, 11:33:34 AM (20 years ago)
Author:
Paul Price
Message:

Applying patches from RHL.

  • Correctly detect cfitsio 3 (ffdkopn)
  • Add PS_ERR_FITS_BAD
  • Free memory leaks caused by extra columns with FITS tables
  • Report error for singular matrices in LMM
  • Add psErrorCodeLast
  • Write psAbort errors, even if logging is off; flush the file descriptor
  • Useful macro: PS_FILE_LINE
  • Print a newline if the last character of a trace lacks one
  • When moving arguments down, set the vacated slot to NULL (so that original is valid)
  • If nFail is omitted, push an error if appropriate
Location:
trunk/psLib/src/sys
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psError.c

    r7250 r7300  
    1010 *  @author Eric Van Alst, MHPCC
    1111 *
    12  *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-05-31 19:53:36 $
     12 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-06-02 21:33:34 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    167167{
    168168    return psErrorGet(0);
     169}
     170
     171psErrorCode psErrorCodeLast(void)
     172{
     173    const psErr *err = psErrorGet(0);
     174    psErrorCode code = err->code;
     175    psFree(err);
     176
     177    return code;
    169178}
    170179
  • trunk/psLib/src/sys/psError.h

    r4556 r7300  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-07-15 02:33:54 $
     14 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-06-02 21:33:34 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6363psErr* psErrorLast(void);
    6464
     65/** Get errorCode of last error put on the error stack
     66 *
     67 *  @return psErrorCode     last error code, or PS_ERR_NONE
     68 */
     69psErrorCode psErrorCodeLast(void);
     70
    6571/** Clears the error stack.
    6672 *
  • trunk/psLib/src/sys/psLogMsg.c

    r5072 r7300  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-09-20 02:43:53 $
     14 *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-06-02 21:33:34 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    310310        logDest = stderr;
    311311    }
     312    // If it's an abort, we always want to see the message
     313    if (logDest == NULL && level == PS_LOG_ABORT) {
     314        logDest = stderr;
     315    }
    312316    // If logging is off, or if the level is too high, return immediately.
    313317    if ((level > globalLogLevel) || (logDest == NULL)) {
     
    405409    } else {
    406410        fputc('\n', logDest);
     411    }
     412
     413    if (level == PS_LOG_ABORT) {
     414        fflush(logDest);
    407415    }
    408416}
  • trunk/psLib/src/sys/psString.h

    r7015 r7300  
    1414 *  @author David Robbins, MHPCC
    1515 *
    16  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2006-05-01 00:57:07 $
     16 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2006-06-02 21:33:34 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2929/** This macro will convert the argument to a quoted string */
    3030#define PS_STRING(S)  #S
     31
     32/** This macro expands to "file:line" */
     33#define PS_FILE_LINE __FILE__ ":" PS_STRING(__LINE__)
    3134
    3235// Doxygen group tags
  • trunk/psLib/src/sys/psTrace.c

    r5118 r7300  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-09-24 01:33:12 $
     11 *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-06-02 21:33:34 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    598598            vsprintf(line, format, ap);
    599599            write (traceFD, line, strlen(line));
     600            if (line[strlen(line) - 1] != '\n') {
     601                write(traceFD, "\n", 1);
     602            }
     603
    600604
    601605            //        vfprintf(traceFP, format, ap);
Note: See TracChangeset for help on using the changeset viewer.