Restore previous display for sum and product signs in ASCII art mode;
[maxima.git] / archive / src / dtrdi.c
blob80c717217ef8d45fa394c8ef11e525f2d846c0a7
2 #include <stdio.h>
3 #ifdef AIX3
4 #include <sys/select.h>
5 #endif
6 #include <rpc/rpc.h>
7 #define MAX_ARRAY(x) (x ? x : 20000)
8 #define CHECK(x) if (!x) {fprintf(stderr,"xdr failed"); exit(1);}
10 main()
11 {XDR xdrs;
12 int invoked=0;
13 xdrstdio_create(&xdrs, stdin, XDR_DECODE);
15 double *t= 0 ;
16 u_int t_length = 0;
17 int ldt;
18 int n;
19 double *det= 0 ;
20 u_int det_length = 0;
21 int job;
22 int info;
23 xdrstdio_create(&xdrs, stdin, XDR_DECODE);
24 DO_ARGS:
25 CHECK(xdr_array(&xdrs,&t,&t_length, MAX_ARRAY(t_length),
26 sizeof(double),xdr_double));
27 CHECK(xdr_int(&xdrs,&ldt));
28 CHECK(xdr_int(&xdrs,&n));
29 CHECK(xdr_array(&xdrs,&det,&det_length, MAX_ARRAY(det_length),
30 sizeof(double),xdr_double));
31 if (det_length != 2)fprintf(stderr,"Wrong length for det ");
32 CHECK(xdr_int(&xdrs,&job));
33 CHECK(xdr_int(&xdrs,&info));
34 /* invoke the function */
36 dtrdi_(t,&ldt,&n,det,&job,&info);
38 /* write the results out */
39 xdrstdio_create(&xdrs, stdout, XDR_ENCODE);
40 CHECK(xdr_array(&xdrs,&t,&t_length, MAX_ARRAY(t_length),
41 sizeof(double),xdr_double));
42 CHECK(xdr_array(&xdrs,&det,&det_length, MAX_ARRAY(det_length),
43 sizeof(double),xdr_double));
44 CHECK(xdr_int(&xdrs,&info));
45 exit(0);}}