From owner-freebsd-hackers Wed Nov 8 07:29:42 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id HAA08665 for hackers-outgoing; Wed, 8 Nov 1995 07:29:42 -0800 Received: from sequent.kiae.su (sequent.kiae.su [144.206.136.6]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id HAA08658 for ; Wed, 8 Nov 1995 07:29:28 -0800 Received: by sequent.kiae.su id AA17782 (5.65.kiae-2 ); Wed, 8 Nov 1995 18:28:43 +0300 Received: by sequent.KIAE.su (UUMAIL/2.0); Wed, 8 Nov 95 18:28:40 +0300 Received: (from ache@localhost) by ache.dialup.demos.ru (8.6.12/8.6.12) id SAA00279; Wed, 8 Nov 1995 18:26:58 +0300 To: "Jordan K. Hubbard" Cc: FreeBSD hackers , Joerg Wunsch References: <26374.815839706@time.cdrom.com> In-Reply-To: <26374.815839706@time.cdrom.com>; from "Jordan K. Hubbard" at Wed, 08 Nov 1995 06:08:26 -0800 Message-Id: Organization: Olahm Ha-Yetzirah Date: Wed, 8 Nov 1995 18:26:57 +0300 (MSK) X-Mailer: Mail/@ [v2.40 FreeBSD] From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) X-Class: Fast Subject: Re: Ack! Help, Andrey! I'm having troubles in libdialog! Lines: 30 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 984 Sender: owner-hackers@freebsd.org Precedence: bulk In message <26374.815839706@time.cdrom.com> Jordan K. Hubbard writes: >> I can make checklist function understand NULL and do nothing >> for 'result' arg and pass char array as yet one additional arg, i.e. >> char hit[nitems]. When function returns, it will have 1 for >> selected items and 0 for others. Is it what you want here? >I'm not sure I understand this exactly. Could you perhaps clarify it >with a little function prototype and a short explanation of the >returned values? I mean: 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); free(it); -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - http://dt.demos.su/~ache : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849