printout

printout —

Synopsis




#define     GRETL_DIGITS
#define     GRETL_MP_DIGITS
#define     PAGELINES
void        session_time                    (PRN *prn);
void        logo                            (void);
void        lib_logo                        (void);
void        gui_script_logo                 (PRN *prn);
void        gui_logo                        (PRN *prn);
void        text_print_model_confints       (const CoeffIntervals *cf,
                                             PRN *prn);
void        print_freq                      (const FreqDist *freq,
                                             PRN *prn);
void        print_xtab                      (const Xtab *tab,
                                             gretlopt opt,
                                             PRN *prn);
void        print_smpl                      (const DATAINFO *pdinfo,
                                             int fulln,
                                             PRN *prn);
void        print_contemp_covariance_matrix (const gretl_matrix *m,
                                             double ldet,
                                             PRN *prn);
int         outcovmx                        (MODEL *pmod,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);
void        obs_marker_init                 (const DATAINFO *pdinfo);
void        print_obs_marker                (int t,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);
void        varlist                         (const DATAINFO *pdinfo,
                                             PRN *prn);
void        maybe_list_vars                 (const DATAINFO *pdinfo,
                                             PRN *prn);
int         get_printdata_blocks            (void);
int         printdata                       (const int *list,
                                             const char *mstr,
                                             const double **Z,
                                             const DATAINFO *pdinfo,
                                             gretlopt opt,
                                             PRN *prn);
int         print_data_sorted               (const int *list,
                                             const int *obsvec,
                                             const double **Z,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);
int         text_print_fit_resid            (const FITRESID *fr,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);
int         print_fit_resid                 (const MODEL *pmod,
                                             const double **Z,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);
int         text_print_forecast             (const FITRESID *fr,
                                             double ***pZ,
                                             DATAINFO *pdinfo,
                                             gretlopt opt,
                                             PRN *prn);
void        print_iter_info                 (int iter,
                                             double crit,
                                             int type,
                                             int k,
                                             const double *b,
                                             const double *g,
                                             double sl,
                                             PRN *prn);
void        text_print_vmatrix              (VMatrix *vmat,
                                             PRN *prn);
void        gretl_print_fullwidth_double    (double x,
                                             int digits,
                                             PRN *prn);
void        gretl_print_value               (double x,
                                             PRN *prn);
char*       gretl_fix_exponent              (char *s);
void        bufspace                        (int n,
                                             PRN *prn);
void        print_centered                  (const char *s,
                                             int width,
                                             PRN *prn);
void        gretl_printxn                   (double x,
                                             int n,
                                             PRN *prn);
int         do_printf                       (const char *line,
                                             double ***pZ,
                                             DATAINFO *pdinfo,
                                             PRN *prn);
int         generate_obs_markers            (const char *s,
                                             double ***pZ,
                                             DATAINFO *pdinfo);
int         in_usa                          (void);
char*       bufgets                         (char *s,
                                             size_t size,
                                             const char *buf);
void        bufgets_init                    (const char *buf);
void        bufgets_finalize                (const char *buf);
void        scroll_pause                    (void);
int         scroll_pause_or_quit            (void);

Description

Details

GRETL_DIGITS

#define GRETL_DIGITS 6


GRETL_MP_DIGITS

#define GRETL_MP_DIGITS 12


PAGELINES

#define PAGELINES 21


session_time ()

void        session_time                    (PRN *prn);

Print the current time to the specified printing object, or to stdout if prn is NULL.

prn : where to print.

logo ()

void        logo                            (void);

Print to stdout gretl version information.


lib_logo ()

void        lib_logo                        (void);

Print gretl library version information to stdout.


gui_script_logo ()

void        gui_script_logo                 (PRN *prn);

Print to prn a header for script output in gui program.

prn : gretl printing struct.

gui_logo ()

void        gui_logo                        (PRN *prn);

Print gretl GUI version information to the specified printing object, or to stdout if prn is NULL.

prn : where to print.

text_print_model_confints ()

void        text_print_model_confints       (const CoeffIntervals *cf,
                                             PRN *prn);

Print to prn the 95 percent confidence intervals for parameter estimates contained in cf.

