interact

interact

Functions

Types and Values

#define MAXSAVENAME
#define CMD_NULL
#define CMD_COMMENT
#define CMD_MASKED
typedef CMD
typedef ExecState
enum ProgramOptions
enum ExecFlags

Description

Functions

HIDDEN_COMMAND()

#define HIDDEN_COMMAND(c) (c == FUNCERR || c == FUNCRET)

gretl_cmd_init ()

int
gretl_cmd_init (CMD *cmd);

gretl_cmd_free ()

void
gretl_cmd_free (CMD *cmd);

gretl_cmd_new ()

CMD *
gretl_cmd_new (void);

gretl_cmd_destroy ()

void
gretl_cmd_destroy (CMD *cmd);

gretl_cmd_set_context ()

void
gretl_cmd_set_context (CMD *cmd,
                       int ci);

gretl_cmd_destroy_context ()

void
gretl_cmd_destroy_context (CMD *cmd);

gretl_cmd_get_savename ()

const char *
gretl_cmd_get_savename (CMD *cmd);

gretl_cmd_get_opt ()

gretlopt
gretl_cmd_get_opt (const CMD *cmd);

gretl_cmd_set_opt ()

void
gretl_cmd_set_opt (CMD *cmd,
                   gretlopt opt);

parse_command_line ()

int
parse_command_line (char *line,
                    CMD *cmd,
                    DATASET *dset,
                    void *ptr);

Parses line and fills out cmd accordingly.

Parameters

line

the command line.

 

cmd

pointer to command struct.

 

dset

dataset struct.

 

ptr

pointer for use with "compilation" of conditionals in loops.

 

Returns

0 on success, non-zero code on error.


parse_gui_command ()

int
parse_gui_command (const char *line,
                   CMD *cmd,
                   DATASET *dset);

get_parser_errline ()

const char *
get_parser_errline (void);

get_command_index ()

int
get_command_index (char *line,
                   int cmode,
                   CMD *cmd);

Parse line and assign to the ci field of cmd the index number of the command embedded in line . Note: this is a "lite" version of parse_command_line(). It is used when commands are being stacked for execution within a loop. Command options are not parsed out of line .

Parameters

line

command line.

 

cmode

compilation mode: LOOP or FUNC

 

cmd

pointer to gretl command struct.

 

Returns

1 on error, otherwise 0.


command_number ()

int
command_number (const char *cmd);

gretl_echo_command ()

void
gretl_echo_command (CMD *cmd,
                    const char *line,
                    PRN *prn);

gretl_record_command ()

void
gretl_record_command (CMD *cmd,
                      const char *line,
                      PRN *prn);

safe_print_line ()

void
safe_print_line (const char *line,
                 int *plen,
                 PRN *prn);

gretl_cmd_exec ()

int
gretl_cmd_exec (ExecState *s,
                DATASET *dset);

call_pca_plugin ()

int
call_pca_plugin (VMatrix *cmat,
                 DATASET *dset,
                 gretlopt opt,
                 PRN *prn);

gretl_shell_grab ()

int
gretl_shell_grab (const char *arg,
                  char **sout);

Calls the shell to execute arg syncronously and captures the standard output, if any, in sout .

Parameters

arg

command line to be executed.

 

sout

location to receive output from command.

 

Returns

0 on successful completion, non-zero on error.


manufacture_gui_callback ()

void
manufacture_gui_callback (int ci);

is_plotting_command ()

int
is_plotting_command (CMD *cmd);

set_plot_produced ()

void
set_plot_produced (void);

gretl_delete_variables ()

int
gretl_delete_variables (int *list,
                        const char *param,
                        gretlopt opt,
                        DATASET *dset,
                        int *renumber,
                        PRN *prn);

Types and Values

MAXSAVENAME

#define MAXSAVENAME 32

CMD_NULL

#define CMD_NULL    -1

CMD_COMMENT

#define CMD_COMMENT -2

CMD_MASKED

#define CMD_MASKED  -3

CMD

typedef struct CMD_ CMD;

ExecState

typedef struct ExecState_ ExecState;

enum ProgramOptions

Members

OPT_BATCH

   

OPT_HELP

   

OPT_VERSION

   

OPT_RUNIT

   

OPT_DBOPEN

   

OPT_WEBDB

   

OPT_FNPKG

   

OPT_DUMP

   

OPT_DEBUG

   

OPT_QUIET

   

OPT_ENGLISH

   

OPT_BASQUE

   

OPT_MAKEPKG

   

OPT_INSTPKG

   

OPT_TOOL

   

enum ExecFlags

Members

CONSOLE_EXEC

   

SCRIPT_EXEC

   

INCLUDE_EXEC

   

FUNCTION_EXEC

   

DEBUG_EXEC

   

CALLBACK_EXEC

   

INIT_EXEC