=================================================================== RCS file: /home/cvs/OpenXM_contrib/pari-2.2/src/gp/Attic/highlvl.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -p -r1.1.1.1 -r1.2 --- OpenXM_contrib/pari-2.2/src/gp/Attic/highlvl.c 2001/10/02 11:17:07 1.1.1.1 +++ OpenXM_contrib/pari-2.2/src/gp/Attic/highlvl.c 2002/09/11 07:26:56 1.2 @@ -1,4 +1,4 @@ -/* $Id: highlvl.c,v 1.1.1.1 2001/10/02 11:17:07 noro Exp $ +/* $Id: highlvl.c,v 1.2 2002/09/11 07:26:56 noro Exp $ Copyright (C) 2000 The PARI group. @@ -27,12 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, # include "../language/anal.h" #endif -void kill0(entree *ep); -long secure; +extern void kill0(entree *ep); #ifdef HAS_DLOPEN #include -char *expand_tilde(char *s); +extern char *expand_tilde(char *s); void install0(char *name, char *code, char *gpname, char *lib) @@ -49,8 +48,14 @@ install0(char *name, char *code, char *gpname, char *l #endif if (! *gpname) gpname=name; if (lib) lib = expand_tilde(lib); - - handle = dlopen(lib,RTLD_LAZY); + +/* OSF1 has dlopen but not RTLD_GLOBAL*/ +#ifndef RTLD_GLOBAL +#define RTLD_GLOBAL 0 +#endif + + handle = dlopen(lib,RTLD_LAZY|RTLD_GLOBAL); + if (!handle) { const char *s = dlerror(); if (s) fprintferr("%s\n\n",s); @@ -113,7 +118,7 @@ install0(char *name, char *code, char *gpname, char *l void gpinstall(char *s, char *code, char *gpname, char *lib) { - if (secure) + if (GP_DATA->flags & SECURE) { fprintferr("[secure mode]: about to install '%s'. OK ? (^C if not)\n",s); hit_return(); @@ -238,7 +243,7 @@ entree functions_highlevel[]={ {"plotcursor",11,(void*)rectcursor,10,"L"}, {"plotdraw",99,(void*)rectdraw_flag,10,"vGD0,L,"}, {"plotfile",16,(void*)plot_outfile_set,10,"ls"}, -{"ploth",99,(void*)ploth,10,"V=GGIpD0,L,D0,L,"}, +{"ploth",99,(void*)ploth,10,"V=GGIpD0,M,D0,L,\nParametric|1; Recursive|2; no_Rescale|4; no_X_axis|8; no_Y_axis|16; no_Frame|32; no_Lines|64; Points_too|128; Splines|256; no_X_ticks|512; no_Y_ticks|1024; Same_ticks|2048"}, {"plothraw",25,(void*)plothraw,10,"GGD0,L,"}, {"plothsizes",0,(void*)plothsizes_flag,10,"D0,L,"}, {"plotinit",99,(void*)initrect_gen,10,"vLD0,G,D0,G,D0,L,"}, @@ -278,7 +283,7 @@ char *helpmessages_highlevel[]={ "plotcursor(w): current position of cursor in rectwindow w", "plotdraw(list, {flag=0}): draw vector of rectwindows list at indicated x,y positions; list is a vector w1,x1,y1,w2,x2,y2,etc. . If flag!=0, x1, y1 etc. express fractions of the size of the current output device", "plotfile(filename): set the output file for plotting output. \"-\" redirects to the same place as PARI output", - "ploth(X=a,b,expr,{flags=0},{n=0}): plot of expression expr, X goes from a to b in high resolution. Both flags and n are optional. Binary digits of flags mean : 1 parametric plot, 2 recursive plot, 8 omit x-axis, 16 omit y-axis, 32 omit frame, 64 do not join points, 128 plot both lines and points, 256 use cubic splines, 512/1024 no x/y ticks, 2048 plot all ticks with the same length. n specifies number of reference points on the graph (0=use default value). Returns a vector for the bounding box", + "ploth(X=a,b,expr,{flags=0},{n=0}): plot of expression expr, X goes from a to b in high resolution. Both flags and n are optional. Binary digits of flags mean: 1=Parametric, 2=Recursive, 4=no_Rescale, 8=no_X_axis, 16=no_Y_axis, 32=no_Frame, 64=no_Lines (do not join points), 128=Points_too (plot both lines and points), 256=Splines (use cubic splines), 512=no_X_ticks, 1024= no_Y_ticks, 2048=Same_ticks (plot all ticks with the same length). n specifies number of reference points on the graph (0=use default value). Returns a vector for the bounding box", "plothraw(listx,listy,{flag=0}): plot in high resolution points whose x (resp. y) coordinates are in listx (resp. listy). If flag is 1, join points, other non-0 flags should be combinations of bits 8,16,32,64,128,256 meaning the same as for ploth()", "plothsizes({flag=0}): returns array of 6 elements: terminal width and height, sizes for ticks in horizontal and vertical directions, width and height of characters. If flag=0, sizes of ticks and characters are in pixels, otherwise are fractions of the screen size", "plotinit(w,{x=0},{y=0},{flag=0}): initialize rectwindow w to size x,y. If flag!=0, x and y express fractions of the size of the current output device. x=0 or y=0 means use the full size of the device",