gretl  2020e
About: gretl (Gnu Regression, Econometrics and Time-series Library) is a cross-platform statistical package mainly for econometric analysis.
  Fossies Dox: gretl-2020e.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gretl_prn.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct PRN_ PRN
 

Enumerations

enum  PrnType {
  GRETL_PRINT_STDOUT, GRETL_PRINT_STDERR, GRETL_PRINT_FILE, GRETL_PRINT_BUFFER,
  GRETL_PRINT_TEMPFILE, GRETL_PRINT_STREAM, GRETL_PRINT_GZFILE
}
 
enum  PrnFormat {
  GRETL_FORMAT_TXT = 1 << 0, GRETL_FORMAT_TEX = 1 << 1, GRETL_FORMAT_DOC = 1 << 2, GRETL_FORMAT_RTF = 1 << 3,
  GRETL_FORMAT_RTF_TXT = 1 << 4, GRETL_FORMAT_EQN = 1 << 5, GRETL_FORMAT_SELECTION = 1 << 6, GRETL_FORMAT_CSV = 1 << 7,
  GRETL_FORMAT_TAB = 1 << 8, GRETL_FORMAT_MODELTAB = 1 << 9, GRETL_FORMAT_LANDSCAPE = 1 << 10, GRETL_FORMAT_HAS_MINUS = 1 << 11
}
 

Functions

PRNgretl_print_new (PrnType ptype, int *err)
 
void gretl_print_destroy (PRN *prn)
 
PRNgretl_print_new_with_filename (const char *fname, int *err)
 
PRNgretl_gzip_print_new (const char *fname, int comp_level, int *err)
 
PRNgretl_print_new_with_tempfile (int *err)
 
int gretl_print_has_tempfile (PRN *prn)
 
const char * gretl_print_get_tempfile_name (PRN *prn)
 
PRNgretl_print_new_with_buffer (char *buf)
 
PRNgretl_print_new_with_gchar_buffer (gchar *buf)
 
PRNgretl_print_new_with_stream (FILE *fp)
 
void gretl_print_detach_stream (PRN *prn)
 
int gretl_print_reset_buffer (PRN *prn)
 
int gretl_print_rename_file (PRN *prn, const char *oldpath, const char *newpath)
 
const char * gretl_print_get_buffer (PRN *prn)
 
const char * gretl_print_get_trimmed_buffer (PRN *prn)
 
char * gretl_print_steal_buffer (PRN *prn)
 
int gretl_print_replace_buffer (PRN *prn, char *buf)
 
void gretl_print_get_size (PRN *prn, int *width, int *height)
 
int gretl_print_set_save_position (PRN *prn)
 
void gretl_print_unset_save_position (PRN *prn)
 
char * gretl_print_get_chunk (PRN *prn)
 
char * gretl_print_get_chunk_at (PRN *prn, int pos)
 
int gretl_print_tell (PRN *prn)
 
void gretl_print_set_format (PRN *prn, PrnFormat format)
 
void gretl_print_toggle_doc_flag (PRN *prn)
 
void gretl_print_set_has_minus (PRN *prn)
 
int gretl_print_has_minus (PRN *prn)
 
void gretl_print_set_delim (PRN *prn, char delim)
 
int pprintf (PRN *prn, const char *format,...)
 
void pprintf2 (PRN *prn, const char *format,...)
 
int pputs (PRN *prn, const char *s)
 
int pputc (PRN *prn, int c)
 
void gretl_print_ensure_vspace (PRN *prn)
 
void gretl_prn_newline (PRN *prn)
 
void gretl_print_flush_stream (PRN *prn)
 
void gretl_print_close_stream (PRN *prn)
 
int printing_to_standard_stream (PRN *prn)
 
int print_redirection_level (PRN *prn)
 
const char * print_redirection_filename (PRN *prn)
 
int print_redirected_at_level (PRN *prn, int level)
 
int print_start_redirection (PRN *prn, FILE *fp, const char *fname, const char *strvar)
 
int print_end_redirection (PRN *prn)
 
int plain_format (PRN *prn)
 
int rtf_format (PRN *prn)
 
int rtf_doc_format (PRN *prn)
 
int tex_format (PRN *prn)
 
int tex_doc_format (PRN *prn)
 
int tex_eqn_format (PRN *prn)
 
int csv_format (PRN *prn)
 
int prn_format (PRN *prn)
 
char prn_delim (PRN *prn)
 
int gretl_print_has_buffer (PRN *prn)
 
int gretl_print_alloc (PRN *prn, size_t s)
 
char * gretl_print_read_tempfile (PRN *prn, int *err)
 

Typedef Documentation

◆ PRN

typedef struct PRN_ PRN

PRN:

An opaque structure accessed only via gretl_print functions.

Definition at line 1 of file gretl_prn.h.

Enumeration Type Documentation

◆ PrnFormat

enum PrnFormat
Enumerator
GRETL_FORMAT_TXT 
GRETL_FORMAT_TEX 
GRETL_FORMAT_DOC 
GRETL_FORMAT_RTF 
GRETL_FORMAT_RTF_TXT 
GRETL_FORMAT_EQN 
GRETL_FORMAT_SELECTION 
GRETL_FORMAT_CSV 
GRETL_FORMAT_TAB 
GRETL_FORMAT_MODELTAB 
GRETL_FORMAT_LANDSCAPE 
GRETL_FORMAT_HAS_MINUS 

Definition at line 41 of file gretl_prn.h.

◆ PrnType

enum PrnType
Enumerator
GRETL_PRINT_STDOUT 
GRETL_PRINT_STDERR 
GRETL_PRINT_FILE 
GRETL_PRINT_BUFFER 
GRETL_PRINT_TEMPFILE 
GRETL_PRINT_STREAM 
GRETL_PRINT_GZFILE 

Definition at line 31 of file gretl_prn.h.

Function Documentation

◆ csv_format()

◆ gretl_gzip_print_new()

PRN* gretl_gzip_print_new ( const char *  fname,
int  comp_level,
int *  err 
)

gretl_gzip_print_new: @fname: name of the compressed file to be opened for writing. @comp_level: -1 for default, or integer 0 to 9. @err: location to receive error code.

Create and initialize a gretl printing struct, with output directed to the named compressed file.

Returns: pointer to newly created struct, or NULL on failure.

Definition at line 353 of file gretl_prn.c.

References E_INVARG, fpinfo_::fname, GRETL_PRINT_GZFILE, and real_gretl_print_new().

Referenced by gretl_bundle_write_to_file(), gretl_matrix_write_to_file(), and open_gdt_write_stream().

◆ gretl_print_alloc()

int gretl_print_alloc ( PRN prn,
size_t  s 
)

gretl_print_alloc: @prn: gretl printing struct. @s: desired size in bytes.

If @prn is using a buffer for printing, try to ensure that at least @s bytes are available for further printing. May speed things up if we know there is a large amount of text to be printed.

Returns: 0 on success, non-zero on failure.

Definition at line 1757 of file gretl_prn.c.

References PRN_::blen, PRN_::buf, PRN_::bufsize, E_ALLOC, E_DATA, and PRN_::fixed.

Referenced by check_prn_size().

◆ gretl_print_close_stream()

void gretl_print_close_stream ( PRN prn)

gretl_print_close_file: @prn: gretl printing struct.

If the output of @prn is directed to a file, close the file. Also frees and sets to NULL the filename associated with the stream (but does not remove the file).

Definition at line 1338 of file gretl_prn.c.

References PRN_::fname, PRN_::fp, and PRN_::fz.

Referenced by maybe_suspend_session_log().

◆ gretl_print_destroy()

void gretl_print_destroy ( PRN prn)

gretl_print_destroy: @prn: pointer to gretl printing struct.

Close a gretl printing struct and free any associated resources.

Definition at line 120 of file gretl_prn.c.

References PRN_::buf, PRN_::fname, PRN_::fp, PRN_::fplist, PRN_::fz, PRN_::gbuf, gretl_remove(), and prn_destroy_fp_list().

