qfits-4.3.4

main qfits-4.3.4
Jeff Moe 2022-06-01 19:35:17 -06:00
parent 1cf61b97fd
commit 61025d20a0
13 changed files with 43 additions and 46 deletions

View File

@ -21,7 +21,7 @@ Installing qfits as an ANSI C library
% configure --prefix=/usr/local/qfits
If you want to perform basic tests, use:
% make tests
% make check
Using qfits from C++

View File

@ -9,7 +9,7 @@
<!-- Generated by Doxygen 1.2.5 on Tue Sep 30 11:31:29 2003 -->
<!-- Generated by Doxygen 1.2.5 on Wed Nov 5 16:04:35 2003 -->
<h1>qfits Reference manual</h1>
<p>
<h3 align="center">4.3.3</h3>

View File

@ -9,7 +9,7 @@
<!-- Generated by Doxygen 1.2.5 on Tue Sep 30 11:31:29 2003 -->
<!-- Generated by Doxygen 1.2.5 on Wed Nov 5 16:04:35 2003 -->
<h1>qfits.h File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td nowrap align=right valign=top>struct &nbsp;</td><td valign=bottom><a class="el" href="struct_qfits_col.html">qfits_col</a></td></tr>

View File

@ -9,7 +9,7 @@
<!-- Generated by Doxygen 1.2.5 on Tue Sep 30 11:31:30 2003 -->
<!-- Generated by Doxygen 1.2.5 on Wed Nov 5 16:04:35 2003 -->
<h1>qfits.head File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
</table>

View File

@ -9,7 +9,7 @@
<!-- Generated by Doxygen 1.2.5 on Tue Sep 30 11:31:30 2003 -->
<!-- Generated by Doxygen 1.2.5 on Wed Nov 5 16:04:35 2003 -->
<h1>qfits_col Struct Reference</h1>Column object.
<a href="#_details">More...</a>
<p>

View File

@ -9,7 +9,7 @@
<!-- Generated by Doxygen 1.2.5 on Tue Sep 30 11:31:30 2003 -->
<!-- Generated by Doxygen 1.2.5 on Wed Nov 5 16:04:35 2003 -->
<h1>qfits_header Struct Reference</h1>FITS header object.
<a href="#_details">More...</a>
<p>

View File

@ -9,7 +9,7 @@
<!-- Generated by Doxygen 1.2.5 on Tue Sep 30 11:31:30 2003 -->
<!-- Generated by Doxygen 1.2.5 on Wed Nov 5 16:04:35 2003 -->
<h1>qfits_table Struct Reference</h1>Table object.
<a href="#_details">More...</a>
<p>

View File

@ -9,7 +9,7 @@
<!-- Generated by Doxygen 1.2.5 on Tue Sep 30 11:31:30 2003 -->
<!-- Generated by Doxygen 1.2.5 on Wed Nov 5 16:04:35 2003 -->
<h1>qfitsdumper Struct Reference</h1>qfits dumper control object.
<a href="#_details">More...</a>
<p>

View File

@ -9,7 +9,7 @@
<!-- Generated by Doxygen 1.2.5 on Tue Sep 30 11:31:30 2003 -->
<!-- Generated by Doxygen 1.2.5 on Wed Nov 5 16:04:35 2003 -->
<h1>qfitsloader Struct Reference</h1>qfits loader control object.
<a href="#_details">More...</a>
<p>

View File

@ -3,7 +3,7 @@
@file xmemory.h
@author Nicolas Devillard
@date Oct 2000
@version $Revision: 1.19 $
@version $Revision: 1.20 $
@brief POSIX-compatible extended memory handling.
xmemory is a small and efficient module offering memory extension
@ -20,10 +20,10 @@
/*----------------------------------------------------------------------------*/
/*
$Id: xmemory.h,v 1.19 2003/08/13 12:48:56 yjung Exp $
$Id: xmemory.h,v 1.20 2003/11/05 15:19:09 yjung Exp $
$Author: yjung $
$Date: 2003/08/13 12:48:56 $
$Revision: 1.19 $
$Date: 2003/11/05 15:19:09 $
$Revision: 1.20 $
*/
#ifndef _XMEMORY_H_

View File

