38474e92422cb3f47e5f69ed454f663d322f61b0
[platform/upstream/groff.git] / src / preproc / refer / refer.h
1 // -*- C++ -*-
2 /* Copyright (C) 1989-2014  Free Software Foundation, Inc.
3      Written by James Clark (jjc@jclark.com)
4
5 This file is part of groff.
6
7 groff is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 #include "lib.h"
21
22 #include <stdlib.h>
23 #include <assert.h>
24 #include <errno.h>
25
26 #include "errarg.h"
27 #include "error.h"
28 #include "stringclass.h"
29 #include "cset.h"
30 #include "cmap.h"
31
32 #include "defs.h"
33
34 unsigned hash_string(const char *, int);
35 int next_size(int);
36
37 extern string capitalize_fields;
38 extern string reverse_fields;
39 extern string abbreviate_fields;
40 extern string period_before_last_name;
41 extern string period_before_initial;
42 extern string period_before_hyphen;
43 extern string period_before_other;
44 extern string sort_fields;
45 extern int annotation_field;
46 extern string annotation_macro;
47 extern string discard_fields;
48 extern string articles;
49 extern int abbreviate_label_ranges;
50 extern string label_range_indicator;
51 extern int date_as_label;
52 extern string join_authors_exactly_two;
53 extern string join_authors_last_two;
54 extern string join_authors_default;
55 extern string separate_label_second_parts;
56 extern string et_al;
57 extern int et_al_min_elide;
58 extern int et_al_min_total;
59
60 extern int compatible_flag;
61
62 extern int set_label_spec(const char *);
63 extern int set_date_label_spec(const char *);
64 extern int set_short_label_spec(const char *);
65
66 extern int short_label_flag;
67
68 void clear_labels();
69 void command_error(const char *,
70                    const errarg &arg1 = empty_errarg,
71                    const errarg &arg2 = empty_errarg,
72                    const errarg &arg3 = empty_errarg);
73
74 class reference;
75
76 void compute_labels(reference **, int);