dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnet ChangeLog include/il_utils.h support/inter...


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet ChangeLog include/il_utils.h support/inter...
Date: Sat, 05 May 2007 15:56:43 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Changes by:     Klaus Treichel <ktreichel>      07/05/05 15:56:42

Modified files:
        .              : ChangeLog 
        include        : il_utils.h 
        support        : intern.c 
        codegen        : cg_gen.h cg_decls.tc cg_lvalue.tc cg_nodes.tc 
                         cg_stmt.tc 
        cscc/common    : cc_errors.h cc_errors.c cc_main.c cc_preproc.h 
                         cc_preproc.c 
        cscc/c         : c_declspec.h c_defs.tc c_function.h 
                         c_function.c c_grammar.y c_scope.h c_scope.c 
                         c_stmt.tc c_types.h c_types.c 
        cscc/csharp    : cs_attrs.c cs_const.tc cs_decls.tc cs_gather.c 
                         cs_grammar.y cs_internal.h cs_invoke.tc 
                         cs_lookup.c cs_lvalue.tc cs_stmt.tc 
        cscc/java      : java_decls.tc java_defs.tc java_gather.c 
                         java_grammar.y java_invoke.tc java_lookup.c 
                         java_lvalue.tc java_modifiers.c java_stmt.tc 
        cscc/vb        : vb_grammar.y 
        ilalink        : linker.h link_create.c link_library.c 
                         link_method.c 
        ilasm          : ilasm_build.h ilasm_build.c ilasm_data.h 
                         ilasm_data.c ilasm_output.h ilasm_output.c 
                         ilasm_main.c ilasm_grammar.y 

Log message:
        Make an interned string const char * and fix the resulting compiler 
warnings.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3450&r2=1.3451
http://cvs.savannah.gnu.org/viewcvs/pnet/include/il_utils.h?cvsroot=dotgnu-pnet&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/pnet/support/intern.c?cvsroot=dotgnu-pnet&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pnet/codegen/cg_gen.h?cvsroot=dotgnu-pnet&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/pnet/codegen/cg_decls.tc?cvsroot=dotgnu-pnet&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/pnet/codegen/cg_lvalue.tc?cvsroot=dotgnu-pnet&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/pnet/codegen/cg_nodes.tc?cvsroot=dotgnu-pnet&r1=1.86&r2=1.87
http://cvs.savannah.gnu.org/viewcvs/pnet/codegen/cg_stmt.tc?cvsroot=dotgnu-pnet&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/common/cc_errors.h?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/common/cc_errors.c?cvsroot=dotgnu-pnet&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/common/cc_main.c?cvsroot=dotgnu-pnet&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/common/cc_preproc.h?cvsroot=dotgnu-pnet&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/common/cc_preproc.c?cvsroot=dotgnu-pnet&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_declspec.h?cvsroot=dotgnu-pnet&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_defs.tc?cvsroot=dotgnu-pnet&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_function.h?cvsroot=dotgnu-pnet&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_function.c?cvsroot=dotgnu-pnet&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_grammar.y?cvsroot=dotgnu-pnet&r1=1.82&r2=1.83
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_scope.h?cvsroot=dotgnu-pnet&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_scope.c?cvsroot=dotgnu-pnet&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_stmt.tc?cvsroot=dotgnu-pnet&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_types.h?cvsroot=dotgnu-pnet&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/c/c_types.c?cvsroot=dotgnu-pnet&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_attrs.c?cvsroot=dotgnu-pnet&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_const.tc?cvsroot=dotgnu-pnet&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_decls.tc?cvsroot=dotgnu-pnet&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_gather.c?cvsroot=dotgnu-pnet&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_grammar.y?cvsroot=dotgnu-pnet&r1=1.77&r2=1.78
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_internal.h?cvsroot=dotgnu-pnet&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_invoke.tc?cvsroot=dotgnu-pnet&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_lookup.c?cvsroot=dotgnu-pnet&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_lvalue.tc?cvsroot=dotgnu-pnet&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_stmt.tc?cvsroot=dotgnu-pnet&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_decls.tc?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_defs.tc?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_gather.c?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_grammar.y?cvsroot=dotgnu-pnet&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_invoke.tc?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_lookup.c?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_lvalue.tc?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_modifiers.c?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/java/java_stmt.tc?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/vb/vb_grammar.y?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pnet/ilalink/linker.h?cvsroot=dotgnu-pnet&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/pnet/ilalink/link_create.c?cvsroot=dotgnu-pnet&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/pnet/ilalink/link_library.c?cvsroot=dotgnu-pnet&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/pnet/ilalink/link_method.c?cvsroot=dotgnu-pnet&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_build.h?cvsroot=dotgnu-pnet&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_build.c?cvsroot=dotgnu-pnet&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_data.h?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_data.c?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_output.h?cvsroot=dotgnu-pnet&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_output.c?cvsroot=dotgnu-pnet&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_main.c?cvsroot=dotgnu-pnet&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_grammar.y?cvsroot=dotgnu-pnet&r1=1.43&r2=1.44

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3450
retrieving revision 1.3451
diff -u -b -r1.3450 -r1.3451
--- ChangeLog   3 May 2007 20:08:46 -0000       1.3450
+++ ChangeLog   5 May 2007 15:56:41 -0000       1.3451
@@ -1,3 +1,30 @@
+2007-05-05  Klaus Treichel  <address@hidden>
+
+       * support/intern.c, include/il_utils.h: Make the interned string a const
+       char * because they must not be modified by the application.
+       Add functions to concatenate four and five interned strings.
+
+       * codegen/cg_gen.h, codegen/cg_decls.tc, codegen/cg_lvalue.tc,
+       codegen/cg_nodes.tc, codegen/cg_stmt.tc, cscc/common/cc_errors.h,
+       cscc/common/cc_errors.c, cscc/common/cc_main.c, 
cscc/common/cc_preproc.h,
+       cscc/common/cc_preproc.c, cscc/c/c_declspec.h, cscc/c/c_defs.tc,
+       cscc/c/c_function.h, cscc/c/c_function.c, cscc/c/c_grammar.y,
+       cscc/c/c_scope.h, cscc/c/c_scope.c, cscc/c/c_stmt.tc, cscc/c/c_types.h,
+       cscc/c/c_types.c, cscc/csharp/cs_attrs.c, cscc/csharp/cs_const.tc,
+       cscc/csharp/cs_decls.tc, cscc/csharp/cs_gather.c, 
cscc/csharp/cs_grammar.y,
+       cscc/csharp/cs_internal.h, cscc/csharp/cs_invoke.tc,
+       cscc/csharp/cs_lookup.c, cscc/csharp/cs_lvalue.tc, 
cscc/csharp/cs_stmt.tc,
+       cscc/java/java_decls.tc, cscc/java/java_defs.tc, 
cscc/java/java_gather.c,
+       cscc/java/java_grammar.y, cscc/java/java_invoke.tc,
+       cscc/java/java_invoke.tc, cscc/java/java_lookup.c, 
cscc/java/java_lvalue.tc,
+       cscc/java/java_modifiers.c, cscc/java/java_stmt.tc, 
cscc/vb/vb_grammar.y,
+       ilalink/linker.h, ilalink/link_create.c, ilalink/link_library.c,
+       ilalink/link_method.c, ilasm/ilasm_build.h, ilasm/ilasm_build.c,
+       ilasm/ilasm_data.h, ilasm/ilasm_data.c, ilasm/ilasm_output.h,
+       ilasm/ilasm_output.c, ilasm/ilasm_main.c, ilasm/ilasm_grammar.y: Fix the
+       resulting compiler warnings by making the locals and args causing them
+       const.
+
 2007-05-03  Klaus Treichel  <address@hidden>
 
        * include/il_utils.h, support/intern.c: Add the function

Index: include/il_utils.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_utils.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- include/il_utils.h  3 May 2007 20:08:46 -0000       1.29
+++ include/il_utils.h  5 May 2007 15:56:41 -0000       1.30
@@ -34,7 +34,7 @@
  */
 typedef struct
 {
-       char   *string;
+       const char *string;
        int             len;
 
 } ILIntString;
@@ -64,6 +64,23 @@
                                  ILIntString str3);
 
 /*
+ * Concatenate four internalised strings and internalise the result.
+ */
+ILIntString ILInternStringConcat4(ILIntString str1,
+                                                                 ILIntString 
str2,
+                                                                 ILIntString 
str3,
+                                                                 ILIntString 
str4);
+
+/*
+ * Concatenate five internalised strings and internalise the result.
+ */
+ILIntString ILInternStringConcat5(ILIntString str1,
+                                                                 ILIntString 
str2,
+                                                                 ILIntString 
str3,
+                                                                 ILIntString 
str4,
+                                                                 ILIntString 
str5);
+
+/*
  * Generate a GUID value.  The "guid" buffer must be at
  * least 16 bytes in length.
  */

Index: support/intern.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/intern.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- support/intern.c    3 May 2007 20:08:46 -0000       1.5
+++ support/intern.c    5 May 2007 15:56:41 -0000       1.6
@@ -162,7 +162,9 @@
        return result;
 }
 
-ILIntString ILInternStringConcat3(ILIntString str1, ILIntString str2, 
ILIntString str3)
+ILIntString ILInternStringConcat3(ILIntString str1,
+                                                                 ILIntString 
str2,
+                                                                 ILIntString 
str3)
 {
        unsigned long hash = 0;
        int len = 0;
@@ -255,6 +257,7 @@
                fprintf(stderr, "virtual memory exhausted - cannot intern \"");
                fwrite(str1.string, 1, str1.len, stderr);
                fwrite(str2.string, 1, str2.len, stderr);
+               fwrite(str3.string, 1, str3.len, stderr);
                fprintf(stderr, "\"\n");
                exit(1);
        #endif
@@ -283,6 +286,271 @@
        return result;
 }
 
