From c812daf775f9eea196fde849e91938f4fedf3bb5 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Tue, 24 Dec 2002 07:48:02 +0000 Subject: [PATCH] In QIF import, allow a leading '+' sign in the currency field. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7723 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ src/import-export/qif-import/qif-parse.scm | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fed688e5e..e18088df56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2002-12-23 David Hampton + * src/import-export/qif-import/qif-parse.scm: Fix regexps to + handle a leading '+' sign in the currency field. (Bug reported on + gnucash-user.) + + * src/gnome-utils/gnc-html.c: The stream_handler hook needs to return a file size. Not all files opened by this function are ASCII text. Reset the base_location properly when switching diff --git a/src/import-export/qif-import/qif-parse.scm b/src/import-export/qif-import/qif-parse.scm index 8c69bed753..b85d376769 100644 --- a/src/import-export/qif-import/qif-parse.scm +++ b/src/import-export/qif-import/qif-parse.scm @@ -14,13 +14,13 @@ (define decimal-radix-regexp (make-regexp - "^ *\\$?-?\\$?[0-9]+$|^ *\\$?-?\\$?[0-9]?[0-9]?[0-9]?(,[0-9][0-9][0-9])*(\\.[0-9]*)? *$|^ *\\$?-?\\$?[0-9]+\\.[0-9]* *$")) + "^ *\\$?[+-]?\\$?[0-9]+$|^ *\\$?[+-]?\\$?[0-9]?[0-9]?[0-9]?(,[0-9][0-9][0-9])*(\\.[0-9]*)? *$|^ *\\$?[+-]?\\$?[0-9]+\\.[0-9]* *$")) (define comma-radix-regexp (make-regexp - "^ *\\$?-?\\$?[0-9]+$|^ *\\$?-?\\$?[0-9]?[0-9]?[0-9]?(\\.[0-9][0-9][0-9])*(,[0-9]*) *$|^ *\\$?-?\\$?[0-9]+,[0-9]* *$")) + "^ *\\$?[+-]?\\$?[0-9]+$|^ *\\$?[+-]?\\$?[0-9]?[0-9]?[0-9]?(\\.[0-9][0-9][0-9])*(,[0-9]*) *$|^ *\\$?[+-]?\\$?[0-9]+,[0-9]* *$")) -(define integer-regexp (make-regexp "^\\$?-?\\$?[0-9]+ *$")) +(define integer-regexp (make-regexp "^\\$?[+-]?\\$?[0-9]+ *$")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; qif-split:parse-category