c084f9f224
standard library, because they never worked and come from an achingly old version of the Pascal specification. Fix the implementations of New() and Dispose() to use the standard C memory allocator rather than rolling their own (also in C). Write test!
52 lines
627 B
C
52 lines
627 B
C
/* REQUIRED PROCEDURES AND FUNCTIONS */
|
|
|
|
enum
|
|
{
|
|
R__UNUSED = 0,
|
|
|
|
/* PROCEDURES */
|
|
/* FILE HANDLING */
|
|
R_REWRITE,
|
|
R_PUT,
|
|
R_RESET,
|
|
R_GET,
|
|
R_PAGE,
|
|
|
|
/* DYNAMIC ALLOCATION */
|
|
R_NEW,
|
|
R_DISPOSE,
|
|
|
|
/* MISCELLANEOUS PROCEDURE(S) */
|
|
R_HALT,
|
|
|
|
/* TRANSFER */
|
|
R_PACK,
|
|
R_UNPACK,
|
|
|
|
/* FUNCTIONS */
|
|
/* ARITHMETIC */
|
|
R_ABS,
|
|
R_SQR,
|
|
R_SIN,
|
|
R_COS,
|
|
R_EXP,
|
|
R_LN,
|
|
R_SQRT,
|
|
R_ARCTAN,
|
|
|
|
/* TRANSFER */
|
|
R_TRUNC,
|
|
R_ROUND,
|
|
|
|
/* ORDINAL */
|
|
R_ORD,
|
|
R_CHR,
|
|
R_SUCC,
|
|
R_PRED,
|
|
|
|
/* BOOLEAN */
|
|
R_ODD,
|
|
R_EOF,
|
|
R_EOLN,
|
|
};
|