From: Jim Meyering Date: Fri, 16 Dec 2005 15:06:54 +0000 (+0000) Subject: from coreutils X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ad9e70ea493822d22c718d3d70e163a2051dfa6;p=pspp from coreutils --- diff --git a/lib/fprintftime.c b/lib/fprintftime.c new file mode 100644 index 0000000000..879726bec7 --- /dev/null +++ b/lib/fprintftime.c @@ -0,0 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "fprintftime.h" +#define FPRINTFTIME 1 +#include "strftime.c" diff --git a/lib/fprintftime.h b/lib/fprintftime.h new file mode 100644 index 0000000000..38fef43f15 --- /dev/null +++ b/lib/fprintftime.h @@ -0,0 +1,12 @@ +#include +#include + +/* 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);