/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:33:12 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv pf=,p_dprpl2 s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_dprpl2.h" /* program DRDPRPL2 *>> 1996-06-27 DRDPRPL2 Krogh Special code for C conversion. *>> 1994-10-19 DRDPRPL2 Krogh Changes to use M77CON *>> 1992-02-14 DRDPRPL2 CLL * ------------------------------------------------------------------ *--D replaces "?": DR?PRPL2, ?PRPL2 * ------------------------------------------------------------------ */ /* PARAMETER translations */ #define KC 3 /* end of PARAMETER translations */ int main( ) { long int i; double dx, s, x, xy[4][15]; static long jx[KC]={1,1,1}; static long jy[KC]={2,3,4}; static long np[KC]={15,15,15}; static byte symbol[KC]={'A','B','C'}; /* OFFSET Vectors w/subscript range: 1 to dimension */ long *const Jx = &jx[0] - 1; long *const Jy = &jy[0] - 1; long *const Np = &np[0] - 1; byte *const Symbol = &symbol[0] - 1; /* end of OFFSET VECTORS */ long int ierr, line; char image[45][111], image2[45][80]; /* character IMAGE(NLMAX)*(NCMAX) */ /* ------------------------------------------------------------------ */ x = -3.14e0; dx = 21.0e0/49.0e0; for (i = 1; i <= 15; i++) { s = sin( x ); xy[0][i - 1] = x; xy[1][i - 1] = s + 1.0e0 + 0.5e0*x; xy[2][i - 1] = 1.0e0 + 0.5e0*x; xy[3][i - 1] = s + 2.0e0 + x; x += dx; } /*++ Code for ~.C. is inactive * call DPRPL2(XY,15,KC,JX,JY,NP,SYMBOL, * * 'Demo of DPRPL2 with NLINES = 45 and NCHARS = 110', * * 'X VALUES','Y VALUES', 45, 110, IMAGE, IERR) * print'(1x,a)',IMAGE * print'(1x/1x)' *c * call DPRPL2(XY,15,KC,JX,JY,NP,SYMBOL, * * 'Demo of DPRPL2 with NLINES = 22 and NCHARS = 79', * * 'X VALUES','Y VALUES', 22, 79, IMAGE, IERR) * print'(1x,a)',(IMAGE(LINE)(1:79), LINE = 1,22) *++ Code for .C. is active */ dprpl2( (double*)xy, 15, KC, jx, jy, np, symbol, "Demo of DPRPL2 with NLINES = 45 and NCHARS = 110", "X VALUES", "Y VALUES", 45, 111, (byte*)image, &ierr ); for(line=0; line < 45; line++) printf("\n%111.111s", image[line]); printf(" \n\n"); dprpl2( (double*)xy, 15, KC, jx, jy, np, symbol, "Demo of DPRPL2 with NLINES = 22 and NCHARS = 79", "X VALUES", "Y VALUES", 22, 80, (byte*)image2, &ierr ); for (line = 0; line < 22; line++) printf("\n%80.80s", image2[line]); printf("\n"); exit(0); /*++ End */ } /* end of function */