Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | {1118} fixed Utf16SQLCompCase and Utf16SQLCompNoCase functions, as used by WIN32CASE and WIN32NOCASE SQLite3 collations - thanks vaclav for the feedback! |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
63e68170ff6f559702d719d2f3f4feb8 |
User & Date: | ab 2015-03-23 07:57:51 |
2015-03-23
| ||
08:13 | {1119} fixed Utf16SQLCompCase and Utf16SQLCompNoCase functions, as used by WIN32CASE and WIN32NOCASE SQLite3 collations, for cross-platform (i.e. non Windows) compilation check-in: b4ae40b413 user: ab tags: trunk | |
07:57 | {1118} fixed Utf16SQLCompCase and Utf16SQLCompNoCase functions, as used by WIN32CASE and WIN32NOCASE SQLite3 collations - thanks vaclav for the feedback! check-in: 63e68170ff user: ab tags: trunk | |
2015-03-22
| ||
20:15 | {1117} now interface-based callbacks are working, as requested by [aa230e5299] - preliminary tests are passing, we need more use coverage, on both clients and servers check-in: 23352907dd user: ab tags: trunk | |
Changes to SynSQLite3.pas.
26
27
28
29
30
31
32
33
34
35
36
37
38
39
....
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
|
The Initial Developer of the Original Code is Arnaud Bouchez. Portions created by the Initial Developer are Copyright (C) 2015 the Initial Developer. All Rights Reserved. Contributor(s): - Eric Grange Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to ................................................................................ If a field with your custom collate ISO8601 is empty '' (not NULL), then SQLite calls the registered collate function with s1len=0 or s2len=0, but the pointers s1 or s2 map to the string of the previous call } function Utf16SQLCompCase(CollateParam: pointer; s1Len: integer; S1: pointer; s2Len: integer; S2: pointer) : integer; {$ifndef SQLITE3_FASTCALL}cdecl;{$endif} begin if s1Len=0 then // see WladiD note above s1 := nil; if s2Len=0 then s2 := nil; {$ifdef MSWINDOWS} result := CompareStringW(GetThreadLocale, 0, S1, S1len, S2, S2Len) - 2; {$else} result := WideCompareStr(Pwidechar(S1),Pwidechar(S2))-2; {$endif} end; function Utf16SQLCompNoCase(CollateParam: pointer; s1Len: integer; s1: pointer; s2Len: integer; s2: pointer) : integer; {$ifndef SQLITE3_FASTCALL}cdecl;{$endif} begin if s1Len=0 then // see WladiD note above s1 := nil; if s2Len=0 then s2 := nil; {$ifdef MSWINDOWS} result := CompareStringW(GetThreadLocale, NORM_IGNORECASE, S1, S1len, S2, S2Len) - 2; {$else} result := WideCompareText(Pwidechar(S1),Pwidechar(S2))-2; {$endif} end; function Utf8SQLCompNoCase(CollateParam: pointer; s1Len: integer; s1: pointer; s2Len: integer; s2: pointer) : integer; {$ifndef SQLITE3_FASTCALL}cdecl;{$endif} begin if (s1Len=0) and (s2Len=0) then // see WladiD note above |
>
|
|
>
>
|
|
>
>
|
<
>
|
|
|
>
>
|
|
>
>
|
<
>
|
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
....
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
|
The Initial Developer of the Original Code is Arnaud Bouchez. Portions created by the Initial Developer are Copyright (C) 2015 the Initial Developer. All Rights Reserved. Contributor(s): - Eric Grange - Vaclav Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to ................................................................................ If a field with your custom collate ISO8601 is empty '' (not NULL), then SQLite calls the registered collate function with s1len=0 or s2len=0, but the pointers s1 or s2 map to the string of the previous call } function Utf16SQLCompCase(CollateParam: pointer; s1Len: integer; S1: pointer; s2Len: integer; S2: pointer) : integer; {$ifndef SQLITE3_FASTCALL}cdecl;{$endif} begin if s1Len<=0 then begin // see WladiD note above S1 := nil; s1Len := 0; end; if s2Len<=0 then begin S2 := nil; s2Len := 0; end; {$ifdef MSWINDOWS} result := CompareStringW(GetThreadLocale,0,S1,s1len shr 1,S2,s2Len shr 1)-2; {$else} // cross-platform but slower version using two temporary WideString result := WideCompareStr(PWideChar(S1),PWideChar(S2)); {$endif} end; function Utf16SQLCompNoCase(CollateParam: pointer; s1Len: integer; s1: pointer; s2Len: integer; s2: pointer) : integer; {$ifndef SQLITE3_FASTCALL}cdecl;{$endif} begin if s1Len<=0 then begin // see WladiD note above S1 := nil; s1Len := 0; end; if s2Len<=0 then begin S2 := nil; s2Len := 0; end; {$ifdef MSWINDOWS} result := CompareStringW(GetThreadLocale,NORM_IGNORECASE,S1,s1len shr 1,S2,s2Len shr 1)-2; {$else} // cross-platform but slower version using two temporary WideString result := WideCompareText(PWideChar(S1),PWideChar(S2)); {$endif} end; function Utf8SQLCompNoCase(CollateParam: pointer; s1Len: integer; s1: pointer; s2Len: integer; s2: pointer) : integer; {$ifndef SQLITE3_FASTCALL}cdecl;{$endif} begin if (s1Len=0) and (s2Len=0) then // see WladiD note above |
Changes to SynopseCommit.inc.
1 |
'1.18.1117'
|
| |
1 |
'1.18.1118'
|