40
40
* to select alternate encoding format
42
#define VIS_OCTAL 0x01 /* use octal \ddd format */
43
#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropiate */
42
#define VIS_OCTAL 0x001 /* use octal \ddd format */
43
#define VIS_CSTYLE 0x002 /* use \[nrft0..] where appropiate */
46
46
* to alter set of characters encoded (default is to encode all
47
47
* non-graphic except space, tab, and newline).
49
#define VIS_SP 0x04 /* also encode space */
50
#define VIS_TAB 0x08 /* also encode tab */
51
#define VIS_NL 0x10 /* also encode newline */
49
#define VIS_SP 0x004 /* also encode space */
50
#define VIS_TAB 0x008 /* also encode tab */
51
#define VIS_NL 0x010 /* also encode newline */
52
52
#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL)
53
#define VIS_SAFE 0x20 /* only encode "unsafe" characters */
53
#define VIS_SAFE 0x020 /* only encode "unsafe" characters */
58
#define VIS_NOSLASH 0x40 /* inhibit printing '\' */
59
#define VIS_HTTPSTYLE 0x80 /* http-style escape % HEX HEX */
58
#define VIS_NOSLASH 0x040 /* inhibit printing '\' */
59
#define VIS_HTTP1808 0x080 /* http-style escape % hex hex */
60
#define VIS_HTTPSTYLE 0x080 /* http-style escape % hex hex */
61
#define VIS_MIMESTYLE 0x100 /* mime-style escape = HEX HEX */
62
#define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */
63
#define VIS_NOESCAPE 0x400 /* don't decode `\' */
64
#define _VIS_END 0x800 /* for unvis */
62
67
* unvis return codes
73
#define UNVIS_END 1 /* no more characters */
78
#define UNVIS_END _VIS_END /* no more characters */
76
85
char *vis(char *, int, int, int);
86
char *nvis(char *, size_t, int, int, int);
77
88
char *svis(char *, int, int, int, const char *);
89
char *snvis(char *, size_t, int, int, int, const char *);
78
91
int strvis(char *, const char *, int);
92
int strnvis(char *, size_t, const char *, int);
79
94
int strsvis(char *, const char *, int, const char *);
95
int strsnvis(char *, size_t, const char *, int, const char *);
80
97
int strvisx(char *, const char *, size_t, int);
98
int strnvisx(char *, size_t, const char *, size_t, int);
81
100
int strsvisx(char *, const char *, size_t, int, const char *);
101
int strsnvisx(char *, size_t, const char *, size_t, int, const char *);
82
103
int strunvis(char *, const char *);
104
int strnunvis(char *, size_t, const char *);
83
106
int strunvisx(char *, const char *, int);
84
int unvis(char *, int, int *, int);
107
int strnunvisx(char *, size_t, const char *, int);
109
#ifndef __LIBC12_SOURCE__
110
int unvis(char *, int, int *, int) __RENAME(__unvis50);
87
114
#endif /* !_VIS_H_ */