doubly quoted string conversion routines
PDEL Library (libpdel, -lpdel)
These routines handle converting strings to and from a printable form, namely,
doubly-quoted strings with C backslash escapes.
() encodes the string
using only printable characters and
returns the result, which will begin and end with a double quote character.
The returned string is allocated with
and must be freed by the caller.
() reads and parses a
doubly-quoted string from input
the result, allocated with
. The caller must free the returned
string. The input stream is assumed to be pointing at the character after the
opening double quote character. Upon return, it will be pointing to the
character after the closing double quote character.
() parses in a liberal manner
and does not detect parse errors. Any malformed backslash escapes are passed
through unchanged. In other words, if
() is passed a string that
was produced by
guarantees to reproduce the original string; however, it will successfully
parse any input string.
If there was a system error,
set to the appropriate value.
() also returns
if the end of file is encountered
before the closing quote character, in which case
is set to
The PDEL library was developed at Packet Design, LLC.