.TH C2HTML 1 \" -*- nroff -*- .SH NAME c2html \- generates highlighted html-files from C source .SH SYNOPSIS .B c2html [options] [filename...] .br .SH DESCRIPTION This manual page documents how to use .BR c2html . If no arguments are given on the command line of .BR c2html , it reads from stdin and writes to stdout. If invoked with filenames as arguments .B c2html will write it's output into new files. Names of output files are generated by appending ".html" to the corresponding input filename. You can convert both .c and .h files with .BR c2html . .SS Installing as a CGI program .B c2html can be installed as a CGI program and convert source files on the fly. In order to set this up for apache the webmaster has to add the two lines .RS AddType text/x-c .c .h Action text/x-c /cgi-bin/c2html .RE to the webserver configuration file. .B c2html depends on the webserver properly setting environment variable PATH_TRANSLATED to the pathname of the source file. If .B c2html has been compiled with option -DCOMPRESSION=1 then it will invoke .B gzip to compress the generated HTML before sending it to the requesting browser. Of course .B c2html takes care to check if the browser accepts gzip encoding. .SS OPTIONS .TP .I "--" Interpret all following arguments on the command line as filenames. This is useful, if you want to convert files beginning with a '-'. .TP .I "-b filename" Insert the file 'filename' after converted data and before HTML footer. See also the .I "-s" option. .TP .I "-c" Turns off CGI-script detection and HTTP header generation. This is needed to use .B c2html as a subcommand in another CGI script. .TP .I "-h filename" Insert the file 'filename' after the HTML headers and before the converted data. See also the .I "-s" option. .TP .I "-i" Generate an index only. This will generate a list of references (HREF's) to the labels that .B c2html creates for your source file. The references are created as list items (
. If this option is not used a default of 80 is assumed. (Currently most browsers are ignoring this attribute). .TP .I "-x size" use size for tab size (default 8, max 80). .TP .I -V reports the version number of .BR c2html . .SH EXIT STATUS .B c2html returns 0 on success, 1 if input files are not existing/readable, 2 if output files are not creatable/writable, 3 if invoked with illegal options and 4 if .B gzip cannot be invoked. .SH AUTHORS Florian Schintke.br Martin Kammerhofer wrote the CGI feature. .br Rob Ewan wrote the indexing feature. .SH SEE ALSO .BR java2html (1), .BR pas2html (1), .BR perl2html (1).