The attached patch to cee.fg allows the cee example to compile properly using recent gcc. (Mind you, there are still several other examples that need to be fixed as well, not to mention pretzel's code itself needs to be updated to, e.g. use the proper header files.)

--
Hubert Chan <[EMAIL PROTECTED]> -- Jabber: [EMAIL PROTECTED]
PGP/GnuPG key: 1024D/124B61FA         http://www.uhoreg.ca/
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA

<cee.patch>
--- cee.fg~	2006-12-12 17:04:32.000000000 -0500
+++ cee.fg	2006-12-12 17:29:38.554283182 -0500
@@ -40,9 +40,9 @@
 
 %{
 
-#include<string.h>
+#include<string>
 #include<stdlib.h>
-#include<strstream.h>
+#include<sstream>
 
  /* these functions help to typeset typedefs. they implement
   * a simple lookup table to see if an identifier is a
@@ -54,7 +54,7 @@
 
 struct nlist {  /* a table entry: */
     struct nlist *next;   /* next entry in chain */
-    char* name;           /* the identifier */
+    const char* name;           /* the identifier */
 };
 
 #define HASHSIZE 101
@@ -63,7 +63,7 @@
 
   /* form the hash value of a string */
 
-static unsigned hash(char* s)
+static unsigned hash(const char* s)
 {
     // cerr << "hash(" << s << ") called." << endl;
 
@@ -80,7 +80,7 @@
    * found.
    */
 
-static struct nlist* lookup(char* s)
+static struct nlist* lookup(const char* s)
 {
     // cerr << "lookup(" << s << ") called." << endl;
 
@@ -98,7 +98,7 @@
    * returns NULL on error.
    */
 
-static struct nlist *install(char* name)
+static struct nlist *install(const char* name)
 {
     // cerr << "install(" << name << ") called." << endl;
 
@@ -123,14 +123,14 @@
   * idea: call print() with a strstream
   */
 
-static char* attribute_to_string( Attribute* a )
+static const char* attribute_to_string( Attribute* a )
 {
-    strstream printstream;
+    std::stringstream printstream;
     Latex_cweb_output o(printstream);
 
     a->print(o);
 
-    return printstream.str();
+    return printstream.str().c_str();
 }
 
  /* forward declaration of debugging function */

Reply via email to