--- R-2.10.1/src/modules/lapack/dlamch.f.orig	Sat Sep 22 04:05:06 2007
+++ R-2.10.1/src/modules/lapack/dlamch.f	Sat Dec 19 02:33:08 2009
@@ -54,10 +54,6 @@
       DOUBLE PRECISION   BASE, EMAX, EMIN, EPS, PREC, RMACH, RMAX, RMIN,
      $                   RND, SFMIN, SMALL, T
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLAMC2
 *     ..
--- R-2.10.1/src/modules/lapack/dlapack0.f.orig	Mon Mar 26 18:42:12 2007
+++ R-2.10.1/src/modules/lapack/dlapack0.f	Sat Dec 19 03:14:55 2009
@@ -70,12 +70,11 @@
       DOUBLE PRECISION   BIGNUM, EPS, SMLNUM, TEMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLASWP, DSCAL
+      EXTERNAL           DLASWP
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           IDAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS
@@ -201,9 +200,6 @@
       INTEGER            I, IP, IPV, J, JP, JPV
       DOUBLE PRECISION   BIGNUM, EPS, SMIN, SMLNUM, XMAX
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DGER, DSWAP
-*     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH
       EXTERNAL           DLAMCH
@@ -671,7 +667,7 @@
       INTEGER            I
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DLARFG, DSCAL
+      EXTERNAL           DLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
@@ -890,14 +886,6 @@
       INTEGER            I, ITER, J, JLAST, JUMP
       DOUBLE PRECISION   ALTSGN, ESTOLD, TEMP
 *     ..
-*     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM
-      EXTERNAL           IDAMAX, DASUM
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           DCOPY
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, NINT, SIGN
 *     ..
@@ -1076,10 +1064,6 @@
 *     .. Local Scalars ..
       INTEGER            I, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
 *     ..
@@ -1947,12 +1931,11 @@
      $                   W1, X, XI, XR, Y
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM, DLAPY2, DNRM2
-      EXTERNAL           IDAMAX, DASUM, DLAPY2, DNRM2
+      DOUBLE PRECISION   DLAPY2
+      EXTERNAL           DLAPY2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLADIV, DLATRS, DSCAL
+      EXTERNAL           DLADIV, DLATRS
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, MAX, SQRT
@@ -2641,8 +2624,7 @@
       EXTERNAL           DLAMCH, DLANGE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLACPY, DLANV2, DLARFG, DLARFX, DLARTG, DLASY2,
-     $                   DROT
+      EXTERNAL           DLACPY, DLANV2, DLARFG, DLARFX, DLARTG, DLASY2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
@@ -3551,10 +3533,6 @@
 *     .. Local Scalars ..
       INTEGER            I, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
       IF( N.EQ.0 )
@@ -4063,7 +4041,7 @@
      $                   WR2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLAG2, DLARTG, DLASV2, DROT
+      EXTERNAL           DLAG2, DLARTG, DLASV2
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH, DLAPY2
@@ -4400,7 +4378,7 @@
       EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLABAD, DLANV2, DLARFG, DROT
+      EXTERNAL           DLABAD, DLANV2, DLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, MAX, MIN, SQRT
@@ -4864,7 +4842,7 @@
       DOUBLE PRECISION   EI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMV, DLARFG, DSCAL, DTRMV
+      EXTERNAL           DLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
@@ -5047,8 +5025,8 @@
       INTRINSIC          ABS, MAX, SIGN, SQRT
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DDOT, DLAMCH
-      EXTERNAL           DDOT, DLAMCH
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -5840,10 +5818,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
@@ -5987,10 +5961,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
@@ -6123,10 +6093,6 @@
       INTEGER            I
       DOUBLE PRECISION   ANORM, SCALE, SUM
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
@@ -6269,10 +6235,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
@@ -6424,10 +6386,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
@@ -6602,10 +6560,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
 *     ..
@@ -6784,10 +6738,6 @@
       INTEGER            I
       DOUBLE PRECISION   ANORM, SCALE, SUM
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
@@ -6927,10 +6877,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
 *     ..
@@ -7112,10 +7058,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
@@ -7387,10 +7329,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
 *     ..
@@ -7682,10 +7620,6 @@
 *     .. External Subroutines ..
       EXTERNAL           DLASSQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
@@ -7920,12 +7854,8 @@
 *     .. Local Scalars ..
       DOUBLE PRECISION   A11, A12, A22, C, SSMAX, TAU
 *     ..
-*     .. External Functions ..
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           DDOT
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DLARFG, DLAS2
+      EXTERNAL           DLARFG, DLAS2
 *     ..
 *     .. Executable Statements ..
 *
@@ -8615,15 +8545,14 @@
       DOUBLE PRECISION   AII, TEMP, TEMP2, TOL3Z
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARF, DLARFG, DSWAP
+      EXTERNAL           DLARF, DLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DLAMCH, DNRM2
-      EXTERNAL           IDAMAX, DLAMCH, DNRM2
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -8806,15 +8735,14 @@
       DOUBLE PRECISION   AKK, TEMP, TEMP2, TOL3Z
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DGEMV, DLARFG, DSWAP
+      EXTERNAL           DLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, MAX, MIN, NINT, SQRT
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DLAMCH, DNRM2
-      EXTERNAL           IDAMAX, DLAMCH, DNRM2
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -9049,9 +8977,8 @@
       DOUBLE PRECISION   CJ, LARGE, SMALL
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -9188,9 +9115,8 @@
       DOUBLE PRECISION   CJ, LARGE, SMALL
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -9333,9 +9259,8 @@
       DOUBLE PRECISION   CJ, LARGE, SMALL
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -9503,12 +9428,11 @@
       DOUBLE PRECISION   D( 2, 2 ), V( 2, 2 )
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM, DDOT, DLAMCH, DLANGE
-      EXTERNAL           IDAMAX, DASUM, DDOT, DLAMCH, DLANGE
+      DOUBLE PRECISION   DLAMCH, DLANGE
+      EXTERNAL           DLAMCH, DLANGE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DLADIV, DLALN2, DSCAL
+      EXTERNAL           DLADIV, DLALN2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
@@ -10579,13 +10503,6 @@
       DOUBLE PRECISION   ONE, ZERO
       PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DGEMV, DGER
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
       IF( LSAME( SIDE, 'L' ) ) THEN
@@ -10722,13 +10639,6 @@
       CHARACTER          TRANST
       INTEGER            I, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMM, DTRMM
-*     ..
 *     .. Executable Statements ..
 *
 *     Quick return if possible
@@ -11280,15 +11190,12 @@
       DOUBLE PRECISION   BETA, RSAFMN, SAFMIN, XNORM
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMCH, DLAPY2, DNRM2
-      EXTERNAL           DLAMCH, DLAPY2, DNRM2
+      DOUBLE PRECISION   DLAMCH, DLAPY2
+      EXTERNAL           DLAMCH, DLAPY2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, SIGN
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DSCAL
-*     ..
 *     .. Executable Statements ..
 *
       IF( N.LE.1 ) THEN
@@ -11460,13 +11367,6 @@
       INTEGER            I, J
       DOUBLE PRECISION   VII
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DGEMV, DTRMV
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
 *     Quick return if possible
@@ -11639,13 +11539,6 @@
       DOUBLE PRECISION   SUM, T1, T10, T2, T3, T4, T5, T6, T7, T8, T9,
      $                   V1, V10, V2, V3, V4, V5, V6, V7, V8, V9
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           DGEMV, DGER
-*     ..
 *     .. Executable Statements ..
 *
       IF( TAU.EQ.ZERO )
