unicode-internal-commit: reverse args 3/4 of get_charset_limits

Ben Wing ben at xemacs.org
Tue Mar 23 08:19:13 EDT 2010


changeset:   5190:c259d46d68b5
branch:      ben-unicode-internal
user:        Ben Wing <ben at xemacs.org>
date:        Sun Feb 28 05:50:35 2010 -0600
files:       src/ChangeLog src/charset.h src/chartab.c src/mule-charset.c src/mule-coding.c src/objects-msw.c src/text.c src/unicode.c
description:
reverse args 3/4 of get_charset_limits

-------------------- ChangeLog entries follow: --------------------

src/ChangeLog addition:

2010-02-28  Ben Wing  <ben at xemacs.org>

	* charset.h:
	* charset.h (ASSERT_VALID_CHARSET_CODEPOINT):
	* chartab.c (put_char_table):
	* chartab.c (map_char_table):
	* mule-charset.c (get_charset_limits):
	* mule-coding.c (multibyte_putprop):
	* objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
	* text.c (get_external_charset_codepoint):
	* unicode.c (sledgehammer_check_to_table):
	Reverse args 3/4 of get_charset_limits so that the new order mirrors
	the logical range statement (LO1,LO2) - (HI1,HI2).  That is,
	logically it's a single two-dimensional range not two one-dimensional
	ranges, and the order now mirrors that.


diff -r 33587a7f2dea -r c259d46d68b5 src/ChangeLog
--- a/src/ChangeLog	Sun Feb 28 05:08:59 2010 -0600
+++ b/src/ChangeLog	Sun Feb 28 05:50:35 2010 -0600
@@ -1,3 +1,19 @@
+2010-02-28  Ben Wing  <ben at xemacs.org>
+
+	* charset.h:
+	* charset.h (ASSERT_VALID_CHARSET_CODEPOINT):
+	* chartab.c (put_char_table):
+	* chartab.c (map_char_table):
+	* mule-charset.c (get_charset_limits):
+	* mule-coding.c (multibyte_putprop):
+	* objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
+	* text.c (get_external_charset_codepoint):
+	* unicode.c (sledgehammer_check_to_table):
+	Reverse args 3/4 of get_charset_limits so that the new order mirrors
+	the logical range statement (LO1,LO2) - (HI1,HI2).  That is,
+	logically it's a single two-dimensional range not two one-dimensional
+	ranges, and the order now mirrors that.
+
 2010-02-28  Ben Wing  <ben at xemacs.org>
 
 	* charset.h:
diff -r 33587a7f2dea -r c259d46d68b5 src/charset.h
--- a/src/charset.h	Sun Feb 28 05:08:59 2010 -0600
+++ b/src/charset.h	Sun Feb 28 05:50:35 2010 -0600
@@ -47,8 +47,8 @@
 #define CHARSET_MIN_OFFSET 0
 #define CHARSET_MAX_SIZE 256
 
-void get_charset_limits (Lisp_Object charset, int *low0, int *high0,
-			 int *low1, int *high1);
+void get_charset_limits (Lisp_Object charset, int *low0, int *low1, int *high0,
+			 int *high1);
 int get_charset_iso2022_type (Lisp_Object charset);
 void unicode_to_charset_codepoint_raw (int code,
 					     Lisp_Object precarray,
@@ -351,8 +351,8 @@
 valid_charset_codepoint_p (Lisp_Object charset, int c1, int c2)
 )
 {
-  int l1, h1, l2, h2;
-  get_charset_limits (charset, &l1, &h1, &l2, &h2);
+  int l1, l2, h1, h2;
+  get_charset_limits (charset, &l1, &l2, &h1, &h2);
   return c1 >= l1 && c1 <= h1 && c2 >= l2 && c2 <= h2;
 }
 
