diff --git a/ChangeLog b/ChangeLog index 78cb224ea7..6f8c9d6dbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,21 @@ * src/app-utils/prefs.scm: replace an API needed by old scheme config files. It was removed in r11565. Replace it now. + * src/backend/file/io-example-account.c + * src/backend/file/sixtp-utils.c + * src/backend/file/sixtp.c + * src/calculation/expression_parser.c + * src/gnome-utils/gnc-date-edit.c + * src/gnome-utils/gnc-menu-extensions.c + * src/app-utils/gnc-ui-util.h + * src/app-utils/gnc-ui-util.c + * doc/Makefile.am + * lib/libqof/qof/guid.c + * lib/libqof/qof/gnc-date.c + * lib/libqof/qof/gnc-engine-util.c + * lib/libqof/qof/gnc-engine-util.h + Thomas Klausner's NetBSD patch. + 2006-01-21 David Hampton * src/gnome-utils/*.glade: Move glade files to a new subdirectory. diff --git a/doc/Makefile.am b/doc/Makefile.am index 007e3ecd7b..64c27b80d5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -55,7 +55,7 @@ gnucash.1: gnucash.1.in Makefile tip_of_the_day.list: tip_of_the_day.list.in Makefile gcc -E -P -x c -D'N_(x)=x' -o $@.tmp $< - cat -s $@.tmp | ${SED} -e 's/^ *\"\(.*\)\" *$$/\1/m' > $@ + cat -s $@.tmp | ${SED} -e 's/^ *\"\(.*\)\" *$$/\1/' > $@ rm -f $@.tmp DISTCLEANFILES = gnc-prices.1 gnucash.1 tip_of_the_day.list diff --git a/lib/libqof/qof/gnc-date.c b/lib/libqof/qof/gnc-date.c index 71b9ba454a..2d89ccd0f8 100644 --- a/lib/libqof/qof/gnc-date.c +++ b/lib/libqof/qof/gnc-date.c @@ -934,10 +934,10 @@ char dateSeparator (void) return locale_separator; else { /* Make a guess */ - char string[256]; + unsigned char string[256]; struct tm *tm; time_t secs; - char *s; + unsigned char *s; secs = time(NULL); tm = localtime(&secs); @@ -1055,7 +1055,7 @@ gnc_iso8601_to_timespec_gmt(const char *str) str +=3; if ('.' == *str) str++; - if (isdigit (*str) && isdigit (*(str+1))) + if (isdigit ((unsigned char)*str) && isdigit ((unsigned char)*(str+1))) { int cyn; /* copy sign from hour part */ diff --git a/lib/libqof/qof/gnc-engine-util.c b/lib/libqof/qof/gnc-engine-util.c index cd574d0c29..95fd74c2e8 100644 --- a/lib/libqof/qof/gnc-engine-util.c +++ b/lib/libqof/qof/gnc-engine-util.c @@ -40,7 +40,7 @@ /* Search for str2 in first nchar chars of str1, ignore case.. Return * pointer to first match, or null. */ char * -strncasestr(const char *str1, const char *str2, size_t len) +strncasestr(const unsigned char *str1, const unsigned char *str2, size_t len) { while (*str1 && len--) { @@ -145,7 +145,7 @@ ultostr (unsigned long val, int base) \********************************************************************/ gboolean -gnc_strisnum(const char *s) +gnc_strisnum(const unsigned char *s) { if (s == NULL) return FALSE; if (*s == 0) return FALSE; diff --git a/lib/libqof/qof/gnc-engine-util.h b/lib/libqof/qof/gnc-engine-util.h index da764d79b5..8ba9cd12dd 100644 --- a/lib/libqof/qof/gnc-engine-util.h +++ b/lib/libqof/qof/gnc-engine-util.h @@ -226,7 +226,7 @@ int null_strcmp (const char * da, const char * db); /** Search for str2 in first nchar chars of str1, ignore case. Return * pointer to first match, or null. These are just like that strnstr * and the strstr functions, except that they ignore the case. */ -extern char *strncasestr(const char *str1, const char *str2, size_t len); +extern char *strncasestr(const unsigned char *str1, const unsigned char *str2, size_t len); extern char *strcasestr(const char *str1, const char *str2); /** The ultostr() subroutine is the inverse of strtoul(). It accepts a @@ -236,7 +236,7 @@ char * ultostr (unsigned long val, int base); /** Returns true if string s is a number, possibly surrounded by * whitespace. */ -gboolean gnc_strisnum(const char *s); +gboolean gnc_strisnum(const unsigned char *s); /** Local copy of stpcpy, used wtih libc's that don't have one. */ char * gnc_stpcpy (char *dest, const char *src); diff --git a/lib/libqof/qof/guid.c b/lib/libqof/qof/guid.c index b424d0025a..270ec6d51d 100644 --- a/lib/libqof/qof/guid.c +++ b/lib/libqof/qof/guid.c @@ -548,11 +548,11 @@ 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 char *string, unsigned char *data) +decode_md5_string(const unsigned char *string, unsigned char *data) { unsigned char n1, n2; size_t count = -1; - char c1, c2; + unsigned char c1, c2; if (NULL == data) return FALSE; if (NULL == string) goto badstring; diff --git a/src/app-utils/gnc-ui-util.c b/src/app-utils/gnc-ui-util.c index bc1e7f01a8..4d1d12feae 100644 --- a/src/app-utils/gnc-ui-util.c +++ b/src/app-utils/gnc-ui-util.c @@ -1586,8 +1586,8 @@ xaccParseAmount (const char * in_str, gboolean monetary, gnc_numeric *result, gboolean xaccParseAmountExtended (const char * in_str, gboolean monetary, - char negative_sign, char decimal_point, - char group_separator, char *group, char *ignore_list, + char negative_sign, unsigned char decimal_point, + unsigned char group_separator, char *group, char *ignore_list, gnc_numeric *result, char **endstr) { gboolean is_negative; @@ -1600,7 +1600,7 @@ xaccParseAmountExtended (const char * in_str, gboolean monetary, ParseState state; - const char *in; + const unsigned char *in; char *out_str; char *out; diff --git a/src/app-utils/gnc-ui-util.h b/src/app-utils/gnc-ui-util.h index aa2d23b4e1..d5faa09704 100644 --- a/src/app-utils/gnc-ui-util.h +++ b/src/app-utils/gnc-ui-util.h @@ -327,8 +327,8 @@ gboolean xaccParseAmount (const char * in_str, gboolean monetary, */ gboolean xaccParseAmountExtended (const char * in_str, gboolean monetary, - char negative_sign, char decimal_point, - char group_separator, char *group, char *ignore_list, + char negative_sign, unsigned char decimal_point, + unsigned char group_separator, char *group, char *ignore_list, gnc_numeric *result, char **endstr); /* Initialization ***************************************************/ diff --git a/src/backend/file/io-example-account.c b/src/backend/file/io-example-account.c index e57d0f4510..f8b018681e 100644 --- a/src/backend/file/io-example-account.c +++ b/src/backend/file/io-example-account.c @@ -157,7 +157,7 @@ generic_callback(const char *tag, gpointer globaldata, gpointer data) } static char* -squash_extra_whitespace(char *text) +squash_extra_whitespace(unsigned char *text) { int spot; int length = strlen(text); diff --git a/src/backend/file/sixtp-utils.c b/src/backend/file/sixtp-utils.c index d3830c82a6..0df053be8c 100644 --- a/src/backend/file/sixtp-utils.c +++ b/src/backend/file/sixtp-utils.c @@ -55,7 +55,7 @@ static QofLogModule log_module = GNC_MOD_IO; gboolean isspace_str(const gchar *str, int nomorethan) { - const gchar *cursor = str; + const guchar *cursor = str; while(*cursor && (nomorethan != 0)) { if(!isspace(*cursor)) { return(FALSE); @@ -233,7 +233,7 @@ string_to_gint64(const gchar *str, gint64 *v) * is fixed in the next release 10.2 afaik */ while( (*((gchar*)str + num_read)!='\0') && - isspace(*((char*)str + num_read))) + isspace(*((unsigned char*)str + num_read))) num_read++; if (v) @@ -259,7 +259,7 @@ string_to_gint32(const gchar *str, gint32 *v) return(FALSE); } while( (*((gchar*)str + num_read)!='\0') && - isspace(*((char*)str + num_read))) + isspace(*((unsigned char*)str + num_read))) num_read++; if (v) @@ -277,7 +277,7 @@ gboolean hex_string_to_binary(const gchar *str, void **v, guint64 *data_len) { /* Convert a hex string to binary. No whitespace allowed. */ - const gchar *cursor = str; + const guchar *cursor = str; guint64 str_len; gboolean error = FALSE; @@ -501,7 +501,7 @@ string_to_timespec_nsecs(const gchar *str, Timespec *ts) sscanf(str, " %ld%n", &nanosecs, &charcount); while( (*((gchar*)str + charcount)!='\0') && - isspace(*((char*)str + charcount))) + isspace(*((unsigned char*)str + charcount))) charcount++; if(charcount != strlen(str)) return(FALSE); diff --git a/src/backend/file/sixtp.c b/src/backend/file/sixtp.c index 7863b5f8ae..26152b1e23 100644 --- a/src/backend/file/sixtp.c +++ b/src/backend/file/sixtp.c @@ -750,7 +750,7 @@ sixtp_parse_buffer(sixtp *sixtp, /***********************************************************************/ static gboolean -eat_whitespace(char **cursor) +eat_whitespace(unsigned char **cursor) { while(**cursor && isspace(**cursor)) { @@ -768,7 +768,7 @@ eat_whitespace(char **cursor) } static gboolean -search_for(char marker, char **cursor) +search_for(unsigned char marker, unsigned char **cursor) { while(**cursor && **cursor != marker) { @@ -791,7 +791,7 @@ gnc_is_our_xml_file(const char *filename, const char *first_tag) { FILE *f = NULL; char first_chunk[256]; - char* cursor = NULL; + unsigned char* cursor = NULL; ssize_t num_read; g_return_val_if_fail(filename, FALSE); diff --git a/src/calculation/expression_parser.c b/src/calculation/expression_parser.c index 3af6dc4faa..98de093e9d 100644 --- a/src/calculation/expression_parser.c +++ b/src/calculation/expression_parser.c @@ -760,7 +760,7 @@ static void next_token (parser_env_ptr pe) { char *nstr; - const char *str_parse = pe->parse_str; + const unsigned char *str_parse = pe->parse_str; void *number; while (isspace (*str_parse)) diff --git a/src/gnome-utils/gnc-date-edit.c b/src/gnome-utils/gnc-date-edit.c index 0c1f3e4f67..0b0f4261e5 100644 --- a/src/gnome-utils/gnc-date-edit.c +++ b/src/gnome-utils/gnc-date-edit.c @@ -782,7 +782,8 @@ static struct tm gnc_date_edit_get_date_internal (GNCDateEdit *gde) { struct tm tm = {0}; - char *str, *flags = NULL; + char *str; + unsigned char *flags = NULL; /* Assert, because we're just hosed if it's NULL */ g_assert(gde != NULL); @@ -800,7 +801,8 @@ gnc_date_edit_get_date_internal (GNCDateEdit *gde) tm.tm_year -= 1900; if (gde->flags & GNC_DATE_EDIT_SHOW_TIME) { - char *tokp = NULL, *temp; + char *tokp = NULL; + unsigned char *temp; str = g_strdup (gtk_entry_get_text (GTK_ENTRY (gde->time_entry))); diff --git a/src/gnome-utils/gnc-menu-extensions.c b/src/gnome-utils/gnc-menu-extensions.c index 22b4be8548..cac359d019 100644 --- a/src/gnome-utils/gnc-menu-extensions.c +++ b/src/gnome-utils/gnc-menu-extensions.c @@ -178,7 +178,7 @@ static gchar* gnc_ext_gen_action_name (const gchar *name) { //gchar *extName; - const gchar *extChar; + const guchar *extChar; GString *actionName; actionName = g_string_sized_new( strlen( name ) + 7 );