Referenced by add_label_mappings_to_st(), arma_init_build_dataset(), bool_subsample(), boxplot_show_summary(), bp_preliminary_ols(), calc_finish_genr(), cli_open_append(), cli_quit(), cmd_to_buf(), compact_daily_spread(), compact_data_spread(), console_destroyed(), copy_vars_formatted(), count_missing(), csvprint(), data_prn_via_file(), dbn_dataset_search_results(), dbn_dset_from_csv(), dbn_general_search_results(), dbnomics_get_dimensions_call(), dbnomics_get_series_call(), debug_print_matrix(), display_digits_callback(), display_fit_resid(), display_function_package_data(), display_selected(), display_var(), dlg_text_set_from_sys(), do_add_omit(), do_arch(), do_autocorr(), do_bootstrap(), do_chow_cusum(), do_coeff_sum(), do_coint(), do_collin(), do_dwpval(), do_fractint(), do_gini(), do_graph_model(), do_join_command(), do_leverage(), do_make_list(), do_menu_op(), do_modprint(), do_modtest(), do_panel_tests(), do_reset(), do_resid_freq(), do_sprintf_function(), do_straight_anova(), do_tdisagg(), do_VAR_omit(), do_vector_model(), do_xcorrgm(), dta_value_labels_setup(), exec_bundle_plot_function(), finish_genr(), fncall_exec_callback(), fncall_help(), format_model_table(), free_command_stack(), generate_obs_markers(), get_imported_data(), get_native_data(), gnuplot(), got_printable_output(), gretl_bundle_write_to_buffer(), gretl_bundle_write_to_file(), gretl_matrix_print(), gretl_matrix_write_to_file(), group_means_dataset(), gui_logo(), gui_matrix_from_list(), handle_adhoc_string(), handle_compact_spread(), handle_flush_callback(), heckit_init(), import_csv_as_matrix(), import_ts_check(), ivreg_nlfunc_setup(), ivreg_sargan_test(), json_get_string(), ldepvar_std_errors(), lib_open_append(), libset_write_script(), lmaker_run(), main(), make_import_tmpset(), matrix_to_clipboard_as_csv(), maybe_do_markup(), maybe_offer_daily_options(), maybe_suspend_session_log(), mdata_text_received(), midas_list_callback(), multi_series_view_print(), multi_series_view_print_sorted(), nl_model_add_spec_info(), nls_genr_setup(), option_printing_cleanup(), ordered_estimate(), package_write_index(), plot_with_band(), precheck_error(), print_model_table_direct(), print_test_to_window(), print_xtab(), read_dta_117_data(), read_from_pipe(), read_old_dta_data(), real_coeffint_set_alpha(), real_csv_to_clipboard(), real_do_corrgm(), real_do_model(), real_do_nonlinear_model(), real_do_pergm(), real_do_printf(), real_do_regls(), real_GUI_function_call(), real_hr_arma_init(), real_limited_chow(), real_write_function_package(), real_write_gdt(), realgen(), reuse_script_out(), rtfprint(), run_native_script(), save_function_package_as_script(), save_function_package_spec(), scalars_to_clipboard_as_csv(), scratch_logfile_init(), script_open_append(), send_output_to_kid(), serialize_user_vars(), series_view_refresh(), session_time(), show_numbers_from_markers(), show_sample_callback(), single_series_view_print(), special_text_handler(), summary_print_formatted(), system_data_callback(), system_test_call(), texprint(), time_fit_plot(), try_regenerate_var(), tsls(), tsls_hausman_test(), unit_root_test(), upload_precheck_gfn(), utf8_to_rtf(), validate_package_file(), VAR_model_data_callback(), VAR_omit_auto(), view_buffer_with_parent(), view_model(), view_or_save_latex(), vwin_print_sorted_with_format(), window_copy_or_save(), write_loaded_functions_file(), write_session_xml(), and xml_get().

◆ gretl_print_detach_stream()

void gretl_print_detach_stream ( PRN prn)

gretl_print_detach_stream @prn: printing struct to operate on.

Sets the stream member of @prn to NULL so that @prn can be destroyed without closing the associated stream. May be used in conjunction with gretl_print_new_with_stream().

Definition at line 504 of file gretl_prn.c.

References PRN_::fp.

Referenced by plot_with_band(), and time_fit_plot().

◆ gretl_print_ensure_vspace()

void gretl_print_ensure_vspace ( PRN prn)

gretl_print_ensure_vspace: @prn: gretl printing struct.

Definition at line 1302 of file gretl_prn.c.

References PRN_::nlcount, and pputc().

Referenced by print_iter_info().

◆ gretl_print_flush_stream()

void gretl_print_flush_stream ( PRN prn)

gretl_print_flush_stream: @prn: gretl printing struct.

If the output of @prn is directed to a stream, flush that stream.

Definition at line 1317 of file gretl_prn.c.

References PRN_::fp, and PRN_::fz.

Referenced by gretl_cmd_exec(), gretl_flush(), real_echo_command(), real_write_log_entry(), and xlsx_get_data().

◆ gretl_print_get_buffer()

◆ gretl_print_get_chunk()

char* gretl_print_get_chunk ( PRN prn)

gretl_print_get_chunk: @prn: printing struct.

Retrieves a copy of the buffer associated with @prn, starting at the offset from the start of the buffer as set by gretl_print_set_save_position().

Returns: allocated buffer on success, or NULL on error.

Definition at line 803 of file gretl_prn.c.

References PRN_::blen, PRN_::buf, gretl_strdup(), and PRN_::savepos.

Referenced by handle_flush_callback().

◆ gretl_print_get_chunk_at()

char* gretl_print_get_chunk_at ( PRN prn,
int  pos 
)

gretl_print_get_chunk_at: @prn: printing struct. @pos: the byte poistion at which to start.

Retrieves a copy of the buffer associated with @prn, starting at the offset from the start of the buffer specified by @pos.

Returns: allocated buffer on success, or NULL on error.

Definition at line 831 of file gretl_prn.c.

References PRN_::blen, PRN_::buf, and gretl_strdup().

Referenced by real_add_text_to_session().

◆ gretl_print_get_size()

void gretl_print_get_size ( PRN prn,
int *  width,
int *  height 
)

gretl_print_get_size: @prn: printing struct. @width: location to receive width, or NULL. @height: location to receive height, or NULL.

If @prn has a non-null buffer attached, provides the width and/or height of the buffer, the width in characters and the height in lines. This function is intended for use with text designed for printing in a GUI window, and with "reasonable" line lengths for that context; if the lines are too long (more than 120 UTF-8 characters) the values written to @width and/or @height will be zero.

Definition at line 669 of file gretl_prn.c.

References PRN_::buf, bufgets(), bufgets_finalize(), bufgets_init(), h, and line.

Referenced by view_buffer_with_parent(), and view_model().

◆ gretl_print_get_tempfile_name()

const char* gretl_print_get_tempfile_name ( PRN prn)

gretl_print_get_tempfile_name: @prn: printing struct to test.

Returns: if @prn has a tempfile attached, return the name of that file, otherwise return NULL.

Definition at line 410 of file gretl_prn.c.

References PRN_::fname.

Referenced by scratch_logfile_init().

◆ gretl_print_get_trimmed_buffer()

const char* gretl_print_get_trimmed_buffer ( PRN prn)

gretl_print_get_trimmed_buffer: @prn: printing struct.

Obtain a pointer to the buffer associated with @prn, if any. This pointer must not be modified in any way. An opening newline is skipped and any trailing white space is substituted by NULs.

Returns: the buffer, or NULL on failure.

Definition at line 630 of file gretl_prn.c.

References PRN_::buf, and n.

Referenced by display_digits_callback(), multi_series_view_print(), multi_series_view_print_sorted(), series_view_refresh(), summary_print_formatted(), view_buffer_insert_text(), and view_model().

◆ gretl_print_has_buffer()

int gretl_print_has_buffer ( PRN prn)

gretl_print_has_buffer: @prn: gretl printing struct.

Returns: 1 if @prn is using a buffer for printing, otherwise 0 (e.g., if a file is being used).

Definition at line 1738 of file gretl_prn.c.

References PRN_::buf.

Referenced by print_series_with_format(), and printdata().

◆ gretl_print_has_minus()

int gretl_print_has_minus ( PRN prn)

gretl_print_has_minus: @prn: printing struct.

Returns: 1 if @prn supports Unicode minus sign, else 0.

Definition at line 949 of file gretl_prn.c.

References PRN_::format, and GRETL_FORMAT_HAS_MINUS.

Referenced by gretl_sprint_fullwidth_double(), plain_print_double(), plain_print_mp_coeffs(), print_middle_table(), rtf_print_coeff(), and rtf_print_double().

◆ gretl_print_has_tempfile()

int gretl_print_has_tempfile ( PRN prn)

gretl_print_has_tempfile: @prn: printing struct to test.

Returns: 1 if @prn has a tempfile attached, else 0.

Definition at line 393 of file gretl_prn.c.

References PRN_::fname, and PRN_::fp.

Referenced by get_logfile_content(), maybe_suspend_session_log(), and set_session_log().

◆ gretl_print_new()

PRN* gretl_print_new ( PrnType  ptype,
int *  err 
)

gretl_print_new: @ptype: code indicating the desired printing mode. @err: location to receive error code, or NULL.

Create and initialize a gretl printing struct. If @ptype is GRETL_PRINT_BUFFER, output will go to an automatically resized buffer; if @ptype is GRETL_PRINT_STDOUT or GRETL_PRINT_STDERR output goes to stdout or stderr respectively.

If you want a named file associated with the struct, use gretl_print_new_with_filename instead; if you want to attach a fixed, pre-allocated text buffer, use gretl_print_new_with_buffer.

Returns: pointer to newly created struct, or NULL on failure.

Definition at line 305 of file gretl_prn.c.

References GRETL_PRINT_FILE, and real_gretl_print_new().

Referenced by add_label_mappings_to_st(), arma_init_build_dataset(), bp_preliminary_ols(), bufopen(), cli_open_append(), compact_daily_spread(), compact_data_spread(), csvprint(), dbn_dset_from_csv(), debug_print_matrix(), do_sprintf_function(), dta_value_labels_setup(), exec_bundle_plot_function(), generate_obs_markers(), gnuplot(), gretl_bundle_write_to_buffer(), gretl_matrix_print(), group_means_dataset(), gui_logo(), handle_adhoc_string(), heckit_init(), import_csv_as_matrix(), import_ts_check(), ivreg_nlfunc_setup(), ivreg_sargan_test(), json_get_string(), ldepvar_std_errors(), lib_open_append(), lmaker_run(), main(), make_import_tmpset(), maybe_do_markup(), nl_model_add_spec_info(), nls_genr_setup(), ordered_estimate(), parser_ensure_error_buffer(), precheck_error(), print_flags(), read_from_pipe(), real_do_printf(), real_hr_arma_init(), rtfprint(), script_open_append(), session_time(), tsls(), tsls_hausman_test(), utf8_to_rtf(), and xml_get().

