annotate gsm-fw/sprintf/defs.h @ 421:4f8a9b2229e9

loadtool.help: updates for Compal target support
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 19 Jun 2014 00:23:28 +0000
parents 7e45ada9c365
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
145
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * Embedded [v]sprintf() implementation by Michael Spacefalcon,
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * loosely based on the 4.3BSD-Tahoe version.
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 *
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 * This header file contains some internal definitions used by
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 * different pieces of what used to be one giant _doprnt()
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 * function/module.
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 */
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #define todigit(c) ((c) - '0')
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 #define tochar(n) ((n) + '0')
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 #define LONGINT 0x01 /* long integer */
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 #define LONGDBL 0x02 /* long double; unimplemented */
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #define SHORTINT 0x04 /* short integer */
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 #define ALT 0x08 /* alternate form */
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 #define LADJUST 0x10 /* left adjustment */
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 #define ZEROPAD 0x20 /* zero (as opposed to blank) pad */
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 #define HEXPREFIX 0x40 /* add 0x or 0X prefix */
7e45ada9c365 gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #define UPPERCASE 0x80 /* uppercase forms */