bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* new module suggestion: fprintftime-check
@ 2018-12-28 10:49 Assaf Gordon
  2018-12-28 16:34 ` Bruno Haible
  0 siblings, 1 reply; 12+ messages in thread
From: Assaf Gordon @ 2018-12-28 10:49 UTC (permalink / raw)
  To: bug-gnulib@gnu.org List

[-- Attachment #1: Type: text/plain, Size: 648 bytes --]

Hello,

I'd like to suggest the following new module: fprintftime-check.
It uses the same infrastructure as fprintftime
(i.e. #include "nstrtime,c") to implement a new function:

   int fprintftime_check (const char *format, const char** err_ptr);

This function enables syntax-check of the format string.
Current implementation of nstrtime/fprintftime silently ignore
bad formats.

With this module, it will be possible to detect/warn/reject
invalid format strings in coreutils' date(1)
( https://bugs.gnu.org/16782 ).

This patch is only a rough draft - everything can be changed (including 
the name).

Comments and feedback welcomed,
  - assaf

[-- Attachment #2: 0001-fprintftime-check-new-module-for-fprintftime-format-.patch.gz --]
[-- Type: application/gzip, Size: 5030 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-01-05 12:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28 10:49 new module suggestion: fprintftime-check Assaf Gordon
2018-12-28 16:34 ` Bruno Haible
2018-12-28 20:09   ` Assaf Gordon
2018-12-29  6:08     ` Bruno Haible
2018-12-29 15:21       ` Assaf Gordon
2019-01-02  8:03       ` Florian Weimer
2019-01-05 10:40         ` Bruno Haible
2019-01-05 12:43           ` Florian Weimer
2018-12-29 17:22     ` Paul Eggert
2018-12-29 17:48       ` Ben Pfaff
2018-12-31  1:40         ` Paul Eggert
2019-01-05 10:37           ` preferring ptrdiff_t to size_t Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).