summaryrefslogtreecommitdiff
path: root/lib/fprintftime.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-09-16 07:01:00 +0000
committerJim Meyering <jim@meyering.net>2005-09-16 07:01:00 +0000
commitab526003e4d96ff963448f05c6809febb0475a5b (patch)
tree9039226a7cd80dd00c99aeafe404d2f21f23b638 /lib/fprintftime.h
parentf7711ee6997cf6b92cbee6fa3fdc04af9f84f10a (diff)
downloadcoreutils-ab526003e4d96ff963448f05c6809febb0475a5b.tar.xz
*** empty log message ***
Diffstat (limited to 'lib/fprintftime.h')
-rw-r--r--lib/fprintftime.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/fprintftime.h b/lib/fprintftime.h
new file mode 100644
index 000000000..38fef43f1
--- /dev/null
+++ b/lib/fprintftime.h
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include <time.h>
+
+/* A cross between fprintf and nstrftime, that prints directly
+ to the output stream, without the need for the potentially
+ large buffer that nstrftime would require.
+
+ Output to stream FP the result of formatting (according to the
+ nstrftime format string, FMT) the time data, *TM, and the UTC
+ and NANOSECONDS values. */
+size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
+ int utc, int nanoseconds);