Просмотр исходного кода

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

Wichert Akkerman лет назад: 26
Родитель
Сommit
00ed2062d2
2 измененных файлов с 2 добавлено и 0 удалено
  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
   * Replace `Debian Linux' with `Debian GNU/Linux' in some more places
   * 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>
 

+ 1 - 0
main/enquiry.c

@@ -78,6 +78,7 @@ static void list1package(struct pkginfo *pkg, int *head) {
   char format[80];
     
   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 */
   sprintf(format,"%%c%%c%%c %%-%d.%ds %%-14.14s %%.*s\n", (14+w), (14+w));