Mercurial > hg > th-libs
comparison th_printf1.c @ 451:db45d6d2e576
Expose some of the internal vprintf() implementation helper functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 25 Oct 2017 22:20:21 +0300 |
parents | 1b3472ba7b23 |
children | efd33accdc81 |
comparison
equal
deleted
inserted
replaced
450:051226a06f70 | 451:db45d6d2e576 |
---|---|
4 * (C) Copyright 2016-2017 Tecnic Software productions (TNSP) | 4 * (C) Copyright 2016-2017 Tecnic Software productions (TNSP) |
5 * | 5 * |
6 * Please read file 'COPYING' for information on license and distribution. | 6 * Please read file 'COPYING' for information on license and distribution. |
7 */ | 7 */ |
8 | 8 |
9 static int TH_PFUNC_NAME (char *buf, const int len, int *pos, | 9 |
10 int TH_PFUNC_NAME (char *buf, const int len, int *pos, | |
10 TH_PFUNC_TYPE_S pval, const int f_radix, const BOOL f_upcase, | 11 TH_PFUNC_TYPE_S pval, const int f_radix, const BOOL f_upcase, |
11 const BOOL f_unsig, BOOL *f_neg) | 12 const BOOL f_unsig, BOOL *f_neg) |
13 #ifdef TH_PFUNC_HEADER | |
14 ; | |
15 #else | |
12 { | 16 { |
13 if (f_radix > 16) | 17 if (f_radix > 16) |
14 return EOF; | 18 return EOF; |
15 | 19 |
16 // Check for negative value | 20 // Check for negative value |
43 while (val > 0 && *pos < len - 1); | 47 while (val > 0 && *pos < len - 1); |
44 buf[*pos] = 0; | 48 buf[*pos] = 0; |
45 | 49 |
46 return (val > 0) ? EOF : 1; | 50 return (val > 0) ? EOF : 1; |
47 } | 51 } |
52 #endif | |
48 | 53 |
49 | 54 |
50 #undef TH_PFUNC_NAME | 55 #undef TH_PFUNC_NAME |
51 #undef TH_PFUNC_SIGNED | 56 #undef TH_PFUNC_SIGNED |
52 #undef TH_PFUNC_TYPE_S | 57 #undef TH_PFUNC_TYPE_S |
53 #undef TH_PFUNC_TYPE_U | 58 #undef TH_PFUNC_TYPE_U |
59 #undef TH_PFUNC_HEADER |