1 /*
2  * reftypes.h
3  *
4  * Copyright (c) Chris Putnam 2003-2019
5  *
6  * Source code released under the GPL version 2
7  *
8  */
9 #ifndef REFTYPES_H
10 #define REFTYPES_H
11 
12 #define REFTYPE_CHATTY  (0)
13 #define REFTYPE_SILENT  (1)
14 
15 /* Reftypes handled by core code */
16 #define ALWAYS          (0)
17 #define DEFAULT         (1)
18 #define SKIP            (2)
19 
20 /* Reftypes to be handled by converters */
21 #define SIMPLE          (3)
22 #define TYPE            (4)
23 #define PERSON          (5)
24 #define DATE            (6)
25 #define PAGES           (7)
26 #define SERIALNO        (8)
27 #define TITLE           (9)
28 #define NOTES           (10)
29 #define DOI             (11)
30 #define HOWPUBLISHED    (12)
31 #define LINKEDFILE      (13)
32 #define KEYWORD         (14)
33 #define URL             (15)
34 #define GENRE           (16)
35 #define BT_SENTE        (17) /* Bibtex 'Sente' */
36 #define BT_EPRINT       (18) /* Bibtex 'Eprint' */
37 #define BT_ORG          (19) /* Bibtex Organization */
38 #define BLT_THESIS_TYPE (20) /* Biblatex Thesis Type */
39 #define BLT_SCHOOL      (21) /* Biblatex School */
40 #define BLT_EDITOR      (22) /* Biblatex Editor */
41 #define BLT_SUBTYPE     (23) /* Biblatex entrysubtype */
42 #define BLT_SKIP        (24) /* Biblatex Skip Entry */
43 #define EPRINT          (25)
44 #define NUM_REFTYPES    (26)
45 
46 typedef struct {
47 	char *oldstr;
48 	char *newstr;
49 	int  processingtype;
50 	int  level;
51 } lookups;
52 
53 typedef struct {
54 	char    type[25];
55 	lookups *tags;
56 	int     ntags;
57 } variants;
58 
59 int get_reftype( const char *q, long refnum, char *progname, variants *all, int nall, char *tag, int *is_default, int chattiness );
60 int process_findoldtag( const char *oldtag, int reftype, variants all[], int nall );
61 int translate_oldtag( const char *oldtag, int reftype, variants all[], int nall, int *processingtype, int *level, char **newtag );
62 
63 #endif
64