[LMH]Exploiter Progress

John Leuner jewel@pixie.co.za
Mon Jul 1 07:56:01 2002


> > Would FIND-POSITION-IN-LIST look something like this? Is the use of ==
> > the same as EQ? Can destination be C_NIL?
> 
> Something like that, yes. You forgot to increment index, and you need to
> add DTP_FIX to index when setting destination. Other than that, looks
> good. Thank you.

Is this better?

MISCOP(616) { /* FIND-POSITION-IN-LIST */
    lisp_q foo;
    lisp_q list;
    int index = 0;

    list = pop();
    foo = NOT_CDRCODE(pop());

    while(NOT_CDRCODE(list) != (C_NIL))
      {
        if(NOT_CDRCODE(car(list)) == foo)
          {
            destination = DTP_FIX + index;
            return 1;
          }
        list = cdr(list);
        index++;
    }
    destination = C_NIL;
    return 1;
}

With this I get an error in funcall.c (funcall_array):  

printf("funcall(): array is unfamiliar type. %lx\n", ary_header);

I tried calling dump_raw_array on ary_header, but it just carries on for a long time.

John Leuner