Added "long long" support %ll{d,x,o,i}.

This commit is contained in:
jtc 1995-03-22 00:56:55 +00:00
parent 7681b92c66
commit 3b29974599
2 changed files with 15 additions and 5 deletions

View File

@ -36,7 +36,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/
static char *rcsid = "$Id: vfprintf.c,v 1.15 1995/02/25 07:06:38 cgd Exp $";
static char *rcsid = "$Id: vfprintf.c,v 1.16 1995/03/22 00:56:55 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@ -358,7 +358,12 @@ reswitch: switch (ch) {
flags |= SHORTINT;
goto rflag;
case 'l':
flags |= LONGINT;
if (*fmt == 'l') {
fmt++;
flags |= QUADINT;
} else {
flags |= LONGINT;
}
goto rflag;
case 'q':
flags |= QUADINT;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfscanf.c,v 1.13 1995/02/25 07:02:16 cgd Exp $ */
/* $NetBSD: vfscanf.c,v 1.14 1995/03/22 00:57:02 jtc Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93";
#endif
static char rcsid[] = "$NetBSD: vfscanf.c,v 1.13 1995/02/25 07:02:16 cgd Exp $";
static char rcsid[] = "$NetBSD: vfscanf.c,v 1.14 1995/03/22 00:57:02 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@ -172,7 +172,12 @@ literal:
flags |= SHORT;
goto again;
case 'l':
flags |= LONG;
if (*fmt == 'l') {
fmt++;
flags |= QUAD;
} else {
flags |= LONG;
}
goto again;
case 'q':
flags |= QUAD;