/*
* 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;
}