+ILIntString ILInternStringConcat4(ILIntString str1,
+                                                                 ILIntString 
str2,
+                                                                 ILIntString 
str3,
+                                                                 ILIntString 
str4)
+{
+       unsigned long hash = 0;
+       int len = 0;
+       InternEntry *entry;
+       ILIntString result;
+
+       /* Hash the combined string */
+       if(str1.len > 0)
+       {
+               hash = ILHashString(hash, str1.string, str1.len);
+               len += str1.len;
+       }
+       else
+       {
+               str1.len = 0;
+       }
+       if(str2.len > 0)
+       {
+               hash = ILHashString(hash, str2.string, str2.len);
+               len += str2.len;
+       }
+       else
+       {
+               str2.len = 0;
+       }
+       if(str3.len > 0)
+       {
+               hash = ILHashString(hash, str3.string, str3.len);
+               len += str3.len;
+       }
+       else
+       {
+               str3.len = 0;
+       }
+       if(str4.len > 0)
+       {
+               hash = ILHashString(hash, str4.string, str4.len);
+               len += str4.len;
+       }
+       else
+       {
+               str4.len = 0;
+       }
+       hash %= INTERN_HASH_SIZE;
+
+       /* Look in the hash table to see if we already have the combined string 
*/
+       entry = hashTable[hash];
+       while(entry != 0)
+       {
+               if(len == entry->len)
+               {
+                       if((str1.len > 0) && ILMemCmp(entry->str, str1.string, 
str1.len))
+                       {
+                               /* No match */
+                       }
+                       else if((str2.len > 0) && ILMemCmp(entry->str + 
str1.len, str2.string, str2.len))
+                       {
+                               /* No match */
+                       }
+                       else if((str3.len > 0) && ILMemCmp(entry->str + 
str1.len + str2.len, str3.string, str3.len))
+                       {
+                               /* No match */
+                       }
+                       else if((str4.len > 0) && ILMemCmp(entry->str + 
str1.len + str2.len + str3.len, str4.string, str4.len))
+                       {
+                               /* No match */
+                       }
+                       else
+                       {
+                               result.string = entry->str;
+                               result.len = entry->len;
+                               return result;
+                       }
+               }
+               entry = entry->next;
+       }
+
+       /* Add a new item to the hash table */
+       entry = (InternEntry *)ILMalloc(sizeof(InternEntry) + len);
+       if(!entry)
+       {
+       #ifndef REDUCED_STDIO
+               fprintf(stderr, "virtual memory exhausted - cannot intern \"");
+               fwrite(str1.string, 1, str1.len, stderr);
+               fwrite(str2.string, 1, str2.len, stderr);
+               fwrite(str3.string, 1, str3.len, stderr);
+               fwrite(str4.string, 1, str4.len, stderr);
+               fprintf(stderr, "\"\n");
+               exit(1);
+       #endif
+               result.string = emptyString;
+               result.len = 0;
+               return result;
+       }
+       entry->next = hashTable[hash];
+       entry->len = len;
+       if(str1.len > 0)
+       {
+               ILMemCpy(entry->str, str1.string, str1.len);
+       }
+       if(str2.len > 0)
+       {
+               ILMemCpy(entry->str + str1.len, str2.string, str2.len);
+       }
+       if(str3.len > 0)
+       {
+               ILMemCpy(entry->str + str1.len + str2.len, str3.string, 
str3.len);
+       }
+       if(str4.len > 0)
+       {
+               ILMemCpy(entry->str + str1.len + str2.len + str3.len, 
str4.string, str4.len);
+       }
+       entry->str[entry->len] = '\0';
+       hashTable[hash] = entry;
+       result.string = entry->str;
+       result.len = entry->len;
+       return result;
+}
+
+ILIntString ILInternStringConcat5(ILIntString str1,
+                                                                 ILIntString 
str2,
+                                                                 ILIntString 
str3,
+                                                                 ILIntString 
str4,
+                                                                 ILIntString 
str5)
+{
+       unsigned long hash = 0;
+       int len = 0;
+       InternEntry *entry;
+       ILIntString result;
+
+       /* Hash the combined string */
+       if(str1.len > 0)
+       {
+               hash = ILHashString(hash, str1.string, str1.len);
+               len += str1.len;
+       }
+       else
+       {
+               str1.len = 0;
+       }
+       if(str2.len > 0)
+       {
+               hash = ILHashString(hash, str2.string, str2.len);
+               len += str2.len;
+       }
+       else
+       {
+               str2.len = 0;
+       }
+       if(str3.len > 0)
+       {
+               hash = ILHashString(hash, str3.string, str3.len);
+               len += str3.len;
+       }
+       else
+       {
+               str3.len = 0;
+       }
+       if(str4.len > 0)
+       {
+               hash = ILHashString(hash, str4.string, str4.len);
+               len += str4.len;
+       }
+       else
+       {
+               str4.len = 0;
+       }
+       if(str5.len > 0)
+       {
+               hash = ILHashString(hash, str5.string, str5.len);
+               len += str5.len;
+       }
+       else
+       {
+               str5.len = 0;
+       }
+       hash %= INTERN_HASH_SIZE;
+
+       /* Look in the hash table to see if we already have the combined string 
*/
+       entry = hashTable[hash];
+       while(entry != 0)
+       {
+               if(len == entry->len)
+               {
+                       if((str1.len > 0) && ILMemCmp(entry->str, str1.string, 
str1.len))
+                       {
+                               /* No match */
+                       }
+                       else if((str2.len > 0) && ILMemCmp(entry->str + 
str1.len, str2.string, str2.len))
+                       {
+                               /* No match */
+                       }
+                       else if((str3.len > 0) && ILMemCmp(entry->str + 
str1.len + str2.len, str3.string, str3.len))
+                       {
+                               /* No match */
+                       }
+                       else if((str4.len > 0) && ILMemCmp(entry->str + 
str1.len + str2.len + str3.len, str4.string, str4.len))
+                       {
+                               /* No match */
+                       }
+                       else if((str5.len > 0) && ILMemCmp(entry->str + 
str1.len + str2.len + str3.len + str4.len, str5.string, str5.len))
+                       {
+                               /* No match */
+                       }
+                       else
+                       {
+                               result.string = entry->str;
+                               result.len = entry->len;
+                               return result;
+                       }
+               }
+               entry = entry->next;
+       }
+
+       /* Add a new item to the hash table */
+       entry = (InternEntry *)ILMalloc(sizeof(InternEntry) + len);
+       if(!entry)
+       {
+       #ifndef REDUCED_STDIO
+               fprintf(stderr, "virtual memory exhausted - cannot intern \"");
+               fwrite(str1.string, 1, str1.len, stderr);
+               fwrite(str2.string, 1, str2.len, stderr);
+               fwrite(str3.string, 1, str3.len, stderr);
+               fwrite(str4.string, 1, str4.len, stderr);
+               fwrite(str5.string, 1, str5.len, stderr);
+               fprintf(stderr, "\"\n");
+               exit(1);
+       #endif
+               result.string = emptyString;
+               result.len = 0;
+               return result;
+       }
+       entry->next = hashTable[hash];
+       entry->len = len;
+       if(str1.len > 0)
+       {
+               ILMemCpy(entry->str, str1.string, str1.len);
+       }
+       if(str2.len > 0)
+       {
+               ILMemCpy(entry->str + str1.len, str2.string, str2.len);
+       }
+       if(str3.len > 0)
+       {
+               ILMemCpy(entry->str + str1.len + str2.len, str3.string, 
str3.len);
+       }
+       if(str4.len > 0)
+       {
+               ILMemCpy(entry->str + str1.len + str2.len + str3.len, 
str4.string, str4.len);
+       }
+       if(str5.len > 0)
+       {
+               ILMemCpy(entry->str + str1.len + str2.len + str3.len + 
str4.len, str5.string, str5.len);
+       }
+       entry->str[entry->len] = '\0';
+       hashTable[hash] = entry;
+       result.string = entry->str;
+       result.len = entry->len;
+       return result;
+}
+
 #ifdef __cplusplus
 };
 #endif

