From owner-freebsd-hackers Wed Nov 8 15:43:10 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA28461 for hackers-outgoing; Wed, 8 Nov 1995 15:43:10 -0800 Received: from time.cdrom.com (time.cdrom.com [192.216.222.226]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id PAA28455 for ; Wed, 8 Nov 1995 15:43:07 -0800 Received: from localhost (localhost [127.0.0.1]) by time.cdrom.com (8.6.12/8.6.9) with SMTP id PAA29560; Wed, 8 Nov 1995 15:42:41 -0800 To: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) cc: FreeBSD hackers , Joerg Wunsch Subject: Re: Ack! Help, Andrey! I'm having troubles in libdialog! In-reply-to: Your message of "Wed, 08 Nov 1995 18:26:57 +0300." Date: Wed, 08 Nov 1995 15:42:41 -0800 Message-ID: <29558.815874161@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-hackers@freebsd.org Precedence: bulk > char *it = malloc(nitems); > > ... dialog_checklist(..., NULL, it); > \ \ > result new argument > > for (i = 0; i < nitems; i++) > if (it[i]) > printf ("Item #%d choosed\n", i); Hmmm. Since we're making such changes, why not just replace the result string with an array for checklist items? You'll need to go whack on the dialog(1) stuff anyway or get warnings about the missing parameter. The way it currently returns one string with newlines, all concatenated together, is pretty bogus anyway and I can't see any reason to preserve that behavior. Jordan