fix compilation problem with pgptext.[ch]
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Fri, 19 Oct 2001 23:37:48 +0000 (23:37 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Fri, 19 Oct 2001 23:37:48 +0000 (23:37 +0000)
ChangeLog.claws
src/pgptext.c
src/pgptext.h

index b336681e8f9949dccbbd930031842a31a2b73ba7..609c9e7f29b3ac26164db6203ff86d105536767a 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-19 [alfons]
+
+       * src/gpgtext.[ch]
+               fix compilation problems (part of bug #472895)
+
 2001-10-18 [hoa]        0.6.3claws27
 
        * src/grouplistdialog.[c]
index f1001fb7dc50e1d5dcc320856a5f95ceccd71b64..16908b457db9e81bb8d27bfe983db4071f4dccb5 100644 (file)
@@ -69,6 +69,19 @@ struct passphrase_cb_info_s {
     int did_it;
 };
 
+/* stolen from rfc2015.c */
+static int
+gpg_name_cmp(const char *a, const char *b)
+{
+    for( ; *a && *b; a++, b++) {
+        if(*a != *b
+           && toupper(*(unsigned char *)a) != toupper(*(unsigned char *)b))
+            return 1;
+    }
+
+    return *a != *b;
+}
+
 static const char *
 passphrase_cb (void *opaque, const char *desc, void *r_hd)
 {
@@ -165,7 +178,7 @@ headerp(char *p, char **names)
     c = *p2;
     *p2 = 0;
     for(i = 0 ; names[i] != NULL; i++) {
-        if(!name_cmp (names[i], p))
+        if(!gpg_name_cmp (names[i], p))
             break;
     }
     *p2 = c;
index 75fb1236f7c2069d7018ec324631e006953743ea..82b765fc731934483c7b191b6d3298c9ecc419cb 100644 (file)
@@ -17,8 +17,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __RFC2015_H__
-#define __RFC2015_H__
+#ifndef PGPTXT_H__ 
+#define PGPTXT_H__
 
 #include <glib.h>
 #include <stdio.h>
@@ -38,4 +38,4 @@ void pgptext_decrypt_message (MsgInfo *msginfo, MimeInfo *mimeinfo, FILE *fp);
 int pgptext_encrypt (const char *file, GSList *recp_list);
 int pgptext_sign (const char *file, PrefsAccount *ac);
 
-#endif /* __RFC2015_H__ */
+#endif /* PGPTEXT_H__ */