source: SH_SHM/trunk/util/timelist.h @ 92

Revision 16, 3.0 KB checked in by marcus, 15 years ago (diff)

r1 | svn | 2007-12-13 11:10:29 +0100 (Do, 13 Dez 2007) | 2 lines

Initial import

Line 
1
2/* file timelist.h
3 *      ==========
4 *
5 * version 1, 13-Jun-93
6 *
7 * header file of module timelist.c
8 * K. Stammler, 13-Jun-93
9 */
10
11
12/*
13 *
14 *  SeismicHandler, seismic analysis software
15 *  Copyright (C) 1996,  Klaus Stammler, Federal Institute for Geosciences
16 *                                       and Natural Resources (BGR), Germany
17 *
18 *  This program is free software; you can redistribute it and/or modify
19 *  it under the terms of the GNU General Public License as published by
20 *  the Free Software Foundation; either version 2 of the License, or
21 *  (at your option) any later version.
22 *
23 *  This program is distributed in the hope that it will be useful,
24 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
25 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26 *  GNU General Public License for more details.
27 *
28 *  You should have received a copy of the GNU General Public License
29 *  along with this program; if not, write to the Free Software
30 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
31 *
32 */
33
34
35
36#include BC_TCUSRDEF
37
38
39/* error codes */
40#define TLE_OFFSET     5400
41#define TLE_BUG        (TLE_OFFSET+1)     /* bug in program */
42#define TLE_NOTLISTED  (TLE_OFFSET+2)     /* element not listed */
43#define TLE_EMPTYLIST  (TLE_OFFSET+3)     /* empty list */
44
45
46/* types */
47
48#define TLT_TIME TIME
49
50typedef struct _tlt_element {
51        TLT_TIME              time;
52        struct _tlt_element   *next;
53        struct _tlt_element   *prev;
54        void                  *info;
55} TLT_ELEMENT;
56
57
58
59
60/*------------------------------------------------------------------*/
61
62
63TLT_ELEMENT *tl_enlist( char timestr[], void *inf, STATUS *status );
64
65/* enlists element at time t with info inf
66 *
67 * parameters of routine
68 * char       timestr[];     input; time of element
69 * void       *inf;          input; pointer to info
70 * STATUS     *status;       output; return status
71 *                           returns pointer to new element
72 */
73
74
75/*------------------------------------------------------------------*/
76
77
78void tl_delist( TLT_ELEMENT *e, STATUS *status );
79
80/* removes e from list.  Allocated memory is freed, i.e. "e" can't be
81 * accessed any more after this call.
82 *
83 * parameters of routine
84 * TLT_ELEMENT   *e;     modify; element to be removed from list
85 */
86
87
88/*------------------------------------------------------------------*/
89
90
91void tl_find_element( char timestr[], TLT_ELEMENT *e, float *tdiff,
92        STATUS *status );
93
94/* returns element next to given time and time difference if tdiff
95 * is not NULL
96 *
97 * parameters of routine
98 * char          timestr[]; input; time to be searched
99 * TLT_ELEMENT   *e;        output; element found or NULL
100 * float         *tdiff;    output; time difference to given time
101 * STATUS        *status;   output; return status
102 */
103
104
105/*------------------------------------------------------------------*/
106
107
108TLT_ELEMENT *tl_get_root( void );
109
110/* returns root pointer
111 *
112 * no parameters
113 */
114
115
116/*------------------------------------------------------------------*/
Note: See TracBrowser for help on using the repository browser.