File: turtle_chars.c

package info (click to toggle)
swi-prolog 9.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 82,408 kB
  • sloc: ansic: 387,503; perl: 359,326; cpp: 6,613; lisp: 6,247; java: 5,540; sh: 3,147; javascript: 2,668; python: 1,900; ruby: 1,594; yacc: 845; makefile: 428; xml: 317; sed: 12; sql: 6
file content (76 lines) | stat: -rw-r--r-- 1,686 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
static int
wcis_pn_chars_base(int c)
{ if ( c <= 0x1fff )
  { if ( c <= 0x00d6 )
    { if ( c <= 0x005a )
      { return (c >= 0x0041 && c <= 0x005a);
      } else
      { if ( c <= 0x007a )
        { return (c >= 0x0061 && c <= 0x007a);
        } else
        { return (c >= 0x00c0 && c <= 0x00d6);
        }
      }
    } else
    { if ( c <= 0x02ff )
      { if ( c <= 0x00f6 )
        { return (c >= 0x00d8 && c <= 0x00f6);
        } else
        { return (c >= 0x00f8 && c <= 0x02ff);
        }
      } else
      { if ( c <= 0x037d )
        { return (c >= 0x0370 && c <= 0x037d);
        } else
        { return (c >= 0x037f && c <= 0x1fff);
        }
      }
    }
  } else
  { if ( c <= 0x2fef )
    { if ( c <= 0x200d )
      { return (c >= 0x200c && c <= 0x200d);
      } else
      { if ( c <= 0x218f )
        { return (c >= 0x2070 && c <= 0x218f);
        } else
        { return (c >= 0x2c00 && c <= 0x2fef);
        }
      }
    } else
    { if ( c <= 0xfdcf )
      { if ( c <= 0xd7ff )
        { return (c >= 0x3001 && c <= 0xd7ff);
        } else
        { return (c >= 0xf900 && c <= 0xfdcf);
        }
      } else
      { if ( c <= 0xfffd )
        { return (c >= 0xfdf0 && c <= 0xfffd);
        } else
        { return (c >= 0x10000 && c <= 0xeffff);
        }
      }
    }
  }
}

static int
wcis_pn_chars_extra(int c)
{ if ( c <= 0x0039 )
  { if ( c <= 0x002d )
    { return (c == 0x002d);} else
    { return (c >= 0x0030 && c <= 0x0039);
    }
  } else
  { if ( c <= 0x00b7 )
    { return (c == 0x00b7);} else
    { if ( c <= 0x036f )
      { return (c >= 0x0300 && c <= 0x036f);
      } else
      { return (c >= 0x203f && c <= 0x2040);
      }
    }
  }
}