Hi -
Thank you for your great work on the PCRE package!
I have a suggestion related to the Posix interface to add an optional value for UnGreedy.
Below I've suggested using "REG_X_UNGREEDY" with the "_X_" implying it's non-standard.
Mainly for my own clarity I've also suggested some comments in pcreposix.h for a couple of #defines.
Sorry, I fear my email program will not represent whitespace properly for these DIFF.
Below is a DIFF for pcreposix.h:
55,56c57,58
< #define REG_ICASE 0x0001
< #define REG_NEWLINE 0x0002
---
> #define REG_ICASE 0x0001 /* maps to PCRE_CASELESS */
> #define REG_NEWLINE 0x0002 /* maps to PCRE_MULTILINE */
69a72,74
> /* Guy hack to allow UNGREEDY to be set */
> #define REG_X_UNGREEDY 0x0800 //=== Guy ===
>
Next is a DIFF for pcreposix.c
234a237,241
> //=== Guy added ===
> #ifdef REG_X_UNGREEDY
> if ((cflags & REG_X_UNGREEDY) != 0) options |= PCRE_UNGREEDY;
> #endif
>
279a287,288
>
> if (!pmatch) nmatch = 0; //=== Guy added ===
The if() above is to avoid a possible error when the caller specifies the nmatch quantity
without passing an array for them.
Please ignore the "Guy" in the comments, I put them there just for clarity of what was touched.
I seek no credit.
If this email is not a good method to send this content then please let me know what forum
or other method is best to communicate.
The PCRE bug tracker at exim.org did not seem appropriate for mentioning non-bugs.
If desired, I can also supply MAK file and some information for building PCRE
as a native Windows DLL using Microsoft's Visual C++ (version 6).
If not desired by your group, I will try to find another way of documenting that.
Thanks & Best Regards,
Guy.