=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2018/builtin/ctrl.c,v retrieving revision 1.4 retrieving revision 1.7 diff -u -p -r1.4 -r1.7 --- OpenXM_contrib2/asir2018/builtin/ctrl.c 2019/03/27 06:41:45 1.4 +++ OpenXM_contrib2/asir2018/builtin/ctrl.c 2022/04/03 00:49:25 1.7 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2018/builtin/ctrl.c,v 1.3 2019/03/06 10:43:25 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2018/builtin/ctrl.c,v 1.6 2022/01/27 01:29:31 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -120,6 +120,7 @@ extern int ASIRLOADPATH_LEN; extern int No_ox_reset; extern int plot_by_bigfloat; extern int debug_plot; +extern int debug_pari; static struct keyval { char *key; @@ -141,7 +142,7 @@ static struct keyval { {"f4_nocheck",&f4_nocheck,"If set to 1, correctness check of the result of modular computation are omitted in nd_f4()."}, {"fake_ox_reset",&No_ox_reset,"Determines the treatment of OX reset request for a server which does not implement the reset protocol."}, {"fortran_output",&fortran_output,"If set to 1, ** is used instead of ^ for representing the power."}, - {"hex",&hex_output,"If set to 1, integers are printed by the hexadecimal notation."}, + {"hex",&hex_output,"If set to 1 (to 2), integers are printed by the hexadecimal (binary) notation."}, {"hideargs",&hideargs,"If set to 1, the arguments of a function call are not printed."}, {"message",&do_message,"If set to 1, an opening message is printed in ox_asir and ox_plot."}, {"new_hensel",&use_new_hensel,"If set to 1, a function hensel2() is used in the univariate factorizer over Q."}, @@ -170,6 +171,7 @@ static struct keyval { {"zerorewrite",&zerorewrite,""}, {"itvplotsize",&Itvplot,""}, #endif + {"debug_pari",&debug_pari,"If set to 1, ox_pari is executed with the message window."}, {0,0}, }; @@ -439,8 +441,13 @@ static char *get_lang() char *c, *p, *q; c = setlocale(LC_ALL, NULL); /* saving current locale */ p = setlocale(LC_ALL, ""); - q = (char *)MALLOC(strlen(p)+1); - strcpy(q,p); + if ( p != 0 ) { + q = (char *)MALLOC(strlen(p)+1); + strcpy(q,p); + } else { + q = (char *)MALLOC(2); + strcpy(q,"C"); + } setlocale(LC_ALL, c); /* restoring current locale */ return q; }