blob: 46ac0557d10c385db08422701ef15801ea2fd5a0 [file] [log] [blame]
Kyle Swenson545712c2021-11-17 12:25:04 -07001
2#ifndef UNESCAPE_C_STRING_H
3# define UNESCAPE_C_STRING_H
4
5typedef 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
14typedef enum C_STRING_FLAG {
15 C_STRING_FLAG_NONE,
16 C_STRING_FLAG_END
17} C_STRING_FLAG;
18
19int unescape_c_string(char *cp, char c, int *astate, int flag);
20int str_unescape_c_string(char *dst, const char *src);
21ssize_t strn_unescape_c_string(char *dst, const char *src, size_t sz);
22
23#endif