| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/t-printf.c (check_fwrite): New.
(main): Add check_fwrite.
* tests/t-strerror.c (main): Add three more cases to LIST.
--
The string in check_fwrite is from the Gateless Gate, for
people who want to discuss "Niente". --- gniibe
Co-authored-by: NIIBE Yutaka <gniibe@fsij.org>
Signed-off-by: "pengyi" <pengyi37@huawei.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* src/estream-printf.c: Replace HAVE_LANGINFO_THOUSANDS_SEP by
HAVE_LANGINFO_THOUSEP.
(pr_integer): Use THOUSEP.
--
GnuPG-bug-id: 4286
Reported-by: miod
Signed-off-by: Werner Koch <wk@gnupg.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (gpgrt_string_filter_t): New type.
(gpgrt_fprintf_sf, gpgrt_fprintf_sf_unlocked): New.
* src/gpg-error.vers, src/gpg-error.def.in: Add them.
* src/visibility.c (gpgrt_fprintf_sf): New.
(gpgrt_fprintf_sf_unlocked): New.
* src/estream-printf.c (pr_string): Add and use args sf, sfvalue and
string_no.
(do_format): Add args sf and sfvalue. Keep a string format counter.
(_gpgrt_estream_format): Add args sf and sfvalue. Change all callers
to provide NULL for them.
* src/estream.c (_gpgrt_vfprintf_unlocked, _gpgrt_vfprintf): Add sf
and sfvalue and adjust all callers.
(do_print_stream): Ditto.
* tests/t-printf.c (stream_to_string): New.
(struct sfstate_s): New.
(string_filter): New.
(check_fprintf_sf): New.
(main): Call new test.
--
The actual reason to implement these functions is to enhance the
internal logging function with a filter to sanitized strings so that
control values or other things can be quoted.
Signed-off-by: Werner Koch <wk@gnupg.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
* use https for bug reporting
* in comments and docs, use https to refer to:
- www.gnu.org
- creativecommons.org
- translationproject.org
- mail.gnome.org
- www.perl.org
- www.ctan.org
- www.cl.cam.ac.uk
- www.ntg.nl
- cygwin.com
- www.ethnologue.com
|
|
* tests/t-printf.c: New.
* configure.ac: Check for vasprintf.
--
These tests have been taken from Libestream and changed to be more
portable. For example there is only va_start per function and the
test return an error only for _GLIBC_ based systems because that is
what we compare against.
|