xref: /Universal-ctags/main/xtag_p.h (revision d61b5d962928c40700f3927046a56e295b5fd872)
1 /*
2  *
3  *  Copyright (c) 2015, Red Hat, Inc.
4  *  Copyright (c) 2015, Masatake YAMATO
5  *
6  *  Author: Masatake YAMATO <yamato@redhat.com>
7  *
8  *   This source code is released for free distribution under the terms of the
9  *   GNU General Public License version 2 or (at your option) any later version.
10  *
11  */
12 #ifndef CTAGS_MAIN_XTAG_PRIVATE_H
13 #define CTAGS_MAIN_XTAG_PRIVATE_H
14 
15 /*
16 *   INCLUDE FILES
17 */
18 
19 #include "general.h"
20 
21 #include "types.h"
22 #include "xtag.h"
23 #include "colprint_p.h"
24 
25 #include <stdio.h>
26 
27 /*
28 *   FUNCTION PROTOTYPES
29 */
30 
31 extern xtagDefinition* getXtagDefinition (xtagType type);
32 extern xtagType  getXtagTypeForLetter (char letter);
33 extern xtagType  getXtagTypeForNameAndLanguage (const char *name, langType language);
34 
35 extern bool enableXtag (xtagType type, bool state);
36 extern bool isXtagFixed (xtagType type);
37 extern bool isCommonXtag (xtagType type);
38 
39 /* Return LANG_IGNORE for common fields. */
40 extern langType getXtagOwner (xtagType type);
41 
42 extern const char* getXtagName (xtagType type);
43 extern const char* getXtagDescription (xtagType type);
44 
45 extern void initXtagObjects (void);
46 extern int countXtags (void);
47 
48 extern int defineXtag (xtagDefinition *def, langType language);
49 extern xtagType nextSiblingXtag (xtagType type);
50 
51 /* --list-extras implementation. LANGUAGE must be initialized. */
52 extern struct colprintTable * xtagColprintTableNew (void);
53 extern void xtagColprintAddCommonLines (struct colprintTable *table);
54 extern void xtagColprintAddLanguageLines (struct colprintTable *table, langType language);
55 extern void xtagColprintTablePrint (struct colprintTable *table,
56 									bool withListHeader, bool machinable, FILE *fp);
57 
58 #endif	/* CTAGS_MAIN_FIELD_PRIVATE_H */
59