comparison gsm-fw/sprintf/defs.h @ 145:7e45ada9c365

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