Commit | Line | Data |
---|---|---|
f8b55f57 MT |
1 | /* |
2 | * Copyright (c) 1989 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * Redistribution and use in source and binary forms are permitted | |
6 | * provided that the above copyright notice and this paragraph are | |
7 | * duplicated in all such forms and that any documentation, | |
8 | * advertising materials, and other materials related to such | |
9 | * distribution and use acknowledge that the software was developed | |
10 | * by the University of California, Berkeley. The name of the | |
11 | * University may not be used to endorse or promote products derived | |
12 | * from this software without specific prior written permission. | |
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
16 | * | |
17 | * @(#)vis.h 5.1 (Berkeley) %G% | |
18 | */ | |
19 | ||
20 | /* | |
21 | * cencode flags | |
22 | */ | |
23 | #define CENC_CSTYLE 1 /* use C-style backslash sequences */ | |
24 | #define CENC_GRAPH 2 /* encode as ^? and M- sequences */ | |
25 | #define CENC_OCTAL 4 /* encode as octal sequences */ | |
26 | #define CENC_ALL (CENC_CSTYLE|CENC_GRAPH|CENC_OCTAL) | |
27 | #define CENC_WHITE 8 /* encode white-space chars (sp-tb-nl) */ | |
28 | #define CENC_RACHAR 0x10 /* look at read-ahead char */ | |
29 | ||
30 | /* | |
31 | * cdecode flags | |
32 | */ | |
33 | #define CDEC_HAT 1 /* treat ^ as special */ | |
34 | #define CDEC_END 2 /* reset decode machine */ | |
35 | ||
36 | /* | |
37 | * cdecode return codes | |
38 | */ | |
39 | #define CDEC_NEEDMORE 0 /* not done, feed another char */ | |
40 | #define CDEC_OK 1 /* done, character ready */ | |
41 | #define CDEC_OKPUSH 2 /* done, push back passed char */ | |
42 | #define CDEC_NOCHAR 3 /* done, no character ready (hidden newline) */ | |
43 | #define CDEC_SYNBAD -1 /* unrecognized escape sequence */ | |
44 | ||
45 | extern char *cencode(); |