@ -12,8 +12,8 @@
{\fancyplain{}{\bfseries\rightmark}}
\rhead[\fancyplain{}{\bfseries\leftmark}]
{\fancyplain{}{\bfseries\thepage}}
\rfoot[\fancyplain{}{\bfseries\scriptsize Generated at Tue Sep 30 11:31:30 2003 for qfits by Doxygen written by Dimitri van Heesch \copyright~1997-2001}]{}
\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated at Tue Sep 30 11:31:30 2003 for qfits by Doxygen written by Dimitri van Heesch \copyright~1997-2001}}
\rfoot[\fancyplain{}{\bfseries\scriptsize Generated at Wed Nov 5 16:04:35 2003 for qfits by Doxygen written by Dimitri van Heesch \copyright~1997-2001}]{}
\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated at Wed Nov 5 16:04:35 2003 for qfits by Doxygen written by Dimitri van Heesch \copyright~1997-2001}}
\cfoot{}
\newenvironment{CompactList}
{\begin{list}{}{

View File

@ -3,7 +3,7 @@
@file xmemory.c
@author Nicolas Devillard
@date Oct 2000
@version $Revision: 2.16 $
@version $Revision: 2.19 $
@brief POSIX-compatible extended memory handling.
xmemory is a small and efficient module offering memory extension
@ -20,10 +20,10 @@
/*----------------------------------------------------------------------------*/
/*
$Id: xmemory.c,v 2.16 2003/08/13 12:48:56 yjung Exp $
$Id: xmemory.c,v 2.19 2003/11/05 15:19:09 yjung Exp $
$Author: yjung $
$Date: 2003/08/13 12:48:56 $
$Revision: 2.16 $
$Date: 2003/11/05 15:19:09 $
$Revision: 2.19 $
*/
/*-----------------------------------------------------------------------------
@ -46,19 +46,20 @@
-----------------------------------------------------------------------------*/
/**
This symbol sets the debug level for the xmemory module. Debug levels
are defined as follows:
This symbol sets the debug level for the xmemory module. Debug levels are
defined as follows:
0 no debugging.
1 add tracing capabilities for memory leak detection
2 add diagnostics in xmemory_status
3 add debug messages
1 add tracing for memory leaks and diagnostics in xmemory_status
2 add lots of debug messages
*/
#ifndef XMEMORY_DEBUG
#define XMEMORY_DEBUG 0
#endif
/** Initial number of entries in memory table */
/* In order so ensure good performance, this number should be
somewhat higher that the actual number of pointers used */
#ifndef XMEMORY_MAXPTRS
#define XMEMORY_MAXPTRS 8192
#endif
@ -93,12 +94,15 @@
@def xmem_debug
@brief Macro to hide away debug code at compile time
*/
#if (XMEMORY_DEBUG>=3)
#if (XMEMORY_DEBUG>=2)
#define xmem_debug( code ) { code }
#else
#define xmem_debug( code )
#endif
/* A very simple hash */
#define PTR_HASH(ptr) (((unsigned long int) ptr) % XMEMORY_MAXPTRS)
/*-----------------------------------------------------------------------------
Private variables
-----------------------------------------------------------------------------*/
@ -124,8 +128,6 @@ static char xmemory_tmpdirname[TMPDIRNAMESZ] = "." ;
static struct {
/** Number of active cells */
int ncells ;
/** Last known empty cell (if any) */
int freecell ;
/** List of pointers (outside of cells for efficiency reason) */
void * pointer[XMEMORY_MAXPTRS] ;
/** Memory cells */
@ -439,7 +441,7 @@ static int xmemory_addcell(
int swapfd,
char * mm_filename)
{
int pos ;
int pos, ii ;
/* Check there is still some space left */
if (xmemory_table.ncells >= XMEMORY_MAXPTRS) {
@ -448,19 +450,14 @@ static int xmemory_addcell(
exit(-1);
}
/* Find an available slot */
if (xmemory_table.freecell>=0) {
pos = xmemory_table.freecell ;
xmem_debug(
fprintf(stderr, "xmem: freecell cached at pos %d\n", pos);
);
} else {
for (pos=0 ; pos<XMEMORY_MAXPTRS ; pos++) {
pos = PTR_HASH(pointer);
for (ii = 0 ; ii<XMEMORY_MAXPTRS ; ii++) {
if (++pos == XMEMORY_MAXPTRS) pos = 0;
if (xmemory_table.pointer[pos] == NULL) break ;
}
xmem_debug(
fprintf(stderr, "xmem: freecell found at pos %d\n", pos);
);
}
/* Store information */
xmemory_table.pointer[pos] = pointer ;
xmemory_table.cell[pos].size = size ;
@ -491,7 +488,6 @@ static int xmemory_addcell(
xmemory_table.ncells ++ ;
if (xmemory_table.ncells > xmemory_table.max_cells)
xmemory_table.max_cells = xmemory_table.ncells ;
xmemory_table.freecell = -1 ;
return pos ;
}
@ -515,8 +511,6 @@ static int xmemory_remcell(int pos)
xmemory_table.pointer[pos] = NULL ;
/* Decrement number of allocated pointers */
xmemory_table.ncells -- ;
/* Set this position as last known free position */
xmemory_table.freecell = pos ;
return 0 ;
}
@ -972,6 +966,7 @@ void xmemory_free(void * ptr, char * filename, int lineno)
int pos ;
char * swapname ;
int nptrs ;
int ii;
/* Do nothing for a NULL pointer */
if (ptr==NULL) {
@ -988,7 +983,9 @@ void xmemory_free(void * ptr, char * filename, int lineno)
/* Locate pointer in main table */
nptrs = 0 ;
pos = -1 ;
for (i=0 ; i<XMEMORY_MAXPTRS ; i++) {
i = PTR_HASH(ptr);
for (ii=0 ; ii<XMEMORY_MAXPTRS ; ii++) {
if (++i == XMEMORY_MAXPTRS) i = 0;
if (xmemory_table.pointer[i] == NULL) continue ;
nptrs++ ;
if (xmemory_table.pointer[i] == ptr) {
@ -1200,7 +1197,7 @@ void xmemory_status_(char * filename, int lineno)
{
int i ;
#if (XMEMORY_DEBUG>0)
#if (XMEMORY_DEBUG>=1)
fprintf(stderr, "#----- memory diagnostics called from %s (%d) --------\n",
filename,
lineno);

View File

@ -3,16 +3,16 @@
@file sysconf.c
@author Nicolas Devillard
@date February 2001
@version $Revision: 1.29 $
@version $Revision: 1.30 $
@brief configure-like in C.
*/
/*----------------------------------------------------------------------------*/
/*
$Id: sysconf.c,v 1.29 2003/07/17 08:02:08 yjung Exp $
$Id: sysconf.c,v 1.30 2003/10/23 12:47:34 yjung Exp $
$Author: yjung $
$Date: 2003/07/17 08:02:08 $
$Revision: 1.29 $
$Date: 2003/10/23 12:47:34 $
$Revision: 1.30 $
*/
/*---------------------------------------------------------------------------
@ -38,7 +38,7 @@
#define COMPILER_CC 1
#define COMPILER_GCC 2
#define XMEMDEBUG " -DXMEMORY_DEBUG=2"
#define XMEMDEBUG " -DXMEMORY_DEBUG=1"
/* Global variable */