Index: codegen/cg_gen.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_gen.h,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- codegen/cg_gen.h    21 Mar 2007 08:37:04 -0000      1.46
+++ codegen/cg_gen.h    5 May 2007 15:56:41 -0000       1.47
@@ -32,7 +32,7 @@
  */
 typedef struct
 {
-       char               *name;
+       const char         *name;
        ILLabel            *continueLabel;
        ILLabel            *breakLabel;
        ILLabel            *finallyLabel;
@@ -45,7 +45,7 @@
  */
 typedef struct _tagILGotoEntry
 {
-       char               *name;
+       const char         *name;
        int                             defined : 1;
        int                             crossedTry : 1;
        long                    loopStackSize;
@@ -60,7 +60,7 @@
  */
 typedef struct _tagILLocalVar
 {
-       char               *name;
+       const char         *name;
        long                    scopeLevel;
        ILType             *type;
        short                   allocated;
@@ -88,7 +88,7 @@
  */
 struct _tagILGenInfo
 {
-       char               *progname;                   /* Name of the program 
*/
+       const char         *progname;                   /* Name of the program 
*/
        FILE               *asmOutput;                  /* Assembly output 
stream */
        ILContext          *context;                    /* Context that is 
being built */
        ILImage            *image;                              /* Image that 
is being built */

Index: codegen/cg_decls.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_decls.tc,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- codegen/cg_decls.tc 3 May 2007 20:08:46 -0000       1.56
+++ codegen/cg_decls.tc 5 May 2007 15:56:41 -0000       1.57
@@ -292,7 +292,7 @@
 ILNode_GenDiscard(ILNode_ProxyDeclaration)
 {
        FILE *outstream = info->asmOutput;
-       char *name;
+       const char *name;
        ILType *signature = ILMethod_Signature(node->interfaceMethod);
        unsigned long numParams;
        unsigned long param;

Index: codegen/cg_lvalue.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_lvalue.tc,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- codegen/cg_lvalue.tc        3 May 2007 20:08:46 -0000       1.26
+++ codegen/cg_lvalue.tc        5 May 2007 15:56:41 -0000       1.27
@@ -1542,7 +1542,7 @@
 /*
  * Create a simple identifier node.  "name" must be intern'ed.
  */
-ILNode *ILQualIdentSimple(char *name);
+ILNode *ILQualIdentSimple(const char *name);
 
 /*
  * Create a two-name identifier node.  The names do not need
@@ -1556,7 +1556,7 @@
  * If "asmForm" is non-zero, then quote the name to put it into
  * a form suitable for assembly code.
  */
-char *ILQualIdentName(ILNode *node, int asmForm);
+const char *ILQualIdentName(ILNode *node, int asmForm);
 
 /*
  *  Very similar to ILQualIdentName, but only recognizes
@@ -1565,12 +1565,12 @@
  *
  *  Not sensible, but documented.  -JPS
  */
-char *ILMemberAccessName(ILNode *node);
+const char *ILMemberAccessName(ILNode *node);
 
 /*
  * Append two qualified identifier strings, with '.' between them.
  */
-char *ILQualIdentAppend(char *name1, char *name2);
+const char *ILQualIdentAppend(const char *name1, const char *name2);
 
 /*
  * Determine if a node is a qualified identifier.
@@ -1584,20 +1584,20 @@
  */
 %end %{
 
-ILNode *ILQualIdentSimple(char *name)
+ILNode *ILQualIdentSimple(const char *name)
 {
        return ILNode_Identifier_create(name);
 }
 
 ILNode *ILQualIdentTwo(const char *name1, const char *name2)
 {
-       char *intern1 = ILInternString((char *)name1, -1).string;
-       char *intern2 = ILInternString((char *)name2, -1).string;
+       const char *intern1 = ILInternString((char *)name1, -1).string;
+       const char *intern2 = ILInternString((char *)name2, -1).string;
        return ILNode_QualIdent_create(ILNode_Identifier_create(intern1),
                                                                   
ILNode_Identifier_create(intern2));
 }
 
-char *ILQualIdentName(ILNode *node, int asmForm)
+const char *ILQualIdentName(ILNode *node, int asmForm)
 {
        if(!node)
        {
@@ -1633,7 +1633,7 @@
        }
 }
 
-char *ILMemberAccessName(ILNode *node)
+const char *ILMemberAccessName(ILNode *node)
 {
        if (!node) return 0;
 
@@ -1654,7 +1654,7 @@
        }
 }
 
-char *ILQualIdentAppend(char *name1, char *name2)
+const char *ILQualIdentAppend(const char *name1, const char *name2)
 {
        ILIntString str1;
        ILIntString str2;

Index: codegen/cg_nodes.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_nodes.tc,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- codegen/cg_nodes.tc 8 Jun 2004 14:16:38 -0000       1.86
+++ codegen/cg_nodes.tc 5 May 2007 15:56:41 -0000       1.87
@@ -139,7 +139,7 @@
                void               *oValue;
                struct
                {
-                       char       *str;
+                       const char *str;
                        int                     len;
                }                               strValue;
        } un;
@@ -250,7 +250,7 @@
 }
 %node ILNode_String ILNode_Constant =
 {
-       char *str;
+       const char *str;
        int   len;
 }
 
@@ -511,7 +511,7 @@
 
 %node ILNode_Identifier ILNode =
 {
-       char *name;
+       const char *name;
 }
 %node ILNode_QualIdent ILNode =
 {
@@ -621,7 +621,7 @@
 }
 %node ILNode_LabelledStatement ILNode_Statement %abstract =
 {
-       %nocreate char *name = {0};
+       %nocreate const char *name = {0};
 }
 %node ILNode_While ILNode_LabelledStatement =
 {
@@ -643,7 +643,7 @@
 %node ILNode_Foreach ILNode_LabelledStatement =
 {
        ILNode *type;
-       char   *varName;
+       const char *varName;
        ILNode *varNameNode;
        ILNode *expr;
        ILNode *stmt;
@@ -680,12 +680,12 @@
 %node ILNode_Break ILNode_Statement
 %node ILNode_LabelledBreak ILNode_Statement =
 {
-       char *name;
+       const char *name;
 }
 %node ILNode_Continue ILNode_Statement
 %node ILNode_LabelledContinue ILNode_Statement =
 {
-       char *name;
+       const char *name;
 }
 %node ILNode_Return ILNode_Statement
 %node ILNode_ReturnExpr ILNode_Statement =
@@ -694,11 +694,11 @@
 }
 %node ILNode_Goto ILNode_Statement =
 {
-       char *name;
+       const char *name;
 }
 %node ILNode_GotoLabel ILNode_Statement =
 {
-       char *name;
+       const char *name;
 }
 %node ILNode_GotoCase ILNode_Statement =
 {
@@ -755,7 +755,7 @@
 %node ILNode_CatchClause ILNode_Statement =
 {
        ILNode *type;
-       char   *name;
+       const char *name;
        ILNode *nameNode;
        ILNode *stmt;
        %nocreate ILClass *classInfo = {0};
@@ -801,8 +801,8 @@
 {
        ILNode     *attributes;
        ILUInt32        modifiers;
-       char       *name;
-       char       *namespace;
+       const char *name;
+       const char *namespace;
        ILNode     *namespaceNode;
        ILNode     *typeFormals;
        ILNode     *baseClass;
@@ -815,7 +815,7 @@
        %nocreate ILNode_ClassDefn *nestedParent = {0};
        %nocreate ILNode *nestedClasses = {0};
        %nocreate ILVisitMode visited = {ILVisitMode_NotVisited};
-       %nocreate char *defaultMemberName = {0};
+       %nocreate const char *defaultMemberName = {0};
 
 }
 %node ILNode_ScopeChange ILNode_Declaration =

Index: codegen/cg_stmt.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_stmt.tc,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- codegen/cg_stmt.tc  21 Mar 2007 12:58:07 -0000      1.45
+++ codegen/cg_stmt.tc  5 May 2007 15:56:41 -0000       1.46
@@ -34,7 +34,7 @@
  * Push a new entry onto the loop stack.
  */
 static void PushLoop(ILGenInfo *info, ILLabel *continueLabel,
-                                        ILLabel *breakLabel, char *name,
+                                        ILLabel *breakLabel, const char *name,
                                         int isForeachCollection)
 {
        if(info->loopStackSize >= info->loopStackMax)

Index: cscc/common/cc_errors.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/common/cc_errors.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- cscc/common/cc_errors.h     22 May 2002 04:30:11 -0000      1.3
+++ cscc/common/cc_errors.h     5 May 2007 15:56:41 -0000       1.4
@@ -53,7 +53,7 @@
 /*
  * Report an error on a specific line.
  */
-void CCErrorOnLine(char *filename, unsigned long linenum,
+void CCErrorOnLine(const char *filename, unsigned long linenum,
                                   const char *format, ...) CC_PRINTF(3, 4);
 
 /*
@@ -70,14 +70,14 @@
 /*
  * Report a warning on a specific line.
  */
-void CCWarningOnLine(char *filename, unsigned long linenum,
+void CCWarningOnLine(const char *filename, unsigned long linenum,
                                     const char *format, ...) CC_PRINTF(3, 4);
 
 /*
  * Report a typed warning on a specific line.  The warning
  * will only be reported if the "type" is enabled.
  */
-void CCTypedWarningOnLine(char *filename, unsigned long linenum,
+void CCTypedWarningOnLine(const char *filename, unsigned long linenum,
                                          const char *type, const char *format, 
...)
                                                  CC_PRINTF(4, 5);
 

Index: cscc/common/cc_errors.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/common/cc_errors.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- cscc/common/cc_errors.c     22 Apr 2002 02:52:36 -0000      1.2
+++ cscc/common/cc_errors.c     5 May 2007 15:56:41 -0000       1.3
@@ -51,7 +51,7 @@
 /*
  * Print an error or warning message to stderr.
  */
-static void PrintMessage(char *filename, unsigned long linenum, int warning,
+static void PrintMessage(const char *filename, unsigned long linenum, int 
warning,
                                                 const char *format, VA_LIST va)
 {
        /* Print the filename and line number information */
@@ -88,7 +88,7 @@
        CCHaveErrors = 1;
 }
 
-void CCErrorOnLine(char *filename, unsigned long linenum,
+void CCErrorOnLine(const char *filename, unsigned long linenum,
                                   const char *format, ...)
 {
        VA_START;
@@ -174,7 +174,7 @@
        }
 }
 
-void CCWarningOnLine(char *filename, unsigned long linenum,
+void CCWarningOnLine(const char *filename, unsigned long linenum,
                                     const char *format, ...)
 {
        if(!inhibit_warnings)
@@ -190,7 +190,7 @@
        }
 }
 
-void CCTypedWarningOnLine(char *filename, unsigned long linenum,
+void CCTypedWarningOnLine(const char *filename, unsigned long linenum,
                                          const char *type, const char *format, 
...)
 {
        if(WarningEnabled(type))

Index: cscc/common/cc_main.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/common/cc_main.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- cscc/common/cc_main.c       24 Aug 2006 22:07:26 -0000      1.36
+++ cscc/common/cc_main.c       5 May 2007 15:56:41 -0000       1.37
@@ -222,7 +222,7 @@
        int size;
        const char *filename;
        CCPreProcSymbol *symbol;
-       char *expectedFile;
+       const char *expectedFile;
        unsigned long expectedLine;
 
        /* Open the output stream */
@@ -1436,7 +1436,8 @@
 
 char *yycurrfilename(void)
 {
-       return CCPreProcessorStream.lexerFileName;
+       /* should be const char * but this has to be fixed in treecc. */
+       return (char *)CCPreProcessorStream.lexerFileName;
 }
 
 long yycurrlinenum(void)

Index: cscc/common/cc_preproc.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/common/cc_preproc.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- cscc/common/cc_preproc.h    8 May 2003 17:35:31 -0000       1.2
+++ cscc/common/cc_preproc.h    5 May 2007 15:56:41 -0000       1.3
@@ -47,7 +47,7 @@
        int                                     len;
        int                                     directive;
        unsigned long           number;
-       char                       *filename;
+       const char                 *filename;
 
 } CCPreProcLine;
 
@@ -61,7 +61,7 @@
        int                                     ancestor : 1;   /* Ancestor is 
actively including */
        int                                     sawElse : 1;    /* Already seen 
'#else' */
        unsigned long           number;                 /* Line number of the 
'#if' */
-       char                       *filename;           /* Filename of the 
'#if' */
+       const char                 *filename;           /* Filename of the 
'#if' */
        struct _tagCCPreProcScope *next;        /* Next outer scope level */
 
 } CCPreProcScope;
@@ -96,11 +96,11 @@
 
        /* Line number information for the next line of real input */
        unsigned long           lineNumber;
-       char                       *filename;
+       const char                 *filename;
 
        /* Default Line number information for the next line of input */
        unsigned long           defaultLinenumber;
-       char                       *defaultFilename;
+       const char                 *defaultFilename;
 
        /* Pre-processor scope information for conditional inclusions */
        CCPreProcScope     *currentScope;
@@ -108,7 +108,7 @@
 
        /* Line number information reported to the lexer */
        unsigned long           lexerLineNumber;
-       char                       *lexerFileName;
+       const char                 *lexerFileName;
 
        /* Out of memory indicator */
        int                                     outOfMemory;

Index: cscc/common/cc_preproc.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/common/cc_preproc.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- cscc/common/cc_preproc.c    7 May 2004 17:55:43 -0000       1.5
+++ cscc/common/cc_preproc.c    5 May 2007 15:56:41 -0000       1.6
@@ -709,9 +709,9 @@
 /*
  * Skip white space on a directive line.
  */
-static void SkipWhite(char **_line)
+static void SkipWhite(const char **_line)
 {
-       char *line = (*_line);
+       const char *line = (*_line);
        while(*line == ' ' || *line == '\t' || *line == '\f' ||
              *line == '\v' || *line == CTRL_Z)
        {
@@ -723,12 +723,12 @@
 /*
  * Parse an identifier from a directive line.
  */
-static char *ParseIdentifier(CCPreProc *preproc, CCPreProcLine *info,
-                                                        char **_line)
+static const char *ParseIdentifier(CCPreProc *preproc, CCPreProcLine *info,
+                                                        const char **_line)
 {
-       char *line;
+       const char *line;
        int len;
-       char *identifier;
+       const char *identifier;
 
        /* Skip white space before the identifier */
        SkipWhite(_line);
@@ -782,7 +782,7 @@
 typedef struct
 {
        int                     type;
-       char       *name;
+       const char *name;
 
 } CCPreProcToken;
 #define        CSPP_TOKEN_END                  0
@@ -801,9 +801,9 @@
 /*
  * Get the next token from a directive line.
  */
-static void NextToken(char **_line, CCPreProcToken *token)
+static void NextToken(const char **_line, CCPreProcToken *token)
 {
-       char *line;
+       const char *line;
        int len;
 
        /* Skip white space before the token */
@@ -897,13 +897,13 @@
 /*
  * Forward declaration.
  */
-static int ParseOrExpression(CCPreProc *preproc, char **line,
+static int ParseOrExpression(CCPreProc *preproc, const char **line,
                                                     CCPreProcToken *token);
 
 /*
  * Parse a primary expression.
  */
-static int ParsePrimaryExpression(CCPreProc *preproc, char **line,
+static int ParsePrimaryExpression(CCPreProc *preproc, const char **line,
                                                                  
CCPreProcToken *token)
 {
        int result;
@@ -947,7 +947,7 @@
 /*
  * Parse a unary expression.
  */
-static int ParseUnaryExpression(CCPreProc *preproc, char **line,
+static int ParseUnaryExpression(CCPreProc *preproc, const char **line,
                                                                CCPreProcToken 
*token)
 {
        /* Negated or normal sub-expression? */
@@ -965,7 +965,7 @@
 /*
  * Parse an equality expression.
  */
-static int ParseEqualityExpression(CCPreProc *preproc, char **line,
+static int ParseEqualityExpression(CCPreProc *preproc, const char **line,
                                                                   
CCPreProcToken *token)
 {
        int result1, result2, iseq;
@@ -997,7 +997,7 @@
 /*
  * Parse an AND expression.
  */
-static int ParseAndExpression(CCPreProc *preproc, char **line,
+static int ParseAndExpression(CCPreProc *preproc, const char **line,
                                                          CCPreProcToken *token)
 {
        int result1, result2;
@@ -1020,7 +1020,7 @@
 /*
  * Parse an OR expression.
  */
-static int ParseOrExpression(CCPreProc *preproc, char **line,
+static int ParseOrExpression(CCPreProc *preproc, const char **line,
                                                         CCPreProcToken *token)
 {
        int result1, result2;
@@ -1043,7 +1043,8 @@
 /*
  * Parse an expression.  Returns 0 or 1 for the value of the expression.
  */
-static int ParseExpression(CCPreProc *preproc, CCPreProcLine *info, char 
**line)
+static int ParseExpression(CCPreProc *preproc, CCPreProcLine *info,
+                                                  const char **line)
 {
        CCPreProcToken token;
        int result;
@@ -1072,7 +1073,8 @@
  * Determine if we are at the end of a directive line.
  * If not, report an error.
  */
-static void CheckAtEnd(CCPreProc *preproc, CCPreProcLine *info, char **line)
+static void CheckAtEnd(CCPreProc *preproc, CCPreProcLine *info,
+                                          const char **line)
 {
        SkipWhite(line);
        if((*(*line)) != '\n')
@@ -1089,8 +1091,8 @@
 {
        CCPreProcLine *lines;
        int line, cond;
-       char *dirname;
-       char *symbol;
+       const char *dirname;
+       const char *symbol;
        CCPreProcScope *scope;
        unsigned long num;
        int len;

Index: cscc/c/c_declspec.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_declspec.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- cscc/c/c_declspec.h 6 Mar 2004 09:47:37 -0000       1.11
+++ cscc/c/c_declspec.h 5 May 2007 15:56:41 -0000       1.12
@@ -140,7 +140,7 @@
  */
 typedef struct
 {
-       char    *name;                  /* Name represented by the declarator */
+       const char *name;               /* Name represented by the declarator */
        ILNode  *node;                  /* Node that defines the name, for 
errors */
        ILType  *type;                  /* Type template for the declarator */
        ILType **typeHole;              /* The hole in the template for the 
base type */

Index: cscc/c/c_defs.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_defs.tc,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- cscc/c/c_defs.tc    6 Feb 2007 20:54:52 -0000       1.35
+++ cscc/c/c_defs.tc    5 May 2007 15:56:41 -0000       1.36
@@ -408,7 +408,7 @@
 %node ILNode_VaStart ILNode_Expression =
 {
        ILNode *vaList;
-       char *name;
+       const char *name;
 }
 %node ILNode_VaEnd ILNode_Expression =
 {
@@ -423,7 +423,7 @@
 %node ILNode_AllocA ILNode_UnaryExpression
 %node ILNode_AsmStmt ILNode_Statement =
 {
-       char *code;
+       const char *code;
 }
 %node ILNode_CLocalVar ILNode_LValue =
 {
@@ -440,18 +440,18 @@
 }
 %node ILNode_CGlobalVar ILNode_LValue =
 {
-       char *name;
+       const char *name;
        ILType *type;
        ILType *decayedType;
 }
 %node ILNode_FunctionRef ILNode_Expression =
 {
-       char *name;
+       const char *name;
        ILType *signature;
 }
 %node ILNode_CInvocationExpression ILNode_InvocationExpression =
 {
-       %nocreate char *name = {0};
+       %nocreate const char *name = {0};
 }
 %node ILNode_CSharpInvocation ILNode_Dummy =
 {
@@ -464,7 +464,7 @@
 %node ILNode_CFieldAccess ILNode_LValue %abstract =
 {
        ILNode *expr;
-       char *name;
+       const char *name;
        %nocreate ILField *field = {0};
        %nocreate ILType *ownerType = {0};
 }
@@ -490,7 +490,7 @@
 }
 %node ILNode_CAttribute ILNode_Dummy =
 {
-       char *name;
+       const char *name;
        ILNode *args;
 }
 %node ILNode_CAttributeValue ILNode_Dummy =
@@ -513,7 +513,7 @@
 %node ILNode_CArrayInit ILNode_UnaryExpression
 %node ILNode_CLabelRef ILNode_Expression =
 {
-       char *name;
+       const char *name;
        %nocreate ILInt32 labelNum = {0};
 }
 %node ILNode_CGotoPtr ILNode_Statement =

Index: cscc/c/c_function.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_function.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- cscc/c/c_function.h 27 Jun 2003 03:56:33 -0000      1.6
+++ cscc/c/c_function.h 5 May 2007 15:56:41 -0000       1.7
@@ -28,7 +28,7 @@
 /*
  * Create a new function and return its method block.
  */
-ILMethod *CFunctionCreate(ILGenInfo *info, char *name, ILNode *node,
+ILMethod *CFunctionCreate(ILGenInfo *info, const char *name, ILNode *node,
                                                  CDeclSpec spec, CDeclarator 
decl,
                                                  ILNode *declaredParams);
 

Index: cscc/c/c_function.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_function.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- cscc/c/c_function.c 10 Mar 2004 09:16:45 -0000      1.24
+++ cscc/c/c_function.c 5 May 2007 15:56:41 -0000       1.25
@@ -55,7 +55,7 @@
  * failing to do so correctly.
  */
 static void ReportInferError(ILGenInfo *info, ILNode *node,
-                                                        char *name, ILType 
*signature)
+                                                        const char *name, 
ILType *signature)
 {
        char *typeName;
        unsigned long numParams;
@@ -210,7 +210,7 @@
        ILProgramItemAddAttribute(item, attr);
 }
 
-ILMethod *CFunctionCreate(ILGenInfo *info, char *name, ILNode *node,
+ILMethod *CFunctionCreate(ILGenInfo *info, const char *name, ILNode *node,
                                                  CDeclSpec spec, CDeclarator 
decl,
                                                  ILNode *declaredParams)
 {
@@ -676,7 +676,7 @@
        CDeclSpec spec;
        CDeclarator decl;
        char buf[64];
-       char *name;
+       const char *name;
        ILMethod *method;
        ILNode *attributes;
        ILScope *scope;

Index: cscc/c/c_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_grammar.y,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- cscc/c/c_grammar.y  12 Mar 2004 05:58:51 -0000      1.82
+++ cscc/c/c_grammar.y  5 May 2007 15:56:41 -0000       1.83
@@ -31,7 +31,7 @@
 /*
  * Current context.
  */
-static char *functionName = "";
+static const char *functionName = "";
 static ILType *currentStruct = 0;
 static ILType *currentEnum = 0;
 static ILInt32 currentEnumValue = 0;
@@ -67,7 +67,7 @@
  */
 static ILNode *FixIdentifierNode(ILNode *node, int functionRef)
 {
-       char *name;
+       const char *name;
 
        /* Bail out if the node is not an identifier */
        if(!yyisa(node, ILNode_Identifier))
@@ -146,7 +146,7 @@
 /*
  * Report an invalid bit field type error.
  */
-static void BitFieldInvalidType(char *name, ILNode *node)
+static void BitFieldInvalidType(const char *name, ILNode *node)
 {
        if(name)
        {
@@ -162,7 +162,7 @@
 /*
  * Report a zero-width bit field error.
  */
-static void BitFieldZeroWidth(char *name, ILNode *node)
+static void BitFieldZeroWidth(const char *name, ILNode *node)
 {
        if(name)
        {
@@ -178,7 +178,7 @@
 /*
  * Report bit field size warning.
  */
-static void BitFieldMaxSize(char *name, ILNode *node)
+static void BitFieldMaxSize(const char *name, ILNode *node)
 {
        if(name)
        {
@@ -339,7 +339,7 @@
 /*
  * Add a global initializer statement to the pending list.
  */
-static void AddInitializer(char *name, ILNode *node, ILType *type, ILNode 
*init)
+static void AddInitializer(const char *name, ILNode *node, ILType *type, 
ILNode *init)
 {
        ILNode *stmt;
 
@@ -535,7 +535,8 @@
                        else if(!(decl.isKR))
                        {
                                /* Convert the K&R prototype into an ANSI 
prototype */
-                               CScopeUpdateFunction(decl.name, 
C_SCDATA_FUNCTION_FORWARD,
+                               CScopeUpdateFunction((void *)(decl.name),
+                                                                        
C_SCDATA_FUNCTION_FORWARD,
                                                                         
decl.node, signature);
                                if(decl.attrs)
                                {
@@ -907,12 +908,12 @@
 static void ProcessUsingTypeDeclaration(ILType *type, ILNode *declNode)
 {
        ILClass *classInfo;
-       char *name;
+       const char *name;
        void *data;
 
        /* Get the name of the type, without its namespace */
        classInfo = ILTypeToClass(&CCCodeGen, type);
-       name = ILInternString((char *)ILClass_Name(classInfo), -1).string;
+       name = ILInternString(ILClass_Name(classInfo), -1).string;
 
        /* See if we already have a declaration for this name */
        data = CScopeLookupCurrent(name);
@@ -1110,7 +1111,7 @@
        CLexIntConst            integer;
        CLexFloatConst          real;
        ILIntString                     string;
-       char               *name;
+       const char             *name;
        ILNode             *node;
        ILType                     *type;
        CDeclSpec                       declSpec;
@@ -1124,7 +1125,7 @@
        struct
        {
                ILType             *type;
-               char               *id;
+               const char         *id;
                ILNode         *idNode;
        }                                       catchInfo;
        ILGCSpecifier           gcSpecifier;
@@ -3335,7 +3336,7 @@
 ParamDeclaration
        : DeclarationSpecifiers ParamDeclaratorList ';' {
                                CDeclSpec spec;
-                               char *name;
+                               const char *name;
                                ILNode *nameNode;
                                ILType *type;
                                ILNode_CDeclarator *decl;

Index: cscc/c/c_scope.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_scope.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- cscc/c/c_scope.h    29 Feb 2004 00:44:31 -0000      1.11
+++ cscc/c/c_scope.h    5 May 2007 15:56:41 -0000       1.12
@@ -184,12 +184,12 @@
 /*
  * Push a namespace onto the lookup context.
  */
-void CScopePushNamespace(char *name);
+void CScopePushNamespace(const char *name);
 
 /*
  * Pop a namespace from the lookup context.
  */
-void CScopePopNamespace(char *name);
+void CScopePopNamespace(const char *name);
 
 /*
  * Get the scope data kind.

Index: cscc/c/c_scope.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_scope.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- cscc/c/c_scope.c    6 Mar 2004 09:47:37 -0000       1.17
+++ cscc/c/c_scope.c    5 May 2007 15:56:41 -0000       1.18
@@ -27,13 +27,13 @@
 ILScope *CCurrentScope;
 ILScope *CGlobalScope;
 static ILIntString CurrNamespace = {"", 0};
-static char **usingScopes = 0;
+static const char **usingScopes = 0;
 static int numUsingScopes = 0;
 
 /*
  * Make a scope name for a struct or union.
  */
-static char *StructScopeName(const char *name, int structKind)
+static const char *StructScopeName(const char *name, int structKind)
 {
        ILIntString str1;
        ILIntString str2;
@@ -55,7 +55,7 @@
 /*
  * Make a scope name for an enum.
  */
-static char *EnumScopeName(const char *name)
+static const char *EnumScopeName(const char *name)
 {
        ILIntString str1;
        ILIntString str2;
@@ -299,7 +299,7 @@
 
 void CScopeUsingNamespace(const char *name)
 {
-       char *interned = (ILInternString((char *)name, -1)).string;
+       const char *interned = (ILInternString((char *)name, -1)).string;
        int using;
        ILScopeDeclareNamespace(CGlobalScope, interned);
        for(using = 0; using < numUsingScopes; ++using)
@@ -310,7 +310,7 @@
                        return;
                }
        }
-       if((usingScopes = (char **)ILRealloc
+       if((usingScopes = (const char **)ILRealloc
                        (usingScopes, (numUsingScopes + 1) * sizeof(char *))) 
== 0)
        {
                CCOutOfMemory();
@@ -318,7 +318,7 @@
        usingScopes[numUsingScopes++] = interned;
 }
 
-void CScopePushNamespace(char *name)
+void CScopePushNamespace(const char *name)
 {
        if(CurrNamespace.len != 0)
        {
@@ -333,7 +333,7 @@
        }
 }
 
-void CScopePopNamespace(char *name)
+void CScopePopNamespace(const char *name)
 {
        if(CurrNamespace.len == strlen(name))
        {

Index: cscc/c/c_stmt.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_stmt.tc,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- cscc/c/c_stmt.tc    6 Mar 2004 09:47:37 -0000       1.13
+++ cscc/c/c_stmt.tc    5 May 2007 15:56:41 -0000       1.14
@@ -429,7 +429,7 @@
 struct _tagCGenGoto
 {
        CGenGoto   *next;
-       char       *name;
+       const char *name;
        ILNode     *node;
        ILInt32         labelNum;
        int                     defined : 1;

Index: cscc/c/c_types.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_types.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- cscc/c/c_types.h    7 Mar 2004 04:26:19 -0000       1.24
+++ cscc/c/c_types.h    5 May 2007 15:56:41 -0000       1.25
@@ -426,7 +426,7 @@
  * name into a C type reference.  Returns NULL if it isn't
  * possible to resolve the identifier.
  */
-ILType *CTypeFromCSharp(ILGenInfo *info, char *assembly, ILNode *node);
+ILType *CTypeFromCSharp(ILGenInfo *info, const char *assembly, ILNode *node);
 
 /*
  * Mark a type as needing to be output at code generation time.

Index: cscc/c/c_types.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_types.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- cscc/c/c_types.c    15 Mar 2004 01:37:18 -0000      1.47
+++ cscc/c/c_types.c    5 May 2007 15:56:41 -0000       1.48
@@ -2280,10 +2280,10 @@
        return name;
 }
 
-ILType *CTypeFromCSharp(ILGenInfo *info, char *assembly, ILNode *node)
+ILType *CTypeFromCSharp(ILGenInfo *info, const char *assembly, ILNode *node)
 {
-       char *name;
-       char *namespace;
+       const char *name;
+       const char *namespace;
        ILType *type;
        ILClass *classInfo;
        const char *assemblyName;

Index: cscc/csharp/cs_attrs.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_attrs.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- cscc/csharp/cs_attrs.c      8 Jul 2004 05:40:40 -0000       1.28
+++ cscc/csharp/cs_attrs.c      5 May 2007 15:56:41 -0000       1.29
@@ -146,7 +146,7 @@
 static ILProgramItem *LookupAttrField(ILGenInfo *info, ILType *type,
                                                                          
ILNode *nameNode)
 {
-       char *name = ILQualIdentName(nameNode, 0);
+       const char *name = ILQualIdentName(nameNode, 0);
        ILClass *classInfo = ILClassResolve(ILTypeToClass(info, type));
        ILClass *scope = ILClassLookup(ILClassGlobalScope(info->image),
                                                                   "<Module>", 
(const char *)0);
@@ -927,7 +927,7 @@
        ILNode_ListIter iter2;
        ILNode_AttributeSection *section;
        ILNode_Attribute *attr;
-       char *targetName;
+       const char *targetName;
        ILClass *classInfo;
        ILMethod *method;
        unsigned long numParams;

Index: cscc/csharp/cs_const.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_const.tc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- cscc/csharp/cs_const.tc     9 Nov 2002 21:24:13 -0000       1.6
+++ cscc/csharp/cs_const.tc     5 May 2007 15:56:41 -0000       1.7
@@ -274,7 +274,7 @@
 
 %end %{
 
-ILNode *CSBuiltinConstant(char *name)
+ILNode *CSBuiltinConstant(const char *name)
 {
        if(!strcmp(name, "float_min"))
        {

Index: cscc/csharp/cs_decls.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_decls.tc,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- cscc/csharp/cs_decls.tc     28 Jul 2006 17:12:20 -0000      1.41
+++ cscc/csharp/cs_decls.tc     5 May 2007 15:56:41 -0000       1.42
@@ -932,7 +932,7 @@
        ILNode_ListIter iter;
        ILNode_FormalParameter *param;
        ILScopeData *data;
-       char *name;
+       const char *name;
        ILNode *errorNode;
        ILType *returnType;
 

Index: cscc/csharp/cs_gather.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_gather.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- cscc/csharp/cs_gather.c     29 Nov 2004 11:12:29 -0000      1.52
+++ cscc/csharp/cs_gather.c     5 May 2007 15:56:41 -0000       1.53
@@ -82,11 +82,11 @@
 /*
  * Get the full and basic names from a method/property/event name.
  */
-static char *GetFullAndBasicNames(ILNode *name, char **basicName)
+static const char *GetFullAndBasicNames(ILNode *name, const char **basicName)
 {
-       char *result;
-       char *basic;
-       char *left;
+       const char *result;
+       const char *basic;
+       const char *left;
        if(yyisa(name, ILNode_Identifier))
        {
                result = ILQualIdentName(name, 0);
@@ -577,7 +577,7 @@
  */
 static void ReportDuplicates(ILNode *node, ILMember *newMember,
                                                         ILMember 
*existingMember, ILClass *classInfo,
-                                                        ILUInt32 modifiers, 
char *name)
+                                                        ILUInt32 modifiers, 
const char *name)
 {
        /* TODO: we need better error messages here */
 
@@ -600,7 +600,7 @@
 /*
  * Report a warning for an unnecessary "new" keyword on a declaration.
  */
-static void ReportUnnecessaryNew(ILNode *node, char *name)
+static void ReportUnnecessaryNew(ILNode *node, const char *name)
 {
        CCWarningOnLine(yygetfilename(node), yygetlinenum(node),
                                "declaration of `%s' includes unnecessary `new' 
keyword",
@@ -616,7 +616,7 @@
        ILNode_ListIter iterator;
        ILNode_FieldDeclarator *decl;
        ILField *fieldInfo;
-       char *name;
+       const char *name;
        ILType *tempType;
        ILType *modifier;
        ILMember *member;
@@ -866,30 +866,27 @@
 /*
  * Get the full name of an explicit interface override member.
  */
-static char *GetFullExplicitName(ILClass *interface, char *memberName)
+static const char *GetFullExplicitName(ILClass *interface, const char 
*memberName)
 {
-       char *name;
+       const char *name;
        if(ILClass_Namespace(interface) != 0)
        {
-               name = ILInternAppendedString
-                       (ILInternAppendedString
+               name = ILInternStringConcat3
                                (ILInternString
-                                       ((char *)ILClass_Namespace(interface), 
-1),
-                                ILInternString(".", 1)),
+                                       (ILClass_Namespace(interface), -1),
+                                ILInternString(".", 1),
                         ILInternString
-                               ((char *)ILClass_Name(interface), -1)).string;
-               name = ILInternAppendedString
-                       (ILInternAppendedString
+                                       (ILClass_Name(interface), -1)).string;
+               name = ILInternStringConcat3
                                (ILInternString(name, -1),
-                                ILInternString(".", 1)),
+                                ILInternString(".", 1),
                         ILInternString(memberName, -1)).string;
        }
        else
        {
-               name = ILInternAppendedString
-                       (ILInternAppendedString
-                               (ILInternString((char 
*)ILClass_Name(interface), -1),
-                                ILInternString(".", 1)),
+               name = ILInternStringConcat3
+                               (ILInternString(ILClass_Name(interface), -1),
+                                ILInternString(".", 1),
                         ILInternString(memberName, -1)).string;
        }
        return name;
@@ -941,8 +938,8 @@
 static void CreateMethod(ILGenInfo *info, ILClass *classInfo,
                                                 ILNode_MethodDeclaration 
*method)
 {
-       char *name;
-       char *basicName;
+       const char *name;
+       const char *basicName;
        ILUInt32 thisAccess;
        ILUInt32 baseAccess;
        ILType *tempType;
@@ -1327,7 +1324,7 @@
                                                     
ILNode_EnumMemberDeclaration *enumMember)
 {
        ILField *fieldInfo;
-       char *name;
+       const char *name;
        ILType *tempType;
        ILMember *member;
 
@@ -1424,10 +1421,10 @@
  */
 static void CreateProperty(ILGenInfo *info, ILClass *classInfo,
                                                   ILNode_PropertyDeclaration 
*property,
-                                                  char **defaultMemberName)
+                                                  const char 
**defaultMemberName)
 {
-       char *name;
-       char *basicName;
+       const char *name;
+       const char *basicName;
        ILUInt32 thisAccess;
        ILUInt32 baseAccess;
        ILType *propType;
@@ -1695,8 +1692,8 @@
                                                        ILType *eventType,
                                                        ILNode_EventDeclarator 
*eventDecl)
 {
-       char *name;
-       char *basicName;
+       const char *name;
+       const char *basicName;
        ILUInt32 thisAccess;
        ILUInt32 baseAccess;
        ILNode *eventName;
@@ -2008,7 +2005,7 @@
  * Create a formal parameter with a system type
  */
 static ILNode_FormalParameter* CreateFormalParameter(char *systemtype,
-                                                                               
                         char *name)
+                                                                               
                         const char *name)
 {
        ILNode *param=ILNode_FormalParameter_create(
                                                NULL,ILParamMod_empty, 
@@ -2292,7 +2289,7 @@
        ILNode *savedNamespace;
        ILNode_ListIter iterator;
        ILNode *member;
-       char *defaultMemberName;
+       const char *defaultMemberName;
 
        /* Get the class information block, and bail out if not defined */
        classInfo = ((ILNode_ClassDefn *)classNode)->classInfo;

Index: cscc/csharp/cs_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_grammar.y,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -b -r1.77 -r1.78
--- cscc/csharp/cs_grammar.y    17 Mar 2007 16:10:14 -0000      1.77
+++ cscc/csharp/cs_grammar.y    5 May 2007 15:56:41 -0000       1.78
@@ -134,7 +134,7 @@
  * Determine if the current namespace already has a "using"
  * declaration for a particular namespace.
  */
-static int HaveUsingNamespace(char *name)
+static int HaveUsingNamespace(const char *name)
 {
        ILNode_UsingNamespace *using = CurrNamespaceNode->using;
        while(using != 0)
@@ -355,7 +355,7 @@
  */
 static void ModifyAttrName(ILNode *node,int force)
 {
-       char *name;
+       const char *name;
        int namelen;
        ILNode_Identifier *ident;
        
@@ -392,7 +392,7 @@
        ILNode *attr;
        ILNode_List *args;
        ILEvalValue evalValue;
-       char* prefix=(prefixName) ? ILQualIdentName(prefixName,0) : NULL;
+       const char* prefix=(prefixName) ? ILQualIdentName(prefixName,0) : NULL;
        int i;
 
        const char* possibleWays[] = {"IndexerName", "IndexerNameAttribute",
@@ -708,14 +708,14 @@
        ILDecimal                       decimal;
        ILUInt16                        charValue;
        ILIntString                     string;
-       char                       *name;
+       const char                 *name;
        ILUInt32                        count;
        ILUInt32                        mask;
        ILNode                     *node;
        struct
        {
                ILNode             *type;
-               char               *id;
+               const char         *id;
                ILNode         *idNode;
        } catchinfo;
        struct

Index: cscc/csharp/cs_internal.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_internal.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- cscc/csharp/cs_internal.h   19 Jul 2004 01:42:23 -0000      1.22
+++ cscc/csharp/cs_internal.h   5 May 2007 15:56:41 -0000       1.23
@@ -123,7 +123,7 @@
 /*
  * Convert a built-in constant name into a constant node.
  */
-ILNode *CSBuiltinConstant(char *name);
+ILNode *CSBuiltinConstant(const char *name);
 
 /*
  * Gather information about all types in the program.

Index: cscc/csharp/cs_invoke.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_invoke.tc,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- cscc/csharp/cs_invoke.tc    19 May 2004 15:04:40 -0000      1.30
+++ cscc/csharp/cs_invoke.tc    5 May 2007 15:56:41 -0000       1.31
@@ -78,7 +78,7 @@
  * Report an error message for a failed item signature match,
  * listing the candidates for the call.
  */
-void CSItemCandidateError(ILNode *node, char *itemName, int isCtor,
+void CSItemCandidateError(ILNode *node, const char *itemName, int isCtor,
                                                  void *group, CSEvalArg *args, 
int numArgs);
 
 %}
@@ -179,7 +179,7 @@
 
 %{
 
-void CSItemCandidateError(ILNode *node, char *itemName, int isCtor,
+void CSItemCandidateError(ILNode *node, const char *itemName, int isCtor,
                                                  void *group, CSEvalArg *args, 
int numArgs)
 {
        unsigned long num;
@@ -409,7 +409,7 @@
        CSEvalArg *args;
        int numArgs;
        unsigned long itemNum;
-       char *itemName;
+       const char *itemName;
        ILNode_MethodDeclaration *caller;
        int isCtor = 0;
        ILNode_MemberAccess *savedNode = NULL;

Index: cscc/csharp/cs_lookup.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_lookup.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- cscc/csharp/cs_lookup.c     23 Jul 2004 10:42:21 -0000      1.30
+++ cscc/csharp/cs_lookup.c     5 May 2007 15:56:41 -0000       1.31
@@ -897,13 +897,13 @@
  * Find the type with a specific name within a namespace.
  */
 static int FindTypeInNamespace(ILGenInfo *genInfo, const char *name,
-                                                          char *namespace, 
ILClass *accessedFrom,
+                                                          const char 
*namespace, ILClass *accessedFrom,
                                                           CSMemberLookupInfo 
*results)
 {
        ILClass *type;
        ILScopeData *data;
        int scopeKind;
-       char *fullName;
+       const char *fullName;
        ILNode_ClassDefn *node;
 
        /* Look in the current image for the type */
@@ -928,15 +928,14 @@
                {
                        if(namespace)
                        {
-                               fullName = ILInternAppendedString
+                               fullName = ILInternStringConcat3
                                                                
(ILInternString(namespace, -1),
-                                                                
ILInternAppendedString
-                                                                       
(ILInternString(".", 1),
-                                                                        
ILInternString((char *)name, -1))).string;
+                                                                
ILInternString(".", 1),
+                                                                
ILInternString(name, -1)).string;
                        }
                        else
                        {
-                               fullName = (char *)name;
+                               fullName = name;
                        }
                        AddMember(results, (ILProgramItem *)fullName,
                                          0, CS_MEMBERKIND_NAMESPACE);

Index: cscc/csharp/cs_lvalue.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_lvalue.tc,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- cscc/csharp/cs_lvalue.tc    9 Sep 2004 15:45:47 -0000       1.59
+++ cscc/csharp/cs_lvalue.tc    5 May 2007 15:56:41 -0000       1.60
@@ -487,7 +487,7 @@
  * Convert a semantic value into an l-value or r-value if necessary.
  */
 static CSSemValue SemToLRValue(ILNode *node, ILGenInfo *info, ILNode **parent,
-                                                          CSSemValue value, 
char *name, ILNode *expr,
+                                                          CSSemValue value, 
const char *name, ILNode *expr,
                                                           CSSemValue *exprSem)
 {
        ILField *field;
@@ -817,7 +817,8 @@
        return value;
 }
 
-static CSSemValue GetFullyQualifiedType(ILGenInfo *info, char * ns, char * 
name)
+static CSSemValue GetFullyQualifiedType(ILGenInfo *info, const char * ns,
+                                                                               
const char * name)
 {
        CSSemValue value;
        ILScopeData * data = NULL;
@@ -1079,7 +1080,7 @@
        ILNode_UsingAlias *alias;
        ILScopeData *data;
        int savedState=info->inSemType;
-       char *name;
+       const char *name;
 
        /* Resolve the simple name */
        info->inSemType=1;
@@ -1150,7 +1151,7 @@
 {
        CSSemValue value;
        CSSemValue value2;
-       char *name;
+       const char *name;
 
        /* Get the semantic value for the left part of the identifier */
        value = ILNode_SemAnalysisType(node->left, info, &(node->left));
@@ -1171,8 +1172,8 @@
 {
        CSSemValue value;
        CSSemValue value2;
-       char *name;
-       char *ns;
+       const char *name;
+       const char *ns;
        int savedState = info->inSemType;
        
        ns = ILQualIdentName(node->left, 0);
@@ -1217,7 +1218,7 @@
 {
        CSSemValue value;
        CSSemValue value2;
-       char *name;
+       const char *name;
        int savedState = info->inSemType;
 
        /* Restrict lookups for types only (ie namespaces , types, nested types 
*/
@@ -1275,7 +1276,7 @@
        CSSemValue value;
        CSSemValue value2;
        CSSemValue nsvalue;
-       char *name;
+       const char *name;
        ILEvalValue evalue;
        ILNode *save1;
 
@@ -1388,8 +1389,8 @@
 {
        CSSemValue value;
        int savedState = info->inSemType;
-       char *name;
-       char *ns;
+       const char *name;
+       const char *ns;
        
        /* convert the first subexpression into a namespace */
        ns = ILMemberAccessName(node->expr1);
@@ -1427,7 +1428,7 @@
        ILNode_MethodDeclaration *caller;
        ILClass *classInfo;
        ILNode *thisExpr;
-       char *name;
+       const char *name;
 
        /* Bail out if "base" is used within a static method */
        caller = (ILNode_MethodDeclaration *)(info->currentMethod);
@@ -1635,7 +1636,7 @@
 {
        CSSemValue value;
        ILType *type;
-       char *name;
+       const char *name;
        ILClass *classInfo;
        ILField *field;
 

Index: cscc/csharp/cs_stmt.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_stmt.tc,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- cscc/csharp/cs_stmt.tc      22 Feb 2005 08:52:53 -0000      1.39
+++ cscc/csharp/cs_stmt.tc      5 May 2007 15:56:41 -0000       1.40
@@ -1645,7 +1645,7 @@
 ILNode_SemAnalysis(ILNode_Fixed)
 {
        ILType *type;
-       char *name;
+       const char *name;
        ILNode_MethodDeclaration *method;
        ILNode *errorNode;
        ILNode_ListIter iter;
@@ -1802,7 +1802,7 @@
        ILType *type;
        ILNode_ListIter iter;
        ILNode *nameNode;
-       char *name;
+       const char *name;
        ILScopeData *data;
        ILNode_MethodDeclaration *method;
        ILNode *errorNode;
@@ -1869,7 +1869,7 @@
        CSSemValue value;
        ILEvalValue evalValue;
        ILType *type = CSSemType(node->type, info, &(node->type));
-       char *name;
+       const char *name;
        ILScopeData *data;
        ILNode_MethodDeclaration *method;
        ILNode *errorNode;
@@ -1980,7 +1980,7 @@
        ILType *type;
        ILNode_ListIter iter;
        ILNode *nameNode;
-       char *name;
+       const char *name;
        ILScopeData *data;
        ILNode_MethodDeclaration *method;
        ILNode *errorNode;

Index: cscc/java/java_decls.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_decls.tc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cscc/java/java_decls.tc     17 May 2003 07:04:35 -0000      1.1
+++ cscc/java/java_decls.tc     5 May 2007 15:56:42 -0000       1.2
@@ -239,7 +239,7 @@
        ILNode_ListIter iter;
        ILNode_FormalParameter *param;
        ILScopeData *data;
-       char *name;
+       const char *name;
        ILNode *errorNode;
        ILType *returnType;
        

Index: cscc/java/java_defs.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_defs.tc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- cscc/java/java_defs.tc      6 Feb 2007 20:54:52 -0000       1.3
+++ cscc/java/java_defs.tc      5 May 2007 15:56:42 -0000       1.4
@@ -55,13 +55,13 @@
 
 %node ILNode_JPackage ILNode_Dummy =
 {
-       char *name;
+       const char *name;
        %nocreate ILNode *import={0};
 }
 
 %node ILNode_JImport ILNode_Dummy =
 {
-       char *name;
+       const char *name;
        %nocreate ILNode *next={0};
 }
 %node ILNode_JImportType ILNode_JImport

Index: cscc/java/java_gather.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_gather.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cscc/java/java_gather.c     17 May 2003 07:04:35 -0000      1.1
+++ cscc/java/java_gather.c     5 May 2007 15:56:42 -0000       1.2
@@ -748,7 +748,7 @@
  */
 static void ReportDuplicates(ILNode *node, ILMember *newMember,
                                                         ILMember 
*existingMember, ILClass *classInfo,
-                                                        ILUInt32 modifiers, 
char *name)
+                                                        ILUInt32 modifiers, 
const char *name)
 {
        /* TODO: we need better error messages here */
 
@@ -807,8 +807,8 @@
 static void CreateMethod(ILGenInfo *info, ILClass *classInfo,
                                                 ILNode_MethodDeclaration 
*method)
 {
-       char *name;
-       char *basicName;
+       const char *name;
+       const char *basicName;
        ILType *tempType;
        ILMethod *methodInfo;
        ILType *signature;
@@ -988,7 +988,7 @@
        ILNode_ListIter iterator;
        ILNode_FieldDeclarator *decl;
        ILField *fieldInfo;
-       char *name;
+       const char *name;
        ILType *tempType;
        ILType *modifier;
        ILMember *member;

Index: cscc/java/java_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_grammar.y,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- cscc/java/java_grammar.y    2 Jul 2003 19:00:42 -0000       1.4
+++ cscc/java/java_grammar.y    5 May 2007 15:56:42 -0000       1.5
@@ -235,7 +235,7 @@
  * declaration for a particular package.
  */
  
-static int HaveImported(char *name)
+static int HaveImported(const char *name)
 {
        ILNode_JImport *import = (ILNode_JImport*)CurrPackageNode->import;
        while(import != 0)
@@ -465,7 +465,7 @@
        }real;
        ILUInt16 charValue;
        ILIntString string;
-       char            *name;
+       const char      *name;
        ILUInt32 count;
        ILUInt32 mask;
        ILNode  *node;

Index: cscc/java/java_invoke.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_invoke.tc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cscc/java/java_invoke.tc    17 May 2003 07:04:35 -0000      1.1
+++ cscc/java/java_invoke.tc    5 May 2007 15:56:42 -0000       1.2
@@ -77,7 +77,7 @@
  * Report an error message for a failed item signature match,
  * listing the candidates for the call.
  */
-void JavaItemCandidateError(ILNode *node, char *itemName, int isCtor,
+void JavaItemCandidateError(ILNode *node, const char *itemName, int isCtor,
                                                  void *group, JavaEvalArg 
*args, int numArgs);
 %}
 
@@ -108,6 +108,7 @@
                        member = ILProgramItemToMember(itemInfo);
                        if(member)
                        {
+
                                owner = ILClassResolve(ILMember_Owner(member));
                                if(!lowestOwner)
                                {
@@ -170,7 +171,7 @@
        JavaEvalArg *args;
        int numArgs;
        unsigned long itemNum;
-       char *itemName;
+       const char *itemName;
        ILNode_MethodDeclaration *caller;
        int isCtor = 0;
 
@@ -288,7 +289,7 @@
 
 %{
 
-void JavaItemCandidateError(ILNode *node, char *itemName, int isCtor,
+void JavaItemCandidateError(ILNode *node, const char *itemName, int isCtor,
                                                  void *group, JavaEvalArg 
*args, int numArgs)
 {
        unsigned long num;

Index: cscc/java/java_lookup.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_lookup.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cscc/java/java_lookup.c     17 May 2003 07:04:35 -0000      1.1
+++ cscc/java/java_lookup.c     5 May 2007 15:56:42 -0000       1.2
@@ -598,13 +598,13 @@
  * Find the type with a specific name within a namespace.
  */
 static int FindTypeInNamespace(ILGenInfo *genInfo, const char *name,
-                                                          char *namespace, 
ILClass *accessedFrom,
+                                                          const char 
*namespace, ILClass *accessedFrom,
                                                           JavaMemberLookupInfo 
*results)
 {
        ILClass *type;
        ILScopeData *data;
        int scopeKind;
-       char *fullName;
+       const char *fullName;
        ILNode_ClassDefn *node;
 
        /* Look in the current image for the type */
@@ -629,11 +629,10 @@
                {
                        if(namespace)
                        {
-                               fullName = ILInternAppendedString
+                               fullName = ILInternStringConcat3
                                                                
(ILInternString(namespace, -1),
-                                                                
ILInternAppendedString
-                                                                       
(ILInternString(".", 1),
-                                                                        
ILInternString((char *)name, -1))).string;
+                                                                
ILInternString(".", 1),
+                                                                
ILInternString((char *)name, -1)).string;
                        }
                        else
                        {

Index: cscc/java/java_lvalue.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_lvalue.tc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cscc/java/java_lvalue.tc    17 May 2003 07:04:35 -0000      1.1
+++ cscc/java/java_lvalue.tc    5 May 2007 15:56:42 -0000       1.2
@@ -429,8 +429,8 @@
  * Convert a semantic value into an l-value or r-value if necessary.
  */
 static JavaSemValue SemToLRValue(ILNode *node, ILGenInfo *info, ILNode 
**parent,
-                                                          JavaSemValue value, 
char *name, ILNode *expr,
-                                                          JavaSemValue 
*exprSem)
+                                                                JavaSemValue 
value, const char *name,
+                                                                ILNode *expr, 
JavaSemValue *exprSem)
 {
        ILNode *constNode;
        ILMethod *method;
@@ -671,7 +671,7 @@
 {
        JavaSemValue value;
        JavaSemValue value2;
-       char *name;
+       const char *name;
 
        /* Get the semantic value for the left part of the identifier */
        value = ILNode_JSemAnalysis(node->left, info, &(node->left));
@@ -692,7 +692,7 @@
 {
        JavaSemValue value;
        JavaSemValue value2;
-       char *name;
+       const char *name;
        ILEvalValue evalue;
 
        /* Get the semantic value for the left part of the identifier */
@@ -950,7 +950,7 @@
        ILNode_MethodDeclaration *caller;
        ILClass *classInfo;
        ILNode *thisExpr;
-       char *name;
+       const char *name;
 
        /* Bail out if "base" is used within a static method */
        caller = (ILNode_MethodDeclaration *)(info->currentMethod);

Index: cscc/java/java_modifiers.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_modifiers.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cscc/java/java_modifiers.c  17 May 2003 07:04:35 -0000      1.1
+++ cscc/java/java_modifiers.c  5 May 2007 15:56:42 -0000       1.2
@@ -24,7 +24,7 @@
 /*
  * Report errors for each modifier in a mask.
  */
-static void ModifierError(char *filename, long linenum,
+static void ModifierError(const char *filename, long linenum,
                                                  ILUInt32 modifiers, const 
char *msg)
 {
        if((modifiers & JAVA_MODIFIER_PUBLIC) != 0)
@@ -100,7 +100,8 @@
        }
 }
 
-static void JavaModifiersUsedTwice(char *filename, long linenum, ILUInt32 
modifiers)
+static void JavaModifiersUsedTwice(const char *filename, long linenum,
+                                                                  ILUInt32 
modifiers)
 {
        ModifierError(filename, linenum,
                                  modifiers, "`%s' specified multiple times");

Index: cscc/java/java_stmt.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/java/java_stmt.tc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cscc/java/java_stmt.tc      17 May 2003 07:04:35 -0000      1.1
+++ cscc/java/java_stmt.tc      5 May 2007 15:56:42 -0000       1.2
@@ -264,7 +264,7 @@
        ILType *type;
        ILNode_ListIter iter;
        ILNode *nameNode;
-       char *name;
+       const char *name;
        ILScopeData *data;
        ILNode_MethodDeclaration *method;
        ILNode *errorNode;

Index: cscc/vb/vb_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/vb/vb_grammar.y,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- cscc/vb/vb_grammar.y        23 Jun 2003 16:54:07 -0000      1.3
+++ cscc/vb/vb_grammar.y        5 May 2007 15:56:42 -0000       1.4
@@ -233,7 +233,7 @@
  * Determine if the current namespace already has a "using"
  * declaration for a particular namespace.
  */
-static int HaveUsingNamespace(char *name)
+static int HaveUsingNamespace(const char *name)
 {
        ILNode_UsingNamespace *using = CurrNamespaceNode->using;
        while(using != 0)
@@ -386,7 +386,7 @@
        }                                       real;
        ILDecimal                       decimal;
        ILIntString                     string;
-       char               *name;
+       const char                 *name;
        ILNode             *node;
        ILUInt32                        rank;
        ILInt64                         date;
@@ -692,8 +692,8 @@
 
 Option
        : K_OPTION Identifier OptionValue END_LINE      {
-                               char *name = ILQualIdentName($2, 0);
-                               char *value = $3;
+                               const char *name = ILQualIdentName($2, 0);
+                               const char *value = $3;
                                int invalidValue = 0;
                                InitGlobalNamespace();
                                if(!ILStrICmp(name, "Explicit"))
@@ -792,7 +792,7 @@
        : QualifiedIdentifier           {
                                ILScope *globalScope = GlobalScope();
                                ILNode_UsingNamespace *using;
-                               char *name = ILQualIdentName($1, 0);
+                               const char *name = ILQualIdentName($1, 0);
                                if(!ILScopeUsing(globalScope, name))
                                {
                                        CCError("`%s' is not a namespace", 
name);
@@ -810,7 +810,7 @@
                                ILScope *globalScope = GlobalScope();
                                ILScope *scope = LocalScope();
                                ILNode *alias;
-                               char *name = ILQualIdentName($1, 0);
+                               const char *name = ILQualIdentName($1, 0);
                                if(ILScopeLookup(globalScope, name, 1))
                                {
                                        CCError("`%s' is already declared", 
name);

Index: ilalink/linker.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/linker.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- ilalink/linker.h    6 Mar 2004 11:04:45 -0000       1.33
+++ ilalink/linker.h    5 May 2007 15:56:42 -0000       1.34
@@ -40,8 +40,8 @@
 typedef struct _tagILLibraryClass ILLibraryClass;
 struct _tagILLibraryClass
 {
-       char               *name;                       /* Intern'ed name of 
the class */
-       char               *namespace;          /* Intern'ed namespace of the 
class */
+       const char         *name;                       /* Intern'ed name of 
the class */
+       const char         *namespace;          /* Intern'ed namespace of the 
class */
        ILLibraryClass *parent;                 /* Parent for nesting purposes 
*/
 
 };
@@ -52,8 +52,8 @@
 typedef struct _tagILLibrarySymbol ILLibrarySymbol;
 struct _tagILLibrarySymbol
 {
-       char               *name;                       /* Intern'ed name of 
the symbol */
-       char           *aliasFor;               /* Intern'ed name of the 
aliased symbol */
+       const char         *name;                       /* Intern'ed name of 
the symbol */
+       const char         *aliasFor;           /* Intern'ed name of the 
aliased symbol */
        int                             flags;                  /* Flags that 
define the symbol kind */
        ILMember       *member;                 /* Member reference information 
*/
 };
@@ -84,9 +84,9 @@
 typedef struct _tagILLibrary ILLibrary;
 struct _tagILLibrary
 {
-       char               *name;                       /* Name of the 
library's assembly */
-       char           *filename;               /* Filename for the library's 
assembly */
-       char               *moduleName;         /* Name of the library's main 
module */
+       const char         *name;                       /* Name of the 
library's assembly */
+       const char         *filename;           /* Filename for the library's 
assembly */
+       const char         *moduleName;         /* Name of the library's main 
module */
        ILUInt16                version[4];             /* Version of the 
library's assembly */
        ILLibrary          *altNames;           /* Alternative names for the 
library */
        unsigned char  *publicKey;              /* Public key value for the 
library */
@@ -107,7 +107,7 @@
 typedef struct _tagILLinkImage ILLinkImage;
 struct _tagILLinkImage
 {
-       char               *filename;           /* Name of the image file */
+       const char         *filename;           /* Name of the image file */
        ILContext          *context;            /* Context that contains the 
image */
        ILImage            *image;                      /* The image itself */
        ILLinkImage    *next;                   /* Next image to be linked */
@@ -140,9 +140,9 @@
        int                             isCLink;                /* Non-zero if 
linking a C image */
        ILHashTable    *symbolHash;             /* Hash table for global symbol 
lookup */
        ILMemPool               pool;                   /* Memory pool for 
symbol allocation */
-       char               *moduleName;         /* Name of the "<Module>" class 
*/
+       const char         *moduleName;         /* Name of the "<Module>" class 
*/
        ILClass        *moduleClass;    /* Reference to the "<Module>" class */
-       char               *initTempFile;       /* Temporary object file for 
init/fini */
+       const char         *initTempFile;       /* Temporary object file for 
init/fini */
 
 };
 
@@ -216,7 +216,7 @@
  * will be NULL if the symbol is in the image being linked.
  */
 int _ILLinkerFindSymbol(ILLinker *linker, const char *name,
-                                               char **aliasFor, ILLibrary 
**library,
+                                               const char **aliasFor, 
ILLibrary **library,
                                                ILMember **memberRef);
 
 /*

Index: ilalink/link_create.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/link_create.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- ilalink/link_create.c       7 Aug 2004 00:14:24 -0000       1.32
+++ ilalink/link_create.c       5 May 2007 15:56:42 -0000       1.33
@@ -299,7 +299,7 @@
        while(image != 0)
        {
                nextImage = image->next;
-               ILFree(image->filename);
+               ILFree((void *)(image->filename));
                ILContextDestroy(image->context);
                ILFree(image);
                image = nextImage;
@@ -350,7 +350,7 @@
        ILContextDestroy(linker->context);
 
        /* Free the linker context */
-       ILFree(linker->moduleName);
+       ILFree((void *)(linker->moduleName));
        ILFree(linker);
 
        /* Done */
@@ -492,7 +492,7 @@
                        return 0;
                }
                strcpy(name, assemblyName);
-               ILFree(linker->moduleName);
+               ILFree((void *)(linker->moduleName));
                linker->moduleName = name;
        }
 

Index: ilalink/link_library.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/link_library.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- ilalink/link_library.c      15 Mar 2004 22:51:28 -0000      1.28
+++ ilalink/link_library.c      5 May 2007 15:56:42 -0000       1.29
@@ -164,9 +164,9 @@
        while(library != 0)
        {
                next = library->altNames;
-               ILFree(library->name);
-               ILFree(library->filename);
-               ILFree(library->moduleName);
+               ILFree((void *)(library->name));
+               ILFree((void *)(library->filename));
+               ILFree((void *)(library->moduleName));
                if(library->publicKey)
                {
                        ILFree(library->publicKey);
@@ -312,7 +312,7 @@
                nextLibrary->filename = ILDupString(filename);
                if(!(nextLibrary->filename))
                {
-                       ILFree(nextLibrary->name);
+                       ILFree((void *)(nextLibrary->name));
                        ILFree(nextLibrary);
                        _ILLinkerOutOfMemory(linker);
                        LibraryDestroy(library);
@@ -321,8 +321,8 @@
                nextLibrary->moduleName = 
ILDupString(IL_LINKER_DLL_MODULE_NAME);
                if(!(nextLibrary->moduleName))
                {
-                       ILFree(nextLibrary->filename);
-                       ILFree(nextLibrary->name);
+                       ILFree((void *)(nextLibrary->filename));
+                       ILFree((void *)(nextLibrary->name));
                        ILFree(nextLibrary);
                        _ILLinkerOutOfMemory(linker);
                        LibraryDestroy(library);
@@ -362,9 +362,9 @@
                                {
                                        ILFree(nextLibrary->publicKey);
                                }
-                               ILFree(nextLibrary->moduleName);
-                               ILFree(nextLibrary->filename);
-                               ILFree(nextLibrary->name);
+                               ILFree((void *)(nextLibrary->moduleName));
+                               ILFree((void *)(nextLibrary->filename));
+                               ILFree((void *)(nextLibrary->name));
                                ILFree(nextLibrary);
                                LibraryDestroy(library);
                                return 0;
@@ -381,9 +381,9 @@
                                {
                                        ILFree(nextLibrary->publicKey);
                                }
-                               ILFree(nextLibrary->moduleName);
-                               ILFree(nextLibrary->filename);
-                               ILFree(nextLibrary->name);
+                               ILFree((void *)(nextLibrary->moduleName));
+                               ILFree((void *)(nextLibrary->filename));
+                               ILFree((void *)(nextLibrary->name));
                                ILFree(nextLibrary);
                                LibraryDestroy(library);
                                return 0;
@@ -426,12 +426,12 @@
        ILNestedInfo *nestedInfo;
        ILClass *child;
        ILLibraryClass *libClass;
-       char *name;
-       char *namespace;
+       const char *name;
+       const char *namespace;
 
        /* Add the name of this type to the library's hash table */
        name = (ILInternString((char *)(ILClass_Name(classInfo)), -1)).string;
-       namespace = (char *)(ILClass_Namespace(classInfo));
+       namespace = (const char *)(ILClass_Namespace(classInfo));
        if(namespace)
        {
                namespace = (ILInternString(namespace, -1)).string;
@@ -479,7 +479,7 @@
  * Add a global symbol definition to a library.
  */
 static int AddGlobalSymbol(ILLinker *linker, ILLibrary *library,
-                                                  char *name, char *aliasFor, 
int flags,
+                                                  const char *name, char 
*aliasFor, int flags,
                                                   ILMember *member)
 {
        ILLibrarySymbol *libSymbol;
@@ -561,7 +561,7 @@
        ILMember *member;
        ILField *field;
        ILMethod *method;
-       char *name;
+       const char *name;
        char *aliasFor;
        int flags;
 
@@ -597,7 +597,7 @@
                        if(ILMethod_IsPublic(method) && 
ILMethod_IsStatic(method))
                        {
                                name = (ILInternString
-                                       ((char *)(ILMethod_Name(method)), 
-1)).string;
+                                       (ILMethod_Name(method), -1)).string;
                                flags = IL_LINKSYM_FUNCTION;
                                aliasFor = ILLinkerGetStringAttribute
                                        (ILToProgramItem(method),
@@ -663,7 +663,7 @@
                                                _ILLinkerOutOfMemory(linker);
                                                return 0;
                                        }
-                                       ILFree(library->moduleName);
+                                       ILFree((void *)(library->moduleName));
                                        library->moduleName = name;
                                }
                                if(!WalkGlobals(linker, image, library, 
classInfo))
@@ -1200,7 +1200,7 @@
 }
 
 int _ILLinkerFindSymbol(ILLinker *linker, const char *name,
-                                               char **aliasFor, ILLibrary 
**library,
+                                               const char **aliasFor, 
ILLibrary **library,
                                                ILMember **memberRef)
 {
        ILLibrary *lib;

Index: ilalink/link_method.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/link_method.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- ilalink/link_method.c       15 Mar 2004 22:51:28 -0000      1.28
+++ ilalink/link_method.c       5 May 2007 15:56:42 -0000       1.29
@@ -924,7 +924,7 @@
        ILType *signature;
        ILMethod *method;
        ILField *field;
-       char *findAliasFor;
+       const char *findAliasFor;
        ILLibrary *findLibrary;
        int findFlags;
        ILMember *findMember;

Index: ilasm/ilasm_build.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_build.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- ilasm/ilasm_build.h 5 Sep 2003 07:45:11 -0000       1.11
+++ ilasm/ilasm_build.h 5 May 2007 15:56:42 -0000       1.12
@@ -44,7 +44,7 @@
        ILType             *type;
        ILIntString             nativeType;
        ILUInt32                parameterAttrs;
-       char               *name;
+       const char         *name;
        ILAsmParamInfo *next;
 };
 
@@ -227,7 +227,7 @@
 /*
  * Process a debug line within the input stream.
  */
-void ILAsmDebugLine(ILUInt32 line, ILUInt32 column, char *filename);
+void ILAsmDebugLine(ILUInt32 line, ILUInt32 column, const char *filename);
 
 /*
  * Get a reference to a standard class within the "System" namespace.

Index: ilasm/ilasm_build.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_build.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- ilasm/ilasm_build.c 5 Sep 2003 07:45:11 -0000       1.24
+++ ilasm/ilasm_build.c 5 May 2007 15:56:42 -0000       1.25
@@ -1084,7 +1084,7 @@
        }
 }
 
-void ILAsmDebugLine(ILUInt32 line, ILUInt32 column, char *filename)
+void ILAsmDebugLine(ILUInt32 line, ILUInt32 column, const char *filename)
 {
        if(ILAsmDebugMode)
        {

Index: ilasm/ilasm_data.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_data.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ilasm/ilasm_data.h  12 Oct 2004 10:48:46 -0000      1.3
+++ ilasm/ilasm_data.h  5 May 2007 15:56:42 -0000       1.4
@@ -43,13 +43,13 @@
 /*
  * Set a label within the current output data section.
  */
-void ILAsmDataSetLabel(char *name);
+void ILAsmDataSetLabel(const char *name);
 
 /*
  * Resolve a data section label to a data RVA.
  * Returns '-1' if label is not found
  */
-ILInt64 ILAsmDataResolveLabel(char *name);
+ILInt64 ILAsmDataResolveLabel(const char *name);
 
 /*
  * Pad the data section with a number of zero bytes.

Index: ilasm/ilasm_data.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_data.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ilasm/ilasm_data.c  12 Oct 2004 10:48:46 -0000      1.3
+++ ilasm/ilasm_data.c  5 May 2007 15:56:42 -0000       1.4
@@ -75,7 +75,7 @@
 
 typedef struct
 {
-       char    *name;
+       const char *name;
        ILUInt32 value;
        char    *filename;
        long     linenum;
@@ -102,7 +102,7 @@
        ILFree(elem);
 }
 
-void ILAsmDataSetLabel(char *name)
+void ILAsmDataSetLabel(const char *name)
 {
        DataLabelHashEntry *entry;
        if(!nameTable)
@@ -148,7 +148,7 @@
        }
 }
 
-ILInt64 ILAsmDataResolveLabel(char *name)
+ILInt64 ILAsmDataResolveLabel(const char *name)
 {
        DataLabelHashEntry *entry;
        if(!nameTable ||

Index: ilasm/ilasm_output.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_output.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- ilasm/ilasm_output.h        14 Jul 2003 11:31:34 -0000      1.8
+++ ilasm/ilasm_output.h        5 May 2007 15:56:42 -0000       1.9
@@ -92,7 +92,7 @@
 /*
  * Output a branch to a named label within the current method.
  */
-void ILAsmOutBranch(ILInt32 opcode, char *label);
+void ILAsmOutBranch(ILInt32 opcode, const char *label);
 
 /*
  * Start output of a switch statement.
@@ -107,7 +107,7 @@
 /*
  * Output a switch label reference within the current method.
  */
-void ILAsmOutSwitchRef(char *label);
+void ILAsmOutSwitchRef(const char *label);
 
 /*
  * End output of a switch statement.
@@ -117,29 +117,29 @@
 /*
  * Output a named label at the current position within the method.
  */
-void ILAsmOutLabel(char *label);
+void ILAsmOutLabel(const char *label);
 
 /*
  * Convert an integer label name into its string form.
  */
-char *ILAsmOutIntToName(ILInt64 label);
+const char *ILAsmOutIntToName(ILInt64 label);
 
 /*
  * Output an integer label name at the current position.
  * Returns the string form of the label name.
  */
-char *ILAsmOutIntLabel(ILInt64 label);
+const char *ILAsmOutIntLabel(ILInt64 label);
 
 /*
  * Output a unique label name for the current position,
  * and return the string form of the label name.
  */
-char *ILAsmOutUniqueLabel(void);
+const char *ILAsmOutUniqueLabel(void);
 
 /*
  * Add debug line information at this point within the method.
  */
-void ILAsmOutDebugLine(char *filename, ILUInt32 line, ILUInt32 column);
+void ILAsmOutDebugLine(const char *filename, ILUInt32 line, ILUInt32 column);
 
 /*
  * Start output of an SSA instruction.
@@ -185,7 +185,7 @@
 /*
  * Look up a local or parameter and return the index.
  */
-ILUInt32 ILAsmOutLookupVar(char *name);
+ILUInt32 ILAsmOutLookupVar(const char *name);
 
 /*
  * Information that is stored for an exception handler block.
@@ -194,16 +194,16 @@
 struct _tagILAsmOutException
 {
        ILUInt32                        flags;
-       char                       *blockStart;
-       char                       *blockEnd;
+       const char                 *blockStart;
+       const char                 *blockEnd;
        ILUInt32                        blockOffset;
        ILUInt32                        blockLength;
-       char                       *handlerStart;
-       char                       *handlerEnd;
+       const char                 *handlerStart;
+       const char                 *handlerEnd;
        ILUInt32                        handlerOffset;
        ILUInt32                        handlerLength;
        ILClass                    *classToCatch;
-       char                       *filterLabel;
+       const char                 *filterLabel;
        ILUInt32                        filterOffset;
        ILAsmOutException  *next;
 
@@ -213,13 +213,14 @@
  * Make an exception handler block for the current method.
  */
 ILAsmOutException *ILAsmOutMakeException(ILUInt32 flags, ILClass *classInfo,
-                                                                            
char *filterLabel, char *handlerStart,
-                                                                            
char *handlerEnd);
+                                                                            
const char *filterLabel,
+                                                                               
 const char *handlerStart,
+                                                                            
const char *handlerEnd);
 
 /*
  * Add a try block to the current method.
  */
-void ILAsmOutAddTryBlock(char *blockStart, char *blockEnd,
+void ILAsmOutAddTryBlock(const char *blockStart, const char *blockEnd,
                                                 ILAsmOutException *handlers);
 
 /*
@@ -235,17 +236,17 @@
 /*
  * Declare a local variable name for debug symbol information.
  */
-void ILAsmOutDeclareVarName(char *name, ILUInt32 index);
+void ILAsmOutDeclareVarName(const char *name, ILUInt32 index);
 
 /*
  * Push into a nested local variable scope.
  */
-void ILAsmOutPushVarScope(char *name);
+void ILAsmOutPushVarScope(const char *name);
 
 /*
  * Pop out of a nested local variable scope.
  */
-void ILAsmOutPopVarScope(char *name);
+void ILAsmOutPopVarScope(const char *name);
 
 /*
  * Initialize the constant pool attached to the current class
@@ -306,13 +307,13 @@
  * Output a java instruction that takes a constant pool method or field 
  * argument.
  */
-void ILJavaAsmOutRef(ILInt32 opcode, int isMethod, char *className, 
-                                        char *refName, char *sigName);
+void ILJavaAsmOutRef(ILInt32 opcode, int isMethod, const char *className, 
+                                        const char *refName, const char 
*sigName);
 
 /*
  * Output a java instruction that takes a constant pool type argument.
  */
-void ILJavaAsmOutType(ILInt32 opcode, char *className);
+void ILJavaAsmOutType(ILInt32 opcode, const char *className);
 
 /*
  * Output a newarray java instruction.
@@ -328,7 +329,7 @@
  * Output a multinewarray java instruction.
  * The type (typeName) is a string in java form (i.e. "java/lang/Object").
  */
-void ILJavaAsmOutMultinewarrayFromName(ILInt32 opcode, char *typeName, ILInt64 
dim);
+void ILJavaAsmOutMultinewarrayFromName(ILInt32 opcode, const char *typeName, 
ILInt64 dim);
 
 /* 
  * Set the table switch default label.
@@ -338,7 +339,7 @@
 /*
  * Set the table switch default label.
  */
-void ILJavaAsmOutTableSwitchDefaultRef(char *label);
+void ILJavaAsmOutTableSwitchDefaultRef(const char *label);
 
 /*
  * Start output of a java table switch statement.
@@ -353,7 +354,7 @@
 /*
  * Output a java table switch label reference within the current method.
  */
-void ILJavaAsmOutTableSwitchRef(char *label);
+void ILJavaAsmOutTableSwitchRef(const char *label);
 
 /*
  * End output of a java table switch statement.
@@ -368,7 +369,7 @@
 /*
  * Set the lookup switch default label.
  */
-void ILJavaAsmOutLookupSwitchDefaultRef(char *label);
+void ILJavaAsmOutLookupSwitchDefaultRef(const char *label);
 
 /*
  * Start output of a java lookup switch statement.
@@ -383,7 +384,7 @@
 /*
  * Output a java lookup switch label reference within the current method.
  */
-void ILJavaAsmOutLookupSwitchRef(ILInt64 match, char *label);
+void ILJavaAsmOutLookupSwitchRef(ILInt64 match, const char *label);
 
 /*
  * End output of a java lookup switch statement.

Index: ilasm/ilasm_output.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_output.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- ilasm/ilasm_output.c        22 Oct 2006 18:01:08 -0000      1.23
+++ ilasm/ilasm_output.c        5 May 2007 15:56:42 -0000       1.24
@@ -59,8 +59,8 @@
 static ILUInt32                  localIndex = 0;
 typedef struct _tagLocalBlock
 {
-       char *blockStart;
-       char *blockEnd;
+       const char *blockStart;
+       const char *blockEnd;
        struct _tagLocalBlock *outer;
        struct _tagLocalBlock *next;
 
@@ -68,7 +68,7 @@
 typedef struct _tagLocalInfo
 {
        LocalBlock *block;
-       char *name;
+       const char *name;
        ILUInt32 index;
        int isParam;
        struct _tagLocalInfo *next;
@@ -86,8 +86,8 @@
 static ILUInt32 switchStartOffset = 0;
 static ILUInt32 switchHighOffset = 0;
 static ILUInt32 switchNPairsOffset = 0;
-static char* defaultTableSwitchLabel = 0;
-static char* defaultLookupSwitchLabel = 0;
+static const char* defaultTableSwitchLabel = 0;
+static const char* defaultLookupSwitchLabel = 0;
 
 /*
  * Output a single byte to the buffer.
@@ -133,13 +133,13 @@
 } LabelRef;
 typedef struct _tagLabelInfo
 {
-       char         *name;
+       const char       *name;
        ILUInt32          address;
        int                       defined : 1;
        int                       tokenFixup : 1;
        LabelRef     *refs;
        struct _tagLabelInfo *next;
-       char             *debugFilename;
+       const char       *debugFilename;
        ILUInt32          debugLine;
        ILUInt32          debugColumn;
 
@@ -575,7 +575,7 @@
 /*
  * Look up a label or create a new one.
  */
-static LabelInfo *GetLabel(char *name)
+static LabelInfo *GetLabel(const char *name)
 {
        LabelInfo *label = labels;
        while(label != 0)
@@ -625,7 +625,7 @@
                /* We need to record this position in the code because
                   it will need to be relocated when references are
                   compacted at the end of the assembly process */
-               char *label = ILAsmOutUniqueLabel();
+               const char *label = ILAsmOutUniqueLabel();
                LabelInfo *info = GetLabel(label);
                info->tokenFixup = 1;
        }
@@ -650,7 +650,7 @@
 /*
  * Assemble a branch instruction.
  */
-static void Branch(ILInt32 opcode, char *name)
+static void Branch(ILInt32 opcode, const char *name)
 {
        LabelInfo *labelInfo;
        long delta;
@@ -966,7 +966,7 @@
        Branch(opcode, ILAsmOutIntToName(addr));
 }
 
-void ILAsmOutBranch(ILInt32 opcode, char *label)
+void ILAsmOutBranch(ILInt32 opcode, const char *label)
 {
        Branch(opcode, label);
 }
@@ -974,7 +974,7 @@
 /*
  * Output a switch label reference.
  */
-static void SwitchRef(char *name)
+static void SwitchRef(const char *name)
 {
        LabelInfo *labelInfo;
        LabelRef *ref;
@@ -1023,7 +1023,7 @@
        SwitchRef(ILAsmOutIntToName(addr));
 }
 
-void ILAsmOutSwitchRef(char *label)
+void ILAsmOutSwitchRef(const char *label)
 {
        SwitchRef(label);
 }
@@ -1193,7 +1193,7 @@
        }
 }
 
-void ILAsmOutLabel(char *label)
+void ILAsmOutLabel(const char *label)
 {
        LabelInfo *labelInfo = GetLabel(label);
        LabelRef *ref;
@@ -1260,7 +1260,7 @@
        }
 }
 
-char *ILAsmOutIntToName(ILInt64 label)
+const char *ILAsmOutIntToName(ILInt64 label)
 {
        char numbuf[32];
        if(label >= 0 && label <= (ILInt64)IL_MAX_INT32)
@@ -1276,18 +1276,18 @@
        return (ILInternString(numbuf, -1)).string;
 }
 
-char *ILAsmOutIntLabel(ILInt64 label)
+const char *ILAsmOutIntLabel(ILInt64 label)
 {
-       char *name = ILAsmOutIntToName(label);
+       const char *name = ILAsmOutIntToName(label);
        ILAsmOutLabel(name);
        return name;
 }
 
-char *ILAsmOutUniqueLabel(void)
+const char *ILAsmOutUniqueLabel(void)
 {
        static unsigned long unique = 0;
        char numbuf[32];
-       char *name;
+       const char *name;
        sprintf(numbuf, ".?$.%lu", unique);
        ++unique;
        name = (ILInternString(numbuf, -1)).string;
@@ -1295,10 +1295,10 @@
        return name;
 }
 
-void ILAsmOutDebugLine(char *filename, ILUInt32 line, ILUInt32 column)
+void ILAsmOutDebugLine(const char *filename, ILUInt32 line, ILUInt32 column)
 {
        /* Output a unique label at this position */
-       char *label = ILAsmOutUniqueLabel();
+       const char *label = ILAsmOutUniqueLabel();
        LabelInfo *info = GetLabel(label);
 
        /* Attach the debug information to the label */
@@ -1348,7 +1348,7 @@
 /*
  * Add a local variable name and index to the current method.
  */
-static void AddLocalName(char *name, ILUInt32 index, int isParam)
+static void AddLocalName(const char *name, ILUInt32 index, int isParam)
 {
        LocalInfo *local = (LocalInfo *)ILMalloc(sizeof(LocalInfo));
        if(!local)
@@ -1414,7 +1414,7 @@
        }
 }
 
-ILUInt32 ILAsmOutLookupVar(char *name)
+ILUInt32 ILAsmOutLookupVar(const char *name)
 {
        LocalInfo *local = localNames;
        while(local != 0)
@@ -1432,8 +1432,9 @@
 }
 
 ILAsmOutException *ILAsmOutMakeException(ILUInt32 flags, ILClass *classInfo,
-                                                                            
char *filterLabel, char *handlerStart,
-                                                                            
char *handlerEnd)
+                                                                            
const char *filterLabel,
+                                                                               
 const char *handlerStart,
+                                                                            
const char *handlerEnd)
 {
        ILAsmOutException *exception;
 
@@ -1464,7 +1465,7 @@
        return exception;
 }
 
-void ILAsmOutAddTryBlock(char *blockStart, char *blockEnd,
+void ILAsmOutAddTryBlock(const char *blockStart, const char *blockEnd,
                                                 ILAsmOutException *handlers)
 {
        ILAsmOutException *current;
@@ -1681,7 +1682,7 @@
 static void OutputDebugInfo(ILMethod *method)
 {
        unsigned char buf[256];
-       char *prevFilename = 0;
+       const char *prevFilename = 0;
        LabelInfo *label = labels;
        unsigned long len = 0;
        int type;
@@ -2211,12 +2212,12 @@
        }
 }
 
-void ILAsmOutDeclareVarName(char *name, ILUInt32 index)
+void ILAsmOutDeclareVarName(const char *name, ILUInt32 index)
 {
        AddLocalName(name, index, 0);
 }
 
-void ILAsmOutPushVarScope(char *name)
+void ILAsmOutPushVarScope(const char *name)
 {
        LocalBlock *block = (LocalBlock *)ILMalloc(sizeof(LocalBlock));
        if(!block)
@@ -2231,7 +2232,7 @@
        localCurrentBlock = block;
 }
 
-void ILAsmOutPopVarScope(char *name)
+void ILAsmOutPopVarScope(const char *name)
 {
        if(localCurrentBlock)
        {
@@ -2406,8 +2407,8 @@
 #endif
 }
 
-void ILJavaAsmOutRef(ILInt32 opcode, int isMethod, char *className, 
-                                        char *refName, char *sigName)
+void ILJavaAsmOutRef(ILInt32 opcode, int isMethod, const char *className,
+                                        const char *refName, const char 
*sigName)
 {
 #ifdef IL_CONFIG_JAVA
        int index = 
@@ -2421,7 +2422,7 @@
 #endif
 }
 
-void ILJavaAsmOutType(ILInt32 opcode, char *className)
+void ILJavaAsmOutType(ILInt32 opcode, const char *className)
 {
 #ifdef IL_CONFIG_JAVA
        int index = ILJavaSetClassFromName(ILAsmWriter, ILAsmClass, className);
@@ -2450,7 +2451,7 @@
 #endif
 }
 
-void ILJavaAsmOutMultinewarrayFromName(ILInt32 opcode, char *typeName, ILInt64 
dim)
+void ILJavaAsmOutMultinewarrayFromName(ILInt32 opcode, const char *typeName, 
ILInt64 dim)
 {
 #ifdef IL_CONFIG_JAVA
        int index = ILJavaSetClassFromName(ILAsmWriter, ILAsmClass, typeName);
@@ -2465,7 +2466,7 @@
 /*
  * Output a switch label reference in java.
  */
-static void JavaSwitchRef(char *name)
+static void JavaSwitchRef(const char *name)
 {
        LabelInfo *labelInfo;
        LabelRef *ref;
@@ -2504,7 +2505,7 @@
        defaultTableSwitchLabel = ILAsmOutIntToName(addr);
 }
 
-void ILJavaAsmOutTableSwitchDefaultRef(char *label)
+void ILJavaAsmOutTableSwitchDefaultRef(const char *label)
 {
        defaultTableSwitchLabel = label;
 }
@@ -2542,7 +2543,7 @@
        JavaSwitchRef(ILAsmOutIntToName(addr));
 }
 
-void ILJavaAsmOutTableSwitchRef(char *label)
+void ILJavaAsmOutTableSwitchRef(const char *label)
 {
        JavaSwitchRef(label);
 }
@@ -2564,7 +2565,7 @@
        defaultLookupSwitchLabel = ILAsmOutIntToName(addr);
 }
 
-void ILJavaAsmOutLookupSwitchDefaultRef(char *label)
+void ILJavaAsmOutLookupSwitchDefaultRef(const char *label)
 {
        defaultLookupSwitchLabel = label;
 }
@@ -2596,7 +2597,7 @@
        ILJavaAsmOutLookupSwitchRef(match, ILAsmOutIntToName(addr));
 }
 
-void ILJavaAsmOutLookupSwitchRef(ILInt64 match, char *label)
+void ILJavaAsmOutLookupSwitchRef(ILInt64 match, const char *label)
 {
        OUT_BYTE(match >> 24);
        OUT_BYTE(match >> 16);

Index: ilasm/ilasm_main.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_main.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- ilasm/ilasm_main.c  16 Apr 2003 00:03:08 -0000      1.13
+++ ilasm/ilasm_main.c  5 May 2007 15:56:42 -0000       1.14
@@ -143,7 +143,7 @@
 int ILAsmMain(int argc, char *argv[], FILE *newStdin)
 {
        char *progname = argv[0];
-       char *outputFile = 0;
+       const char *outputFile = 0;
        int format = -1;
        int jvmMode = 0;
        int debug = 0;

Index: ilasm/ilasm_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_grammar.y,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- ilasm/ilasm_grammar.y       16 Mar 2007 17:38:54 -0000      1.43
+++ ilasm/ilasm_grammar.y       5 May 2007 15:56:42 -0000       1.44
@@ -549,7 +549,7 @@
 /*
  * Set the originator for the current assembly definition or reference.
  */
-static void SetOriginator(char *orig, int len, int fullOriginator)
+static void SetOriginator(const char *orig, int len, int fullOriginator)
 {
        if(ILAsmCurrAssemblyRef)
        {
@@ -583,7 +583,7 @@
 
 typedef struct _tagFieldDataEntry
 {
-       char    *name;
+       const char *name;
        ILField *field;
        char *filename;
        long linenum;
@@ -598,7 +598,7 @@
 
 static FieldDataList *unresolvedFieldList = 0;
 
-static void RegisterFieldRvaLabel(char * name, ILField * field)
+static void RegisterFieldRvaLabel(const char * name, ILField * field)
 {
        FieldDataEntry *entry;
        
@@ -685,14 +685,14 @@
                ILInt64         flags;
                ILIntString     nativeType;
                ILInt64         pinvokeAttrs;
-               char       *name1;
-               char       *name2;
+               const char *name1;
+               const char *name2;
        }                               fieldAttrs;
        struct {
                ILInt64         flags;
                ILInt64         pinvokeAttrs;
-               char       *name1;
-               char       *name2;
+               const char *name1;
+               const char *name2;
        }                               methodAttrs;
        ILInt32                 opcode;
        struct {
@@ -725,12 +725,12 @@
        ILProgramItem  *customType;
        struct
        {
-               char       *start;
-               char       *end;
+               const char *start;
+               const char *end;
        }                               scope;
        struct
        {
-               char       *label;
+               const char *label;
                ILInt64     offset;
        }                               datalabel;
        ILAsmOutException *exception;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]