From dufault@hda.com  Sat Jan 21 07:21:00 1995
Received: from hda.com (hda.com [199.232.40.182]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id HAA16323 for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Jan 1995 07:20:56 -0800
Received: (dufault@localhost) by hda.com (8.6.9/8.3) id KAA02178; Sat, 21 Jan 1995 10:21:05 -0500
Message-Id: <199501211521.KAA02178@hda.com>
Date: Sat, 21 Jan 1995 10:21:05 -0500
From: Peter Dufault <dufault@hda.com>
Reply-To: dufault@hda.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: precision doesn't work for %s
X-Send-Pr-Version: 3.2

>Number:         155
>Category:       misc
>Synopsis:       precision doesn't work for %s
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs (FreeBSD bugs mailing list)
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 21 07:30:02 1995
>Closed-Date:    Sun Mar 19 22:26:01 PST 1995
>Last-Modified:
>Originator:     Peter &
>Release:        FreeBSD 2.1.0-Development i386
>Organization:
Peter Dufault               Real Time Machine Control and Simulation
HD Associates, Inc.         Voice: 508 433 6936
dufault@hda.com             Fax:   508 433 5267
--  Formerly hd@world.std.com.  E-mail problems? Tell hdslip@iii.net
>Environment:
>Description:
The precision for "%s" is ignored.  Either the man page or the
code are wrong.

>How-To-Repeat:
This code:
main()
{
	printf("precision = 4\n%4s",
"if a precision is specified, no more than the number specified are written.\n");
}

produces this output:

> precision = 4
> if a precision is specified, no more than the number specified are written.

"man 3 printf" says;

> The ``char *'' argument is expected to be a pointer to an array
>            of character type (pointer to a string).  Characters from the ar-
>            ray are written up to (but not including) a terminating NUL char-
>            acter; if a precision is specified, no more than the number spec-
>            ified are written. If a precision is given, no null character
>            need be present; if the precision is not specified, or is greater
>            than the size of the array, the array must contain a terminating
>            NUL character.

>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ache 
State-Changed-When: Sun Mar 19 22:26:01 PST 1995 
State-Changed-Why:  
Man page misunderstanding 
>Unformatted:



