/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:30:08 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include "ivecp.h" #include #include /* PARAMETER translations */ #define MAXCOL 8 /* end of PARAMETER translations */ void /*FUNCTION*/ ivecp( long v[], long n, char *text) { long int iblock, j, j1, j2, nblock; /* OFFSET Vectors w/subscript range: 1 to dimension */ long *const V = &v[0] - 1; /* end of OFFSET VECTORS */ /* IVECP.. Print a vector. * Copyright (c) 1996 California Institute of Technology, Pasadena, CA. * ALL RIGHTS RESERVED. * Based on Government Sponsored Research NAS7-03001. *>> 1996-04-27 IVECP Krogh Changes to use .C. and C%%. *>> 1996-01-24 IVECP Krogh M77CON instructions for conversion to C. *>> 1994-08-08 CLL Special treatment for text(1:1) .eq. '0' *>> 1994-04-20 CLL Making code in IVECP similar to DVECP and SVECP. *>> 1992-04-22 CLL *>> 1985-09-20 CLL *>> 1983-07-05 IVECP K. Stewart recoded for math 77 library *>> 1981-07-23 IVECP Kris Stewart RECODED FOR PORTABLE ENVIRONMENT *>> 1969-00-00 C. L. Lawson, JPL, Original code: MOUT/VOUT * ------------------------------------------------------------------ * Subroutine arguments * * V(I),I=1,N Vector to be output. * N Number of vector components. * TEXT Character string to be printed as a title. * First character in TEXT controls line spacing before title on * an impact printer. For output to be viewed on a screen it is * safest to always use ' '. * ' ' = normal single space. * '0' = double space. * '1' = page advance. * '+' = suppress space, i.e., overprint. * ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ *++ CODE for ~.C. is inactive * if(text(1:1) .eq. '0') then * write(*,'(/1x,a)') text(2:) * else * write(*,'(a)') text * endif *++ CODE for .C. is active */ if(text[0] == '0') printf("\n %s\n", &text[1]); else printf("%s\n", text); nblock = (n + MAXCOL - 1)/MAXCOL; /*++ END */ j2 = 0; for (iblock = 1; iblock <= nblock; iblock++) { j1 = j2 + 1; j2 = min( j1 + MAXCOL - 1, n ); printf(" %3ld TO %3ld", j1, j2); printf(" "); for (j = j1; j <= j2; j++) { printf("%15ld", V[j]); } printf("\n"); } return; } /* end of function */