diff --git a/src/libraries/libmisc/s-string.c b/src/libraries/libmisc/s-string.c index 30cfbe723f2c6d37101547b5bfb683d05d904f6d..850f48e81e7b1e44769b091fa54426c75ff75787 100644 --- a/src/libraries/libmisc/s-string.c +++ b/src/libraries/libmisc/s-string.c @@ -31,7 +31,7 @@ #include <assert.h> #include <misc-types.h> -#include "s-collat-tables.h" +#include "s-collat-tabs.h" #include "s-string.h" @@ -114,7 +114,7 @@ s_crea_str (String * dest_string, FREE_0 (dest_string->string); dest_string->string = temp_ptr; - strncpy(dest_string->string, c_string, length); + strncpy((char *)dest_string->string, c_string, length); dest_string->len = length; return OK; @@ -130,15 +130,15 @@ s_crea_str (String * dest_string, * by s_crea_str(), to deallocate the memory used by it. */ EXPORT String -s_fcrea_str (const char * c_string) +s_fcrea_str (const unsigned char * c_string) { String temp; /* Cast needed to make compiler not warn about assignment from * const pointer to non-const pointer. Sigh... */ - temp.string = (char *) c_string; - temp.len = strlen(c_string); + temp.string = (unsigned char *)c_string; + temp.len = strlen((const char *)c_string); return temp; } @@ -239,7 +239,7 @@ s_strcat (String * dest_string, { return FAILURE; } - dest_string->string = (char *)temp_ptr; + dest_string->string = temp_ptr; /* Append SOURCE_STRING to *DEST_STRING */ memcpy (dest_string->string + s_strlen (*dest_string), @@ -293,7 +293,7 @@ s_substr (String * dest_string, { return FAILURE; } - dest_string->string = (char *)temp_ptr; + dest_string->string = temp_ptr; /* Copy substring to DEST_STRING */ memcpy (dest_string->string, @@ -571,7 +571,7 @@ s_strchr (const String str, String_size start_pos) { - char * ptr; + unsigned char * ptr; assert (start_pos >= 0 && start_pos <= s_strlen (str));