diff -r 33587a7f2dea -r c259d46d68b5 src/chartab.c
--- a/src/chartab.c	Sun Feb 28 05:08:59 2010 -0600
+++ b/src/chartab.c	Sun Feb 28 05:50:35 2010 -0600
@@ -1365,7 +1365,7 @@
 {
   Lisp_Char_Table *ct = XCHAR_TABLE (table);
 #ifdef MULE
-  int l1, h1, l2, h2;
+  int l1, l2, h1, h2;
 #endif
 
   switch (range->type)
@@ -1373,7 +1373,7 @@
 #ifdef MULE
     case CHARTAB_RANGE_ROW:
       {
-	get_charset_limits (range->charset, &l1, &h1, &l2, &h2);
+	get_charset_limits (range->charset, &l1, &l2, &h1, &h2);
 	l1 = h1 = range->row;
 	goto iterate_charset;
       }
@@ -1381,7 +1381,7 @@
     case CHARTAB_RANGE_CHARSET:
       {
 	int i, j;
-	get_charset_limits (range->charset, &l1, &h1, &l2, &h2);
+	get_charset_limits (range->charset, &l1, &l2, &h1, &h2);
       iterate_charset:
 	for (i = l1; i <= h1; i++)
 	  for (j = l2; j <= h2; j++)
@@ -1526,7 +1526,7 @@
 #ifdef MULE
     case CHARTAB_RANGE_ROW:
       {
-	get_charset_limits (range->charset, &l1, &h1, &l2, &h2);
+	get_charset_limits (range->charset, &l1, &l2, &h1, &h2);
 	l1 = h1 = range->row;
 	goto iterate_charset;
       }
@@ -1534,7 +1534,7 @@
     case CHARTAB_RANGE_CHARSET:
       {
 	int i, j;
-	get_charset_limits (range->charset, &l1, &h1, &l2, &h2);
+	get_charset_limits (range->charset, &l1, &l2, &h1, &h2);
       iterate_charset:
 	for (i = l1; i <= h1; i++)
 	  for (j = l2; j <= h2; j++)
diff -r 33587a7f2dea -r c259d46d68b5 src/mule-charset.c
--- a/src/mule-charset.c	Sun Feb 28 05:08:59 2010 -0600
+++ b/src/mule-charset.c	Sun Feb 28 05:50:35 2010 -0600
@@ -353,8 +353,8 @@
    second index varies. */
 
 void
-get_charset_limits (Lisp_Object charset, int *low0, int *high0,
-		    int *low1, int *high1)
+get_charset_limits (Lisp_Object charset, int *low0, int *low1,
+		    int *high0, int *high1)
 {
   *low0 = XCHARSET_MIN_CODE (charset, 0);
   *low1 = XCHARSET_MIN_CODE (charset, 1);
diff -r 33587a7f2dea -r c259d46d68b5 src/mule-coding.c
--- a/src/mule-coding.c	Sun Feb 28 05:08:59 2010 -0600
+++ b/src/mule-coding.c	Sun Feb 28 05:50:35 2010 -0600
@@ -462,10 +462,10 @@
 	EXTERNAL_LIST_LOOP_2 (elt, value)
 	  {
 	    Lisp_Object charset = Fget_charset (elt);
-	    int lo1, hi1, lo2, hi2;
-	    int olo1, ohi1, olo2, ohi2;
+	    int lo1, lo2, hi1, hi2;
+	    int olo1, olo2, ohi1, ohi2;
 	    int i;
-	    get_charset_limits (charset, &lo1, &hi1, &lo2, &hi2);
+	    get_charset_limits (charset, &lo1, &lo2, &hi1, &hi2);
 	    /* Check for duplicated and overlapping charsets */
 	    for (i = 0; i < Dynarr_length (charsets); i++)
 	      {
@@ -473,7 +473,7 @@
 		if (EQ (ocharset, charset))
 		  invalid_argument ("Duplicated charset in `charsets' list",
 				    charset);
-		get_charset_limits (ocharset, &olo1, &ohi1, &olo2, &ohi2);
+		get_charset_limits (ocharset, &olo1, &olo2, &ohi1, &ohi2);
 		if (ranges_overlap (lo1, hi1, olo1, ohi1) &&
 		    ranges_overlap (lo2, hi2, olo2, ohi2))
 		  {
diff -r 33587a7f2dea -r c259d46d68b5 src/objects-msw.c
--- a/src/objects-msw.c	Sun Feb 28 05:08:59 2010 -0600
+++ b/src/objects-msw.c	Sun Feb 28 05:50:35 2010 -0600
@@ -2110,7 +2110,7 @@
     }
 
   {
-    int l1, h1, l2, h2;
+    int l1, l2, h1, h2;
     int j, cp = -1;
 
     /* Try to find a Unicode char in the charset.  #### This is somewhat
@@ -2118,7 +2118,7 @@
 
        #### Cache me baby!!!!!!!!!!!!!
     */
-    get_charset_limits (charset, &l1, &h1, &l2, &h2);
+    get_charset_limits (charset, &l1, &l2, &h1, &h2);
 
     /* @@#### This needs major fixing.  We need to be passed the character,
        not the charset. */
diff -r 33587a7f2dea -r c259d46d68b5 src/text.c
--- a/src/text.c	Sun Feb 28 05:08:59 2010 -0600
+++ b/src/text.c	Sun Feb 28 05:50:35 2010 -0600
@@ -5279,10 +5279,10 @@
 				int *a1, int *a2, int munge_codepoints)
 {
 #ifdef MULE
-  int low1, high1, low2, high2;
+  int low1, low2, high1, high2;
 
   charset = Fget_charset (charset);
-  get_charset_limits (charset, &low1, &high1, &low2, &high2);
+  get_charset_limits (charset, &low1, &low2, &high1, &high2);
 
   if (XCHARSET_DIMENSION (charset) == 1)
     {
diff -r 33587a7f2dea -r c259d46d68b5 src/unicode.c
--- a/src/unicode.c	Sun Feb 28 05:08:59 2010 -0600
+++ b/src/unicode.c	Sun Feb 28 05:50:35 2010 -0600
@@ -699,9 +699,9 @@
 			     int codetop)
 {
   int i;
-  int low1, high1, low2, high2;
+  int low1, low2, high1, high2;
 
-  get_charset_limits (charset, &low1, &high1, &low2, &high2);
+  get_charset_limits (charset, &low1, &low2, &high1, &high2);
 
   switch (level)
     {
@@ -2185,10 +2185,10 @@
 	  else
 #endif /* not UNICODE_INTERNAL */
 	    {
-	      int l1, h1, l2, h2;
+	      int l1, l2, h1, h2;
 	      int c1 = cp1high, c2 = cp1low;
 
-	      get_charset_limits (charset, &l1, &h1, &l2, &h2);
+	      get_charset_limits (charset, &l1, &l2, &h1, &h2);
 
 	      if (c1 < l1 || c1 > h1 || c2 < l2 || c2 > h2)
 		goto out_of_range;



More information about the XEmacs-Patches mailing list