aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringhelp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-10-15 09:32:19 +0000
committerWerner Koch <[email protected]>2018-10-15 09:45:14 +0000
commitf03928b16c4fb00077d22d8ec141575ef6d26913 (patch)
tree1221cf48e1a69591f8c3e8b0d6960ab9437a0fde /common/stringhelp.c
parentscd: Fix signing authentication status. (diff)
downloadgnupg-f03928b16c4fb00077d22d8ec141575ef6d26913.tar.gz
gnupg-f03928b16c4fb00077d22d8ec141575ef6d26913.zip
tools: Replace duplicated code in mime-maker.
* tools/rfc822parse.c (HEADER_NAME_CHARS): New. Taken from mime-maker.c. (rfc822_valid_header_name_p): New. Based on code from mime-maker.c. (rfc822_capitalize_header_name): New. Copied from mime-maker.c. (capitalize_header_name): Remove. Replace calls by new func. (my_toupper, my_strcasecmp): New. * tools/mime-maker.c: Include rfc822parse.h. (HEADER_NAME_CHARS, capitalize_header_name): Remove. (add_header): Replace check and capitalization by new functions. -- This is a straightforward change with two minor chnages: - In rfc822parse.c the capitalization handles MIME-Version special. - The check in mime-maker bow detects a zero-length name as invalid. my_toupper and my_strcasecmp are introduced to allow standalone use of that file. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/stringhelp.c')
0 files changed, 0 insertions, 0 deletions