mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-05-31 Dave Peticolas <dave@krondo.com>
* src/engine/sixtp-utils.c (string_to_gint32): use intermediate variable in case int != gint32. * src/test/test-dom-converters1.c: fix spelling * src/engine/sixtp-dom-generators.c (int_to_dom_tree): cast gint64 to long long int for %lld. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4345 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
172432e86c
commit
462499cf29
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2001-05-31 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/engine/sixtp-utils.c (string_to_gint32): use intermediate
|
||||
variable in case int != gint32.
|
||||
|
||||
* src/test/test-dom-converters1.c: fix spelling
|
||||
|
||||
* src/engine/sixtp-dom-generators.c (int_to_dom_tree): cast
|
||||
gint64 to long long int for %lld.
|
||||
|
||||
2001-05-31 James LewisMoss <jimdres@mindspring.com>
|
||||
|
||||
* src/scm/tip-of-the-day.scm ((gnc:current-tip-number)): reset
|
||||
|
@ -54,8 +54,8 @@ int_to_dom_tree(const char *tag, gint64 val)
|
||||
{
|
||||
gchar *text;
|
||||
xmlNodePtr result;
|
||||
|
||||
text = g_strdup_printf("%lld", val);
|
||||
|
||||
text = g_strdup_printf("%lld", (long long int) val);
|
||||
result = text_to_dom_tree(tag, text);
|
||||
g_free(text);
|
||||
return result;
|
||||
|
@ -214,14 +214,18 @@ string_to_gint64(const gchar *str, gint64 *v) {
|
||||
|
||||
gboolean
|
||||
string_to_gint32(const gchar *str, gint32 *v) {
|
||||
/* convert a string to a gint32. only whitespace allowed before and after. */
|
||||
/* convert a string to a gint32. only whitespace allowed before and after. */
|
||||
int num_read;
|
||||
int v_in;
|
||||
|
||||
/* must use "<" here because %n's effects aren't well defined */
|
||||
if(sscanf(str, " %d %n", v, &num_read) < 1) {
|
||||
if(sscanf(str, " %d %n", &v_in, &num_read) < 1) {
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
if (v)
|
||||
*v = v_in;
|
||||
|
||||
if(!isspace_str(str + num_read, -1)) return(FALSE);
|
||||
return(TRUE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user