~q3cpma/misc-tools

ref: 0695c6188d0f70c89d8e1757f2463b2e3869a60a misc-tools/gen_html_entities_htab.sh -rwxr-xr-x 169 bytes
0695c618q3cpma htmldecode: move to root, use genhtab instead of lex 1 year, 4 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
set -eu

tr -d '&":[]{},' | awk '
	BEGIN {print "{0, 0}"}
	$1 ~ /;$/ \
	{
		sub(";$", "", $1)
		printf "%s\t{0x%x, 0x%x}\n",
			$1, $3, (NF == 6 ? $4 : 0)
	}'