Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Lex Wennmacher <wennmach@netbsd.org>
List: source-changes
Date: 11/25/1999 08:50:08
Module Name:	basesrc
Committed By:	wennmach
Date:		Thu Nov 25 16:50:08 UTC 1999

Modified Files:
	basesrc/lib/libc/gen: vis.c

Log Message:
Added new functions

     char *
     svis(char *dst, int c, int flag, int nextc, const char *extra);

     int
     strsvis(char *dst, const char *src, int flag, const char *extra);

     int
     strsvisx(char *dst, const char *src, size_t len, int flag,
             const char *extra);

These functions correspond to vis(), strvis(), and strvisx() but have an
additional argument extra, pointing to a NUL terminated list of characters.
These characters will be copied encoded or backslash-escaped into dst. These
functions are useful e. g.  to remove the special meaning of certain
characters to shells.

To implement the new functions, vis underwent a major rewrite. Most functions
now use a central macro, SVIS. Performance increase ~ factor 2.

Reviewed by Christos.


To generate a diff of this commit:
cvs rdiff -r1.14 -r1.15 basesrc/lib/libc/gen/vis.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.