◆ gretl_print_new_with_buffer()

PRN* gretl_print_new_with_buffer ( char *  buf)

gretl_print_new_with_buffer: @buf: pre-allocated text buffer.

Creates and initializes a gretl printing struct, with fixed text buffer @buf. Fails if @buf is NULL. This is a convenience function: you can't use pprintf, pputs or pputc with a printing struct obtained in this way.

Note that @buf will be freed if and when gretl_print_destroy is called on the PRN pointer obtained.

Returns: pointer to newly created struct, or NULL on failure.

Definition at line 434 of file gretl_prn.c.

References GRETL_PRINT_BUFFER, and real_gretl_print_new().

Referenced by dataset_info(), display_saved_text(), make_prn_for_buf(), open_gui_text(), show_datafile_info(), and view_command_log().

◆ gretl_print_new_with_filename()

PRN* gretl_print_new_with_filename ( const char *  fname,
int *  err 
)

gretl_print_new_with_filename: @fname: name of the file to be opened for writing. @err: location to receive error code.

Create and initialize a gretl printing struct, with output directed to the named file.

Returns: pointer to newly created struct, or NULL on failure.

Definition at line 330 of file gretl_prn.c.

References _, fpinfo_::fname, GRETL_PRINT_FILE, and real_gretl_print_new().

Referenced by do_modprint(), gretl_bundle_write_to_file(), gretl_matrix_write_to_file(), libset_write_script(), main(), make_tex_prn(), open_gdt_write_stream(), package_write_index(), print_model_table_direct(), print_xtab(), real_write_function_package(), save_function_package_as_script(), save_function_package_spec(), serialize_user_vars(), user_fopen(), view_or_save_latex(), write_loaded_functions_file(), and write_session_xml().

◆ gretl_print_new_with_gchar_buffer()

PRN* gretl_print_new_with_gchar_buffer ( gchar *  buf)

gretl_print_new_with_gchar_buffer: @buf: pre-allocated text buffer.

Just as gretl_print_new_with_buffer() except that the buffer is of pointer-to-gchar type, as obtained from one or other GLib function. This means that when the PRN is detroyed the buffer will be freed using GLib's g_free function rather than the standard C library's free function.

Returns: pointer to newly created struct, or NULL on failure.

Definition at line 457 of file gretl_prn.c.

References PRN_::gbuf, GRETL_PRINT_BUFFER, and real_gretl_print_new().

Referenced by data_prn_via_file().

◆ gretl_print_new_with_stream()

PRN* gretl_print_new_with_stream ( FILE *  fp)

gretl_print_new_with_stream: @fp: pre-opened stream.

Creates and initializes a gretl printing struct, with printing to @fp.

Note that @fp will be closed if and when gretl_print_destroy is called on the PRN pointer obtained.

Returns: pointer to newly created struct, or NULL on failure.

Definition at line 485 of file gretl_prn.c.

References fpinfo_::fp, GRETL_PRINT_STREAM, and real_gretl_print_new().

Referenced by plot_with_band(), session_logfile_init(), and time_fit_plot().

◆ gretl_print_new_with_tempfile()

PRN* gretl_print_new_with_tempfile ( int *  err)

gretl_print_new_with_tempfile: @err: location to receive error code.

Create and initialize a gretl printing struct, with output directed to a temporary file, which is deleted when the printing struct is destroyed.

Returns: pointer to newly created struct, or NULL on failure.

Definition at line 380 of file gretl_prn.c.

References GRETL_PRINT_TEMPFILE, and real_gretl_print_new().

Referenced by scratch_logfile_init().

◆ gretl_print_read_tempfile()

char* gretl_print_read_tempfile ( PRN prn,
int *  err 
)

gretl_print_read_tempfile: @prn: gretl printing struct. @err: location to receive error code.

Retrieves a copy of the content of @prn, if it takes the form of a file that has been opened in "w+" or "a+" mode.

Returns: allocated buffer, or NULL on failure.

Definition at line 1800 of file gretl_prn.c.

References E_ALLOC, E_DATA, and PRN_::fp.

Referenced by get_logfile_content(), and view_command_log().

◆ gretl_print_rename_file()

int gretl_print_rename_file ( PRN prn,
const char *  oldpath,
const char *  newpath 
)

gretl_print_rename_file: @prn: printing struct to operate on. @oldpath: name of current file (or NULL if @prn was set up using gretl_print_new_with_tempfile). @newpath: new name for file.

If @prn is printing to a FILE pointer, rename the file to which it is printing and switch the stream to the new file.

Returns: 0 on success, 1 on error.

Definition at line 523 of file gretl_prn.c.

References E_DATA, PRN_::fname, PRN_::fp, gretl_errmsg_get(), gretl_fopen(), gretl_rename(), and prn_fp_list_active().

Referenced by set_session_log().

◆ gretl_print_replace_buffer()

int gretl_print_replace_buffer ( PRN prn,
char *  buf 
)

gretl_print_replace_buffer: @prn: printing struct. @buf: malloced replacement buffer.

If @prn currently has a printing buffer in place, destroy the original and replace it with @buf. Note @prn "takes ownership" of @buf, which will be freed when @prn is destroyed.

Returns: 0 on success, non-zero code on error.

Definition at line 738 of file gretl_prn.c.

References PRN_::blen, PRN_::buf, PRN_::bufsize, E_DATA, and PRN_::savepos.

Referenced by prep_prn_for_file_save().

◆ gretl_print_reset_buffer()

int gretl_print_reset_buffer ( PRN prn)

gretl_print_reset_buffer: @prn: printing struct to operate on.

If @prn has an attached buffer, write a NUL byte to the start of the buffer and reset the count of bytes printed to zero. The next call to @pprintf or similar will then overwite rather than cumulating the printed content.

Returns: 0 on success, 1 if @prn has no buffer.

Definition at line 587 of file gretl_prn.c.

References PRN_::blen, and PRN_::buf.

Referenced by generate_obs_markers(), print_flags(), print_result_to_console(), and real_GUI_function_call().

◆ gretl_print_set_delim()

void gretl_print_set_delim ( PRN prn,
char  delim 
)

gretl_print_set_delim: @prn: printing struct. @delim: desired CSV field-delimiter.

Sets the CSV delimiter on @prn.

Definition at line 905 of file gretl_prn.c.

References PRN_::delim.

Referenced by set_csv_delim().

◆ gretl_print_set_format()

void gretl_print_set_format ( PRN prn,
PrnFormat  format 
)

gretl_print_set_format: @prn: printing struct. @format: desired format code.

Sets the printing format on @prn.

Definition at line 884 of file gretl_prn.c.

References PRN_::format, GRETL_FORMAT_CSV, GRETL_FORMAT_DOC, GRETL_FORMAT_RTF, and set_default_csv_delim().

Referenced by csvprint(), data_to_buf_as_csv(), data_to_buf_as_rtf(), do_modprint(), make_tex_prn(), print_model_table_direct(), rtfprint(), special_text_handler(), and vwin_print_sorted_with_format().

◆ gretl_print_set_has_minus()

void gretl_print_set_has_minus ( PRN prn)

gretl_print_set_has_minus: @prn: printing struct.

Sets the GRETL_FORMAT_HAS_MINUS flag on @prn, indicating that the Unicode minus sign is supported.

Definition at line 935 of file gretl_prn.c.

References PRN_::format, and GRETL_FORMAT_HAS_MINUS.

Referenced by bufopen(), and model_format_start().

◆ gretl_print_set_save_position()

int gretl_print_set_save_position ( PRN prn)

gretl_print_set_save_position: @prn: printing struct.

Sets the current buffer offset as the position from which a chunk of the current buffer may be saved, using gretl_print_get_chunk().

Returns: 0 on success, error code if @prn is not connected to a buffer.

Definition at line 767 of file gretl_prn.c.

References PRN_::blen, PRN_::buf, E_DATA, and PRN_::savepos.

Referenced by handle_flush_callback(), and start_script_output_handler().

◆ gretl_print_steal_buffer()

char* gretl_print_steal_buffer ( PRN prn)

gretl_print_steal_buffer: @prn: printing struct.

Obtain a pointer to the buffer associated with @prn, if any. The pointer on @prn itself is set to NULL and the caller takes responsibility for freeing the buffer.

Returns: the buffer, or NULL on failure.

Definition at line 713 of file gretl_prn.c.

References PRN_::buf.

Referenced by cmd_to_buf(), dbn_dataset_search_results(), display_function_package_data(), do_join_command(), do_sprintf_function(), get_native_data(), gretl_bundle_write_to_buffer(), gretl_string_table_add_extra(), handle_adhoc_string(), handle_compact_spread(), json_get_string(), make_help_viewer(), maybe_do_markup(), nl_model_add_spec_info(), prn_to_clipboard(), read_from_pipe(), show_sample_callback(), utf8_to_rtf(), and xml_get().

◆ gretl_print_tell()

int gretl_print_tell ( PRN prn)

gretl_print_tell: @prn: printing struct.

