summaryrefslogtreecommitdiff
path: root/source4/lib/ms_fnmatch.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinkingJelmer Vernooij1-1/+1
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m! (This used to be commit 200a8f6652cb2de7a8037a7a4c2a204b50aee2b1)
2007-10-10r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for theAndrew Tridgell1-1/+1
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
2007-10-10r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots ↵Andrew Tridgell1-42/+57
of associated functions. The motivation for this change was to avoid having to convert to/from ucs2 strings for so many operations. Doing that was slow, used many static buffers, and was also incorrect as it didn't cope properly with unicode codepoints above 65536 (which could not be represented correctly as smb_ucs2_t chars) The two core functions that allowed this change are next_codepoint() and push_codepoint(). These functions allow you to correctly walk a arbitrary multi-byte string a character at a time without converting the whole string to ucs2. While doing this cleanup I also fixed several ucs2 string handling bugs. See the commit for details. The following code (which counts the number of occuraces of 'c' in a string) shows how to use the new interface: size_t count_chars(const char *s, char c) { size_t count = 0; while (*s) { size_t size; codepoint_t c2 = next_codepoint(s, &size); if (c2 == c) count++; s += size; } return count; } (This used to be commit 814881f0e50019196b3aa9fbe4aeadbb98172040)
2007-10-10r2776: if there are no wildcard characters then use StrCaseCmp()Andrew Tridgell1-0/+6
note that this is not just an optimisation, it fixes a rare edge case when LANMAN1 is negotiated (This used to be commit 8d879cf54c2fe09d62a5c28b02a070cb80984744)
2007-10-10r2775: rewrote our ms_fnmatch code to be much more efficient, and to exactlyAndrew Tridgell1-154/+121
match w2k behaviour for older negotiated protocols. (This used to be commit bae2baeb0247ae8f840b3d3b5488c98d081789c5)
2007-10-10r2400: make ms_fnmatch() case insensitive. This is much more efficient thanAndrew Tridgell1-2/+4
uppercasing the two whole strings before the call is made, is less error-prone, and also copes with strings where the upper case version is longer than the lower case version due to different multi-byte lengths. (This used to be commit e227ac1edfd48596a9d5096b6965ddd0beb969a5)
2007-10-10r2212: Optimisation. Passes masktest against W2K3.Jeremy Allison1-0/+3
Jeremy. (This used to be commit fb7a529c4c65788c307c1043cf2b664059ed8c2a)
2003-08-13first public release of samba4 codeAndrew Tridgell1-0/+226
(This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f)