[Package Index | Mudlib Index | Effect Index]
File /obj/handlers/nroff.c
An nroff like object for formating text files.
This creates a saveable file format thingy.
Written by Pinkfish
Includes
This class includes the following files /include/nroff.hMethod index
- cat_file(string, int)
Creates a string from a nroffed file.
- create_nroff(string, string)
Makes the nroff saveable file.
- html_file(string, string)
Turns the nroff file into a html output.
- make_links(string, string)
- query_file_name(string)
Will attempt to find the name of the nroffed file.
Public Functions
These are functions that everyone can access.
-
cat_file
string cat_file(string fname,
int update)
Creates a string from a nroffed file.
If update is non zero it will look to see if the source file has been
modified since the saved nroff file was created. If it has, this
function returns 0 and the nroff file needs to be recreated.
- Parameters:
fname - the file to process
update - force update if file is newer?
- Returns:
the string representation of the nroff file
-
create_nroff
int create_nroff(string in_file,
string out_file)
Makes the nroff saveable file. Turns the input nroff file into a saved
output format.
- Parameters:
in_file - the file name been processed
out_file - the file to save it as
- Returns:
1 if the operation was successful
-
html_file
string html_file(string file,
string title)
Turns the nroff file into a html output. This works on nroff files
creating a html output from the mud source.
- Parameters:
file - the name to process
title - the title to give the document
- Returns:
the html file
-
make_links
string make_links(string search,
string file)
-
query_file_name
string query_file_name(string fname)
Will attempt to find the name of the nroffed file. Will attempt to
find the name of the source file associated with the save file.
- Parameters:
fname - the name of the file to check
- Returns:
the source file name or 0