+int
+send_help_brief(struct userNode *dest, struct userNode *src, struct helpfile *hf, const char *topic)
+{
+ struct helpfile *lang_hf;
+ struct record_data *rec;
+ struct language *curr;
+
+ if (!topic)
+ topic = "<index>";
+ if (!hf) {
+ _send_help(dest, src, NULL, "HFMSG_MISSING_HELPFILE");
+ return 0;
+ }
+ for (curr = (dest->handle_info ? dest->handle_info->language : lang_C);
+ curr;
+ curr = curr->parent) {
+ lang_hf = dict_find(curr->helpfiles, hf->name, NULL);
+ if (!lang_hf)
+ continue;
+ rec = dict_find(lang_hf->db, topic, NULL);
+ if (rec && rec->type == RECDB_QSTRING)
+ {
+ char* buf;
+ int res;
+
+ buf = malloc(strlen(rec->d.qstring) + 1);
+ strcpy(buf, rec->d.qstring);
+ *strchr(buf, '\n') = 0;
+
+ res = _send_help(dest, src, hf->expand, buf);
+ free(buf);
+ return res;
+ }
+ }
+ rec = dict_find(hf->db, "<missing>", NULL);
+ if (!rec)
+ return 0; /* send_message(dest, src, "MSG_TOPIC_UNKNOWN"); */
+ if (rec->type != RECDB_QSTRING)
+ return 0; /* send_message(dest, src, "HFMSG_HELP_NOT_STRING"); */
+ return _send_help(dest, src, hf->expand, rec->d.qstring);
+}
+