Thomas Klausner's NetBSD patch.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12928 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2006-01-22 00:27:11 +00:00
parent 15ac05406c
commit 36f92f2d23
14 changed files with 45 additions and 28 deletions

View File

@ -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 <hampton@employees.org>
* src/gnome-utils/*.glade: Move glade files to a new subdirectory.

View File

@ -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

View File

@ -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 */

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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 ***************************************************/

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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))

View File

@ -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)));

View File

@ -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 );