Diff
Not logged in

Differences From Artifact [d2578eb0fc]:

To Artifact [9f86858a88]:


233
234
235
236
237
238
239



240
241
242
243
244
245
246
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249







+
+
+







    char *p, *string;
    int oldLength;

    /*
     * UTF-8 string length in bytes will be <= Unicode string length * 4.
     */

    if (uniStr == NULL) {
	return NULL;
    }
    if (uniLength < 0) {
	uniLength = 0;
	w = uniStr;
	while (*w != '\0') {
	    uniLength++;
	    w++;
	}
272
273
274
275
276
277
278



279
280
281
282
283
284
285
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291







+
+
+







    char *p, *string;
    int oldLength, len = 1;

    /*
     * UTF-8 string length in bytes will be <= Utf16 string length * 3.
     */

    if (uniStr == NULL) {
	return NULL;
    }
    if (uniLength < 0) {

	uniLength = 0;
	w = uniStr;
	while (*w != '\0') {
	    uniLength++;
	    w++;
567
568
569
570
571
572
573



574
575
576
577
578
579
580
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589







+
+
+







				 * appended to this previously initialized
				 * DString. */
{
    int ch = 0, *w, *wString;
    const char *p, *end;
    int oldLength;

    if (src == NULL) {
	return NULL;
    }
    if (length < 0) {
	length = strlen(src);
    }

    /*
     * Unicode string length in Tcl_UniChars will be <= UTF-8 string length in
     * bytes.
619
620
621
622
623
624
625



626
627
628
629
630
631
632
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644







+
+
+







				 * appended to this previously initialized
				 * DString. */
{
    unsigned short ch = 0, *w, *wString;
    const char *p, *end;
    int oldLength;

    if (src == NULL) {
	return NULL;
    }
    if (length < 0) {
	length = strlen(src);
    }

    /*
     * Unicode string length in Tcl_UniChars will be <= UTF-8 string length in
     * bytes.