Returns: the current write position, if @prn has a buffer attached, otherwise -1.

Definition at line 854 of file gretl_prn.c.

References PRN_::blen, and PRN_::buf.

Referenced by gui_exec_line().

◆ gretl_print_toggle_doc_flag()

void gretl_print_toggle_doc_flag ( PRN prn)

gretl_print_toggle_doc_flag: @prn: printing struct.

Toggles the GRETL_FORMAT_DOC flag on @prn.

Definition at line 919 of file gretl_prn.c.

References PRN_::format, and GRETL_FORMAT_DOC.

Referenced by gretl_VAR_print(), and print_model_table_direct().

◆ gretl_print_unset_save_position()

void gretl_print_unset_save_position ( PRN prn)

gretl_print_unset_save_position: @prn: printing struct.

Erases the "save position" offset as set by gretl_print_set_save_position().

Definition at line 785 of file gretl_prn.c.

References PRN_::savepos.

◆ gretl_prn_newline()

◆ plain_format()

◆ pprintf()

int pprintf ( PRN prn,
const char *  format,
  ... 
)

pprintf: @prn: gretl printing struct. @format: as in the C library's printf(). @Varargs: arguments to be printed.

Multi-purpose printing function: can output to stream, to buffer or to nowhere (silently discarding the output), depending on how @prn was initialized. Note that it's preferable to use pputs() for large chunks of fixed text.

Returns: the number of bytes printed, or -1 on memory allocation failure.

Definition at line 1044 of file gretl_prn.c.

References PRN_::blen, PRN_::buf, PRN_::bufsize, PRN_::fixed, PRN_::fp, PRN_::fz, get_nl_count(), MINREM, PRN_::nlcount, pprintf_init(), and realloc_prn_buffer().

