summaryrefslogtreecommitdiff
path: root/printf
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-04-23 23:48:21 +0200
committerKevin Ryde <user42@zip.com.au>2003-04-23 23:48:21 +0200
commit960c305298af2d2e5bb32e36ab32dbe6e1ae8138 (patch)
tree95eac704f630fb9777217e0f1bdd52b6e6172fa2 /printf
parentff899db6f668750282a1eb0326341603b3e84c79 (diff)
downloadgmp-960c305298af2d2e5bb32e36ab32dbe6e1ae8138.tar.gz
* printf/doprnt.c: Add M for mp_limb_t.
Diffstat (limited to 'printf')
-rw-r--r--printf/doprnt.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/printf/doprnt.c b/printf/doprnt.c
index 8f7c85ddf..2ff552917 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, 2002 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -423,6 +423,16 @@ __gmp_doprnt (const struct doprnt_funs_t *funs, void *data,
/* glibc strerror(errno), no argument */
goto next;
+ case 'M': /* mp_limb_t */
+ /* mung format string to l or L and let plain printf handle this */
+#if _LONG_LONG_LIMB
+ type = 'L';
+#else
+ type = 'l';
+#endif
+ fmt[-1] = type;
+ break;
+
case 'n':
{
void *p;