home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!ST7990@SIUCVMB.SIU.EDU
- From: ST7990@SIUCVMB.SIU.EDU
- Newsgroups: comp.lang.lisp.mcl
- Subject: ff code
- Message-ID: <9208270459.AA01970@brazil.cambridge.apple.com>
- Date: 27 Aug 92 05:33:20 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 23
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
- Original-To: info-mcl@cambridge.apple.com
-
- This question has to do with the c code in
- mcl2.0:examples:ff-examples.c. I'd like an explanation of the following
- code:
-
- define cdr(x) (* (long *) (x))
-
- define car(x) (* (Ptr *) (((long)(x) + 7)))
-
- define macptr_ptr(x) (*((*Ptr *)
-
- These functions can be called by
-
- caller(y)
- long *y;
- { car (*y); cdr(*y); macptr_ptr(*y)}
-
- The c function <caller> is defined as
- (deffcfun (caller "caller")((cons :lisp-ref)) :novalue)
- and called with
- (caller (cons (_newptr 5) 10)).
-
- Thank you.
- Chris Ryan (SIUC)
-