James Kuszmaul | 28cc825 | 2021-01-17 11:32:21 -0800 | [diff] [blame^] | 1 | #pragma once |
| 2 | #include "code.h" |
| 3 | |
| 4 | /// Translate a rawrtc return code to a string. |
| 5 | char const* rawrtc_code_to_str(enum rawrtc_code const code); |
| 6 | |
| 7 | /// Translate an re error to a rawrtc code. |
| 8 | enum rawrtc_code rawrtc_error_to_code(const int code); |
| 9 | |
| 10 | /// Duplicate a string. |
| 11 | /// `*destinationp` will be set to a copy of `source` and must be |
| 12 | /// unreferenced. |
| 13 | enum rawrtc_code rawrtc_strdup( |
| 14 | char** const destinationp, // de-referenced |
| 15 | char const* const source); |
| 16 | |
| 17 | /// Print a formatted string to a dynamically allocated buffer. |
| 18 | /// `*destinationp` must be unreferenced. |
| 19 | enum rawrtc_code rawrtc_sdprintf(char** const destinationp, char* const formatter, ...); |