GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  STRING_DEQUOTE (3)

NAME

string_enquote, string_dequote - doubly quoted string conversion routines

CONTENTS

Library
Synopsis
Description
Return Values
See Also
History
Authors

LIBRARY

PDEL Library (libpdel, -lpdel)

SYNOPSIS


.In stdio.h
.In pdel/util/string_quote.h char * string_enquote const char *str const char *mtype char * string_dequote FILE *input const char *mtype

DESCRIPTION

These routines handle converting strings to and from a printable form, namely, doubly-quoted strings with C backslash escapes.

string_enquote encodes the string str using only printable characters and returns the result, which will begin and end with a double quote character. The returned string is allocated with typed_mem(3) type mtype and must be freed by the caller.

string_dequote reads and parses a doubly-quoted string from input and returns the result, allocated with typed_mem(3) type mtype. 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.

string_dequote parses in a liberal manner and does not detect parse errors. Any malformed backslash escapes are passed through unchanged. In other words, if string_dequote is passed a string that was produced by string_enquote, it guarantees to reproduce the original string; however, it will successfully parse any input string.

RETURN VALUES

If there was a system error, string_enquote and string_dequote return NULL with errno set to the appropriate value. string_dequote also returns NULL if the end of file is encountered before the closing quote character, in which case errno is set to EINVAL.

SEE ALSO

string_fp(3), libpdel(3), typed_mem(3)

HISTORY

The PDEL library was developed at Packet Design, LLC. http://www.packetdesign.com/

AUTHORS


.An Archie Cobbs Aq archie@freebsd.org
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.