266 #include <lal/LALStdlib.h>
267 #include <lal/AVFactories.h>
268 #include <lal/SeqFactories.h>
269 #include <lal/Units.h>
270 #include <lal/StringInput.h>
271 #include <lal/StreamInput.h>
274 #define LALREADSERIESC_HEADER "Skipping badly-formatted line for metadata field "
279 typedef union tagBuffer {
289 typedef struct tagBufferList {
291 struct tagBufferList *next;
295 #define FREEBUFFERLIST( headPtr ) \
297 BufferList *herePtr = headPtr; \
298 while ( herePtr ) { \
299 BufferList *nextPtr = herePtr->next; \
300 LALFree( herePtr ); \
318 while ( ( c = *literal ) !=
'"' && c !=
'\n' && c !=
'\0' )
320 if ( *literal !=
'"' ) {
327 while ( n < length - 1 ) {
330 if ( ( c = *(literal++) ) ==
'\0' || c ==
'\n' ) {
334 }
else if ( c ==
'"' ) {
340 else if ( c ==
'\\' ) {
344 if ( ( c = *(literal++) ) ==
'\0' || c ==
'\n' ) {
351 else if ( c ==
'a' || c ==
'A' )
353 else if ( c ==
'b' || c ==
'B' )
355 else if ( c ==
'f' || c ==
'F' )
357 else if ( c ==
'n' || c ==
'N' )
359 else if ( c ==
'r' || c ==
'R' )
361 else if ( c ==
't' || c ==
'T' )
363 else if ( c ==
'v' || c ==
'V' )
367 else if ( c ==
'x' || c ==
'X' ) {
369 if ( isxdigit( c ) ) {
374 value = 10 + tolower( c ) -
'a';
376 if ( isxdigit( c ) ) {
381 value += 10 + tolower( c ) -
'a';
384 string[n++] = (
CHAR)( value );
386 LALWarning( stat,
"Found explicit end-of-string \\0" );
390 LALWarning( stat,
"Treating empty hex cde as explicit"
391 " end-of-string \\0" );
398 else if ( c >=
'0' && c <
'8' ) {
399 UINT2 value = c -
'0';
401 if ( c >=
'0' && c <
'8' ) {
405 if ( c >=
'0' && c <
'8' ) {
413 LALWarning( stat,
"Ignoring octal character code >= '\\400'" );
415 string[n++] = (
CHAR)( value );
417 LALWarning( stat,
"Found explicit end-of-string \\0" );
424 if ( c !=
'\\' && c !=
'?' && c !=
'\'' && c !=
'"' )
425 LALWarning( stat,
"Dropping \\ from unrecognized escape"
436 if ( *literal !=
'"' )
437 LALWarning( stat,
"Reached maximum length before reading close"
445 #define fscanf __extension__ fscanf
449 #define DATACODE TYPECODE
454 #include "StreamSeriesInput_source.c"
463 #define DATACODE TYPECODE
468 #include "StreamSeriesInput_source.c"
477 #define DATACODE TYPECODE
482 #include "StreamSeriesInput_source.c"
491 #define DATACODE TYPECODE
496 #include "StreamSeriesInput_source.c"
505 #define DATACODE TYPECODE
510 #include "StreamSeriesInput_source.c"
519 #define DATACODE TYPECODE
524 #include "StreamSeriesInput_source.c"
533 #define DATACODE TYPECODE
538 #include "StreamSeriesInput_source.c"
547 #define DATACODE TYPECODE
552 #include "StreamSeriesInput_source.c"
562 #define TYPE COMPLEX16
566 #include "StreamSeriesInput_source.c"
576 #define TYPE COMPLEX8
580 #include "StreamSeriesInput_source.c"
#define LALWarning(statusptr, warning)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
uint64_t UINT8
Eight-byte unsigned integer; on some platforms this is equivalent to unsigned long int instead.
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.
int32_t INT4
Four-byte signed integer.
float REAL4
Single precision real floating-point number (4 bytes).
LAL status structure, see The LALStatus structure for more details.