cf : pointer to confidence intervals.
prn : gretl printing struct.

print_freq ()

void        print_freq                      (const FreqDist *freq,
                                             PRN *prn);

Print frequency distribution to prn.

freq : gretl frequency distribution struct.
prn : gretl printing struct.

print_xtab ()

void        print_xtab                      (const Xtab *tab,
                                             gretlopt opt,
                                             PRN *prn);

Print crosstab to prn.

tab : gretl cross-tabulation struct.
opt :
prn : gretl printing struct.

print_smpl ()

void        print_smpl                      (const DATAINFO *pdinfo,
                                             int fulln,
                                             PRN *prn);

Prints the current sample information to prn.

pdinfo : data information struct
fulln : full length of data series.
prn : gretl printing struct.

print_contemp_covariance_matrix ()

void        print_contemp_covariance_matrix (const gretl_matrix *m,
                                             double ldet,
                                             PRN *prn);

m :
ldet :
prn :

outcovmx ()

int         outcovmx                        (MODEL *pmod,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);

Print to prn the variance-covariance matrix for the parameter estimates in pmod.

pmod : pointer to model.
pdinfo : data information struct.
prn : gretl printing struct.
Returns : 0 on successful completion, error code on error.

obs_marker_init ()

void        obs_marker_init                 (const DATAINFO *pdinfo);

