Debian Codegraph @

packages/seacas/libraries/suplib/dberr.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
7 C=======================================================================
8 SUBROUTINE DBERR (IOSTAT, ERRMSG)
9 C=======================================================================
10
11 C --*** DBERR *** (EXOLIB) Display a database error message
12 C -- Written by Amy Gilkey - revised 02/27/86
13 C --
14 C --DBERR displays a database read error message.
15 C --
16 C --Parameters:
17 C -- IOSTAT - IN - the error status
18 C -- ERRMSG - IN/OUT - the item being read when the error occurred;
19 C -- compressed
20
21 C --Routines Called:
22 C -- SQZSTR - (STRLIB) Delete extra blanks from string
23
24 CHARACTER*(*) ERRMSG
25
26 CALL SQZSTR (ERRMSG, LSTR)
27 WRITE (*, 10000) ERRMSG(:LSTR)
28 IF (IOSTAT .LT. 0) THEN
29 WRITE (*, 10010) IOSTAT, 'Unexpected end of file'
30 ELSE IF (IOSTAT .EQ. 67) THEN
31 WRITE (*, 10010) IOSTAT, 'Input record is too short'
32 ELSE
33 WRITE (*, 10010) IOSTAT
34 END IF
35
36 RETURN
37
38 10000 FORMAT (/, ' DATABASE ERROR - Reading ', A)
39 10010 FORMAT (3X, ' FORTRAN Error #', I6, :, ' - ', A)
40 END