Reads a sequence or vector sequence from a file. More...
Reads a sequence or vector sequence from a file.
This test program parses data from an input file or from stdin
. The following option flags are accepted:
-o
] Writes the output to outfile
. If outfile
is given as stdout
, the data is written to standard output (not to a file named stdout
). If the -o
flag is not given, the routines are exercised, but no output is written. -d
] Sets the debug level to debuglevel
; if absent, -d 0
is assumed. -t
] Writes to stderr
the system time required to read the file. -v
] Reads the contents of infile
as a sequence of vectors to be parsed by the routines LAL<datatype>ReadVectorSequence()
, where <datatype>
is determined by the argument immediately following the -v
option flag. If infile
is given as stdin
, the data is read from standard input (not from a file named stdin
). -s
] As -v
, above, except that the file contents are parsed by the routines LAL<datatype>ReadSequence()
. If neither -v
nor -s
is specified, -v s StreamInput.dat
is assumed (this file is provided with the distribution so that running the code with no arguments, \'a la make check
, will perform a nontrivial test of the algorithm). For data read in as a character vector sequences, the output will consist of a number of lines equal to the length of the sequence, with each line being the length of the vector; all non-graphical characters in the vector (including the various types of whitespace) will be replaced with single spaces. For character sequences, the output will essentially be a copy of the input. For numerical vector sequences, the output will consist of separate lines for each vector of the sequence, with each line printing the components of the vector in some type-dependent format. For numerical sequences, each line of output contains a single number, or, in the case of complex datatypes, two numbers representing the real and imaginary components, again in some type-dependent format.
Definition in file StreamInputTest.c.
Go to the source code of this file.
Macros | |
Error Codes | |
#define | STREAMINPUTTESTC_ENORM 0 |
Normal exit. More... | |
#define | STREAMINPUTTESTC_ESUB 1 |
Subroutine failed. More... | |
#define | STREAMINPUTTESTC_EARG 2 |
Error parsing arguments. More... | |
#define | STREAMINPUTTESTC_EFILE 3 |
Could not open file. More... | |
#define STREAMINPUTTESTC_ENORM 0 |
Normal exit.
Definition at line 78 of file StreamInputTest.c.
#define STREAMINPUTTESTC_ESUB 1 |
Subroutine failed.
Definition at line 79 of file StreamInputTest.c.
#define STREAMINPUTTESTC_EARG 2 |
Error parsing arguments.
Definition at line 80 of file StreamInputTest.c.
#define STREAMINPUTTESTC_EFILE 3 |
Could not open file.
Definition at line 81 of file StreamInputTest.c.