Debian Codegraph @

packages/seacas/libraries/supes/mem_mgr/mynsrt.f

raw
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 MYNSRT (NAME1, NEWLOC, NUMLEN, CLEN,
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 NUMLEN Numeric length of storage
24 C CLEN Character length of storage
25 C DICT Dictionary name table
26 C DPOINT Dictionary pointer table
27 C LDICT Dimensioned size of dictionary
28 C NNAMES Number of entries in the dictionary
29 CHARACTER*8 DICT(LDICT,CHRCOL)
30 DIMENSION DPOINT(LDICT,CHRCOL,3), NNAMES(2)
31 C CHRCOL Number of column for character names.
32 C LASTER Error return
33
34 C***********************************************************************
35
36 C IS THERE ROOM IN THE DICTIONARY?
37
38 IF (NNAMES(CHRCOL) .GE. LDICT) THEN
39 LASTER = DFULL
40 RETURN
41 END IF
42
43 C FIND NAME1 IN DICTIONARY
44
45 CALL MYFIND (NAME1, DICT, DPOINT, LDICT, NNAMES,
46 * CHRCOL, LASTER, ROW)
47 IF (LASTER .EQ. WRTYPE) THEN
48 RETURN
49 ELSE IF (LASTER .EQ. SUCCESS) THEN
50 LASTER = BDNAME
51 RETURN
52 ELSE IF (LASTER .EQ. NONAME) THEN
53 LASTER = SUCCESS
54 END IF
55
56 C UPDATE DICTIONARY.
57
58 CALL SHFTC (DICT(1,CHRCOL), CHRCOL*LDICT, ROW, NNAMES(CHRCOL), -1)
59 CALL SHFTI (DPOINT(1,CHRCOL,1), CHRCOL*LDICT, 3, ROW,
60 * NNAMES(CHRCOL), -1)
61 NNAMES(CHRCOL) = NNAMES(CHRCOL) + 1
62 DICT(ROW,CHRCOL) = NAME1
63 DPOINT(ROW,CHRCOL,1) = NEWLOC
64 DPOINT(ROW,CHRCOL,2) = NUMLEN
65 DPOINT(ROW,CHRCOL,3) = CLEN
66 RETURN
67 END