1 /* __gmp_obstack_printf_funs -- support for gmp_obstack_printf and
4 THE FUNCTIONS IN THIS FILE ARE FOR INTERNAL USE ONLY. THEY'RE ALMOST
5 CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
6 FUTURE GNU MP RELEASES.
8 Copyright 2001 Free Software Foundation, Inc.
10 This file is part of the GNU MP Library.
12 The GNU MP Library is free software; you can redistribute it and/or modify
13 it under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 3 of the License, or (at your
15 option) any later version.
17 The GNU MP Library is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
20 License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
27 #if HAVE_OBSTACK_VPRINTF
29 #define _GNU_SOURCE /* ask glibc <stdio.h> for obstack_vprintf */
37 #include <stdio.h> /* for obstack_vprintf */
46 gmp_obstack_memory (struct obstack
*ob
, const char *ptr
, size_t len
)
48 obstack_grow (ob
, ptr
, len
);
53 gmp_obstack_reps (struct obstack
*ob
, int c
, int reps
)
55 obstack_blank (ob
, reps
);
56 memset ((char *) obstack_next_free(ob
) - reps
, c
, reps
);
60 const struct doprnt_funs_t __gmp_obstack_printf_funs
= {
61 (doprnt_format_t
) obstack_vprintf
,
62 (doprnt_memory_t
) gmp_obstack_memory
,
63 (doprnt_reps_t
) gmp_obstack_reps
66 #endif /* HAVE_OBSTACK_VPRINTF */