1HTAGS(1)                    General Commands Manual                   HTAGS(1)
2
3
4

NAME

6       htags - generate a hypertext from a set of source files
7

SYNOPSIS

9       htags [-aDfFghInosTvw][-d dbpath][-m name][-t title][dir]
10

DESCRIPTION

12       Htags  generates  a  hypertext  from  a set of source files of C, Yacc,
13       Java, PHP and assembly.
14
15       In advance of using this command, you should execute  gtags(1)  in  the
16       root  directory of a source project.  Then you can execute htags in the
17       same place.  Htags makes a directory named ´HTML´, and puts a hypertext
18       in it.  You can start browsing at ´HTML/index.html´.
19
20       Since  htags  generates a static hypertext as long as neither -D nor -f
21       option is not specified, you can move it anywhere and browse it by  any
22       browser  without  any HTTP server. If you use -D or -f option, you need
23       to use HTTP  server.  Though  any  HTTP  server  is  available,  htags-
24       server(1) is recommended.
25
26       This  command has so many options.  If you are new to htags, it is rec‐
27       ommended to use --suggest option.  With that option, htags chooses pop‐
28       ular options on your behalf.
29

OPTIONS

31       The following options are available:
32
33       -a, --alphabet
34              Make an alphabetical index suitable for a large project.
35
36       --auto-completion[=limit]
37              Enable auto-completion facility for the input form.  If limit is
38              specified, number of candidates is limited to the value.  Please
39              note this function requires javascript language in your browser.
40
41       -C, --directory dir
42              Change the directory before doing all the work including parame‐
43              ter analysis.
44
45       --caution
46              Display a caution message on the top page.
47
48       --cflow cflowfile
49              Add a call tree by cflow(1). cflowfile must be posix format.  If
50              you use GNU cflow, invoke the command at the project root direc‐
51              tory with the --format=posix option.  This option is deprecated;
52              please use --call-tree or --callee-tree instead.
53
54       --call-tree callfile
55              Add  a call tree by cflow(1); callfile must be posix format.  If
56              you use GNU cflow, invoke the command at the project root direc‐
57              tory with the --format=posix option.
58
59       --callee-tree calleefile
60              Add  a callee tree by cflow(1); calleefile must be posix format.
61              If you use GNU cflow, invoke the command at the project root di‐
62              rectory with the --format=posix and --reverse options.
63
64       --colorize-warned-line
65              Use color to highlight warned lines.
66
67       --cvsweb url
68              Add  a link to cvsweb; url is used as the base of URL.  When di‐
69              rectory ´CVS´ exists in the root directory of the  project,  the
70              content  of  ´CVS/Repository´  is used as the relative path from
71              the base.
72
73       --cvsweb-cvsroot cvsroot
74              Specify cvsroot in cvsweb URL.
75
76       -D, --dynamic
77              Generate a tag list dynamically using CGI program.  Though  this
78              option decreases both the size and generation time of hypertext,
79              you need to start up HTTP server.
80
81       -d, --dbpath dbpath
82              Specify the directory in which ´GTAGS´ exists.  The  default  is
83              the current directory.
84
85       --disable-grep
86              Disable grep in the search form (-f, --form).
87
88       --disable-idutils
89              Disable idutils in the search form (-f, --form).
90
91       -F, --frame
92              Use frames for the top page.
93
94       -f, --form
95              Add  a  search form using CGI program.  You need to start a HTTP
96              server for it.
97
98       --fixed-guide
99              Put a fixed guide at the bottom of the screen of the browser.
100
101       --full-path
102              Use full path name in the file index.  By default, use just  the
103              last component of a path.
104
105       -g, --gtags
106              Execute gtags(1) before starting job.  The -v, -w and dbpath op‐
107              tions are passed to gtags.
108
109       --gtagsconf file
110              Set environment variable GTAGSCONF to file.
111
112       --gtagslabel label
113              Set environment variable GTAGSLABEL to label.
114
115       -h, --func-header[=position]
116              Insert a function header for each function.  By  default,  htags
117              doesn't  generate them.  You can choose the position using posi‐
118              tion, which allows one of  ´before´,  ´right´  or  ´after´  (de‐
119              fault).
120
121       --help Print a usage message.
122
123       --html-header file
124              Insert a header record derived from file into the HTML header of
125              each file.
126
127       -I, --icon
128              Use icons instead of text for some links.
129
130       --insert-footer file
131              Insert custom footer derived from file before </body> tag.
132
133       --insert-header file
134              Insert custom header derived from file after <body> tag.
135
136       --item-order spec
137              Specify the order of the items in the top page.  The spec  is  a
138              string  consisting  of  item signs in order.  Each sign means as
139              follows: ´c´: caution; ´s´: search form; ´m´: mains; ´d´:  defi‐
140              nitions; ´f´: files; ´t´: call tree.  The default is ´csmdf´.
141
142       -m, --main-func name
143              Specify startup function name; the default is ´main´.
144
145       --map-file
146              Generate file ´MAP´.
147
148       -n, --line-number[=columns]
149              Print  line  numbers. By default, don't print line numbers.  The
150              default value of columns is 4.
151
152       --no-order-list
153              Numbers are not given in list form.
154
155       -o, --other
156              Pick up not only source files but also other files for the  file
157              index.
158
159       -s, --symbol
160              Make  anchors  not  only for definitions and references but also
161              other symbols.
162
163       --show-position
164              Print the position string per function  definition.  The  string
165              can  be  interpreted  by general editors in UNIX. The default is
166              false.
167
168       --statistics
169              Print statistics information.
170
171       --suggest
172              Htags chooses popular options on behalf  of  beginners.   It  is
173              equivalent to -aghInosTxv --show-position --fixed-guide now.
174
175       --suggest2
176              Htags  chooses popular options on behalf of beginners.  This op‐
177              tion enables frame, AJAX and CGI facility in addition to the fa‐
178              cilities by the --suggest option.  It is equivalent to --suggest
179              -DfF --auto-completion --tree-view=filetree now.
180
181       -T, --table-flist[=rows]
182              Use <table> tag to display the file index.  You  can  optionally
183              specify the number of rows; the default is 5.
184
185       -t, --title title
186              Title  of  the  hypertext.  The default is the last component of
187              the path of the current directory.
188
189       --tabs cols
190              Tab stops. The default is 8.
191
192       --table-list
193              Use <table> tag to display the tag list.
194
195       --tree-view[=type]
196              Use treeview for the file index.  Please note this function  re‐
197              quires  javascript language in your browser.  Possible values of
198              type are as follows: treeview, filetree, treeview-red, treeview-
199              black,  treeview-gray,  treeview-famfamfam. The default is tree‐
200              view.
201
202       -v, --verbose
203              Verbose mode.
204
205       --version
206              Show version number.
207
208       -w, --warning
209              Print warning messages.
210
211       dir    The directory in which the result of  this  command  is  stored.
212              The default is the current directory.
213

