[DGD] Override Kernel

Erwin Harte harte at xs4all.nl
Thu Feb 14 17:01:51 CET 2002


On Thu, Feb 14, 2002 at 08:54:52AM -0500, JRC wrote:
[...]
> I've gotten the BBlib installed into a DGD 1.2.37
> build. I'm starting to put together a layout for
> my mudlib files and discovered that I don't like
> the fact that the kernel lib puts wizard directories
> under /usr.

I know this isn't what you asked, but:

How about just changing where the '# define USR ..' points in the
/include/config.h include-file and either restarting or recompiling
the relevant bits of code?

>             Given that, I wanted to override the 
> cmd_grant function in /kernel/lib/wiztool.c. However,
> short of copying this entire file in /usr/System and
> modifying it there, I cannot see a way to "override"
> (in the OOP sense) cmd_grant.
> 
> What are the best ways to do such overrides? Is it best
> to just copy over the kernel lib's stuff and use only
> my own? This seems like it would be problematic should
> the kernel lib ever need updating.

Copy /kernel/obj/wiztool.c to ~System/obj/wiztool.c, make it inherit
from ~System/lib/wiztool.c and create that file, inheriting
/kernel/lib/wiztool.c and overriding the function you want?

Something like that anyway, if you've worked with LPC before it's not
exactly rocket science, just requires a minor learning curve to find
out where everything _is_. :-)

Hope that helps,

Erwin.
-- 
Erwin Harte <harte at xs4all.nl>
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list