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