source: trunk/third/gmp/mpz/dump.c @ 18191

Revision 18191, 1.3 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18190, which included commits to RCS files with non-trunk default branches.
Line 
1/* mpz_dump - Dump an integer to stdout.
2
3   THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE.  IT IS NOT SAFE TO
4   CALL THIS FUNCTION DIRECTLY.  IN FACT, IT IS ALMOST GUARANTEED THAT THIS
5   FUNCTION WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
6
7
8Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
9
10This file is part of the GNU MP Library.
11
12The GNU MP Library is free software; you can redistribute it and/or modify
13it under the terms of the GNU Lesser General Public License as published by
14the Free Software Foundation; either version 2.1 of the License, or (at your
15option) any later version.
16
17The GNU MP Library is distributed in the hope that it will be useful, but
18WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
20License for more details.
21
22You should have received a copy of the GNU Lesser General Public License
23along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
24the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25MA 02111-1307, USA. */
26
27#include <stdio.h>
28#include <string.h> /* for strlen */
29#include "gmp.h"
30#include "gmp-impl.h"
31
32void
33mpz_dump (mpz_srcptr u)
34{
35  char *str;
36
37  str = mpz_get_str (0, 10, u);
38  printf ("%s\n", str);
39  (*__gmp_free_func) (str, strlen (str) + 1);
40}
Note: See TracBrowser for help on using the repository browser.