From 13b555259270512e01b20631c60468327fd08ba7 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 2 May 2007 13:00:28 +0000 Subject: [PATCH] Corrected swapped descriptions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/mbconv.tex | 52 +++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/docs/latex/wx/mbconv.tex b/docs/latex/wx/mbconv.tex index 5b695f3cff..0a968d4179 100644 --- a/docs/latex/wx/mbconv.tex +++ b/docs/latex/wx/mbconv.tex @@ -218,31 +218,10 @@ return type (without const). \membersection{wxMBConv::FromWChar}\label{wxmbconvfromwchar} -\constfunc{virtual size\_t}{FromWChar}{\param{wchar\_t *}{dst}, \param{size\_t }{dstLen}, \param{const char *}{src}, \param{size\_t }{srcLen = wxNO\_LEN}} - -The most general function for converting a multibyte string to a wide string. -The main case is when \arg{dst} is not \NULL and \arg{srcLen} is not -\texttt{wxNO\_LEN} (which is defined as \texttt{(size\_t)$-1$}): then -the function converts exactly \arg{srcLen} bytes starting at \arg{src} into -wide string which it output to \arg{dst}. If the length of the resulting wide -string is greater than \arg{dstLen}, an error is returned. Note that if -\arg{srcLen} bytes don't include \NUL characters, the resulting wide string is -not \NUL-terminated neither. - -If \arg{srcLen} is \texttt{wxNO\_LEN}, the function supposes that the string is -properly (i.e. as necessary for the encoding handled by this conversion) -\NUL-terminated and converts the entire string, including any trailing \NUL -bytes. In this case the wide string is also \NUL-terminated. - -Finally, if \arg{dst} is \NULL, the function returns the length of the needed -buffer. - -\wxheading{Return value} - -The number of characters written to \arg{dst} (or the number of characters -which would have been written to it if it were non-\NULL) on success or -\texttt{wxCONV\_FAILED} on error. +\constfunc{virtual size\_t}{FromWChar}{\param{char\_t *}{dst}, \param{size\_t }{dstLen}, \param{const wchar\_t *}{src}, \param{size\_t }{srcLen = wxNO\_LEN}} +This function has the same semantics as \helpref{ToWChar}{wxmbconvtowchar} +except that it converts a wide string to multibyte one. \membersection{wxMBConv::GetMaxMBNulLen}\label{wxmbconvgetmaxmbnullen} @@ -269,9 +248,28 @@ The other cases are not currently supported and \texttt{wxCONV\_FAILED} \membersection{wxMBConv::ToWChar}\label{wxmbconvtowchar} -\constfunc{virtual size\_t}{ToWChar}{\param{char\_t *}{dst}, \param{size\_t }{dstLen}, \param{const wchar\_t *}{src}, \param{size\_t }{srcLen = wxNO\_LEN}} +\constfunc{virtual size\_t}{ToWChar}{\param{wchar\_t *}{dst}, \param{size\_t }{dstLen}, \param{const char *}{src}, \param{size\_t }{srcLen = wxNO\_LEN}} -This function has the same semantics as \helpref{FromWChar}{wxmbconvfromwchar} -except that it converts a wide string to multibyte one. +The most general function for converting a multibyte string to a wide string. +The main case is when \arg{dst} is not \NULL and \arg{srcLen} is not +\texttt{wxNO\_LEN} (which is defined as \texttt{(size\_t)$-1$}): then +the function converts exactly \arg{srcLen} bytes starting at \arg{src} into +wide string which it output to \arg{dst}. If the length of the resulting wide +string is greater than \arg{dstLen}, an error is returned. Note that if +\arg{srcLen} bytes don't include \NUL characters, the resulting wide string is +not \NUL-terminated neither. +If \arg{srcLen} is \texttt{wxNO\_LEN}, the function supposes that the string is +properly (i.e. as necessary for the encoding handled by this conversion) +\NUL-terminated and converts the entire string, including any trailing \NUL +bytes. In this case the wide string is also \NUL-terminated. + +Finally, if \arg{dst} is \NULL, the function returns the length of the needed +buffer. + +\wxheading{Return value} + +The number of characters written to \arg{dst} (or the number of characters +which would have been written to it if it were non-\NULL) on success or +\texttt{wxCONV\_FAILED} on error. -- 2.45.2