Ilya Zakharevich on Tue, 7 Dec 1999 20:12:21 -0500 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Making CVS compile with Math::Pari |
The following changes are needed to make CVS version work with Math::Pari again. The change to es.c is self-explanatory: one should NOT reset pariErr when processing an error, this is what pariErr is for. (I did not check whether this change breaks PARI. ;-) The changes to gp.c/highlvl.c are more subtle: the current scheme requires gp.c if you want to compile highlvl.c, which is exactly opposite to the intent of highlvl.c. I could not easily fix this without disabling a "secure" message from install(). Probably secure should be made global and defined in highlvl.c? Enjoy, Ilya Index: src/gp/gp.c =================================================================== RCS file: /home/megrez/cvsroot/pari/src/gp/gp.c,v retrieving revision 1.17 diff -p -u -r1.17 gp.c --- src/gp/gp.c 1999/12/01 18:33:30 1.17 +++ src/gp/gp.c 1999/12/08 01:06:16 @@ -45,7 +45,6 @@ void init80(long n); void init_defaults(int force); void init_graph(void); void init_lim_lines(char *s, long max); -void install0(char *name, char *code, char *gpname, char *lib); void pari_sig_init(void (*f)(int)); int whatnow(char *s, int flag); @@ -2207,17 +2206,6 @@ error0(GEN *g) pariputs("### User error:\n\n "); print0(g,f_RAW); term_color(c_NONE); err_recover(talker); -} - -void -gpinstall(char *s, char *code, char *gpname, char *lib) -{ - if (secure) - { - fprintferr("[secure mode]: about to install '%s'. OK ? (^C if not)\n",s); - hit_return(); - } - install0(s, code, gpname, lib); } void errcontext(char *msg, char *s, char *entry); Index: src/gp/highlvl.c =================================================================== RCS file: /home/megrez/cvsroot/pari/src/gp/highlvl.c,v retrieving revision 1.3 diff -p -u -r1.3 highlvl.c --- src/gp/highlvl.c 1999/12/01 17:39:46 1.3 +++ src/gp/highlvl.c 1999/12/08 01:06:16 @@ -14,7 +14,6 @@ #endif void kill0(entree *ep); -void gpinstall(char *name, char *code, char *gpname, char *lib); void addhelp(entree *ep, char *s) @@ -102,6 +101,19 @@ void install0(char *name, char *code, char *gpname, char *lib) { err(archer); } #endif #endif + +void +gpinstall(char *s, char *code, char *gpname, char *lib) +{ +#if 0 /* Breaks separation of gp.c and highlvl.c */ + if (secure) + { + fprintferr("[secure mode]: about to install '%s'. OK ? (^C if not)\n",s); + hit_return(); + } +#endif + install0(s, code, gpname, lib); +} static long get_type_num(char *st) Index: src/language/init.c =================================================================== RCS file: /home/megrez/cvsroot/pari/src/language/init.c,v retrieving revision 1.16 diff -p -u -r1.16 init.c --- src/language/init.c 1999/12/01 17:41:06 1.16 +++ src/language/init.c 1999/12/08 01:06:17 @@ -786,7 +786,9 @@ disable_dbg(long val) void err_recover(long numerr) { +#if 0 initout(); +#endif disable_dbg(-1); get_timer(-1); killallfiles(0);