--- src/cggbal.f	Thu Dec  5 20:18:06 2002
+++ debian/updates/src/cggbal.f	Wed Dec  4 15:23:42 2002
@@ -4,7 +4,7 @@
 *  -- LAPACK routine (version 3.0) --
 *     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
 *     Courant Institute, Argonne National Lab, and Rice University
-*     September 30, 1994
+*     April 12, 2001
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB
@@ -150,7 +150,7 @@
       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
          INFO = -4
       ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
-         INFO = -5
+         INFO = -6
       END IF
       IF( INFO.NE.0 ) THEN
          CALL XERBLA( 'CGGBAL', -INFO )
@@ -197,8 +197,8 @@
       IF( L.NE.1 )
      $   GO TO 30
 *
-      RSCALE( 1 ) = 1
-      LSCALE( 1 ) = 1
+      RSCALE( 1 ) = ONE
+      LSCALE( 1 ) = ONE
       GO TO 190
 *
    30 CONTINUE
@@ -256,7 +256,7 @@
 *     Permute rows M and I
 *
   160 CONTINUE
-      LSCALE( M ) = I
+      LSCALE( M ) = REAL( I )
       IF( I.EQ.M )
      $   GO TO 170
       CALL CSWAP( N-K+1, A( I, K ), LDA, A( M, K ), LDA )
@@ -265,7 +265,7 @@
 *     Permute columns M and J
 *
   170 CONTINUE
-      RSCALE( M ) = J
+      RSCALE( M ) = REAL( J )
       IF( J.EQ.M )
      $   GO TO 180
       CALL CSWAP( L, A( 1, J ), 1, A( 1, M ), 1 )
@@ -437,7 +437,7 @@
       DO 360 I = ILO, IHI
          IRAB = ICAMAX( N-ILO+1, A( I, ILO ), LDA )
          RAB = ABS( A( I, IRAB+ILO-1 ) )
-         IRAB = ICAMAX( N-ILO+1, B( I, ILO ), LDA )
+         IRAB = ICAMAX( N-ILO+1, B( I, ILO ), LDB )
          RAB = MAX( RAB, ABS( B( I, IRAB+ILO-1 ) ) )
          LRAB = INT( LOG10( RAB+SFMIN ) / BASL+ONE )
          IR = LSCALE( I ) + SIGN( HALF, LSCALE( I ) )
