options

options —

Synopsis




gretlopt    get_gretl_options               (char *line,
                                             int *err);
const char* print_flags                     (gretlopt oflags,
                                             int ci);
const char** get_opts_for_command           (int ci,
                                             int *nopt);
int         check_for_loop_only_options     (int ci,
                                             gretlopt opt,
                                             PRN *prn);
char**      get_all_option_strings          (int *pn);
int         incompatible_options            (gretlopt opt,
                                             gretlopt test);

Description

Details

get_gretl_options ()

gretlopt    get_gretl_options               (char *line,
                                             int *err);

Check for option flags in line: if found, chop them out and set the return value accordingly. Strip any trailing semicolon from line while we're at it.

line : command line to parse.
err : location for error code, which is set to 1 in case any invalid options are found, else set to 0.
Returns : the options found in the line.

print_flags ()

const char* print_flags                     (gretlopt oflags,
                                             int ci);

Constructs a string representation of the options in oflags.

oflags : options.
ci : command index, for context.
Returns : pointer to static string (do not free!).

get_opts_for_command ()

const char** get_opts_for_command           (int ci,
                                             int *nopt);

ci :
nopt :
Returns :

check_for_loop_only_options ()

int         check_for_loop_only_options     (int ci,
                                             gretlopt opt,
                                             PRN *prn);

ci :
opt :
prn :
Returns :

get_all_option_strings ()

char**      get_all_option_strings          (int *pn);

pn :
Returns :

incompatible_options ()

int         incompatible_options            (gretlopt opt,
                                             gretlopt test);

opt : option flags to be tested.
test : bitwise OR of flags that are incompatible in context.
Returns : E_BADOPT if opt contains more than one of the flags in test, otherwise 0.