LAL  7.5.0.1-08ee4f4
LALDict.c
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2016 Jolien Creighton
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19 
20 /*
21  * Dictionary is implemented as a hash search with algorithm adopted
22  * from "The C Programming Language" by Kernighan and Ritchie, 2nd ed.
23  * section 6.6.
24  */
25 
26 #include <stdio.h>
27 #include <stdlib.h>
28 #include <string.h>
29 #include <unistd.h>
30 
31 #include <lal/LALStdio.h>
32 #include <lal/LALStdlib.h>
33 #include <lal/LALString.h>
34 #include <lal/LALDict.h>
35 #include "LALValue_private.h"
36 #include "config.h"
37 
38 #define LAL_DICT_HASHSIZE 101
39 
42  char *key;
43  LALValue value;
44 };
45 
46 struct tagLALDict {
47  size_t size;
49 };
50 
51 static size_t hash(const char *s)
52 {
53  size_t hashval;
54  for (hashval = 0; *s != '\0'; ++s)
55  hashval = *s + 31 * hashval;
56  return hashval;
57 }
58 
59 /* DICT ENTRY ROUTINES */
60 
61 void XLALDictEntryFree(LALDictEntry *list)
62 {
63  while (list) {
64  LALDictEntry *next = list->next;
65  if (list->key)
66  LALFree(list->key);
67  LALFree(list);
68  list = next;
69  }
70  return;
71 }
72 
73 LALDictEntry * XLALDictEntryAlloc(size_t size)
74 {
75  LALDictEntry *entry;
76  entry = XLALMalloc(sizeof(*entry) + size);
77  if (!entry)
79  entry->key = NULL;
80  entry->value.size = size;
81  return entry;
82 }
83 
84 LALDictEntry * XLALDictEntryRealloc(LALDictEntry *entry, size_t size)
85 {
86  if (entry == NULL)
87  return XLALDictEntryAlloc(size);
88  if (entry->value.size == size)
89  return entry;
90  entry = XLALRealloc(entry, sizeof(*entry) + size);
91  if (!entry)
93  entry->value.size = size;
94  return entry;
95 }
96 
97 LALDictEntry * XLALDictEntrySetKey(LALDictEntry *entry, const char *key)
98 {
99  if (entry->key)
100  LALFree(entry->key);
101  if ((entry->key = XLALStringDuplicate(key)) == NULL)
103  return entry;
104 }
105 
106 LALDictEntry * XLALDictEntrySetValue(LALDictEntry *entry, const void *data, size_t size, LALTYPECODE type)
107 {
108  if (XLALValueSet(&entry->value, data, size, type) == NULL)
110  return entry;
111 }
112 
113 /* warning: shallow pointer */
114 const char * XLALDictEntryGetKey(const LALDictEntry *entry)
115 {
116  return entry->key;
117 }
118 
119 /* warning: shallow pointer */
120 const LALValue * XLALDictEntryGetValue(const LALDictEntry *entry)
121 {
122  return &entry->value;
123 }
124 
125 /* DICT ROUTINES */
126 
127 void XLALDestroyDict(LALDict *dict)
128 {
129  if (dict) {
130  size_t i;
131  for (i = 0; i < dict->size; ++i)
132  XLALDictEntryFree(dict->hashes[i]);
133  LALFree(dict);
134  }
135  return;
136 }
137 
138 LALDict * XLALCreateDict(void)
139 {
140  LALDict *dict;
141  dict = XLALCalloc(1, sizeof(dict) + LAL_DICT_HASHSIZE * sizeof(*dict->hashes));
142  if (!dict)
144  dict->size = LAL_DICT_HASHSIZE;
145  return dict;
146 }
147 
148 void XLALDictForeach(LALDict *dict, void (*func)(char *, LALValue *, void *), void *thunk)
149 {
150  size_t i;
151  for (i = 0; i < dict->size; ++i) {
152  LALDictEntry *entry;
153  for (entry = dict->hashes[i]; entry != NULL; entry = entry->next)
154  func(entry->key, &entry->value, thunk);
155  }
156  return;
157 }
158 
159 LALDictEntry * XLALDictFind(LALDict *dict, int (*func)(const char *, const LALValue *, void *), void *thunk)
160 {
161  size_t i;
162  for (i = 0; i < dict->size; ++i) {
163  LALDictEntry *entry;
164  for (entry = dict->hashes[i]; entry != NULL; entry = entry->next)
165  if (func(entry->key, &entry->value, thunk))
166  return entry;
167  }
168  return NULL;
169 }
170 
171 void XLALDictIterInit(LALDictIter *iter, LALDict *dict)
172 {
173  iter->dict = dict;
174  iter->pos = 0;
175  iter->next = NULL;
176  return;
177 }
178 
179 LALDictEntry * XLALDictIterNext(LALDictIter *iter)
180 {
181  while (1) {
182 
183  if (iter->next) {
184  LALDictEntry *entry = iter->next;
185  iter->next = entry->next;
186  return entry;
187  }
188 
189  /* check end of iteration */
190  if (iter->pos >= iter->dict->size)
191  return NULL;
192 
193  iter->next = iter->dict->hashes[iter->pos++];
194  }
195  return NULL;
196 }
197 
198 LALDict * XLALDictDuplicate(LALDict *old)
199 {
200  UINT4 i;
201  int retcode;
202  if(old==NULL) return NULL;
203  LALDict *new = XLALCreateDict();
204  if (!new)
206  for (i = 0; i < old->size; ++i) {
207  const LALDictEntry *entry;
208  for (entry = old->hashes[i]; entry != NULL; entry = entry->next) {
209  const char *key = XLALDictEntryGetKey(entry);
210  XLAL_TRY(XLALDictInsertValue(new, key, XLALDictEntryGetValue(entry)), retcode);
211  if(retcode!=XLAL_SUCCESS)
212  {
213  XLALDestroyDict(new);
214  XLAL_ERROR_NULL(retcode & XLAL_EFUNC);
215  }
216  }
217  }
218  return(new);
219 }
220 
221 LALList * XLALDictKeys(const LALDict *dict)
222 {
223  LALList *list;
224  size_t i;
225  list = XLALCreateList();
226  if (!list)
228  for (i = 0; i < dict->size; ++i) {
229  const LALDictEntry *entry;
230  for (entry = dict->hashes[i]; entry != NULL; entry = entry->next) {
231  const char *key = XLALDictEntryGetKey(entry);
232  if (XLALListAddStringValue(list, key) < 0) {
233  XLALDestroyList(list);
235  }
236  }
237  }
238  return list;
239 }
240 
241 LALList * XLALDictValues(const LALDict *dict)
242 {
243  LALList *list;
244  size_t i;
245  list = XLALCreateList();
246  if (!list)
248  for (i = 0; i < dict->size; ++i) {
249  const LALDictEntry *entry;
250  for (entry = dict->hashes[i]; entry != NULL; entry = entry->next) {
251  const LALValue *value = XLALDictEntryGetValue(entry);
252  if (XLALListAddValue(list, value) < 0) {
253  XLALDestroyList(list);
255  }
256  }
257  }
258  return list;
259 }
260 
261 int XLALDictContains(const LALDict *dict, const char *key)
262 {
263  const LALDictEntry *entry;
264  for (entry = dict->hashes[hash(key) % dict->size]; entry != NULL; entry = entry->next)
265  if (strcmp(key, entry->key) == 0)
266  return 1;
267  return 0;
268 }
269 
270 size_t XLALDictSize(const LALDict *dict)
271 {
272  size_t size = 0;
273  size_t i;
274  for (i = 0; i < dict->size; ++i) {
275  const LALDictEntry *entry;
276  for (entry = dict->hashes[i]; entry != NULL; entry = entry->next)
277  ++size;
278  }
279  return size;
280 }
281 
282 LALDictEntry *XLALDictLookup(LALDict *dict, const char *key)
283 {
284  LALDictEntry *entry;
285  for (entry = dict->hashes[hash(key) % dict->size]; entry != NULL; entry = entry->next)
286  if (strcmp(key, entry->key) == 0)
287  return entry;
288  return NULL;
289 }
290 
291 int XLALDictRemove(LALDict *dict, const char *key)
292 {
293  size_t hashidx = hash(key) % dict->size;
294  LALDictEntry *this = dict->hashes[hashidx];
295  LALDictEntry *prev = this;
296  while (this) {
297  if (strcmp(this->key, key) == 0) { /* found it! */
298  if (prev == this) /* head is removed */
299  dict->hashes[hashidx] = this->next;
300  else
301  prev->next = this->next;
302  if (this->key)
303  LALFree(this->key);
304  LALFree(this);
305  return 0;
306  }
307  prev = this;
308  this = this->next;
309  }
310  return -1; /* not found */
311 }
312 
313 int XLALDictInsert(LALDict *dict, const char *key, const void *data, size_t size, LALTYPECODE type)
314 {
315  size_t hashidx = hash(key) % dict->size;
316  LALDictEntry *this = dict->hashes[hashidx];
317  LALDictEntry *prev = NULL;
318  LALDictEntry *entry;
319 
320  /* see if entry already exists */
321  while (this) {
322  if (strcmp(this->key, key) == 0) { /* found it! */
323  entry = XLALDictEntryRealloc(this, size);
324  if (entry == NULL)
326  if (entry != this) { /* relink */
327  if (prev == NULL) /* head is moved */
328  dict->hashes[hashidx] = entry;
329  else
330  prev->next = entry;
331  }
332  entry = XLALDictEntrySetValue(entry, data, size, type);
333 
334  if (entry == NULL)
336 
337  return 0;
338  }
339  prev = this;
340  this = this->next;
341  }
342 
343  /* not found: create new entry */
344  entry = XLALDictEntryAlloc(size);
345  if (entry == NULL)
347 
348  entry = XLALDictEntrySetKey(entry, key);
349  if (entry == NULL) {
350  LALFree(entry);
352  }
353 
354  entry = XLALDictEntrySetValue(entry, data, size, type);
355  if (entry == NULL) {
356  LALFree(entry);
358  }
359 
360  entry->next = dict->hashes[hashidx];
361  dict->hashes[hashidx] = entry;
362  return 0;
363 }
364 
365 int XLALDictInsertValue(LALDict *dict, const char *key, const LALValue *value)
366 {
368  size_t size = XLALValueGetSize(value);
369  const void * data = XLALValueGetDataPtr(value);
370  return XLALDictInsert(dict, key, data, size, type);
371 }
372 
373 int XLALDictInsertBLOBValue(LALDict *dict, const char *key, const void *blob, size_t size)
374 {
375  if (XLALDictInsert(dict, key, blob, size, LAL_UCHAR_TYPE_CODE) < 0)
377  return 0;
378 }
379 
380 int XLALDictInsertStringValue(LALDict *dict, const char *key, const char *string)
381 {
382  size_t size = strlen(string) + 1;
383  if (XLALDictInsert(dict, key, string, size, LAL_CHAR_TYPE_CODE) < 0)
385  return 0;
386 }
387 
388 #define DEFINE_INSERT_FUNC(TYPE, TCODE) \
389  int XLALDictInsert ## TYPE ## Value(LALDict *dict, const char *key, TYPE value) \
390  { \
391  if (XLALDictInsert(dict, key, &value, sizeof(value), TCODE) < 0) \
392  XLAL_ERROR(XLAL_EFUNC); \
393  return 0; \
394  }
395 
408 
409 #undef DEFINE_INSERT_FUNC
410 
411 void * XLALDictLookupBLOBValue(LALDict *dict, const char *key)
412 {
413  LALDictEntry *entry = XLALDictLookup(dict, key);
414  const LALValue *value;
415  if (entry == NULL)
416  XLAL_ERROR_NULL(XLAL_ENAME, "Key `%s' not found", key);
417  value = XLALDictEntryGetValue(entry);
418  if (value == NULL)
420 /* FIXME TODO */
421  return XLALValueGetBLOB(value);
422 }
423 
424 /* warning: shallow pointer */
425 const char * XLALDictLookupStringValue(LALDict *dict, const char *key)
426 {
427  LALDictEntry *entry = XLALDictLookup(dict, key);
428  const LALValue *value;
429  if (entry == NULL)
430  XLAL_ERROR_NULL(XLAL_ENAME, "Key `%s' not found", key);
431  value = XLALDictEntryGetValue(entry);
432  if (value == NULL)
434  return XLALValueGetString(value);
435 }
436 
437 #define DEFINE_LOOKUP_FUNC(TYPE, FAILVAL) \
438  TYPE XLALDictLookup ## TYPE ## Value(LALDict *dict, const char *key) \
439  { \
440  LALDictEntry *entry; \
441  const LALValue *value; \
442  entry = XLALDictLookup(dict, key); \
443  if (entry == NULL) \
444  XLAL_ERROR_VAL(FAILVAL, XLAL_ENAME, "Key `%s' not found", key); \
445  value = XLALDictEntryGetValue(entry); \
446  if (value == NULL) \
447  XLAL_ERROR_VAL(FAILVAL, XLAL_EFUNC); \
448  return XLALValueGet ## TYPE (value); \
449  }
450 
463 
464 REAL8 XLALDictLookupValueAsREAL8(LALDict *dict, const char *key)
465 {
466  LALDictEntry *entry;
467  const LALValue *value;
468  entry = XLALDictLookup(dict, key);
469  if (entry == NULL)
470  XLAL_ERROR_REAL8(XLAL_ENAME, "Key `%s' not found", key);
471  value = XLALDictEntryGetValue(entry);
472  if (value == NULL)
474  return XLALValueGetAsREAL8(value);
475 }
476 
478 
479 static void XLALDictAsStringAppendValueFunc(char *key, LALValue *value, void *thunk)
480 {
482  if (p->first)
483  p->first = 0;
484  else
485  p->s = XLALStringAppend(p->s, ", ");
486  p->s = XLALStringAppendFmt(p->s, "\"%s\": ", key);
487  p->s = XLALValueAsStringAppend(p->s, value);
488  return;
489 }
490 
491 char * XLALDictAsStringAppend(char *s, LALDict *list)
492 {
494  p.s = XLALStringAppend(p.s, "{");
496  p.s = XLALStringAppend(p.s, "}");
497  return p.s;
498 }
499 
500 void XLALDictPrint(LALDict *dict, int fd)
501 {
502  char *s = NULL;
503  s = XLALDictAsStringAppend(s, dict);
505 #if HAVE_DPRINTF
506  dprintf(fd, "%s", s);
507 #else
508  /* hack... */
509  switch (fd) {
510  case 1:
511  fprintf(stdout, "%s", s);
512  break;
513  case 2:
514  fprintf(stderr, "%s", s);
515  break;
516  default:
517  LALFree(s);
518  XLAL_ERROR_VOID(XLAL_EIO, "Don't know what to do with file descriptor %d", fd);
519  }
520 #endif
521  LALFree(s);
522  return;
523 }
int XLALDictContains(const LALDict *dict, const char *key)
Definition: LALDict.c:261
LALList * XLALDictKeys(const LALDict *dict)
Definition: LALDict.c:221
const char * XLALDictLookupStringValue(LALDict *dict, const char *key)
Definition: LALDict.c:425
LALDictEntry * XLALDictEntrySetValue(LALDictEntry *entry, const void *data, size_t size, LALTYPECODE type)
Definition: LALDict.c:106
static void XLALDictAsStringAppendValueFunc(char *key, LALValue *value, void *thunk)
Definition: LALDict.c:479
const char * XLALDictEntryGetKey(const LALDictEntry *entry)
Definition: LALDict.c:114
LALDictEntry * XLALDictEntrySetKey(LALDictEntry *entry, const char *key)
Definition: LALDict.c:97
int XLALDictInsert(LALDict *dict, const char *key, const void *data, size_t size, LALTYPECODE type)
Definition: LALDict.c:313
#define DEFINE_INSERT_FUNC(TYPE, TCODE)
Definition: LALDict.c:388
void XLALDictEntryFree(LALDictEntry *list)
Definition: LALDict.c:61
int XLALDictRemove(LALDict *dict, const char *key)
Definition: LALDict.c:291
LALDictEntry * XLALDictIterNext(LALDictIter *iter)
Definition: LALDict.c:179
#define DEFINE_LOOKUP_FUNC(TYPE, FAILVAL)
Definition: LALDict.c:437
void XLALDestroyDict(LALDict *dict)
Definition: LALDict.c:127
LALDictEntry * XLALDictEntryAlloc(size_t size)
Definition: LALDict.c:73
LALDictEntry * XLALDictEntryRealloc(LALDictEntry *entry, size_t size)
Definition: LALDict.c:84
int XLALDictInsertBLOBValue(LALDict *dict, const char *key, const void *blob, size_t size)
Definition: LALDict.c:373
LALDictEntry * XLALDictLookup(LALDict *dict, const char *key)
Definition: LALDict.c:282
LALDictEntry * XLALDictFind(LALDict *dict, int(*func)(const char *, const LALValue *, void *), void *thunk)
Definition: LALDict.c:159
void * XLALDictLookupBLOBValue(LALDict *dict, const char *key)
Definition: LALDict.c:411
size_t XLALDictSize(const LALDict *dict)
Definition: LALDict.c:270
void XLALDictIterInit(LALDictIter *iter, LALDict *dict)
Definition: LALDict.c:171
char * XLALDictAsStringAppend(char *s, LALDict *list)
Definition: LALDict.c:491
LALDict * XLALDictDuplicate(LALDict *old)
Definition: LALDict.c:198
const LALValue * XLALDictEntryGetValue(const LALDictEntry *entry)
Definition: LALDict.c:120
REAL8 XLALDictLookupValueAsREAL8(LALDict *dict, const char *key)
Definition: LALDict.c:464
#define LAL_DICT_HASHSIZE
Definition: LALDict.c:38
int XLALDictInsertValue(LALDict *dict, const char *key, const LALValue *value)
Definition: LALDict.c:365
static size_t hash(const char *s)
Definition: LALDict.c:51
void XLALDictPrint(LALDict *dict, int fd)
Definition: LALDict.c:500
int XLALDictInsertStringValue(LALDict *dict, const char *key, const char *string)
Definition: LALDict.c:380
LALList * XLALDictValues(const LALDict *dict)
Definition: LALDict.c:241
LALDict * XLALCreateDict(void)
Definition: LALDict.c:138
void XLALDictForeach(LALDict *dict, void(*func)(char *, LALValue *, void *), void *thunk)
Definition: LALDict.c:148
int XLALListAddValue(LALList *list, const LALValue *value)
Definition: LALList.c:509
int XLALListAddStringValue(LALList *list, const char *string)
Definition: LALList.c:522
void XLALDestroyList(LALList *list)
Definition: LALList.c:155
LALList * XLALCreateList(void)
Definition: LALList.c:169
#define LALFree(p)
Definition: LALMalloc.h:96
char * XLALStringAppendFmt(char *s, const char *fmt,...)
Append the formatted string 'fmt' to the string 's', which is reallocated with XLALRealloc() to the r...
Definition: LALString.c:69
REAL8 XLALValueGetAsREAL8(const LALValue *value)
Definition: LALValue.c:256
char * XLALValueAsStringAppend(char *s, const LALValue *value)
Definition: LALValue.c:313
void * XLALValueGetBLOB(const LALValue *value)
Definition: LALValue.c:210
size_t XLALValueGetSize(const LALValue *value)
Definition: LALValue.c:185
const void * XLALValueGetDataPtr(const LALValue *value)
Definition: LALValue.c:191
const char * XLALValueGetString(const LALValue *value)
Definition: LALValue.c:223
LALTYPECODE XLALValueGetType(const LALValue *value)
Definition: LALValue.c:180
LALValue * XLALValueSet(LALValue *value, const void *data, size_t size, LALTYPECODE type)
Definition: LALValue.c:68
#define fprintf
LALTYPECODE
Type codes: use these type codes to identify a LAL atomic data type, see Headers LAL(Atomic)Datatypes...
Definition: LALDatatypes.h:49
unsigned char UCHAR
One-byte unsigned integer, see Headers LAL(Atomic)Datatypes.h for more details.
uint64_t UINT8
Eight-byte unsigned integer; on some platforms this is equivalent to unsigned long int instead.
double complex COMPLEX16
Double-precision floating-point complex number (16 bytes total)
double REAL8
Double precision real floating-point number (8 bytes).
int16_t INT2
Two-byte signed integer.
int64_t INT8
Eight-byte signed integer; on some platforms this is equivalent to long int instead.
uint16_t UINT2
Two-byte unsigned integer.
char CHAR
One-byte signed integer, see Headers LAL(Atomic)Datatypes.h for more details.
uint32_t UINT4
Four-byte unsigned integer.
float complex COMPLEX8
Single-precision floating-point complex number (8 bytes total)
int32_t INT4
Four-byte signed integer.
float REAL4
Single precision real floating-point number (4 bytes).
@ LAL_C_TYPE_CODE
COMPLEX8 type code (27)
Definition: LALDatatypes.h:60
@ LAL_CHAR_TYPE_CODE
CHAR type code (0)
Definition: LALDatatypes.h:50
@ LAL_U2_TYPE_CODE
UINT2 type code (33)
Definition: LALDatatypes.h:55
@ LAL_Z_TYPE_CODE
COMPLEX16 type code (28)
Definition: LALDatatypes.h:61
@ LAL_S_TYPE_CODE
REAL4 type code (18)
Definition: LALDatatypes.h:58
@ LAL_I2_TYPE_CODE
INT2 type code (1)
Definition: LALDatatypes.h:51
@ LAL_I8_TYPE_CODE
INT8 type code (3)
Definition: LALDatatypes.h:53
@ LAL_D_TYPE_CODE
REAL8 type code (19)
Definition: LALDatatypes.h:59
@ LAL_I4_TYPE_CODE
INT4 type code (2)
Definition: LALDatatypes.h:52
@ LAL_UCHAR_TYPE_CODE
UCHAR type code (32)
Definition: LALDatatypes.h:54
@ LAL_U8_TYPE_CODE
UINT8 type code (35)
Definition: LALDatatypes.h:57
@ LAL_U4_TYPE_CODE
UINT4 type code (34)
Definition: LALDatatypes.h:56
#define XLALMalloc(n)
Definition: LALMalloc.h:44
#define XLALCalloc(m, n)
Definition: LALMalloc.h:45
#define XLALRealloc(p, n)
Definition: LALMalloc.h:46
char * XLALStringDuplicate(const char *s)
Like strdup but uses LAL allocation routines (free with LALFree).
Definition: LALString.c:89
char * XLALStringAppend(char *s, const char *append)
Like strcat but dynamically reallocates string with LALRealloc.
Definition: LALString.c:50
#define XLAL_ERROR_VOID(...)
Macro to invoke a failure from a XLAL routine returning void.
Definition: XLALError.h:726
#define XLAL_ERROR_REAL8(...)
Macro to invoke a failure from a XLAL routine returning a REAL8.
Definition: XLALError.h:752
#define XLAL_ERROR_NULL(...)
Macro to invoke a failure from a XLAL routine returning a pointer.
Definition: XLALError.h:713
#define XLAL_ERROR(...)
Macro to invoke a failure from a XLAL routine returning an integer.
Definition: XLALError.h:700
#define XLAL_CHECK_VOID(assertion,...)
Macro to test an assertion and invoke a failure if it is not true in a function that returns void.
Definition: XLALError.h:840
#define XLAL_REAL4_FAIL_NAN
Floating-point value of the XLAL REAL4 failure NaN.
Definition: XLALError.h:388
#define XLAL_REAL8_FAIL_NAN
Floating-point value of the XLAL REAL8 failure NaN.
Definition: XLALError.h:389
#define XLAL_TRY(statement, errnum)
A macro to (i) disable the XLAL error handling and preserve the current value of xlalErrno (ii) perfo...
Definition: XLALError.h:582
@ XLAL_ENOMEM
Memory allocation error.
Definition: XLALError.h:407
@ XLAL_SUCCESS
Success return value (not an error number)
Definition: XLALError.h:401
@ XLAL_ENAME
Wrong name.
Definition: XLALError.h:426
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
Definition: XLALError.h:462
@ XLAL_EIO
I/O error.
Definition: XLALError.h:406
@ XLAL_FAILURE
Failure return value (not an error number)
Definition: XLALError.h:402
Definition: LALDict.c:40
struct tagLALDictEntry * next
Definition: LALDict.c:41
char * key
Definition: LALDict.c:42
LALValue value
Definition: LALDict.c:43
struct tagLALDictEntry * hashes[]
Definition: LALDict.c:48
size_t size
Definition: LALDict.c:47