[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison
From: |
Paul Smith |
Subject: |
Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison |
Date: |
Sun, 28 Nov 2021 08:45:09 -0500 |
User-agent: |
Evolution 3.36.5-0ubuntu1 |
On Sun, 2021-11-28 at 08:24 +0100, Jouke Witteveen wrote:
> Thanks for sending this message, I would have otherwise prepared and
> sent an updated patch series today. My plan was to expand to RHS in
> the two-argument case if both values are equal. I assume you also
> updated the documentation where needed? If so, there's nothing I have
> to add and I'm looking forward to the new functionality.
Yes, I updated the docs.
Since the two arguments are equal, it doesn't matter which of LHS or
RHS we return.
The change I made was:
argv += 2;
if (*argv == NULL)
{
if (lhs == rhs)
{
char buf[INTSTR_LENGTH+1];
sprintf (buf, "%ld", lhs);
o = variable_buffer_output(o, buf, strlen (buf));
}
return o;
}
However, now that I think about it I need to change the code more: we
need to be using "long long" here not just "long". While on Linux etc.
a "long" is 8 bytes, on Windows "long" is only 4 bytes.
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/05
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/08
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/10
- RE: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, rsbecker, 2021/11/10
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/14
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/15
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/27
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison,
Paul Smith <=
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Edward Welbourne, 2021/11/16
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/16