compile_object.c~

MudOSa4DGD/mudlib/dgd/lib/sys/kfun/compile_object.c~ · 660 B

From the archive MudOSa4DGD-30.06.98.tar.gz

Download the archive   « Back to the archive contents

/*
 * compile_object.c
 *
 * Assure that master program is loaded and __create() called after
 * compilation.
 *
 * (C) Frank Schmidt, Jesus@NorseMUD
 *
 */


/* compile a file */
static object compile_object(string file) {
  object ob;

#ifdef DEFAULT_SRC_EXTENSION
  /* accept objectnames ending with ".c" */
  int i;
  if ((i=strlen(file)) >= 2 && file[i-2..] == DEFAULT_SRC_EXTENSION)
    file = file[0..i-3];
#endif

  if ((ob=::compile_object(file)) && (previous_program() != DRIVER ||
      previous_function() != "call_object")) {
    /* call dummy function in program to ensure __create() gets called */
    ::call_other(ob, "??");
  }
  return ob;
}

Site Stats

Snippets: 1791
Codebases: 571