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

NAME

6       htags - generate hypertext from source code.
7

SYNOPSIS

9       htags [-acDfFghInosTvwx][-d dbpath][-m name][-S cgidir][-t title][dir]
10

DESCRIPTION

12       Htags  makes  hypertext  of C, C++, Yacc, Java, PHP and Assembly source
13       code.
14
15       In advance of using this command, you must execute  gtags(1)  from  the
16       root directory of the source tree.  Then you can execute htags from the
17       same place.  Htags makes an directory named ´HTML´ and generates hyper‐
18       text in it.  You can start browsing from ´HTML/index.html´.
19
20       Since  htags  generates static hypertext as long as the -D or -f option
21       is not specified, you can move it  anywhere  and  browse  it  with  any
22       browser without web server.
23
24       You  must  use same parser for both gtags(1) and htags.  If you use the
25       default parser, it is not necessary to consider for it.
26

OPTIONS

28       The following options are available:
29
30       -a, --alphabet
31              Make an alphabetical function index  which  is  suitable  for  a
32              large project.
33
34       --caution
35              Include caution message to prohibit downloading.
36
37       -c, --compact
38              Compress  html  files   by  gzip(1).   You  need to set up a web
39              server so that gzip(1) is invoked for each compressed file.  See
40              ´HTML/.htaccess´ that is generated by htags.
41
42       --cvsweb url
43              Include  cvsweb URL. url is used as base of URL.  When directory
44              ´CVS´ exists in the root directory of source project, content of
45              ´CVS/Repository´ is used as relative path from the base.
46
47       --cvsweb-cvsroot cvsroot
48              Specifies cvsroot in cvsweb URL.
49
50       -D, --dynamic
51              Generate   object  lists  dynamically  using  CGI  program.   By
52              default, object lists are  generated  statically.   Though  this
53              option  decrease  both  the  size and the generation time of the
54              hypertext, you need to set up a web server, and you cannot  move
55              the hypertext from the source directroy.
56
57       -d, --dbpath dbpath
58              Specifies the directory in which ´GTAGS´ and ´GRTAGS´ exist. The
59              default is the current directory.
60
61       -f, --form
62              Support search form using CGI program.  You need to set up a web
63              server, and you cannot move the hypertext from the source direc‐
64              troy.
65
66       -F, --frame
67              Use frame for each part of the contents.
68
69       --full-path
70              List file names with full path in file index.  By default,  list
71              just the last component of a path.
72
73       -g, --gtags
74              Execute  gtags(1)  before  creating  hypertext.   The -v, -w and
75              dbpath are passed to gtags.
76
77       -h, --func-header[=position]
78              Insert function header for each  function.   By  default,  htags
79              doesn't  generates it.  You can specify the position using posi‐
80              tion argument, which allows one of before, right and after.  The
81              default position is after.
82
83       -I, --icon
84              Use icons instead of text for some links.
85
86       --disable-grep
87              Disable grep in search form(-f,--form).
88
89       --gtagsconf file
90              Load user's configuration from file.
91
92       --gtagslabel label
93              label  is used for the label of configuration file.  The default
94              is default.
95
96       --insert-header file
97              Insert custom header derived from file after <body> tag.
98
99       --insert-footer file
100              Insert custom footer derived from file before </body> tag.
101
102       -m, --main-func name
103              Specify the main function name. The default is main.
104
105       -n, --line-number[=columns]
106              Print line numbers. By default, doesn't print them.  The default
107              value of columns is 4.
108
109       --no-map-file
110              Doesn't  generate  ´MAP´  and ´FILEMAP´ file.  By default, htags
111              generates them.
112
113       -o, --other
114              Pick up not only source files but also other  files  except  for
115              binary files.
116
117       --statistics
118              Print statistics information.
119
120       -s, --symbol
121              Make  anchors  not  only  for  functions but also other symbols.
122              ´GSYMS´ tag file needed.
123
124       -S, --secure-cgi cgidir
125              Write CGI programs into the cgidir to realize a centralised  CGI
126              program.   Script alias is ´/cgi-bin´ by default.  You can over‐
127              write  this  value  using  config   variable   script_alias   in
128              ´gtags.conf´.
129
130       -t, --title title
131              The  title  of this hypertext. The default is the last component
132              of the current directory.
133
134       -T, --table-flist[=fields]
135              Generate file list using <table> tag.  The fields  is  used  for
136              field number in a line. The default is 5.
137
138       --table-list
139              List tags using <table> tag.
140
141       --tabs number
142              Tab stop. The default is 8.
143
144       -v, --verbose
145              Verbose mode.
146
147       -w, --warning
148              Print warning messages.
149
150       -x, --xhtml[=version]
151              Generate XHTML hypertext instead of HTML.  If the --frame option
152              is specified then generate XHTML-1.0 Frameset for index.html and
153              generate XHTML-1.0 Transitional for other files, else if version
154              is 1.1 or config variable xhtml_version is set to 1.1 then  gen‐
155              erate XHTML-1.1 else XHTML 1.0 Transitional.
156
157       dir    The  directory  in which hypertext is generated.  The default is
158              the current directory.
159

