ed_stuff.c

skylib_fluffos_v3/mudlib/secure/master/ed_stuff.c · 910 B

From the archive skylib_fluffos_v3.zip

Download the archive   « Back to the archive contents

/*  -*- LPC -*-  */

int save_ed_setup(object wiz, int setup) {
  wiz->set_ed_setup(setup);
  return 1;
} /* save_ed_setup() */

int retrieve_ed_setup(object wiz) {
  return (int)wiz->query_ed_setup();
} /* retrieve_ed_setup() */

/*
 * make_path_absolute:
 *   Used by ed.c to expand relative path names on read and write.
 */
string make_path_absolute(string str) {
  if (this_player()) {
    return (string)this_player()->get_path(str);
  }
} /* make_path_absolute() */

/*
 * Give a file name for edit preferences to be saved in.
 */
string get_save_file_name(string file, object who) {
  string *file_ar;

  if (!objectp(who))
    return 0;
  file_ar = explode(file,"/") - ({ "" });
  file = file_ar[<1];
  write("File saved in \"/w/.dead_ed_files/" +
        who->query_name() + "-" + file + "\"\n");
  return "/w/.dead_ed_files/" + who->query_name() + "-" + file;
} /* get_ed_buffer_save_file_name() */

Site Stats

Snippets: 1791
Codebases: 571