diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index a62ec6bd81fa..059707c0e5af 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -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; diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index dfc4999c0f05..5e4947916cf3 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -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 @@ -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;