| 1 |
C Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
C NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
C |
| 5 |
C See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
C======================================================================= |
| 8 |
SUBROUTINE ABRSTR (RETWRD, ABBR, STRTBL) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** ABRSTR *** (STRLIB) Find abbreviation for string |
| 12 |
C -- Written by Amy Gilkey - revised 02/14/86 |
| 13 |
C -- |
| 14 |
C --ABRSTR returns the non-abbreviated form of the given abbreviation |
| 15 |
C --from the list of possible strings. The abbreviation must either |
| 16 |
C --be a complete string or it must only match one string. |
| 17 |
C -- |
| 18 |
C --Parameters: |
| 19 |
C -- RETWRD - OUT - the string for the abbreviation; ' ' if none |
| 20 |
C -- ABBR - IN - the abbreviation |
| 21 |
C -- STRTBL - IN - the table of possible strings; ended by ' ' |
| 22 |
|
| 23 |
CHARACTER*(*) RETWRD |
| 24 |
CHARACTER*(*) ABBR |
| 25 |
CHARACTER*(*) STRTBL(*) |
| 26 |
|
| 27 |
RETWRD = ' ' |
| 28 |
|
| 29 |
IF (ABBR .EQ. ' ') RETURN |
| 30 |
|
| 31 |
L = INDEX (ABBR, ' ') - 1 |
| 32 |
IF (L .LT. 0) L = LEN(ABBR) |
| 33 |
|
| 34 |
NFOUND = 0 |
| 35 |
I = 1 |
| 36 |
100 CONTINUE |
| 37 |
IF (STRTBL(I) .NE. ' ') THEN |
| 38 |
IF (ABBR .EQ. STRTBL(I)(1:L)) THEN |
| 39 |
RETWRD = STRTBL(I) |
| 40 |
IF (ABBR .EQ. STRTBL(I)) GOTO 110 |
| 41 |
NFOUND = NFOUND + 1 |
| 42 |
END IF |
| 43 |
I = I + 1 |
| 44 |
GOTO 100 |
| 45 |
END IF |
| 46 |
|
| 47 |
IF (NFOUND .GT. 1) RETWRD = ' ' |
| 48 |
|
| 49 |
110 CONTINUE |
| 50 |
RETURN |
| 51 |
END |