[BACK]Return to anal.h CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / pari / src / language

Annotation of OpenXM_contrib/pari/src/language/anal.h, Revision 1.1

1.1     ! maekawa     1: /*************************************************************************/
        !             2: /*                                                                       */
        !             3: /*                 Declarations specific to the analyzer                 */
        !             4: /*                                                                       */
        !             5: /*************************************************************************/
        !             6: /* $Id: anal.h,v 1.1.1.1 1999/09/16 13:48:02 karim Exp $ */
        !             7:
        !             8: typedef struct default_type {
        !             9:   char *name;
        !            10:   void *fun;
        !            11: } default_type;
        !            12:
        !            13: typedef struct gp_args {
        !            14:   int nloc, narg;
        !            15:   GEN *arg;
        !            16: } gp_args;
        !            17:
        !            18: typedef struct module {
        !            19:   entree *func;
        !            20:   char **help;
        !            21: } module;
        !            22:
        !            23: entree *do_alias(entree *ep);
        !            24: int    is_identifier(char *s);
        !            25: entree *is_entry_intern(char *s, entree **table, long *hash);
        !            26: long   is_keyword_char(char c);
        !            27: char   *readstring(char *src, char *s);
        !            28: long   loop_break();
        !            29: long   did_break();
        !            30: void   print_prefixed_text(char *s, char *prefix, char *str);
        !            31:
        !            32: void term_color(int c);
        !            33: char *term_get_color(int c);
        !            34:
        !            35: void push_val(entree *ep, GEN a);
        !            36: void pop_val(entree *ep);
        !            37:
        !            38: extern long prec;
        !            39: extern GEN gnil;
        !            40:
        !            41: extern char *current_function;
        !            42: extern GEN  (*gp_history_fun)(long, long, char *, char *);
        !            43: extern int  (*whatnow_fun)(char *, int);
        !            44: extern void *foreignHandler;
        !            45: extern GEN  (*foreignExprHandler)(char*);
        !            46: extern char foreignExprSwitch;
        !            47: extern entree * (*foreignAutoload)(char*, long);
        !            48: extern void (*foreignFuncFree)(entree *);
        !            49:
        !            50: /* Variables containing the list of PARI functions */
        !            51: extern int    functions_tblsz;     /* hashcodes table size */
        !            52: extern module *pari_modules;       /* list of functions modules */
        !            53: extern entree **functions_hash;    /* functions hashtable */
        !            54: extern entree **members_hash;      /* members hashtable */
        !            55: extern char   *helpmessages_basic[];
        !            56: extern entree functions_basic[];
        !            57:
        !            58: /* Variables containing the list of specific GP functions */
        !            59: extern char   *helpmessages_gp[];
        !            60: extern entree  functions_gp[];
        !            61: extern entree  gp_member_list[];
        !            62: extern char   *helpmessages_highlevel[];
        !            63: extern entree  functions_highlevel[];
        !            64: extern int    gp_colors[];
        !            65: extern int     disable_color,added_newline;
        !            66:
        !            67: /* Variables containing the list of old PARI fonctions (up to 1.39.15) */
        !            68: extern module *pari_oldmodules;    /* list of functions modules */
        !            69: extern entree **funct_old_hash;    /* hashtable */
        !            70: extern char   *oldhelpmessage[], *helpmessages_oldgp[];
        !            71: extern entree  oldfonctions[], functions_oldgp[];
        !            72:
        !            73: /* backward compatibility */
        !            74: extern long compatible;
        !            75: enum { NONE, WARN, OLDFUN, OLDALL };
        !            76: #define new_fun_set (compatible == NONE || compatible == WARN)
        !            77:
        !            78: /* return type for GP functions */
        !            79: enum { RET_GEN, RET_INT, RET_VOID };
        !            80:
        !            81: /* are we under emacs ? (might change output) */
        !            82: extern int under_emacs;
        !            83:
        !            84: /* entrees */
        !            85: #define Epstatic 0x100
        !            86: #define EpVALENCE(ep) ((ep)->valence & 0xFF)
        !            87: #define EpSTATIC(ep) ((ep)->valence & 0x100)
        !            88: #define EpSETSTATIC(ep) ((ep)->valence |= 0x100)
        !            89: #define PARAMSHIFT 9
        !            90: #define EpNPARAM(ep) ((ep)->valence >> PARAMSHIFT)
        !            91: #define EpPREDEFINED(ep) (EpVALENCE(ep) < EpUSER)
        !            92:
        !            93: #define EpINSTALL 200
        !            94: #define EpMEMBER  105
        !            95: #define EpGVAR    104
        !            96: #define EpVAR     103
        !            97: #define EpALIAS   102
        !            98: #define EpNEW     101
        !            99: #define EpUSER    100
        !           100:
        !           101: #define NOT_CREATED_YET (entree *)1 /* for check_new_fun */
        !           102: #define initial_value(ep) ((ep)+1)
        !           103:
        !           104: #define is_entry(s) (is_entry_intern(s,functions_hash,NULL))
        !           105:
        !           106: /* blocs */
        !           107: #define BL_HEAD 3
        !           108: #define bl_base(x) ((x) - BL_HEAD)
        !           109: #define bl_next(x) (((GEN)x)[-3])
        !           110: #define bl_prev(x) (((GEN)x)[-2])
        !           111: #define bl_num(x)  (((GEN)x)[-1])
        !           112:
        !           113: /* break */
        !           114: enum { br_NONE, br_BREAK, br_NEXT, br_RETURN }; /* break status */
        !           115:
        !           116: /* formatted printing */
        !           117: #ifndef LONG_IS_64BIT
        !           118: #  define VOIR_STRING1 "[&=%08lx] "
        !           119: #  define VOIR_STRING2 "%08lx  "
        !           120: #  define VOIR_STRING3 "  %08lx  :  "
        !           121: #else
        !           122: #  define VOIR_STRING1 "[&=%08x%08x] "
        !           123: #  define VOIR_STRING2 "%08x%08x  "
        !           124: #  define VOIR_STRING3 "  %08x%08x  :  "
        !           125: #endif
        !           126:
        !           127: /* signals */
        !           128: #define INIT_JMPm 1
        !           129: #define INIT_SIGm 2
        !           130: #define INIT_JMP     (init_opts & INIT_JMPm)
        !           131: #define INIT_SIG     (init_opts & INIT_SIGm)
        !           132: #define INIT_JMP_on  (init_opts |= INIT_JMPm)
        !           133: #define INIT_SIG_on  (init_opts |= INIT_SIGm)
        !           134: #define INIT_JMP_off (init_opts &= ~INIT_JMPm)
        !           135: #define INIT_SIG_off (init_opts &= ~INIT_SIGm)
        !           136:
        !           137: /* gp_colors */
        !           138: void decode_color(int n, int *c);
        !           139: #define c_NONE 0xffffUL
        !           140: enum { c_ERR, c_HIST, c_PROMPT, c_INPUT, c_OUTPUT, c_HELP, c_TIME, c_LAST };
        !           141:
        !           142: /* general printing */
        !           143: #define print_text(s) print_prefixed_text((s),NULL,NULL);
        !           144:
        !           145: /* infiles */
        !           146: #define MAX_BUFFER 64
        !           147: #define mf_IN    1
        !           148: #define mf_PIPE  2
        !           149: #define mf_FALSE 4
        !           150:
        !           151: /* for filtre */
        !           152: #define f_COMMENT  0
        !           153: #define f_INIT     1
        !           154: #define f_KEEPCASE 2
        !           155: #define f_READL    4
        !           156: #define f_REG      8
        !           157: #define f_ENDFILE 16

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>