IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3145


Ignore:
Timestamp:
Feb 7, 2005, 1:26:25 PM (21 years ago)
Author:
desonia
Message:

* empty log message *

Location:
trunk/psLib
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/configure.in

    r3139 r3145  
    1 AC_INIT([pslib],[1.5])
     1AC_INIT([pslib],[1.4])
    22AM_CONFIG_HEADER(src/config.h)
    33AM_INIT_AUTOMAKE(pslib, 1.4)
     
    1313AC_PROG_F77
    1414AC_F77_WRAPPERS
     15dnl AC_F77_LIBRARY_LDFLAGS
    1516AC_PROG_INSTALL
    1617AC_PROG_LIBTOOL
     
    2122dnl Setup CFLAGS/FFLAGS/LDFLAGS with project-particulars
    2223CFLAGS="${CFLAGS=} -Wall -std=c99 -D_GNU_SOURCE"
    23 LDFLAGS="-release 5"
    2424
    2525dnl Setup the info for psLib for pkg-config
  • trunk/psLib/src/astronomy/slalib.h

    r3139 r3145  
    77*  @author Robert DeSonia, MHPCC
    88*
    9 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2005-02-05 08:33:20 $
     9*  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2005-02-07 23:26:24 $
    1111*
    1212*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1616#define SLALIB_H
    1717
     18#include "config.h"
    1819
    19 #define fslaAoppa F77_FUNC(sla_aoppa,SLA_AOPPA)
     20#define fslaAoppa F77_FUNC_(sla_aoppa,SLA_AOPPA)
    2021extern void fslaAoppa(
    2122        const double* date,
     
    3435    );
    3536
    36 #define fslaAopqk F77_FUNC(sla_aopqk,SLA_AOPQK)
     37#define fslaAopqk F77_FUNC_(sla_aopqk,SLA_AOPQK)
    3738extern void fslaAopqk(
    3839        const double* RAP,
     
    4647    );
    4748
    48 #define fslaOapqk F77_FUNC(sla_oapqk,SLA_OAPQK)
     49#define fslaOapqk F77_FUNC_(sla_oapqk,SLA_OAPQK)
    4950extern void fslaOapqk(
    5051        char* TYPE,
     
    5657    );
    5758
    58 #define fslaAirmas F77_FUNC(sla_airmas,SLA_AIRMAS)
     59#define fslaAirmas F77_FUNC_(sla_airmas,SLA_AIRMAS)
    5960extern double fslaAirmas(
    6061        const double* zenithDistance
  • trunk/psLib/src/sys/psError.h

    r3115 r3145  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-02-03 00:54:11 $
     14 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-02-07 23:26:24 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    116116 *  @return psErrorCode    the given error code
    117117 */
     118#ifdef DOXYGEN
     119psErrorCode psError(
     120    psErrorCode code,                  ///< Error class code
     121    psBool new,                        ///< true if error originates at this location
     122    const char* fmt,
     123    ...
     124);
     125#else
    118126psErrorCode p_psError(
    119127    const char* file,
     
    126134);
    127135
     136#ifndef SWIG
    128137#define psError(code,new,...) p_psError(__FILE__,__LINE__,__func__,code,new,__VA_ARGS__)
     138#endif
     139
     140#endif
    129141
    130142/** Create a new psErr struct
  • trunk/psLib/src/sys/psMemory.h

    r2391 r3145  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-11-22 20:49:59 $
     14 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-02-07 23:26:24 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    127127 *  @see psFree
    128128 */
    129 #ifdef DOXYGEN
     129#if defined(DOXYGEN) || defined(SWIG)
    130130psPtr psAlloc(size_t size       ///< Size required
    131131             );
    132 #else
    133 
     132#endif
     133
     134#ifndef DOXYGEN
    134135psPtr p_psAlloc(size_t size,    ///< Size required
    135136                const char *file,       ///< File of call
     
    138139
    139140/// Memory allocation. psAlloc sends file and line number to p_psAlloc.
     141#ifndef SWIG
    140142#define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__)
     143#endif
     144
    141145#endif
    142146
     
    200204 *  @see psAlloc, psFree
    201205 */
    202 #ifdef DOXYGEN
     206#if defined(DOXYGEN) || defined(SWIG)
    203207psPtr psRealloc(
    204     psPtr ptr                          ///< Pointer to re-allocate
    205     size_t size,                       ///< Size required
    206 );
    207 #else
    208 
     208    psPtr ptr,                          ///< Pointer to re-allocate
     209    size_t size                         ///< Size required
     210);
     211#endif
     212
     213#ifndef DOXYGEN
    209214psPtr p_psRealloc(
    210215    psPtr ptr,                         ///< Pointer to re-allocate
    211216    size_t size,                       ///< Size required
    212217    const char *file,                  ///< File of call
    213     psS32 lineno                         ///< Line number of call
     218    psS32 lineno                       ///< Line number of call
    214219);
    215220
    216221/// Memory re-allocation.  psRealloc sends file and line number to p_psRealloc.
     222#ifndef SWIG
    217223#define psRealloc(ptr, size) p_psRealloc(ptr, size, __FILE__, __LINE__)
     224#endif
    218225
    219226#endif
     
    223230 *  @see psAlloc, psRealloc
    224231 */
    225 #ifdef DOXYGEN
     232#if defined(DOXYGEN) || defined(SWIG)
    226233void psFree(
    227     psPtr ptr,                         ///< Pointer to free, if NULL, function returns immediately.
    228 );
    229 #else
    230 
     234    psPtr ptr                          ///< Pointer to free, if NULL, function returns immediately.
     235);
     236#endif
     237
     238#ifndef DOXYGEN
    231239void p_psFree(
    232     psPtr ptr,                        ///< Pointer to free
    233     const char *file,                 ///< File of call
    234     psS32 lineno                        ///< Line number of call
     240    psPtr ptr,                         ///< Pointer to free
     241    const char *file,                  ///< File of call
     242    psS32 lineno                       ///< Line number of call
    235243);
    236244
    237245/// Free memory.  psFree sends file and line number to p_psFree.
    238 #define psFree(size) p_psFree(size, __FILE__, __LINE__)
     246#ifndef SWIG
     247#define psFree(ptr) p_psFree(ptr, __FILE__, __LINE__)
     248#endif
    239249
    240250#endif
     
    282292 *  @ingroup memRefCount
    283293 */
    284 #ifdef DOXYGEN
     294#if defined(DOXYGEN) || defined(SWIG)
    285295psPtr psMemIncrRefCounter(
    286296    psPtr vptr                         ///< Pointer to increment refCounter, and return
    287297);
    288 #else
    289 
     298#endif
     299
     300#ifndef DOXYGEN
    290301psPtr p_psMemIncrRefCounter(
    291302    psPtr vptr,                        ///< Pointer to increment refCounter, and return
     
    294305);
    295306
     307#ifndef SWIG
    296308#define psMemIncrRefCounter(vptr) p_psMemIncrRefCounter(vptr, __FILE__, __LINE__)
     309#endif
     310
    297311#endif
    298312
     
    304318 *                   fully dereferenced.
    305319 */
    306 #ifdef DOXYGEN
     320#if defined(DOXYGEN) || defined(SWIG)
    307321psPtr psMemDecrRefCounter(
    308322    psPtr vptr                         ///< Pointer to decrement refCounter, and return
    309323);
    310 #else
    311 
     324#endif
     325
     326#ifndef DOXYGEN
    312327psPtr p_psMemDecrRefCounter(
    313328    psPtr vptr,                        ///< Pointer to decrement refCounter, and return
     
    316331);
    317332
     333#ifndef SWIG
    318334#define psMemDecrRefCounter(vptr) p_psMemDecrRefCounter(vptr, __FILE__, __LINE__)
     335#endif
     336
    319337#endif
    320338
  • trunk/psLib/src/sys/psTrace.h

    r2426 r3145  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-11-24 20:12:28 $
     11 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-07 23:26:24 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5858p_psComponent;
    5959
    60 #ifndef DOXYGEN
     60#ifdef DOXYGEN
     61void psTrace(const char *facil,        ///< facilty of interest
     62             psS32 myLevel,            ///< desired trace level
     63             ...)                      ///< trace message arguments
     64;
     65#else
    6166/// Send a trace message
    62 void p_psTrace(const char *facil,       ///< facilty of interest
    63                psS32 myLevel,     ///< desired trace level
    64                ...)             ///< trace message arguments
     67void p_psTrace(const char *facil,      ///< facilty of interest
     68               psS32 myLevel,          ///< desired trace level
     69               ...)                    ///< trace message arguments
    6570;
     71
     72#ifndef SWIG
     73#define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
     74#endif
     75
    6676#endif
    6777
     
    8999/* \} */// End of SystemGroup Functions
    90100
    91 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
    92101#endif
    93102
  • trunk/psLib/src/sysUtils/psError.h

    r3115 r3145  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-02-03 00:54:11 $
     14 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-02-07 23:26:24 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    116116 *  @return psErrorCode    the given error code
    117117 */
     118#ifdef DOXYGEN
     119psErrorCode psError(
     120    psErrorCode code,                  ///< Error class code
     121    psBool new,                        ///< true if error originates at this location
     122    const char* fmt,
     123    ...
     124);
     125#else
    118126psErrorCode p_psError(
    119127    const char* file,
     
    126134);
    127135
     136#ifndef SWIG
    128137#define psError(code,new,...) p_psError(__FILE__,__LINE__,__func__,code,new,__VA_ARGS__)
     138#endif
     139
     140#endif
    129141
    130142/** Create a new psErr struct
  • trunk/psLib/src/sysUtils/psMemory.h

    r2391 r3145  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-11-22 20:49:59 $
     14 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-02-07 23:26:24 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    127127 *  @see psFree
    128128 */
    129 #ifdef DOXYGEN
     129#if defined(DOXYGEN) || defined(SWIG)
    130130psPtr psAlloc(size_t size       ///< Size required
    131131             );
    132 #else
    133 
     132#endif
     133
     134#ifndef DOXYGEN
    134135psPtr p_psAlloc(size_t size,    ///< Size required
    135136                const char *file,       ///< File of call
     
    138139
    139140/// Memory allocation. psAlloc sends file and line number to p_psAlloc.
     141#ifndef SWIG
    140142#define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__)
     143#endif
     144
    141145#endif
    142146
     
    200204 *  @see psAlloc, psFree
    201205 */
    202 #ifdef DOXYGEN
     206#if defined(DOXYGEN) || defined(SWIG)
    203207psPtr psRealloc(
    204     psPtr ptr                          ///< Pointer to re-allocate
    205     size_t size,                       ///< Size required
    206 );
    207 #else
    208 
     208    psPtr ptr,                          ///< Pointer to re-allocate
     209    size_t size                         ///< Size required
     210);
     211#endif
     212
     213#ifndef DOXYGEN
    209214psPtr p_psRealloc(
    210215    psPtr ptr,                         ///< Pointer to re-allocate
    211216    size_t size,                       ///< Size required
    212217    const char *file,                  ///< File of call
    213     psS32 lineno                         ///< Line number of call
     218    psS32 lineno                       ///< Line number of call
    214219);
    215220
    216221/// Memory re-allocation.  psRealloc sends file and line number to p_psRealloc.
     222#ifndef SWIG
    217223#define psRealloc(ptr, size) p_psRealloc(ptr, size, __FILE__, __LINE__)
     224#endif
    218225
    219226#endif
     
    223230 *  @see psAlloc, psRealloc
    224231 */
    225 #ifdef DOXYGEN
     232#if defined(DOXYGEN) || defined(SWIG)
    226233void psFree(
    227     psPtr ptr,                         ///< Pointer to free, if NULL, function returns immediately.
    228 );
    229 #else
    230 
     234    psPtr ptr                          ///< Pointer to free, if NULL, function returns immediately.
     235);
     236#endif
     237
     238#ifndef DOXYGEN
    231239void p_psFree(
    232     psPtr ptr,                        ///< Pointer to free
    233     const char *file,                 ///< File of call
    234     psS32 lineno                        ///< Line number of call
     240    psPtr ptr,                         ///< Pointer to free
     241    const char *file,                  ///< File of call
     242    psS32 lineno                       ///< Line number of call
    235243);
    236244
    237245/// Free memory.  psFree sends file and line number to p_psFree.
    238 #define psFree(size) p_psFree(size, __FILE__, __LINE__)
     246#ifndef SWIG
     247#define psFree(ptr) p_psFree(ptr, __FILE__, __LINE__)
     248#endif
    239249
    240250#endif
     
    282292 *  @ingroup memRefCount
    283293 */
    284 #ifdef DOXYGEN
     294#if defined(DOXYGEN) || defined(SWIG)
    285295psPtr psMemIncrRefCounter(
    286296    psPtr vptr                         ///< Pointer to increment refCounter, and return
    287297);
    288 #else
    289 
     298#endif
     299
     300#ifndef DOXYGEN
    290301psPtr p_psMemIncrRefCounter(
    291302    psPtr vptr,                        ///< Pointer to increment refCounter, and return
     
    294305);
    295306
     307#ifndef SWIG
    296308#define psMemIncrRefCounter(vptr) p_psMemIncrRefCounter(vptr, __FILE__, __LINE__)
     309#endif
     310
    297311#endif
    298312
     
    304318 *                   fully dereferenced.
    305319 */
    306 #ifdef DOXYGEN
     320#if defined(DOXYGEN) || defined(SWIG)
    307321psPtr psMemDecrRefCounter(
    308322    psPtr vptr                         ///< Pointer to decrement refCounter, and return
    309323);
    310 #else
    311 
     324#endif
     325
     326#ifndef DOXYGEN
    312327psPtr p_psMemDecrRefCounter(
    313328    psPtr vptr,                        ///< Pointer to decrement refCounter, and return
     
    316331);
    317332
     333#ifndef SWIG
    318334#define psMemDecrRefCounter(vptr) p_psMemDecrRefCounter(vptr, __FILE__, __LINE__)
     335#endif
     336
    319337#endif
    320338
  • trunk/psLib/src/sysUtils/psTrace.h

    r2426 r3145  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-11-24 20:12:28 $
     11 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-07 23:26:24 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5858p_psComponent;
    5959
    60 #ifndef DOXYGEN
     60#ifdef DOXYGEN
     61void psTrace(const char *facil,        ///< facilty of interest
     62             psS32 myLevel,            ///< desired trace level
     63             ...)                      ///< trace message arguments
     64;
     65#else
    6166/// Send a trace message
    62 void p_psTrace(const char *facil,       ///< facilty of interest
    63                psS32 myLevel,     ///< desired trace level
    64                ...)             ///< trace message arguments
     67void p_psTrace(const char *facil,      ///< facilty of interest
     68               psS32 myLevel,          ///< desired trace level
     69               ...)                    ///< trace message arguments
    6570;
     71
     72#ifndef SWIG
     73#define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
     74#endif
     75
    6676#endif
    6777
     
    8999/* \} */// End of SystemGroup Functions
    90100
    91 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
    92101#endif
    93102
  • trunk/psLib/src/sysUtils/sysUtils.i

    r3115 r3145  
    99%include "psTrace.h"
    1010%include "psType.h"
     11
     12%inline %{
     13
     14psErrorCode psError(psErrorCode code, psBool new, const char* msg) {
     15    return p_psError("UNKNOWN",0,"SWIG",code,new,"%s",msg);
     16}
     17
     18psPtr psAlloc(size_t size) {
     19    return p_psAlloc(size,"UNKNOWN",0);
     20}
     21
     22psPtr psRealloc(psPtr ptr, size_t size) {
     23    return p_psRealloc(ptr,size,"UNKNOWN",0);
     24}
     25
     26void psFree(psPtr ptr) {
     27    p_psFree(ptr,"UNKNOWN",0);
     28}
     29
     30psPtr psMemIncrRefCounter(psPtr vptr) {
     31    return p_psMemIncrRefCounter(vptr,"UNKNOWN",0);
     32}
     33
     34psPtr psMemDecrRefCounter(psPtr vptr) {
     35    return p_psMemDecrRefCounter(vptr,"UNKNOWN",0);
     36}
     37
     38void psTrace(const char* facil, psS32 myLevel, const char* msg) {
     39    p_psTrace(facil, myLevel, msg);
     40}
     41
     42%}
  • trunk/psLib/swig/Makefile.am

    r3132 r3145  
    55        rm -rf psLibModule
    66
    7 INCLUDES = -I$(top_srcdir)/src \
    8         -I$(top_srcdir)/src/astronomy \
    9         -I$(top_srcdir)/src/collections \
    10         -I$(top_srcdir)/src/dataManip \
    11         -I$(top_srcdir)/src/fileUtils \
    12         -I$(top_srcdir)/src/image \
    13         -I$(top_srcdir)/src/sysUtils
     7SRCDIR = $(shell cd $(top_srcdir) && pwd)
     8INCLUDES = -I$(SRCDIR)/src \
     9        -I$(SRCDIR)/src/astronomy \
     10        -I$(SRCDIR)/src/collections \
     11        -I$(SRCDIR)/src/dataManip \
     12        -I$(SRCDIR)/src/fileUtils \
     13        -I$(SRCDIR)/src/image \
     14        -I$(SRCDIR)/src/sysUtils
    1415
    1516####################################################
     
    2526        echo "includes=$(INCLUDES)" > psLibModule/setup.txt
    2627        echo "ldflags=-L$(top_builddir)/src $(PSLIB_LIBS)" >> psLibModule/setup.txt
    27         echo "cflags=$(PSLIB_CFLAGS) -Wno-unused -Wno-strict-aliasing" >> psLibModule/setup.txt
     28        echo "cflags=$(CFLAGS) -std=c99 -Wno-unused -Wno-strict-aliasing" >> psLibModule/setup.txt
    2829
    2930psLibModule/pslib_wrap.c: psLibModule pslib.i
  • trunk/psLib/swig/pslib.i

    r3124 r3145  
    55#define SWIG
    66#include "pslib.h"
     7
     8/* SWIG uses malloc/free - make it use the pslib memory functions instead. */
     9/*
     10#define malloc(S)    psAlloc(S)
     11#define realloc(P,S) psRealloc(P,S)
     12#define free(P)      psFree(P)
     13*/
     14
    715%}
     16
     17/* grab the typedefs used throughout psLib, e.g. psU8, psU16,... */
     18%import "psType.h"
     19%import "psMemory.h"
    820
    921%include "cpointer.i"
Note: See TracChangeset for help on using the changeset viewer.