| 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 |
SUBROUTINE MXNSRT (NAME1, NEWLOC, NEWLEN, |
| 7 |
* DICT, DPOINT, LDICT, |
| 8 |
* NNAMES, CHRCOL, LASTER) |
| 9 |
|
| 10 |
IMPLICIT INTEGER (A-Z) |
| 11 |
INCLUDE 'params.inc' |
| 12 |
|
| 13 |
C This routine updates the dictionary with a new name (if it is new) |
| 14 |
C and updates the location and length tables. The length of the |
| 15 |
C dictionary is checked before the new name is added. If LASTER is |
| 16 |
C not returned with a value of SUCCESS, the tables are unchanged. |
| 17 |
|
| 18 |
C*********************************************************************** |
| 19 |
|
| 20 |
C NAME1 Name to be inserted |
| 21 |
CHARACTER*8 NAME1 |
| 22 |
C NEWLOC Location of storage |
| 23 |
C NEWLEN Length of storage |
| 24 |
C DICT Dictionary name table |
| 25 |
C DPOINT Dictionary pointer table |
| 26 |
C LDICT Dimensioned size of dictionary |
| 27 |
C NNAMES Number of entries in the dictionary |
| 28 |
CHARACTER*8 DICT(LDICT,CHRCOL) |
| 29 |
DIMENSION DPOINT(LDICT,CHRCOL,3), NNAMES(2) |
| 30 |
C CHRCOL Number of column for character names. |
| 31 |
C LASTER Error return |
| 32 |
|
| 33 |
C*********************************************************************** |
| 34 |
|
| 35 |
C IS THERE ROOM IN THE DICTIONARY? |
| 36 |
|
| 37 |
IF (NNAMES(1) .GE. LDICT) THEN |
| 38 |
LASTER = DFULL |
| 39 |
RETURN |
| 40 |
END IF |
| 41 |
|
| 42 |
C FIND NAME1 IN DICTIONARY |
| 43 |
|
| 44 |
CALL MXFIND (NAME1, DICT, DPOINT, LDICT, NNAMES, |
| 45 |
* CHRCOL, LASTER, ROW) |
| 46 |
IF (LASTER .EQ. WRTYPE) THEN |
| 47 |
RETURN |
| 48 |
ELSE IF (LASTER .EQ. SUCCESS) THEN |
| 49 |
LASTER = BDNAME |
| 50 |
RETURN |
| 51 |
ELSE IF (LASTER .EQ. NONAME) THEN |
| 52 |
LASTER = SUCCESS |
| 53 |
END IF |
| 54 |
|
| 55 |
C UPDATE DICTIONARY. |
| 56 |
|
| 57 |
CALL SHFTC (DICT, CHRCOL*LDICT, ROW, NNAMES(1), -1) |
| 58 |
CALL SHFTI (DPOINT, CHRCOL*LDICT, 3, ROW, NNAMES(1), -1) |
| 59 |
NNAMES(1) = NNAMES(1) + 1 |
| 60 |
DICT(ROW,1) = NAME1 |
| 61 |
DPOINT(ROW,1,1) = NEWLOC |
| 62 |
DPOINT(ROW,1,2) = NEWLEN |
| 63 |
DPOINT(ROW,1,3) = -1 |
| 64 |
RETURN |
| 65 |
END |