/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:33:18 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv pf=,p_sprpl1 s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_sprpl1.h" /*atc program DRSPRPL1 *>> 1996-06-27 DRSPRPL1 Krogh Special code for C conversion. *>> 1994-10-19 DRSPRPL1 Krogh Changes to use M77CON *>> 1992-02-14 DRSPRPL1 CLL * ------------------------------------------------------------------ *--S replaces "?": DR?PRPL1, ?PRPL1 * ------------------------------------------------------------------ */ /* PARAMETER translations */ #define ALPHA 0.15e0 #define BETA 0.015e0 #define DX 1.0e0 #define NP 101 /* end of PARAMETER translations */ int main( ) { long int i; float x[NP], xt, y[NP]; /* OFFSET Vectors w/subscript range: 1 to dimension */ float *const X = &x[0] - 1; float *const Y = &y[0] - 1; /* end of OFFSET VECTORS */ long int ierr, line; char image[45][111], image2[45][80]; xt = -36.0e0; /* character IMAGE(NLMAX)*(NCMAX) * ------------------------------------------------------------------ */ for (i = 1; i <= NP; i++) { X[i] = xt; Y[i] = X[i]*sinf( ALPHA*X[i] + BETA ); xt += DX; } /*++ Code for ~.C. is inactive * call SPRPL1(X,Y,NP, * * 'Demo of SPRPL1 with NLINES = 45 and NCHARS = 110', * * 'X VALUES','Y VALUES', 45, 110, IMAGE, IERR) * print'(1x,a)',IMAGE * print'(1x/1x)' *c * call SPRPL1(X,Y,NP, * * 'Demo of SPRPL1 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 */ sprpl1( x,y,NP,"Demo of SPRPL1 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"); printf(" \n \n"); sprpl1( x,y,NP,"Demo of SPRPL1 with NLINES = 22 and NCHARS = 79", "X VALUES","Y VALUES",22,80,(byte*)image2,&ierr ); printf(" "); for (line = 0; line < 22; line++) printf("\n%80.80s", image2[line]); printf("\n"); exit(0); /*++ End */ } /* end of function */