MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: Using extensions.c in 1.8.0 to Add Packages
-
Date: Mon, 18 Mar 1996 06:01:13 PST
-
From: godardr@jsp.umontreal.ca (Richard Godard)
-
Content-Type: text/plain; charset="us-ascii"
At 2:06 3/18/96, Bruce Rafnel wrote:
>The new extensions.c, which is included in 1.8.0, is a great way of
>adding to the server in a modular way! However to make things even
>more modular, the Makefile needs to be modified so that it "includes"
>a file which contains macros and rules for the files in extensions.c.
>Only one line needs to be added and the extensions.o rule needs to be
>modified. I have attached an abbreviated Makefile, extensions.mak,
>and extensions.c file to show one way of doing this.
What are the consequences of not updating the Makefile ? I mean since all
the code is included and since the make end linking all the object code ?
BTW, why not including
const char *FUP_version = "1.8";
oklog(" Using File Utilities Package version %s\n", FUP_version);
in files.c ?
You call oklog() with an identation, it will look weird unless you move
that little line in server.c :-)
BTW should you add built-in functions in extlist.c, you will have to change
extensions.c code... which is a lack of modularity :-) :-) :-)
I avoid that by doing a register function in each extension file (example
of extensions.c)
#include "bf_register.h"
#include "functions.h"
#include "log.h"
#include "storage.h"
#include "structures.h"
#include "utils.h"
#include "files.c"
/* FUP extensions */
#include "extension_list.c"
/* extra list manipulation built-in functions */
#include "extension_task_code.c"
/* eperimental woo woo */
#include "extension_e_moo.c"
/* E_MOO specific extensions */
/* #include "extension_tecfa.c" */
/* TECFA specific extensions */
void
register_extensions()
{
oklog(" (Using Patch: $server_options.bf_handler)\n");
oklog(" (Using Patch: $server_options.enforce_bf_handling)\n");
oklog(" (Using Patch: $server_options.huh_handler)\n");
register_files();
register_extension_list();
register_extension_task_code();
register_extension_e_moo();
/* register_extension_tecfa(); */
}
Just my $0.02
Richard
Follow-Ups:
Home |
Subject Index |
Thread Index