Mercurial > hg > xemacs-beta
comparison src/chartab.c @ 4962:e813cf16c015
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 01 Feb 2010 05:29:05 -0600 |
parents | 19a72041c5ed 6ef8256a020a |
children | ae48681c47fa |
comparison
equal
deleted
inserted
replaced
4961:b90f8cf474e0 | 4962:e813cf16c015 |
---|---|
110 } | 110 } |
111 return Qnil; | 111 return Qnil; |
112 } | 112 } |
113 | 113 |
114 static int | 114 static int |
115 char_table_entry_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) | 115 char_table_entry_equal (Lisp_Object obj1, Lisp_Object obj2, int depth, |
116 int foldcase) | |
116 { | 117 { |
117 Lisp_Char_Table_Entry *cte1 = XCHAR_TABLE_ENTRY (obj1); | 118 Lisp_Char_Table_Entry *cte1 = XCHAR_TABLE_ENTRY (obj1); |
118 Lisp_Char_Table_Entry *cte2 = XCHAR_TABLE_ENTRY (obj2); | 119 Lisp_Char_Table_Entry *cte2 = XCHAR_TABLE_ENTRY (obj2); |
119 int i; | 120 int i; |
120 | 121 |
121 for (i = 0; i < 96; i++) | 122 for (i = 0; i < 96; i++) |
122 if (!internal_equal (cte1->level2[i], cte2->level2[i], depth + 1)) | 123 if (!internal_equal_0 (cte1->level2[i], cte2->level2[i], depth + 1, |
124 foldcase)) | |
123 return 0; | 125 return 0; |
124 | 126 |
125 return 1; | 127 return 1; |
126 } | 128 } |
127 | 129 |
343 /* #### need to print and read the default; but that will allow the | 345 /* #### need to print and read the default; but that will allow the |
344 default to be modified, which we don't (yet) support -- but FSF does */ | 346 default to be modified, which we don't (yet) support -- but FSF does */ |
345 } | 347 } |
346 | 348 |
347 static int | 349 static int |
348 char_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) | 350 char_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth, int foldcase) |
349 { | 351 { |
350 Lisp_Char_Table *ct1 = XCHAR_TABLE (obj1); | 352 Lisp_Char_Table *ct1 = XCHAR_TABLE (obj1); |
351 Lisp_Char_Table *ct2 = XCHAR_TABLE (obj2); | 353 Lisp_Char_Table *ct2 = XCHAR_TABLE (obj2); |
352 int i; | 354 int i; |
353 | 355 |
354 if (CHAR_TABLE_TYPE (ct1) != CHAR_TABLE_TYPE (ct2)) | 356 if (CHAR_TABLE_TYPE (ct1) != CHAR_TABLE_TYPE (ct2)) |
355 return 0; | 357 return 0; |
356 | 358 |
357 for (i = 0; i < NUM_ASCII_CHARS; i++) | 359 for (i = 0; i < NUM_ASCII_CHARS; i++) |
358 if (!internal_equal (ct1->ascii[i], ct2->ascii[i], depth + 1)) | 360 if (!internal_equal_0 (ct1->ascii[i], ct2->ascii[i], depth + 1, foldcase)) |
359 return 0; | 361 return 0; |
360 | 362 |
361 #ifdef MULE | 363 #ifdef MULE |
362 for (i = 0; i < NUM_LEADING_BYTES; i++) | 364 for (i = 0; i < NUM_LEADING_BYTES; i++) |
363 if (!internal_equal (ct1->level1[i], ct2->level1[i], depth + 1)) | 365 if (!internal_equal_0 (ct1->level1[i], ct2->level1[i], depth + 1, foldcase)) |
364 return 0; | 366 return 0; |
365 #endif /* MULE */ | 367 #endif /* MULE */ |
366 | 368 |
367 return internal_equal (ct1->default_, ct2->default_, depth + 1); | 369 return internal_equal_0 (ct1->default_, ct2->default_, depth + 1, foldcase); |
368 } | 370 } |
369 | 371 |
370 static Hashcode | 372 static Hashcode |
371 char_table_hash (Lisp_Object obj, int depth) | 373 char_table_hash (Lisp_Object obj, int depth) |
372 { | 374 { |