Fix some signed vs. unsigned char pointer type conflicts.

This patch chooses the correct char type to resolve the type conflict.

Patch by J. Alex Aycinena.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18225 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2009-07-24 20:07:14 +00:00
parent 16abce8a29
commit 0e72f8e066
14 changed files with 20 additions and 20 deletions

View File

@ -172,7 +172,7 @@ generic_callback(const char *tag, gpointer globaldata, gpointer data)
}
static char*
squash_extra_whitespace(unsigned char *text)
squash_extra_whitespace(char *text)
{
int spot;
int length = strlen(text);

View File

@ -852,7 +852,7 @@ dom_tree_generic_parse(xmlNodePtr node, struct dom_tree_handler *handlers,
}
gboolean
dom_tree_valid_timespec (Timespec *ts, const gchar *name)
dom_tree_valid_timespec (Timespec *ts, const xmlChar *name)
{
if (ts->tv_sec || ts->tv_nsec)

View File

@ -41,7 +41,7 @@ GList* dom_tree_freqSpec_to_recurrences(xmlNodePtr node, QofBook *book);
Recurrence* dom_tree_to_recurrence(xmlNodePtr node);
Timespec dom_tree_to_timespec(xmlNodePtr node);
gboolean dom_tree_valid_timespec(Timespec *ts, const gchar *name);
gboolean dom_tree_valid_timespec(Timespec *ts, const xmlChar *name);
GDate* dom_tree_to_gdate(xmlNodePtr node);
gnc_numeric* dom_tree_to_gnc_numeric(xmlNodePtr node);
gchar * dom_tree_to_text(xmlNodePtr tree);

View File

@ -51,7 +51,7 @@ static QofLogModule log_module = GNC_MOD_IO;
gboolean
isspace_str(const gchar *str, int nomorethan)
{
const guchar *cursor = str;
const gchar *cursor = str;
while(*cursor && (nomorethan != 0)) {
if(!isspace(*cursor)) {
return(FALSE);
@ -273,7 +273,7 @@ gboolean
hex_string_to_binary(const gchar *str, void **v, guint64 *data_len)
{
/* Convert a hex string to binary. No whitespace allowed. */
const guchar *cursor = str;
const gchar *cursor = str;
guint64 str_len;
gboolean error = FALSE;

View File

@ -810,7 +810,7 @@ sixtp_parse_push (sixtp *sixtp,
/***********************************************************************/
static gboolean
eat_whitespace(unsigned char **cursor)
eat_whitespace(char **cursor)
{
while(**cursor && isspace(**cursor))
{
@ -828,7 +828,7 @@ eat_whitespace(unsigned char **cursor)
}
static gboolean
search_for(unsigned char marker, unsigned char **cursor)
search_for(unsigned char marker, char **cursor)
{
while(**cursor && **cursor != marker)
{
@ -879,7 +879,7 @@ gboolean
gnc_is_our_first_xml_chunk(char *chunk, const char *first_tag,
gboolean *with_encoding)
{
unsigned char* cursor = NULL;
char *cursor = NULL;
if (with_encoding) {
*with_encoding = FALSE;

View File

@ -764,7 +764,7 @@ static void
next_token (parser_env_ptr pe)
{
char *nstr;
const unsigned char *str_parse = pe->parse_str;
const char *str_parse = pe->parse_str;
void *number;
while (isspace (*str_parse))

View File

@ -985,7 +985,7 @@ gnc_date_edit_get_date_internal (GNCDateEdit *gde)
{
struct tm tm = {0};
char *str;
unsigned char *flags = NULL;
gchar *flags = NULL;
/* Assert, because we're just hosed if it's NULL */
g_assert(gde != NULL);
@ -1004,7 +1004,7 @@ gnc_date_edit_get_date_internal (GNCDateEdit *gde)
if (gde->flags & GNC_DATE_EDIT_SHOW_TIME) {
char *tokp = NULL;
unsigned char *temp;
gchar *temp;
str = g_strdup (gtk_entry_get_text
(GTK_ENTRY (gde->time_entry)));

View File

@ -88,7 +88,7 @@ struct _GncDenseCal
guint label_width;
guint label_height;
guint dayLabelHeight;
gint dayLabelHeight;
GncDenseCalModel *model;

View File

@ -187,8 +187,8 @@ gnc_extension_path (SCM extension, char **fullpath)
static gchar*
gnc_ext_gen_action_name (const gchar *name)
{
//gchar *extName;
const guchar *extChar;
const gchar *extChar;
GString *actionName;
actionName = g_string_sized_new( strlen( name ) + 7 );

View File

@ -77,7 +77,7 @@ qsf_map_validation_handler(xmlNodePtr child, xmlNsPtr ns, qsf_validator *valid)
xmlChar *qof_version, *match;
GString *buff;
xmlNodePtr child_node;
QofIdType obj_type;
xmlChar *obj_type;
if (qsf_is_element(child, ns, MAP_DEFINITION_TAG)) {
qof_version = xmlGetProp(child, BAD_CAST MAP_QOF_VERSION);

View File

@ -821,10 +821,10 @@ char dateSeparator (void)
return locale_separator;
else
{ /* Make a guess */
unsigned char string[256];
gchar string[256];
struct tm tm;
time_t secs;
unsigned char *s;
gchar *s;
secs = time(NULL);
localtime_r(&secs, &tm);

View File

@ -589,7 +589,7 @@ encode_md5_data(const unsigned char *data, char *buffer)
* a hex number. returns false otherwise. Decoded number
* is packed into data in little endian order. */
static gboolean
decode_md5_string(const unsigned char *string, unsigned char *data)
decode_md5_string(const gchar *string, unsigned char *data)
{
unsigned char n1, n2;
size_t count = -1;

View File

@ -177,7 +177,7 @@ ultostr (gulong val, gint base)
/* =================================================================== */
gboolean
gnc_strisnum(const guchar *s)
gnc_strisnum(const gchar *s)
{
if (s == NULL) return FALSE;
if (*s == 0) return FALSE;

View File

@ -218,7 +218,7 @@ gchar * ultostr (gulong val, gint base);
/** Returns true if string s is a number, possibly surrounded by
* whitespace. */
gboolean gnc_strisnum(const guchar *s);
gboolean gnc_strisnum(const gchar *s);
#ifndef HAVE_STPCPY
#define stpcpy g_stpcpy