s4:heimdal: import lorikeet-heimdal-202201172009 (commit 5a0b45cd723628b3690ea848548b...
[samba.git] / source4 / heimdal / lib / roken / vis.hin
index 25d662a980229fd15502504f15dedec2bce30561..f1027f524c7776376d396e165e01ae2a88b0b0e2 100644 (file)
 /*
  * to select alternate encoding format
  */
-#define        VIS_OCTAL       0x01    /* use octal \ddd format */
-#define        VIS_CSTYLE      0x02    /* use \[nrft0..] where appropiate */
+#define VIS_OCTAL       0x0001  /* use octal \ddd format */
+#define VIS_CSTYLE      0x0002  /* use \[nrft0..] where appropiate */
 
 /*
  * to alter set of characters encoded (default is to encode all
  * non-graphic except space, tab, and newline).
  */
-#define        VIS_SP          0x04    /* also encode space */
-#define        VIS_TAB         0x08    /* also encode tab */
-#define        VIS_NL          0x10    /* also encode newline */
-#define        VIS_WHITE       (VIS_SP | VIS_TAB | VIS_NL)
-#define        VIS_SAFE        0x20    /* only encode "unsafe" characters */
+#define VIS_SP          0x0004  /* also encode space */
+#define VIS_TAB         0x0008  /* also encode tab */
+#define VIS_NL          0x0010  /* also encode newline */
+#define VIS_WHITE       (VIS_SP | VIS_TAB | VIS_NL)
+#define VIS_SAFE        0x0020  /* only encode "unsafe" characters */
+#define VIS_DQ          0x8000  /* also encode double quotes */
 
 /*
  * other
  */
-#define        VIS_NOSLASH     0x40    /* inhibit printing '\' */
-#define        VIS_HTTPSTYLE   0x80    /* http-style escape % HEX HEX */
+#define VIS_NOSLASH     0x0040  /* inhibit printing '\' */
+#define VIS_HTTPSTYLE   0x0080  /* http-style escape % HEX HEX */
+#define VIS_HTTP1808    0x0080  /* http-style escape % hex hex */
+#define VIS_GLOB        0x0100  /* encode glob(3) magic characters */
+#if 0
+/*
+ * Not yet.  FreeBSD calls 0x0400 VIS_HTTP1866, but if that means RFC1866,
+ * that's HTML 2.0, not HTTP.  Argh.
+ */
+#define VIS_MIMESTYLE   0x0200  /* mime-style escape = HEX HEX */
+#define VIS_HTML1866    0x0400  /* HTML-style &#num; or &string; */
+#endif
+#define VIS_NOESCAPE    0x0800  /* don't decode `\'; URL-encode only when given
+                                 * with VIS_HTTPSTYLE */
+#if 0
+#define _VIS_END        0x1000  /* for unvis */
+#endif
+#define VIS_SHELL       0x2000  /* encode shell special characters [not glob] */
+#define VIS_META        (VIS_WHITE | VIS_GLOB | VIS_SHELL)
+#define VIS_NOLOCALE    0x4000  /* encode using the C locale */
 
 /*
  * unvis return codes