From owner-freebsd-hackers Mon Jan 20 3:19:27 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE73F37B401 for ; Mon, 20 Jan 2003 03:19:25 -0800 (PST) Received: from energyhq.homeip.net (213-97-200-73.uc.nombres.ttd.es [213.97.200.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6ADE343F18 for ; Mon, 20 Jan 2003 03:19:24 -0800 (PST) (envelope-from flynn@energyhq.homeip.net) Received: from christine.energyhq.tk (christine.energyhq.tk [192.168.0.1]) by energyhq.homeip.net (Postfix) with SMTP id A3414AF5A6 for ; Mon, 20 Jan 2003 12:19:21 +0100 (CET) Date: Mon, 20 Jan 2003 12:18:51 +0100 From: Miguel Mendez To: hackers@freebsd.org Subject: RFC: Adding a new (safer) data entry function to libdialog Message-Id: <20030120121851.30ff961f.flynn@energyhq.homeip.net> X-Mailer: Sylpheed version 0.8.9 (GTK+ 1.2.10; i386-portbld-freebsd5.0) X-Face: 1j}k*2E>Y\+C~E|/wehi[:dCM,{N7/uE 3o# P,{t7gA/qnovFDDuyQV.1hdT7&#d)q"xY33}{_GS>kk'S{O]nE$A`T|\4&p\&mQyexOLb8}FO List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=.bazDYk+xshb?Om Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello hackers, Currently, when one wants the user to enter data in a libdialog based program, one uses the following function: int dialog_inputbox(unsigned char *title, unsigned char *prompt, int height, int width, unsigned char *result); The problem this routine has, is that there's nowhere to specify the max length of the input buffer (think gets vs fgets here). I know that not many programs use this lib, or even if there are plans to EOL it, but this change could be helpful IMHO. My suggestion is to create a new function, e.g, dialog_inputbox_n that would let you specify the length of the input buffer. Comments? Ideas? If people find it useful I can come with patches, since the implementation would be trivial. Cheers, -- Miguel Mendez - flynn@energyhq.homeip.net GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt EnergyHQ :: http://www.energyhq.tk Of course it runs NetBSD! --=.bazDYk+xshb?Om Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+K9sfnLctrNyFFPERAs6rAKCbS1HupNDL3zTAaUEvh+qjsfVUOACffRoa Q4wPXJUpDPpjHoMK61DIR6g= =jSHK -----END PGP SIGNATURE----- --=.bazDYk+xshb?Om-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message