istitlerune.c - sbase - suckless unix tools
 (HTM) git clone git://git.suckless.org/sbase
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       istitlerune.c (508B)
       ---
            1 /* Automatically generated by mkrunetype.awk */
            2 #include <stdlib.h>
            3 
            4 #include "../utf.h"
            5 #include "runetype.h"
            6 
            7 static const Rune title2[][2] = {
            8         { 0x1F88, 0x1F8F },
            9         { 0x1F98, 0x1F9F },
           10         { 0x1FA8, 0x1FAF },
           11 };
           12 
           13 static const Rune title1[] = {
           14         0x01C5,
           15         0x01C8,
           16         0x01CB,
           17         0x01F2,
           18         0x1FBC,
           19         0x1FCC,
           20         0x1FFC,
           21 };
           22 
           23 int
           24 istitlerune(Rune r)
           25 {
           26         if(bsearch(&r, title2, nelem(title2), sizeof *title2, &rune2cmp))
           27                 return 1;
           28         if(bsearch(&r, title1, nelem(title1), sizeof *title1, &rune1cmp))
           29                 return 1;
           30         return 0;
           31 }