ES2 MUD LIB :: 東方故事二(ES2) 天朝帝國 mudlib 瀏覽展示
/doc/efuns/ed
eeeedddd((((3333)))) MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444)))) eeeedddd((((3333))))
NNNNAAAAMMMMEEEE
ed() - edit a file
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
void ed( string file, string exit_fn, int restricted );
void ed( string file, string write_fn, string exit_fn, int restricted );
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
This efun is only available if __OLD_ED__ is defined.
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.
The 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
function twice. The first time, the function is
called before the write takes place -- will be 0. If
the function returns TRUE, the write will continue,
otherwise it will abort. The second time, the function is
called after the write has completed -- will be non-
zero. This callback function should have the form:
int write_fn(string fname, int flag)
When the editor is exited, the driver will callback the
function. This function allows the mudlib to
clean up. This callback function has the form:
void exit_fn()
The optional flag limits the editor's
capabilities, such as inserting a file, and saving using an
alternate file name.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
regexp(3), valid_read(4), valid_write(4),
get_save_file_name(4)
Page 1 (printed 3/16/95)