[svn] gpgme - r1176 - trunk/gpgme
svn author marcus
cvs at cvs.gnupg.org
Sun Jul 16 15:27:09 CEST 2006
Author: marcus
Date: 2006-07-16 15:27:08 +0200 (Sun, 16 Jul 2006)
New Revision: 1176
Modified:
trunk/gpgme/ChangeLog
trunk/gpgme/genkey.c
trunk/gpgme/rungpg.c
trunk/gpgme/version.c
Log:
2006-07-16 Marcus Brinkmann <marcus at g10code.de>
* rungpg.c (read_status): Strip potential carriage return.
* genkey.c (get_key_parameter): Skip potential carriage return.
* version.c (_gpgme_get_program_version): Strip potential carriage
return.
Modified: trunk/gpgme/ChangeLog
===================================================================
--- trunk/gpgme/ChangeLog 2006-07-16 13:25:19 UTC (rev 1175)
+++ trunk/gpgme/ChangeLog 2006-07-16 13:27:08 UTC (rev 1176)
@@ -1,5 +1,10 @@
2006-07-16 Marcus Brinkmann <marcus at g10code.de>
+ * rungpg.c (read_status): Strip potential carriage return.
+ * genkey.c (get_key_parameter): Skip potential carriage return.
+ * version.c (_gpgme_get_program_version): Strip potential carriage
+ return.
+
* data.c (gpgme_data_set_file_name): Allow to clear the file name
by passing NULL.
Modified: trunk/gpgme/genkey.c
===================================================================
--- trunk/gpgme/genkey.c 2006-07-16 13:25:19 UTC (rev 1175)
+++ trunk/gpgme/genkey.c 2006-07-16 13:27:08 UTC (rev 1176)
@@ -142,7 +142,8 @@
endtag = strstr (content, "</GnupgKeyParms>");
/* FIXME: Check that there are no control statements inside. */
- while (*content == '\n')
+ while (content[0] == '\n'
+ || (content[0] == '\r' && content[1] == '\n'))
content++;
return gpgme_data_new_from_mem (key_parameter, content,
Modified: trunk/gpgme/rungpg.c
===================================================================
--- trunk/gpgme/rungpg.c 2006-07-16 13:25:19 UTC (rev 1175)
+++ trunk/gpgme/rungpg.c 2006-07-16 13:27:08 UTC (rev 1176)
@@ -845,6 +845,8 @@
if (*p == '\n')
{
/* (we require that the last line is terminated by a LF) */
+ if (p > buffer && p[-1] = '\r')
+ p[-1] = 0;
*p = 0;
if (!strncmp (buffer, "[GNUPG:] ", 9)
&& buffer[9] >= 'A' && buffer[9] <= 'Z')
Modified: trunk/gpgme/version.c
===================================================================
--- trunk/gpgme/version.c 2006-07-16 13:25:19 UTC (rev 1175)
+++ trunk/gpgme/version.c 2006-07-16 13:27:08 UTC (rev 1176)
@@ -200,6 +200,8 @@
mark = strchr (&line[linelen], '\n');
if (mark)
{
+ if (mark > &line[0] && *mark == '\r')
+ mark--;
*mark = '\0';
break;
}
More information about the Gnupg-commits
mailing list