summaryrefslogtreecommitdiff
path: root/manpage.h
blob: 8fdcb09a8c151371cb1fb48a1c3e60361d605280 (plain)
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
60
61
62
63
64
/* $Id: manpage.h,v 1.1 2004-05-03 05:17:48 behdad Exp $
 * stuff to do with manual page outputing
 */
#ifndef MANPAGE_H
#define MANPAGE_H

#include "c2man.h"

typedef struct Section Section;
struct Section
{
    Section *next;
    char *name;
    char *text;
    boolean been_output;
};

typedef struct ManualPage ManualPage;
struct ManualPage
{
    DeclSpec *decl_spec;
    Declarator *declarator;
    ManualPage *next;
    Section *first_section;
    char *description;
    char *returns;
    char *sourcefile;
    Time_t sourcetime;
};

enum LinkType
{
#ifdef HAS_LINK
    LINK_HARD,	/* filesystem hard link */
#endif
#ifdef HAS_SYMLINK
    LINK_SOFT,	/* filesystem soft link */
#endif
    LINK_FILE,	/* nroff file with .so directive */
    LINK_NONE,	/* don't create extra links for it */
    LINK_REMOVE	/* don't create extra links & remove existing ones */
};

/* list of manual pages */
extern ManualPage *firstpage;

void
new_manual_page _((char *comment, DeclSpec *decl_spec, Declarator *declarator));

/* remember the terse description from the first comment in a file */
void remember_terse _((char *comment));

void output_manual_pages _((ManualPage *first, int num_input_files,
    enum LinkType link_type));

void free_manual_pages _((ManualPage *first));

void output_format_string _((const char *fmt));

void output_warning _((void));

void output_comment _((const char *comment));

#endif