plucky (3) cl_hp_unfold_field.3.gz

Provided by: libcanlock-dev_3.3.0-1build1_amd64 bug

NAME

       cl_hp_unfold_field - Unfold header field

SYNOPSIS

       #include <libcanlock-3/canlock-hp.h>

       char *cl_hp_unfold_field(const char *data, size_t *data_len);

DESCRIPTION

       The cl_hp_unfold_field() function unfolds a header field.

       The parameter data should point to the beginning of the input data.
       Specify the length of the input data with the value pointed to by the data_len parameter.

       RFC  5322  specifies  in Section 2.2 that CR and LF control characters in header field bodies are allowed
       for folding use only.  This function removes all CR and LF control characters from the input data.

RETURN VALUE

       Upon successful completion a pointer to a new memory block, containing the  unfolded  header  field  with
       NUL-termination, is returned. Otherwise, NULL is returned.

       On success, the caller is responsible to free() the memory block allocated for the output data.

       On  success  the  value  pointed  to  by  data_len  is updated to the length of the unfolded header field
       (without NUL-termination).

AUTHORS

       Michael Baeuerle

REPORTING BUGS

       Report bugs to <mailto:michael.baeuerle@gmx.net>.

STANDARDS

       cl_hp_unfold_field() tries to comply with the following standards:

       RFC 5322

SEE ALSO

       free(3), cl_hp_get_field(3), cl_hp_parse_field(3), canlock-hfp(1), canlock-mhp(1), canlock(1)