summaryrefslogtreecommitdiffstats
path: root/system/csvutils/fix_i_option.diff
diff options
context:
space:
mode:
Diffstat (limited to 'system/csvutils/fix_i_option.diff')
-rw-r--r--system/csvutils/fix_i_option.diff21
1 files changed, 21 insertions, 0 deletions
diff --git a/system/csvutils/fix_i_option.diff b/system/csvutils/fix_i_option.diff
new file mode 100644
index 0000000000..b00c56904f
--- /dev/null
+++ b/system/csvutils/fix_i_option.diff
@@ -0,0 +1,21 @@
+diff -Naur csvutils-0.9.3+20161218_e57951b/src/csvgrep.c csvutils-0.9.3+20161218_e57951b.patched/src/csvgrep.c
+--- csvutils-0.9.3+20161218_e57951b/src/csvgrep.c 2022-01-26 02:05:12.660602834 -0500
++++ csvutils-0.9.3+20161218_e57951b.patched/src/csvgrep.c 2022-01-26 02:22:34.393508136 -0500
+@@ -788,7 +788,7 @@
+ #ifdef WITHOUT_PCRE
+ err("not compiled with pcre support");
+ #else
+- re = pcre_compile(pattern, 0, &err_ptr, &rv, NULL);
++ re = pcre_compile(pattern, (ignore_case ? PCRE_CASELESS : 0), &err_ptr, &rv, NULL);
+ if (rv) {
+ fprintf(stderr, "Error parsing pattern expression: %s\n", err_ptr);
+ exit(EXIT_FAILURE);
+@@ -798,7 +798,7 @@
+ #ifdef WITHOUT_POSIX
+ err("not compiled with posix support");
+ #else
+- if ((rv = regcomp(&preg, pattern, REG_EXTENDED | REG_NOSUB )) != 0) {
++ if ((rv = regcomp(&preg, pattern, REG_EXTENDED | REG_NOSUB | (ignore_case ? REG_ICASE : 0))) != 0) {
+ regerror(rv, &preg, errbuf, sizeof errbuf);
+ fprintf(stderr, "Error parsing pattern expression: %s\n", errbuf);
+ exit(EXIT_FAILURE);