Damien Miller | e9cf357 | 2001-02-09 12:55:35 +1100 | [diff] [blame] | 1 | /* $Id: vis.h,v 1.2 2001/02/09 01:55:37 djm Exp $ */ |
| 2 | |
Damien Miller | 874d77b | 2000-10-14 16:23:11 +1100 | [diff] [blame] | 3 | #ifndef _BSD_VIS_H |
| 4 | #define _BSD_VIS_H |
| 5 | |
| 6 | #include "config.h" |
| 7 | |
| 8 | #ifndef HAVE_VIS |
| 9 | |
| 10 | /* |
| 11 | * to select alternate encoding format |
| 12 | */ |
| 13 | #define VIS_OCTAL 0x01 /* use octal \ddd format */ |
| 14 | #define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */ |
| 15 | |
| 16 | /* |
| 17 | * to alter set of characters encoded (default is to encode all |
| 18 | * non-graphic except space, tab, and newline). |
| 19 | */ |
| 20 | #define VIS_SP 0x04 /* also encode space */ |
| 21 | #define VIS_TAB 0x08 /* also encode tab */ |
| 22 | #define VIS_NL 0x10 /* also encode newline */ |
| 23 | #define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) |
| 24 | #define VIS_SAFE 0x20 /* only encode "unsafe" characters */ |
| 25 | |
| 26 | /* |
| 27 | * other |
| 28 | */ |
| 29 | #define VIS_NOSLASH 0x40 /* inhibit printing '\' */ |
| 30 | |
| 31 | char *vis (char *, int, int, int); |
| 32 | #endif /* HAVE_VIS */ |
| 33 | |
| 34 | #endif /* _BSD_VIS_H */ |