This is ValueStack.h in view mode; [Download] [Up]
/****************************************************************************** *H* ValueStack.h {Maintain push down stack of double values } V0.0, 09-FEB-91 * *C* V0.0 09-FEB-91 Initial version --MDM * ******************************************************************************/ #import <objc/Object.h> /* Root object definition */ /* Instance Type Definitions */ typedef struct OSvalueStackItem { double value; /* Data value of stack item */ struct OSvalueStackItem *blink; /* backward link to lower stack item */ } OTvalueStackItem; /* Define ValueStack to be a sub-class of the Object class */ @interface ValueStack : Object {/* Instance Variables */ OTvalueStackItem *OVstackTop; /* Pointer to top of stack */ unsigned long OVstackSize; /* Number of elements in stack */ } /* Instance Methods */ - init; /* Initialize a new ValueStack instance */ - free; /* Return all allocated stack data to pool */ - ClearStack; /* Pop and free all values currently on the stack */ - (unsigned long) GetSize; /* Return the number of elements currently in the stack */ - Peek: (double *) value; /* Return value of stack top without removing it */ - Pop: (double *) value; /* Return value and free data on top of stack */ - Push: (double) value; /* Push a double value on the stack */ - PrintStack; /* Dump the contents of the stack to standard I/O */ @end /* ValueStack Interface */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.