dtm_set_title(3DTM)

NAME
dtm_set_title, dtm_get_title - Set and retrieve a message title.

SYNOPSIS
#include <dtm.h>

dtm_set_title(char *header, char *title)

dtm_get_title(char *header, char *title, int title_length)

DESCRIPTION
dtm_set_title inserts the DTM title tag TTL followed by the null-terminated character string title into the character string header. The title is surrounded by single quotation marks so that it's contents will not affect the interpretation of the rest of the header.

dtm_get_title examines the character string header and extracts up to title_length characters of the delimited title contained within. Memory for the character string title must be allocated by the user before attempting to extract the title from the header. If the value of title_length is less than the number of characters actually delimited as the title in the header, the title string is truncated. Nothing, save the null character '\0', is stored in title if no delimited title string exists in the header.

DIAGNOSTICS
dtm_get_title returns the error DTMERROR if the DTM title tag TTL is not contained within the header, or if following the tag there is no delimited title string. Otherwise, dtm_get_title returns a 0 value.

BUGS
dtm_set_title has no way of determining if the header contains sufficient space to hold the DTM title tag and the title string itself. The results of attempting to store this information beyond the end of the allocated space are undefined.

SEE ALSO
DTM