1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
.\\" auto-generated by docbook2man-spec $Revision: 1.5 $
.TH "ggiParseMode" "3ggi" "22 August 2001" "GGI" "LibGGI API"
.SH NAME
ggiParseMode, ggiPrintMode, ggiSPrintMode, ggiFPrintMode \- Parse and print formatted strings specifying LibGGI modes
.SH SYNOPSIS
\fB#include <ggi/ggi.h>
.sp
int ggiParseMode(const char *\fIs\fB, ggi_mode *\fIm\fB);
.sp
int ggiPrintMode(ggi_mode *\fIm\fB);
.sp
int ggiSPrintMode(char *\fIs\fB, ggi_mode *\fIm\fB);
.sp
int ggiFPrintMode(FILE *\fIs\fB, ggi_mode *\fIm\fB);
\fR.SH "DESCRIPTION"
.PP
\fBggiParseMode\fR parses a string into a \fBggi_mode\fR.
.PP
The \fBggi*PrintMode\fR functions print all the members of \fBggi_mode\fR in a
human-readable form. \fBggiSPrintMode\fR outputs to a preallocated
string buffer, \fBggiFPrintMode\fR outputs to a stdio \fBFILE\fR, and
\fBggiPrintMode\fR outputs to standard output. These functions
correspond to
\fBsprintf\fR(3),
\fBfprintf\fR(3),
\fBprintf\fR(3),
respectively.
.PP
The format of the string used by these functions is exactly the same as
the one used in the \fBGGI_DEFMODE\fR
environment variable.
.SH "RETURN VALUE"
.PP
\fBggiParseMode\fR returns:
.TP
\fB0\fR
on success, i.e. the string was correct.
However, errors involving \fBGT_*\fR, position
information, or mismatched brackets do not make it fail;
these errors are simply ignored.
.TP
\fB<0\fR
if there is text that can not be parsed.
This text is printed to stderr.
All parameters parsed so far are written into \fIm\fR.
.PP
So \fIm\fR contains all parameters that have been successfully parsed.
For most applications there will be no need for testing
\fBggiParseMode\fR for failure.
|