EXAMPLES

215       $ gtags -v
216       $ htags -sanohITvt 'Welcome to XXX source tour!'
217       $ firefox HTML/index.html
218
219       $ htags --suggest2
220       $ htags-server >& log &
221       $ firefox http://127.0.0.1:8000
222

FILES

224       ´GTAGS´
225              Tag file for definitions.
226
227       ´GRTAGS´
228              Tag file for references.
229
230       ´GPATH´
231              Tag file for source files.
232
233       ´gtags.conf´, ´$HOME/.globalrc´
234              Configuration data for GNU GLOBAL.  See gtags.conf(5).
235
236       ´HTML/FILEMAP´
237              Mapping file for converting file name into the path of the file.
238
239       ´HTML/GTAGSROOT´
240              If  this  file exists, CGI program ´global.cgi´ sets environment
241              variable GTAGSROOT to the contents of it.  If you move directory
242              ´HTML´ from the original place, please make this file.
243
244       ´HTML/.htaccess´
245              Local configuration file for Apache. This file is generated when
246              the -f or -D options are specified.
247
248       ´HTML/index.html´
249              Start-up file.
250
251       ´HTML/MAP´
252              Mapping file for converting tag name into the path of tag list.
253
254       ´HTML/style.css´
255              Style sheet file.
256
257       ´/usr/local/share/gtags/style.css.tmpl´
258              The template of the style sheet file (´HTML/style.css´).
259

ENVIRONMENT

261       The following environment variables affect the execution of htags:
262
263       GTAGSCACHE
264              The size of the B-tree cache. The default is 50000000 (bytes).
265
266       GTAGSCONF
267              Configuration file.
268
269       GTAGSLABEL
270              Configuration label. The default is ´default´.
271
272       HTAGS_OPTIONS
273              The value of this variable is inserted in the head of arguments.
274
275       TMPDIR The location used to stored  temporary  files.  The  default  is
276              ´/tmp´.
277
278       GTAGSFORCECPP
279              If  this  variable  is  set,  each  file whose suffix is ´.h´ is
280              treated as a C++ source file.
281

CONFIGURATION

283       The following configuration variables affect the execution of htags:
284
285       datadir(string)
286              Shared data directory. The default is ´/usr/local/share´ but you
287              can  change  the  value  using configure script.  Htags looks up
288              template files in the ´gtags´ directory in this data directory.
289
290       include_file_suffixes(comma separated list)
291              Suffixes of include files. The default is:
292              ´h,hh,hxx,hpp,H,inc.php´.
293
294       langmap(comma separated list)
295              Language mapping. Each comma-separated map consists of the  lan‐
296              guage  name,  a  colon,  and a list of file extensions.  Default
297              mapping is:
298              ´c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php:.php.php3.phtml´.
299

DIAGNOSTICS

301       Htags exits with a non-0 value if an error occurred, 0 otherwise.
302

SEE ALSO

304       htags-server(1), global(1), gtags(1), gtags.conf(5).
305
306       GNU GLOBAL source code tag system
307       (http://www.gnu.org/software/global/).
308

BUG

310       Generated hypertext is VERY LARGE.  In advance, check the space of your
311       disk.
312
313       PHP support is far from complete.
314
315       The -f and -D options generate CGI programs.  If you open the hypertext
316       to the public, please recognize security dangers.
317
318       Htags does not support plug-in parser.
319

AUTHOR

321       Shigio YAMAGUCHI, Hideki IWAMOTO and others.
322

HISTORY

324       The htags command appeared in FreeBSD 2.2.2.
325
326
327
328GNU Project                        June 2013                          HTAGS(1)
Impressum