Allow comma-radix numbers without a radix. Fixes #142424.

I.e., allow "17.500" to be parsed either as "seventeen and a half"
or as "seventeen thousand five hundred".  Note that numbers STILL
default to decimal-radix instead of asking the user to choose.
BP



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14523 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2006-07-16 23:01:00 +00:00
parent e7e959f54f
commit e20663cbd8
2 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,12 @@
* src/import-export/qif-import/qif-file.scm:
Ignore any unknown !Option specification. Fixes #160735.
* src/import-export/qif-import/qif-parse.scm:
Allow comma-radix numbers without a radix. Fixes #142424.
I.e., allow "17.500" to be parsed either as "seventeen and a half"
or as "seventeen thousand five hundred". Note that numbers STILL
default to decimal-radix instead of asking the user to choose.
2006-07-16 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/gnc-main-window.c: Do not move windows on

View File

@ -23,7 +23,7 @@
(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]+ *$"))