/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
#pragma save_binary
/* ok... This will be ye old standard inherit me if you want me editorS
 * There will be a cloneable version in /obj
 */
#include "ed.h"
int     start_ed();

private string my_bit;

int     begin_editing( string str )
{
    if( str )
	my_bit = str;
    else
	my_bit = "";
    write( "Write your text in the following lines.  A \"**\" on a line " +
	   "by itself will save the text you have entered.  A \"~q\" " +
	   "will abort your text and a \"~e\" will drop you into ed, " +
	   "warning don't use ed unless you know what you are doing.\n" );
    write( "] " );
    input_to( "ed_get_line" );
}

int     ed_get_line( string str )
{
    if( !my_bit )
	my_bit = "";
    if( str == "**" )
    {
	this_object()->ed_end_it_all( my_bit );
	my_bit = 0;
    }
    else
	if( str == "~q" )
	{
	    my_bit = 0;
	    this_object()->ed_end_it_all( 0 );
	}
	else
	    if( str == "~e" )
		start_ed();
	    else
	    {
		my_bit += str + "\n";
		write( "] " );
		input_to( "ed_get_line" );
	    }
    return 1;
}

void    exit_ed()
{
    my_bit = read_file( TMP_FILE );
    if( !rm( TMP_FILE ) )
	log_file( LOG_FILE, "ed: couldn't rm " + TMP_FILE + "\n" );
    write( "Back into the text enterer.\n" );
    write( "] " );
    input_to( "ed_get_line" );
}

void    start_ed()
{
    write( "Entering ed....  Use 'q' to quit, 'x' to save and exit, 'Q' to quit " +
	   "without saveing changes and 'h' for help.\n" );
    write_file( TMP_FILE, my_bit );
    ed( TMP_FILE, "exit_ed" );
}