Referenced by acf_1(), add_fcast_to_dataset(), add_model_command_to_stack(), addconst_message(), admm_lasso(), alt_print_coeff_table_start(), alt_print_count_offset(), alternate_stats_message(), analyse_daily_import(), anova_print_means(), ar1_mle(), ar_model(), arma_extra_info(), arma_init_message(), arma_OPG_vcv(), ascii_plot(), auto_drop_var(), auto_omit(), autocorr_message(), aux_print_info_criteria(), bg_test_header(), bhhh_arma_simple(), BKW_analyse(), BKW_print(), box_stats_leader(), boxplot_print_stats(), breusch_pagan_LM(), bs_print_result(), build_package_from_spec_file(), bundle_header(), call_cross_validation(), ccd_print(), check_daily_dates(), check_derivatives(), check_first_field(), check_folds_series(), check_for_loop_only_options(), check_function_args(), check_imported_varname(), check_mimetype(), check_new_variable_types(), check_old_variable_types(), check_simul_inputs(), check_svm_params(), cli_exec_callback(), cli_exec_line(), cli_help(), cli_open_append(), cli_parse_object_request(), cli_saved_object_action(), cli_validate_package_file(), cluster_vcv_line(), coded_var_show_opts(), coint_test_header(), coint_test_print_exog(), comfac_test(), compute_coint_test(), compute_vifs(), consistent_qm_labels(), context_error(), corrgm_ascii_plot(), corrgram(), count_missing_values(), covhdr(), crosstab(), csv_daily_date_check(), csv_fields_check(), csv_max_line_length(), csv_missval(), csv_print_coeff(), csv_print_test(), csv_varname_scan(), cusum_harvey_collier(), cusum_test(), data_read_message(), data_report(), db_delete_series(), db_get_series(), dbn_dataset_search_results(), dbn_general_search_results(), dbnomics_get_dimensions_call(), delete_user_vars_of_type(), determine_gdt_matches(), DF_header(), diff_test_header(), do_assert(), do_choi_test(), do_command_by(), do_dwpval(), do_h_test(), do_help_on_help(), do_IPS_test(), do_join_command(), do_load_model(), do_outfile_command(), do_proportion_sums(), do_save_model(), do_set_help(), do_two_means_test(), dollar_str_node(), dpd_asy_vcv_line(), dta_get_data(), dw_lookup_call(), edit_sample_callback(), engle_granger_test(), equation_system_serialize(), errmsg(), estimate_rho(), execute_script(), execute_set(), extract_lhs_and_op(), fcast_print_x(), file_get_content(), fiml_driver(), fiml_print_gradients(), finalize_fractint(), finalize_xlsx_import(), fishers_exact_test(), fit_resid_head(), five_numbers_with_interval(), foreign_execute(), func_help_topics(), function_assign_returns(), function_noargs_error(), function_set_package_role(), garch_estimate(), garch_iter_info(), garch_print_init(), garch_variance_line(), gen_panel_dummies(), gen_save_or_print(), gen_write_message(), get_cell_basics(), get_col_info(), get_line_continuation(), get_max_line_length(), get_quoted_string(), get_summary(), get_summary_restricted(), get_summary_weighted(), get_svm_ranges(), gini(), GLS_demean_detrend(), GMM_crit_line(), gmm_print_oc(), gnuplot(), godfrey_test_string(), graphyzx(), gretl_anova(), gretl_array_print(), gretl_array_print_range(), gretl_array_serialize(), gretl_bundle_serialize(), gretl_cmatrix_print_range(), gretl_cmatrix_printf(), gretl_cmd_exec(), gretl_finite_scalar_serialize(), gretl_function_exec(), gretl_fzero(), gretl_gss(), gretl_join_data(), gretl_list_print(), gretl_list_serialize(), gretl_loop_exec(), gretl_matrix_print_with_format(), gretl_matrix_serialize(), gretl_matrix_write_to_file(), gretl_model_serialize(), gretl_model_test_print_direct(), gretl_normality_test(), gretl_odbc_connect_to_dsn(), gretl_odbc_get_data(), gretl_recode_file(), gretl_simann(), gretl_start_compiling_function(), gretl_string_serialize(), gretl_string_table_index(), gretl_string_table_print(), gretl_sum_test(), gretl_system_print(), gretl_test_print_h_0(), gretl_test_print_heading(), gretl_tex_preamble(), gretl_VAR_print(), gretl_VAR_print_fcast_decomp(), gretl_VAR_print_impulse_response(), gretl_VAR_print_lagsel(), gretl_VAR_real_omit_test(), gretl_VAR_serialize(), gretl_VAR_wald_omit_test(), gretl_xml_put_double(), gretl_xml_put_double_array(), gretl_xml_put_int(), gretl_xml_put_strings_array(), gretl_xml_put_strings_array_quoted(), gretl_xml_put_tagged_list(), gretl_xml_put_tagged_string(), gretl_xml_put_tagged_string_plus(), gretl_xml_put_unsigned(), gui_exec_line(), gui_logo(), gui_matrix_from_list(), gui_output_line(), gui_parse_object_request(), gui_saved_object_action(), gui_script_logo(), hac_vcv_line(), handle_adhoc_string(), handle_datafile(), hc_vcv_line(), hurst_calc(), hurst_exponent(), ic_adjust_order(), import_octave(), import_other(), import_spreadsheet(), importer_dates_check(), install_function_package(), interval_estimate(), iso_country(), ivreg_autocorr_test(), ivreg_nlfunc_setup(), johansen_LR_calc(), johansen_serialize(), kalman_arma(), kendall_tau(), label_array_header(), lasso_lambda_report(), lb_autocorr_test(), leverage_print(), lex(), lex_try_utf8(), lib_open_append(), lib_run_prog_sync(), libset_header(), libset_print_bool(), libset_print_double(), libset_print_int(), libset_query_settings(), list_ok_dollar_vars(), list_series(), list_user_vars_of_type(), load_function_package(), logit_probit_stats(), loop_check_deletion(), loop_delete_object(), loop_report_error(), make_help_viewer(), make_named_month_tics(), make_panel_unit_tics(), make_time_tics(), matrix_def_node(), matrix_from_scalars(), maybe_add_amp(), maybe_delete_function(), maybe_print(), maybe_print_col_heads(), maybe_print_depvar(), maybe_print_jll(), maybe_print_panel_info(), maybe_print_R_info(), maybe_print_T(), maybe_print_weak_insts_test(), maybe_save_graph(), maybe_schedule_graph_callback(), maybe_set_yscale(), maybe_stack_model(), maybe_unload_function_package(), means_test(), merge_name_error(), middle_table_row(), ml_vcv_line(), mle_calculate(), mnl_probs_callback(), model_print_driver(), model_test_driver(), multi_eqn_wald_test(), multivariate_arch_test(), multivariate_autocorr_test(), multivariate_normality_test(), nelder_mead(), new_package_info_from_spec(), new_pkg_from_spec_file(), nl_model_add_spec_info(), nl_parse_line(), nlspec_print_gmm_info(), node_type_error(), non_numeric_check(), obs_node(), odbc_get_series(), odbc_read_rows(), odbc_transcribe_data(), ods_error(), ods_read_content(), ols_print_anova(), open_nulldata(), optim_get_user_values(), output_help_text(), output_json_node_value(), outxx(), package_make_zipfile(), package_write_index(), package_write_translatable_strings(), panel_DF_test(), panel_diagnostics(), panel_kpss_test(), panel_unit_DF_print(), panel_variance_lines(), panel_vcv_line(), panel_wls_by_unit(), panel_xdepend_test(), param_search_finalize(), parse_dta_117_header(), parse_old_dta_header(), parser_print_input(), pca_print(), pd_from_date_label(), pergm_print(), pkg_zipfile_add(), plain_print_act_pred(), plain_print_aux_coeffs(), plain_print_coeffs(), plain_print_model_table(), plain_print_mp_coeffs(), plain_print_package_info(), plain_print_sy_vals(), post_xvalidation_task(), pre_process_args(), print_add_omit_null(), print_adf_results(), print_anova(), print_ar_aux_model(), print_ar_sum(), print_arg(), print_arma_depvar(), print_arma_roots(), print_array_elements(), print_array_string(), print_aux_string(), print_beta_and_alpha(), print_beta_or_alpha(), print_bp_results(), print_bundle_tree(), print_bundled_item(), print_by_obs(), print_by_var(), print_centered(), print_coeff_interval(), print_coeff_left_string(), print_coeff_separator(), print_coeff_table_end(), print_compare(), print_contemp_covariance_matrix(), print_count_offset(), print_critical_values(), print_critval(), print_csv_parsing_header(), print_data_in_columns(), print_df_model(), print_double_formatted(), print_DPD_stats(), print_duration_alpha(), print_equation_stats(), print_equation_system_info(), print_estimator_strings(), print_extra_list(), print_fatal_error(), print_fcast_stats_matrix(), print_fe_results(), print_flags(), print_freq(), print_freq_test(), print_function_info(), print_function_start(), print_GNR_info(), print_grid(), print_hausman_result(), print_heckit_stats(), print_HET_1_results(), print_info(), print_initmat(), print_int_formatted(), print_intreg_depvar(), print_intreg_info(), print_iter_info(), print_iter_val(), print_ivreg_droplist(), print_ivreg_instruments(), print_johansen_sigmas(), print_kalman_bundle_info(), print_labelsets(), print_liml_equation_data(), print_long_run_matrix(), print_LR_stat(), print_min_max_deflt(), print_model_chi2_test(), print_model_droplist(), print_model_head(), print_model_heading(), print_model_iter_info(), print_model_stats_table(), print_model_table_coeffs(), print_model_table_direct(), print_mult(), print_normal_critval(), print_normality_stat(), print_NR_status(), print_option_param(), print_or_save_result(), print_package_code(), print_package_help(), print_package_info(), print_panel_AR_test(), print_param_description(), print_param_labels(), print_probit_rho(), print_pv(), print_pv_string(), print_pvalue(), print_raw_and_ranked(), print_re_results(), print_restricted_estimates(), print_restriction(), print_restriction_from_matrices(), print_restriction_set(), print_rho(), print_root(), print_rq_sequence(), print_rtf_row_spec(), print_sample_obs(), print_sample_status(), print_scalar_by_name(), print_scalars(), print_series_with_format(), print_settings(), print_smpl(), print_stringvals_for_var(), print_summary(), print_summary_single(), print_system_equation(), print_system_identity(), print_system_overid_test(), print_test_opt(), print_test_round(), print_unit_variances(), print_var_smpl(), print_VECM_coint_eqns(), print_vecm_header_info(), print_VECM_omega(), print_wald_test(), print_whites_results(), print_xtab(), print_xvalid_iter(), print_z_prob(), printcorr(), printf11(), printf15(), printf_as_int(), printf_rtf(), printf_series(), printf_tex(), printk_rtf(), printk_tex(), printmodel(), printnode(), printres(), prntdate(), process_item(), process_sheet(), process_stata_format(), process_stata_varlabel(), process_stata_varname(), process_value_labels(), process_xv_criterion(), pval_max_line(), pwe_error(), QLR_print_result(), query_package(), range_mean_graph(), rank_sum_lookup(), rank_sum_test(), read_dta_117_data(), read_old_dta_data(), read_or_write_obs_markers(), read_or_write_var_labels(), read_params_bundle(), real_bootstrap(), real_chow_test(), real_do_printf(), real_gretl_print_new(), real_GUI_function_call(), real_import_csv(), real_kpss_test(), real_levin_lin(), real_mahalanobis_distance(), real_matrix_print_to_prn(), real_nl_model(), real_nonlinearity_test(), real_panel_model(), real_print_obs_marker(), real_print_xtab(), real_read_labels_and_data(), real_stack_object(), real_svm_predict(), real_user_function_help(), real_write_data(), real_write_function_package(), real_write_gdt(), real_xml_get(), recode_print_line(), regls_xv(), regular_autocorr_test(), remember_list(), repeat_data_row(), report_plot_written(), report_result(), reset_test(), reverse_data(), ridge_print(), root_start(), row_col_err(), rq_vcv_line(), rsqline(), rssline(), rtf_fit_resid_head(), rtf_outxx(), rtf_print_coeff(), rtf_print_double(), rtf_print_model_table(), rtf_print_obs_marker(), rtf_print_row_spec(), rtf_vmat_row(), rtfprint_coeff_interval(), rtfprint_confints(), rtfprint_fcast_with_errs(), rtfprint_fcast_without_errs(), rtfprint_fit_resid(), rtfprint_simple_summary(), rtfprint_summary_full(), rtfprint_vmatrix(), run_include_error(), run_script(), runs_test(), save_function_package_as_script(), save_function_package_spec(), save_text_buffer(), scalars_to_prn(), scratch_logfile_init(), script_delete_function_package(), script_open_append(), serialize_coeff_sep(), serialize_model_data_items(), serialize_model_tests(), serialize_scalar_value(), serialize_test(), serialize_user_vars(), serialize_vcv_info(), session_logfile_init(), session_time(), set_db_name(), set_executing_off(), set_foreign_lang(), set_initmat(), set_miss(), set_odbc_dsn(), show_lags_test(), show_numbers_from_markers(), show_regression_results(), show_sample_callback(), showlabels(), sign_test(), signed_rank_test(), single_series_view_print(), six_numbers(), spearman_rho(), ssrline(), start_fncall(), string_print_range(), summary_print_val(), summary_print_varname(), svm_predict_main(), switchit(), sys_converged(), system_arch_test(), system_autocorrelation_test(), system_do_LR_test(), system_print_sigma(), t_adjust_order(), tdisagg_get_options(), test_markers_for_dates(), tex_beta_vname(), tex_coeff_table_start(), tex_custom_coeff_table_start(), tex_fit_resid_head(), tex_matnum(), tex_outxx(), tex_print_coeff(), tex_print_coeff_custom(), tex_print_equation(), tex_print_model_table(), tex_print_obs_marker(), tex_print_VAR_ll_stats(), tex_print_VECM_coint_eqns(), tex_print_VECM_omega(), tex_print_x(), tex_xtab_heading(), texprint_coeff_interval(), texprint_confints(), texprint_fcast_stats(), texprint_fcast_with_errs(), texprint_fcast_without_errs(), texprint_fit_resid(), texprint_simple_summary(), texprint_summary_full(), texprint_vmatrix(), text_print_equation(), text_print_fit_resid(), text_print_forecast(), text_print_model_confints(), text_print_vmatrix(), text_print_x_y_fitted(), tobit_via_intreg(), try_run_include(), tsls_hausman_test(), tsls_hetero_test(), type_value_from_string(), undefined_symbol_error(), uninstall_function_package(), univariate_arch_test(), univariate_autocorr_test(), unmatched_symbol_error(), update_addons_index(), user_arma_init(), user_BFGS(), user_function_help(), user_var_delete_by_name(), utf8_to_rtf(), VAR_info_header_block(), VAR_info_print_period(), VAR_info_print_vname(), VAR_print_LB_stat(), VAR_RTF_row_spec(), varheading(), vars_test(), vecm_beta_test(), vecm_id_check(), vecm_print_LR_test(), view_matrix_properties(), warnmsg(), write_dataset_submask(), write_foreign_io_file(), write_function_xml(), write_garch_stats(), write_loaded_functions_file(), write_model_submask(), write_scalar_message(), write_scalar_value(), write_session_xml(), write_user_scalars(), wsheet_parse_cells(), xcorrgm_ascii_plot(), xcorrgram(), xls_get_data(), xlsx_check_dimensions(), xlsx_check_top_left(), xlsx_gather_sheet_names(), xlsx_read_row(), xlsx_read_shared_strings(), xlsx_read_worksheet(), xlsx_set_obs_string(), xlsx_verify_specific_sheet(), xml_get_multi(), xml_print_identity(), xml_put_bundled_item(), xv_ridge_print(), and zip_report().

◆ pprintf2()

void pprintf2 ( PRN prn,
const char *  format,
  ... 
)

◆ pputc()

int pputc ( PRN prn,
int  c 
)

pputc: @prn: gretl printing struct. : character to print

Returns: the number of bytes printed, or -1 on memory allocation failure.

Definition at line 1238 of file gretl_prn.c.

References PRN_::blen, PRN_::buf, PRN_::bufsize, PRN_::fixed, PRN_::fp, PRN_::fz, MINREM, PRN_::nlcount, and realloc_prn_buffer().

