HTAGS(4)

NAME
htags - generate hypertext from source code.

SYNOPSIS
htags [-a][-c][-f][-F][-g][-m][-n][-o][-s][-v][-w][-d dir][-S dir][-t title][dir]

DESCRIPTION
Htags makes hypertext from C, C++, Yacc and Java source code.

In advance of using this command, you must execute gtags(1) from the root directory of the source tree. Then you can execute htags from the same place. Htags makes an 'HTML' directory and generates hypertext in it.

You can start browsing from 'HTML/index.html'. Once the hypertext is generated, you can move it anywhere and browse it with any browser.

OPTIONS
The following options are available:

-a, --alphabet
    Make an alphabetical function index, suitable for a large project.

--caution
    Include caution message to prohibit downloading.

-c, --compact
    Compress html files by gzip(1). You need to set up an HTTP server so that gzip(1) is invoked for each compressed file. See 'HTML/.htaccess' that is generated by htags.

-d, --dbpath dir
    Specifies the directory in which 'GTAGS' and 'GRTAGS' exist. The default is the current directory.

-f, --form
    Support search form using CGI program. You need to set up an HTTP server for this.

-F, --frame
    Use frame for each part of the contents.

-g, --gtags
    Execute gtags(1) before creating hypertext.

--gtagsconf file
    Load user's configuration from file.

-m, --main-func
    Specify the main function name. The default is main.

-n, --line-number
    Print the line numbers. By default, doesn't print it.

--no-javascript
    Doesn't put javascript code. By default, htags put javascript code.

-o, --other
    Pick up not only source files but also other files except for binary files.

--style-sheet file
    Load style sheet file and insert it into <HEAD> tag.

-s, --symbols
    Make anchors not only for functions but also other symbols. 'GSYMS' tag file needed.

-S, --secure-cgi dir
    write cgi script into dir to realize a centralised cgi script. Script alias is '/cgi-bin' by default. You can overwrite this value with config variable script_alias in 'gtags.conf'.

-t, --title title
    The title of this hypertext. The default is the last component of the current directory.

-v, --verbose
    Verbose mode.

-w, --warning
    Print warning messages.

dir The directory in which hypertext is generated. The default is the current directory.

EXAMPLES
	% cd /usr/src/sys
	# gtags -v
	# htags -fFnvat 'Welcom to FreeBSD kernel source tour!'
	% lynx HTML/index.html

	% htags -v --gtags
	% awk '$1 == "main" {print $2}' HTML/MAP
	D/348.html
	% lynx HTML/D/348.html

FILES

'GTAGS'
    Tag file for function definitions.

'GRTAGS'
    Tag file for function references.

'GSYMS'
    Tag file for other symbols.

'GPATH'
    Tag file for path of source files.

'/etc/gtags.conf', '$HOME/.globalrc'
    Configuration file.

ENVIRONMENT
The following environment variables affect the execution of htags:

TMPDIR
    If this variable is set, its value is used as the directory to make temporary files. The default is '/tmp'.

GTAGSCONF
    If this variable is set, its value is used as the configuration file. The default is '$HOME/.globalrc'.

GTAGSLABEL
    If this variable is set, its value is used as the label of configuration file. The default is default.

CONFIGURATION
The following configuration variables affect the execution of htags:

htags_options(string)
    Default options for htags. This value is inserted into the head of arguments.

body_begin(string)
    Begin tag for body. The default is '<BODY>'.

body_end(string)
    End tag for body. The default is '</BODY>'.

title_begin(string)
    Begin tag for Title. The default is '<FONT COLOR=#cc0000>'.

title_end(string)
    End tag for Title. The default is '</FONT>'.

comment_begin(string)
    Begin tag for comments. The default is '<I><FONT COLOR=green>'.

comment_end(string)
    End tag for comments. The default is '</FONT></I>'.

sharp_begin(string)
    Begin tag for 'define'. The default is '<FONT COLOR=darkred>'.

sharp_end(string)
    End tag for 'define'. The default is '</FONT>'.

brace_begin(string)
    Begin tag for brace. The default is '<FONT COLOR=blue>'.

brace_end(string)
    End tag for brace. The default is '</FONT>'.

reserved_begin(string)
    Begin tag for reserved word. The default is '<B>'.

reserved_end(string)
    End tag for reserved word. The default is '</B>'.

position_begin(string)
    Begin tag for posiotion mark. The default is '<FONT COLOR=gray>'.

position_end(string)
    End tag for posiotion mark. The default is '</FONT>'.

ncol(number)
    Columns of line number. The default is 4.

tabs(number)
    Tab stop. The default is 8.

full_path(boolean)
    List file names with full path in file index. By default, list just the last component of a path.

table_list(boolean)
    List tags using table tag. The default is false.

normal_suffix(string)
    Suffix for normal html file. The default is 'html'.

no_javascript
    Doesn't put javascript code. By default, htags put javascript code.

gzipped_suffix(string)
    Suffix for compressed html file. The default is 'ghtml'.

script_alias(string)
    Script alias for safe cgi script (-S).

show_position(boolean)
    Show position per function definition. The default is false.

symbols(boolean)
    Make anchors not only for functions but also other symbols. 'GSYMS' tag file needed.

definition_header(no|before|after)
    Position of link header. The default is after.

other_files(boolean)
    File index includes not only source files but also other files. The default is false.

enable_grep(boolean)
    Enable grep search using CGI program. The default is false.

enable_idutils(boolean)
    Enable idutils search using CGI program. The default is false.

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

SEE ALSO
btreeop(1), gctags(1), global(1), gtags(1).

GNU GLOBAL source code tag system
(http://www.gnu.org/software/global/).

BUG
Generated hypertext is VERY LARGE. In advance, check the space of your disk.

AUTHOR
Shigio Yamaguchi

HISTORY
The htags command appeared in FreeBSD 2.2.2.