patch for bug 95844(Re: was howto submit patch)
Larry Evans
jcampbell3@prodigy.net
Sat, 19 Oct 2002 07:12:04 -0600
Larry Evans wrote:
> I "reattached" the attachment.
[snip]
>------------------------------------------------------------------------
>
>This message has been 'sanitized'. This means that potentially
>dangerous content has been rewritten or removed. The following
>log describes which actions were taken.
>
>
[snip]
I'll try again just using cut&past:
<------------- begin diff -u --------------------------->
--- qif-parse.scm Fri Oct 18 13:18:53 2002
+++ qif-parse.scm.old Fri Oct 18 18:00:07 2002
@@ -491,17 +491,13 @@
(string-remove-char
(string-remove-char value-string #\,)
#\$))
- (has-radix
- ( if (regexp-exec (make-regexp "^.*[.].*$") filtered-string)
- 1
- 0))
- (read-val
+ (read-val
(with-input-from-string filtered-string
(lambda () (read)))))
(if (number? read-val)
(gnc:double-to-gnc-numeric
(+ 0.0 read-val) GNC-DENOM-AUTO
- (logior (GNC-DENOM-SIGFIGS (- (string-length
filtered-string) has-radix))
+ (logior (GNC-DENOM-SIGFIGS (- (string-length
filtered-string) 1))
GNC-RND-ROUND))
(gnc:numeric-zero))))
((comma)
@@ -511,17 +507,13 @@
(string-remove-char value-string #\.)
#\, #\.)
#\$))
- (has-radix
- ( if (regexp-exec (make-regexp "^.*[,].*$") filtered-string)
- 1
- 0))
(read-val
(with-input-from-string filtered-string
(lambda () (read)))))
(if (number? read-val)
(gnc:double-to-gnc-numeric
(+ 0.0 read-val) GNC-DENOM-AUTO
- (logior (GNC-DENOM-SIGFIGS (- (string-length
filtered-string) has-radix))
+ (logior (GNC-DENOM-SIGFIGS (- (string-length
filtered-string) 1))
GNC-RND-ROUND))
(gnc:numeric-zero))))
((integer)
>------------- end diff -u ------------------------------<