5 #include <lal/LALStdlib.h>
6 #include <lal/AVFactories.h>
7 #include <lal/StringInput.h>
8 #include <lal/StreamInput.h>
13 typedef union tagBuffer {
26 typedef struct tagBufferList {
29 struct tagBufferList *
next;
33 #define FREEBUFFERLIST( headPtr ) \
35 BufferList *herePtr = headPtr; \
37 BufferList *nextPtr = herePtr->next; \
65 while ( !feof( stream ) ) {
68 while ( !feof( stream ) && n )
70 *(data++) = (
CHAR)getc( stream );
75 if ( feof( stream ) ) {
81 if ( !feof( stream ) ) {
83 if ( !(here->
next) ) {
100 data = (*sequence)->data;
102 memcpy( data, here->
buf.
CH, here->
size );
106 (*sequence)->data[nTot] =
'\0';
125 if ( !stream || !sequence ) {
129 if ( *sequence != NULL ) {
135 gzFile gzstream = gzdopen(dup(fileno(stream)),
"rb");
144 while ( !gzeof( gzstream ) ) {
147 while ( !gzeof( gzstream ) && n )
149 int thisChar = gzgetc( gzstream );
150 if ( thisChar == -1 ) {
153 *(data++) = thisChar;
158 if ( !gzeof( gzstream ) ) {
160 if ( !(here->
next) ) {
182 data = (*sequence)->data;
184 memcpy( data, here->
buf.
CH, here->
size );
188 (*sequence)->data[nTot] =
'\0';
199 #define fscanf __extension__ fscanf
205 #include "StreamSequenceInput_source.c"
213 #include "StreamSequenceInput_source.c"
221 #include "StreamSequenceInput_source.c"
229 #include "StreamSequenceInput_source.c"
237 #include "StreamSequenceInput_source.c"
245 #include "StreamSequenceInput_source.c"
253 #include "StreamSequenceInput_source.c"
261 #include "StreamSequenceInput_source.c"
267 #define TYPE COMPLEX16
270 #define FORMAT LAL_REAL8_FORMAT
271 #include "StreamSequenceInputComplex_source.c"
279 #define TYPE COMPLEX8
282 #define FORMAT LAL_REAL4_FORMAT
283 #include "StreamSequenceInputComplex_source.c"
#define ABORT(statusptr, code, mesg)
#define ENDFAIL(statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
#define BEGINFAIL(statusptr)
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).
void LALCHARCreateVector(LALStatus *, CHARVector **, UINT4)
CHARVector * XLALCreateCHARVector(UINT4 length)
struct tagBufferList * next
Vector of type CHAR, see DATATYPE-Vector types for more details.
LAL status structure, see The LALStatus structure for more details.
struct tagLALStatus * statusPtr
Pointer to the next node in the list; NULL if this function is not reporting a subroutine error.