MCPcopy Create free account
hub / github.com/OpenPrinting/cups / help_new_node

Function help_new_node

cgi-bin/help-index.c:1177–1202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1175 */
1176
1177static help_node_t * /* O - Node pointer or NULL on error */
1178help_new_node(const char *filename, /* I - Filename */
1179 const char *anchor, /* I - Anchor */
1180 const char *section, /* I - Section */
1181 const char *text, /* I - Text */
1182 time_t mtime, /* I - Modification time */
1183 off_t offset, /* I - Offset in file */
1184 size_t length) /* I - Length in bytes */
1185{
1186 help_node_t *n; /* Node */
1187
1188
1189 n = (help_node_t *)calloc(1, sizeof(help_node_t));
1190 if (!n)
1191 return (NULL);
1192
1193 n->filename = strdup(filename);
1194 n->anchor = anchor ? strdup(anchor) : NULL;
1195 n->section = (section && *section) ? strdup(section) : NULL;
1196 n->text = strdup(text);
1197 n->mtime = mtime;
1198 n->offset = offset;
1199 n->length = length;
1200
1201 return (n);
1202}
1203
1204
1205/*

Callers 2

helpLoadIndexFunction · 0.85
help_load_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected