Index: config/gen/config_h/config_h.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/config_h/config_h.in,v
retrieving revision 1.20
diff -u -b -r1.20 config_h.in
--- config/gen/config_h/config_h.in	24 Dec 2003 14:54:16 -0000	1.20
+++ config/gen/config_h/config_h.in	9 Apr 2004 22:21:35 -0000
@@ -28,6 +28,8 @@
 typedef ${opcode_t}             Parrot_Opcode;
 typedef void *                  Parrot_Pointer;
 
+typedef char                    Parrot_Int1;
+typedef unsigned char           Parrot_UInt1;
 typedef ${int2_t}               Parrot_Int2;
 typedef unsigned ${int2_t}      Parrot_UInt2;
 typedef ${int4_t}               Parrot_Int4;
Index: src/string.c
===================================================================
RCS file: /cvs/public/parrot/src/string.c,v
retrieving revision 1.181
diff -u -b -r1.181 string.c
--- src/string.c	9 Apr 2004 20:32:43 -0000	1.181
+++ src/string.c	9 Apr 2004 22:21:51 -0000
@@ -330,11 +330,11 @@
 		
 		if( s->representation == enum_stringrep_four )
 		{
-			uint32_t *oldCursor = (uint32_t*)s->strstart;
+			Parrot_UInt4 *oldCursor = (Parrot_UInt4*)s->strstart;
 			
 			if( representation == enum_stringrep_two )
 			{
-				uint16_t *newCursor = (uint16_t*)s->strstart;
+				Parrot_UInt2 *newCursor = (Parrot_UInt2*)s->strstart;
 				
 				while( count-- )
 				{
@@ -343,7 +343,7 @@
 			}
 			else /* representation == enum_stringrep_one */
 			{
-				uint8_t *newCursor = (uint8_t*)s->strstart;
+				Parrot_UInt1 *newCursor = (Parrot_UInt1*)s->strstart;
 				
 				while( count-- )
 				{
@@ -353,8 +353,8 @@
 		}
 		else /* s-> representation == enum_stringrep_two, representation == enum_stringrep_one */
 		{
-			uint16_t *oldCursor = (uint16_t*)s->strstart;
-			uint8_t *newCursor = (uint8_t*)s->strstart;
+			Parrot_UInt2 *oldCursor = (Parrot_UInt2*)s->strstart;
+			Parrot_UInt1 *newCursor = (Parrot_UInt1*)s->strstart;
 			
 			while( count-- )
 			{
@@ -387,8 +387,8 @@
 	}
 	else if( s->representation == enum_stringrep_two )
 	{
-		uint16_t *cur = (uint16_t *)s->strstart;
-		uint16_t *end = cur + s->strlen;
+		Parrot_UInt2 *cur = (Parrot_UInt2 *)s->strstart;
+		Parrot_UInt2 *end = cur + s->strlen;
 		
 		while( cur < end )
 		{
@@ -403,8 +403,8 @@
 	}
 	else if( s->representation == enum_stringrep_four )
 	{
-		uint32_t *cur = (uint32_t *)s->strstart;
-		uint32_t *end = cur + s->strlen;
+		Parrot_UInt4 *cur = (Parrot_UInt4 *)s->strstart;
+		Parrot_UInt4 *end = cur + s->strlen;
 		int saw_two = 0;
 		
 		while( cur < end )
@@ -461,6 +461,10 @@
     /* Is A real? */
     if (a != NULL)
     {
+        UINTVAL a_capacity = string_capacity(interpreter, a);
+		UINTVAL total_length = string_length(interpreter, a) 
+										+ string_length(interpreter, b);
+		
         /* If the destination's constant, then just fall back to
            string_concat */
         if (PObj_constant_TEST(a))
@@ -468,10 +472,6 @@
             return string_concat(interpreter, a, b, Uflags);
         }
         
-		UINTVAL a_capacity = string_capacity(interpreter, a);
-		UINTVAL total_length = string_length(interpreter, a) 
-										+ string_length(interpreter, b);
-
 		if( a->representation < b->representation ) /* need to "upscale" */
         {
 			_string_upscale(interpreter, a, b->representation, total_length);        
@@ -508,10 +508,10 @@
 				/* remember, this is the case of rep A > rep B */
 				if( a->representation == enum_stringrep_two ) /* B must have rep one */
 				{
-					uint16_t *a_cursor = (uint16_t *)((ptrcast_t)a->strstart + a->bufused);
+					Parrot_UInt2 *a_cursor = (Parrot_UInt2 *)((ptrcast_t)a->strstart + a->bufused);
 
-					uint8_t *b_cursor = (uint8_t *)((ptrcast_t)b->strstart);
-					uint8_t *b_end = (uint8_t *)((ptrcast_t)b->strstart + b->bufused);
+					Parrot_UInt1 *b_cursor = (Parrot_UInt1 *)((ptrcast_t)b->strstart);
+					Parrot_UInt1 *b_end = (Parrot_UInt1 *)((ptrcast_t)b->strstart + b->bufused);
 					
 					while(b_cursor < b_end)
 					{
@@ -523,14 +523,14 @@
 				}
 				else if( a->representation == enum_stringrep_four )
 				{
-					uint32_t *a_cursor = (uint32_t *)((ptrcast_t)a->strstart + a->bufused);
+					Parrot_UInt4 *a_cursor = (Parrot_UInt4 *)((ptrcast_t)a->strstart + a->bufused);
 
 					switch( b->representation )
 					{
 						case enum_stringrep_one:
 						{
-							uint8_t *b_cursor = (uint8_t *)((ptrcast_t)b->strstart);
-							uint8_t *b_end = (uint8_t *)((ptrcast_t)b->strstart + b->bufused);
+							Parrot_UInt1 *b_cursor = (Parrot_UInt1 *)((ptrcast_t)b->strstart);
+							Parrot_UInt1 *b_end = (Parrot_UInt1 *)((ptrcast_t)b->strstart + b->bufused);
 
 							while(b_cursor < b_end)
 							{
@@ -544,8 +544,8 @@
 						}
 						case enum_stringrep_two:
 						{
-							uint16_t *b_cursor = (uint16_t *)((ptrcast_t)b->strstart);
-							uint16_t *b_end = (uint16_t *)((ptrcast_t)b->strstart + b->bufused);
+							Parrot_UInt2 *b_cursor = (Parrot_UInt2 *)((ptrcast_t)b->strstart);
+							Parrot_UInt2 *b_end = (Parrot_UInt2 *)((ptrcast_t)b->strstart + b->bufused);
 							
 							while(b_cursor < b_end)
 							{
@@ -601,7 +601,7 @@
 {
     return string_make(interpreter, buffer, len ? len :
             buffer ? strlen(buffer) : 0,
-                       "iso-8859-1", NULL); /* make this utf-8 eventually? */
+                       "iso-8859-1", 0); /* make this utf-8 eventually? */
 }
 
 /* needed for packfile unpacking, unless we just always use utf-8, or BOCU */
@@ -768,13 +768,13 @@
 	switch( s->representation )
 	{
 		case enum_stringrep_one:
-			return ((uint8_t*)s->strstart + idx);
+			return ((Parrot_UInt1*)s->strstart + idx);
 			break;
 		case enum_stringrep_two:
-			return ((uint16_t*)s->strstart + idx);
+			return ((Parrot_UInt2*)s->strstart + idx);
 			break;
 		case enum_stringrep_four:
-			return ((uint32_t*)s->strstart + idx);
+			return ((Parrot_UInt4*)s->strstart + idx);
 			break;
 		default:
 		    internal_exception(INVALID_STRING_REPRESENTATION,
@@ -807,13 +807,13 @@
 	switch( s->representation )
 	{
 		case enum_stringrep_one:
-			return *((uint8_t*)s->strstart + idx);
+			return *((Parrot_UInt1*)s->strstart + idx);
 			break;
 		case enum_stringrep_two:
-			return *((uint16_t*)s->strstart + idx);
+			return *((Parrot_UInt2*)s->strstart + idx);
 			break;
 		case enum_stringrep_four:
-			return *((uint32_t*)s->strstart + idx);
+			return *((Parrot_UInt4*)s->strstart + idx);
 			break;
 		default:
 		    internal_exception(INVALID_STRING_REPRESENTATION,
@@ -827,14 +827,14 @@
 string_str_index_twobyte(struct Parrot_Interp *interpreter,
         const STRING *str, const STRING *find, UINTVAL start)
 {
-    const uint16_t* const find_strstart = find->strstart;
-    const uint16_t* const str_strstart  = str->strstart;
+    const Parrot_UInt2* const find_strstart = find->strstart;
+    const Parrot_UInt2* const str_strstart  = str->strstart;
     const UINTVAL         find_strlen   = find->strlen;
     const UINTVAL         str_strlen    = str->strlen;
-    const uint16_t* const lastmatch     =
+    const Parrot_UInt2* const lastmatch     =
                                    str_strstart + str_strlen;
     UINTVAL* p;
-    const uint16_t* cp;
+    const Parrot_UInt2* cp;
     UINTVAL endct, pos;
     UINTVAL badshift[256];
 
@@ -859,8 +859,8 @@
     pos = start;
     cp = str_strstart + start + find_strlen;
     while (cp <= lastmatch) {
-        register const uint16_t* sp = cp;
-        register const uint16_t* fp = find_strstart + find_strlen;
+        register const Parrot_UInt2* sp = cp;
+        register const Parrot_UInt2* fp = find_strstart + find_strlen;
 
         while (fp > find_strstart) {
             if (*--fp != *--sp)
@@ -1067,18 +1067,18 @@
 {	
 	if( character <= 0xFF )
 	{
-		uint8_t c = (uint8_t)character;
-		return string_make(interpreter, &c, (UINTVAL)sizeof(uint8_t), "iso-8859-1", 0);
+		Parrot_UInt1 c = (Parrot_UInt1)character;
+		return string_make(interpreter, &c, (UINTVAL)sizeof(Parrot_UInt1), "iso-8859-1", 0);
 	}
 	else if( character <= 0xFFFF )
 	{
-		uint16_t c = (uint16_t)character;
-		return string_make(interpreter, &c, (UINTVAL)sizeof(uint16_t), "ucs-2", 0);
+		Parrot_UInt2 c = (Parrot_UInt2)character;
+		return string_make(interpreter, &c, (UINTVAL)sizeof(Parrot_UInt2), "ucs-2", 0);
 	}
 	else
 	{
-		uint32_t c = (uint32_t)character;
-		return string_make(interpreter, &c, (UINTVAL)sizeof(uint32_t), "utf-32", 0);
+		Parrot_UInt4 c = (Parrot_UInt4)character;
+		return string_make(interpreter, &c, (UINTVAL)sizeof(Parrot_UInt4), "utf-32", 0);
 	}
 }
 
@@ -1579,13 +1579,13 @@
 		
 			case enum_stringrep_one:
 				/* could use memcmp in this one case; faster?? */
-				COMPARE_STRINGS(uint8_t, uint8_t, s1, s2, &cmp);
+				COMPARE_STRINGS(Parrot_UInt1, Parrot_UInt1, s1, s2, &cmp);
 				break;
 			case enum_stringrep_two:
-				COMPARE_STRINGS(uint16_t, uint16_t, s1, s2, &cmp);
+				COMPARE_STRINGS(Parrot_UInt2, Parrot_UInt2, s1, s2, &cmp);
 				break;
 			case enum_stringrep_four:
-				COMPARE_STRINGS(uint32_t, uint32_t, s1, s2, &cmp);
+				COMPARE_STRINGS(Parrot_UInt4, Parrot_UInt4, s1, s2, &cmp);
 				break;
 			default:
 				/* trouble! */
@@ -1618,16 +1618,16 @@
 		{
 			if( smaller->representation == enum_stringrep_two )
 			{
-				COMPARE_STRINGS(uint32_t, uint16_t, larger, smaller, &cmp);
+				COMPARE_STRINGS(Parrot_UInt4, Parrot_UInt2, larger, smaller, &cmp);
         }
 			else /* smaller->representation == enum_stringrep_one */
 			{
-				COMPARE_STRINGS(uint32_t, uint8_t, larger, smaller, &cmp);
+				COMPARE_STRINGS(Parrot_UInt4, Parrot_UInt1, larger, smaller, &cmp);
         }
     }
 		else /* larger->representation == enum_stringrep_two, smaller->representation == enum_stringrep_one */
 		{
-			COMPARE_STRINGS(uint16_t, uint8_t, larger, smaller, &cmp);
+			COMPARE_STRINGS(Parrot_UInt2, Parrot_UInt1, larger, smaller, &cmp);
     }
 
 		return cmp * multiplier;
@@ -1794,13 +1794,13 @@
 		{
 		
 			case enum_stringrep_one:
-				BITWISE_AND_STRINGS(uint8_t, uint8_t, uint8_t, s1, s2, res, minlen);
+				BITWISE_AND_STRINGS(Parrot_UInt1, Parrot_UInt1, Parrot_UInt1, s1, s2, res, minlen);
 				break;
 			case enum_stringrep_two:
-				BITWISE_AND_STRINGS(uint16_t, uint16_t, uint16_t, s1, s2, res, minlen);
+				BITWISE_AND_STRINGS(Parrot_UInt2, Parrot_UInt2, Parrot_UInt2, s1, s2, res, minlen);
 				break;
 			case enum_stringrep_four:
-				BITWISE_AND_STRINGS(uint32_t, uint32_t, uint32_t, s1, s2, res, minlen);
+				BITWISE_AND_STRINGS(Parrot_UInt4, Parrot_UInt4, Parrot_UInt4, s1, s2, res, minlen);
 				break;
 			default:
 				/* trouble! */
@@ -1828,16 +1828,16 @@
 		{
 			if( smaller->representation == enum_stringrep_two )
 			{
-				BITWISE_AND_STRINGS(uint32_t, uint16_t, uint32_t, larger, smaller, res, minlen);
+				BITWISE_AND_STRINGS(Parrot_UInt4, Parrot_UInt2, Parrot_UInt4, larger, smaller, res, minlen);
 			}
 			else /* smaller->representation == enum_stringrep_one */
 			{
-				BITWISE_AND_STRINGS(uint32_t, uint8_t, uint32_t, larger, smaller, res, minlen);
+				BITWISE_AND_STRINGS(Parrot_UInt4, Parrot_UInt1, Parrot_UInt4, larger, smaller, res, minlen);
 			}
 		}
 		else /* larger->representation == enum_stringrep_two, smaller->representation == enum_stringrep_one */
 		{
-			BITWISE_AND_STRINGS(uint16_t, uint8_t, uint16_t, larger, smaller, res, minlen);
+			BITWISE_AND_STRINGS(Parrot_UInt2, Parrot_UInt1, Parrot_UInt2, larger, smaller, res, minlen);
 		}
 	}
 
@@ -1856,6 +1856,8 @@
 	const type2 *curr2 = NULL; \
 	size_t length1 = 0; \
 	size_t length2 = 0; \
+	size_t index = 0; \
+	restype *dp; \
 	 \
 	if( s1 ) \
 	{ \
@@ -1869,8 +1871,7 @@
 		length2 = s2->strlen; \
 	} \
  \
-    restype *dp = (restype *)res->strstart; \
-    size_t index = 0; \
+    dp = (restype *)res->strstart; \
  \
     for ( ; index < maxlen ; ++curr1, ++curr2, ++dp, ++index) \
     { \
@@ -1945,13 +1946,13 @@
 		switch( maxrep )
 		{
 			case enum_stringrep_one:
-				BITWISE_OR_STRINGS(uint8_t, uint8_t, uint8_t, s1, s2, res, maxlen, |);
+				BITWISE_OR_STRINGS(Parrot_UInt1, Parrot_UInt1, Parrot_UInt1, s1, s2, res, maxlen, |);
 				break;
 			case enum_stringrep_two:
-				BITWISE_OR_STRINGS(uint16_t, uint16_t, uint16_t, s1, s2, res, maxlen, |);
+				BITWISE_OR_STRINGS(Parrot_UInt2, Parrot_UInt2, Parrot_UInt2, s1, s2, res, maxlen, |);
 				break;
 			case enum_stringrep_four:
-				BITWISE_OR_STRINGS(uint32_t, uint32_t, uint32_t, s1, s2, res, maxlen, |);
+				BITWISE_OR_STRINGS(Parrot_UInt4, Parrot_UInt4, Parrot_UInt4, s1, s2, res, maxlen, |);
 				break;
 			default:
 				/* trouble! */
@@ -1979,16 +1980,16 @@
 		{
 			if( smaller->representation == enum_stringrep_two )
 			{
-				BITWISE_OR_STRINGS(uint32_t, uint16_t, uint32_t, larger, smaller, res, maxlen, |);
+				BITWISE_OR_STRINGS(Parrot_UInt4, Parrot_UInt2, Parrot_UInt4, larger, smaller, res, maxlen, |);
 			}
 			else /* smaller->representation == enum_stringrep_one */
 			{
-				BITWISE_OR_STRINGS(uint32_t, uint8_t, uint32_t, larger, smaller, res, maxlen, |);
+				BITWISE_OR_STRINGS(Parrot_UInt4, Parrot_UInt1, Parrot_UInt4, larger, smaller, res, maxlen, |);
 			}
 		}
 		else /* larger->representation == enum_stringrep_two, smaller->representation == enum_stringrep_one */
 		{
-			BITWISE_OR_STRINGS(uint16_t, uint8_t, uint16_t, larger, smaller, res, maxlen, |);
+			BITWISE_OR_STRINGS(Parrot_UInt2, Parrot_UInt1, Parrot_UInt2, larger, smaller, res, maxlen, |);
 		}
     }
 
@@ -2058,13 +2059,13 @@
 		switch( maxrep )
 		{
 			case enum_stringrep_one:
-				BITWISE_OR_STRINGS(uint8_t, uint8_t, uint8_t, s1, s2, res, maxlen, ^);
+				BITWISE_OR_STRINGS(Parrot_UInt1, Parrot_UInt1, Parrot_UInt1, s1, s2, res, maxlen, ^);
 				break;
 			case enum_stringrep_two:
-				BITWISE_OR_STRINGS(uint16_t, uint16_t, uint16_t, s1, s2, res, maxlen, ^);
+				BITWISE_OR_STRINGS(Parrot_UInt2, Parrot_UInt2, Parrot_UInt2, s1, s2, res, maxlen, ^);
 				break;
 			case enum_stringrep_four:
-				BITWISE_OR_STRINGS(uint32_t, uint32_t, uint32_t, s1, s2, res, maxlen, ^);
+				BITWISE_OR_STRINGS(Parrot_UInt4, Parrot_UInt4, Parrot_UInt4, s1, s2, res, maxlen, ^);
 				break;
 			default:
 				/* trouble! */
@@ -2092,16 +2093,16 @@
 		{
 			if( smaller->representation == enum_stringrep_two )
 			{
-				BITWISE_OR_STRINGS(uint32_t, uint16_t, uint32_t, larger, smaller, res, maxlen, ^);
+				BITWISE_OR_STRINGS(Parrot_UInt4, Parrot_UInt2, Parrot_UInt4, larger, smaller, res, maxlen, ^);
 			}
 			else /* smaller->representation == enum_stringrep_one */
 			{
-				BITWISE_OR_STRINGS(uint32_t, uint8_t, uint32_t, larger, smaller, res, maxlen, ^);
+				BITWISE_OR_STRINGS(Parrot_UInt4, Parrot_UInt1, Parrot_UInt4, larger, smaller, res, maxlen, ^);
 			}
 		}
 		else /* larger->representation == enum_stringrep_two, smaller->representation == enum_stringrep_one */
 		{
-			BITWISE_OR_STRINGS(uint16_t, uint8_t, uint16_t, larger, smaller, res, maxlen, ^);
+			BITWISE_OR_STRINGS(Parrot_UInt2, Parrot_UInt1, Parrot_UInt2, larger, smaller, res, maxlen, ^);
 		}
 	}
 
@@ -2121,7 +2122,7 @@
 	{ \
 		const type *curr = (type *)s->strstart; \
 		size_t length = s->strlen; \
-		uint32_t *dp = (uint32_t *)res->strstart; \
+		Parrot_UInt4 *dp = (Parrot_UInt4 *)res->strstart; \
  \
 		for ( ; length ; --length) \
 		{ \
@@ -2137,13 +2138,13 @@
 	{ \
 		const type *curr = (type *)s->strstart; \
 		size_t length = s->strlen; \
-		uint32_t *dp = (uint32_t *)res->strstart; \
+		Parrot_UInt4 *dp = (Parrot_UInt4 *)res->strstart; \
  \
 		for ( ; length ; --length, ++dp, ++curr) \
 		{ \
-			uint32_t temp = *curr; \
-			if( temp <= (uint32_t)0xFF ) *dp = 0xFF & ~ *curr; \
-			else if( temp <= (uint32_t)0xFFFF ) *dp = 0xFFFF & ~ *curr; \
+			Parrot_UInt4 temp = *curr; \
+			if( temp <= (Parrot_UInt4)0xFF ) *dp = 0xFF & ~ *curr; \
+			else if( temp <= (Parrot_UInt4)0xFFFF ) *dp = 0xFFFF & ~ *curr; \
 			else *dp = 0xFFFFF & ~ *curr; \
 		} \
 	} \
@@ -2197,13 +2198,13 @@
 	switch( s->representation )
 	{
 		case enum_stringrep_one:
-			BITWISE_NOT_STRING(uint8_t, s, res);
+			BITWISE_NOT_STRING(Parrot_UInt1, s, res);
 			break;
 		case enum_stringrep_two:
-			BITWISE_NOT_STRING(uint16_t, s, res);
+			BITWISE_NOT_STRING(Parrot_UInt2, s, res);
 			break;
 		case enum_stringrep_four:
-			BITWISE_NOT_STRING(uint32_t, s, res);
+			BITWISE_NOT_STRING(Parrot_UInt4, s, res);
 			break;
 		default:
 			/* trouble */
@@ -2758,13 +2759,13 @@
 	switch( s->representation )
 	{
 		case enum_stringrep_one:
-			HASH_STRING(uint8_t, s, h);
+			HASH_STRING(Parrot_UInt1, s, h);
 			break;
 		case enum_stringrep_two:
-			HASH_STRING(uint16_t, s, h);
+			HASH_STRING(Parrot_UInt2, s, h);
 			break;
 		case enum_stringrep_four:
-			HASH_STRING(uint32_t, s, h);
+			HASH_STRING(Parrot_UInt4, s, h);
 			break;
 		default:
 			/* trouble */
