Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
* | Fix Tcl_UtfPrev for TCL_UTF_MAX>3, so it can jump back over Emoji. ↵ | jan.nijtmans | 2021-02-16 | 1 | -4/+4 | |
| | | | | | Backported from 8.7, no change for TCL_UTF_MAX=3. This way, the previous fix can be slightly more simplified, and working for TCL_UTF_MAX>3 too. | |||||
* | Fix [d43f96c1a8]: string trimright is broken for Emoji | jan.nijtmans | 2021-02-15 | 1 | -8/+9 | |
| | ||||||
* | More usage of TclNewObj() in stead of Tcl_NewObj() and TclNewIntObj() in ↵ | jan.nijtmans | 2020-10-13 | 1 | -1/+1 | |
| | | | | stead of Tcl_NewIntObj() | |||||
* | Use "Global" in stead of "Master" internally, where "Master" is not used in ↵ | jan.nijtmans | 2020-07-20 | 1 | -2/+2 | |
| | | | | the Master-Slave paradigm and where this makes sense. | |||||
* | In some places, Tcl_UtfPrev()/Tcl_UtfNext() is used traversing the ↵ | jan.nijtmans | 2020-05-14 | 1 | -4/+5 | |
| | | | | | | individual bytes of a string searching for '(', ')', '::' or other single bytes. It is overkill to use Tcl_UtfPrev/Tcl_UtfNext for that, since those characters can only appear as their ASCII byte, not as any other sequence. This effectively removes the last Tcl_UtfNext() call from the core, the only ones left are in tclTest.c for test commands. So the TclUtfNext() macro doesn't make sense any more. Remove "register" keyword from many files. | |||||
* | More usage of TclUtfToUCS4(), so we can use the whole Unicode range better ↵ | jan.nijtmans | 2020-05-05 | 1 | -22/+22 | |
| | | | | in TCL_UTF_MAX>3 builds. | |||||
* | Code cleanup (more typecasts), making it more compatible with -Wc++-compat. ↵ | jan.nijtmans | 2020-04-20 | 1 | -31/+30 | |
| | | | | Less use of /* ARGUSED */. | |||||
* | Merge 8.5. Failing tests for now. To be remedied shortly. | dgp | 2020-04-16 | 1 | -2/+2 | |
|\ | ||||||
| * | merge 8.5 | dgp | 2020-04-16 | 1 | -1/+1 | |
| |\ | ||||||
| | * | Create and use macro TclUtfPrev for Tcl_UtfPrev. | dgp | 2020-04-16 | 1 | -1/+1 | |
| | | | ||||||
| * | | Create and use an optimized macro TclUtfNext() for Tcl_UtfNext(). | dgp | 2020-04-14 | 1 | -1/+1 | |
| |/ | ||||||
* | | TclTrimRight/TclTrimLeft: removed mixed declarations and code (forbidden in ↵ | sebres | 2020-04-15 | 1 | -3/+4 | |
| | | | | | | | | | | ISO C90, declaration-after-statement); restored mistakenly removed part of check-in [578c25b43a] (move Tcl_UniChar initializations out of the loop), but "ch2" belongs to the inner loop, so move it inside outer interation. | |||||
* | | Merge 8.5. Failing tests highlight ticket [1b1f5f0b53]. | dgp | 2020-04-13 | 1 | -232/+181 | |
|\ \ | |/ | ||||||
| * | [a7f685a181] Eliminate botched call of Tcl_UtfPrev. | dgp | 2020-04-13 | 1 | -3/+5 | |
| | | ||||||
| * | TclTrim() can also demand NUL-terminated arguments, and be simplified. | dgp | 2020-04-13 | 1 | -64/+21 | |
| | | ||||||
| * | TclTrimLeft and TclTrimRight are internal routines. They demand NUL-terminated | dgp | 2020-04-13 | 1 | -69/+25 | |
| | | | | | | | | arguments. That's a reasonable burden to put on internal callers, and all existing callers already meet it. | |||||
| * | [c61818e4c9] [string trimright] robustly handle backing up over incomplete | dgp | 2020-04-13 | 1 | -2/+9 | |
| | | | | | | or malformed byte sequences. | |||||
| * | Cherrypick partial fix. | dgp | 2020-04-13 | 1 | -5/+4 | |
| | | ||||||
| * | [085913c760] Fix Tcl_DStringAppendElement quoting of #. | dgp | 2020-04-09 | 1 | -12/+32 | |
| | | ||||||
| * | Guarantee TclNeedSpace and TclFindElement have common definition of whitespace | dgp | 2020-04-09 | 1 | -70/+50 | |
| | | | | | | | | by having both call the same routine. Create a macro form to contain performance costs and adapt callers. | |||||
| * | [afa4b28153] Correct TclNeedSpace handling of trailing escaped space. | dgp | 2020-04-09 | 1 | -8/+36 | |
| | | ||||||
* | | More uppercase HEX representations in source-code. | jan.nijtmans | 2020-03-18 | 1 | -4/+4 | |
| | | ||||||
* | | Minor optimization in TclFormatInt: No need to check for "0" as special ↵ | jan.nijtmans | 2019-12-22 | 1 | -18/+5 | |
| | | | | | | | | value. No need to include final NULL-byte in character-reversion operation, as we already known the NULL-byte will come last. | |||||
* | | Merge 8.5 | jan.nijtmans | 2019-12-19 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | Add type-cast, making sure that the unary minus is handled correctly on any ↵ | jan.nijtmans | 2019-12-19 | 1 | -1/+1 | |
| | | | | | | | | compiler | |||||
* | | Merge 8.5 | jan.nijtmans | 2019-12-19 | 1 | -15/+4 | |
|\ \ | |/ | ||||||
| * | Better fix for [3390638]: making the intVal variable unsigned prevents the ↵ | jan.nijtmans | 2019-12-16 | 1 | -15/+4 | |
| | | | | | | | | need for using sprintf() altogether. | |||||
* | | If TCL_UTF_MAX>=4, make Tcl_ParseBackslash combine two surrogates so they ↵ | jan.nijtmans | 2019-12-02 | 1 | -1/+1 | |
| | | | | | | | | appear as one 4-byte UTF-8 byte sequence from the start. Add test-case for this. | |||||
* | | More code cleanup: Move more Tcl_UniChar initializations out of the loop. ↵ | jan.nijtmans | 2019-09-12 | 1 | -27/+24 | |
| | | | | | | | | Remove unnecessary type-casts | |||||
* | | Code cleanup: Add some initialization to "Tcl_UniChar ch" declaration, ↵ | jan.nijtmans | 2019-09-12 | 1 | -8/+8 | |
| | | | | | | | | | | making the chance higher that 4-byte UTF-8 sequences are handled more reasonable internally (see: [https://core.tcl-lang.org/tk/tktview?name=a179564826|a179564826]). Use more TclGetString() in stead of Tcl_GetString(), which is slightly more efficient. | |||||
* | | end-of-line spacing | jan.nijtmans | 2019-05-24 | 1 | -10/+10 | |
|\ \ | |/ | ||||||
* | | Backport [bd94500678e837d7] from 8.7, preventing endless loops in UTF-8 ↵ | jan.nijtmans | 2019-03-02 | 1 | -1/+1 | |
| | | | | | | | | conversions when handling surrogates. Only effective when compiling with -DTCL_UTF_MAX=4|6 (default: 3). Meant for benefit of Androwish. | |||||
* | | merge 8.5 | dgp | 2018-11-09 | 1 | -0/+17 | |
|\ \ | |/ | ||||||
| * | Revise bug fix to support (length == 0) correctly. | dgp | 2018-11-09 | 1 | -4/+17 | |
| | | | | | | Added comments and improved safety in caller. | |||||
| * | closes [35a8f1c04a]: minimalist fix - beware of discrepancy between ↵ | sebres | 2018-11-09 | 1 | -0/+4 | |
| | | | | | | | | TclScanElement and TclConvertElement (prefer braces considering TCL_DONT_QUOTE_HASH in case of first list element) | |||||
* | | merge 8.5 | sebres | 2018-03-14 | 1 | -3/+3 | |
|\ \ | |/ | ||||||
| * | TclTrim: special case for TrimRight on single char result of TrimLeft (this ↵ | sebres | 2018-03-14 | 1 | -3/+3 | |
| | | | | | | | | char is already verified within TrimLeft, so bypass TrimRight at all) | |||||
| | | ||||||
| \ | ||||||
*-. \ | merge 8.5 | dgp | 2018-03-14 | 1 | -72/+183 | |
|\ \ \ | | |/ | ||||||
| | * | TclTrim must write to *trimRight even when making a quick exit. | dgp | 2018-03-14 | 1 | -0/+1 | |
| |/ | ||||||
| * | A few minor revisions. | dgp | 2018-03-13 | 1 | -11/+16 | |
| | | ||||||
| * | remove unexpected panic by TclTrimLeft/TclTrimRight, handling rewritten: | sebres | 2018-03-13 | 1 | -55/+173 | |
| | | | | | | | | | | | | | | - instead of check the NTS-byte after string (may cause segfault by access violation if out of range), it checks now the end-character is well-formed utf8-sequence; - both work well now on non-NTS strings (without null character at end); - additionally fixed wrong offsets (trim-length if last char malformed in case of out of range); new function TclTrim introduced (as combination of TclTrimLeft/TclTrimRight). | |||||
* | | Remove unused argument. | dgp | 2018-03-10 | 1 | -6/+5 | |
| | | ||||||
* | | Return routine to file scope. | dgp | 2018-03-09 | 1 | -5/+7 | |
| | | ||||||
* | | Refactor the index value encode/decode machinery for broader use. | dgp | 2018-03-09 | 1 | -0/+137 | |
| | | | | | | Make use of it to fix index value flaws in [lsearch]. | |||||
* | | New internal routine TclGetEndOffsetFromObj. | dgp | 2018-03-06 | 1 | -7/+39 | |
| | | ||||||
* | | [8e6a9ac221] Stop false matching with bytearrays. (string-11.55) | dgp | 2018-02-23 | 1 | -1/+2 | |
|\ \ | |/ | ||||||
| * | [8e6a9ac221] Stop false matching with bytearrays. (string-11.55) | dgp | 2018-02-23 | 1 | -1/+2 | |
| | | ||||||
* | | Rewrite documentation in comments for brevity and clarity. | pooryorick | 2018-02-14 | 1 | -16/+21 | |
| | | ||||||
* | | Change signature of (internal) TclScanElement() function. This saves memory ↵ | jan.nijtmans | 2017-11-15 | 1 | -21/+6 | |
| | | | | | | | | allocation and the possibility for panic's in dict and list handling, requiring 1/4 of memory for internal allocation of temporary storage. No change to external API. | |||||
* | | Better UTF-8 surrogate handling, only functional when TCL_UTF_MAX>3 | jan.nijtmans | 2017-06-08 | 1 | -1/+1 | |
| | |