3 34b6a1d0 2022-02-08 op file="${1:?missing input file}"
5 34b6a1d0 2022-02-08 op sed -e '/^$/d' \
8 34b6a1d0 2022-02-08 op -e 's/[ \t]*$//' \
9 34b6a1d0 2022-02-08 op -e 's/\.\./ /' \
13 34b6a1d0 2022-02-08 op print "#include \"utf8.h\""
14 34b6a1d0 2022-02-08 op print "int is_emoji(uint32_t cp) {"
20 34b6a1d0 2022-02-08 op if (NF == 1) {
21 34b6a1d0 2022-02-08 op printf("%sif (cp == 0x%s)", e, $1);
23 34b6a1d0 2022-02-08 op printf("%sif (cp >= 0x%s && cp <= 0x%s)", e, $1, $2);
26 34b6a1d0 2022-02-08 op print " return 1;"
32 34b6a1d0 2022-02-08 op print "return 0; }"