On Sun, 15 Jun 2003, Adam McDaniel wrote:
> On Sun, Jun 15, 2003 at 09:06:51AM -0400, Alexander R. Pruss wrote:
> > Is there a way to specify the entry point to an armlet?  With the way things
> > are currently set up, it looks like the armlet enters at the first function
> > in armlets/search.c, whatever that function might be called.  I found this
> > out the hard way when I added a second function and put it before
> > NativeFunction().
> 
> Nope. NativeFunction() is significant as a starting point just as
> PilotMain() is in 68k land.
> 
> There are two ways to do what you want to do. The first easy way is to
> create a second armlet altogether. The second involves alerting the
> entry point but its a slightly more complicated and a little beyond my
> experience. There is one program that I know of that did accomplish
> this.. that's the zlib armlet port.

Well, here's the problem.  I rewrote armlets/search.c to call a search
routine that is used for both 68K 8bit search and ARM 8bit
search.  Anyway, I first tried:

    Char DoSearch8Bits( args )
    {
      ...;
    }

    UInt32 NativeFunction( args )
    {
      ...;
      DoSearch8Bits();
      ...;
    }

This failed (it was a graceful failure, in that there was no hang, but it
found nothing).  I haven't tested whether it was actually entering
DoSearch8Bits(), but my suspicion is that it was using it as the entry
point.  On the other hand, if I reversed the order of the functions in my
source file (putting a declaration of DoSearch8Bits() first, of course),
it worked fine.

I remember when I was making my search armlet in the first place, I had
similar problems.

Alex

--
Dr. Alexander R. Pruss  || e-mail: [EMAIL PROTECTED]
Philosophy Department   || online papers and home page:
Georgetown University   ||  www.georgetown.edu/faculty/ap85
Washington, DC 20057    ||
U.S.A.                  ||
-----------------------------------------------------------------------------
   "Philosophiam discimus non ut tantum sciamus, sed ut boni efficiamur."
       - Paul of Worczyn (1424)

_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev

Reply via email to