comparison th_printf1.c @ 457:85fa3d333556

Actually, revert the boolean changes .. meh.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 02 Jan 2018 23:09:29 +0200
parents 347bfd3e017e
children e4ce60239d16
comparison
equal deleted inserted replaced
456:1bf886fa9db5 457:85fa3d333556
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 9
10 int TH_PFUNC_NAME (char *buf, const int len, int *pos, 10 int TH_PFUNC_NAME (char *buf, const int len, int *pos,
11 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,
12 const bool f_unsig, bool *f_neg) 12 const BOOL f_unsig, BOOL *f_neg)
13 #ifdef TH_PFUNC_HEADER 13 #ifdef TH_PFUNC_HEADER
14 ; 14 ;
15 #else 15 #else
16 { 16 {
17 if (f_radix > 16) 17 if (f_radix > 16)
18 return EOF; 18 return EOF;
19 19
20 // Check for negative value 20 // Check for negative value
21 if (!f_unsig && pval < 0) 21 if (!f_unsig && pval < 0)
22 { 22 {
23 *f_neg = true; 23 *f_neg = TRUE;
24 pval = -pval; 24 pval = -pval;
25 } 25 }
26 else 26 else
27 *f_neg = false; 27 *f_neg = FALSE;
28 28
29 // Render the value to a string in buf (reversed) 29 // Render the value to a string in buf (reversed)
30 TH_PFUNC_TYPE_U val = pval; 30 TH_PFUNC_TYPE_U val = pval;
31 31
32 // Special case for value of 0 32 // Special case for value of 0