=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/builtin/fctr.c,v retrieving revision 1.2 retrieving revision 1.5 diff -u -p -r1.2 -r1.5 --- OpenXM_contrib2/asir2000/builtin/fctr.c 2000/08/21 08:31:19 1.2 +++ OpenXM_contrib2/asir2000/builtin/fctr.c 2001/05/28 08:25:30 1.5 @@ -23,7 +23,7 @@ * shall be made on your publication or presentation in any form of the * results obtained by use of the SOFTWARE. * (4) In the event that you modify the SOFTWARE, you shall notify FLL by - * e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification + * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification * for such modification or the source code of the modified part of the * SOFTWARE. * @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/builtin/fctr.c,v 1.1.1.1 1999/12/03 07:39:07 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/builtin/fctr.c,v 1.4 2001/03/29 09:49:56 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -57,7 +57,7 @@ void Pmodsqfr(),Pmodfctr(),Pddd(),Pnewddd(),Pddd_tab() void Pirred_check(), Pnfctr_mod(); struct ftab fctr_tab[] = { - {"fctr",Pfctr,1}, + {"fctr",Pfctr,-2}, {"gcd",Pgcd,-3}, {"gcdz",Pgcdz,2}, {"lcm",Plcm,2}, @@ -86,7 +86,12 @@ LIST *rp; DCP dc; asir_assert(ARG0(arg),O_P,"fctr"); - fctrp(CO,(P)ARG0(arg),&dc); + if ( argc(arg) == 1 ) + fctrp(CO,(P)ARG0(arg),&dc); + else { + asir_assert(ARG1(arg),O_P,"fctr"); + fctr_wrt_v_p(CO,(P)ARG0(arg),VR((P)ARG1(arg)),&dc); + } dcptolist(dc,rp); } @@ -106,7 +111,7 @@ P *rp; else if ( !p2 ) *rp = p1; else if ( !qpcheck((Obj)p1) || !qpcheck((Obj)p2) ) - error("gcd : invalid argument"); + gcdprsp(CO,p1,p2,rp); else if ( argc(arg) == 2 ) ezgcdp(CO,p1,p2,rp); else {