]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes some potential issues with invalid term size in clients.
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 20 Nov 2013 12:25:33 +0000 (13:25 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Wed, 20 Nov 2013 12:25:33 +0000 (13:25 +0100)
client/birdc.c
client/birdcl.c
client/client.c

index 9dd6d9b9aef2be686baf4777e8a15edd3c495946..bbe18331bda8be1203aa0e7101a9072a8ff90aa9 100644 (file)
@@ -148,8 +148,8 @@ input_init(void)
   rl_callback_handler_install("bird> ", input_got_line);
 
   // rl_get_screen_size();
-  term_lns = LINES ? LINES : 25;
-  term_cls = COLS ? COLS : 80;
+  term_lns = LINES;
+  term_cls = COLS;
 
   prompt_active = 1;
 
index c41b046c012bb64b7cbfe59deb8ebbe8a600882b..2d5e10678cf9e0757ca8571b2b9c8a0a32527b33 100644 (file)
@@ -150,11 +150,6 @@ input_init(void)
       term_lns = tws.ws_row;
       term_cls = tws.ws_col;
     }
-  else
-    {
-       term_lns = 25;
-       term_cls = 80;
-    }
 }
 
 void
index 61caf38b0956080706eef3bcc4cab7166cce7aed..a9d0096d952f164a0b325e7f33768a6f3f0e9199 100644 (file)
@@ -178,6 +178,10 @@ init_commands(void)
     }
 
   input_init();
+
+  term_lns = (term_lns > 0) ? term_lns : 25;
+  term_cls = (term_cls > 0) ? term_cls : 80;
+
   init = 0;
 }