diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/unvis.c | 3 | ||||
-rw-r--r-- | lib/libc/gen/vis.c | 4 | ||||
-rw-r--r-- | lib/libc/hidden/vis.h | 32 |
3 files changed, 37 insertions, 2 deletions
diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c index 25db9ad8f4d..05749aa2cf4 100644 --- a/lib/libc/gen/unvis.c +++ b/lib/libc/gen/unvis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unvis.c,v 1.16 2015/07/20 01:52:28 millert Exp $ */ +/* $OpenBSD: unvis.c,v 1.17 2015/09/13 11:32:51 guenther Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -204,6 +204,7 @@ unvis(char *cp, char c, int *astate, int flag) return (UNVIS_SYNBAD); } } +DEF_WEAK(unvis); /* * strunvis - decode src into dst diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c index 799f8fd6f21..4400c7bf1ca 100644 --- a/lib/libc/gen/vis.c +++ b/lib/libc/gen/vis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vis.c,v 1.24 2015/07/20 01:52:28 millert Exp $ */ +/* $OpenBSD: vis.c,v 1.25 2015/09/13 11:32:51 guenther Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -136,6 +136,7 @@ done: *dst = '\0'; return (dst); } +DEF_WEAK(vis); /* * strvis, strnvis, strvisx - visually encode characters from src into dst @@ -161,6 +162,7 @@ strvis(char *dst, const char *src, int flag) *dst = '\0'; return (dst - start); } +DEF_WEAK(strvis); int strnvis(char *dst, const char *src, size_t siz, int flag) diff --git a/lib/libc/hidden/vis.h b/lib/libc/hidden/vis.h new file mode 100644 index 00000000000..553c8245a0f --- /dev/null +++ b/lib/libc/hidden/vis.h @@ -0,0 +1,32 @@ +/* $OpenBSD: vis.h,v 1.1 2015/09/13 11:32:51 guenther Exp $ */ +/* + * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBC_VIS_H_ +#define _LIBC_VIS_H_ + +#include_next <vis.h> + +PROTO_DEPRECATED(stravis); +PROTO_DEPRECATED(strnunvis); +PROTO_DEPRECATED(strnvis); +PROTO_DEPRECATED(strunvis); +PROTO_NORMAL(strvis); +PROTO_DEPRECATED(strvisx); +PROTO_NORMAL(unvis); +PROTO_NORMAL(vis); + +#endif /* !_LIBC_VIS_H_ */ |