11849Swollman/* mpz_dump - Dump an integer to stdout.
21849Swollman
31849Swollman   THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE.  IT IS NOT SAFE TO
41849Swollman   CALL THIS FUNCTION DIRECTLY.  IN FACT, IT IS ALMOST GUARANTEED THAT THIS
51849Swollman   FUNCTION WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
61849Swollman
71849Swollman
81849SwollmanCopyright 1999, 2000, 2001 Free Software Foundation, Inc.
91849Swollman
101849SwollmanThis file is part of the GNU MP Library.
111849Swollman
121849SwollmanThe GNU MP Library is free software; you can redistribute it and/or modify
131849Swollmanit under the terms of the GNU Lesser General Public License as published by
141849Swollmanthe Free Software Foundation; either version 3 of the License, or (at your
151849Swollmanoption) any later version.
161849Swollman
171849SwollmanThe GNU MP Library is distributed in the hope that it will be useful, but
181849SwollmanWITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
191849Swollmanor FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
201849SwollmanLicense for more details.
211849Swollman
221849SwollmanYou should have received a copy of the GNU Lesser General Public License
231849Swollmanalong with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
241849Swollman
251849Swollman#include <stdio.h>
261849Swollman#include <string.h> /* for strlen */
271849Swollman#include "gmp.h"
281849Swollman#include "gmp-impl.h"
291849Swollman
301849Swollmanvoid
311849Swollmanmpz_dump (mpz_srcptr u)
321849Swollman{
331849Swollman  char *str;
341849Swollman
355790Sdg  str = mpz_get_str (0, 10, u);
3650476Speter  printf ("%s\n", str);
371849Swollman  (*__gmp_free_func) (str, strlen (str) + 1);
381849Swollman}
395790Sdg