wok-current view R/stuff/pcre.u @ rev 25680
Add neofetch, remove *.la for conky deps
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun Mar 10 13:41:01 2024 +0000 (8 months ago) |
parents | |
children |
line source
1 Fix for pcre-8.30 and above
3 --- src/main/util.c.orig 2012-02-09 17:15:08.000000000 +0000
4 +++ src/main/util.c 2012-02-09 17:20:31.000000000 +0000
5 @@ -1257,8 +1257,18 @@
6 }
8 #include "pcre.h"
9 +
10 +/* This changed at 8.30 */
11 +#if PCRE_MAJOR > 8 || PCRE_MINOR >= 30
12 +extern int _pcre_valid_utf(const char *string, int length, int *erroroffset);
13 +
14 +Rboolean utf8Valid(const char *str)
15 +{
16 + int errp;
17 + return (_pcre_valid_utf(str, (int) strlen(str), &errp) == 0);
18 +}
19 /* This changed at 8.13: we don't allow < 8.0 */
20 -#if PCRE_MAJOR > 8 || PCRE_MINOR >= 13
21 +#elif PCRE_MAJOR > 8 || PCRE_MINOR >= 13
22 extern int _pcre_valid_utf8(const char *string, int length, int *erroroffset);
24 Rboolean utf8Valid(const char *str)
25 @@ -1266,7 +1276,7 @@
26 int errp;
27 return (_pcre_valid_utf8(str, (int) strlen(str), &errp) == 0);
28 }
29 -#else
30 +#else
31 extern int _pcre_valid_utf8(const char *string, int length);
33 Rboolean utf8Valid(const char *str)