emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 71783e9: Add the string-numeric-lessp function


From: Lars Ingebrigtsen
Subject: Re: master 71783e9: Add the string-numeric-lessp function
Date: Sun, 21 Feb 2016 15:43:51 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Lars Ingebrigtsen <address@hidden> writes:

Ok, this is now implemented:

> +DEFUN ("string-numeric-lessp", Fstring_numeric_lessp,

Replete with tests.  Feel free to change the name, implementation, or
anything else.  :-)

Particularly this:

> +      /* If we're still in a number, add it to the sum and continue. */
> +      /* FIXME: Integer overflow? */
> +      if (c >= '0' && c <= '9')
> +     {
> +       number = number * 10;
> +       number += c - '0';
> +       (*isp)++;
> +       (*isp_byte) += chlen;
> +     }
> +      else
> +     break;
> +    }

There has to be a simple way to do that check...  hm...  I see that
`string-to-number' uses strtoumax...  Hm...  perhaps I can rewrite this
function to use that instead...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]