diff options
author | dfr <dfr@FreeBSD.org> | 1999-03-11 22:44:02 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1999-03-11 22:44:02 +0000 |
commit | 98732386971c5984171195f55cd5ff92729bb5f5 (patch) | |
tree | 457ec3761146a419bb17b70113dc2a1da817bd87 /lib | |
parent | 29f248cf7f670dd0fdcac48a9cb1d2f0c5d2af30 (diff) | |
download | FreeBSD-src-98732386971c5984171195f55cd5ff92729bb5f5.zip FreeBSD-src-98732386971c5984171195f55cd5ff92729bb5f5.tar.gz |
Add support for long long modifier (e.g. %llx, %lld).
Reviewed by: bde
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdio/vfprintf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 3cb58ed..0ffbc73 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id: vfprintf.c,v 1.19 1998/05/08 05:10:32 jb Exp $"; + "$Id: vfprintf.c,v 1.20 1998/09/16 04:17:44 imp Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -545,7 +545,10 @@ reswitch: switch (ch) { flags |= SHORTINT; goto rflag; case 'l': - flags |= LONGINT; + if (flags & LONGINT) + flags |= QUADINT; + else + flags |= LONGINT; goto rflag; case 'q': flags |= QUADINT; @@ -1016,7 +1019,10 @@ reswitch: switch (ch) { flags |= SHORTINT; goto rflag; case 'l': - flags |= LONGINT; + if (flags & LONGINT) + flags |= QUADINT; + else + flags |= LONGINT; goto rflag; case 'q': flags |= QUADINT; |