EXAMPLES

161            $ gtags -v
162            $ htags -sanohITvt 'Welcom to XXX source tour!'
163            $ firefox HTML/index.html
164

FILES

166       ´GTAGS´
167              Tag file for function definitions.
168
169       ´GRTAGS´
170              Tag file for function references.
171
172       ´GSYMS´
173              Tag file for other symbols.
174
175       ´GPATH´
176              Tag file for path of source files.
177
178       ´/etc/gtags.conf´, ´$HOME/.globalrc´
179              Configuration file.
180
181       ´HTML/index.html´
182              Index file for hypertext.
183
184       ´HTML/MAP´
185              Mapping file for converting tag into path of hypertext.   Exter‐
186              nal system utilize this file.
187
188       ´HTML/FILEMAP´
189              Mapping  file  for  converting file name into path of hypertext.
190              External system utilize this file.
191
192       ´HTML/style.css´
193              Style sheet file. This file is generated when the --xhtml option
194              is specified.
195

ENVIRONMENT

197       The following environment variables affect the execution of htags:
198
199       TMPDIR If  this  variable is set, its value is used as the directory to
200              make temporary files. The default is ´/tmp´.
201
202       GTAGSCONF
203              If this variable is set, its value is used as the  configuration
204              file. The default is ´$HOME/.globalrc´.
205
206       GTAGSLABEL
207              If  this variable is set, its value is used as the label of con‐
208              figuration file. The default is default.
209
210       GTAGSCACHE
211              If this variable is set, its value is used as the size of  btree
212              cache. The default is 500000 (bytes).
213

CONFIGURATION

