22 #include <lal/LALVCSInfo.h>
24 #include <lal/LALString.h>
26 #include <lal/UserInput.h>
59 main(
int argc,
char *argv[])
62 const char *argv_in[] = {
71 "--argFlag=flagA,flagC",
72 "@" TEST_DATA_DIR
"ConfigFileSample.cfg"
76 char **my_argv =
XLALCalloc ( my_argc,
sizeof(
char*) );
77 for (
int i=0; i < my_argc; i ++ )
79 my_argv[i] =
XLALCalloc ( 1, strlen(argv_in[i])+1);
80 strcpy ( my_argv[i], argv_in[i] );
90 const UserChoices enumData = { { -1,
"noenum" }, { 1,
"enum1" }, { 2,
"enum2" }, { 2,
"enumB" }, { 0,
"enum0" } };
91 const UserChoices flagData = { { 0,
"none" }, { -1,
"noflag" }, { 1,
"flagA" }, { 2,
"flagB" }, { 4,
"flagC" }, { 5,
"flagAC" } };
95 "This is a longer description of the program. This is a longer description of the program. This is a longer description of the program."
96 "This is a longer description of the program. This is a longer description of the program. This is a longer description of the program."
97 "This is a longer description of the program. This is a longer description of the program. This is a longer description of the program."
99 "This is a longer description of the program. This is a longer description of the program. This is a longer description of the program."
100 "This is a longer description of the program. This is a longer description of the program. This is a longer description of the program.";
126 "This option is here to test the help page wrapping of long strings. "
127 "This option is here to test the help page wrapping of long strings. "
128 "This option is here to test the help page wrapping of long strings. "
129 "This option is here to test the help page wrapping of long strings. "
130 "This option is here to test the help page wrapping of long strings. "
132 "This~option~is~here~to~test~the~help~page~wrapping~of~long~strings~without~spaces.~"
133 "This~option~is~here~to~test~the~help~page~wrapping~of~long~strings~without~spaces.~"
134 "This~option~is~here~to~test~the~help~page~wrapping~of~long~strings~without~spaces."
152 printf(
"=== Begin usage string ===\n" );
155 printf(
"--- End usage string ---\n" );
156 printf(
"=== Begin help page ===\n" );
159 printf(
"--- End help page ---\n" );
163 printf(
"=== Begin log generation test ===\n" );
167 printf(
"Log format #%i: >>>%s<<<\n", i, logstr );
170 printf(
"--- End log generation test ---\n" );
179 XLAL_CHECK ( strcmp ( uvar->
string2,
"this is also possible, and # here does nothing; and neither does semi-colon " ) == 0,
XLAL_EFAILED,
"Failed to read in string2\n" );
183 char buf1[256], buf2[256];
187 REAL8 diff, tol = 3e-15;
195 for (
int i=0; i < my_argc; i ++ ) {
void LALCheckMemoryLeaks(void)
const LALVCSInfoList lalVCSInfoList
NULL-terminated list of VCS and build information for LAL and its dependencies
char * XLALGPSToStr(char *, const LIGOTimeGPS *t)
Return a string containing the ASCII base 10 representation of a LIGOTimeGPS.
unsigned char BOOLEAN
Boolean logical type, see Headers LAL(Atomic)Datatypes.h for more details.
#define XLAL_NUM_ELEM(x)
MACRO which gives the number of elements in a fixed-size array.
double REAL8
Double precision real floating-point number (8 bytes).
#define XLAL_INIT_DECL(var,...)
C99 MACRO to declare and zero-initialize a variable, use as "type XLAL_INIT_DECL(var);".
int64_t INT8
Eight-byte signed integer; on some platforms this is equivalent to long int instead.
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.
char * XLALStringDuplicate(const char *s)
Like strdup but uses LAL allocation routines (free with LALFree).
#define XLAL_CHECK(assertion,...)
Macro to test an assertion and invoke a failure if it is not true in a function that returns an integ...
@ XLAL_SUCCESS
Success return value (not an error number)
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
@ XLAL_EFAILED
Generic failure.
int XLALGPSCmp(const LIGOTimeGPS *t0, const LIGOTimeGPS *t1)
Compares two GPS times.
Epoch relative to GPS epoch, see LIGOTimeGPS type for more details.
Possible choices the user may select for an enumeration or bitflag.