Two bugs in gnc-html.c for compiling on RH 6.2

Derek Atkins warlord@MIT.EDU
09 Feb 2001 12:38:25 -0500


Hi,

I'm trying to build the most recent CVS on RedHat 6.2.  However there
are some problems in gnc-html.c.  I'm compiling with --disable-guppi.

The first problem was a reference to unescape_newlines().  It turns
out that this function is set within a #if USE_GUPPI.  The first part
of the patch fixes that problem.

The second problem is more insidious.  The code that parses a
gnc-crypted-html object has a reference to eb->data.  Unfortunately
eb, a GtkHTMLEmbedded, has no member 'data' on my system.  I have no
idea what it should be named instead, so the second part of the patch
puts this code around an #ifdef USE_GPG.  Here is what that structure
contains in case there is a better patch.

-derek

struct _GtkHTMLEmbedded {
        GtkBin bin;

        /* class id of this object */
        char *classid;
        char *name;
        char *type;

        /* parameters to class */
        int width, height;
        GHashTable *params;

        GtkHTMLEmbeddedPrivate *priv;

        int descent;
};


Index: src/gnome/gnc-html.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gnc-html.c,v
retrieving revision 1.12
diff -u -r1.12 gnc-html.c
--- src/gnome/gnc-html.c	2001/02/08 23:31:51	1.12
+++ src/gnome/gnc-html.c	2001/02/09 17:33:00
@@ -593,6 +593,7 @@
                          gpointer data) {
   /* nothing special to do */
 }
+#endif /* USE_GUPPI */
 
 static char * 
 unescape_newlines(const gchar * in) {
@@ -614,7 +615,6 @@
   *op = 0;
   return retval;
 }
-#endif /* USE_GUPPI */
 
 
 /********************************************************************
@@ -687,6 +687,7 @@
       retval = FALSE;
     }
   }
+#if USE_GPG
   else if(!strcmp(eb->classid, "gnc-crypted-html")) {
     /* we just want to take the data and stuff it into the widget,
        blowing away the active streams.  crypted-html contains a
@@ -707,6 +708,7 @@
     g_free(cleartext);
     g_free(cryptext);
   }
+#endif /* USE_GPG */
 
 #if 0 && defined(USE_GUPPI)
   if(widg) {



-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available