-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C 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
-Library General Public License for more details.
+ The GNU C 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
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <stdio.h>
#include <obstack.h>
#include <stdarg.h>
/* Output-room function for obstack streams. */
static void
-DEFUN(grow, (stream, c), FILE *stream AND int c)
+grow (FILE *stream, int c)
{
struct obstack *const obstack = (struct obstack *) stream->__cookie;
/* Move the end of the object back to include only the portion
- of the buffer which the user has already written into. */
+ of the buffer which the user has already written into. */
obstack_blank_fast (obstack, - (stream->__put_limit - stream->__bufp));
- if (stream->__target > obstack_object_size (obstack))
+ if ((size_t) stream->__target > obstack_object_size (obstack))
{
/* Our target (where the buffer maps to) is always zero except when
the user just did a SEEK_END fseek. If he sought within the
else
{
/* Extend the buffer (and the object) to include
- the rest of the obstack chunk (which is unitialized).
+ the rest of the obstack chunk (which is uninitialized).
Data past bufp is undefined. */
stream->__put_limit = stream->__buffer + stream->__bufsize;
obstack_blank_fast (obstack, stream->__put_limit - stream->__bufp);
There is no external state to munge. */
static int
-DEFUN(seek, (cookie, pos, whence),
- PTR cookie AND fpos_t *pos AND int whence)
+seek (void *cookie, fpos_t *pos, int whence)
{
switch (whence)
{
Only what has been written to the stream can be read back. */
static int
-DEFUN(input, (stream), FILE *stream)
+input (FILE *stream)
{
/* Re-sync with the obstack, growing the object if necessary. */
grow (stream, EOF);
/* Initialize STREAM to talk to OBSTACK. */
static void
-DEFUN(init_obstream, (stream, obstack),
- FILE *stream AND struct obstack *obstack)
+init_obstream (FILE *stream, struct obstack *obstack)
{
stream->__mode.__write = 1;
stream->__mode.__read = 1;
}
int
-DEFUN(obstack_vprintf, (obstack, format, args),
- struct obstack *obstack AND const char *format AND va_list args)
+obstack_vprintf (obstack, format, args)
+ struct obstack *obstack;
+ const char *format;
+ va_list args;
{
FILE f;
bzero (&f, sizeof (f));
}
int
-DEFUN(obstack_printf, (obstack, format),
- struct obstack *obstack AND const char *format DOTS)
+obstack_printf (struct obstack *obstack, const char *format, ...)
{
int result;
va_list ap;