aboutsummaryrefslogtreecommitdiffstats
path: root/common/t-stringhelp.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-01-08common: New function compare_version_strings.Werner Koch1-1/+62
* common/stringhelp.c (parse_version_number): New. (parse_version_string): New. (compare_version_strings): New. * common/t-stringhelp.c (test_compare_version_strings): New. (main): Call test. Return ERRCOUNT instead of 0. -- The code for that function is based on code from libgcrypt. Similar code is in all GnuPG related libraries this function is a candidates for inclusion in libgpg-error. Signed-off-by: Werner Koch <[email protected]>
2016-01-06common: Do not deref vars in tests after a fail().Werner Koch1-16/+16
* common/t-convert.c (test_bin2hex): Turn if conditions into if-else chains to avoid accessing unchecked data. (test_bin2hexcolon): Ditto. * common/t-mapstrings.c (test_map_static_macro_string): Ditto. * common/t-stringhelp.c (test_percent_escape): Ditto. (test_make_filename_try): Ditto. (test_make_absfilename_try): Ditto. * common/t-timestuff.c (test_timegm): Ditto. -- Note that these dereference only occur after failed regression tests. Signed-off-by: Werner Koch <[email protected]>
2015-12-12Remove replacements for libgpg-error < 1.21.Werner Koch1-2/+1
* common/util.h: Remove replacement macros for libgpg-error<1.21. * common/types.h: Ditto. * common/mischelp.h: Ditto. * common/t-mapstrings.c: Include t-support.h before stringhelp.h * common/t-stringhelp.c: Ditto. * common/t-support.h: Always include gpg-error.h. * kbx/keybox-search.c: Do not include stringhelp.h so that keybox-defs comes first. -- This patch enhances commit d6e0149 from Dec 10. Signed-off-by: Werner Koch <[email protected]>
2015-11-23gpg: Reflow long texts.Neal H. Walfield1-0/+137
* common/stringhelp.c (format_text): New function. * common/t-stringhelp.c (stresc): New function. (test_format_text): New function. Test format_text. * g10/tofu.c (get_trust): Use format_text to reflow long texts. (show_statistics): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]>
2015-06-22common: Add function strtokenize.Werner Koch1-0/+141
* common/stringhelp.c: Include assert.h. (strtokenize): New. * common/t-stringhelp.c (test_strtokenize): New. Signed-off-by: Werner Koch <[email protected]>
2015-04-24common: Remove JNLIB from boiler plate (jnlib merge).Werner Koch1-3/+3
* common/README.jnlib: Remove. -- This is the final part of merging jnlib into gnupg/common.
2015-04-13common: Do without nested fucntions to support non-gcc.Werner Koch1-52/+54
* common/t-stringhelp.c (test_strsplit): Remove nested function. Signed-off-by: Werner Koch <[email protected]>
2015-03-23common: Add new helper function, strsplit.Neal H. Walfield1-0/+58
* common/stringhelp.h (strsplit): New declaration. * common/stringhelp.c (strsplit): New function. * common/t-stringhelp.c (test_strsplit): New function. (main): Call it here. -- Signed-off-by: Neal H. Walfield <[email protected]>
2014-04-22common: Add functions make_absfilename and make_absfilename_try.Werner Koch1-0/+73
* common/stringhelp.c (do_make_filename): Add modes 2 and 3. (make_absfilename): New. (make_absfilename_try): New.
2011-09-30Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch1-7/+18
This is to allow the use of this code with code under GPLv2(only).
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-11/+10
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2010-03-10Merged jnlib into common.Werner Koch1-0/+0
2010-02-26First batch of changes to support W32CE.Werner Koch1-1/+1
Note that jnlib/w32-reg.c is not yet ready.
2009-08-26Implement tilde expansion in the same was as 1.4.Werner Koch1-0/+137
2009-08-25New fucntions strconcat and xstrconcat.Werner Koch1-0/+145
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-0/+3
2007-08-02Factored common gpgconf constants outWerner Koch1-0/+37
Fixed W32 compare_filenames
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-06-19Made percent_escape more general.Werner Koch1-0/+94
Added regression tests support to jnlib. W32 changes.