xref: /Universal-ctags/main/flags_p.h (revision 4b5f2b4154ebc8e2bb8cb3f31b20ef6f70ad8fcb)
1 /*
2 *
3 *
4 *   Copyright (c) 2000-2003, Darren Hiebert
5 *
6 *   This source code is released for free distribution under the terms of the
7 *   GNU General Public License version 2 or (at your option) any later version.
8 *
9 *   Defines external interface to option processing.
10 */
11 #ifndef CTAGS_MAIN_FLAGS_PRIVATE_H
12 #define CTAGS_MAIN_FLAGS_PRIVATE_H
13 
14 #include "general.h"
15 #include "colprint_p.h"
16 
17 
18 #define LONG_FLAGS_OPEN  '{'
19 #define LONG_FLAGS_CLOSE '}'
20 
21 typedef struct sFlagDefinition {
22 	char shortChar;
23 	const char *longStr;
24 	void (* shortProc) (char c,  void *data);
25 	void (* longProc)  (const char* const s, const char* const param, void *data);
26 	const char *paramName;
27 	const char *description;
28 } flagDefinition;
29 
30 /* Return {{optscript}} part. */
31 extern const char*  flagsEval (const char* flags, flagDefinition* defs, unsigned int ndefs, void* data);
32 extern struct colprintTable * flagsColprintTableNew (void);
33 extern void flagsColprintAddDefinitions (struct colprintTable *table, flagDefinition* def, unsigned int ndefs);
34 extern void flagsColprintTablePrint (struct colprintTable *table,
35 									 bool withListHeader, bool machinable, FILE *fp);
36 #endif	/* CTAGS_MAIN_FLAGS_PRIVATE_H */
37