From 6ea1f2f367db006b792f32ff154623a4f4399b3c Mon Sep 17 00:00:00 2001 From: fluffymormegil Date: Tue, 26 Apr 2011 22:28:53 +0100 Subject: [PATCH] Updated stlfgets manpage to add stlwfgets --- man/libmormegil::stlfgets.3 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/man/libmormegil::stlfgets.3 b/man/libmormegil::stlfgets.3 index f593a8d..2882d06 100644 --- a/man/libmormegil::stlfgets.3 +++ b/man/libmormegil::stlfgets.3 @@ -1,12 +1,17 @@ -.TH "LIBMORMEGIL::STLFGETS" 3 "February 25, 2011" "libmormegil Version 1.0" "libmormegil User Manual" +.TH "LIBMORMEGIL::STLFGETS" 3 "April 26, 2011" "libmormegil Version 2.0" "libmormegil User Manual" .SH NAME -libmormegil::stlfgets, libmormegil::vstlfgets \- fgets-alikes for std::string +libmormegil::stlfgets, libmormegil::stlwfgets \- fgets-alikes for std::string .SH SYNOPSIS #include int libmormegil::stlfgets(std::string& str, size_t size_suggest, FILE *fp, size_t hard_size); +#include + +int libmormegil::stlwfgets(std::wstring& str, size_t size_suggest, + FILE *fp, size_t hard_size); + .SH DESCRIPTION The \fIlibmormegil::stlfgets\fP function clears the contents of \fIstr\fP, then reads a line from the FILE object pointed to by \fIfp\fP into \fIstr\fP @@ -18,14 +23,19 @@ control hint, indicating an "expected" size for the line. Once \fIsize_suggest\f bytes have been read from \fIfp\fP, the function will return even if no newline has been encountered. +The \fIlibmormegil::stlwfgets\fP function works equivalently, except that the +argument \fIstr\fP is of type \fIstd::wstring\fP and the results are changed +accordingly. + .SH RETURNS A return value of 0 indicates that no errors were encountered while reading from \fIfp\fP. A return value of -1 indicates that an error occurred while reading from \fIfp\fP. See the local documentation for the \fIfgetc\fP -function for a list of possible \fIerrno\fP values in this case. +and \fIfgetwc\fP functions for a list of possible \fIerrno\fP values in this +case. .SH AUTHOR Martin Read .SH SEE ALSO -libmormegil(3), libmormegil::stlprintf(3), fgets(3), fgetc(3) +libmormegil(3), libmormegil::stlprintf(3), fgets(3), fgetc(3), fgetwc(3) -- 2.11.0