Subject: new stdlib?
To: None <netbsd-help@netbsd.org>
From: Berndt Josef Wulf <wulf@ping.net.au>
List: netbsd-help
Date: 02/08/2000 23:40:37
G'day,
does anyone know the following construct? It was found in anteater
which segfaults at that point.
[...]
sprintf( c_datestring, "year %1$02d, day %2$02d, month %3$04d",
(int)tmdate.tm_mday, (int)tmdate.tm_mon+1,
(int)tmdate.tm_year+1900 );
string newdate = c_datestring;
return newdate;
I've expanded the format string which is constructed earlier
in the code. I've never seen the use of a "%1$02d" format string nor have I
found any references in books and manuals. When changed to
"%02d" the program runs fine and displays the correct date format.
Is there a new stdlib with extentions of the current format string? I am
using egcs-1.1.1 and standard libraries as shipped with NetBSD-1.4.1.
Many thanks in advance...
cheerio Berndt
--
Name : Berndt Josef Wulf | +++ With BSD on Packet Radio +++
E-Mail : wulf@ping.net.au | tfkiss, tnt, dpbox, wampes
ICQ : 18196098 | VK5ABN, Nairne, South Australia
URL : http://www.ping.net.au/~wulf | MBOX : vk5abn@vk5abn.#lmr.#sa.au.oc
Sysinfo : DEC AXPpci33+, NetBSD-1.4 | BBS : vk5abn.#lmr.#sa.aus.oc