After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 102236 - currency_date_format_init is a disaster
currency_date_format_init is a disaster
Status: VERIFIED INCOMPLETE
Product: Gnumeric
Classification: Applications
Component: Main System
git master
Other All
: Normal major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2002-12-30 19:15 UTC by Morten Welinder
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't use GNU regexp (7.03 KB, patch)
2003-01-05 15:21 UTC, Nicolas Peninguy
none Details | Review

Description Morten Welinder 2002-12-30 19:15:56 UTC
1. The _date_ part of its name is misleading.

2. It uses undefined regexps: \| for choice.  (Basic REs do not have
   anything with that semantics, I believe.)

3. The code is unreadable.

4. Regardless of (3), I think the code uses back references (\1) in
   regular expressions as a macro facility.  That doesn't work.
   Back references match the same string as the parenthesis referenced,
   it does not mean the-same-subexpression.

5. The code contains non-ASCII characters.  It would be better to use
   C-level escapes.
Comment 1 Morten Welinder 2002-12-30 19:23:10 UTC
Oh, and some regular expressions are longer than 255 characters and thus
not guaranteed to work, even in a posix implementation.
Comment 2 Nicolas Peninguy 2003-01-05 15:21:53 UTC
Created attachment 13360 [details] [review]
Don't use GNU regexp
Comment 3 Nicolas Peninguy 2003-01-05 15:26:07 UTC
I probably won't have the time to make a better fix... So for now this
should be OK.

jody: I don't use REG_ICASE because it causes some strange problems :

^(.*);\1$ matches x;x but not €;€ (euro;euro)
Comment 4 Jody Goldberg 2003-01-22 03:23:54 UTC
Looks like an improvement.  Applied.
Morten, is more work necessary ?
Comment 5 Morten Welinder 2003-01-22 14:20:12 UTC
Well, yes: an entire rewrite of the formating system, :-)
Closing.