sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

isdigitrune.c (1666B)


      1 /* Automatically generated by mkrunetype.awk */
      2 #include <stdlib.h>
      3 
      4 #include "../utf.h"
      5 #include "runetype.h"
      6 
      7 static const Rune digit2[][2] = {
      8 	{ 0x0030, 0x0039 },
      9 	{ 0x0660, 0x0669 },
     10 	{ 0x06F0, 0x06F9 },
     11 	{ 0x07C0, 0x07C9 },
     12 	{ 0x0966, 0x096F },
     13 	{ 0x09E6, 0x09EF },
     14 	{ 0x0A66, 0x0A6F },
     15 	{ 0x0AE6, 0x0AEF },
     16 	{ 0x0B66, 0x0B6F },
     17 	{ 0x0BE6, 0x0BEF },
     18 	{ 0x0C66, 0x0C6F },
     19 	{ 0x0CE6, 0x0CEF },
     20 	{ 0x0D66, 0x0D6F },
     21 	{ 0x0DE6, 0x0DEF },
     22 	{ 0x0E50, 0x0E59 },
     23 	{ 0x0ED0, 0x0ED9 },
     24 	{ 0x0F20, 0x0F29 },
     25 	{ 0x1040, 0x1049 },
     26 	{ 0x1090, 0x1099 },
     27 	{ 0x17E0, 0x17E9 },
     28 	{ 0x1810, 0x1819 },
     29 	{ 0x1946, 0x194F },
     30 	{ 0x19D0, 0x19D9 },
     31 	{ 0x1A80, 0x1A89 },
     32 	{ 0x1A90, 0x1A99 },
     33 	{ 0x1B50, 0x1B59 },
     34 	{ 0x1BB0, 0x1BB9 },
     35 	{ 0x1C40, 0x1C49 },
     36 	{ 0x1C50, 0x1C59 },
     37 	{ 0xA620, 0xA629 },
     38 	{ 0xA8D0, 0xA8D9 },
     39 	{ 0xA900, 0xA909 },
     40 	{ 0xA9D0, 0xA9D9 },
     41 	{ 0xA9F0, 0xA9F9 },
     42 	{ 0xAA50, 0xAA59 },
     43 	{ 0xABF0, 0xABF9 },
     44 	{ 0xFF10, 0xFF19 },
     45 	{ 0x104A0, 0x104A9 },
     46 	{ 0x10D30, 0x10D39 },
     47 	{ 0x11066, 0x1106F },
     48 	{ 0x110F0, 0x110F9 },
     49 	{ 0x11136, 0x1113F },
     50 	{ 0x111D0, 0x111D9 },
     51 	{ 0x112F0, 0x112F9 },
     52 	{ 0x11450, 0x11459 },
     53 	{ 0x114D0, 0x114D9 },
     54 	{ 0x11650, 0x11659 },
     55 	{ 0x116C0, 0x116C9 },
     56 	{ 0x11730, 0x11739 },
     57 	{ 0x118E0, 0x118E9 },
     58 	{ 0x11950, 0x11959 },
     59 	{ 0x11C50, 0x11C59 },
     60 	{ 0x11D50, 0x11D59 },
     61 	{ 0x11DA0, 0x11DA9 },
     62 	{ 0x11F50, 0x11F59 },
     63 	{ 0x16A60, 0x16A69 },
     64 	{ 0x16AC0, 0x16AC9 },
     65 	{ 0x16B50, 0x16B59 },
     66 	{ 0x1D7CE, 0x1D7FF },
     67 	{ 0x1E140, 0x1E149 },
     68 	{ 0x1E2F0, 0x1E2F9 },
     69 	{ 0x1E4F0, 0x1E4F9 },
     70 	{ 0x1E950, 0x1E959 },
     71 	{ 0x1FBF0, 0x1FBF9 },
     72 };
     73 
     74 int
     75 isdigitrune(Rune r)
     76 {
     77 	if(bsearch(&r, digit2, nelem(digit2), sizeof *digit2, &rune2cmp))
     78 		return 1;
     79 	return 0;
     80 }