1*16d5c24eSOliver Tappe /*
2*16d5c24eSOliver Tappe Copyright (C) 1993 Free Software Foundation
3*16d5c24eSOliver Tappe
4*16d5c24eSOliver Tappe This file is part of the GNU IO Library. This library is free
5*16d5c24eSOliver Tappe software; you can redistribute it and/or modify it under the
6*16d5c24eSOliver Tappe terms of the GNU General Public License as published by the
7*16d5c24eSOliver Tappe Free Software Foundation; either version 2, or (at your option)
8*16d5c24eSOliver Tappe any later version.
9*16d5c24eSOliver Tappe
10*16d5c24eSOliver Tappe This library is distributed in the hope that it will be useful,
11*16d5c24eSOliver Tappe but WITHOUT ANY WARRANTY; without even the implied warranty of
12*16d5c24eSOliver Tappe MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13*16d5c24eSOliver Tappe GNU General Public License for more details.
14*16d5c24eSOliver Tappe
15*16d5c24eSOliver Tappe You should have received a copy of the GNU General Public License
16*16d5c24eSOliver Tappe along with this library; see the file COPYING. If not, write to the Free
17*16d5c24eSOliver Tappe Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*16d5c24eSOliver Tappe
19*16d5c24eSOliver Tappe As a special exception, if you link this library with files
20*16d5c24eSOliver Tappe compiled with a GNU compiler to produce an executable, this does not cause
21*16d5c24eSOliver Tappe the resulting executable to be covered by the GNU General Public License.
22*16d5c24eSOliver Tappe This exception does not however invalidate any other reasons why
23*16d5c24eSOliver Tappe the executable file might be covered by the GNU General Public License. */
24*16d5c24eSOliver Tappe
25*16d5c24eSOliver Tappe #include "libioP.h"
26*16d5c24eSOliver Tappe #include <iostream.h>
27*16d5c24eSOliver Tappe #include <stdarg.h>
28*16d5c24eSOliver Tappe
scan(const char * format...)29*16d5c24eSOliver Tappe istream& istream::scan(const char *format ...)
30*16d5c24eSOliver Tappe {
31*16d5c24eSOliver Tappe if (ipfx0()) {
32*16d5c24eSOliver Tappe _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
33*16d5c24eSOliver Tappe _strbuf);
34*16d5c24eSOliver Tappe va_list ap;
35*16d5c24eSOliver Tappe va_start(ap, format);
36*16d5c24eSOliver Tappe _strbuf->vscan(format, ap, this);
37*16d5c24eSOliver Tappe va_end(ap);
38*16d5c24eSOliver Tappe isfx();
39*16d5c24eSOliver Tappe _IO_cleanup_region_end (0);
40*16d5c24eSOliver Tappe }
41*16d5c24eSOliver Tappe return *this;
42*16d5c24eSOliver Tappe }
43*16d5c24eSOliver Tappe
vscan(const char * format,_IO_va_list args)44*16d5c24eSOliver Tappe istream& istream::vscan(const char *format, _IO_va_list args)
45*16d5c24eSOliver Tappe {
46*16d5c24eSOliver Tappe if (ipfx0())
47*16d5c24eSOliver Tappe {
48*16d5c24eSOliver Tappe _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
49*16d5c24eSOliver Tappe _strbuf);
50*16d5c24eSOliver Tappe _strbuf->vscan(format, args, this);
51*16d5c24eSOliver Tappe isfx();
52*16d5c24eSOliver Tappe _IO_cleanup_region_end (0);
53*16d5c24eSOliver Tappe }
54*16d5c24eSOliver Tappe return *this;
55*16d5c24eSOliver Tappe }
56