# ASCII to HTML Utility

Topics
Usage | Compiling

Usage

The ASCII to HTML utility is a console-based program used to convert text files to HTML files. You can pass one of several switches to the program from the command line to perform any one of the available operations. From the command line you can use a wildcard to specify a group of files, for example: *.txt would convert all files in the current directory that have a .txt extension. For a list of switches, execute the program with no arguments.

    as2htm program version 1031.101
    Usage: as2htm [switches] infile.txt
    Switches:
              -c = Write comments in html file.
              -f = Write output to file: infile.txt = infile.htm
              -h = Write a document header and trailer.
              -l = Use .html file extension, defaults to .htm

The "-c" switch will write comments to the HTML file stating the name of the program that created it and the time and date it was generated. By default all comments will be omitted.

The "-f" switch is used to write the output to a file instead of the stdout. The resulting HTML file will use the same name as the text file with a ".htm" or ".html" file extension. NOTE: Existing HTML files in the program's working directory with the same name will be overwritten without prompting.

The "-h" switch is used to write a document header and trailer to the HTML file. The document header will be created based on the name of the text file being converted.

The "-l" switch will cause the resulting HTML file to use a ".html" extension instead of a ".htm" extension.

Compiling

Console Base Utility Program

:
Four makefiles are provided in the "utils" directory to compile the source code on one of four different compilers.

    "msvc40.mak"  - Makefile for Microsoft visual C/C++ 4.2
    "djgpp.mak"   - Makefile for DJGPP gcc 2.7.2.1
    "gnu_gcc.mak" - Makefile for GNU g++ 2.7.2.1
    "hpux10.mak"  - Makefile for HPUX C++ A.10.24

Building the Executable:

To compile use the "make -f" option followed by the makefile name. To compile using MSVC use the "nmake -f" option. The resulting executable will be named after the name set by the PROJECT macro in the makefile. By default the program will be named "ffind" under UNIX or "ffind.exe" under Windows 95/DOS.

Removing the Object Files and the Executable:

To remove the object files and the executable use the "make -f" option followed by the makefile name, followed by "clean": make -f hpux10.mak clean

Under MSVC use the "nmake -f" option followed by the makefile name, followed by "clean": nmake -f msvc40.mak clean

End Of Document