[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    cfht_toe(3) manual page Table of Contents

Name

cfht_toe - change regular string to escaped string

Synopsis


#include <cfht/cfht.h>char *cfht_toe(src, dest, size)char *src;char dest;int
size;
libcfht.a

Description

This function takes a normal one character per character string and creates an escaped and readable one.

Src is the source string, and dest is a place to put the created string. Since there may be nulls in the source string, size may be passed in as a counter for examining the source string. 0 may be used for size, in which case conversion will proceed to the first null. This feature should not be used unless it is known that there will be no nulls in the string except at the end.

The src and dest pointers must be non-NULL, and the space for the dest characters must already exist. Src and dest should not be set to the same or overlapping values.

Any non-printable character as defined by isprint(3C) will be converted to a \ followed by three octal digits. The destination string will be null terminated.

Return Value

The return value is a pointer to the created string. NULL is returned to indicate an error.

Errors

The only error condition is to pass in NULL pointers.

See Also

cfht_fre().

Warnings

Do not set src and dest to the same or overlapping pointer values.


Table of Contents