home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / gnu / g__inc / filebuf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-23  |  1.7 KB  |  58 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2. /* 
  3. Copyright (C) 1988 Free Software Foundation
  4.     written by Doug Lea (dl@rocky.oswego.edu)
  5.  
  6. This file is part of the GNU C++ Library.  This library is free
  7. software; you can redistribute it and/or modify it under the terms of
  8. the GNU Library General Public License as published by the Free
  9. Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.  This library is distributed in the hope
  11. that it will be useful, but WITHOUT ANY WARRANTY; without even the
  12. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  13. PURPOSE.  See the GNU Library General Public License for more details.
  14. You should have received a copy of the GNU Library General Public
  15. License along with this library; if not, write to the Free Software
  16. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18.  
  19. #ifndef _filebuf_h
  20. #ifdef __GNUG__
  21. #pragma once
  22. #pragma interface
  23. #endif
  24. #define _filebuf_h 1
  25.  
  26. #include <streambu.h>
  27. #include <stdio.h>
  28.  
  29. class filebuf: public streambuf
  30. {
  31. public:
  32.   int         fd;
  33.   char        opened;
  34.  
  35.   int         overflow(int c = EOF);
  36.   int         underflow();
  37.  
  38.               filebuf();
  39.               filebuf(int newfd);
  40. #ifdef atarist
  41.               filebuf(int newfd, char* buf, size_t buflen);
  42. #else
  43.               filebuf(int newfd, char* buf, int buflen);
  44. #endif
  45.              ~filebuf();
  46.  
  47.   streambuf*  open(const char* name, open_mode m);
  48.   streambuf*  open(const char* filename, io_mode m, access_mode a);
  49.   streambuf*  open(const char* filename, const char* m);
  50.   streambuf*  open(int  filedesc, io_mode m);
  51.   streambuf*  open(FILE* fileptr);
  52.   int         is_open();
  53.   int         close();
  54. };
  55.  
  56.  
  57. #endif
  58.