1___________________________________
2|      |  |  |     |  _  |     |  |
3|  |___|  |  |  |  |    _|  |  |  |    GNU GLOBAL source code tagging system
4|  |   |  |  |  |  |     |     |  |
5|  ~~  |   ~~|     |  ~  |  |  |   ~~|          for all hackers.
6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 Copyright (c) 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012,
8	2014, 2020
9	Tama Communications Corporation
10
11 This file is free software; as a special exception the author gives
12 unlimited permission to copy and/or distribute it, with or without
13 modifications, as long as this notice is preserved.
14
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
17 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19		----------------------------------
20
21Frequently Asked Questions about Global.
22
23----------------------------------------------------------------------------
24Q1. Does Global support DOS and Windows 32 environment?
25
26A1. No, it doesn't. GNU Global supports only UNIX(POSIX) environment.
27    But some outside projects develop DOS and Windows 32 version of it.
28    Please see:
29           http://www.gnu.org/software/global/download.html
30
31    Though Global doesn't supports DOS and Windows 32 environment,
32    we accept code for them if the following requirements are met:
33    (1) It works in DOS and(or) Windows 32 environment.
34    (2) It doesn't influence UNIX environment.
35
36----------------------------------------------------------------------------
37Q2. Global skips some functions.
38    For example, Global skips 'func()' in this example.
39
40	#define M(a)	static char *string = a;
41
42	M(a)
43
44	func() {		<= Global skip func().
45		...
46	}
47
48A2. Global cannot recognize 'func()', because M(a) seems to be a function
49    definition.
50
51    It should be follows:
52
53	#define M(a)	static char *string = a
54
55	M(a);			<= end with ';'
56
57	func() {
58		...
59	}
60
61    Otherwise, you can tell gtags(1) that 'M' is not a function by listing
62    the macros in '.notfunction' file in the root directory of the project.
63
64	[.notfunction]
65	+---------------
66	|M
67	|...
68
69----------------------------------------------------------------------------
70Q3. I'm a C++ programmer. Why does not gtags pick up class names in *.h?
71
72A3. Global treats *.h files as a C source file. If you want to treat them
73    as a C++ source file, please set environment variable GTAGSFORCECPP.
74
75	% setenv GTAGSFORCECPP
76
77        or
78
79	$ export GTAGSFORCECPP=
80
81----------------------------------------------------------------------------
82Q4. I'm using GNU system. In a large project, gtags fails in making tags
83    like follows:
84
85	$ gtags
86	gtags: cannot write to database.
87	$ _
88
89    File system is not full. It seems that gtags cannot make a file over 2GB.
90    Any solution?
91
92A4. If your GNU system supports 64-bit file offset then please try the
93    following configuration.
94
95	$ ./configure CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64'
96
97----------------------------------------------------------------------------
98Q5. What is this message? What should I do?
99    'configure: error: curses library is required but not found."
100
101A5. gtags-cscope(1) requires curses library. There are two choices of yours.
102
103    If you use gtags-cscope(1)
104	Please install curses library. You can get it from:
105	http://www.gnu.org/software/ncurses/
106    else
107	You can install Global without gtags-cscope(1) like follows:
108	$ ./configure --disable-gtagscscope
109	$ make
110
111----------------------------------------------------------------------------
112Q6. I would like to use Global with various languages, such as python, ruby,
113    Erlang, Lua or so on. How to do it?
114
115A6. You can do it using ctags and pygments plug-in parser. It already supports
116    25 languages (definition and reference).
117    Please see PLUGIN_HOWTO (ctags), PLUGIN_HOWTO.pygments (Pygments)
118    in the package or /usr/local/share/gtags.
119
120----------------------------------------------------------------------------
121Q7. Gtags(1) and htags(1) work only for one directory tree. So, we cannot
122    refer library functions like strlen() from my project. Any solutions?
123
124A7. For global(1), you can use GTAGSLIBPATH environment variable.
125
126	[library]	/usr/src/lib
127	[your project]	/usr/home/project
128
129	$ (cd /usr/src/lib; gtags)
130	$ export GTAGSLIBPATH=/usr/src/lib
131	$ global strlen
132	../../../usr/src/lib/libc/string/strlen.c
133
134    Or, you can take a more straightforward way to do the same thing.
135    In the following example, you treat as if the system library is
136    part of your project. This way is effective also to htags(1).
137
138	$ cd /usr/home/project
139	$ ln -s /usr/src/lib .
140	$ gtags
141	$ htags
142
143----------------------------------------------------------------------------
144Q8. I can't make GSYMS file.
145
146A8. No problem. GSYMS was merged into GRTAGS in Global-5.9 or later.
147----------------------------------------------------------------------------
148Q9. I'm using gtags-cscope.vim. How to use files which include spaces in path name?
149
150A9. Please apply 'vim74-gtags-cscope.patch' in the package to vim.
151    See also README.PATCHES.
152
153----------------------------------------------------------------------------
154Q10. Does Global support multi-byte code set?
155     Which character code set is supported?
156
157A10. Global doesn't support multi-byte character code set yet.
158     Global supports only ASCII and ASCII super-sets.
159
160----------------------------------------------------------------------------
161Q11. Can Global running on a UNIX machine treat source files
162     which include DOS/Windows style new-line code? And vice versa?
163
164A11. Global supports only native text format of POSIX.
165     Besides, please go by the own responsibility.
166
167----------------------------------------------------------------------------
168Q12. Does Global support C++ language?
169
170A12. The answer is yes and no.
171     The built-in C++ parser is deprecated, since it is not well maintained.
172     However, Global has a plug-in parser mechanism. Using the mechanism,
173     anyone can write parsers for their favorite languages and incorporate
174     them into Global. (see plugin-factory/)
175     So, if you write a parser for C++ language, Global supports it.
176
177End of FAQ.
178