Skip to content

Commit b64f46d

Browse files
author
Marcus Chang
authored
Merge pull request ARMmbed#4 from ARMmbed/width
Add support for width specifiers
2 parents 9c49f34 + 6d2a58a commit b64f46d

File tree

8 files changed

+1514
-476
lines changed

8 files changed

+1514
-476
lines changed

Diff for: README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Minimal printf and snprintf
22

3-
Library supports both printf and snprintf in 960 bytes of flash.
3+
Library supports both printf and snprintf in 1252 bytes of flash.
44

5-
Prints directly to stdio/UART without using malloc. All flags, length, and precision modifiers are ignored. Floating point is disabled by default.
5+
Prints directly to stdio/UART without using malloc. All flags and precision modifiers are ignored. Floating point is disabled by default.
66

77
Supports:
8-
* %d: signed long int.
9-
* %i: signed long int.
10-
* %u: unsigned long int.
11-
* %x: unsigned char printed as hexadecimal number (e.g., FF).
12-
* %X: unsigned char printed as hexadecimal number (e.g., FF).
8+
* %d: signed integer [h, hh, (none), l, ll, z, j, t].
9+
* %i: signed integer [h, hh, (none), l, ll, z, j, t].
10+
* %u: unsigned integer [h, hh, (none), l, ll, z, j, t].
11+
* %x: unsigned integer [h, hh, (none), l, ll, z, j, t], printed as hexadecimal number (e.g., FF).
12+
* %X: unsigned integer [h, hh, (none), l, ll, z, j, t], printed as hexadecimal number (e.g., FF).
1313
* %f: floating point (disabled by default).
1414
* %F: floating point (disabled by default).
1515
* %g: floating point (disabled by default).

Diff for: TESTS/minimal-printf/compliance/main.cpp

+642
Large diffs are not rendered by default.

Diff for: mbed_lib.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
22
"name": "minimal-printf",
33
"config": {
4-
"floating-point": {
4+
"enable-floating-point": {
55
"help": "Enable floating point printing",
66
"value": false
77
},
8-
"floating-point-max-decimals": {
8+
"set-floating-point-max-decimals": {
99
"help": "Maximum number of decimals to be printed",
10-
"value": 3
10+
"value": 6
11+
},
12+
"enable-64-bit": {
13+
"help": "Enable printing 64 bit integers",
14+
"value": true
1115
}
1216
}
1317
}

0 commit comments

Comments
 (0)