diff options
author | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-03-27 10:23:32 +0000 |
---|---|---|
committer | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-03-27 10:23:32 +0000 |
commit | 5c9187b52336154d3cb5195f45b99c80e5097d24 (patch) | |
tree | 8a190343aae977bc4ef3dacf964f96e38f1212ac /src/inp_str.c | |
parent | d8d8a0e6caf163cbffa9d1f2beb4c6c7d2e2bdb9 (diff) | |
download | mpc-5c9187b52336154d3cb5195f45b99c80e5097d24.tar.gz |
[configure.ac] minimal GMP version is now 4.1.3 instead of 4.2
[mem.c] new wrapper file for mp_get_memory_functions (not in GMP 4.1.3)
[get_str.c,inp_str.c] moved mp_get_memory_functions to mem.c
[tests/tset.c,tests/random.c] added wrappers for gmp_random functions (not in GMP 4.1.3)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@509 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src/inp_str.c')
-rw-r--r-- | src/inp_str.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/inp_str.c b/src/inp_str.c index 2d9d0f8..7827f04 100644 --- a/src/inp_str.c +++ b/src/inp_str.c @@ -1,6 +1,6 @@ /* mpc_inp_str -- Input a complex number from a given stream. -Copyright (C) 2009 Andreas Enge, Philippe Th\'eveny +Copyright (C) 2009 Andreas Enge, Philippe Th\'eveny, Paul Zimmermann. This file is part of the MPC Library. @@ -37,24 +37,6 @@ skip_whitespace (FILE *stream) { return size; } - -static char * -mpc_alloc_str (size_t len) { - void * (*allocfunc) (size_t); - mp_get_memory_functions (&allocfunc, NULL, NULL); - return (char *) ((*allocfunc) (len * sizeof (char))); -} - - -static char * -mpc_realloc_str (char * str, size_t oldlen, size_t newlen) { - void * (*reallocfunc) (void *, size_t, size_t); - mp_get_memory_functions (NULL, &reallocfunc, NULL); - return (char *) ((*reallocfunc) (str, oldlen * sizeof (char), - newlen * sizeof (char))); -} - - /* Extract from stream the longest string made up of alphanumeric char and '_' (i.e. n-char-sequence). The user must free the returned string. */ |