Logo Search packages:      
Sourcecode: gretl version File versions  Download package

PRN_ Struct Reference

List of all members.

Public Attributes

size_t blen
char * buf
size_t bufsize
char delim
int fixed
char * fname
PrnFormat format
FILE * fp
FILE * fpaux
int savepos

Detailed Description

SECTION:gretl_prn : gretl printing struct : PRN libgretl.h

Most libgretl functions that print output call for a pointer-to-PRN as one of their arguments. The PRN type is an opaque structure, constructed and manipulated by the functions listed here. It is used as a means of generalizing the printing operation, which may be to a regular file, a temporary file or a buffer.

To get hold of a PRN use gretl_print_new() or one of the more specific constructors, and to free it use gretl_print_destroy(). If you want to use a PRN dirctly for printing in your own code, use the functions pprintf(), pputs() and pputc(). These are counterparts to the standard C functions fprintf, fputs and fputc, but note that with pputs and pputc the PRN argument must be given first (unlike fputs and fputc in which the FILE argument goes last).

Note that whenever a PRN appears as a function parameter in libgretl it is OK to give a NULL argument: in that case printing is suppressed. (This obviously makes sense only if the function in question does something besides just printing.)

Definition at line 54 of file gretl_prn.c.

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index