diff options
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/editfns.c b/src/editfns.c index a5f39870000..7364a5bcf15 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -45,6 +45,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif #include <ctype.h> +#include <strftime.h> #include "intervals.h" #include "buffer.h" @@ -82,9 +83,6 @@ extern char **environ; (1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE) #endif -extern size_t emacs_strftimeu (char *, size_t, const char *, - const struct tm *, int); - #ifdef WINDOWSNT extern Lisp_Object w32_get_internal_run_time (void); #endif @@ -1556,8 +1554,8 @@ or (if you need time as a string) `format-time-string'. */) determine how many bytes would be written, use NULL for S and ((size_t) -1) for MAXSIZE. - This function behaves like emacs_strftimeu, except it allows null - bytes in FORMAT. */ + This function behaves like nstrftime, except it allows null + bytes in FORMAT and it does not support nanoseconds. */ static size_t emacs_memftimeu (char *s, size_t maxsize, const char *format, size_t format_len, const struct tm *tp, int ut) { @@ -1566,7 +1564,7 @@ emacs_memftimeu (char *s, size_t maxsize, const char *format, size_t format_len, /* Loop through all the null-terminated strings in the format argument. Normally there's just one null-terminated string, but there can be arbitrarily many, concatenated together, if the - format contains '\0' bytes. emacs_strftimeu stops at the first + format contains '\0' bytes. nstrftime stops at the first '\0' byte so we must invoke it separately for each such string. */ for (;;) { @@ -1576,7 +1574,7 @@ emacs_memftimeu (char *s, size_t maxsize, const char *format, size_t format_len, if (s) s[0] = '\1'; - result = emacs_strftimeu (s, maxsize, format, tp, ut); + result = nstrftime (s, maxsize, format, tp, ut, 0); if (s) { |