C Standard Library Extensions
6.2.0
Main Page
Modules
Classes
Files
File List
src
qfits_header.h
1
/* $Id: qfits_header.h,v 1.1.1.1 2008-11-03 13:40:49 agabasch Exp $
2
*
3
* This file is part of the ESO QFITS Library
4
* Copyright (C) 2001-2004 European Southern Observatory
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*/
20
21
/*
22
* $Author: agabasch $
23
* $Date: 2008-11-03 13:40:49 $
24
* $Revision: 1.1.1.1 $
25
* $Name: not supported by cvs2svn $
26
*/
27
28
#ifndef QFITS_HEADER_H
29
#define QFITS_HEADER_H
30
31
/*-----------------------------------------------------------------------------
32
Includes
33
-----------------------------------------------------------------------------*/
34
35
#include <stdio.h>
36
#include <stdlib.h>
37
#include <string.h>
38
#include <unistd.h>
39
40
/*-----------------------------------------------------------------------------
41
New types
42
-----------------------------------------------------------------------------*/
43
44
/*----------------------------------------------------------------------------*/
53
/*----------------------------------------------------------------------------*/
54
typedef
struct
qfits_header
{
55
void
* first ;
/* Pointer to list start */
56
void
* last ;
/* Pointer to list end */
57
int
n ;
/* Number of cards in list */
58
/* For efficient looping internally */
59
void
* current ;
60
int
current_idx ;
61
}
qfits_header
;
62
63
/*-----------------------------------------------------------------------------
64
Function ANSI prototypes
65
-----------------------------------------------------------------------------*/
66
67
qfits_header
*
qfits_header_new
(
void
) ;
68
qfits_header
*
qfits_header_default
(
void
) ;
69
void
qfits_header_add
(
qfits_header
*,
const
char
*,
const
char
*,
const
char
*,
70
const
char
*) ;
71
void
qfits_header_add_after
(
qfits_header
*,
const
char
*,
const
char
*,
72
const
char
*,
const
char
*,
const
char
*) ;
73
void
qfits_header_append
(
qfits_header
*,
const
char
*,
const
char
*,
74
const
char
*,
const
char
*) ;
75
void
qfits_header_del
(
qfits_header
*,
const
char
*) ;
76
int
qfits_header_sort
(
qfits_header
**) ;
77
qfits_header
*
qfits_header_copy
(
const
qfits_header
*) ;
78
void
qfits_header_mod
(
qfits_header
*,
const
char
*,
const
char
*,
const
char
*);
79
void
qfits_header_destroy
(
qfits_header
*) ;
80
char
*
qfits_header_getstr
(
const
qfits_header
*,
const
char
*) ;
81
int
qfits_header_getitem
(
const
qfits_header
*,
int
,
char
*,
char
*,
char
*,
82
char
*) ;
83
char
*
qfits_header_getcom
(
const
qfits_header
*,
const
char
*) ;
84
int
qfits_header_getint
(
const
qfits_header
*,
const
char
*,
int
) ;
85
double
qfits_header_getdouble
(
const
qfits_header
*,
const
char
*,
double
) ;
86
int
qfits_header_getboolean
(
const
qfits_header
*,
const
char
*,
int
) ;
87
int
qfits_header_dump
(
const
qfits_header
*, FILE *) ;
88
89
#endif
qfits_header_getboolean
int qfits_header_getboolean(const qfits_header *, const char *, int)
Return the value associated to a key, as a boolean (int).
Definition:
qfits_header.c:792
qfits_header_default
qfits_header * qfits_header_default(void)
FITS header default constructor.
Definition:
qfits_header.c:205
qfits_header_getint
int qfits_header_getint(const qfits_header *, const char *, int)
Return the value associated to a key, as an int.
Definition:
qfits_header.c:727
qfits_header_new
qfits_header * qfits_header_new(void)
FITS header constructor.
Definition:
qfits_header.c:180
qfits_header_getdouble
double qfits_header_getdouble(const qfits_header *, const char *, double)
Return the value associated to a key, as a double.
Definition:
qfits_header.c:756
qfits_header_sort
int qfits_header_sort(qfits_header **)
Sort a FITS header.
Definition:
qfits_header.c:451
qfits_header_append
void qfits_header_append(qfits_header *, const char *, const char *, const char *, const char *)
Append a new card to a FITS header.
Definition:
qfits_header.c:334
qfits_header_add_after
void qfits_header_add_after(qfits_header *, const char *, const char *, const char *, const char *, const char *)
add a new card to a FITS header
Definition:
qfits_header.c:288
qfits_header_mod
void qfits_header_mod(qfits_header *, const char *, const char *, const char *)
Modifies a FITS card.
Definition:
qfits_header.c:410
qfits_header_dump
int qfits_header_dump(const qfits_header *, FILE *)
Dump a FITS header to an opened file.
Definition:
qfits_header.c:825
qfits_header
FITS header object.
Definition:
qfits_header.h:54
qfits_header_getstr
char * qfits_header_getstr(const qfits_header *, const char *)
Return the value associated to a key, as a string.
Definition:
qfits_header.c:579
qfits_header_destroy
void qfits_header_destroy(qfits_header *)
qfits_header destructor
Definition:
qfits_header.c:548
qfits_header_getitem
int qfits_header_getitem(const qfits_header *, int, char *, char *, char *, char *)
Return the i-th key/val/com/line tuple in a header.
Definition:
qfits_header.c:633
qfits_header_add
void qfits_header_add(qfits_header *, const char *, const char *, const char *, const char *)
Add a new card to a FITS header.
Definition:
qfits_header.c:230
qfits_header_copy
qfits_header * qfits_header_copy(const qfits_header *)
Copy a FITS header.
Definition:
qfits_header.c:523
qfits_header_del
void qfits_header_del(qfits_header *, const char *)
Delete a card in a FITS header.
Definition:
qfits_header.c:371
qfits_header_getcom
char * qfits_header_getcom(const qfits_header *, const char *)
Return the comment associated to a key, as a string.
Definition:
qfits_header.c:697
Generated by
1.8.6