Kaynağa Gözat

main/enquire.c: always use a minimum width of 80 in list1package

Wichert Akkerman 26 yıl önce
ebeveyn
işleme
00ed2062d2
2 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 1 0
      ChangeLog
  2. 1 0
      main/enquiry.c

+ 1 - 0
ChangeLog

@@ -4,6 +4,7 @@ Sat Dec 25 04:04:48 CET 1999 Wichert Akkerman <wakkerma@debian.org>
     the 8th bit of characters
     the 8th bit of characters
   * Replace `Debian Linux' with `Debian GNU/Linux' in some more places
   * Replace `Debian Linux' with `Debian GNU/Linux' in some more places
   * Update Spanish translation
   * Update Spanish translation
+  * main/enquire.c: always use a minimum width of 80 in list1package
 
 
 Sat Dec 25 02:50:31 CET 1999 Wichert Akkerman <wakkerma@debian.org>
 Sat Dec 25 02:50:31 CET 1999 Wichert Akkerman <wakkerma@debian.org>
 
 

+ 1 - 0
main/enquiry.c

@@ -78,6 +78,7 @@ static void list1package(struct pkginfo *pkg, int *head) {
   char format[80];
   char format[80];
     
     
   w=getttywidth()-(3+1+15+1+14+1+44); /* get spare width */
   w=getttywidth()-(3+1+15+1+14+1+44); /* get spare width */
+  if (w<80) w=80; /* lets not try to deal with terminals that are too small */
   w>>=1; /* halve that so we can add that to the both the name and description */
   w>>=1; /* halve that so we can add that to the both the name and description */
   sprintf(format,"%%c%%c%%c %%-%d.%ds %%-14.14s %%.*s\n", (14+w), (14+w));
   sprintf(format,"%%c%%c%%c %%-%d.%ds %%-14.14s %%.*s\n", (14+w), (14+w));