Annotation of OpenXM_contrib2/windows/pari2/include/paristio.h, Revision 1.1
1.1 ! noro 1: /******************************************************************/
! 2: /* This file contains memory and I/O management definitions */
! 3: /* $Id: paristio.h,v 1.1.1.1 1999/09/16 13:47:45 karim Exp $ */
! 4:
! 5: typedef unsigned char *byteptr;
! 6:
! 7: typedef struct stackzone
! 8: {
! 9: long zonetop, bot, top, avma, memused;
! 10: } stackzone;
! 11:
! 12: typedef struct entree {
! 13: char *name;
! 14: ulong valence;
! 15: void *value;
! 16: long menu;
! 17: char *code;
! 18: struct entree *next;
! 19: char *help;
! 20: void *args;
! 21: } entree;
! 22:
! 23: typedef struct PariOUT {
! 24: void (*putch)(char);
! 25: void (*puts)(char*);
! 26: void (*flush)(); /* Finalize a report of a non fatal-error. */
! 27: void (*die)(); /* If not-NULL, should be called to finalize
! 28: a report of a fatal error (no "\n" required). */
! 29: } PariOUT;
! 30:
! 31: typedef struct pariFILE {
! 32: FILE *file;
! 33: int type;
! 34: char *name;
! 35: struct pariFILE* prev;
! 36: struct pariFILE* next;
! 37: } pariFILE;
! 38: /* Common global variables: */
! 39:
! 40: extern PariOUT *pariOut, *pariErr;
! 41: extern FILE *pari_outfile, *logfile, *infile, *errfile;
! 42:
! 43: extern ulong avma,bot,top,memused;
! 44: extern byteptr diffptr;
! 45: extern entree **varentries;
! 46: extern char *errmessage[], *current_psfile;
! 47:
! 48:
! 49: /* This may not be exact on all machines [Ptitboul] */
! 50: #define is_universal_constant(x) \
! 51: ((long)(x) >= (long)gzero && (long)(x)<=(long)gi)
! 52:
! 53: #define copyifstack(x,y) {long t=(long)(x); \
! 54: (y)=(t>=bot &&t<top)? lcopy((GEN)t): t;}
! 55: #define icopyifstack(x,y) {long t=(long)(x); \
! 56: (y)=(t>=bot &&t<top)? licopy((GEN)t): t;}
! 57: #define isonstack(x) ((GEN)(x)>=(GEN)bot && (GEN)(x)<(GEN)top)
! 58:
! 59: /* Define this to (1) locally (in a given file, NOT here) to check
! 60: * "random" garbage collecting
! 61: */
! 62: #ifdef DYNAMIC_STACK
! 63: # define low_stack(x,l) (avma < (l))
! 64: #else
! 65: # define low_stack(x,l) (avma < (x))
! 66: #endif
! 67:
! 68: #define stack_lim(av,n) (bot + (((av)-bot)>>(n)))
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>