ed.html

final_realms_fluffos_v1/lib/doc/man/html/efuns/interactive/ed.html · 1.7 KB

From the archive final_realms_fluffos_v1.zip

Download the archive   « Back to the archive contents

<HEAD> <TITLE> ed - edit a file </TITLE> </HEAD> <BODY BACKGROUND=http://www.imaginary.com/~beek/gifs/bg.jpg TEXT=#000000 ALINK=#FFFF00 VLINK=#550000 LINK=#000099> <center> <H1> ed - edit a file </H1> </center>
<p>
This efun is only available if OLD_ED is defined.
<p>
<b> void ed( string file, string exit_fn, int restricted ); </b>
<p>
<b> void ed( string file, string write_fn, string exit_fn, int restricted ); </b>
<p>
This is a funny function. It will start a local editor on an optional
file.  This editor is almost UNIX ed compatible.  When in the editor
type 'h' for help.
<p>
The 'write_fn' function allows the mudlib to handle file locks and
administrative logging of files modified.  When the editor writes to a
file, the driver will callback the 'write_fn' function twice.  The first
time, the function is called before the
write takes place -- 'flag' will be 0.  If the function returns 1,
the write will continue,
otherwise it will abort.  The second time, the function is called
after the write has completed -- 'flag' will be non-zero.
This callback function should have the form:
<p>
int write_fn(string fname, int flag)
<p>
When the editor is exited, the driver will callback the 'exit_fn'
function.  This function allows the mudlib to clean up.  This 
callback function has the form:
<p>
void exit_fn()
<p>
The optional 'restricted' flag limits the editor's
capabilities, such as inserting a file, and saving using an alternate
file name.
<p>
See also:
<A HREF=../strings/regexp.html>  regexp </A>,
<A HREF=../../applies/master/valid_read.html>  valid_read </A>,
<A HREF=../../applies/master/valid_write.html>  valid_write </A>,
<A HREF=../../applies/master/get_save_file_name.html>  get_save_file_name </A>

Site Stats

Snippets: 1791
Codebases: 571