cl_hp_unfold_field(3)

πŸ¦‹ cl_hp_unfold_field(3) πŸ¦‹

okay bestie, this page is from the canlock-hp 3.3.2 manual, and it’s all about cl_hp_unfold_field β€” the header-field unfolder. no cap, she’s here to handle those folding CR/LF cuties. πŸ’…βœ¨


🌸 NAME 🌸

cl_hp_unfold_field β€” unfold header field. literally her whole job. 🫢

✨ 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. slay. πŸ’…

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. periodt. πŸŽ€

πŸŽ€ 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. yes bestie, you gotta clean up after yourself. 🧚

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:

πŸ”₯ SEE ALSO πŸ”₯


okay that’s the whole tea. this page is from the canlock-hp 3.3.2 manual, dated 2024-05-11. mwah, bye bestie πŸ’‹πŸ’–

πŸ“¦ where this page comes from