Referenced by add_fcast_to_dataset(), alt_print_coeff_table_start(), analyse_daily_import(), ar_model(), ascii_plot(), ascii_scatter(), auto_drop_var(), auto_omit(), aux_print_info_criteria(), beck_katz_failed_line(), bg_test_header(), biprobit_first_pass(), BKW_analyse(), BKW_print(), breusch_pagan_LM(), bs_print_result(), bufprint_string(), bufspace(), ccd_print(), check_bootstrap(), check_for_loop_only_options(), check_imported_varname(), check_new_variable_types(), check_old_variable_types(), check_subsample_n(), clear_model_table(), cli_exec_line(), cli_parse_object_request(), cli_validate_package_file(), cluster_vcv_line(), coded_var_show_opts(), comfac_test(), compute_coint_test(), compute_vifs(), corrgram(), count_missing_values(), csv_print_coeff(), csv_print_test(), cusum_test(), data_read_message(), db_get_series(), DF_header(), diff_test_header(), do_assert(), do_command_by(), do_h_test(), do_help_on_help(), do_proportion_sums(), do_set_help(), do_sprintf_function(), do_stata_printout(), do_two_means_test(), dpd_asy_vcv_line(), drawline(), dta_get_data(), edit_sample_callback(), engle_granger_test(), equation_system_estimate(), estimate_rho(), exact_fit_check(), fiml_driver(), fiml_print_gradients(), finalize_autocorr_test(), finalize_hausman_test(), fishers_exact_test(), fit_resid_head(), func_help_topics(), garch_iter_info(), garch_print_init(), garch_variance_line(), gen_save_or_print(), gen_write_message(), get_line_continuation(), gini(), gmm_print_oc(), godfrey_test_string(), graphyzx(), gretl_anova(), gretl_bundle_print(), gretl_bundle_print_tree(), gretl_cmatrix_print_range(), gretl_cmatrix_printf(), gretl_cmd_exec(), gretl_function_print_code(), gretl_list_print(), gretl_loop_exec(), gretl_matrix_print_with_format(), gretl_matrix_write_to_file(), gretl_model_test_print_direct(), gretl_normality_test(), gretl_print_ensure_vspace(), gretl_printxn(), gretl_prn_newline(), gretl_simann(), gretl_system_print(), gretl_test_print_h_0(), gretl_VAR_print(), gretl_VAR_print_fcast_decomp(), gretl_VAR_print_impulse_response(), gretl_VAR_print_lagsel(), gui_exec_line(), gui_help_text_callback(), gui_logo(), gui_matrix_from_list(), gui_output_line(), gui_parse_object_request(), gui_script_logo(), handle_adhoc_string(), hc_vcv_line(), hurst_exponent(), ic_adjust_order(), import_other(), import_spreadsheet(), ivreg_autocorr_test(), ivreg_nlfunc_setup(), johansen_LR_calc(), kendall_tau(), lambda_sequence_header(), lb_autocorr_test(), LBFGS_max(), leverage_print(), lib_run_prog_sync(), list_ok_dollar_vars(), list_series(), list_user_vars_of_type(), logit_probit_stats(), matrix_from_scalars(), matrix_print_as_csv(), maybe_print_col_heads(), maybe_print_hessian_warning(), maybe_print_lad_warning(), maybe_set_yscale(), mnl_probs_callback(), multi_eqn_wald_test(), multivariate_arch_test(), multivariate_autocorr_test(), multivariate_normality_test(), new_pkg_from_spec_file(), newton_raphson_max(), nl_model_add_spec_info(), nl_parse_line(), nls_robust_failed_line(), node_type_error(), nonlin_test_header(), odbc_read_rows(), ods_error(), optim_get_user_values(), output_line(), panel_DF_test(), panel_diagnostics(), panel_kpss_test(), panel_variance_lines(), panel_vcv_line(), panel_wls_by_unit(), pca_print(), pergm_print(), plain_print_act_pred(), plain_print_aux_coeffs(), plain_print_coeffs(), plain_print_model_table(), plain_print_mp_coeffs(), plain_print_package_info(), pooled_autocorr_test(), prhdr(), print_add_omit_null(), print_add_omit_varnames(), print_adf_results(), print_anova(), print_arg(), print_array_elements(), print_aux_string(), print_beta_alpha_Pi(), print_beta_and_alpha(), print_beta_or_alpha(), print_bundled_item(), print_by_obs(), print_by_var(), print_coeff_interval(), print_coeff_separator(), print_coeff_table_end(), print_compare(), print_contemp_covariance_matrix(), print_corrmat(), print_count_offset(), print_critval(), print_data_in_columns(), print_df_model(), print_equation_stats(), print_equation_system_info(), print_extra_list(), print_fcast_stats_matrix(), print_fe_results(), print_freq(), print_freq_test(), print_function_start(), print_grid(), print_heckit_stats(), print_intreg_info(), print_iter_info(), print_ivreg_droplist(), print_johansen_sigmas(), print_labelsets(), print_lags_by_varnum(), print_long_run_matrix(), print_middle_table(), print_min_max_deflt(), print_model_droplist(), print_model_from_matrices(), print_model_heading(), print_model_iter_info(), print_model_stats_table(), print_normal_critval(), print_option_param(), print_or_save_result(), print_package_code(), print_package_info(), print_param_labels(), print_raw_and_ranked(), print_re_results(), print_restricted_estimates(), print_restriction_from_matrices(), print_restriction_set(), print_root(), print_rq_sequence(), print_rtf_row_spec(), print_scalars(), print_sep_row(), print_series_by_var(), print_series_with_format(), print_settings(), print_smpl(), print_stringvals_for_var(), print_summary(), print_summary_single(), print_system_equation(), print_system_identity(), print_system_overid_test(), print_user_var_by_name(), print_var_lags(), print_VECM_coint_eqns(), print_vecm_header_info(), print_VECM_omega(), print_xtab(), printcorr(), printdata(), printf11(), printf15(), printf_escape(), printf_series(), printnode(), printres(), process_item(), put_midas_nls_line(), QLR_print_result(), range_mean_graph(), rank_sum_test(), real_add_to_model_table(), real_adf_test(), real_bootstrap(), real_chow_test(), real_do_printf(), real_echo_command(), real_json_get(), real_kpss_test(), real_levin_lin(), real_mahalanobis_distance(), real_matrix_print_to_prn(), real_nonlinearity_test(), real_print_xtab(), real_user_function_help(), real_write_log_entry(), realgen(), reflow_label(), regular_autocorr_test(), regular_help_text_callback(), reset_test(), rtf_print_model_table(), rtf_print_row_spec(), run_prog_sync(), runs_test(), save_function_package_as_script(), save_function_package_spec(), serialize_coeff_sep(), serialize_model_data_items(), set_command_vstart(), set_db_name(), set_initmat(), show_obj_value(), showlabels(), signed_rank_test(), single_series_view_print(), six_numbers(), spearman_rho(), summary_print_val(), switchit(), system_arch_test(), system_do_LR_test(), system_print_sigma(), terminate_coeff_row(), tex_coeff_table_start(), tex_custom_coeff_table_start(), tex_print_equation(), tex_print_model_table(), tex_print_VECM_coint_eqns(), tex_print_VECM_omega(), texprint_simple_summary(), texprint_summary_full(), texprint_vmatrix(), text_print_equation(), text_print_fit_resid(), text_print_forecast(), text_print_model_confints(), text_print_vmatrix(), text_print_x_y_fitted(), u_addr_base(), univariate_autocorr_test(), user_var_delete_by_name(), utf8_to_rtf(), VAR_info_end_row(), VAR_info_end_table(), VAR_RTF_row_spec(), varheading(), vecm_print_LR_test(), vecm_print_restrictions(), view_matrix_properties(), win32_pprint_nonfinite(), wooldridge_autocorr_test(), write_garch_stats(), xcorrgram(), xlsx_read_row(), xml_get_multi(), xml_put_bundled_item(), xport_get_data(), and xv_ridge_print().

◆ pputs()

int pputs ( PRN prn,
const char *  s 
)

pputs: @prn: gretl printing struct. @s: constant string to print.

Returns: the number of bytes printed, or -1 on memory allocation failure.

Definition at line 1185 of file gretl_prn.c.

References PRN_::blen, PRN_::buf, PRN_::bufsize, PRN_::fixed, PRN_::fp, PRN_::fz, get_nl_count(), MINREM, PRN_::nlcount, and realloc_prn_buffer().

