diff options
Diffstat (limited to 'openbsd-compat/vis.h')
-rw-r--r-- | openbsd-compat/vis.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/openbsd-compat/vis.h b/openbsd-compat/vis.h new file mode 100644 index 000000000..52e867b94 --- /dev/null +++ b/openbsd-compat/vis.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef _BSD_VIS_H | ||
2 | #define _BSD_VIS_H | ||
3 | |||
4 | #include "config.h" | ||
5 | |||
6 | #ifndef HAVE_VIS | ||
7 | |||
8 | /* | ||
9 | * to select alternate encoding format | ||
10 | */ | ||
11 | #define VIS_OCTAL 0x01 /* use octal \ddd format */ | ||
12 | #define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */ | ||
13 | |||
14 | /* | ||
15 | * to alter set of characters encoded (default is to encode all | ||
16 | * non-graphic except space, tab, and newline). | ||
17 | */ | ||
18 | #define VIS_SP 0x04 /* also encode space */ | ||
19 | #define VIS_TAB 0x08 /* also encode tab */ | ||
20 | #define VIS_NL 0x10 /* also encode newline */ | ||
21 | #define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) | ||
22 | #define VIS_SAFE 0x20 /* only encode "unsafe" characters */ | ||
23 | |||
24 | /* | ||
25 | * other | ||
26 | */ | ||
27 | #define VIS_NOSLASH 0x40 /* inhibit printing '\' */ | ||
28 | |||
29 | char *vis (char *, int, int, int); | ||
30 | #endif /* HAVE_VIS */ | ||
31 | |||
32 | #endif /* _BSD_VIS_H */ | ||