1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* filter.h, armor.c (armor_filter): Use the eol string from the armor

filter context instead of hardcoding '\n' or '\r\n'.  If no eol string is
provided, default to '\n' or '\r\n' as appropriate. (is_armor_header):
Trim tabs in armor header lines as well.

* keyserver.c (keyserver_spawn): Use it here to force '\n' line endings
since the keyserver output file gets a LF->CRLF expansion on win32.
This commit is contained in:
David Shaw 2005-01-06 16:23:47 +00:00
parent 9dc1bcc4ea
commit f464dcef59
4 changed files with 66 additions and 28 deletions

View file

@ -1,5 +1,5 @@
/* keyserver.c - generic keyserver code
* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
* Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -966,6 +966,13 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
memset(&afx,0,sizeof(afx));
afx.what=1;
/* Tell the armor filter to use Unix-style \n line
endings, since we're going to fprintf this to a file
that (on Win32) is open in text mode. The win32 stdio
will transform the \n to \r\n and we'll end up with the
proper line endings on win32. This is a no-op on
Unix. */
afx.eol[0]='\n';
iobuf_push_filter(buffer,armor_filter,&afx);
/* TODO: Remove Comment: lines from keys exported this