view src/lib/strescape.h @ 898:0d5be52d7131 HEAD

Use unsigned char* when accessing non-NUL terminating strings. Compiler warnings would then notify about accidentally passing them to functions which require them NUL-terminated. Changed a few functions to use void* to avoid unneeded casting.
author Timo Sirainen <tss@iki.fi>
date Sat, 04 Jan 2003 19:26:29 +0200
parents 21ffcce83c70
children fd8888f6f037
line wrap: on
line source

#ifndef __STRESCAPE_H
#define __STRESCAPE_H

#define IS_ESCAPED_CHAR(c) ((c) == '"' || (c) == '\\')

/* escape all '\' and '"' characters */
const char *str_escape(const char *str);

/* remove all '\' characters, append to given string */
void str_append_unescaped(String *dest, const void *src, size_t src_size);

/* remove all '\' characters */
void str_unescape(char *str);

#endif