From 62b497f2b502fbf9ab322acf210f52d4871a19fb Mon Sep 17 00:00:00 2001 From: John Benediktsson <mrjbq7@gmail.com> Date: Mon, 15 Dec 2008 15:08:46 -0800 Subject: [PATCH 1/2] Update formatting docs. --- extra/formatting/formatting-docs.factor | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/extra/formatting/formatting-docs.factor b/extra/formatting/formatting-docs.factor index c249f1d6f3..4203dd891f 100644 --- a/extra/formatting/formatting-docs.factor +++ b/extra/formatting/formatting-docs.factor @@ -49,27 +49,27 @@ HELP: printf } { $examples { $example - "USING: printf ;" + "USING: formatting ;" "123 \"%05d\" printf" "00123" } { $example - "USING: printf ;" + "USING: formatting ;" "HEX: ff \"%04X\" printf" "00FF" } { $example - "USING: printf ;" + "USING: formatting ;" "1.23456789 \"%.3f\" printf" "1.235" } { $example - "USING: printf ;" + "USING: formatting ;" "1234567890 \"%.5e\" printf" "1.23457e+09" } { $example - "USING: printf ;" + "USING: formatting ;" "12 \"%'#4d\" printf" "##12" } { $example - "USING: printf ;" + "USING: formatting ;" "1234 \"%+d\" printf" "+1234" } } ; @@ -109,6 +109,12 @@ HELP: strftime { "%Z" "Time zone name (no characters if no time zone exists)." } { "%%" "A literal '%' character." } } +} +{ $examples + { $example + "USING: calendar formatting ;" + "now \"%c\" strftime" + "Mon Dec 15 14:40:43 2008" } } ; ARTICLE: "formatting" "Formatted printing" From 2c23d2ac4d7b8257f609b0e65f0439e2ede8ef2b Mon Sep 17 00:00:00 2001 From: John Benediktsson <mrjbq7@gmail.com> Date: Mon, 15 Dec 2008 15:09:18 -0800 Subject: [PATCH 2/2] Update use of old printf vocabulary. --- extra/webapps/irc-log/irc-log.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/webapps/irc-log/irc-log.factor b/extra/webapps/irc-log/irc-log.factor index c193550719..bd9843bdc9 100644 --- a/extra/webapps/irc-log/irc-log.factor +++ b/extra/webapps/irc-log/irc-log.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: calendar kernel http.server.dispatchers prettyprint -sequences printf furnace.actions html.forms accessors +sequences formatting furnace.actions html.forms accessors furnace.redirection ; IN: webapps.irc-log