@@ -12924,13 +12817,12 @@
       INTEGER            ISEED( 4 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION            DLAMCH
-      EXTERNAL           DLAMCH, LSAME
+      EXTERNAL           DLAMCH
 
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLARNV, DLARRA, DLARRB, DLARRC, DLARRD,
+      EXTERNAL           DLARNV, DLARRA, DLARRB, DLARRC, DLARRD,
      $                   DLASQ2
 *     ..
 *     .. Intrinsic Functions ..
@@ -13581,9 +13473,6 @@
       DOUBLE PRECISION   DLAMCH
       EXTERNAL           DISNAN, DLAMCH
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DCOPY
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS
 *     ..
@@ -14033,12 +13922,10 @@
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION  DLAMCH
-      DOUBLE PRECISION   DDOT, DNRM2
-      EXTERNAL           DDOT, DLAMCH, DNRM2
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLAR1V, DLARRB, DLARRF, DLASET,
-     $                   DSCAL
+      EXTERNAL           DLAR1V, DLARRB, DLARRF, DLASET
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC ABS, DBLE, MAX, MIN
@@ -15546,9 +15433,8 @@
       DOUBLE PRECISION   BIGNUM, CFROM1, CFROMC, CTO1, CTOC, MUL, SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -16375,7 +16261,7 @@
       EXTERNAL           DLAMCH, DLAPY2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLACPY, DLAMRG, DLASET, DROT, XERBLA
+      EXTERNAL           DLACPY, DLAMRG, DLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
@@ -16844,11 +16730,11 @@
       DOUBLE PRECISION   RHO, TEMP
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMC3, DNRM2
-      EXTERNAL           DLAMC3, DNRM2
+      DOUBLE PRECISION   DLAMC3
+      EXTERNAL           DLAMC3
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMM, DLACPY, DLASCL, DLASD4, XERBLA
+      EXTERNAL           DLACPY, DLASCL, DLASD4, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, SIGN, SQRT
@@ -18325,7 +18211,7 @@
       DOUBLE PRECISION   ORGNRM
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLAMRG, DLASCL, DLASD7, DLASD8, XERBLA
+      EXTERNAL           DLAMRG, DLASCL, DLASD7, DLASD8, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
@@ -18595,7 +18481,7 @@
       DOUBLE PRECISION   EPS, HLFTOL, TAU, TOL, Z1
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLAMRG, DROT, XERBLA
+      EXTERNAL           DLAMRG, XERBLA
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH, DLAPY2
@@ -18966,11 +18852,11 @@
       DOUBLE PRECISION   DIFLJ, DIFRJ, DJ, DSIGJ, DSIGJP, RHO, TEMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLASCL, DLASD4, DLASET, XERBLA
+      EXTERNAL           DLASCL, DLASD4, DLASET, XERBLA
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DDOT, DLAMC3, DNRM2
-      EXTERNAL           DDOT, DLAMC3, DNRM2
+      DOUBLE PRECISION   DLAMC3
+      EXTERNAL           DLAMC3
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, SIGN, SQRT
@@ -19221,11 +19107,11 @@
      $                   TEMP
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DDOT, DLAMC3, DNRM2
-      EXTERNAL           DDOT, DLAMC3, DNRM2
+      DOUBLE PRECISION   DLAMC3
+      EXTERNAL           DLAMC3
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLASCL, DLASD4, DLASET, XERBLA
+      EXTERNAL           DLASCL, DLASD4, DLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, SIGN, SQRT
@@ -19552,7 +19438,7 @@
       DOUBLE PRECISION   ALPHA, BETA
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLASD6, DLASDQ, DLASDT, DLASET, XERBLA
+      EXTERNAL           DLASD6, DLASDQ, DLASDT, DLASET, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
@@ -19902,12 +19788,8 @@
       DOUBLE PRECISION   CS, R, SMIN, SN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DBDSQR, DLARTG, DLASR, DSWAP, XERBLA
+      EXTERNAL           DBDSQR, DLARTG, DLASR, XERBLA
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
@@ -20242,10 +20124,6 @@
 *     .. Local Scalars ..
       INTEGER            I, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
 *     ..
@@ -21438,10 +21316,6 @@
       INTEGER            I, INFO, J
       DOUBLE PRECISION   CTEMP, STEMP, TEMP
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA
 *     ..
@@ -22219,13 +22093,9 @@
       DOUBLE PRECISION   BTMP( 4 ), T16( 4, 4 ), TMP( 4 ), X2( 2 )
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           IDAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DCOPY, DSWAP
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
@@ -22594,14 +22464,6 @@
       DOUBLE PRECISION   ABSAKK, ALPHA, COLMAX, D11, D21, D22, R1,
      $                   ROWMAX, T
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
-      EXTERNAL           LSAME, IDAMAX
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMM, DGEMV, DSCAL, DSWAP
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
@@ -23256,13 +23118,11 @@
      $                   TMAX, TSCAL, USCAL, XBND, XJ, XMAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM, DDOT, DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DASUM, DDOT, DLAMCH
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DSCAL, DTBSV, XERBLA
+      EXTERNAL           DTBSV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -23915,13 +23775,8 @@
       DOUBLE PRECISION   WORK( 4*MAXDIM ), XM( MAXDIM ), XP( MAXDIM )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGECON, DGESC2, DLASSQ, DLASWP,
-     $                   DSCAL
+      EXTERNAL           DGECON, DGESC2, DLASSQ, DLASWP
 *     ..
-*     .. External Functions ..
-      DOUBLE PRECISION   DASUM, DDOT
-      EXTERNAL           DASUM, DDOT
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, SQRT
 *     ..
@@ -24209,13 +24064,11 @@
      $                   TMAX, TSCAL, USCAL, XBND, XJ, XMAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM, DDOT, DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DASUM, DDOT, DLAMCH
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DSCAL, DTPSV, XERBLA
+      EXTERNAL           DTPSV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -24892,13 +24745,8 @@
       DOUBLE PRECISION   ALPHA
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DGEMV, DLARFG, DSCAL, DSYMV
+      EXTERNAL           DLARFG
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
 *     ..
@@ -25185,13 +25033,11 @@
      $                   TMAX, TSCAL, USCAL, XBND, XJ, XMAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM, DDOT, DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DASUM, DDOT, DLAMCH
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DSCAL, DTRSV, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -25770,13 +25616,8 @@
       INTEGER            I
       DOUBLE PRECISION   AII
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DSCAL, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -25905,12 +25746,11 @@
       INTEGER            I, IB, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLAUU2, DSYRK, DTRMM, XERBLA
+      EXTERNAL           DLAUU2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -26048,9 +25888,6 @@
       DOUBLE PRECISION   DLAMCH
       EXTERNAL           DLAMCH
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DSCAL
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS
 *     ..
@@ -26270,9 +26107,9 @@
       EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DGEQR2, DGERQ2, DLACPY, DLAGV2, DLARTG,
+      EXTERNAL           DGEQR2, DGERQ2, DLACPY, DLAGV2, DLARTG,
      $                   DLASET, DLASSQ, DORG2R, DORGR2, DORM2R, DORMR2,
-     $                   DROT, DSCAL, DTGSY2
+     $                   DTGSY2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
@@ -26884,13 +26721,9 @@
       INTEGER            IPIV( LDZ ), JPIV( LDZ )
       DOUBLE PRECISION   RHS( LDZ ), Z( LDZ, LDZ )
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMM, DGEMV, DGER, DGESC2,
-     $                   DGETC2, DLASET, DLATDF, DSCAL, XERBLA
+      EXTERNAL           DGESC2,
+     $                   DGETC2, DLASET, DLATDF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
--- R-2.10.1/src/modules/lapack/dlapack1.f.orig	Mon Mar 26 18:42:12 2007
+++ R-2.10.1/src/modules/lapack/dlapack1.f	Sat Dec 19 03:45:07 2009
@@ -413,12 +413,11 @@
      $                   ROWCND, RPVGRW, SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANGB, DLANTB
-      EXTERNAL           LSAME, DLAMCH, DLANGB, DLANTB
+      EXTERNAL           DLAMCH, DLANGB, DLANTB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGBCON, DGBEQU, DGBRFS, DGBTRF, DGBTRS,
+      EXTERNAL           DGBCON, DGBEQU, DGBRFS, DGBTRF, DGBTRS,
      $                   DLACPY, DLAQGB, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -807,14 +806,13 @@
       DOUBLE PRECISION   DUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLACPY,
-     $                   DLABAD, DLASCL, DORGHR, DSWAP, DTRSEN, XERBLA
+      EXTERNAL           DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLACPY,
+     $                   DLABAD, DLASCL, DORGHR, DTRSEN, XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, SQRT
@@ -1290,14 +1288,13 @@
       DOUBLE PRECISION   DUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLACPY,
-     $                   DLASCL, DORGHR, DSWAP, DTRSEN, XERBLA
+      EXTERNAL           DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLACPY,
+     $                   DLASCL, DORGHR, DTRSEN, XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLABAD, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLABAD, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, SQRT
@@ -1746,15 +1743,13 @@
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLABAD, DLACPY,
-     $                   DLARTG, DLASCL, DORGHR, DROT, DSCAL, DTREVC,
+     $                   DLARTG, DLASCL, DORGHR, DTREVC,
      $                   XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX, ILAENV
-      DOUBLE PRECISION   DLAMCH, DLANGE, DLAPY2, DNRM2
-      EXTERNAL           LSAME, IDAMAX, ILAENV, DLAMCH, DLANGE, DLAPY2,
-     $                   DNRM2
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, DLANGE, DLAPY2
+      EXTERNAL           ILAENV, DLAMCH, DLANGE, DLAPY2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, SQRT
@@ -2255,15 +2250,13 @@
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLABAD, DLACPY,
-     $                   DLARTG, DLASCL, DORGHR, DROT, DSCAL, DTREVC,
+     $                   DLARTG, DLASCL, DORGHR, DTREVC,
      $                   DTRSNA, XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX, ILAENV
-      DOUBLE PRECISION   DLAMCH, DLANGE, DLAPY2, DNRM2
-      EXTERNAL           LSAME, IDAMAX, ILAENV, DLAMCH, DLANGE, DLAPY2,
-     $                   DNRM2
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, DLANGE, DLAPY2
+      EXTERNAL           ILAENV, DLAMCH, DLANGE, DLAPY2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, SQRT
@@ -2753,10 +2746,9 @@
      $                   DLASCL, DLASET, DORGQR, DORMQR, XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          INT, MAX
@@ -3274,10 +3266,9 @@
      $                   DLASCL, DLASET, DORGQR, DORMQR, DTGEVC, XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, INT, MAX
@@ -3827,10 +3818,9 @@
       DOUBLE PRECISION   RWORK( 1 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLABAD, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLABAD, DLAMCH, DLANGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGELQF, DGEQRF, DLASCL, DLASET, DORMLQ, DORMQR,
@@ -4762,7 +4752,7 @@
       DOUBLE PRECISION   VDUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DBDSQR, DCOPY, DGEBRD, DGELQF, DGEMM, DGEMV,
+      EXTERNAL           DBDSQR, DGEBRD, DGELQF,
      $                   DGEQRF, DLABAD, DLACPY, DLASCL, DLASET, DORGBR,
      $                   DORMBR, DORMLQ, DORMQR, DRSCL, XERBLA
 *     ..
@@ -5391,7 +5381,7 @@
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGEQPF, DLAIC1, DLASCL, DLASET, DLATZM, DORM2R,
-     $                   DTRSM, DTZRQF, XERBLA
+     $                   DTZRQF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -5765,8 +5755,8 @@
       EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEQP3, DLABAD, DLAIC1, DLASCL, DLASET,
-     $                   DORMQR, DORMRZ, DTRSM, DTZRZF, XERBLA
+      EXTERNAL           DGEQP3, DLABAD, DLAIC1, DLASCL, DLASET,
+     $                   DORMQR, DORMRZ, DTZRZF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -6164,15 +6154,14 @@
       DOUBLE PRECISION   DUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DBDSDC, DGEBRD, DGELQF, DGEMM, DGEQRF, DLACPY,
+      EXTERNAL           DBDSDC, DGEBRD, DGELQF, DGEQRF, DLACPY,
      $                   DLASCL, DLASET, DORGBR, DORGLQ, DORGQR, DORMBR,
      $                   XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           DLAMCH, DLANGE, ILAENV, LSAME
+      EXTERNAL           DLAMCH, DLANGE, ILAENV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          INT, MAX, MIN, SQRT
@@ -7600,15 +7589,14 @@
       DOUBLE PRECISION   DUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DBDSQR, DGEBRD, DGELQF, DGEMM, DGEQRF, DLACPY,
+      EXTERNAL           DBDSQR, DGEBRD, DGELQF, DGEQRF, DLACPY,
      $                   DLASCL, DLASET, DORGBR, DORGLQ, DORGQR, DORMBR,
      $                   XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -11109,9 +11097,8 @@
      $                   ROWCND, RPVGRW, SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANGE, DLANTR
-      EXTERNAL           LSAME, DLAMCH, DLANGE, DLANTR
+      EXTERNAL           DLAMCH, DLANGE, DLANTR
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGECON, DGEEQU, DGERFS, DGETRF, DGETRS, DLACPY,
@@ -11538,10 +11525,9 @@
      $                   XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
@@ -12160,10 +12146,9 @@
      $                   XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
@@ -12728,10 +12713,9 @@
      $                   XERBLA
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
@@ -13341,10 +13325,9 @@
      $                   DTGSNA, XERBLA 
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANGE
+      EXTERNAL           ILAENV, DLAMCH, DLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
@@ -13894,7 +13877,7 @@
      $                   NB4, NP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMV, DGGQRF, DORMQR, DORMRQ, DTRTRS,
+      EXTERNAL           DGGQRF, DORMQR, DORMRQ, DTRTRS,
      $                   XERBLA
 *     ..
 *     .. External Functions ..
@@ -14149,8 +14132,8 @@
      $                   NB4, NR
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMV, DGGRQF, DORMQR, DORMRQ,
-     $                   DTRMV, DTRTRS, XERBLA
+      EXTERNAL           DGGRQF, DORMQR, DORMRQ,
+     $                   DTRTRS, XERBLA
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
@@ -14527,12 +14510,11 @@
       DOUBLE PRECISION   ANORM, BNORM, SMAX, TEMP, TOLA, TOLB, ULP, UNFL
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           LSAME, DLAMCH, DLANGE
+      EXTERNAL           DLAMCH, DLANGE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGGSVP, DTGSJA, XERBLA
+      EXTERNAL           DGGSVP, DTGSJA, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -14939,10 +14921,6 @@
 *
 *  =====================================================================
 *
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DPBTRF, DPBTRS, XERBLA
 *     ..
@@ -15238,12 +15216,11 @@
       DOUBLE PRECISION   AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSB
-      EXTERNAL           LSAME, DLAMCH, DLANSB
+      EXTERNAL           DLAMCH, DLANSB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLACPY, DLAQSB, DPBCON, DPBEQU, DPBRFS,
+      EXTERNAL           DLACPY, DLAQSB, DPBCON, DPBEQU, DPBRFS,
      $                   DPBTRF, DPBTRS, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -15484,10 +15461,6 @@
 *
 *  =====================================================================
 *
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DPOTRF, DPOTRS, XERBLA
 *     ..
@@ -15751,9 +15724,8 @@
       DOUBLE PRECISION   AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, DLAMCH, DLANSY
+      EXTERNAL           DLAMCH, DLANSY
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACPY, DLAQSY, DPOCON, DPOEQU, DPORFS, DPOTRF,
@@ -15996,10 +15968,6 @@
 *
 *  =====================================================================
 *
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DPPTRF, DPPTRS, XERBLA
 *     ..
@@ -16269,12 +16237,11 @@
       DOUBLE PRECISION   AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSP
-      EXTERNAL           LSAME, DLAMCH, DLANSP
+      EXTERNAL           DLAMCH, DLANSP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLACPY, DLAQSP, DPPCON, DPPEQU, DPPRFS,
+      EXTERNAL           DLACPY, DLAQSP, DPPCON, DPPEQU, DPPRFS,
      $                   DPPTRF, DPPTRS, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -16513,12 +16480,11 @@
      $                   SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSB
-      EXTERNAL           LSAME, DLAMCH, DLANSB
+      EXTERNAL           DLAMCH, DLANSB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLASCL, DSBTRD, DSCAL, DSTEQR, DSTERF, XERBLA
+      EXTERNAL           DLASCL, DSBTRD, DSTEQR, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          SQRT
@@ -16757,12 +16723,11 @@
      $                   SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSB
-      EXTERNAL           LSAME, DLAMCH, DLANSB
+      EXTERNAL           DLAMCH, DLANSB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLACPY, DLASCL, DSBTRD, DSCAL, DSTEDC,
+      EXTERNAL           DLACPY, DLASCL, DSBTRD, DSTEDC,
      $                   DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -17065,13 +17030,12 @@
      $                   SIGMA, SMLNUM, TMP1, VLL, VUU
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSB
-      EXTERNAL           LSAME, DLAMCH, DLANSB
+      EXTERNAL           DLAMCH, DLANSB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMV, DLACPY, DLASCL, DSBTRD, DSCAL,
-     $                   DSTEBZ, DSTEIN, DSTEQR, DSTERF, DSWAP, XERBLA
+      EXTERNAL           DLACPY, DLASCL, DSBTRD,
+     $                   DSTEBZ, DSTEIN, DSTEQR, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -17417,10 +17381,6 @@
       CHARACTER          VECT
       INTEGER            IINFO, INDE, INDWRK
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DPBSTF, DSBGST, DSBTRD, DSTEQR, DSTERF, XERBLA
 *     ..
@@ -17652,12 +17612,8 @@
       INTEGER            IINFO, INDE, INDWK2, INDWRK, LIWMIN, LLWRK2,
      $                   LWMIN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLACPY, DPBSTF, DSBGST, DSBTRD, DSTEDC,
+      EXTERNAL           DLACPY, DPBSTF, DSBGST, DSBTRD, DSTEDC,
      $                   DSTERF, XERBLA
 *     ..
 *     .. Executable Statements ..
@@ -17953,13 +17909,9 @@
      $                   INDIWO, INDWRK, ITMP1, J, JJ, NSPLIT
       DOUBLE PRECISION   TMP1
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMV, DLACPY, DPBSTF, DSBGST, DSBTRD,
-     $                   DSTEBZ, DSTEIN, DSTEQR, DSTERF, DSWAP, XERBLA
+      EXTERNAL           DLACPY, DPBSTF, DSBGST, DSBTRD,
+     $                   DSTEBZ, DSTEIN, DSTEQR, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
@@ -18232,12 +18184,11 @@
      $                   SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSP
-      EXTERNAL           LSAME, DLAMCH, DLANSP
+      EXTERNAL           DLAMCH, DLANSP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DOPGTR, DSCAL, DSPTRD, DSTEQR, DSTERF, XERBLA
+      EXTERNAL           DOPGTR, DSPTRD, DSTEQR, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          SQRT
@@ -18459,12 +18410,11 @@
      $                   SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSP
-      EXTERNAL           LSAME, DLAMCH, DLANSP
+      EXTERNAL           DLAMCH, DLANSP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DOPMTR, DSCAL, DSPTRD, DSTEDC, DSTERF, XERBLA
+      EXTERNAL           DOPMTR, DSPTRD, DSTEDC, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          SQRT
@@ -18740,13 +18690,12 @@
      $                   SIGMA, SMLNUM, TMP1, VLL, VUU
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSP
-      EXTERNAL           LSAME, DLAMCH, DLANSP
+      EXTERNAL           DLAMCH, DLANSP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DOPGTR, DOPMTR, DSCAL, DSPTRD, DSTEBZ,
-     $                   DSTEIN, DSTEQR, DSTERF, DSWAP, XERBLA
+      EXTERNAL           DOPGTR, DOPMTR, DSPTRD, DSTEBZ,
+     $                   DSTEIN, DSTEQR, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -19070,10 +19019,6 @@
       CHARACTER          TRANS
       INTEGER            J, NEIG
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DPPTRF, DSPEV, DSPGST, DTPMV, DTPSV, XERBLA
 *     ..
@@ -19310,10 +19255,6 @@
       CHARACTER          TRANS
       INTEGER            J, LIWMIN, LWMIN, NEIG
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DPPTRF, DSPEVD, DSPGST, DTPMV, DTPSV, XERBLA
 *     ..
@@ -19613,10 +19554,6 @@
       CHARACTER          TRANS
       INTEGER            J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DPPTRF, DSPEVX, DSPGST, DTPMV, DTPSV, XERBLA
 *     ..
@@ -19837,10 +19774,6 @@
 *
 *  =====================================================================
 *
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DSPTRF, DSPTRS, XERBLA
 *     ..
@@ -20078,12 +20011,11 @@
       DOUBLE PRECISION   ANORM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANSP
-      EXTERNAL           LSAME, DLAMCH, DLANSP
+      EXTERNAL           DLAMCH, DLANSP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLACPY, DSPCON, DSPRFS, DSPTRF, DSPTRS,
+      EXTERNAL           DLACPY, DSPCON, DSPRFS, DSPTRF, DSPTRS,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -20294,14 +20226,13 @@
       DOUBLE PRECISION   EPS, ORGNRM, P, TINY
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANST
+      EXTERNAL           ILAENV, DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLACPY, DLAED0, DLASCL, DLASET, DLASRT,
-     $                   DSTEQR, DSTERF, DSWAP, XERBLA
+      EXTERNAL           DLACPY, DLAED0, DLASCL, DLASET, DLASRT,
+     $                   DSTEQR, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, INT, LOG, MAX, MOD, SQRT
@@ -20637,12 +20568,11 @@
      $                   TNRM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           LSAME, DLAMCH, DLANST
+      EXTERNAL           DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSTEQR, DSTERF, XERBLA
+      EXTERNAL           DSTEQR, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          SQRT
@@ -20837,12 +20767,11 @@
      $                   TNRM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           LSAME, DLAMCH, DLANST
+      EXTERNAL           DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSTEDC, DSTERF, XERBLA
+      EXTERNAL           DSTEDC, DSTERF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          SQRT
@@ -21165,14 +21094,13 @@
      $                   TMP1, TNRM, VLL, VUU
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANST
+      EXTERNAL           ILAENV, DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DSCAL, DSTEBZ, DSTEMR, DSTEIN, DSTERF,
-     $                   DSWAP, XERBLA
+      EXTERNAL           DSTEBZ, DSTEMR, DSTEIN, DSTERF,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -21554,13 +21482,12 @@
      $                   TMP1, TNRM, VLL, VUU
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           LSAME, DLAMCH, DLANST
+      EXTERNAL           DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DSCAL, DSTEBZ, DSTEIN, DSTEQR, DSTERF,
-     $                   DSWAP, XERBLA
+      EXTERNAL           DSTEBZ, DSTEIN, DSTEQR, DSTERF,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -21845,13 +21772,12 @@
      $                   SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANSY
+      EXTERNAL           ILAENV, DLAMCH, DLANSY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLASCL, DORGTR, DSCAL, DSTEQR, DSTERF, DSYTRD,
+      EXTERNAL           DLASCL, DORGTR, DSTEQR, DSTERF, DSYTRD,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -22102,13 +22028,12 @@
      $                   SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, DLAMCH, DLANSY, ILAENV
+      EXTERNAL           DLAMCH, DLANSY, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLACPY, DLASCL, DORMTR, DSCAL, DSTEDC, DSTERF,
+      EXTERNAL           DLACPY, DLASCL, DORMTR, DSTEDC, DSTERF,
      $                   DSYTRD, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -22489,14 +22414,13 @@
      $                   SIGMA, SMLNUM, TMP1, VLL, VUU
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANSY
+      EXTERNAL           ILAENV, DLAMCH, DLANSY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DORMTR, DSCAL, DSTEBZ, DSTEMR, DSTEIN,
-     $                   DSTERF, DSWAP, DSYTRD, XERBLA
+      EXTERNAL           DORMTR, DSTEBZ, DSTEMR, DSTEIN,
+     $                   DSTERF, DSYTRD, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -22963,14 +22887,13 @@
      $                   SIGMA, SMLNUM, TMP1, VLL, VUU
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANSY
+      EXTERNAL           ILAENV, DLAMCH, DLANSY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLACPY, DORGTR, DORMTR, DSCAL, DSTEBZ,
-     $                   DSTEIN, DSTEQR, DSTERF, DSWAP, DSYTRD, XERBLA
+      EXTERNAL           DLACPY, DORGTR, DORMTR, DSTEBZ,
+     $                   DSTEIN, DSTEQR, DSTERF, DSYTRD, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -23346,12 +23269,11 @@
       INTEGER            LWKMIN, LWKOPT, NB, NEIG
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DPOTRF, DSYEV, DSYGST, DTRMM, DTRSM, XERBLA
+      EXTERNAL           DPOTRF, DSYEV, DSYGST, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -23614,12 +23536,8 @@
       CHARACTER          TRANS
       INTEGER            LIOPT, LIWMIN, LOPT, LWMIN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DPOTRF, DSYEVD, DSYGST, DTRMM, DTRSM, XERBLA
+      EXTERNAL           DPOTRF, DSYEVD, DSYGST, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, MAX
@@ -23935,12 +23853,11 @@
       INTEGER            LWKMIN, LWKOPT, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DPOTRF, DSYEVX, DSYGST, DTRMM, DTRSM, XERBLA
+      EXTERNAL           DPOTRF, DSYEVX, DSYGST, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -24182,9 +24099,8 @@
       INTEGER            LWKOPT, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DSYTRF, DSYTRS, XERBLA
@@ -24445,10 +24361,9 @@
       DOUBLE PRECISION   ANORM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANSY
+      EXTERNAL           ILAENV, DLAMCH, DLANSY
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACPY, DSYCON, DSYRFS, DSYTRF, DSYTRS, XERBLA
--- R-2.10.1/src/modules/lapack/dlapack2.f.orig	Sat Dec 19 03:46:02 2009
+++ R-2.10.1/src/modules/lapack/dlapack2.f	Sat Dec 19 04:11:15 2009
@@ -145,14 +145,13 @@
       DOUBLE PRECISION   CS, EPS, ORGNRM, P, R, SN
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANST
+      EXTERNAL           ILAENV, DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLARTG, DLASCL, DLASD0, DLASDA, DLASDQ,
-     $                   DLASET, DLASR, DSWAP, XERBLA
+      EXTERNAL           DLARTG, DLASCL, DLASD0, DLASDA, DLASDQ,
+     $                   DLASET, DLASR, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, INT, LOG, SIGN
@@ -599,13 +598,12 @@
      $                   SN, THRESH, TOL, TOLMUL, UNFL
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARTG, DLAS2, DLASQ1, DLASR, DLASV2, DROT,
-     $                   DSCAL, DSWAP, XERBLA
+      EXTERNAL           DLARTG, DLAS2, DLASQ1, DLASR, DLASV2,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, MAX, MIN, SIGN, SQRT
@@ -1247,9 +1245,8 @@
       DOUBLE PRECISION   ANORM, EPS, NEWGAP, OLDGAP, SAFMIN, THRESH
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -1460,15 +1457,11 @@
       DOUBLE PRECISION   RA, RB, RC, RS
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARGV, DLARTG, DLARTV, DLASET, DROT, XERBLA
+      EXTERNAL           DLARGV, DLARTG, DLARTV, DLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters
@@ -1885,13 +1878,11 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DDOT, DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DDOT, DLAMCH
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DLACN2, DLATBS, DRSCL, XERBLA
+      EXTERNAL           DLACN2, DLATBS, DRSCL, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MIN
@@ -2393,15 +2384,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGBMV, DGBTRS, DLACN2, XERBLA
+      EXTERNAL           DGBMV, DGBTRS, DLACN2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -2705,12 +2695,8 @@
 *     .. Local Scalars ..
       INTEGER            I, J, JP, JU, KM, KV
 *     ..
-*     .. External Functions ..
-      INTEGER            IDAMAX
-      EXTERNAL           IDAMAX
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGER, DSCAL, DSWAP, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -2915,12 +2901,12 @@
      $                   WORK31( LDWORK, NBMAX )
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX, ILAENV
-      EXTERNAL           IDAMAX, ILAENV
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGBTF2, DGEMM, DGER, DLASWP, DSCAL,
-     $                   DSWAP, DTRSM, XERBLA
+      EXTERNAL           DGBTF2, DLASWP,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -3335,12 +3321,8 @@
       LOGICAL            LNOTI, NOTRAN
       INTEGER            I, J, KD, L, LM
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DGER, DSWAP, DTBSV, XERBLA
+      EXTERNAL           DTBSV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -3516,12 +3498,8 @@
       INTEGER            I, II, K
       DOUBLE PRECISION   S
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSWAP, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -3745,13 +3723,11 @@
      $                   SFMIN2
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSWAP, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -4337,7 +4313,7 @@
       DOUBLE PRECISION   WS
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEBD2, DGEMM, DLABRD, XERBLA
+      EXTERNAL           DGEBD2, DLABRD, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, MAX, MIN
@@ -4538,10 +4514,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLATRS, DRSCL, XERBLA
@@ -5138,7 +5112,7 @@
       DOUBLE PRECISION  T( LDT, NBMAX )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DGEHD2, DGEMM, DLAHR2, DLARFB, DTRMM,
+      EXTERNAL           DGEHD2, DLAHR2, DLARFB,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -6038,12 +6012,11 @@
      $                   NBMIN, NFXD, NX, SM, SMINMN, SN, TOPBMN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEQRF, DLAQP2, DLAQPS, DORMQR, DSWAP, XERBLA
+      EXTERNAL           DGEQRF, DLAQP2, DLAQPS, DORMQR, XERBLA
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
-      DOUBLE PRECISION   DNRM2
-      EXTERNAL           ILAENV, DNRM2
+      EXTERNAL           ILAENV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          INT, MAX, MIN
@@ -6320,15 +6293,14 @@
       DOUBLE PRECISION   AII, TEMP, TEMP2, TOL3Z
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEQR2, DLARF, DLARFG, DORM2R, DSWAP, XERBLA
+      EXTERNAL           DGEQR2, DLARF, DLARFG, DORM2R, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DLAMCH, DNRM2
-      EXTERNAL           IDAMAX, DLAMCH, DNRM2
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -6899,15 +6871,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMV, DGETRS, DLACN2, XERBLA
+      EXTERNAL           DGETRS, DLACN2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -7515,11 +7486,10 @@
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH      
-      INTEGER            IDAMAX
-      EXTERNAL           DLAMCH, IDAMAX
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGER, DSCAL, DSWAP, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -7660,7 +7630,7 @@
       INTEGER            I, IINFO, J, JB, NB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DGETF2, DLASWP, DTRSM, XERBLA
+      EXTERNAL           DGETF2, DLASWP, XERBLA
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
@@ -7828,7 +7798,7 @@
       EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DGEMV, DSWAP, DTRSM, DTRTRI, XERBLA
+      EXTERNAL           DTRTRI, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -8014,12 +7984,8 @@
 *     .. Local Scalars ..
       LOGICAL            NOTRAN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLASWP, DTRSM, XERBLA
+      EXTERNAL           DLASWP, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -8175,12 +8141,8 @@
       LOGICAL            LEFTV, RIGHTV
       INTEGER            I, K
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSWAP, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -8433,13 +8395,11 @@
      $                   SFMIN, SUM, T, TA, TB, TC
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DDOT, DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DDOT, DLAMCH
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DSCAL, DSWAP, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, INT, LOG10, MAX, MIN, SIGN
@@ -8919,12 +8879,8 @@
       INTEGER            ICOMPQ, ICOMPZ, JCOL, JROW
       DOUBLE PRECISION   C, S, TEMP
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARTG, DLASET, DROT, XERBLA
+      EXTERNAL           DLARTG, DLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -9623,10 +9579,6 @@
       LOGICAL            FORWRD, WANTQ, WANTU, WANTV
       INTEGER            I, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DGEQPF, DGEQR2, DGERQ2, DLACPY, DLAPMT, DLASET,
      $                   DORG2R, DORM2R, DORMR2, XERBLA
@@ -9953,10 +9905,6 @@
 *     .. Local Arrays ..
       INTEGER            ISAVE( 3 )
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DGTTRS, DLACN2, XERBLA
 *     ..
@@ -10167,15 +10115,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGTTRS, DLACN2, DLAGTM, XERBLA
+      EXTERNAL           DGTTRS, DLACN2, DLAGTM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -10855,12 +10802,11 @@
       DOUBLE PRECISION   ANORM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANGT
-      EXTERNAL           LSAME, DLAMCH, DLANGT
+      EXTERNAL           DLAMCH, DLANGT
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGTCON, DGTRFS, DGTTRF, DGTTRS, DLACPY,
+      EXTERNAL           DGTCON, DGTRFS, DGTTRF, DGTTRS, DLACPY,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -11490,12 +11436,11 @@
       DOUBLE PRECISION   V( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANHS, DLAPY2, DLAPY3
-      EXTERNAL           LSAME, DLAMCH, DLANHS, DLAPY2, DLAPY3
+      EXTERNAL           DLAMCH, DLANHS, DLAPY2, DLAPY3
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLAG2, DLARFG, DLARTG, DLASET, DLASV2, DROT,
+      EXTERNAL           DLAG2, DLARFG, DLARTG, DLASET, DLASV2,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -12674,9 +12619,8 @@
      $                   WKR
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANHS
-      EXTERNAL           LSAME, DLAMCH, DLANHS
+      EXTERNAL           DLAMCH, DLANHS
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLAEIN, XERBLA
@@ -13160,8 +13104,7 @@
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
-      LOGICAL            LSAME
-      EXTERNAL           ILAENV, LSAME
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACPY, DLAHQR, DLAQR0, DLASET, XERBLA
@@ -13431,7 +13374,7 @@
       DOUBLE PRECISION   TEMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMM, DLACPY, DLAED1, DLAED7, DSTEQR,
+      EXTERNAL           DLACPY, DLAED1, DLAED7, DSTEQR,
      $                   XERBLA
 *     ..
 *     .. External Functions ..
@@ -13770,7 +13713,7 @@
      $                   IW, IZ, K, N1, N2, ZPP1
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLAED2, DLAED3, DLAMRG, XERBLA
+      EXTERNAL           DLAED2, DLAED3, DLAMRG, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -14002,12 +13945,11 @@
       DOUBLE PRECISION   C, EPS, S, T, TAU, TOL
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH, DLAPY2
-      EXTERNAL           IDAMAX, DLAMCH, DLAPY2
+      EXTERNAL           DLAMCH, DLAPY2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLACPY, DLAMRG, DROT, DSCAL, XERBLA
+      EXTERNAL           DLACPY, DLAMRG, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
@@ -14416,11 +14358,11 @@
       DOUBLE PRECISION   TEMP
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMC3, DNRM2
-      EXTERNAL           DLAMC3, DNRM2
+      DOUBLE PRECISION   DLAMC3
+      EXTERNAL           DLAMC3
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMM, DLACPY, DLAED4, DLASET, XERBLA
+      EXTERNAL           DLACPY, DLAED4, DLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, SIGN, SQRT
@@ -16017,7 +15959,7 @@
      $                   IQ2, IS, IW, IZ, K, LDQ2, N1, N2, PTR
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLAED8, DLAED9, DLAEDA, DLAMRG, XERBLA
+      EXTERNAL           DLAED8, DLAED9, DLAEDA, DLAMRG, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -16290,12 +16232,11 @@
       DOUBLE PRECISION   C, EPS, S, T, TAU, TOL
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH, DLAPY2
-      EXTERNAL           IDAMAX, DLAMCH, DLAPY2
+      EXTERNAL           DLAMCH, DLAPY2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLACPY, DLAMRG, DROT, DSCAL, XERBLA
+      EXTERNAL           DLACPY, DLAMRG, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
@@ -16623,11 +16564,11 @@
       DOUBLE PRECISION   TEMP
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMC3, DNRM2
-      EXTERNAL           DLAMC3, DNRM2
+      DOUBLE PRECISION   DLAMC3
+      EXTERNAL           DLAMC3
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLAED4, XERBLA
+      EXTERNAL           DLAED4, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, SIGN, SQRT
@@ -16840,7 +16781,7 @@
      $                   PTR, ZPTR1
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMV, DROT, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, INT, SQRT
@@ -17318,12 +17259,12 @@
       DOUBLE PRECISION   DIFLJ, DIFRJ, DJ, DSIGJ, DSIGJP, TEMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMV, DLACPY, DLASCL, DROT, DSCAL,
+      EXTERNAL           DLACPY, DLASCL,
      $                   XERBLA
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMC3, DNRM2
-      EXTERNAL           DLAMC3, DNRM2
+      DOUBLE PRECISION   DLAMC3
+      EXTERNAL           DLAMC3
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -17691,7 +17632,7 @@
      $                   NR, NRF, NRP1, SQRE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMM, DLALS0, DLASDT, XERBLA
+      EXTERNAL           DLALS0, DLASDT, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
@@ -18005,13 +17946,12 @@
       DOUBLE PRECISION   CS, EPS, ORGNRM, R, RCND, SN, TOL
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           IDAMAX, DLAMCH, DLANST
+      EXTERNAL           DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMM, DLACPY, DLALSA, DLARTG, DLASCL,
-     $                   DLASDA, DLASDQ, DLASET, DLASRT, DROT, XERBLA
+      EXTERNAL           DLACPY, DLALSA, DLARTG, DLASCL,
+     $                   DLASDA, DLASDQ, DLASET, DLASRT, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, INT, LOG, SIGN
@@ -18504,13 +18444,6 @@
       DOUBLE PRECISION   ONE, ZERO
       PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMV, DGER
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
       IF( LSAME( SIDE, 'L' ) ) THEN
@@ -18679,12 +18612,8 @@
       CHARACTER          TRANST
       INTEGER            I, INFO, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEMM, DTRMM, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Executable Statements ..
 *
@@ -18923,12 +18852,8 @@
       INTEGER            I, INFO, J
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DTRMV, XERBLA
+      EXTERNAL           XERBLA
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
 *     Check for currently supported options
@@ -19045,7 +18970,7 @@
       DOUBLE PRECISION   EPS, SCALE, SAFMIN, SIGMN, SIGMX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLAS2, DLASCL, DLASQ2, DLASRT, XERBLA
+      EXTERNAL           DLAS2, DLASCL, DLASQ2, DLASRT, XERBLA
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH
@@ -19629,10 +19554,6 @@
 *     .. Local Arrays ..
       INTEGER            STACK( 2, 32 )
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA
 *     ..
@@ -20037,13 +19958,6 @@
       DOUBLE PRECISION   ONE, ZERO
       PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMV, DGER
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
 *     ..
--- R-2.10.1/src/modules/lapack/dlapack3.f.orig	Mon Mar 26 18:42:12 2007
+++ R-2.10.1/src/modules/lapack/dlapack3.f	Sat Dec 19 04:56:32 2009
@@ -65,10 +65,6 @@
       LOGICAL            UPPER
       INTEGER            I, IINFO, IJ, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DORG2L, DORG2R, XERBLA
 *     ..
@@ -252,10 +248,6 @@
       INTEGER            I, I1, I2, I3, IC, II, JC, MI, NI, NQ
       DOUBLE PRECISION   AII
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARF, XERBLA
 *     ..
@@ -482,7 +474,7 @@
       INTEGER            I, II, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARF, DSCAL, XERBLA
+      EXTERNAL           DLARF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -609,7 +601,7 @@
       INTEGER            I, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARF, DSCAL, XERBLA
+      EXTERNAL           DLARF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -776,9 +768,8 @@
       INTEGER            I, IINFO, J, LWKOPT, MN, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DORGLQ, DORGQR, XERBLA
@@ -1145,7 +1136,7 @@
       INTEGER            I, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARF, DSCAL, XERBLA
+      EXTERNAL           DLARF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -1932,7 +1923,7 @@
       INTEGER            I, II, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARF, DSCAL, XERBLA
+      EXTERNAL           DLARF, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -2295,9 +2286,8 @@
       INTEGER            I, IINFO, J, LWKOPT, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DORGQL, DORGQR, XERBLA
@@ -2501,10 +2491,6 @@
       INTEGER            I, I1, I2, I3, MI, NI, NQ
       DOUBLE PRECISION   AII
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARF, XERBLA
 *     ..
@@ -2694,10 +2680,6 @@
       INTEGER            I, I1, I2, I3, IC, JC, MI, NI, NQ
       DOUBLE PRECISION   AII
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARF, XERBLA
 *     ..
@@ -2918,9 +2900,8 @@
       INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DORMLQ, DORMQR, XERBLA
@@ -3179,9 +3160,8 @@
       INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NH, NI, NQ, NW
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DORMQR, XERBLA
@@ -3373,10 +3353,6 @@
       INTEGER            I, I1, I2, I3, IC, JC, MI, NI, NQ
       DOUBLE PRECISION   AII
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARF, XERBLA
 *     ..
@@ -3583,9 +3559,8 @@
       DOUBLE PRECISION   T( LDT, NBMAX )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARFB, DLARFT, DORML2, XERBLA
@@ -3849,9 +3824,8 @@
       DOUBLE PRECISION   T( LDT, NBMAX )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARFB, DLARFT, DORM2L, XERBLA
@@ -4110,9 +4084,8 @@
       DOUBLE PRECISION   T( LDT, NBMAX )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARFB, DLARFT, DORM2R, XERBLA
@@ -4358,10 +4331,6 @@
       INTEGER            I, I1, I2, I3, MI, NI, NQ
       DOUBLE PRECISION   AII
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARF, XERBLA
 *     ..
@@ -4557,10 +4526,6 @@
       LOGICAL            LEFT, NOTRAN
       INTEGER            I, I1, I2, I3, IC, JA, JC, MI, NI, NQ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARZ, XERBLA
 *     ..
@@ -4770,9 +4735,8 @@
       DOUBLE PRECISION   T( LDT, NBMAX )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARFB, DLARFT, DORMR2, XERBLA
@@ -5049,9 +5013,8 @@
       DOUBLE PRECISION   T( LDT, NBMAX )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLARZB, DLARZT, DORMR3, XERBLA
@@ -5322,9 +5285,8 @@
       INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DORMQL, DORMQR, XERBLA
@@ -5525,10 +5487,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLATBS, DRSCL, XERBLA
@@ -5711,10 +5671,6 @@
       INTEGER            I, J
       DOUBLE PRECISION   SMIN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA
 *     ..
@@ -5924,15 +5880,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLACN2, DPBTRS, DSBMV, XERBLA
+      EXTERNAL           DLACN2, DPBTRS, DSBMV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -6247,12 +6202,8 @@
       INTEGER            J, KLD, KM, M
       DOUBLE PRECISION   AJJ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSYR, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -6487,12 +6438,8 @@
       INTEGER            J, KLD, KN
       DOUBLE PRECISION   AJJ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSYR, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -6683,12 +6630,11 @@
       DOUBLE PRECISION   WORK( LDWORK, NBMAX )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DPBTF2, DPOTF2, DSYRK, DTRSM, XERBLA
+      EXTERNAL           DPBTF2, DPOTF2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
@@ -7013,10 +6959,6 @@
       LOGICAL            UPPER
       INTEGER            J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DTBSV, XERBLA
 *     ..
@@ -7169,10 +7111,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLATRS, DRSCL, XERBLA
@@ -7528,15 +7468,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLACN2, DPOTRS, DSYMV, XERBLA
+      EXTERNAL           DLACN2, DPOTRS, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -7807,13 +7746,8 @@
       INTEGER            J
       DOUBLE PRECISION   AJJ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DSCAL, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, SQRT
@@ -7972,12 +7906,11 @@
       INTEGER            J, JB, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DPOTF2, DSYRK, DTRSM, XERBLA
+      EXTERNAL           DPOTF2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -8134,10 +8067,6 @@
 *
 *  =====================================================================
 *
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLAUUM, DTRTRI, XERBLA
 *     ..
@@ -8243,12 +8172,8 @@
 *     .. Local Scalars ..
       LOGICAL            UPPER
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DTRSM, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -8392,10 +8317,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLATPS, DRSCL, XERBLA
@@ -8562,10 +8485,6 @@
       INTEGER            I, JJ
       DOUBLE PRECISION   SMIN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA
 *     ..
@@ -8775,15 +8694,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLACN2, DPPTRS, DSPMV, XERBLA
+      EXTERNAL           DLACN2, DPPTRS, DSPMV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -9067,13 +8985,8 @@
       INTEGER            J, JC, JJ
       DOUBLE PRECISION   AJJ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSPR, DTPSV, XERBLA
+      EXTERNAL           DSPR, DTPSV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          SQRT
@@ -9221,13 +9134,8 @@
       INTEGER            J, JC, JJ, JJN
       DOUBLE PRECISION   AJJ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSPR, DTPMV, DTPTRI, XERBLA
+      EXTERNAL           DSPR, DTPMV, DTPTRI, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
@@ -9350,10 +9258,6 @@
       LOGICAL            UPPER
       INTEGER            I
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DTPSV, XERBLA
 *     ..
@@ -9495,10 +9399,6 @@
       INTEGER            I, IX
       DOUBLE PRECISION   AINVNM
 *     ..
-*     .. External Functions ..
-      INTEGER            IDAMAX
-      EXTERNAL           IDAMAX
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA
 *     ..
@@ -9667,10 +9567,6 @@
       DOUBLE PRECISION   ZERO, ONE
       PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DBDSQR, DLASET, DPTTRF, XERBLA
 *     ..
@@ -9867,15 +9763,14 @@
      $                   SAFMIN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DPTTRS, XERBLA
+      EXTERNAL           DPTTRS, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           IDAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -10316,12 +10211,11 @@
       DOUBLE PRECISION   ANORM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           LSAME, DLAMCH, DLANST
+      EXTERNAL           DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLACPY, DPTCON, DPTRFS, DPTTRF, DPTTRS,
+      EXTERNAL           DLACPY, DPTCON, DPTRFS, DPTTRF, DPTTRS,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -10717,9 +10611,6 @@
 *     .. Local Scalars ..
       INTEGER            I, J
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DSCAL
-*     ..
 *     .. Executable Statements ..
 *
 *     Quick return if possible
@@ -10852,13 +10743,9 @@
      $                   KA1, KB1, KBT, L, M, NR, NRT, NX
       DOUBLE PRECISION   BII, RA, RA1, T
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGER, DLAR2V, DLARGV, DLARTG, DLARTV, DLASET,
-     $                   DROT, DSCAL, XERBLA
+      EXTERNAL           DLAR2V, DLARGV, DLARTG, DLARTV, DLASET,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -12203,16 +12090,12 @@
       DOUBLE PRECISION   TEMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLAR2V, DLARGV, DLARTG, DLARTV, DLASET, DROT,
+      EXTERNAL           DLAR2V, DLARGV, DLARTG, DLARTV, DLASET,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters
@@ -12731,10 +12614,6 @@
 *     .. Local Arrays ..
       INTEGER            ISAVE( 3 )
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DSPTRS, XERBLA
 *     ..
@@ -12887,14 +12766,9 @@
       DOUBLE PRECISION   AJJ, AKK, BJJ, BKK, CT
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DSCAL, DSPMV, DSPR2, DTPMV, DTPSV,
+      EXTERNAL           DSPMV, DSPR2, DTPMV, DTPSV,
      $                   XERBLA
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters.
@@ -13144,15 +13018,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLACN2, DSPMV, DSPTRS, XERBLA
+      EXTERNAL           DLACN2, DSPMV, DSPTRS, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -13462,13 +13335,8 @@
       DOUBLE PRECISION   ALPHA, TAUI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DLARFG, DSPMV, DSPR2, XERBLA
+      EXTERNAL           DLARFG, DSPMV, DSPR2, XERBLA
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters
@@ -13705,13 +13573,8 @@
       DOUBLE PRECISION   ABSAKK, ALPHA, COLMAX, D11, D12, D21, D22, R1,
      $                   ROWMAX, T, WK, WKM1, WKP1
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
-      EXTERNAL           LSAME, IDAMAX
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSPR, DSWAP, XERBLA
+      EXTERNAL           DSPR, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
@@ -14200,13 +14063,8 @@
       INTEGER            J, K, KC, KCNEXT, KP, KPC, KSTEP, KX, NPP
       DOUBLE PRECISION   AK, AKKP1, AKP1, D, T, TEMP
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DSPMV, DSWAP, XERBLA
+      EXTERNAL           DSPMV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS
@@ -14534,12 +14392,8 @@
       INTEGER            J, K, KC, KP
       DOUBLE PRECISION   AK, AKM1, AKM1K, BK, BKM1, DENOM
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DGER, DSCAL, DSWAP, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -15034,10 +14888,9 @@
       INTEGER            IDUMMA( 1 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, ILAENV, DLAMCH
+      EXTERNAL           ILAENV, DLAMCH
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLAEBZ, XERBLA
@@ -15793,12 +15646,11 @@
       INTEGER            ISEED( 4 )
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM, DDOT, DLAMCH, DNRM2
-      EXTERNAL           IDAMAX, DASUM, DDOT, DLAMCH, DNRM2
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLAGTF, DLAGTS, DLARNV, DSCAL,
+      EXTERNAL           DLAGTF, DLAGTS, DLARNV,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -16126,13 +15978,12 @@
      $                   S, SAFMAX, SAFMIN, SSFMAX, SSFMIN, TST
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANST, DLAPY2
-      EXTERNAL           LSAME, DLAMCH, DLANST, DLAPY2
+      EXTERNAL           DLAMCH, DLANST, DLAPY2
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLAE2, DLAEV2, DLARTG, DLASCL, DLASET, DLASR,
-     $                   DLASRT, DSWAP, XERBLA
+     $                   DLASRT, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SIGN, SQRT
@@ -16981,10 +16832,6 @@
 *     .. Local Arrays ..
       INTEGER            ISAVE( 3 )
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DSYTRS, XERBLA
 *     ..
@@ -17146,15 +16993,11 @@
       DOUBLE PRECISION   AKK, BKK, CT
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DSCAL, DSYR2, DTRMV, DTRSV, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters.
@@ -17356,15 +17199,14 @@
       INTEGER            K, KB, NB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSYGS2, DSYMM, DSYR2K, DTRMM, DTRSM, XERBLA
+      EXTERNAL           DSYGS2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. Executable Statements ..
 *
@@ -17653,15 +17495,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLACN2, DSYMV, DSYTRS, XERBLA
+      EXTERNAL           DLACN2, DSYTRS, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -17989,13 +17830,8 @@
       DOUBLE PRECISION   ALPHA, TAUI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DLARFG, DSYMV, DSYR2, XERBLA
+      EXTERNAL           DLARFG, XERBLA
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *     ..
@@ -18251,12 +18087,11 @@
      $                   ROWMAX, T, WK, WKM1, WKP1
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME, DISNAN
-      INTEGER            IDAMAX
-      EXTERNAL           LSAME, IDAMAX, DISNAN
+      LOGICAL            DISNAN
+      EXTERNAL           DISNAN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSWAP, DSYR, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
@@ -18770,15 +18605,14 @@
      $                   NBMIN, NX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLATRD, DSYR2K, DSYTD2, XERBLA
+      EXTERNAL           DLATRD, DSYTD2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. Executable Statements ..
 *
@@ -19055,9 +18889,8 @@
       INTEGER            IINFO, IWS, J, K, KB, LDWORK, LWKOPT, NB, NBMIN
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLASYF, DSYTF2, XERBLA
@@ -19284,13 +19117,8 @@
       INTEGER            K, KP, KSTEP
       DOUBLE PRECISION   AK, AKKP1, AKP1, D, T, TEMP
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT
-      EXTERNAL           LSAME, DDOT
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DSWAP, DSYMV, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
@@ -19596,12 +19424,8 @@
       INTEGER            J, K, KP
       DOUBLE PRECISION   AK, AKM1, AKM1K, BK, BKM1, DENOM
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DGER, DSCAL, DSWAP, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -19988,10 +19812,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH, DLANTB
-      EXTERNAL           LSAME, IDAMAX, DLAMCH, DLANTB
+      EXTERNAL           DLAMCH, DLANTB
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLATBS, DRSCL, XERBLA
@@ -20219,15 +20041,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLACN2, DTBMV, DTBSV, XERBLA
+      EXTERNAL           DLACN2, DTBMV, DTBSV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -20570,10 +20391,6 @@
       LOGICAL            NOUNIT, UPPER
       INTEGER            J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DTBSV, XERBLA
 *     ..
@@ -20876,12 +20693,11 @@
      $                   SUMP( 2, 2 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DLABAD, DLACPY, DLAG2, DLALN2, XERBLA
+      EXTERNAL           DLABAD, DLACPY, DLAG2, DLALN2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -23225,13 +23041,9 @@
       DOUBLE PRECISION   A1, A2, A3, B1, B2, B3, CSQ, CSU, CSV, ERROR,
      $                   GAMMA, RWK, SNQ, SNU, SNV, SSMIN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLAGS2, DLAPLL, DLARTG, DLASET, DROT,
-     $                   DSCAL, XERBLA
+      EXTERNAL           DLAGS2, DLAPLL, DLARTG, DLASET,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -23768,12 +23580,11 @@
       DOUBLE PRECISION   DUMMY( 1 ), DUMMY1( 1 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT, DLAMCH, DLAPY2, DNRM2
-      EXTERNAL           LSAME, DDOT, DLAMCH, DLAPY2, DNRM2
+      DOUBLE PRECISION   DLAMCH, DLAPY2
+      EXTERNAL           DLAMCH, DLAPY2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMV, DLACPY, DLAG2, DTGEXC, DTGSYL, XERBLA
+      EXTERNAL           DLACPY, DLAG2, DTGEXC, DTGSYL, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -24256,12 +24067,11 @@
       DOUBLE PRECISION   DSCALE, DSUM, SCALE2, SCALOC
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLACPY, DLASET, DSCAL, DTGSY2, XERBLA
+      EXTERNAL           DLACPY, DLASET, DTGSY2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, MAX, SQRT
@@ -24691,10 +24501,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH, DLANTP
-      EXTERNAL           LSAME, IDAMAX, DLAMCH, DLANTP
+      EXTERNAL           DLAMCH, DLANTP
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLATPS, DRSCL, XERBLA
@@ -24911,15 +24719,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLACN2, DTPMV, DTPSV, XERBLA
+      EXTERNAL           DLACN2, DTPMV, DTPSV, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -25251,12 +25058,8 @@
       INTEGER            J, JC, JCLAST, JJ
       DOUBLE PRECISION   AJJ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DTPMV, XERBLA
+      EXTERNAL           DTPMV, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
@@ -25429,10 +25232,6 @@
       LOGICAL            NOUNIT, UPPER
       INTEGER            J, JC
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DTPSV, XERBLA
 *     ..
@@ -25593,10 +25392,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
       DOUBLE PRECISION   DLAMCH, DLANTR
-      EXTERNAL           LSAME, IDAMAX, DLAMCH, DLANTR
+      EXTERNAL           DLAMCH, DLANTR
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLATRS, DRSCL, XERBLA
@@ -25856,13 +25653,11 @@
      $                   XNORM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DDOT, DLAMCH
-      EXTERNAL           LSAME, IDAMAX, DDOT, DLAMCH
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, XERBLA
+      EXTERNAL           DLALN2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
@@ -26769,10 +26564,6 @@
       LOGICAL            WANTQ
       INTEGER            HERE, NBF, NBL, NBNEXT
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DLAEXC, XERBLA
 *     ..
@@ -27144,15 +26935,14 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLACN2, DTRMV, DTRSV, XERBLA
+      EXTERNAL           DLACN2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -27637,9 +27427,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLANGE
-      EXTERNAL           LSAME, DLANGE
+      EXTERNAL           DLANGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLACPY, DTREXC, DTRSYL, XERBLA
@@ -28050,9 +27839,8 @@
       DOUBLE PRECISION   DUMMY( 1 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT, DLAMCH, DLAPY2, DNRM2
-      EXTERNAL           LSAME, DDOT, DLAMCH, DLAPY2, DNRM2
+      DOUBLE PRECISION   DLAMCH, DLAPY2
+      EXTERNAL           DLAMCH, DLAPY2
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACN2, DLACPY, DLAQTR, DTREXC, XERBLA
@@ -28460,12 +28248,11 @@
       DOUBLE PRECISION   DUM( 1 ), VEC( 2, 2 ), X( 2, 2 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DDOT, DLAMCH, DLANGE
-      EXTERNAL           LSAME, DDOT, DLAMCH, DLANGE
+      DOUBLE PRECISION   DLAMCH, DLANGE
+      EXTERNAL           DLAMCH, DLANGE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, DLALN2, DLASY2, DSCAL, XERBLA
+      EXTERNAL           DLABAD, DLALN2, DLASY2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, MAX, MIN
@@ -29336,12 +29123,8 @@
       INTEGER            J
       DOUBLE PRECISION   AJJ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DTRMV, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -29481,12 +29264,11 @@
       INTEGER            J, JB, NB, NN
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DTRMM, DTRSM, DTRTI2, XERBLA
+      EXTERNAL           DTRTI2, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -29673,12 +29455,8 @@
 *     .. Local Scalars ..
       LOGICAL            NOUNIT
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           DTRSM, XERBLA
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -29832,7 +29610,7 @@
       INTRINSIC          MAX, MIN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMV, DGER, DLARFG, XERBLA
+      EXTERNAL           DLARFG, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
--- R-2.10.1/src/modules/lapack/dlapack4.f.orig	Mon Mar 26 18:42:12 2007
+++ R-2.10.1/src/modules/lapack/dlapack4.f	Sat Dec 19 05:01:16 2009
@@ -115,14 +115,6 @@
       INTEGER            I, JLAST
       DOUBLE PRECISION   ALTSGN, ESTOLD, TEMP
 *     ..
-*     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM
-      EXTERNAL           IDAMAX, DASUM
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           DCOPY
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, NINT, SIGN
 *     ..
@@ -365,8 +357,7 @@
       DOUBLE PRECISION  EI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMM, DGEMV, DLACPY,
-     $                   DLARFG, DSCAL, DTRMM, DTRMV
+      EXTERNAL           DLACPY,DLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
@@ -1604,7 +1595,7 @@
       EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEHRD, DGEMM, DLABAD, DLACPY, DLAHQR,
+      EXTERNAL           DGEHRD, DLABAD, DLACPY, DLAHQR,
      $                   DLANV2, DLARF, DLARFG, DLASET, DORGHR, DTREXC
 *     ..
 *     .. Intrinsic Functions ..
@@ -2152,7 +2143,7 @@
       EXTERNAL           DLAMCH, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DGEHRD, DGEMM, DLABAD, DLACPY, DLAHQR,
+      EXTERNAL           DGEHRD, DLABAD, DLACPY, DLAHQR,
      $                   DLANV2, DLAQR4, DLARF, DLARFG, DLASET, DORGHR,
      $                   DTREXC
 *     ..
@@ -3345,8 +3336,7 @@
       DOUBLE PRECISION   VT( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLABAD, DLACPY, DLAQR1, DLARFG, DLASET,
-     $                   DTRMM
+      EXTERNAL           DLABAD, DLACPY, DLAQR1, DLARFG, DLASET
 *     ..
 *     .. Executable Statements ..
 *
@@ -4201,10 +4191,6 @@
       DOUBLE PRECISION   LPIVOT, RPIVOT, SL, SU, TMP, TMP2
 
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
       INFO = 0
@@ -4508,10 +4494,9 @@
       INTEGER            IDUMMA( 1 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, ILAENV, DLAMCH
+      EXTERNAL           ILAENV, DLAMCH
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLAEBZ
@@ -6450,13 +6435,12 @@
 *     ..
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           LSAME, DLAMCH, DLANST
+      EXTERNAL           DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLAE2, DLAEV2, DLARRC, DLARRE, DLARRJ,
-     $                   DLARRR, DLARRV, DLASRT, DSCAL, DSWAP, XERBLA
+      EXTERNAL           DLAE2, DLAEV2, DLARRC, DLARRE, DLARRJ,
+     $                   DLARRR, DLARRV, DLASRT, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
--- R-2.10.1/src/modules/lapack/cmplx.f.orig	Tue Mar 25 13:26:45 2008
+++ R-2.10.1/src/modules/lapack/cmplx.f	Sat Dec 19 05:42:33 2009
@@ -265,13 +265,12 @@
      $                   SN, THRESH, TOL, TOLMUL, UNFL
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLARTG, DLAS2, DLASQ1, DLASV2, XERBLA, ZDROT,
-     $                   ZDSCAL, ZLASR, ZSWAP
+      EXTERNAL           DLARTG, DLAS2, DLASQ1, DLASV2, XERBLA,
+     $                   ZLASR
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, MAX, MIN, SIGN, SQRT
@@ -889,7 +888,7 @@
       EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZDSCAL
+      EXTERNAL           DLABAD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS
@@ -1026,12 +1025,8 @@
       INTEGER            I, II, K
       DOUBLE PRECISION   S
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZDSCAL, ZSWAP
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -1257,13 +1252,11 @@
       COMPLEX*16         CDUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IZAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, IZAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZDSCAL, ZSWAP
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DIMAG, MAX, MIN
@@ -1866,7 +1859,7 @@
       DOUBLE PRECISION   WS
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGEBD2, ZGEMM, ZLABRD
+      EXTERNAL           XERBLA, ZGEBD2, ZLABRD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, MAX, MIN
@@ -2068,10 +2061,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IZAMAX
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, IZAMAX, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZDRSCL, ZLACN2, ZLATRS
@@ -2299,14 +2290,13 @@
       DOUBLE PRECISION   DUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, XERBLA, ZDSCAL, ZGEBAK, ZGEBAL, ZGEHRD,
-     $                   ZHSEQR, ZLACPY, ZLASCL, ZSCAL, ZTREVC, ZUNGHR
+      EXTERNAL           DLABAD, XERBLA, ZGEBAK, ZGEBAL, ZGEHRD,
+     $                   ZHSEQR, ZLACPY, ZLASCL, ZTREVC, ZUNGHR
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX, ILAENV
-      DOUBLE PRECISION   DLAMCH, DZNRM2, ZLANGE
-      EXTERNAL           LSAME, IDAMAX, ILAENV, DLAMCH, DZNRM2, ZLANGE
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      EXTERNAL           ILAENV, DLAMCH, ZLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, DCMPLX, DCONJG, DIMAG, MAX, SQRT
@@ -2845,7 +2835,7 @@
       COMPLEX*16        T( LDT, NBMAX )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZAXPY, ZGEHD2, ZGEMM, ZLAHR2, ZLARFB, ZTRMM,
+      EXTERNAL           ZGEHD2, ZLAHR2, ZLARFB,
      $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
@@ -3416,12 +3406,11 @@
      $                   NBMIN, NFXD, NX, SM, SMINMN, SN, TOPBMN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGEQRF, ZLAQP2, ZLAQPS, ZSWAP, ZUNMQR
+      EXTERNAL           XERBLA, ZGEQRF, ZLAQP2, ZLAQPS, ZUNMQR
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
-      DOUBLE PRECISION   DZNRM2
-      EXTERNAL           ILAENV, DZNRM2
+      EXTERNAL           ILAENV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          INT, MAX, MIN
@@ -4189,15 +4178,14 @@
       COMPLEX*16         CDUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLASCL, XERBLA, ZBDSQR, ZGEBRD, ZGELQF, ZGEMM,
+      EXTERNAL           DLASCL, XERBLA, ZBDSQR, ZGEBRD, ZGELQF,
      $                   ZGEQRF, ZLACPY, ZLASCL, ZLASET, ZUNGBR, ZUNGLQ,
      $                   ZUNGQR, ZUNMBR
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, ZLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANGE
+      EXTERNAL           ILAENV, DLAMCH, ZLANGE
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN, SQRT
@@ -7703,11 +7691,10 @@
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH
-      INTEGER            IZAMAX
-      EXTERNAL           DLAMCH, IZAMAX
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGERU, ZSCAL, ZSWAP
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -7848,7 +7835,7 @@
       INTEGER            I, IINFO, J, JB, NB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGEMM, ZGETF2, ZLASWP, ZTRSM
+      EXTERNAL           XERBLA, ZGETF2, ZLASWP
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
@@ -8010,12 +7997,8 @@
 *     .. Local Scalars ..
       LOGICAL            NOTRAN
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLASWP, ZTRSM
+      EXTERNAL           XERBLA, ZLASWP
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -8181,13 +8164,12 @@
      $                   SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, ZLANHE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANHE
+      EXTERNAL           ILAENV, DLAMCH, ZLANHE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSTERF, XERBLA, ZHETRD, ZLASCL, ZSTEQR,
+      EXTERNAL           DSTERF, XERBLA, ZHETRD, ZLASCL, ZSTEQR,
      $                   ZUNGTR
 *     ..
 *     .. Intrinsic Functions ..
@@ -8436,13 +8418,8 @@
       COMPLEX*16         ALPHA, TAUI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZAXPY, ZHEMV, ZHER2, ZLARFG
+      EXTERNAL           XERBLA, ZHEMV, ZHER2, ZLARFG
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      COMPLEX*16         ZDOTC
-      EXTERNAL           LSAME, ZDOTC
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, MAX, MIN
 *     ..
@@ -8711,9 +8688,8 @@
       INTRINSIC          MAX
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. Executable Statements ..
 *
@@ -9105,11 +9081,10 @@
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
-      LOGICAL            LSAME
-      EXTERNAL           ILAENV, LSAME
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZCOPY, ZLACPY, ZLAHQR, ZLAQR0, ZLASET
+      EXTERNAL           XERBLA, ZLACPY, ZLAHQR, ZLAQR0, ZLASET
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, DCMPLX, MAX, MIN
@@ -9404,7 +9379,7 @@
       COMPLEX*16         ALPHA
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGEMV, ZLACGV, ZLARFG, ZSCAL
+      EXTERNAL           ZLACGV, ZLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
@@ -9735,10 +9710,6 @@
       INTEGER            IZMAX1
       DOUBLE PRECISION   DLAMCH, DZSUM1
       EXTERNAL           IZMAX1, DLAMCH, DZSUM1
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZCOPY
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DIMAG
 *     ..
@@ -9919,10 +9890,6 @@
 *     .. Local Scalars ..
       INTEGER            I, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
 *     ..
@@ -10148,7 +10115,7 @@
       EXTERNAL           ZLADIV, DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZCOPY, ZLARFG, ZSCAL
+      EXTERNAL           DLABAD, ZLARFG
 *     ..
 *     .. Statement Functions ..
       DOUBLE PRECISION   CABS1
@@ -10591,8 +10558,8 @@
       COMPLEX*16        EI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZAXPY, ZCOPY, ZGEMM, ZGEMV, ZLACPY,
-     $                   ZLARFG, ZSCAL, ZTRMM, ZTRMV, ZLACGV
+      EXTERNAL           ZLACPY,
+     $                   ZLARFG, ZLACGV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
@@ -10826,8 +10793,7 @@
       COMPLEX*16         EI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZAXPY, ZCOPY, ZGEMV, ZLACGV, ZLARFG, ZSCAL,
-     $                   ZTRMV
+      EXTERNAL           ZLACGV, ZLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
@@ -10999,10 +10965,6 @@
       INTEGER            I, J
       DOUBLE PRECISION   SCALE, SUM, VALUE
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           ZLASSQ
 *     ..
@@ -11153,10 +11115,6 @@
       INTEGER            I, J
       DOUBLE PRECISION   ABSA, SCALE, SUM, VALUE
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           ZLASSQ
 *     ..
@@ -11328,10 +11286,6 @@
       INTEGER            I, J
       DOUBLE PRECISION   SCALE, SUM, VALUE
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           ZLASSQ
 *     ..
@@ -11494,10 +11448,6 @@
       INTEGER            I, J
       DOUBLE PRECISION   SCALE, SUM, VALUE
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           ZLASSQ
 *     ..
@@ -11767,15 +11717,14 @@
       COMPLEX*16         AII
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLARF, ZLARFG, ZSWAP
+      EXTERNAL           ZLARF, ZLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DCONJG, MAX, MIN, SQRT
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DLAMCH, DZNRM2
-      EXTERNAL           IDAMAX, DLAMCH, DZNRM2
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -11958,15 +11907,14 @@
       COMPLEX*16         AKK
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGEMM, ZGEMV, ZLARFG, ZSWAP
+      EXTERNAL           ZLARFG
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCONJG, MAX, MIN, NINT, SQRT
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DLAMCH, DZNRM2
-      EXTERNAL           IDAMAX, DLAMCH, DZNRM2
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
@@ -12991,7 +12939,7 @@
       EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZCOPY, ZGEHRD, ZGEMM, ZLACPY, ZLAHQR,
+      EXTERNAL           DLABAD, ZGEHRD, ZLACPY, ZLAHQR,
      $                   ZLARF, ZLARFG, ZLASET, ZTREXC, ZUNGHR
 *     ..
 *     .. Intrinsic Functions ..
@@ -13426,7 +13374,7 @@
       EXTERNAL           DLAMCH, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZCOPY, ZGEHRD, ZGEMM, ZLACPY, ZLAHQR,
+      EXTERNAL           DLABAD, ZGEHRD, ZLACPY, ZLAHQR,
      $                   ZLAQR4, ZLARF, ZLARFG, ZLASET, ZTREXC, ZUNGHR
 *     ..
 *     .. Intrinsic Functions ..
@@ -14470,8 +14418,7 @@
       COMPLEX*16         VT( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZGEMM, ZLACPY, ZLAQR1, ZLARFG, ZLASET,
-     $                   ZTRMM
+      EXTERNAL           DLABAD, ZLACPY, ZLAQR1, ZLARFG, ZLASET
 *     ..
 *     .. Statement Functions ..
       DOUBLE PRECISION   CABS1
@@ -15189,13 +15136,6 @@
       PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
      $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZGEMV, ZGERC
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
       IF( LSAME( SIDE, 'L' ) ) THEN
@@ -15332,12 +15272,8 @@
       CHARACTER          TRANST
       INTEGER            I, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZCOPY, ZGEMM, ZLACGV, ZTRMM
+      EXTERNAL           ZLACGV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DCONJG
@@ -15911,16 +15847,13 @@
       DOUBLE PRECISION   ALPHI, ALPHR, BETA, RSAFMN, SAFMIN, XNORM
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMCH, DLAPY3, DZNRM2
+      DOUBLE PRECISION   DLAMCH, DLAPY3
       COMPLEX*16         ZLADIV
-      EXTERNAL           DLAMCH, DLAPY3, DZNRM2, ZLADIV
+      EXTERNAL           DLAMCH, DLAPY3, ZLADIV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, SIGN
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZDSCAL, ZSCAL
-*     ..
 *     .. Executable Statements ..
 *
       IF( N.LE.0 ) THEN
@@ -16101,12 +16034,8 @@
       COMPLEX*16         VII
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGEMV, ZLACGV, ZTRMV
+      EXTERNAL           ZLACGV
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Executable Statements ..
 *
 *     Quick return if possible
@@ -16285,13 +16214,6 @@
       COMPLEX*16         SUM, T1, T10, T2, T3, T4, T5, T6, T7, T8, T9,
      $                   V1, V10, V2, V3, V4, V5, V6, V7, V8, V9
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZGEMV, ZGERC
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DCONJG
 *     ..
@@ -17133,9 +17055,8 @@
       DOUBLE PRECISION   BIGNUM, CFROM1, CFROMC, CTO1, CTOC, MUL, SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
@@ -17371,10 +17292,6 @@
 *     .. Local Scalars ..
       INTEGER            I, J
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN
 *     ..
@@ -17582,10 +17499,6 @@
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA
 *     ..
@@ -18160,13 +18073,8 @@
       COMPLEX*16         ALPHA
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZAXPY, ZGEMV, ZHEMV, ZLACGV, ZLARFG, ZSCAL
+      EXTERNAL           ZHEMV, ZLACGV, ZLARFG
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      COMPLEX*16         ZDOTC
-      EXTERNAL           LSAME, ZDOTC
-*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, MIN
 *     ..
@@ -18474,15 +18382,12 @@
       COMPLEX*16         CSUMJ, TJJS, USCAL, ZDUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX, IZAMAX
-      DOUBLE PRECISION   DLAMCH, DZASUM
-      COMPLEX*16         ZDOTC, ZDOTU, ZLADIV
-      EXTERNAL           LSAME, IDAMAX, IZAMAX, DLAMCH, DZASUM, ZDOTC,
-     $                   ZDOTU, ZLADIV
+      DOUBLE PRECISION   DLAMCH
+      COMPLEX*16         ZLADIV
+      EXTERNAL           DLAMCH, ZLADIV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
@@ -19243,13 +19148,8 @@
       INTEGER            J
       DOUBLE PRECISION   AJJ
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      COMPLEX*16         ZDOTC
-      EXTERNAL           LSAME, ZDOTC
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZDSCAL, ZGEMV, ZLACGV
+      EXTERNAL           XERBLA, ZLACGV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, MAX, SQRT
@@ -19414,12 +19314,11 @@
       INTEGER            J, JB, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGEMM, ZHERK, ZPOTF2, ZTRSM
+      EXTERNAL           XERBLA, ZHERK, ZPOTF2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -19715,13 +19614,12 @@
      $                   S, SAFMAX, SAFMIN, SSFMAX, SSFMIN, TST
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       DOUBLE PRECISION   DLAMCH, DLANST, DLAPY2
-      EXTERNAL           LSAME, DLAMCH, DLANST, DLAPY2
+      EXTERNAL           DLAMCH, DLANST, DLAPY2
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLAE2, DLAEV2, DLARTG, DLASCL, DLASRT, XERBLA,
-     $                   ZLASET, ZLASR, ZSWAP
+     $                   ZLASET, ZLASR
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SIGN, SQRT
@@ -20215,10 +20113,8 @@
       INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IZAMAX
       DOUBLE PRECISION   DLAMCH, ZLANTR
-      EXTERNAL           LSAME, IZAMAX, DLAMCH, ZLANTR
+      EXTERNAL           DLAMCH, ZLANTR
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZDRSCL, ZLACN2, ZLATRS
@@ -20479,13 +20375,11 @@
       COMPLEX*16         CDUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IZAMAX
-      DOUBLE PRECISION   DLAMCH, DZASUM
-      EXTERNAL           LSAME, IZAMAX, DLAMCH, DZASUM
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS
+      EXTERNAL           XERBLA, ZLATRS
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX
@@ -20783,10 +20677,6 @@
       DOUBLE PRECISION   CS
       COMPLEX*16         SN, T11, T22, TEMP
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZLARTG, ZROT
 *     ..
@@ -20961,12 +20851,8 @@
 *     .. Local Scalars ..
       LOGICAL            NOUNIT
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZTRSM
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -21091,7 +20977,7 @@
       INTEGER            I, II, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARF, ZSCAL
+      EXTERNAL           XERBLA, ZLARF
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -21219,7 +21105,7 @@
       INTEGER            I, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARF, ZSCAL
+      EXTERNAL           XERBLA, ZLARF
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
@@ -21387,9 +21273,8 @@
       INTEGER            I, IINFO, J, LWKOPT, MN, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZUNGLQ, ZUNGQR
@@ -21758,7 +21643,7 @@
       INTEGER            I, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLACGV, ZLARF, ZSCAL
+      EXTERNAL           XERBLA, ZLACGV, ZLARF
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DCONJG, MAX
@@ -22548,7 +22433,7 @@
       INTEGER            I, II, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLACGV, ZLARF, ZSCAL
+      EXTERNAL           XERBLA, ZLACGV, ZLARF
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DCONJG, MAX
@@ -22915,9 +22800,8 @@
       INTEGER            I, IINFO, J, LWKOPT, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZUNGQL, ZUNGQR
@@ -23121,10 +23005,6 @@
       INTEGER            I, I1, I2, I3, IC, JC, MI, NI, NQ
       COMPLEX*16         AII, TAUI
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZLARF
 *     ..
@@ -23350,9 +23230,8 @@
       INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZUNMLQ, ZUNMQR
@@ -23610,10 +23489,6 @@
       INTEGER            I, I1, I2, I3, IC, JC, MI, NI, NQ
       COMPLEX*16         AII, TAUI
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZLACGV, ZLARF
 *     ..
@@ -23828,9 +23703,8 @@
       COMPLEX*16         T( LDT, NBMAX )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNML2
@@ -24094,9 +23968,8 @@
       COMPLEX*16         T( LDT, NBMAX )
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           ILAENV
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNM2R
--- R-2.10.1/src/library/stats/src/loessf.f.orig	Fri Mar 20 00:05:12 2009
+++ R-2.10.1/src/library/stats/src/loessf.f	Sat Dec 19 07:59:31 2009
@@ -240,11 +240,10 @@
      +     colnor(15),dist(n),eta(nf),dgamma(15),q(d),qraux(15),rw(n),
      +     s(0:od),w(nf),work(15),x(n,d),y(n)
 
-      integer idamax
-      double precision d1mach, ddot
+      double precision d1mach
 
       external ehg106,ehg182,ehg184,dqrdc,dqrsl,dsvdc
-      external idamax, d1mach, ddot
+      external d1mach
 
       save machep,execnt
       data execnt /0/
@@ -430,8 +429,6 @@
      +     eta(nf),rw(n),v(nvmax,d),vval(0:d,nvmax),vval2(0:d,nvmax),
      +     w(nf),x(n,d),xi(ncmax),y(n)
       external ehg126,ehg182,ehg139,ehg124
-      double precision dnrm2
-      external dnrm2
 c     Identity -> identi
 c     X -> b
       if(.not.(d.le.8))then
@@ -555,8 +552,6 @@
       integer i,j,n
       double precision delta1,delta2,trl
       double precision l(n,n),ll(n,n)
-      double precision ddot
-      external ddot
 c     compute $LL~=~(I-L)(I-L)'$
       do 3 i=1,n
 	 l(i,i)=l(i,i)-1
@@ -1226,8 +1221,6 @@
      $     u(lm,d),w(nf),work(15),x(n,d),y(n)
 
       external ehg127,ehg182,dqrsl
-      double precision ddot
-      external ddot
 
 c     V -> g
 c     U -> e
@@ -1348,8 +1341,6 @@
       external ehg127,ehg182,DQRSL,ehg137
       DOUBLE PRECISION ehg128
       external ehg128
-      DOUBLE PRECISION DDOT
-      external DDOT
 
 c     V -> e
 c     Identity -> identi
@@ -1855,8 +1846,6 @@
       DOUBLE PRECISION diam,diag(8),sigma(8)
 
       external ehg125,ehg106,ehg129
-      integer IDAMAX
-      external IDAMAX
       p=1
       l=ll
       u=uu
