[BACK]Return to charset.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

Diff for /src/usr.bin/less/charset.c between version 1.25 and 1.26

version 1.25, 2019/08/31 13:44:29 version 1.26, 2019/09/02 14:07:45
Line 474 
Line 474 
 };  };
   
 /*  /*
  * Special pairs, not ranges.  
  */  
 static struct wchar_range comb_table[] = {  
         {0x0644, 0x0622}, {0x0644, 0x0623}, {0x0644, 0x0625}, {0x0644, 0x0627},  
 };  
   
 /*  
  * Characters with general category values   * Characters with general category values
  *      Cc: Other, Control   *      Cc: Other, Control
  *      Cf: Other, Format   *      Cf: Other, Format
Line 825 
Line 818 
 {  {
         return (is_in_table(ch, wide_table,          return (is_in_table(ch, wide_table,
             (sizeof (wide_table) / sizeof (*wide_table))));              (sizeof (wide_table) / sizeof (*wide_table))));
 }  
   
 /*  
  * Is a character a UTF-8 combining character?  
  * A combining char acts like an ordinary char, but if it follows  
  * a specific char (not any char), the two combine into one glyph.  
  */  
 int  
 is_combining_char(LWCHAR ch1, LWCHAR ch2)  
 {  
         /* The table is small; use linear search. */  
         int i;  
         for (i = 0; i < sizeof (comb_table) / sizeof (*comb_table); i++) {  
                 if (ch1 == comb_table[i].first &&  
                     ch2 == comb_table[i].last)  
                         return (1);  
         }  
         return (0);  
 }  }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26