* call.c (build_new_method_call): Handle getting a
[official-gcc.git] / libio / strfile.h
bloba0e47021f6ec2b6aa29fd4371d74231be6e88ced
1 /* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
2 This file is part of the GNU IO Library.
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2, or (at
7 your option) any later version.
9 This library is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this library; see the file COPYING. If not, write to
16 the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
17 MA 02111-1307, USA.
19 As a special exception, if you link this library with files
20 compiled with a GNU compiler to produce an executable, this does
21 not cause the resulting executable to be covered by the GNU General
22 Public License. This exception does not however invalidate any
23 other reasons why the executable file might be covered by the GNU
24 General Public License. */
26 #include <libio.h>
27 #ifdef TODO
28 Merge into libio.h ?
29 #endif
31 typedef void *(*_IO_alloc_type) __P ((_IO_size_t));
32 typedef void (*_IO_free_type) __P ((void*));
34 struct _IO_str_fields
36 _IO_alloc_type _allocate_buffer;
37 _IO_free_type _free_buffer;
40 /* This is needed for the Irix6 N32 ABI, which has a 64 bit off_t type,
41 but a 32 bit pointer type. In this case, we get 4 bytes of padding
42 after the vtable pointer. Putting them in a structure together solves
43 this problem. */
45 struct _IO_streambuf
47 struct _IO_FILE _f;
48 const void *_vtable;
51 typedef struct _IO_strfile_
53 struct _IO_streambuf _sbf;
54 struct _IO_str_fields _s;
55 } _IO_strfile;
57 /* dynamic: set when the array object is allocated (or reallocated) as
58 necessary to hold a character sequence that can change in length. */
59 #define _IO_STR_DYNAMIC(FP) ((FP)->_s._allocate_buffer != (_IO_alloc_type)0)
61 /* frozen: set when the program has requested that the array object not
62 be altered, reallocated, or freed. */
63 #define _IO_STR_FROZEN(FP) ((FP)->_f._IO_file_flags & _IO_USER_BUF)