From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10071 invoked from network); 30 Oct 2001 16:23:41 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?fMFHUqBLUt3rje+hF9HQ+gvomX++Ftp8?@203.24.36.3) by ns1.primenet.com.au with SMTP; 30 Oct 2001 16:23:41 -0000 Received: (qmail 1959 invoked from network); 30 Oct 2001 16:23:40 -0000 Received: from sunsite.dk (130.225.247.90) by proxy.melb.primenet.com.au with SMTP; 30 Oct 2001 16:23:40 -0000 Received: (qmail 25152 invoked by alias); 30 Oct 2001 16:23:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16191 Received: (qmail 25141 invoked from network); 30 Oct 2001 16:23:33 -0000 X-VirusChecked: Checked Sender: kiddleo@cav.logica.co.uk Message-ID: <3BDED3E8.9D2B2B47@yahoo.co.uk> Date: Tue, 30 Oct 2001 16:23:04 +0000 From: Oliver Kiddle X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.dk Subject: printf Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit In case anyone was unsure, printf is not entirely finished. I've got a couple more questions before I do any more on it though. I have established that the ksh behaviour of -r with -f is not going to change (they can't be used together). This leaves the possibility of overloading the -r option to prevent format reuse when combined with -f. Does anyone have any preference on whether I should overload this option letter or use a different letter (for which I can't think of a suitable available letter)? As Peter suggested a while back, the ideal would be to update convfloat() and convbase() to be flexible enough to do the outputting. Currently convfloat() just uses printf(3). Does anyone know of any established algorithms for converting floats to their ASCII representations? Or does anyone have any suitable code I could crib? I expect that something of this sort exists and would be better than whatever I might re-invent. I'd like to be able to support the ' (thousand grouping) and I (use locale format) flags and the a,A,F conversion specifiers. I'd also like to try to handle this sort of thing better: printf '%*s' 100000000 ' ' > /tmp/f and of course, allow print -f to be used with -s and -z. Oliver _____________________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp