(svn r18181) -Add: the concept of zero filled numbers to strgen

This commit is contained in:
rubidium
2009-11-19 13:53:54 +00:00
parent d31d1396e2
commit 7aec375ce6
3 changed files with 18 additions and 11 deletions

View File

@@ -72,6 +72,7 @@ enum StringControlCode {
SCC_STRING,
SCC_COMMA,
SCC_NUM,
SCC_ZEROFILL_NUM,
SCC_HEX,
SCC_BYTES,

View File

@@ -99,6 +99,7 @@ static const CmdStruct _cmd_structs[] = {
/* Numbers */
{"COMMA", EmitSingleChar, SCC_COMMA, 1, C_NONE}, // Number with comma
{"NUM", EmitSingleChar, SCC_NUM, 1, C_NONE}, // Signed number
{"ZEROFILL_NUM", EmitSingleChar, SCC_ZEROFILL_NUM, 2, C_NONE}, // Unsigned number with zero fill, e.g. "02". First parameter is number, second minimum length
{"BYTES", EmitSingleChar, SCC_BYTES, 1, C_NONE}, // Unsigned number with "bytes", i.e. "1.02 MiB or 123 KiB"
{"CURRENCY", EmitSingleChar, SCC_CURRENCY, 1, C_NONE},