franz/lam2.c
/* get from property list 
 *   there are three routines to accomplish this
 *     Lget - lisp callable, the first arg can be a symbol or a disembodied
 *  	      property list.  In the latter case we check to make sure it
 *	      is a real one (as best we can).
 *     Iget - internal routine, the first arg must be a symbol, no disembodied
 *	      plists allowed
 *     Igetplist - internal routine, the first arg is the plist to search.
 */
get from property list
there are three routines to accomplish this
Lget - lisp callable, the first arg can be a symbol or a disembodied
property list.  In the latter case we check to make sure it
is a real one (as best we can).
Iget - internal routine, the first arg must be a symbol, no disembodied
plists allowed
Igetplist - internal routine, the first arg is the plist to search.
get from property list there are three routines to accomplish this Lget - lisp callable the first arg can be a symbol or a disembodied property list . In the latter case we check to make sure it is a real one ( as best we can ) . Iget - internal routine the first arg must be a symbol no disembodied plists allowed Igetplist - internal routine the first arg is the plist to search .
lispval
Lget()
{
	register lispval ind, atm;
	register lispval dum1;
	lispval Igetplist();
	chkarg(2,"get");
	ind = lbot[1].val;
	atm = lbot[0].val;
top:
	switch(TYPE(atm)) {
	case ATOM:
		if(atm==nil) atm = nilplist;
		else atm = atm->a.plist;
		break;		
	case DTPR:
		for (dum1 = atm->d.cdr; dum1 != nil; dum1 = dum1->d.cdr->d.cdr)
		    if((TYPE(dum1) != DTPR) || 
		       (TYPE(dum1->d.cdr) != DTPR)) break; 
		if(dum1 != nil) 
		{   atm = errorh1(Vermisc,
				 "get: bad disembodied property list",
				 nil,TRUE,0,atm);
  		    goto top;
		}
		atm = atm->d.cdr;
		break;
	default:
		 return(nil);
	}
	while (atm != nil)
		{
			if (atm->d.car == ind)
				return ((atm->d.cdr)->d.car);
			atm = (atm->d.cdr)->d.cdr;
		}
	return(nil);
}
lispval Lget ( ) { register lispval ind , atm ; register lispval dum1 ; lispval Igetplist ( ) ; chkarg ( 2 , " " ) ; ind = lbot [ 1 ] . val ; atm = lbot [ 0 ] . val ; top : switch ( TYPE ( atm ) ) { case ATOM : if ( atm == nil ) atm = nilplist ; else atm = atm -> a . plist ; break ; case DTPR : for ( dum1 = atm -> d . cdr ; dum1 != nil ; dum1 = dum1 -> d . cdr -> d . cdr ) if ( ( TYPE ( dum1 ) != DTPR ) || ( TYPE ( dum1 -> d . cdr ) != DTPR ) ) break ; if ( dum1 != nil ) { atm = errorh1 ( Vermisc , " " , nil , TRUE , 0 , atm ) ; goto top ; } atm = atm -> d . cdr ; break ; default : return ( nil ) ; } while ( atm != nil ) { if ( atm -> d . car == ind ) return ( ( atm -> d . cdr ) -> d . car ) ; atm = ( atm -> d . cdr ) -> d . cdr ; } return ( nil ) ; }
get from property list
   there are three routines to accomplish this
     Lget - lisp callable, the first arg can be a symbol or a disembodied
            property list.
get from property list there are three routines to accomplish this Lget - lisp callable the first arg can be a symbol or a disembodied property list .
/* bad prop list */ /* remove since maclisp doesnt treat
		   this as an error, ugh
		   return(errorh1(Vermisc,"get: bad first argument: ",
			       nil,FALSE,0,atm));
		 */