File: help.h

package info (click to toggle)
xconq 7.2.2-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 8,296 kB
  • ctags: 9,199
  • sloc: ansic: 107,849; sh: 2,108; perl: 2,057; makefile: 1,177; sed: 161; csh: 50; awk: 49; lisp: 39
file content (59 lines) | stat: -rw-r--r-- 1,937 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* Help-related definitions for Xconq.
   Copyright (C) 1991, 1992, 1993, 1994, 1996 Stanley T. Shebs.

Xconq is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.  See the file COPYING.  */

enum nodeclass {
    miscnode,
    utypenode,
    mtypenode,
    ttypenode
};

#include "obstack.h"

typedef struct a_textbuffer {
    char *text;
    int bufmax;
    struct obstack ostack;
} TextBuffer;

typedef struct a_helpnode {
    char *key;
    void (*fn) PARAMS ((int arg, char *key, TextBuffer *buf));
    enum nodeclass nclass;
    int arg;
    char *text;
    int textend;
    int textsize;
    struct a_helpnode *prev;
    struct a_helpnode *next;
} HelpNode;

extern void tbprintf PARAMS ((TextBuffer *buf, char *str, ...));
extern void tbcat PARAMS ((TextBuffer *buf, char *str));

extern HelpNode *first_help_node;

extern HelpNode *copying_help_node;
extern HelpNode *warranty_help_node;

extern void init_help PARAMS ((void));
extern HelpNode *create_help_node PARAMS ((void));
extern HelpNode *add_help_node PARAMS ((char *key, void (*fn)(int, char *, TextBuffer *), int arg, HelpNode *prevnode));
extern HelpNode *find_help_node PARAMS ((HelpNode *node, char *str));
extern void create_game_help_nodes PARAMS ((void));
extern char *get_help_text PARAMS ((HelpNode *node));

extern void describe_topics PARAMS ((int arg, char *key, TextBuffer *buf));
extern void describe_command PARAMS ((int ch, char *name, char *help, int onechar, TextBuffer *buf));
extern void notify_instructions PARAMS ((void));

extern void print_any_news PARAMS ((void));
extern void print_game_description_to_file PARAMS ((FILE *fp));

extern void describe_copyright PARAMS ((int arg, char *key, TextBuffer *buf));
extern void describe_warranty PARAMS ((int arg, char *key, TextBuffer *buf));