CC               *** emsalib.f ***CC  Subroutine library for EMSA spectra formatC  handling (Fortran version). This file containsCC  upcase : convert a character string to upper caseC  clen   : return length of character string less theC           trailling spacesCC  started 26-Sep-1990 Earl J. KirklandCCC---------------- UPCASE ----------------------CC  Convert a character string to upper case.C  This routine does not assume an ASCII collatingC  sequence (i.e. it will work with ASCII as wellC  as EBCDIC).CC  started 17-May-1989 Earl J. KirklandCC*  C    = input character variable to be convertedC  NLEN = integer whose value is the length of CCC  NOTE: NLEN is not strictly need (the intrinsicC    LEN could be used) but this crude way is slightlyC    less dependent on the specific compiler implementationC    (and mixing C and Fortran).CC  * = changed by this routineC        SUBROUTINE UPPER( C, NLEN )        IMPLICIT NONE        CHARACTER*(*) C        INTEGER NLEN, I, J         INTRINSIC INDEX        CHARACTER*26 CUP, CLOW        DATA CUP /'ABCDEFGHIJKLMNOPQRSTUVWXYZ' /        DATA CLOW /'abcdefghijklmnopqrstuvwxyz' /        DO 10 I = 1, NLEN           J = INDEX( CLOW, C(I:I) )           IF( J .GT. 0 ) C(I:I) = CUP(J:J)   10   CONTINUE        RETURN        ENDCC---------------- CLEN ----------------------CC  Return the length of a character string lessC  the trailing spaces.CC  started 26-Sep-1990 Earl J. KirklandCC  C    = input character stringC  NLEN = total length of character stringC* NC   = integer variable to get the length lessC           the trailing spacesCC  NOTE: NLEN is not strictly need (the intrinsicC    LEN could be used) but this crude way is slightlyC    less dependent on the specific compiler implementationC    (and mixing C and Fortran).CC  * = changed by this routineC        SUBROUTINE CLEN( C, NLEN, NC )        CHARACTER*(*) C        INTEGER NLEN, NC        NC = 0        DO 10 I = NLEN, 1, -1           IF( C(I:I) .NE. ' ') THEN              NC = I              GO TO 20           END IF   10   CONTINUE   20   CONTINUE        RETURN        END
