1st patch for src/formats.c



Hello everyone, hello Jody,

Attached is a patch to apply on src/formats.c. With it
cell_format_classify() now uses regexp (in fact it's in
cell_format_is_number()).

Some stupid questions :

 - where can I put regcomp so it is called only once ?
 - I've define a new function find_currency(), should I declare it in
formats.h ?
 
The regexp which handles FMT_NUMBER and FMT_CURRENCY is not very
readable but I think it is OK.

FMT_ACCOUNT still needs work, but now FMT_CURRENCY is OK.

As it is my first patch on Gnumeric (and the first time I use regexp in
a program) please tell me if anything is bad in my code.

Thank you,

Nicolas

Attachment: formats.c.patch
Description: Patch



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]