File: itostr-4.c

package info (click to toggle)
dateutils 0.4.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,228 kB
  • sloc: ansic: 22,598; makefile: 1,771; yacc: 202; sh: 168; lex: 108
file content (47 lines) | stat: -rw-r--r-- 1,043 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <stdio.h>
#include "strops.h"
#include "nifty.h"

int
main(void)
{
	static char buf[32U];

	buf[ui999999999tostr(buf, 32U, 0U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 32U, 1U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 32U, 1234U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 32U, 12345678U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 32U, 123456789U)] = '\0';
	puts(buf);

	puts("");

	buf[ui999999999tostr(buf, 6U, 0U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 6U, 1000U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 6U, 123400U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 6U, 12345678U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 6U, 123456789U)] = '\0';
	puts(buf);

	puts("");

	buf[ui999999999tostr(buf, 3U, 0U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 3U, 1U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 3U, 1234U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 3U, 12345678U)] = '\0';
	puts(buf);
	buf[ui999999999tostr(buf, 3U, 123456789U)] = '\0';
	puts(buf);
	return 0;
}