Top |
void
session_time (PRN *prn
);
Print the current time to the specified printing object,
or to stdout
if prn
is NULL
.
void
gui_script_logo (PRN *prn
);
Print to prn
a header for script output in gui program.
void
gui_logo (PRN *prn
);
Print gretl GUI version information to the specified printing
object, or to stdout
if prn
is NULL
.
void print_freq (const FreqDist *freq
,int varno
,const DATASET *dset
,PRN *prn
);
Print frequency distribution to prn
.
void print_xtab (const Xtab *tab
,const DATASET *dset
,gretlopt opt
,PRN *prn
);
Print crosstab to prn
.
tab |
gretl cross-tabulation struct. |
|
dset |
pointer to dataset, or NULL. |
|
opt |
may contain |
|
prn |
gretl printing struct. |
void print_smpl (const DATASET *dset
,int fulln
,gretlopt opt
,PRN *prn
);
Prints the current sample information to prn
.
void print_contemp_covariance_matrix (const gretl_matrix *m
,double ldet
,PRN *prn
);
int outcovmx (MODEL *pmod
,const DATASET *dset
,PRN *prn
);
Print to prn
the variance-covariance matrix for the parameter
estimates in pmod
.
void print_obs_marker (int t
,const DATASET *dset
,int len
,PRN *prn
);
Print a string (label, date or obs number) representing the given t
.
void list_series (const DATASET *dset
,gretlopt opt
,PRN *prn
);
Prints a list of the names of the series currently defined.
void maybe_list_series (const DATASET *dset
,PRN *prn
);
Prints a list of the names of the series currently defined, unless gretl messaging is turned off.
int printdata (const int *list
,const char *ostr
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Print the data for the variables in list
over the currently
defined sample range, or the objects named in ostr
.
list |
list of variables to print. |
|
ostr |
optional string holding names of non-series objects to print. |
|
dset |
dataset struct. |
|
opt |
if OPT_O, print the data by observation (series in columns); if OPT_D, use simple obs numbers, not dates; if OPT_M, print midas list in original time-series order; if OPT_R print specified range of object; if OPT_X (relevant only for series), print the data by observation without any header or observation info. |
|
prn |
gretl printing struct. |
int print_data_in_columns (const int *list
,const int *obsvec
,const DATASET *dset
,gretlopt opt
,PRN *prn
);
Print the data for the variables in list
. If obsvec
is not NULL
,
it should specify a sort order; 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, and if the format is set to GRETL_FORMAT_RTF
the data are printed as an RTF table.
list |
list of variables to print. |
|
obsvec |
list of observation numbers (or |
|
dset |
dataset struct. |
|
opt |
may include OPT_X to exclude the observations column that is usually printed first. |
|
prn |
gretl printing struct. |
int print_series_with_format (const int *list
,const DATASET *dset
,char fmt
,int digits
,PRN *prn
);
int text_print_fit_resid (const FITRESID *fr
,const DATASET *dset
,PRN *prn
);
int print_fit_resid (const MODEL *pmod
,const DATASET *dset
,PRN *prn
);
Print to prn
the fitted values and residuals from pmod
.
int text_print_forecast (const FITRESID *fr
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Prints the forecasts in fr
to prn
, and also plots the
forecasts if OPT_P
is given. If a plot is requested and
fr
includes forecast standard errors, then the options
OPT_F
or OPT_L
may be given to use "fill" style or lines,
respectively, for the confidence bands (the default style
being vertical bars per observation).
int print_fcast_stats_matrix (const gretl_matrix *m
,int T
,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
);
Print to prn
information pertaining to step iter
of an
iterative estimation process.
void gretl_sprint_fullwidth_double (double x
,int digits
,char *targ
,PRN *prn
);
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.
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).
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
.
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.
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.
int
bufgets_init (const char *buf
);
Initializes a text buffer for use with bufgets()
.
void
bufgets_finalize (const char *buf
);
Signals that we are done reading from buf
.
void
buf_rewind (const char *buf
);
Buffer equivalent of rewind()
. Note that buf
must first be initialized using bufgets_init()
.
int bufseek (const char *buf
,long int offset
);
Buffer equivalent of fseek()
with SEEK_SET. Note that buf
must first be initialized via bufgets_init()
.
int buf_back_lines (const char *buf
,int n
);
Applies only when buf
has been initialized with bufgets_init()
.
Moves the reading point of buf
for bufgets()
back by n
lines,
if possible, or to the start of the buffer if n
is greater than
the number of previous lines.
long
buftell (const char *buf
);
Buffer equivalent of ftell. Note that buf
must first be initialized via bufgets_init()
.