c2html by Florian Schintke <schintke@cs.tu-berlin.de>.
CGI feature added by Martin Kammerhofer <mkamm@gmx.net>.

This program is distributed under  the GNU Public license. For further
information see the file COPYING.

c2html
======

What is c2html? 
---------------

The  c2html  program is a syntax  highlighter  for C source  code that
produces a highlighted html file as output. The output  can be read by
any graphical WWW-Browser.    If the browser  understands the  tags to
change  font colors (as Netscape    does) the output  will look   like
highlighted  by  emacs.  Otherwise  it  will  not  look  so nice,  but
readability is increased too. 

Who uses c2html?
----------------

Everyone who provides sources in the web.

How do I use c2html?
--------------------

This is rather simple. If you start the program without any parameters
it will read the source from stdin and prints the output to stdout. 

If  you invoke  c2html  with filenames   on the  command line it  will
process every given file in sequence and will  store the output in new
files.  The names of  the new files are built  by appending ".html" to
the corresponding input filename. 

How do I convert my C sources on demand only?
---------------------------------------------

You need a  webserver to do this. The webserver  must be configured to
INVOKE c2html  as a CGI program to  handle all *.c and  *.h files.  If
your webserver is apache you can achieve this by adding lines

  AddType text/x-c .c .h
  Action text/x-c /cgi-bin/c2html

to   configuration file "http.conf".   The  c2html program expects the
pathname of it's  input file in environment variable  PATH_TRANSLATED.
CGI mode works by checking for environment variables GATEWAY_INTERFACE
and PATH_TRANSLATED. If both are set a HTTP header line 

  Content-Type: text/html

and a Last-Modified  header with the files last  modification date are
simply prepended to the output.

Since your sources are converted on-the-fly to HTML you don't need any
webspace  for your  html-ized  files. Furthermore  you  don't have  to
bother about keeping your published html-ized sources up to date. :)

If one wants  to save the html-ized source for compiling  it is best to
use the "Text" format when saving from the browser.

How can I save bandwidth using c2html as a CGI?
-----------------------------------------------

If c2html has been compiled with -DCOMPRESSION=1 it will compress it's
HTML output with  gzip if your browser  supports  it.  This will  save
bandwidth but  add additional load to  your  webserver machine. If you
are connected  to a  server  on 'localhost',  c2html will not compress
it's  output by gzip.   Larger values for  COMPRESSION than  1 are not
recommended because it adds more CPU load to the server without saving
much bandwidth. 
