Date: Mon, 20 Jan 2003 12:18:51 +0100 From: Miguel Mendez <flynn@energyhq.homeip.net> To: hackers@freebsd.org Subject: RFC: Adding a new (safer) data entry function to libdialog Message-ID: <20030120121851.30ff961f.flynn@energyhq.homeip.net>
next in thread | raw e-mail | index | archive | help
--=.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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030120121851.30ff961f.flynn>