[DGD]Auto object

Stephen Schmidt schmidsj at union.edu
Fri May 11 20:35:19 CEST 2001


Attempting to create my own objectd.c, I have written the
following:

: static void
: create()
: {
:     user = find_object(SYS_USER);
:     write_file("/usr/System/test","Test1\n") ;
:     USERD->set_object_manager(this_object());
: }
:
: string path_special(string compiled) {
:     write_file("/usr/System/test","Test2\n") ;
:     return "/usr/System/include/auto.h" ;
:  }

When I start DGD, "Test1" is written, "Test2" is -not- written,
and I get the error message Function member_array not defined,
which means that auto.h is not being included properly. Indeed,
it would appear that path_special() is never being invoked.

Checking the source of /kernel/lib/driver.c shows the
following:

::  if (path == "AUTO" && from == "/include/std.h" && objectd &&
::        creator(compiled) != "System") {
::        /*
::         * special object-dependant include file
::         */
::        path = objectd->path_special(compiled);

And I'm guessing that the problem is that the creator of the
file I'm trying to compile (/usr/System/lib/object.c) is System
and thus path_special is not being invoked in this case.

1) Why is an object whose creator is System not included in
the objects where path_special() is invoked?

2) Will all objects in /usr/System be similarly bypassed?
I think so, but I'm not sure. The source suggests that any
file in /kernel or in /usr/System will be deemed "System"
by creator(). That seems Wrong - should one not be able to
distingiush between those two classes of objects?

If 2) is right, then I'm back to including the file in all objects
in /usr/System by hand, which'll be a good 75-100 of them. I can
do that but it seems Wrong.

Or do I have something wrong here?

Steve

 










List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list