texlive[51188] Build/source/texk/bibtex-x: bibtexu: debug code

commits+hironobu at tug.org commits+hironobu at tug.org
Wed May 22 16:38:19 CEST 2019


Revision: 51188
          http://tug.org/svn/texlive?view=revision&revision=51188
Author:   hironobu
Date:     2019-05-22 16:38:18 +0200 (Wed, 22 May 2019)
Log Message:
-----------
bibtexu: debug code

Modified Paths:
--------------
    trunk/Build/source/texk/bibtex-x/ChangeLog
    trunk/Build/source/texk/bibtex-x/bibtex-2.c
    trunk/Build/source/texk/bibtex-x/bibtex-3.c

Modified: trunk/Build/source/texk/bibtex-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/bibtex-x/ChangeLog	2019-05-22 13:24:02 UTC (rev 51187)
+++ trunk/Build/source/texk/bibtex-x/ChangeLog	2019-05-22 14:38:18 UTC (rev 51188)
@@ -1,5 +1,6 @@
 2019-05-22  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
 
+	* bibtex-2.c, bibtex-3.c: Better error messages for debug.
 	* bibtex-3.c (icu_strToUpper): React to Str_language.
 
 2019-05-05  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>

Modified: trunk/Build/source/texk/bibtex-x/bibtex-2.c
===================================================================
--- trunk/Build/source/texk/bibtex-x/bibtex-2.c	2019-05-22 13:24:02 UTC (rev 51187)
+++ trunk/Build/source/texk/bibtex-x/bibtex-2.c	2019-05-22 14:38:18 UTC (rev 51188)
@@ -2973,16 +2973,17 @@
   uchlen1 = icu_toUChars(entry_strs, (ptr1 * (ENT_STR_SIZE+1)), lenk1, uch1, ucap);
   uchlen2 = icu_toUChars(entry_strs, (ptr2 * (ENT_STR_SIZE+1)), lenk2, uch2, ucap);
 */
+
   u_strFromUTF8WithSub(uch1, ucap, &uchlen1, (char *)&ENTRY_STRS(ptr1, 0), lenk1, 0xfffd, NULL, &err1);
-
   if (!U_SUCCESS(err1)) {
+    printf("Error in u_strFromUTF8WithSub 1.\n");
     uchlen1 = icu_toUChars(entry_strs, (ptr1 * (ENT_STR_SIZE+1)), lenk1, uch1, ucap);
     err1 = U_ZERO_ERROR;
   }
 
   u_strFromUTF8WithSub(uch2, ucap, &uchlen2, (char *)&ENTRY_STRS(ptr2, 0), lenk2, 0xfffd, NULL, &err1);
-
   if (!U_SUCCESS(err1)) {
+    printf("Error in u_strFromUTF8WithSub 2.\n");
     uchlen2 = icu_toUChars(entry_strs, (ptr2 * (ENT_STR_SIZE+1)), lenk2, uch2, ucap);
     err1 = U_ZERO_ERROR;
   }
@@ -2992,7 +2993,7 @@
   else
     ucol1 = ucol_open(NULL, &err1);
   if (!U_SUCCESS(err1))
-    printf("there is a error: U_ZERO_ERROR, open a ucol.");
+    printf("Error in opening a ucol in less_than.\n");
   u_less = !ucol_greaterOrEqual(ucol1, uch1, uchlen1, uch2, uchlen2);
 #ifdef TRACE
   if (Flag_trace)
@@ -3156,12 +3157,12 @@
 	ucon1 = ucnv_open(NULL, &err1);
 	if (!U_SUCCESS(err1))
 	BEGIN
-		printf("1there is a error: U_ZERO_ERROR");
+		printf("Error in opening a ucnv in icu_toUChars.\n");
 	END
 	ucnv_toUChars(ucon1, target, tarcap, (char *)&buf[bf_ptr], len, &err1);
 	if (!U_SUCCESS(err1))
 	BEGIN
-		printf("2there is a error: U_ZERO_ERROR");
+		printf("Error in icu_toUChars.\n");
 	END
 	ucnv_close(ucon1);
 	
@@ -3177,7 +3178,7 @@
 	UErrorCode err1 = U_ZERO_ERROR;
 	if (!U_SUCCESS(err1))
 	BEGIN
-		printf("3there is a error: U_ZERO_ERROR");
+		printf("Error in icu_strToLower?\n");
 	END
 	if (Flag_language)
 	{
@@ -3190,7 +3191,7 @@
 	if (!U_SUCCESS(err1))
 	BEGIN
 		int16_t i=0;
-		printf("4there is a error: U_ZERO_ERROR");
+		printf("Error in icu_strToLower.\n");
 		for (i=0;i<tarlen;i++)
 		BEGIN
 			printf("%X", target[i]);
@@ -3218,12 +3219,12 @@
 	ucon2 = ucnv_open(NULL, &err2);
 	if (!U_SUCCESS(err2))
 	BEGIN
-		printf("5there is a error: U_ZERO_ERROR");
+		printf("Error in opening a ucnv in icu_fromUChars.\n");
 	END
 	tblen=ucnv_fromUChars(ucon2, (char *)dest, destcap, src, srclen, &err2);
 	if (!U_SUCCESS(err2))
 	BEGIN
-		printf("6there is a error: U_ZERO_ERROR");
+		printf("Error in icu_fromUChars.\n");
 	END
 	
 	return tblen;

Modified: trunk/Build/source/texk/bibtex-x/bibtex-3.c
===================================================================
--- trunk/Build/source/texk/bibtex-x/bibtex-3.c	2019-05-22 13:24:02 UTC (rev 51187)
+++ trunk/Build/source/texk/bibtex-x/bibtex-3.c	2019-05-22 14:38:18 UTC (rev 51188)
@@ -3143,7 +3143,7 @@
 	UErrorCode err1 = U_ZERO_ERROR;
 	if (!U_SUCCESS(err1))
 	BEGIN
-		printf("3there is a error: U_ZERO_ERROR");
+		printf("Error in icu_strToUpper?\n");
 	END
 	if (Flag_language)
 	{
@@ -3155,7 +3155,7 @@
 	}
 	if (!U_SUCCESS(err1))
 	BEGIN
-		printf("4there is a error: U_ZERO_ERROR");
+		printf("Error in icu_strToUpper.\n");
 	END
 
 	return tulen;



More information about the tex-live-commits mailing list