repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
regress
/
lib
/
libc
/
stdio
/
printf
/
printf.c
blob
94ef0bf83d4f93b892e23610419e56f7fa03a12b
1
/* $NetBSD$ */
2
3
/*
4
* Written by Klaus Klein <kleink@NetBSD.org>, February 28, 2006.
5
* Public domain.
6
*/
7
8
#include <assert.h>
9
#include <stdio.h>
10
11
int
12
main
(
int
argc
,
char
*
argv
[])
13
{
14
char
s
[
2
];
15
16
/* PR lib/32951: %.0f formats (0.0,0.5] to "0." */
17
assert
(
snprintf
(
s
,
sizeof
(
s
),
"%.0f"
,
0.1
) ==
1
);
18
assert
(
s
[
0
] ==
'0'
);
19
/* assert(s[1] == '\0'); */
20
21
return
0
;
22
}