[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new module suggestion: fprintftime-check
From: |
Assaf Gordon |
Subject: |
new module suggestion: fprintftime-check |
Date: |
Fri, 28 Dec 2018 03:49:09 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
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
0001-fprintftime-check-new-module-for-fprintftime-format-.patch.gz
Description: application/gzip
- new module suggestion: fprintftime-check,
Assaf Gordon <=