~ecs/public-inbox

hexdigit: use ord v1 APPLIED

Evan Johnston: 1
 hexdigit: use ord

 1 files changed, 1 insertions(+), 6 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.d2evs.net/~ecs/public-inbox/patches/15/mbox | git am -3
Learn more about email & git

[PATCH] hexdigit: use ord Export this patch

---
 bin/urlfilter | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/bin/urlfilter b/bin/urlfilter
index 093d76a..2ba145b 100755
--- a/bin/urlfilter
@@ -22,12 +22,7 @@ function escape(str, c, len, res) {
function hexdigit(c) {
	c = toupper(c)
	if (c ~ /^[0-9]$/) return c + 0
	else if (c == "A") return 10
	else if (c == "B") return 11
	else if (c == "C") return 12
	else if (c == "D") return 13
	else if (c == "E") return 14
	else if (c == "F") return 15
	if (c ~ /^[A-Z]$/) return ord[c] - ord["A"] + 10
	else return ""
}

-- 
2.37.1
Thanks!

To git@git.d2evs.net:~ecs/dotfiles
   45fb65c..8b25e78  master -> master