codec/url.c (encode): Rewrite more compactly and perspicuously.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jun 2018 23:17:12 +0000 (00:17 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jun 2018 23:17:12 +0000 (00:17 +0100)
commit96e10f286c055c81d9474e727bf0231a94aa2b43
tree02c925b2c39b52eeb622e7787cea75998fe7d544
parent4d845619c3f21fe19dd7f7b16815281b34de9e33
codec/url.c (encode): Rewrite more compactly and perspicuously.

The condition in the `default' case was a bit gnarly: rewrite it as a
ladder of if/else.  Take the opportunity to compress the code, because
the individual case labels really don't deserve all of that vertical space.
codec/url.c