/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:30:54 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include "ivecpr.h" #include /* PARAMETER translations */ #define MACT1D 3 #define MECONT 50 #define MEIVEC 57 #define MEMLIN 13 #define MEMUNI 15 #define MERET 51 /* end of PARAMETER translations */ void /*FUNCTION*/ ivecpr( long v[], long n, char *text, long lwidth, long lunit) { char ttext[1][3]; long int k, mact[9]; static long mact1[MACT1D]={MEIVEC,0,MERET}; /* OFFSET Vectors w/subscript range: 1 to dimension */ long *const Mact = &mact[0] - 1; long *const Mact1 = &mact1[0] - 1; long *const V = &v[0] - 1; /* end of OFFSET VECTORS */ /* Copyright (c) 1996 California Institute of Technology, Pasadena, CA. * ALL RIGHTS RESERVED. * Based on Government Sponsored Research NAS7-03001. *>> 2000-12-01 IVECPR Krogh Removed unused parameter METXTF. *>> 1994-11-11 IVECPR Krogh Declared all vars. *>> 1994-10-20 IVECPR Krogh Added M77CON code. *>> 1992-05-03 IVECPR Krogh Convert to use MESSFT for Fortran text. *>> 1992-04-08 IVECPR Krogh Replaced dummy K with MACT in ?MESS call. *>> 1991-11-22 IVECPR F. Krogh Initial code *++I DEFAULT MACT1D=3, TAIL=", LUNIT" *++ DEFAULT MACT1D=5, TAIL=", LUNIT, NUMDIG" *++ REPLACE ", LUNIT " = TAIL *--I replaces "?": ?VECPR, ?MESS * * ***** Formal Arguments *********************************** * * V Vector to be output, V = V(I), I = 1, N * N Number of vector components. * TEXT a variable length character type that gives a message to print. * LWIDTH Line width in characters. If this or any of the following * parameter are < 0, then current defaults set in MESS are used. * LUNIT Logical unit number. (0 prints to the standard output.) * NUMDIG Number of significant digits to print (Not used for integer). * * ******************** Parameter for interfacing to MESS ************* * */ /*++ Substitute for MACT1D below */ /*--I Next line special: I */ /*++ Code for {I} is active */ Mact1[2] = max( n, 0 ); /*++ Code for ~{I} is inactive * integer MEFVEC * parameter (MEFVEC=61) * data MACT1 / METDIG, 0, MEFVEC, 0, MERET / * MACT1(2) = max(0, NUMDIG) * MACT1(4) = max(N, 0) *++ End * */ k = 1; if (lwidth > 20) { Mact[1] = -MEMLIN; Mact[3] = MEMLIN; Mact[4] = lwidth; k = 5; } if (lunit >= 0) { Mact[k] = -MEMUNI; Mact[k + 2] = MEMUNI; Mact[k + 3] = lunit; k += 4; } Mact[k] = MECONT; if (k > 1) messft( mact, text ); /*++ Code for {I} is active */ mess( mact1, (char*)ttext,3, v ); /*++ Code for ~{I} is inactive * call IMESS(MACT1, TTEXT, MACT, V) *++ End */ if (Mact[1] < 0) { /* Restore MESS parameters to original state */ Mact[1] = -Mact[1]; Mact[3] = MERET; if (Mact[5] < 0) { Mact[3] = MEMUNI; Mact[4] = Mact[6]; Mact[5] = MERET; } mess( mact, (char*)ttext,3, mact ); } return; } /* end of function */