FreeCalypso > hg > fc-selenite
annotate src/libsys/sprintf/defs.h @ 213:f2a59f3c4f8f
targets/*.h: sync with FC Tourmaline
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 31 Oct 2022 00:54:52 +0000 |
parents | 425ab6d987f3 |
children |
rev | line source |
---|---|
86
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * Embedded [v]sprintf() implementation by Mychaela Falconia, |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * loosely based on the 4.3BSD-Tahoe version. |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * This header file contains some internal definitions used by |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * different pieces of what used to be one giant _doprnt() |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * function/module. |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 */ |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #define todigit(c) ((c) - '0') |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #define tochar(n) ((n) + '0') |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #define LONGINT 0x01 /* long integer */ |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 #define LONGDBL 0x02 /* long double; unimplemented */ |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 #define SHORTINT 0x04 /* short integer */ |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 #define ALT 0x08 /* alternate form */ |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 #define LADJUST 0x10 /* left adjustment */ |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 #define ZEROPAD 0x20 /* zero (as opposed to blank) pad */ |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 #define HEXPREFIX 0x40 /* add 0x or 0X prefix */ |
425ab6d987f3
src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 #define UPPERCASE 0x80 /* uppercase forms */ |