From stdcxx-commits-return-2017-apmail-incubator-stdcxx-commits-archive=incubator.apache.org@incubator.apache.org Tue Oct 23 12:14:00 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 65666 invoked from network); 23 Oct 2007 12:14:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Oct 2007 12:14:00 -0000 Received: (qmail 24161 invoked by uid 500); 23 Oct 2007 12:13:48 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 24144 invoked by uid 500); 23 Oct 2007 12:13:48 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 24132 invoked by uid 99); 23 Oct 2007 12:13:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2007 05:13:48 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2007 12:13:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 41E501A9832; Tue, 23 Oct 2007 05:13:09 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r587471 - in /incubator/stdcxx/trunk/doc/stdlibref: ctype.html locale.html money-put.html moneypunct.html num-put.html numpunct.html strstreambuf.html valarray.html Date: Tue, 23 Oct 2007 12:13:08 -0000 To: stdcxx-commits@incubator.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071023121309.41E501A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: faridz Date: Tue Oct 23 05:13:07 2007 New Revision: 587471 URL: http://svn.apache.org/viewvc?rev=587471&view=rev Log: 2007-10-23 Farid Zaripov Merged r587464 from branches/4.2.x * ctype.html: Removed #include from example code. * locale.html: Ditto. * money-put.html: Ditto. * moneypunct.html: Ditto. * num-put.html: Ditto. * numpunct.html: Ditto. * valarray.html: Ditto. * strstreambuf.html: Ditto. Updated the example source and the program output according to changes in r587173 Modified: incubator/stdcxx/trunk/doc/stdlibref/ctype.html incubator/stdcxx/trunk/doc/stdlibref/locale.html incubator/stdcxx/trunk/doc/stdlibref/money-put.html incubator/stdcxx/trunk/doc/stdlibref/moneypunct.html incubator/stdcxx/trunk/doc/stdlibref/num-put.html incubator/stdcxx/trunk/doc/stdlibref/numpunct.html incubator/stdcxx/trunk/doc/stdlibref/strstreambuf.html incubator/stdcxx/trunk/doc/stdlibref/valarray.html Modified: incubator/stdcxx/trunk/doc/stdlibref/ctype.html URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibref/ctype.html?rev=587471&r1=587470&r2=587471&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibref/ctype.html (original) +++ incubator/stdcxx/trunk/doc/stdlibref/ctype.html Tue Oct 23 05:13:07 2007 @@ -598,8 +598,6 @@
    #include <iostream>   // for cout, endl
     #include <locale>     // for ctype
     
    -#include <examples.h>
    -
     int main ()
     {
         std::locale loc;
    
    Modified: incubator/stdcxx/trunk/doc/stdlibref/locale.html
    URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibref/locale.html?rev=587471&r1=587470&r2=587471&view=diff
    ==============================================================================
    --- incubator/stdcxx/trunk/doc/stdlibref/locale.html (original)
    +++ incubator/stdcxx/trunk/doc/stdlibref/locale.html Tue Oct 23 05:13:07 2007
    @@ -1835,7 +1835,6 @@
     #include <vector>      // for vector
     
     #include <codecvte.h>
    -#include <examples.h>
     
     int main ()
     {
    
    Modified: incubator/stdcxx/trunk/doc/stdlibref/money-put.html
    URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibref/money-put.html?rev=587471&r1=587470&r2=587471&view=diff
    ==============================================================================
    --- incubator/stdcxx/trunk/doc/stdlibref/money-put.html (original)
    +++ incubator/stdcxx/trunk/doc/stdlibref/money-put.html Tue Oct 23 05:13:07 2007
    @@ -181,8 +181,6 @@
     #include <iterator>   // for ostreambuf_iterator
     #include <string>     // for string
     
    -#include <examples.h>
    -
     
     int main ()
     {
    
    Modified: incubator/stdcxx/trunk/doc/stdlibref/moneypunct.html
    URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibref/moneypunct.html?rev=587471&r1=587470&r2=587471&view=diff
    ==============================================================================
    --- incubator/stdcxx/trunk/doc/stdlibref/moneypunct.html (original)
    +++ incubator/stdcxx/trunk/doc/stdlibref/moneypunct.html Tue Oct 23 05:13:07 2007
    @@ -317,8 +317,6 @@
     #include <iostream>   // for cout, endl
     #include <limits>     // for numeric_limits
     
    -#include <examples.h>
    -
     
     int main ()
     {
    
    Modified: incubator/stdcxx/trunk/doc/stdlibref/num-put.html
    URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibref/num-put.html?rev=587471&r1=587470&r2=587471&view=diff
    ==============================================================================
    --- incubator/stdcxx/trunk/doc/stdlibref/num-put.html (original)
    +++ incubator/stdcxx/trunk/doc/stdlibref/num-put.html Tue Oct 23 05:13:07 2007
    @@ -448,8 +448,6 @@
     #include <iterator>   // for ostreambuf_iterator
     #include <locale>     // for time_put
     
    -#include <examples.h>
    -
     // custom numeric punctuation facet
     struct Punct: std::numpunct<char>
     {
    
    Modified: incubator/stdcxx/trunk/doc/stdlibref/numpunct.html
    URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibref/numpunct.html?rev=587471&r1=587470&r2=587471&view=diff
    ==============================================================================
    --- incubator/stdcxx/trunk/doc/stdlibref/numpunct.html (original)
    +++ incubator/stdcxx/trunk/doc/stdlibref/numpunct.html Tue Oct 23 05:13:07 2007
    @@ -210,8 +210,6 @@
     #include <locale>     // for locale, numpunct, use_facet
     #include <stdexcept>  // for runtime_error
     
    -#include <examples.h>
    -
     
     #if defined (_WIN32) || defined (_WIN64)
     #  define GERMAN_LOCALE "german_germany.1252"
    
    Modified: incubator/stdcxx/trunk/doc/stdlibref/strstreambuf.html
    URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibref/strstreambuf.html?rev=587471&r1=587470&r2=587471&view=diff
    ==============================================================================
    --- incubator/stdcxx/trunk/doc/stdlibref/strstreambuf.html (original)
    +++ incubator/stdcxx/trunk/doc/stdlibref/strstreambuf.html Tue Oct 23 05:13:07 2007
    @@ -335,7 +335,8 @@
     //
      
     #include <iomanip>     // for setw
    -#include <iostream>    // for cerr, cout, endl
    +#include <ios>         // for dec, ends
    +#include <iostream>    // for cerr, cout
     #include <strstream>   // for istream, ostrstream
     
     
    @@ -348,21 +349,19 @@
         std::istream in (out.rdbuf ());   
     
         // output to out
    -    out << "Anticonstitutionellement is a big word!!!\n";
    +    out << "Anticonstitutionnellement is a big word!!!\n";
     
         // create a NTBS 
         const char s[] ="Le rat des villes et le rat des champs.";
     
         // output the NTBS
    -    out << s << std::endl;   
    +    out << s << '\n';
     
         // (try to) resize the buffer
    -    if (out.rdbuf ()->pubsetbuf (0, 5000))
    -        std::cout << "Successfully allocated buffer." 
    -                  << std::endl;
    +    if (out.rdbuf ()->pubsetbuf (0, 128L))
    +        std::cout << "Successfully allocated buffer.\n";
         else
    -        std::cerr << "Failed to allocate buffer." 
    -                  << std::endl;
    +        std::cerr << "Failed to allocate buffer.\n";
     
         // output the contents of the buffer to standard output
         std::cout << in.rdbuf ();
    @@ -371,28 +370,31 @@
         out << std::dec              // decimal base
             << std::setfill ('#')    // set fill character
             << std::setw (16)        // set field width
    -        << 0x100 << std::endl;   // format
    +        << 0x100 << '\n';        // format
       
    -    // output the content of the input sequence to 
    -    // standard output
    -    std::cout << in.rdbuf( ) << std::endl;
    +    // output the content of the input sequence to standard output
    +    std::cout << in.rdbuf( ) << '\n';
     
         // number of elements in the output sequence
    -    std::cout << "Buffer size is " << out.rdbuf ()->pcount ()
    -              << std::endl;
    +    const std::streamsize pcount = std::streamsize (out.rdbuf ()->pcount ());
     
    -    // (try to) resize the buffer to a minimum size
    -    if (out.rdbuf()->pubsetbuf (0,out.rdbuf()->pcount() + 1))
    -        std::cout << std::endl 
    -                  << "Successfully resized buffer." 
    -                  << std::endl;
    +    std::cout << "Buffer size is " << pcount << '\n';
    +
    +    // (try to) resize the buffer
    +    if (out.rdbuf ()->pubsetbuf (0, pcount * 2L))
    +        std::cout << "\nSuccessfully resized buffer to " << pcount * 2 << '\n';
         else
    -        std::cerr << "Failed to resize buffer." << std::endl;
    +        std::cerr << "\nFailed to resize buffer to " << pcount * 2 << '\n';
     
    -    // output the contents of the streambuf object 
    -    // associated with out
    +    // NUL-terminate the character array before streaming it out
    +    out << std::ends;
    +
    +    // output the contents of the streambuf object associated with out
         std::cout << out.rdbuf ()->str ();
     
    +    // unfreeze the streambuf so it cleans up its allocated memory
    +    out.rdbuf ()->freeze (false);
    +
         return 0;
     }
     
    @@ -402,6 +404,14 @@
     
      Successfully allocated buffer.
       Anticonstitutionnellement is a big word!!!
       Le rat des villes et le rat des champs.
      +#############256
      +
      +Buffer size is 100
      +
      +Successfully resized buffer to 200
      +Anticonstitutionnellement is a big word!!!
      +Le rat des villes et le rat des champs.
      +#############256
       

    See Also

    char_traits, ios_base, basic_ios, basic_streambuf, istrstream, ostrstream, strstream

    Modified: incubator/stdcxx/trunk/doc/stdlibref/valarray.html URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibref/valarray.html?rev=587471&r1=587470&r2=587471&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibref/valarray.html (original) +++ incubator/stdcxx/trunk/doc/stdlibref/valarray.html Tue Oct 23 05:13:07 2007 @@ -861,8 +861,6 @@ #include <iostream> // for cout #include <valarray> // for valarray -#include <examples.h> - template <class T> inline std::ostream&