215       The following configuration variables affect the execution of htags: If
216       the --xhtml option is specified then all definitions of  HTML  tag  are
217       ignored.   Instead,  you can customize the appearance using style sheet
218       file (´style.css´).
219
220       datadir(string)
221              Shared data directory. The default is '/usr/local/share' but you
222              can  change the value using configure script.  Htags lookup tem‐
223              plate files in the 'gtags' directory in this data directory.
224
225       htags_options(string)
226              Default options for htags. This value is inserted into the  head
227              of arguments.
228
229       xhtml_version(1.0|1.1)
230              XHTML version. 1.0 and 1.1 are acceptable. The default is 1.0.
231
232       body_begin(string)
233              Begin   tag   for  body.  The  default  is  '<body  text=#191970
234              bgcolor=#f5f5dc vlink=gray>'.
235
236       body_end(string)
237              End tag for body. The default is '</body>'.
238
239       table_begin(string)
240              Begin tag for table. The default is '<table>'.
241
242       table_end(string)
243              End tag for table. The default is '</table>'.
244
245       title_begin(string)
246              Begin tag for Title. The default is '<h1><font color=#cc0000>'.
247
248       title_end(string)
249              End tag for Title. The default is '</font></h1>'.
250
251       comment_begin(string)
252              Begin tag for comments. The default is '<i><font color=green>'.
253
254       comment_end(string)
255              End tag for comments. The default is '</font></i>'.
256
257       dynamic(bool)
258              Generate object list dynamically.
259
260       sharp_begin(string)
261              Begin tag for 'define'. The default is '<font color=darkred>'.
262
263       sharp_end(string)
264              End tag for 'define'. The default is '</font>'.
265
266       brace_begin(string)
267              Begin tag for brace. The default is '<font color=red>'.
268
269       brace_end(string)
270              End tag for brace. The default is '</font>'.
271
272       reserved_begin(string)
273              Begin tag for reserved word. The default is '<b>'.
274
275       reserved_end(string)
276              End tag for reserved word. The default is '</b>'.
277
278       position_begin(string)
279              Begin  tag  for  posiotion   mark.   The   default   is   '<font
280              color=gray>'.
281
282       position_end(string)
283              End tag for posiotion mark. The default is '</font>'.
284
285       colorize_warned_line(boolean)
286              Colorize     warned    line    using    warned_line_begin    and
287              warned_line_end.  The default is false.
288
289       warned_line_begin(string)
290              Begin tag for line which htags warned.  The  default  is  '<span
291              style="background-color:yellow">'.
292
293       warned_line_end(string)
294              End tag for line which htags warned. The default is '</span>'.
295
296       hr(string)
297              Horizontal rules. The default is '<hr>'.
298
299       ncol(number)
300              Columns of line number. The default is 4.
301
302       tabs(number)
303              Tab stop. The default is 8.
304
305       flist_fields(number)
306              Field number of file index. The default is 5.
307
308       full_path(boolean)
309              List  file names with full path in file index.  By default, list
310              just the last component of a path.
311
312       table_list(boolean)
313              List tags using <table> tag. The default is false.
314
315       table_flist(boolean)
316              Use <table> tag for file index. The default is false.
317
318       normal_suffix(string)
319              Suffix for normal html file. The default is 'html'.
320
321       no_map_file(boolean)
322              Doesn't generate ´MAP´ file. The default is false.
323
324       gzipped_suffix(string)
325              Suffix for compressed html file. The default is 'ghtml'.
326
327       script_alias(string)
328              Script alias for safe cgi script (-S).
329
330       show_position(boolean)
331              Show position per function definition. The default is false.
332
333       definition_header(no|before|right|after)
334              Position of function header. The default is 'no'.
335
336       other_files(boolean)
337              File index includes not only source files but also other  files.
338              The default is false.
339
340       disable_grep(boolean)
341              Disable grep in search form(-f,--form). The default is false.
342
343       enable_idutils(boolean)
344              Enable idutils in search form(-f,--form). The default is false.
345
346       include_file_suffixes(comma separated list)
347              Suffixes of include file. The default is 'h,hxx,hpp,H,inc.php'.
348
349       langmap(comma separated list)
350              Language  mapping. Each comma-separated map consists of the lan‐
351              guage name, a colon, and a list  of  file  extensions.   Default
352              mapping                                                       is
353              'c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.cpp.cxx.hxx.hpp.C.H,php:.php.php3.phtml'.
354
355       copy_files(boolean)
356              Copy  files  instead  of  linking.   When the -f option is used,
357              htags make links of tag files in ´cgi-bin´ directory by default.
358

DIAGNOSTICS

360       Htags exits with a non 0 value if an error occurred, 0 otherwise.
361

MESSAGE FORMAT

363       Verbose message has important level. The most important level is 0, the
364       second  it  1  and  so  on.  All  the message has level numbers leading
365       blanks.
366

SEE ALSO

368       gtags-parser(1), global(1), gtags(1).
369
370       GNU GLOBAL source code tag system
371       (http://www.gnu.org/software/global/).
372

BUG

374       Generated hypertext is VERY LARGE.  In advance, check the space of your
375       disk.
376
377       PHP supprt is far from complete.
378

AUTHOR

380       Tama Communications Corporation.
381

HISTORY

383       The htags command appeared in FreeBSD 2.2.2.
384
385
386
387GNU Project                      January 2007                         HTAGS(1)
Impressum