From: Paul Eggert Date: Wed, 9 Sep 1998 21:33:50 +0000 (+0000) Subject: Add a comment to emacs_memftime, explaining why it needs to loop. X-Git-Tag: emacs-20.4~1731 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=be09e6e6bf034742e081b3d021a6df8fbb6151cd;p=emacs.git Add a comment to emacs_memftime, explaining why it needs to loop. --- diff --git a/src/editfns.c b/src/editfns.c index 619280d73d5..cf88d69d23b 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -866,6 +866,11 @@ emacs_memftime (s, maxsize, format, format_len, tp) { size_t total = 0; + /* 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_strftime stops at the first + '\0' byte so we must invoke it separately for each such string. */ for (;;) { size_t len;