diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-01-17 00:51:01 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-01-17 00:51:01 +0100 |
commit | 2059dcc8f3e079c1f9e1ef3da665eca5884afc7b (patch) | |
tree | e710d9db70eef682021add8f7ab81a7ff7b016bd /printf | |
parent | b715f7ad21ab6aa7e9f9ba4d55a39ff78877e1cc (diff) | |
download | gmp-2059dcc8f3e079c1f9e1ef3da665eca5884afc7b.tar.gz |
* gmp-impl.h, mpq/get_str.c, printf/asprntffuns.c, printf/doprnt.c,
printf/repl-vsnprintf.c, printf/snprntffuns.c: Some fixes to compile
as C++.
Diffstat (limited to 'printf')
-rw-r--r-- | printf/asprntffuns.c | 4 | ||||
-rw-r--r-- | printf/doprnt.c | 4 | ||||
-rw-r--r-- | printf/repl-vsnprintf.c | 4 | ||||
-rw-r--r-- | printf/snprntffuns.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/printf/asprntffuns.c b/printf/asprntffuns.c index 8e56ab97e..67192a1bc 100644 --- a/printf/asprntffuns.c +++ b/printf/asprntffuns.c @@ -1,6 +1,6 @@ /* __gmp_asprintf_memory etc -- formatted output to allocated space. -Copyright 2001 Free Software Foundation, Inc. +Copyright 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -70,7 +70,7 @@ __gmp_asprintf_final (struct gmp_asprintf_t *d) char *buf = d->buf; ASSERT (d->alloc >= d->size + 1); buf[d->size] = '\0'; - __GMP_REALLOCATE_FUNC_MAYBE (buf, d->alloc, d->size+1); + __GMP_REALLOCATE_FUNC_MAYBE_TYPE (buf, d->alloc, d->size+1, char); *d->result = buf; return 0; } diff --git a/printf/doprnt.c b/printf/doprnt.c index 40d7c6725..f830b8755 100644 --- a/printf/doprnt.c +++ b/printf/doprnt.c @@ -4,7 +4,7 @@ CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES. -Copyright 2001 Free Software Foundation, Inc. +Copyright 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -156,7 +156,7 @@ __gmp_doprnt (const struct doprnt_funs_t *funs, void *data, use __gmp_allocate_func rather than TMP_ALLOC, to avoid overflowing the stack if a long output string is given. */ alloc_fmt_size = strlen (orig_fmt) + 1; - alloc_fmt = (*__gmp_allocate_func) (alloc_fmt_size); + alloc_fmt = __GMP_ALLOCATE_FUNC_TYPE (alloc_fmt_size, char); fmt = alloc_fmt; strcpy (fmt, orig_fmt); diff --git a/printf/repl-vsnprintf.c b/printf/repl-vsnprintf.c index bcf34b5f7..a9630924c 100644 --- a/printf/repl-vsnprintf.c +++ b/printf/repl-vsnprintf.c @@ -5,7 +5,7 @@ CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES. -Copyright 2001 Free Software Foundation, Inc. +Copyright 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -356,7 +356,7 @@ __gmp_replacement_vsnprintf (char *buf, size_t buf_size, { char *s; - s = (*__gmp_allocate_func) (total_width); + s = __GMP_ALLOCATE_FUNC_TYPE (total_width, char); vsprintf (s, orig_fmt, orig_ap); len = strlen (s); if (buf_size != 0) diff --git a/printf/snprntffuns.c b/printf/snprntffuns.c index c17680a2b..0fe40f88f 100644 --- a/printf/snprntffuns.c +++ b/printf/snprntffuns.c @@ -4,7 +4,7 @@ CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES. -Copyright 2001 Free Software Foundation, Inc. +Copyright 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -97,7 +97,7 @@ gmp_snprintf_format (struct gmp_snprintf_t *d, const char *fmt, do { alloc *= 2; - p = (*__gmp_allocate_func) (alloc); + p = __GMP_ALLOCATE_FUNC_TYPE (alloc, char); va_copy (ap, orig_ap); ret = vsnprintf (p, alloc, fmt, ap); (*__gmp_free_func) (p, alloc); |