History log of /openbsd/lib/libc/gen/vis.c (Results 1 – 25 of 26)
Revision Date Author Comments
# 93060a2b 04-May-2022 deraadt <deraadt@openbsd.org>

Found two multiple evaluation macros. One of them so long and scary it
too many people to unravel correctly and place into a static function.
While here, move the flags bits into local variables, whi

Found two multiple evaluation macros. One of them so long and scary it
too many people to unravel correctly and place into a static function.
While here, move the flags bits into local variables, which reduces
the amount of () in the checks.
help from millert, miod, tedu

show more ...


# 6e2c7a28 13-Sep-2015 guenther <guenther@openbsd.org>

Wrap <vis.h> so that calls go direct and the symbols are all weak


# 5dd668c8 20-Jul-2015 millert <millert@openbsd.org>

Add VIS_DQ to escape double quotes. OK deraadt@ semarie@ reyk@


# e240fc74 17-Nov-2014 millert <millert@openbsd.org>

Add stravis(), an allocating version of strvis(). OK doug@


# 83c05903 13-Mar-2011 guenther <guenther@openbsd.org>

Fix handling of VIS_ALL: in vis(), actually encode all characters
as requested and give a correct estimate when they don't all fit,
and in unvis() decode them instead of erroring

ok nicm@, deraadt@


# 24f1563c 24-Aug-2010 djm <djm@openbsd.org>

backout VIS_HEX. guenther@ points out that the C89 \xff encoding
idiotically accepts more then two hex digits following the \x, even
on platforms where a char has 8 bits. It is therefore dangerous to

backout VIS_HEX. guenther@ points out that the C89 \xff encoding
idiotically accepts more then two hex digits following the \x, even
on platforms where a char has 8 bits. It is therefore dangerous to have
an almost-bit-not-quite compatible format in vis(3).

The VIS_ALL (encode all characters) option introduced in the same commit
remains.

show more ...


# 6f509b79 21-Aug-2010 djm <djm@openbsd.org>

Two new flags: VIS_ALL - encode all characters, not just invisible ones
and VIS_HEX - use C89 \xff style hexadecimal encoding.

Teach unvis(3) how to deal with the hex encoding.

feedback and ok mill

Two new flags: VIS_ALL - encode all characters, not just invisible ones
and VIS_HEX - use C89 \xff style hexadecimal encoding.

Teach unvis(3) how to deal with the hex encoding.

feedback and ok millert@ chl@

show more ...


# fedf8856 01-Sep-2005 millert <millert@openbsd.org>

repair VIS_GLOB; deraadt@ otto@ OK


# 438197b3 29-Aug-2005 otto <otto@openbsd.org>

Remove spurious call to isgraph() that sneaked in in rev 1.16.
ok millert@ deraadt@


# f947a440 28-Aug-2005 millert <millert@openbsd.org>

Fix the VIS_GLOB checks added in rev 1.16
Add missing casts to u_char so 0xff is treated the same on machines
with signed and unsigned chars.
OK deraadt@ espie@


# 987dd585 09-Aug-2005 millert <millert@openbsd.org>

Add VIS_GLOB to escape special characters used by shell-style globbing.
From Solar Designer based on changes in FreeBSD. OK deraadt@


# c2c925de 08-Aug-2005 espie <espie@openbsd.org>

zap remaining rcsid.

Kill old files that are no longer compiled.

okay theo


# 80647cb2 25-Mar-2005 otto <otto@openbsd.org>

deregister (and deauto!). ok millert@ marco@


# 73b3e3c4 18-May-2004 jfb <jfb@openbsd.org>

ansify function definitions and zap some `register'

ok millert@


# 6580fee3 02-Jun-2003 millert <millert@openbsd.org>

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 3e77e835 14-May-2003 pjanzen <pjanzen@openbsd.org>

sync vis() behaviour when VIS_SAFE to man page: don't do anything if isgraph()
is true, even if the character isn't 7-bit.


# 88ac0e62 01-Jul-2002 deraadt <deraadt@openbsd.org>

need string.h


# bab114b3 01-Jul-2002 pjanzen <pjanzen@openbsd.org>

Fix strnvis(): don't truncate unnecessarily, set the return value correctly
if we had to truncate, and don't NUL-terminate if size == 0.


# e7beb4a7 19-Feb-2002 millert <millert@openbsd.org>

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# d7063c97 13-Aug-2001 millert <millert@openbsd.org>

Explicitly NUL terminate dst in strvis() and strvisx() in case
we are passes an empty string. vis() and strnvis() were already OK.
Based on patch by wilfried@openbsd.org


# 3a26af34 21-Nov-2000 millert <millert@openbsd.org>

Add strnvis(3) -- a length-bounded version of strvis(3) with a return
value similar to snprintf(3) and strlcpy(3).


# 6570f9a2 19-Jul-2000 deraadt <deraadt@openbsd.org>

off-by-one calculation error; getcwd() would return NULL if the buffer was
the needed length + terminating byte + 1; that 1 is not needed; assar


# b7113356 25-Jul-1997 mickey <mickey@openbsd.org>

#if __STDC__ --> #ifdef __STDC__


# b0f29dd7 09-Jul-1997 millert <millert@openbsd.org>

Clean up some -Wall complaints.


# e9b2b68c 19-Aug-1996 tholo <tholo@openbsd.org>

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


12