Check the length to which observation markers should be printed, in a tabular context. (We don't want to truncate 10-character date strings by chopping off the day.)

pdinfo : data information struct.

print_obs_marker ()

void        print_obs_marker                (int t,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);

Print a string (label, date or obs number) representing the given t.

t : observation number.
pdinfo : data information struct.
prn : gretl printing struct.

varlist ()

void        varlist                         (const DATAINFO *pdinfo,
                                             PRN *prn);

Prints a list of the names of the variables currently defined.

pdinfo : data information struct.
prn : gretl printing struct

maybe_list_vars ()

void        maybe_list_vars                 (const DATAINFO *pdinfo,
                                             PRN *prn);

Prints a list of the names of the variables currently defined, unless gretl messaging is turned off.

pdinfo : data information struct.
prn : gretl printing struct

get_printdata_blocks ()

int         get_printdata_blocks            (void);

Returns :

printdata ()

int         printdata                       (const int *list,
                                             const char *mstr,
                                             const double **Z,
                                             const DATAINFO *pdinfo,
                                             gretlopt opt,
                                             PRN *prn);

Print the data for the variables in list, from observations t1 to t2.

list : list of variables to print.
mstr : optional string holding names of matrices to print.
Z : data matrix.
pdinfo : data information struct.
opt : if OPT_O, print the data by observation (series in columns); if OPT_N, use simple obs numbers, not dates; if OPT_T, print the data to 10 significant digits; if OPT_L, print the data to a number of digits set by "set longdigits" (default 10).
prn : gretl printing struct.
Returns : 0 on successful completion, 1 on error.

print_data_sorted ()

int         print_data_sorted               (const int *list,
                                             const int *obsvec,
                                             const double **Z,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);

Print the data for the variables in list, using the sort order given in obsvec. The first element of obsvec must contain the number of observations that follow. By default, printing is plain text, formatted in columns using space characters, but if the prn format is set to GRETL_FORMAT_CSV then printing respects the user's choice of column delimiter.

list : list of variables to print.
obsvec : list of observation numbers.
Z : data matrix.
pdinfo : data information struct.
prn : gretl printing struct.
Returns : 0 on successful completion, non-zero code on error.

text_print_fit_resid ()

int         text_print_fit_resid            (const FITRESID *fr,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);

fr :
pdinfo :
prn :
Returns :

print_fit_resid ()

int         print_fit_resid                 (const MODEL *pmod,
                                             const double **Z,
                                             const DATAINFO *pdinfo,
                                             PRN *prn);

Print to prn the fitted values and residuals from pmod.

pmod : pointer to gretl model.
Z : data array.
pdinfo : data information struct.
prn : gretl printing struct.
Returns : 0 on successful completion, 1 on error.

text_print_forecast ()

int         text_print_forecast             (const FITRESID *fr,
                                             double ***pZ,
                                             DATAINFO *pdinfo,
                                             gretlopt opt,
                                             PRN *prn);

Print the forecasts in fr to prn, and also plot the forecasts if OPT_P is given.

fr : pointer to structure containing forecasts.
pZ : pointer to data array.
pdinfo : dataset information.
opt : if includes OPT_P, make a plot of the forecasts.
prn : printing structure.
Returns : 0 on success, non-zero error code on error.

print_iter_info ()

void        print_iter_info                 (int iter,
                                             double crit,
                                             int type,
                                             int k,
                                             const double *b,
                                             const double *g,
                                             double sl,
                                             PRN *prn);

Print to prn information pertaining to step iter of an iterative estimation process.

iter : iteration number.
crit : criterion (e.g. log-likelihood).
type : type of criterion (C_LOGLIK or C_OTHER)
k : number of parameters.
b : parameter array.
g : gradient array.
sl : step length.
prn : gretl printing struct.

text_print_vmatrix ()

void        text_print_vmatrix              (VMatrix *vmat,
                                             PRN *prn);

vmat :
prn :

gretl_print_fullwidth_double ()

void        gretl_print_fullwidth_double    (double x,
                                             int digits,
                                             PRN *prn);

x :
digits :
prn :

gretl_print_value ()

void        gretl_print_value               (double x,
                                             PRN *prn);

x :
prn :

gretl_fix_exponent ()

char*       gretl_fix_exponent              (char *s);

Some C libraries (e.g. MS) print an "extra" zero in the exponent when using scientific notation, e.g. "1.45E-002". This function checks for this and cuts it out if need be.

s : string representation of floating-point number.
Returns : the fixed numeric string.

bufspace ()

void        bufspace                        (int n,
                                             PRN *prn);

n :
prn :

print_centered ()

void        print_centered                  (const char *s,
                                             int width,
                                             PRN *prn);

If the string s is shorter than width, print it centered in a field of the given width (otherwise just print it straight).

s : string to print.
width : width of field.
prn : gretl printing struct.

gretl_printxn ()

void        gretl_printxn                   (double x,
                                             int n,
                                             PRN *prn);

Print a string representation of the double-precision value x in a format that depends on n.

x : number to print.
n : controls width of output.
prn : gretl printing struct.

do_printf ()

int         do_printf                       (const char *line,
                                             double ***pZ,
                                             DATAINFO *pdinfo,
                                             PRN *prn);

Implement a somewhat limited version of C's printf for use in gretl scripts.

line : command line.
pZ : pointer to data array.
pdinfo : dataset information.
prn : printing struct.
Returns : 0 on success, non-zero on error.

generate_obs_markers ()

int         generate_obs_markers            (const char *s,
                                             double ***pZ,
                                             DATAINFO *pdinfo);

s :
pZ :
pdinfo :
Returns :

in_usa ()

int         in_usa                          (void);

Returns :

bufgets ()

char*       bufgets                         (char *s,
                                             size_t size,
                                             const char *buf);

This function works much like fgets, reading successive lines from a buffer rather than a file. It differs from fgets in that it discards the line termination ("\n" or "\r\n") on output. Important note: use of bufgets() on a particular buffer must be preceded by a call to bufgets_init() on the same buffer, and must be followed by a call to bufgets_finalize(), again on the same buffer.

s : target string (must be pre-allocated).
size : maximum number of characters to read.
buf : source buffer.
Returns : s (or NULL if nothing more can be read from buf).

bufgets_init ()

void        bufgets_init                    (const char *buf);

Initializes a text buffer for use with bufgets().

buf : source buffer.

bufgets_finalize ()

void        bufgets_finalize                (const char *buf);

Signals that we are done reading from buf.

buf : source buffer.

scroll_pause ()

void        scroll_pause                    (void);

Pause after a "page" of text at the console.


scroll_pause_or_quit ()

int         scroll_pause_or_quit            (void);

Pause after a "page" of text, and give the user the option of breaking out of the printing routine.

Returns : 1 if the user chose to quit, otherwise 0.