From c7d9131ae533ccecb10f4dcebcb820a7e062a11c Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 9 Jul 1999 17:10:49 +0000 Subject: [PATCH] * wxStream doc update * wxHTTP fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/classes.tex | 2 ++ docs/latex/wx/datstrm.tex | 27 +++++++-------------------- docs/latex/wx/inputstr.tex | 34 +++++++++++++++++++--------------- docs/latex/wx/outptstr.tex | 15 --------------- docs/latex/wx/stream.tex | 19 ------------------- src/common/http.cpp | 2 +- 6 files changed, 29 insertions(+), 70 deletions(-) diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex index 5bb53661a6..9281918cb9 100644 --- a/docs/latex/wx/classes.tex +++ b/docs/latex/wx/classes.tex @@ -11,6 +11,7 @@ \input autoobj.tex \input busycurs.tex \input button.tex +\input strmbfrd.tex \input bitmap.tex \input bbutton.tex \input bmpdatob.tex @@ -189,6 +190,7 @@ \input tempfile.tex \input text.tex \input txtdatob.tex +\input txtstrm.tex \input textdlg.tex \input txtdrptg.tex \input valtext.tex diff --git a/docs/latex/wx/datstrm.tex b/docs/latex/wx/datstrm.tex index daafad9492..c33104b400 100644 --- a/docs/latex/wx/datstrm.tex +++ b/docs/latex/wx/datstrm.tex @@ -1,15 +1,12 @@ +% ---------------------------------------------------------------------------- +% wxDataInputStream +% ---------------------------------------------------------------------------- \section{\class{wxDataInputStream}}\label{wxdatainputstream} This class provides functions that read data types in a portable way. So, a file written by an Intel processor can be read by a Sparc or anything else. -\wxheading{Derived from} - -\helpref{wxFilterInputStream}{wxfilterinputstream}\\ -\helpref{wxInputStream}{wxinputstream}\\ -\helpref{wxStreamBase}{wxstreambase} - \wxheading{Include files} @@ -57,12 +54,6 @@ Reads a 32 bit integer from the stream. Reads a double (IEEE encoded) from the stream. -\membersection{wxDataInputStream::ReadLine} - -\func{wxString}{wxDataInputStream::ReadLine}{\void} - -Reads a line from the stream. A line is a string which ends with \\n or \\r\\n. - \membersection{wxDataInputStream::ReadString} \func{wxString}{wxDataInputStream::ReadString}{\void} @@ -71,6 +62,10 @@ Reads a string from a stream. Actually, this function first reads a long integer specifying the length of the string (without the last null character) and then reads the string. +% ---------------------------------------------------------------------------- +% wxDataOutputStream +% ---------------------------------------------------------------------------- + \section{\class{wxDataOutputStream}}\label{wxdataoutputstream} This class provides functions that write data types in a @@ -120,17 +115,9 @@ Writes the 32 bit integer {\it i32} to the stream. Writes the double {\it f} to the stream using the IEEE format. -\membersection{wxDataOutputStream::WriteLine} - -\func{void}{wxDataOutputStream::WriteLine}{{\param const wxString\& }{string}} - -Writes {\it string} as a line. Depending on the operating system, it adds -$\backslash$n or $\backslash$r$\backslash$n. - \membersection{wxDataOutputStream::WriteString} \func{void}{wxDataOutputStream::WriteString}{{\param const wxString\& }{string}} Writes {\it string} to the stream. Actually, this method writes the size of the string before writing {\it string} itself. - diff --git a/docs/latex/wx/inputstr.tex b/docs/latex/wx/inputstr.tex index 0b940c020f..d0888a8c45 100644 --- a/docs/latex/wx/inputstr.tex +++ b/docs/latex/wx/inputstr.tex @@ -11,10 +11,6 @@ -\wxheading{See also} - -\helpref{wxStreamBuffer}{wxstreambuffer} - % ----------- % ctor & dtor % ----------- @@ -24,11 +20,6 @@ Creates a dummy input stream. -\func{}{wxInputStream}{\param{wxStreamBuffer *}{sbuf}} - -Creates an input stream using the specified stream buffer \it{sbuf}. This -stream buffer can point to another stream. - \membersection{wxInputStream::\destruct{wxInputStream}} \func{}{\destruct{wxInputStream}}{\void} @@ -41,12 +32,6 @@ Destructor. Returns the first character in the input queue and removes it. -\membersection{wxInputStream::InputStreamBuffer} - -\func{wxStreamBuffer*}{InputStreamBuffer}{\void} - -Returns the stream buffer associated with the input stream. - \membersection{wxInputStream::LastRead} \constfunc{size\_t}{LastRead}{\void} @@ -96,3 +81,22 @@ Changes the stream current position. Returns the current stream position. +\membersection{wxInputStream::Ungetch}\label{wxinputstream_ungetch} + +\func{size\_t}{Ungetch}{\param{const char*}{ buffer}, \param{size\_t}{ size}} + +This function is only useful in \it{read} mode. It is the manager of the "Write-Back" +buffer. This buffer acts like a temporary buffer where datas which has to be +read during the next read IO call are put. This is useful when you get a big +block of data which you didn't want to read: you can replace them at the top +of the input queue by this way. + +\wxheading{Return value} + +Returns the amount of bytes saved in the Write-Back buffer. + +\func{bool}{Ungetch}{\param{char }{c}} + +This function acts like the previous one except that it takes only one +character: it is sometimes shorter to use than the generic function. + diff --git a/docs/latex/wx/outptstr.tex b/docs/latex/wx/outptstr.tex index 74378c89b6..af0d1c54d0 100644 --- a/docs/latex/wx/outptstr.tex +++ b/docs/latex/wx/outptstr.tex @@ -11,10 +11,6 @@ -\wxheading{See also} - -\helpref{wxStreamBuffer}{wxstreambuffer} - % ----------- % ctor & dtor % ----------- @@ -24,23 +20,12 @@ Creates a dummy wxOutputStream object. -\func{}{wxOutputStream}{\param{wxStreamBuffer*}{ sbuf}} - -Creates an input stream using the specified stream buffer \it{sbuf}. This -stream buffer can point to another stream. - \membersection{wxOutputStream::\destruct{wxOutputStream}} \func{}{\destruct{wxOutputStream}}{\void} Destructor. -\membersection{wxOutputStream::OutputStreamBuffer} - -\func{wxStreamBuffer *}{OutputStreamBuffer}{\void} - -Returns the stream buffer associated with the output stream. - \membersection{wxOutputStream::LastWrite} \constfunc{size\_t}{LastWrite}{\void} diff --git a/docs/latex/wx/stream.tex b/docs/latex/wx/stream.tex index 20cf2e72d2..ac3eff3613 100644 --- a/docs/latex/wx/stream.tex +++ b/docs/latex/wx/stream.tex @@ -132,25 +132,6 @@ are cached in a buffer before being sent in one block to the stream. See \helpref{Read}{wxstreambufferread}. -\membersection{wxStreamBuffer::WriteBack}\label{wxstreambufferwriteback} - -\func{size\_t}{WriteBack}{\param{const char*}{ buffer}, \param{size\_t}{ size}} - -This function is only useful in \it{read} mode. It is the manager of the "Write-Back" -buffer. This buffer acts like a temporary buffer where datas which has to be -read during the next read IO call are put. This is useful when you get a big -block of data which you didn't want to read: you can replace them at the top -of the input queue by this way. - -\wxheading{Return value} - -Returns the amount of bytes saved in the Write-Back buffer. - -\func{size\_t}{WriteBack}{\param{char }{c}} - -This function acts like the previous one except that it takes only one -character: it is sometimes shorter to use than the generic function. - \membersection{wxStreamBuffer::GetChar} \func{char}{GetChar}{\void} diff --git a/src/common/http.cpp b/src/common/http.cpp index b433e4f013..08c4df058c 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -180,7 +180,7 @@ bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait)) bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req) { wxChar *tmp_buf; - wxCharBuffer buf(""); + wxChar buf[200]; const wxWX2MBbuf pathbuf; wxString tmp_str; -- 2.45.2