| 1175 | */ |
| 1176 | |
| 1177 | static help_node_t * /* O - Node pointer or NULL on error */ |
| 1178 | help_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 | /* |
no outgoing calls
no test coverage detected