Referenced by alt_print_coeff_table_start(), alt_print_coefficients(), alt_print_count_offset(), analyse_daily_import(), ar_model(), arma_extra_info(), ascii_plot(), auto_drop_var(), autocorr_message(), aux_print_info_criteria(), beck_katz_failed_line(), bhhh_arma_callback(), bhhh_max(), BKW_analyse(), boxplot_print_stats(), breusch_pagan_LM(), bs_print_result(), bufprint_string(), build_package_from_spec_file(), bundle_header(), call_cross_validation(), ccd_print(), check_bootstrap(), check_derivatives(), check_first_field(), check_imported_varname(), check_new_variable_types(), check_old_variable_types(), check_subsample_n(), check_svm_params(), clear_model_table(), cli_exec_line(), cli_open_append(), cli_quit(), cli_validate_package_file(), cluster_vcv_line(), coded_var_show_opts(), comfac_test(), compute_coint_test(), compute_vifs(), context_error(), corrgram(), csv_daily_date_check(), csv_max_line_length(), csv_print_coeff(), csv_read_data(), csv_recode_input(), csv_unicode_check(), csv_varname_scan(), cusum_test(), data_report(), dates_maybe_reversed(), dbn_dataset_search_results(), dbn_general_search_results(), dbnomics_get_dimensions_call(), diff_test(), do_bfgs(), do_dwpval(), do_help_on_help(), do_join_command(), do_load_model(), do_outfile_command(), do_pca(), do_save_model(), do_search_prep(), do_stata_printout(), dpd_asy_vcv_line(), drawline(), dta_get_data(), edit_sample_callback(), engle_granger_test(), ensure_vsep(), equation_system_estimate(), equation_system_serialize(), exact_fit_check(), execute_set(), finalize_hausman_test(), finalize_xlsx_import(), fit_resid_head(), freqdist(), func_help_topics(), garch_iter_info(), garch_print_init(), gen_special(), get_cell_basics(), get_sheet_dimensions(), gini(), GNR(), gnumeric_get_data(), godfrey_test_string(), graphyzx(), gretl_array_serialize(), gretl_bundle_serialize(), gretl_cmatrix_print_range(), gretl_cmatrix_printf(), gretl_cmd_exec(), gretl_delete_variables(), gretl_function_print_code(), gretl_join_data(), gretl_libsvm_print(), gretl_list_print(), gretl_list_serialize(), gretl_loop_exec(), gretl_matrix_serialize(), gretl_model_serialize(), gretl_model_test_print_direct(), gretl_normality_test(), gretl_print_fullwidth_double(), gretl_printxn(), gretl_prn_newline(), gretl_svm_driver(), gretl_system_print(), gretl_test_print_h_0(), gretl_test_print_heading(), gretl_tex_preamble(), gretl_VAR_print(), gretl_VAR_print_all_fcast_decomps(), gretl_VAR_print_all_impulse_responses(), gretl_VAR_print_fcast_decomp(), gretl_VAR_print_impulse_response(), gretl_VAR_print_lagsel(), gretl_VAR_serialize(), gretl_xml_header(), gretl_xml_put_double_array(), gretl_xml_put_string(), gretl_xml_put_strings_array(), gretl_xml_put_strings_array_quoted(), gretl_xml_put_tagged_list(), gretl_xml_put_tagged_string_plus(), gui_exec_line(), gui_help_text_callback(), gui_logo(), gui_output_line(), hac_vcv_line(), handle_adhoc_string(), hausman_regression_result(), hc_vcv_line(), hurst_exponent(), import_octave(), import_ts_check(), ivreg_nlfunc_setup(), jmulti_get_data(), johansen_coint_test(), johansen_serialize(), johansen_stage_1(), join_import_csv(), kalman_arma_ll(), kalman_serialize(), kendall_tau(), lambda_sequence_header(), last_model_test_ok(), lb_autocorr_test(), leverage_print(), lib_open_append(), lib_run_prog_sync(), libset_header(), list_user_vars_of_type(), logit_probit_stats(), loop_delete_object(), make_calendar_tics(), make_GNR_dataset(), make_named_month_tics(), make_panel_unit_tics(), make_time_tics(), matrix_print_as_csv(), maybe_print_hessian_warning(), maybe_print_lad_warning(), maybe_print_panel_info(), maybe_print_R_info(), maybe_show_midas_method(), maybe_show_SA_method(), maybe_write_aux_file(), mdata_text_received(), means_test(), merge_data(), merge_error(), midas_nls_setup(), middle_table_row(), model_format_end(), model_format_start(), multi_eqn_wald_test(), multivariate_arch_test(), multivariate_autocorr_test(), multivariate_normality_test(), new_package_info_from_spec(), new_pkg_from_spec_file(), nl_model_add_spec_info(), nls_robust_failed_line(), node_type_error(), non_numeric_check(), nonlin_test_header(), odbc_read_rows(), ods_error(), ods_get_data(), ods_sheet_prune(), ols_print_anova(), optim_get_user_values(), ordered_estimate(), output_help_line(), output_json_node_value(), output_line(), package_make_zipfile(), package_write_index(), panel_diagnostics(), panel_hausman_test(), panel_kpss_test(), panel_unit_DF_print(), panel_vcv_line(), panel_xdepend_test(), param_search_finalize(), pca_print(), pd_from_date_label(), pergm_print(), perma_sample(), plain_print_act_pred(), plain_print_package_info(), plain_print_sy_vals(), prepare_gretl_dataset(), print_add_omit_null(), print_add_omit_varnames(), print_adf_results(), print_anova(), print_arg(), print_arma_roots(), print_array_elements(), print_aux_string(), print_beta_and_alpha(), print_bundle_tree(), print_by_obs(), print_centered(), print_coeff_left_string(), print_coeff_separator(), print_coeff_table_end(), print_compare(), print_contemp_covariance_matrix(), print_critval(), print_data_in_columns(), print_df_model(), print_DPD_stats(), print_equation_stats(), print_equation_system_info(), print_extra_list(), print_fcast_stats_matrix(), print_fe_results(), print_flags(), print_freq(), print_function_start(), print_GNR_info(), print_grid(), print_hausman_result(), print_info(), print_intreg_info(), print_iter_info(), print_iterations(), print_ivreg_droplist(), print_ivreg_instruments(), print_Johansen_test_case(), print_kalman_bundle_info(), print_labelsets(), print_lags_by_varnum(), print_middle_table(), print_min_max_deflt(), print_model_chi2_test(), print_model_droplist(), print_model_heading(), print_model_stats_table(), print_model_table_coeffs(), print_model_tests(), print_mult(), print_normal_critval(), print_opt_flags(), print_option_param(), print_package_code(), print_package_help(), print_package_info(), print_padded_head(), print_padded_value(), print_panel_AR_test(), print_param_labels(), print_re_results(), print_restriction(), print_restriction_from_matrices(), print_restriction_set(), print_rho(), print_root(), print_rq_sequence(), print_series_by_var(), print_series_with_format(), print_settings(), print_summary(), print_summary_single(), print_system_equation(), print_system_overid_test(), print_unit_variances(), print_user_var_by_name(), print_var_lags(), print_VECM_coint_eqns(), print_VECM_omega(), print_x12a_error_file(), print_xvalid_iter(), printcorr(), printgx(), printnode(), printres(), printsymb(), process_command_error(), put_asts(), put_midas_nls_line(), pval_max_line(), QLR_print_result(), random_effects(), range_mean_graph(), read_from_pipe(), read_params_bundle(), read_wf1_variables(), real_add_to_model_table(), real_bundle_print(), real_chow_test(), real_do_printf(), real_echo_command(), real_import_csv(), real_kpss_test(), real_levin_lin(), real_matrix_print_to_prn(), real_nl_model(), real_panel_model(), real_print_gfn_data(), real_print_xtab(), real_user_function_help(), real_write_function_package(), real_write_gdt(), real_write_log_entry(), recode_print_line(), reflow_label(), reflow_line(), reflow_log_line(), regular_help_text_callback(), relay_mpi_output(), report_result(), reprobit_estimate(), reset_test(), ridge_print(), root_start(), rtf_fit_resid_head(), rtf_print_coeff(), rtf_print_model_table(), rtf_print_row_spec(), rtf_table_pad(), rtf_vmat_blank_row(), rtf_vmat_row(), rtfprint_coeff_interval(), rtfprint_confints(), rtfprint_fcast_with_errs(), rtfprint_fcast_without_errs(), rtfprint_fit_resid(), rtfprint_simple_summary(), rtfprint_summary_full(), rtfprint_vmatrix(), run_prog_sync(), sav_get_data(), save_function_package_as_script(), save_function_package_spec(), scratch_logfile_init(), script_open_append(), serialize_coeff_sep(), serialize_model_data_items(), serialize_model_tests(), serialize_test(), serialize_vcv_info(), set_command_vstart(), set_executing_off(), set_miss(), set_odbc_dsn(), set_or_store_sv_parm(), show_numbers_from_markers(), sign_test(), spearman_rho(), sscanf_driver(), start_fncall(), svm_predict_main(), switchit(), terminate_coeff_row(), test_markers_for_dates(), test_restriction_set(), tex_coeff_table_end(), tex_coeff_table_start(), tex_custom_coeff_table_start(), tex_fit_resid_head(), tex_print_coeff_custom(), tex_print_double(), tex_print_equation(), tex_print_model_table(), tex_print_VAR_ll_stats(), tex_print_VECM_coint_eqns(), tex_print_VECM_omega(), tex_print_x(), tex_xtab_heading(), texprint_coeff_interval(), texprint_confints(), texprint_fcast_stats(), texprint_fcast_with_errs(), texprint_fcast_without_errs(), texprint_fit_resid(), texprint_simple_summary(), texprint_summary_full(), texprint_vmatrix(), text_print_equation(), text_print_fit_resid(), text_print_forecast(), text_print_vmatrix(), text_print_x_y_fitted(), time_series_label_check(), u_addr_base(), update_addons_index(), VAR_info_end_row(), VAR_info_end_table(), VAR_info_header_block(), VAR_info_print_vname(), VAR_RTF_row_spec(), varheading(), vars_test(), vecm_id_check(), vecm_print_LR_test(), vecm_print_restrictions(), view_matrix_properties(), view_or_save_latex(), wf1_get_data(), win32_pprint_nonfinite(), within_variance(), write_binary_order(), write_dataset_submask(), write_function_xml(), write_loaded_functions_file(), write_model_submask(), write_scalar_message(), write_session_xml(), write_user_scalars(), wsheet_parse_cells(), xcorrgram(), xls_get_data(), xlsx_check_dimensions(), xlsx_gather_sheet_names(), xlsx_get_data(), xlsx_read_row(), xlsx_read_worksheet(), xml_print_identity(), xml_put_bundled_item(), xport_get_data(), xv_ridge_print(), and zip_report().

