Commit a6874855 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Completed char -> unsigned char conversion.

Renamed s-collat-tables.h -> s-collat-tabs.h
parent c9c9b81e
......@@ -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));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment