- additional test for matchgroup

This commit is contained in:
2017-03-03 11:06:48 +00:00
parent 7586365595
commit 8f5e44c372

View File

@@ -16,7 +16,7 @@
#include <regex.h> #include <regex.h>
#define XREGEX_IS_MATCHGROUP(groupArray, groupIndex) (groupArray[groupIndex].rm_so < groupArray[groupIndex].rm_eo) #define XREGEX_IS_MATCHGROUP(groupArray, groupIndex) (groupArray[groupIndex].rm_so < groupArray[groupIndex].rm_eo && 0 <= groupArray[groupIndex].rm_so)
#define XREGEX_SIZEOF_MATCHGROUP(groupArray, groupIndex) (size_t) (groupArray[groupIndex].rm_eo - groupArray[groupIndex].rm_so) #define XREGEX_SIZEOF_MATCHGROUP(groupArray, groupIndex) (size_t) (groupArray[groupIndex].rm_eo - groupArray[groupIndex].rm_so)
#endif /* EXT_XREGEX_H_ */ #endif /* EXT_XREGEX_H_ */