1 /* min(MINT) -- Do decimal input from standard input and store result in
4 Copyright (C) 1991 Free Software Foundation, Inc.
6 This file is part of the GNU MP Library.
8 The GNU MP Library is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 The GNU MP Library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with the GNU MP Library; see the file COPYING. If not, write to
20 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
42 str = (char *) (*_mp_allocate_func) (str_size);
48 size_t old_str_size = str_size;
49 str_size = str_size * 3 / 2;
50 str = (char *) (*_mp_reallocate_func) (str, old_str_size, str_size);
53 if (!(isdigit(c) || c == ' ' || c == '\t'))
61 _mpz_set_str (x, str, 10);
63 (*_mp_free_func) (str, str_size);