git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] introduce hex2chr() for converting two hexadecimal digits to a character

From
René Scharfe <l.s.r@web.de>
Date
Sep 6, 2016, 15:48 UTC
Message-ID
<86d0aa97-f56b-3d6a-c6bc-07697ac1256a@web.de>
In-Reply-To
<alpine.DEB.2.20.1609040947211.129229@virtualbox>
Am 04.09.2016 um 09:49 schrieb Johannes Schindelin:
Show 15 quoted lines
> Hi René,
>
> On Sat, 3 Sep 2016, René Scharfe wrote:
>
>> Add and use a helper function that decodes the char value of two
>> hexadecimal digits.  It returns a negative number on error, avoids
>> running over the end of the given string and doesn't shift negative
>> values.
>
> I like it! Maybe stress a little bit why this is a good change? Like, DRY
> up code, makes the code safer (bt avoiding shifting negative values)?
>
>>  6 files changed, 21 insertions(+), 78 deletions(-)
>
> Very, very nice!

That's the main reason: Consistency. It's intended to be a safe, easy to use and reasonably fast replacement for those other (lengthy) variations.

René
Previous: Johannes Schindelin
Message 3 of 3 in “introduce hex2chr() for converting two hexadecimal digits to a character”
  1. introduce hex2chr() for converting two hexadecimal digits to a characterRené Scharfe, Sep 3, 2016
  2. Johannes SchindelinSep 4, 2016
  3. René ScharfeSep 6, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.