Move variables to the scope where they are used.
authorayin <ayin>
Sun, 17 Feb 2008 12:21:45 +0000 (12:21 +0000)
committerayin <ayin>
Sun, 17 Feb 2008 12:21:45 +0000 (12:21 +0000)
src/scrollbar.C

index ef9fa555ea38deb85dec1c84c6dffb555a7fb927..9cf828bc7d9a619f03dac8a6ae4fbfcada79694d 100644 (file)
@@ -141,17 +141,16 @@ int
 rxvt_term::scrollbar_show (int update)
 {
   int             ret = 0;
-  int             top, bot, len, adj;
 
   if (!scrollBar.state)
     return 0;
 
   if (update)
     {
-      top = view_start - top_row;
-      bot = top + (nrow - 1);
-      len = max (nrow - 1 - top_row, 1);
-      adj = (((bot - top) * scrollBar.size ()) % len) > 0 ? 1 : 0;
+      int top = view_start - top_row;
+      int bot = top + (nrow - 1);
+      int len = max (nrow - 1 - top_row, 1);
+      int adj = (((bot - top) * scrollBar.size ()) % len) > 0 ? 1 : 0;
 
       scrollBar.top = (scrollBar.beg + (top * scrollBar.size ()) / len);
       scrollBar.len = ((bot - top) * scrollBar.size ()) / len +