|
|
|
@ -1601,6 +1601,26 @@ int z_cbvprintf_impl(cbprintf_cb out, void *ctx, const char *fp,
@@ -1601,6 +1601,26 @@ int z_cbvprintf_impl(cbprintf_cb out, void *ctx, const char *fp,
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
case 'p': |
|
|
|
|
/* Implementation-defined: null is "(nil)", non-null
|
|
|
|
|
* has 0x prefix followed by significant address hex |
|
|
|
|
* digits, no leading zeros. |
|
|
|
|
*/ |
|
|
|
|
if (value->ptr != NULL) { |
|
|
|
|
bps = encode_uint((uintptr_t)value->ptr, conv, |
|
|
|
|
buf, bpe); |
|
|
|
|
|
|
|
|
|
/* Use 0x prefix */ |
|
|
|
|
conv->altform_0c = true; |
|
|
|
|
conv->specifier = 'x'; |
|
|
|
|
|
|
|
|
|
goto prec_int_pad0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bps = "(nil)"; |
|
|
|
|
bpe = bps + 5; |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case 'c': |
|
|
|
|
bps = buf; |
|
|
|
|
buf[0] = CHAR_IS_SIGNED ? value->sint : value->uint; |
|
|
|
@ -1653,26 +1673,6 @@ int z_cbvprintf_impl(cbprintf_cb out, void *ctx, const char *fp,
@@ -1653,26 +1673,6 @@ int z_cbvprintf_impl(cbprintf_cb out, void *ctx, const char *fp,
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case 'p': |
|
|
|
|
/* Implementation-defined: null is "(nil)", non-null
|
|
|
|
|
* has 0x prefix followed by significant address hex |
|
|
|
|
* digits, no leading zeros. |
|
|
|
|
*/ |
|
|
|
|
if (value->ptr != NULL) { |
|
|
|
|
bps = encode_uint((uintptr_t)value->ptr, conv, |
|
|
|
|
buf, bpe); |
|
|
|
|
|
|
|
|
|
/* Use 0x prefix */ |
|
|
|
|
conv->altform_0c = true; |
|
|
|
|
conv->specifier = 'x'; |
|
|
|
|
|
|
|
|
|
goto prec_int_pad0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bps = "(nil)"; |
|
|
|
|
bpe = bps + 5; |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case 'n': |
|
|
|
|
if (IS_ENABLED(CONFIG_CBPRINTF_N_SPECIFIER)) { |
|
|
|
|