Fix more Char/HChar mixups. Closing in...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/hg_basics.c b/helgrind/hg_basics.c
index 00f4a8b..9da1cd4 100644
--- a/helgrind/hg_basics.c
+++ b/helgrind/hg_basics.c
@@ -58,7 +58,7 @@
    VG_(free)(p);
 }
 
-Char* HG_(strdup) ( const HChar* cc, const Char* s )
+HChar* HG_(strdup) ( const HChar* cc, const HChar* s )
 {
    return VG_(strdup)( cc, s );
 }
diff --git a/helgrind/hg_basics.h b/helgrind/hg_basics.h
index 6d9d5f4..93f0154 100644
--- a/helgrind/hg_basics.h
+++ b/helgrind/hg_basics.h
@@ -39,9 +39,9 @@
 
 #define HG_(str) VGAPPEND(vgHelgrind_,str)
 
-void* HG_(zalloc) ( const HChar* cc, SizeT n );
-void  HG_(free)   ( void* p );
-Char* HG_(strdup) ( const HChar* cc, const Char* s );
+void*  HG_(zalloc) ( const HChar* cc, SizeT n );
+void   HG_(free)   ( void* p );
+HChar* HG_(strdup) ( const HChar* cc, const HChar* s );
 
 static inline Bool HG_(is_sane_ThreadId) ( ThreadId coretid ) {
    return coretid >= 0 && coretid < VG_N_THREADS;
diff --git a/helgrind/hg_errors.c b/helgrind/hg_errors.c
index 9a51ad1..8a6c1d4 100644
--- a/helgrind/hg_errors.c
+++ b/helgrind/hg_errors.c
@@ -66,7 +66,7 @@
    return (Word)VG_(strcmp)( (HChar*)s1, (HChar*)s2 );
 }
 
-static HChar* string_table_strdup ( HChar* str ) {
+static HChar* string_table_strdup ( const HChar* str ) {
    HChar* copy = NULL;
    HG_(stats__string_table_queries)++;
    if (!str)
@@ -84,7 +84,7 @@
    } else {
       copy = HG_(strdup)("hg.sts.2", str);
       tl_assert(copy);
-      VG_(addToFM)( string_table, (Word)copy, (Word)copy );
+      VG_(addToFM)( string_table, (UWord)copy, (UWord)copy );
       return copy;
    }
 }
@@ -1347,7 +1347,7 @@
    }
 }
 
-Bool HG_(recognised_suppression) ( Char* name, Supp *su )
+Bool HG_(recognised_suppression) ( const HChar* name, Supp *su )
 {
 #  define TRY(_name,_xskind)                   \
       if (0 == VG_(strcmp)(name, (_name))) {   \
@@ -1366,7 +1366,7 @@
 #  undef TRY
 }
 
-Bool HG_(read_extra_suppression_info) ( Int fd, Char** bufpp, SizeT* nBufp,
+Bool HG_(read_extra_suppression_info) ( Int fd, HChar** bufpp, SizeT* nBufp,
                                         Supp* su )
 {
    /* do nothing -- no extra suppression info present.  Return True to
diff --git a/helgrind/hg_errors.h b/helgrind/hg_errors.h
index 919ff52..eb22859 100644
--- a/helgrind/hg_errors.h
+++ b/helgrind/hg_errors.h
@@ -39,8 +39,8 @@
 void  HG_(before_pp_Error) ( Error* err );
 void  HG_(pp_Error)        ( Error* err );
 UInt  HG_(update_extra)    ( Error* err );
-Bool  HG_(recognised_suppression) ( Char* name, Supp *su );
-Bool  HG_(read_extra_suppression_info) ( Int fd, Char** bufpp, SizeT* nBufp,
+Bool  HG_(recognised_suppression) ( const HChar* name, Supp *su );
+Bool  HG_(read_extra_suppression_info) ( Int fd, HChar** bufpp, SizeT* nBufp,
                                          Supp* su );
 Bool  HG_(error_matches_suppression) ( Error* err, Supp* su );
 const HChar* HG_(get_error_name) ( Error* err );
diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c
index b4ea174..c5bea8c 100644
--- a/helgrind/hg_main.c
+++ b/helgrind/hg_main.c
@@ -1725,7 +1725,7 @@
    // checking the first byte is better than nothing.  See #255009.
    if (!VG_(am_is_valid_for_client) (a, 1, VKI_PROT_READ))
       return;
-   len = VG_(strlen)( (Char*) a );
+   len = VG_(strlen)( (HChar*) a );
    shadow_mem_cread_range( map_threads_lookup(tid), a, len+1 );
    if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE))
       all__sanity_check("evh__pre_mem_read_asciiz-post");
@@ -4295,7 +4295,7 @@
 static Bool is_in_dynamic_linker_shared_object( Addr64 ga )
 {
    DebugInfo* dinfo;
-   const UChar* soname;
+   const HChar* soname;
    if (0) return False;
 
    dinfo = VG_(find_DebugInfo)( (Addr)ga );
@@ -4838,7 +4838,7 @@
          break;
 
       case _VG_USERREQ__HG_CLIENTREQ_UNIMP: {
-         /* char* who */
+         /* HChar* who */
          HChar*  who = (HChar*)args[1];
          HChar   buf[50 + 50];
          Thread* thr = map_threads_maybe_lookup( tid );
@@ -4880,9 +4880,9 @@
 /*--- Setup                                                    ---*/
 /*----------------------------------------------------------------*/
 
-static Bool hg_process_cmd_line_option ( Char* arg )
+static Bool hg_process_cmd_line_option ( const HChar* arg )
 {
-   Char* tmp_str;
+   const HChar* tmp_str;
 
    if      VG_BOOL_CLO(arg, "--track-lockorders",
                             HG_(clo_track_lockorders)) {}