01:       SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO)
02: *
03: *  -- LAPACK auxiliary routine (version 3.2.1)                        --
04: *
05: *  -- April 2009   
06: *
07: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
08: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
09: *
10:       IMPLICIT NONE
11: *     .. Scalar Arguments ..
12:       INTEGER SRNAME_LEN, INFO
13: *     ..
14: *     .. Array Arguments ..
15:       CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
16: *     ..
17: *
18: *  Purpose
19: *  =======
20: *
21: *  XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK
22: *  and BLAS error handler.  Rather than taking a Fortran string argument
23: *  as the function's name, XERBLA_ARRAY takes an array of single
24: *  characters along with the array's length.  XERBLA_ARRAY then copies
25: *  up to 32 characters of that array into a Fortran string and passes
26: *  that to XERBLA.  If called with a non-positive SRNAME_LEN,
27: *  XERBLA_ARRAY will call XERBLA with a string of all blank characters.
28: *
29: *  Say some macro or other device makes XERBLA_ARRAY available to C99
30: *  by a name lapack_xerbla and with a common Fortran calling convention.
31: *  Then a C99 program could invoke XERBLA via:
32: *     {
33: *       int flen = strlen(__func__);
34: *       lapack_xerbla(__func__, &flen, &info);
35: *     }
36: *
37: *  Providing XERBLA_ARRAY is not necessary for intercepting LAPACK
38: *  errors.  XERBLA_ARRAY calls XERBLA.
39: *
40: *  Arguments
41: *  =========
42: *
43: *  SRNAME_ARRAY (input) CHARACTER(1) array, dimension (SRNAME_LEN)
44: *          The name of the routine which called XERBLA_ARRAY.
45: *
46: *  SRNAME_LEN (input) INTEGER
47: *          The length of the name in SRNAME_ARRAY.
48: *
49: *  INFO    (input) INTEGER
50: *          The position of the invalid parameter in the parameter list
51: *          of the calling routine.
52: *
53: * =====================================================================
54: *
55: *     ..
56: *     .. Local Scalars ..
57:       INTEGER I
58: *     ..
59: *     .. Local Arrays ..
60:       CHARACTER*32 SRNAME
61: *     ..
62: *     .. Intrinsic Functions ..
63:       INTRINSIC MIN, LEN
64: *     ..
65: *     .. External Functions ..
66:       EXTERNAL XERBLA
67: *     ..
68: *     .. Executable Statements ..
69:       SRNAME = ''
70:       DO I = 1, MIN( SRNAME_LEN, LEN( SRNAME ) )
71:          SRNAME( I:I ) = SRNAME_ARRAY( I )
72:       END DO
73: 
74:       CALL XERBLA( SRNAME, INFO )
75: 
76:       RETURN
77:       END
78: