summaryrefslogtreecommitdiff
path: root/cmd-line-utils/libedit/np/vis.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/libedit/np/vis.h')
-rw-r--r--cmd-line-utils/libedit/np/vis.h49
1 files changed, 38 insertions, 11 deletions
diff --git a/cmd-line-utils/libedit/np/vis.h b/cmd-line-utils/libedit/np/vis.h
index 11f5b740e2d..54a76e9108f 100644
--- a/cmd-line-utils/libedit/np/vis.h
+++ b/cmd-line-utils/libedit/np/vis.h
@@ -1,4 +1,4 @@
-/* $NetBSD: vis.h,v 1.16 2005/09/13 01:44:32 christos Exp $ */
+/* $NetBSD: vis.h,v 1.19 2011/03/12 19:52:45 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -39,24 +39,29 @@
/*
* to select alternate encoding format
*/
-#define VIS_OCTAL 0x01 /* use octal \ddd format */
-#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropiate */
+#define VIS_OCTAL 0x001 /* use octal \ddd format */
+#define VIS_CSTYLE 0x002 /* 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_SP 0x004 /* also encode space */
+#define VIS_TAB 0x008 /* also encode tab */
+#define VIS_NL 0x010 /* also encode newline */
#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL)
-#define VIS_SAFE 0x20 /* only encode "unsafe" characters */
+#define VIS_SAFE 0x020 /* only encode "unsafe" characters */
/*
* other
*/
-#define VIS_NOSLASH 0x40 /* inhibit printing '\' */
-#define VIS_HTTPSTYLE 0x80 /* http-style escape % HEX HEX */
+#define VIS_NOSLASH 0x040 /* inhibit printing '\' */
+#define VIS_HTTP1808 0x080 /* http-style escape % hex hex */
+#define VIS_HTTPSTYLE 0x080 /* http-style escape % hex hex */
+#define VIS_MIMESTYLE 0x100 /* mime-style escape = HEX HEX */
+#define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */
+#define VIS_NOESCAPE 0x400 /* don't decode `\' */
+#define _VIS_END 0x800 /* for unvis */
/*
* unvis return codes
@@ -70,18 +75,40 @@
/*
* unvis flags
*/
-#define UNVIS_END 1 /* no more characters */
+#define UNVIS_END _VIS_END /* no more characters */
+/* XXXMYSQL */
+#ifndef __RENAME
+#define __RENAME(x)
+#endif
__BEGIN_DECLS
char *vis(char *, int, int, int);
+char *nvis(char *, size_t, int, int, int);
+
char *svis(char *, int, int, int, const char *);
+char *snvis(char *, size_t, int, int, int, const char *);
+
int strvis(char *, const char *, int);
+int strnvis(char *, size_t, const char *, int);
+
int strsvis(char *, const char *, int, const char *);
+int strsnvis(char *, size_t, const char *, int, const char *);
+
int strvisx(char *, const char *, size_t, int);
+int strnvisx(char *, size_t, const char *, size_t, int);
+
int strsvisx(char *, const char *, size_t, int, const char *);
+int strsnvisx(char *, size_t, const char *, size_t, int, const char *);
+
int strunvis(char *, const char *);
+int strnunvis(char *, size_t, const char *);
+
int strunvisx(char *, const char *, int);
-int unvis(char *, int, int *, int);
+int strnunvisx(char *, size_t, const char *, int);
+
+#ifndef __LIBC12_SOURCE__
+int unvis(char *, int, int *, int) __RENAME(__unvis50);
+#endif
__END_DECLS
#endif /* !_VIS_H_ */