patches

Patches for various other programs
git clone https://git.regexghost.com/patches.git
Log | Files | Refs | README

commit c2a99ff284a742e6c8411ac2186148604f81035e
parent 6e4509583cb2b2e366bdb38c23e7f7cea26f7a64
Author: regexghost <dev@regexghost.com>
Date:   Thu, 18 Jun 2026 17:11:55 +0100

oksh case insensitive patch

Diffstat:
Aoksh-case-insensitive.diff | 31+++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+), 0 deletions(-)

diff --git a/oksh-case-insensitive.diff b/oksh-case-insensitive.diff @@ -0,0 +1,31 @@ +diff --git a/misc.c b/misc.c +index 428f183..150624d 100644 +--- a/misc.c ++++ b/misc.c +@@ -602,7 +602,7 @@ do_gmatch(const unsigned char *s, const unsigned char *se, + sc = s < se ? *s : '\0'; + s++; + if (!ISMAGIC(pc)) { +- if (sc != pc) ++ if (sc != pc && !(tolower(sc) == tolower(pc))) + return 0; + continue; + } +@@ -705,7 +705,7 @@ do_gmatch(const unsigned char *s, const unsigned char *se, + return 0; + + default: +- if (sc != p[-1]) ++ if (sc != p[-1] && !(tolower(sc) == tolower(p[-1]))) + return 0; + break; + } +@@ -795,7 +795,7 @@ cclass(const unsigned char *p, int sub) + return NULL; + } else + d = c; +- if (c == sub || (c <= sub && sub <= d)) ++ if (c == sub || (c <= sub && sub <= d) || (tolower(c) == tolower(sub))) + found = 1; + } while (!(ISMAGIC(p[0]) && p[1] == ']')); +