[LMH]Exploiter Progress

John Leuner jewel@pixie.co.za
Mon Jul 1 03:21:01 2002


> New version, usual place:
>     http://www.dridus.com/~nyef/lispm/exploiter/exploiter-9c0630.tgz
> 
> Fixes include:
> 
>     Some array funcalling changes from Robert Swindells.
> 
>     Some instance funcalling changes from Robert Swindells.
> 
>     Constants for SELF and SELF-MAPPING-TABLE locations, and memory behind
> the same.
> 
>     Fixed local variables to work with long-args word.
> 
>     Added preliminary version of %STORE-KEY-WORD-ARGS.
> 
>     Added a small handful of other opcode handlers.
> 
>     Fixed a bug with %DATA-TYPE.
> 
> This version gets to the first occurance of FIND-POSITION-IN-LIST in
> MAKE-ARRAY.

Would FIND-POSITION-IN-LIST look something like this? Is the use of == the same as EQ? Can destination be C_NIL?

/*
{Returns the numeric index in list at which element
  is found (uses EQ), unlike MEMQ which may return
  the rest of list beginning with element.  Otherwise
  returns \NIL.  The index returned is zero-based.
  List must be a list or the ARGTYP error is signalled.}
*/

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 = index;
            return 1;
          }
        list = cdr(list);
    }
    destination = C_NIL;
    return 1;
}

John Leuner