◆ print_end_redirection()

int print_end_redirection ( PRN prn)

print_end_redirection: @prn: gretl printing struct.

If the output of @prn has been diverted relative to its original setting, terminate the redirection.

Returns: 0 on success, 1 on error.

Definition at line 1589 of file gretl_prn.c.

References E_DATA, PRN_::fixed, PRN_::fp, and prn_pop_stream().

Referenced by do_outfile_command(), and process_command_error().

◆ print_redirected_at_level()

int print_redirected_at_level ( PRN prn,
int  level 
)

Definition at line 1525 of file gretl_prn.c.

References fi, PRN_::fplist, and fpinfo_::level.

Referenced by redirection_ok().

◆ print_redirection_filename()

const char* print_redirection_filename ( PRN prn)

print_redirection_filename: @prn: gretl printing struct.

Returns: the name of the file to which output is currently redirected, if applicable, otherwise NULL.

Definition at line 1510 of file gretl_prn.c.

References fi, PRN_::fplist, and prn_fp_list_active().

Referenced by errmsg().

◆ print_redirection_level()

int print_redirection_level ( PRN prn)

print_redirection_level: @prn: gretl printing struct.

Returns: 0 if the output of @prn has not been redirected relative to its original setting, else the level of (possibly nested) redirection.

Definition at line 1484 of file gretl_prn.c.

References PRN_::buf, PRN_::fixed, PRN_::fp, PRN_::fplist, and prn_fp_list_active().

Referenced by do_outfile_command(), errmsg(), gretl_function_exec(), process_command_error(), stop_fncall(), and update_console().

◆ print_start_redirection()

int print_start_redirection ( PRN prn,
FILE *  fp,
const char *  fname,
const char *  strvar 
)

print_start_redirection: @prn: gretl printing struct. @fp: stream to which output should be redirected. @fname: name of the file or NULL. @strvar: name of associated string variable, or NULL.

Redirects output of @prn to @fp.

Returns: 0 on success, 1 on error.

Definition at line 1554 of file gretl_prn.c.

References PRN_::fixed, fpinfo_::fname, PRN_::fp, fpinfo_::fp, prn_push_stream(), and fpinfo_::strvar.

Referenced by outfile_redirect().

◆ printing_to_standard_stream()

int printing_to_standard_stream ( PRN prn)

printing_to_standard_stream: @prn: gretl printing struct.

Returns: 1 if the output of @prn is directed to one of the standard streams, stdout or stderr, else 0.

Definition at line 1363 of file gretl_prn.c.

References PRN_::fp.

Referenced by merge_error(), and merge_name_error().

◆ prn_delim()

char prn_delim ( PRN prn)

prn_delim: @prn: gretl printing struct.

Returns: The character to be used as delimiter for CSV.

Definition at line 1725 of file gretl_prn.c.

References PRN_::delim.

Referenced by alt_print_coeff_table_start(), csv_print_coeff(), csv_print_test(), garch_variance_line(), GMM_crit_line(), panel_variance_lines(), print_intreg_info(), print_middle_table(), and print_model_stats_table().

◆ prn_format()

int prn_format ( PRN prn)

prn_format: @prn: gretl printing struct.

Returns: The formatting flags for @prn.

Definition at line 1713 of file gretl_prn.c.

References PRN_::format.

Referenced by filesel_save_prn_buffer(), and view_or_save_latex().

◆ rtf_doc_format()

int rtf_doc_format ( PRN prn)

rtf_doc_format: @prn: gretl printing struct.

Returns: 1 if the format of @prn is RTF, and the RTF preamble should be printed, else 0.

Definition at line 1644 of file gretl_prn.c.

References PRN_::format, GRETL_FORMAT_DOC, and GRETL_FORMAT_RTF.

Referenced by model_format_end(), and model_format_start().

◆ rtf_format()

int rtf_format ( PRN prn)

rtf_format: @prn: gretl printing struct.

Returns: 1 if the format of @prn is RTF, else 0.

Definition at line 1625 of file gretl_prn.c.

References PRN_::format, GRETL_FORMAT_RTF, and GRETL_FORMAT_RTF_TXT.

Referenced by alt_print_coeff(), alt_print_coeff_table_start(), alt_print_count_offset(), copy_format_dialog(), ensure_vsep(), garch_variance_line(), GMM_crit_line(), gretl_model_test_print_direct(), gretl_prn_newline(), gretl_test_print_h_0(), gretl_VAR_print(), gretl_VAR_print_all_fcast_decomps(), gretl_VAR_print_all_impulse_responses(), gretl_VAR_print_fcast_decomp(), gretl_VAR_print_impulse_response(), hc_vcv_line(), logit_probit_stats(), maybe_print_weak_insts_test(), middle_table_row(), model_format_start(), panel_variance_lines(), print_add_omit_varnames(), print_arma_roots(), print_bp_results(), print_coeff_left_string(), print_coeff_separator(), print_coeff_table_end(), print_data_in_columns(), print_equation_stats(), print_estimator_strings(), print_heckit_stats(), print_HET_1_results(), print_intreg_info(), print_ivreg_instruments(), print_liml_equation_data(), print_LR_stat(), print_middle_table(), print_model_head(), print_model_heading(), print_model_stats_table(), print_model_table_coeffs(), print_model_table_direct(), print_rho(), print_root(), print_VECM_coint_eqns(), print_VECM_omega(), print_whites_results(), prn_to_clipboard(), root_start(), special_print_confints(), special_print_fit_resid(), special_print_forecast(), special_print_model_table(), special_print_summary(), special_print_vmatrix(), terminate_coeff_row(), VAR_info_end_row(), VAR_info_end_table(), VAR_info_header_block(), VAR_info_print_period(), VAR_info_print_vname(), VAR_print_LB_stat(), and varheading().

◆ tex_doc_format()

int tex_doc_format ( PRN prn)

tex_doc_format: @prn: gretl printing struct.

Returns: 1 if the format of @prn is TeX and a complete TeX document is being produced, else 0.

Definition at line 1671 of file gretl_prn.c.

References PRN_::format, GRETL_FORMAT_DOC, and GRETL_FORMAT_TEX.

Referenced by model_format_end(), model_format_start(), tex_print_model(), and tex_print_model_table().

◆ tex_eqn_format()

int tex_eqn_format ( PRN prn)

tex_eqn_format: @prn: gretl printing struct.

Returns: 1 if the format of @prn is TeX and a model is being represented as an equation, rather than in tabular form, else 0.

Definition at line 1687 of file gretl_prn.c.

References PRN_::format, GRETL_FORMAT_EQN, and GRETL_FORMAT_TEX.

Referenced by tex_print_model().

◆ tex_format()

int tex_format ( PRN prn)

tex_format: @prn: gretl printing struct.

Returns: 1 if the format of @prn is TeX, else 0.

Definition at line 1658 of file gretl_prn.c.

References PRN_::format, and GRETL_FORMAT_TEX.

Referenced by alt_print_arch_terms(), alt_print_aux_coeffs(), alt_print_coeff(), alt_print_coeff_table_start(), alt_print_count_offset(), alternate_stats_message(), ensure_vsep(), estimator_string(), garch_variance_line(), get_test_pval_string(), get_test_stat_string(), GMM_crit_line(), gretl_model_test_print_direct(), gretl_prn_newline(), gretl_system_print(), gretl_test_print_h_0(), gretl_test_print_heading(), gretl_VAR_print(), gretl_VAR_print_fcast_decomp(), gretl_VAR_print_impulse_response(), logit_probit_stats(), maybe_print_T(), maybe_print_weak_insts_test(), maybe_show_midas_method(), middle_table_row(), ml_vcv_line(), model_format_end(), model_format_start(), panel_variance_lines(), panel_vcv_line(), prepare_model_coeff(), print_add_omit_varnames(), print_arma_depvar(), print_arma_roots(), print_aux_string(), print_bp_results(), print_coeff_left_string(), print_coeff_separator(), print_coeff_table_end(), print_contemp_covariance_matrix(), print_DPD_stats(), print_duration_alpha(), print_equation_stats(), print_estimator_strings(), print_GMM_stats(), print_GNR_info(), print_heckit_stats(), print_HET_1_results(), print_intreg_info(), print_ivreg_instruments(), print_liml_equation_data(), print_LR_stat(), print_middle_table(), print_model_chi2_test(), print_model_head(), print_model_heading(), print_model_stats_table(), print_model_table_coeffs(), print_model_table_direct(), print_model_tests(), print_overdisp_test(), print_panel_AR_test(), print_probit_rho(), print_rho(), print_root(), print_system_overid_test(), print_whites_results(), root_start(), simple_estimator_string(), special_print_confints(), special_print_fit_resid(), special_print_forecast(), special_print_model_table(), special_print_summary(), special_print_vmatrix(), special_text_handler(), system_print_sigma(), terminate_coeff_row(), VAR_info_end_row(), VAR_info_end_table(), VAR_info_header_block(), VAR_info_print_period(), VAR_info_print_vname(), VAR_print_LB_stat(), and vecm_print_LR_test().