From 00ed2062d28d56c08e450135159b89e83dfca1bd Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Sat, 25 Dec 1999 03:33:37 +0000 Subject: [PATCH] main/enquire.c: always use a minimum width of 80 in list1package --- ChangeLog | 1 + main/enquiry.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1081c4f0..afb6a4c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Sat Dec 25 04:04:48 CET 1999 Wichert Akkerman 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 diff --git a/main/enquiry.c b/main/enquiry.c index e164d9f3..eec32bba 100644 --- a/main/enquiry.c +++ b/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)); -- 2.39.5