Kyle Swenson | 545712c | 2021-11-17 12:25:04 -0700 | [diff] [blame] | 1 | |
| 2 | #ifndef UNESCAPE_C_STRING_H |
| 3 | # define UNESCAPE_C_STRING_H |
| 4 | |
| 5 | typedef enum C_STRING_RESULT { |
| 6 | C_STRING_RESULT_END, |
| 7 | C_STRING_RESULT_NOCHAR, |
| 8 | C_STRING_RESULT_PENDING, |
| 9 | C_STRING_RESULT_SYNBAD, |
| 10 | C_STRING_RESULT_VALID, |
| 11 | C_STRING_RESULT_VALIDPUSH |
| 12 | } C_STRING_RESULT; |
| 13 | |
| 14 | typedef enum C_STRING_FLAG { |
| 15 | C_STRING_FLAG_NONE, |
| 16 | C_STRING_FLAG_END |
| 17 | } C_STRING_FLAG; |
| 18 | |
| 19 | int unescape_c_string(char *cp, char c, int *astate, int flag); |
| 20 | int str_unescape_c_string(char *dst, const char *src); |
| 21 | ssize_t strn_unescape_c_string(char *dst, const char *src, size_t sz); |
| 22 | |
| 23 | #endif |