]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
strstream.h (strstreambuf::streambuf): Rename parameters to avoid shadow warning.
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Wed, 15 Dec 1999 07:47:38 +0000 (07:47 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Wed, 15 Dec 1999 07:47:38 +0000 (07:47 +0000)
* strstream.h (strstreambuf::streambuf): Rename parameters to
avoid shadow warning.
* stream.h (WS): Likewise.

From-SVN: r30942

libio/ChangeLog
libio/stream.h
libio/strstream.h

index 832051adf6418eb5e9ed4ca2d7ad68dcfbe59a12..6785f414edca4e9190c0bf78e8bf223c6d631b49 100644 (file)
@@ -1,3 +1,9 @@
+1999-12-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
+
+       * strstream.h (strstreambuf::streambuf): Rename parameters to
+       avoid shadow warning.
+       * stream.h (WS): Likewise.
+
 Sun Oct 24 23:54:10 PDT 1999 Jeff Law  (law@cygnus.com)
 
        * gcc-2.95.2 Released.
index 0859802ade6967562f8df740c6df9ba12be3bfc8..dc6a2bb0a5be5eac1095e68def6add32bdae8789 100644 (file)
@@ -1,59 +1,2 @@
-/* 
-Copyright (C) 1993 Free Software Foundation
-
-This file is part of the GNU IO Library.  This library is free
-software; you can redistribute it and/or modify it under the
-terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this library; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-#ifndef _COMPAT_STREAM_H
-#define _COMPAT_STREAM_H
-
-// Compatibility with old library.
-// DO NOT USE THESE FUNCTIONS IN NEW CODE!
-// They are obsolete, non-standard, and non-reentrant.
-
-#define _STREAM_COMPAT
-#include <iostream.h>
-
-extern "C++" {
-extern char* form(const char*, ...);
-
-extern char* dec(long, int=0);
-extern char* dec(int, int=0);
-extern char* dec(unsigned long, int=0);
-extern char* dec(unsigned int, int=0);
-
-extern char* hex(long, int=0);
-extern char* hex(int, int=0);
-extern char* hex(unsigned long, int=0);
-extern char* hex(unsigned int, int=0);
-
-extern char* oct(long, int=0);
-extern char* oct(int, int=0);
-extern char* oct(unsigned long, int=0);
-extern char* oct(unsigned int, int=0);
-
-char*        chr(char ch, int width = 0);
-char*        str(const char* s, int width = 0);
-
-inline istream& WS(istream& str) { return ws(str); }
-} // extern "C++"
-
-#endif /* !_COMPAT_STREAM_H */
+Copyright (C) 1993, 1999 Free Software Foundation
+inline istream& WS(istream& __str) { return ws(__str); }
index d549b4547588d6f7c3f16aa81b2c6f8564b3b79f..e35eb53fc904e7e0c7e3219bc77de61a32a2e0c2 100644 (file)
@@ -1,113 +1,3 @@
-/* This is part of libio/iostream, providing -*- C++ -*- input/output.
-Copyright (C) 1993 Free Software Foundation
-
-This file is part of the GNU IO Library.  This library is free
-software; you can redistribute it and/or modify it under the
-terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this library; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-/* Written by Per Bothner (bothner@cygnus.com). */
-
-#ifndef __STRSTREAM_H
-#define __STRSTREAM_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-#include <iostream.h>
-#include <strfile.h>
-
-extern "C++" {
-class strstreambuf : public streambuf
-{
-  struct _IO_str_fields _s;
-  friend class istrstream;
-
-    void init_dynamic(_IO_alloc_type alloc, _IO_free_type free,
-                     int initial_size = 0);
-    void init_static(char *ptr, int size, char *pstart);
-    void init_readonly(const char *ptr, int size);
-  protected:
-    virtual int overflow(int = EOF);
-    virtual int underflow();
-    virtual int pbackfail(int c);
-  public:
-    virtual ~strstreambuf();
-    strstreambuf() { init_dynamic(0, 0); }
-    strstreambuf(int initial_size) { init_dynamic(0, 0, initial_size); }
-    strstreambuf(void *(*alloc)(_IO_size_t), void (*free)(void*))
-       { init_dynamic(alloc, free); }
-    strstreambuf(char *ptr, int size, char *pstart = NULL)
-       { init_static(ptr, size, pstart); }
-    strstreambuf(unsigned char *ptr, int size, unsigned char *pstart = NULL)
-       { init_static((char*)ptr, size, (char*)pstart); }
-    strstreambuf(const char *ptr, int size)
-       { init_readonly(ptr, size); }
-    strstreambuf(const unsigned char *ptr, int size)
-       { init_readonly((const char*)ptr, size); }
-    strstreambuf(signed char *ptr, int size, signed char *pstart = NULL)
-       { init_static((char*)ptr, size, (char*)pstart); }
-    strstreambuf(const signed char *ptr, int size)
-       { init_readonly((const char*)ptr, size); }
-    // Note: frozen() is always true if !_IO_STR_DYNAMIC(this).
-    int frozen() { return _flags & _IO_USER_BUF ? 1 : 0; }
-    void freeze(int n=1)
-       { if (_IO_STR_DYNAMIC(this))
-           { if (n) _flags |= _IO_USER_BUF; else _flags &= ~_IO_USER_BUF; } }
-    _IO_ssize_t pcount();
-    char *str();
-    virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios::out);
-};
-
-class strstreambase : virtual public ios {
-  protected:
-    strstreambuf __my_sb;
-  public:
-    strstreambuf* rdbuf() { return &__my_sb; }
-  protected:
-    strstreambase() { init (&__my_sb); }
-    strstreambase(char *cp, int n, int mode=ios::out);
-};
-
-class istrstream : public strstreambase, public istream {
-  public:
-    istrstream(const char*, int=0);
-};
-
-class ostrstream : public strstreambase, public ostream {
-  public:
-    ostrstream() { }
-    ostrstream(char *cp, int n, int mode=ios::out) :strstreambase(cp,n,mode){}
-    _IO_ssize_t pcount() { return ((strstreambuf*)_strbuf)->pcount(); }
-    char *str() { return ((strstreambuf*)_strbuf)->str(); }
-    void freeze(int n = 1) { ((strstreambuf*)_strbuf)->freeze(n); }
-    int frozen() { return ((strstreambuf*)_strbuf)->frozen(); }
-};
-
-class strstream : public strstreambase, public iostream {
-  public:
-  strstream() { }
-    strstream(char *cp, int n, int mode=ios::out) :strstreambase(cp,n,mode){}
-    _IO_ssize_t pcount() { return ((strstreambuf*)_strbuf)->pcount(); }
-    char *str() { return ((strstreambuf*)_strbuf)->str(); }
-    void freeze(int n = 1) { ((strstreambuf*)_strbuf)->freeze(n); }
-    int frozen() { return ((strstreambuf*)_strbuf)->frozen(); }
-};
-} // extern "C++"
-
-#endif /*!__STRSTREAM_H*/
+Copyright (C) 1993, 1999 Free Software Foundation
+    strstreambuf(void *(*__alloc)(_IO_size_t), void (*__free)(void*))
+       { init_dynamic(__alloc, __free); }