[svn] GnuPG - r4599 - branches/STABLE-BRANCH-1-4/g10

svn author dshaw cvs at cvs.gnupg.org
Sun Oct 21 18:07:23 CEST 2007


Author: dshaw
Date: 2007-10-21 18:07:13 +0200 (Sun, 21 Oct 2007)
New Revision: 4599

Modified:
   branches/STABLE-BRANCH-1-4/g10/ChangeLog
   branches/STABLE-BRANCH-1-4/g10/armor.c
   branches/STABLE-BRANCH-1-4/g10/misc.c
Log:
* misc.c (compliance_option_string, compliance_failure): Minor
cleanup.

* armor.c (is_armor_header): Comment about 4880.


Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog	2007-10-19 15:58:38 UTC (rev 4598)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog	2007-10-21 16:07:13 UTC (rev 4599)
@@ -1,3 +1,10 @@
+2007-10-21  David Shaw  <dshaw at jabberwocky.com>
+
+	* misc.c (compliance_option_string, compliance_failure): Minor
+	cleanup.
+
+	* armor.c (is_armor_header): Comment about 4880.
+
 2007-10-17  David Shaw  <dshaw at jabberwocky.com>
 
 	* options.h, gpg.c (main), misc.c (compliance_option_string): Add

Modified: branches/STABLE-BRANCH-1-4/g10/armor.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/armor.c	2007-10-19 15:58:38 UTC (rev 4598)
+++ branches/STABLE-BRANCH-1-4/g10/armor.c	2007-10-21 16:07:13 UTC (rev 4599)
@@ -356,7 +356,8 @@
        --rfc2440 is set since 2440 reads "The header lines, therefore,
        MUST start at the beginning of a line, and MUST NOT have text
        following them on the same line."  It is unclear whether "text"
-       refers to all text or just non-whitespace text. */
+       refers to all text or just non-whitespace text.  4880 clarified
+       this was only non-whitespace text. */
 
     if(RFC2440)
       {

Modified: branches/STABLE-BRANCH-1-4/g10/misc.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/misc.c	2007-10-19 15:58:38 UTC (rev 4598)
+++ branches/STABLE-BRANCH-1-4/g10/misc.c	2007-10-21 16:07:13 UTC (rev 4599)
@@ -799,51 +799,64 @@
 const char *
 compliance_option_string(void)
 {
+  char *ver="???";
+
   switch(opt.compliance)
     {
-    case CO_RFC4880:
-      return "--openpgp";
-    case CO_RFC2440:
-      return "--rfc2440";
-    case CO_RFC1991:
-      return "--rfc1991";
-    case CO_PGP2:
-      return "--pgp2";
-    case CO_PGP6:
-      return "--pgp6";
-    case CO_PGP7:
-      return "--pgp7";
-    case CO_PGP8:
-      return "--pgp8";
-    default:
-      return "???";
+    case CO_GNUPG:   return "--gnupg";
+    case CO_RFC4880: return "--openpgp";
+    case CO_RFC2440: return "--rfc2440";
+    case CO_RFC1991: return "--rfc1991";
+    case CO_PGP2:    return "--pgp2";
+    case CO_PGP6:    return "--pgp6";
+    case CO_PGP7:    return "--pgp7";
+    case CO_PGP8:    return "--pgp8";
     }
+
+  return ver;
 }
 
-static const char *
-compliance_string(void)
+void
+compliance_failure(void)
 {
+  char *ver="???";
+
   switch(opt.compliance)
     {
+    case CO_GNUPG:
+      ver="GnuPG";
+      break;
+
+    case CO_RFC4880:
+      ver="OpenPGP";
+      break;
+
     case CO_RFC2440:
-      return "OpenPGP";
+      ver="OpenPGP (older)";
+      break;
+
+    case CO_RFC1991:
+      ver="old PGP";
+      break;
+
     case CO_PGP2:
-      return "PGP 2.x";
+      ver="PGP 2.x";
+      break;
+
     case CO_PGP6:
-      return "PGP 6.x";
+      ver="PGP 6.x";
+      break;
+
     case CO_PGP7:
-      return "PGP 7.x";
+      ver="PGP 7.x";
+      break;
+
     case CO_PGP8:
-      return "PGP 8.x";
-    default:
-      return "???";
+      ver="PGP 8.x";
+      break;
     }
-}
 
-void
-compliance_failure(void)
-{
-  log_info(_("this message may not be usable by %s\n"),compliance_string());
+  log_info(_("this message may not be usable by %s\n"),ver);
   opt.compliance=CO_GNUPG;
 }
 




More information about the Gnupg-commits mailing list