175584Sru// -*- C++ -*- 2151497Sru/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2004 3151497Sru Free Software Foundation, Inc. 475584Sru Written by James Clark (jjc@jclark.com) 575584Sru 675584SruThis file is part of groff. 775584Sru 875584Srugroff is free software; you can redistribute it and/or modify it under 975584Sruthe terms of the GNU General Public License as published by the Free 1075584SruSoftware Foundation; either version 2, or (at your option) any later 1175584Sruversion. 1275584Sru 1375584Srugroff is distributed in the hope that it will be useful, but WITHOUT ANY 1475584SruWARRANTY; without even the implied warranty of MERCHANTABILITY or 1575584SruFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1675584Srufor more details. 1775584Sru 1875584SruYou should have received a copy of the GNU General Public License along 1975584Sruwith groff; see the file COPYING. If not, write to the Free Software 20151497SruFoundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ 2175584Sru 22104862Sru#include "lib.h" 23104862Sru 2475584Sru#include <stdlib.h> 2575584Sru#include <assert.h> 2675584Sru#include <errno.h> 2775584Sru 2875584Sru#include "errarg.h" 2975584Sru#include "error.h" 3075584Sru#include "stringclass.h" 3175584Sru#include "cset.h" 3275584Sru#include "cmap.h" 3375584Sru 3475584Sru#include "defs.h" 3575584Sru 3675584Sruunsigned hash_string(const char *, int); 3775584Sruint next_size(int); 3875584Sru 3975584Sruextern string capitalize_fields; 4075584Sruextern string reverse_fields; 4175584Sruextern string abbreviate_fields; 4275584Sruextern string period_before_last_name; 4375584Sruextern string period_before_initial; 4475584Sruextern string period_before_hyphen; 4575584Sruextern string period_before_other; 4675584Sruextern string sort_fields; 4775584Sruextern int annotation_field; 4875584Sruextern string annotation_macro; 4975584Sruextern string discard_fields; 5075584Sruextern string articles; 5175584Sruextern int abbreviate_label_ranges; 5275584Sruextern string label_range_indicator; 5375584Sruextern int date_as_label; 5475584Sruextern string join_authors_exactly_two; 5575584Sruextern string join_authors_last_two; 5675584Sruextern string join_authors_default; 5775584Sruextern string separate_label_second_parts; 5875584Sruextern string et_al; 5975584Sruextern int et_al_min_elide; 6075584Sruextern int et_al_min_total; 6175584Sru 6275584Sruextern int compatible_flag; 6375584Sru 6475584Sruextern int set_label_spec(const char *); 6575584Sruextern int set_date_label_spec(const char *); 6675584Sruextern int set_short_label_spec(const char *); 6775584Sru 6875584Sruextern int short_label_flag; 6975584Sru 7075584Sruvoid clear_labels(); 7175584Sruvoid command_error(const char *, 7275584Sru const errarg &arg1 = empty_errarg, 7375584Sru const errarg &arg2 = empty_errarg, 7475584Sru const errarg &arg3 = empty_errarg); 7575584Sru 76151497Sruclass reference; 7775584Sru 7875584Sruvoid compute_labels(reference **, int); 79