GNOME Bugzilla – Bug 102236
currency_date_format_init is a disaster
Last modified: 2009-08-15 18:40:50 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.
Oh, and some regular expressions are longer than 255 characters and thus not guaranteed to work, even in a posix implementation.
Created attachment 13360 [details] [review] Don't use GNU regexp
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)
Looks like an improvement. Applied. Morten, is more work necessary ?
Well, yes: an entire rewrite of the formating system, :-) Closing.