1 /*** key.h ********************************************************************
2 **
3 ** This file is part of BibTool.
4 ** It is distributed under the GNU General Public License.
5 ** See the file COPYING for details.
6 **
7 ** (c) 1996-2020 Gerd Neugebauer
8 **
9 ** Net: gene@gerd-neugebauer.de
10 **
11 ** This program is free software; you can redistribute it and/or modify
12 ** it under the terms of the GNU General Public License as published by
13 ** the Free Software Foundation; either version 2, or (at your option)
14 ** any later version.
15 **
16 ** This program is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ** GNU General Public License for more details.
20 **
21 ** You should have received a copy of the GNU General Public License
22 ** along with this program; if not, write to the Free Software
23 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 **
25 **-----------------------------------------------------------------------------
26 ** Description:
27 **	This header file provides functions to deal with keys as they
28 **	are defined in |keys.h|.
29 **
30 **	This header file automaticall includes the header files
31 **	|database.h| and |sbuffer.h| since datatypes defined there are
32 **	required.
33 **
34 ******************************************************************************/
35 
36 #include <bibtool/symbols.h>
37 #include <bibtool/database.h>
38 #include <bibtool/sbuffer.h>
39 #include <bibtool/keynode.h>
40 
41 #ifdef __STDC__
42 #define _ARG(A) A
43 #else
44 #define _ARG(A) ()
45 #endif
46  Symbol get_field _ARG((DB db, Record rec, Symbol name));/* key.c            */
47  String fmt_expand _ARG((StringBuffer *sb, String cp, DB db, Record rec));/* key.c*/
48  bool foreach_ignored_word _ARG((bool (*fct)_ARG((Symbol))));/* key.c        */
49  bool mark_key _ARG((DB db,Record rec));	   /* key.c                  */
50  bool set_field _ARG((DB db,Record rec,Symbol name,Symbol value));/* key.c   */
51  int apply_fmt _ARG((StringBuffer *sb,char *fmt,Record rec,DB db));/* key.c  */
52  void add_format _ARG((char *s));		   /* key.c                  */
53  void add_ignored_word _ARG((Symbol s));	   /* key.c                  */
54  void add_sort_format _ARG((char *s));		   /* key.c                  */
55  void clear_ignored_words _ARG((void));		   /* key.c                  */
56  void def_format_type _ARG((String s));		   /* key.c                  */
57  void end_key_gen _ARG((void));			   /* key.c                  */
58  void free_key_node _ARG((KeyNode kn));		   /* key.c                  */
59  void make_key _ARG((DB db,Record rec));	   /* key.c                  */
60  void make_sort_key _ARG((DB db,Record rec));	   /* key.c                  */
61  void set_base _ARG((String value));		   /* key.c                  */
62  String get_base _ARG(());		   	   /* key.c                  */
63  void set_separator _ARG((int n,String s));	   /* key.c                  */
64  Symbol get_separator _ARG((int n));	   	   /* key.c                  */
65  void start_key_gen _ARG((void));		   /* key.c                  */
66 
67