Martin Maechler wrote:
>> "PS" == Petr Savicky
>> on Sun, 31 May 2009 10:29:41 +0200 writes:
>>
>
> []
>
> PS> I appreciate the current version, which contains static
> PS> const char* dropTrailing0(char *s, char cdec) ...
> PS> mkChar(dropTrail
> "PS" == Petr Savicky
> on Sun, 31 May 2009 10:29:41 +0200 writes:
[]
PS> I appreciate the current version, which contains static
PS> const char* dropTrailing0(char *s, char cdec) ...
PS> mkChar(dropTrailing0((char *)EncodeReal(x, w, d, e,
PS> OutDec), ..
On Sat, May 30, 2009 at 07:32:52PM +0200, Martin Maechler wrote:
> > "vQ" == Wacek Kusnierczyk
> > on Sat, 30 May 2009 11:16:43 +0200 writes:
[...]
> vQ> one simple way to improve the code is as follows; instead of
> (simplified)
>
> vQ> const char* dropTrailing(const char
Martin Maechler wrote:
[...]
> vQ> the first question is, why does ER return the string as const? it
> vQ> appears that the returned pointer provides the address of a buffer
> used
> vQ> internally in ER, which is allocated *statically*. that is, each call
> vQ> to ER operates
> "vQ" == Wacek Kusnierczyk
> on Sat, 30 May 2009 11:16:43 +0200 writes:
vQ> Martin Maechler wrote:
>> Hi Waclav (and other interested parties),
>>
>> I have committed my working version of src/main/coerce.c
>> so you can prepare your patch against that.
>>
2009/5/30 Wacek Kusnierczyk :
> Martin Maechler wrote:
>> Hi Waclav (and other interested parties),
>>
>> I have committed my working version of src/main/coerce.c
>> so you can prepare your patch against that.
>>
>
> Hi Martin,
>
> One quick reaction (which does not resolve my original complaint):
Wacek Kusnierczyk wrote:
Martin Maechler wrote:
Hi Waclav (and other interested parties),
I have committed my working version of src/main/coerce.c
so you can prepare your patch against that.
some further investigation and reflections on the code in StringFromReal
(henceforth SFR), src/ma
Martin Maechler wrote:
> Hi Waclav (and other interested parties),
>
> I have committed my working version of src/main/coerce.c
> so you can prepare your patch against that.
>
some further investigation and reflections on the code in StringFromReal
(henceforth SFR), src/main/coerce.c:315 (as in
Martin Maechler wrote:
> Hi Waclav (and other interested parties),
>
> I have committed my working version of src/main/coerce.c
> so you can prepare your patch against that.
>
Hi Martin,
One quick reaction (which does not resolve my original complaint): you
can have p non-const, and cast s to
Hi Waclav (and other interested parties),
I have committed my working version of src/main/coerce.c
so you can prepare your patch against that.
Thank you in advance!
Martin
On Fri, May 29, 2009 at 21:54, Wacek Kusnierczyk
wrote:
> Martin Maechler wrote:
>
> [...]
>> vQ> you return s, which s
Martin Maechler wrote:
[...]
> vQ> you return s, which should be the same pointer value (given the actual
> vQ> code that does not modify the local variable s) with the same
> pointed-to
> vQ> string value (given the signature of the function).
>
> vQ> was perhaps
>
> vQ> char
Petr Savicky wrote:
> On Fri, May 29, 2009 at 03:53:02PM +0200, Martin Maechler wrote:
>
>> my version of *using* the function was
>>
>> 1 SEXP attribute_hidden StringFromReal(double x, int *warn)
>> 2 {
>> 3 int w, d, e;
>> 4 formatReal(&x, 1, &w, &d, &e, 0);
>> 5 if (ISNA(x)) return NA_S
On Fri, May 29, 2009 at 03:53:02PM +0200, Martin Maechler wrote:
> my version of *using* the function was
>
> 1 SEXP attribute_hidden StringFromReal(double x, int *warn)
> 2 {
> 3 int w, d, e;
> 4 formatReal(&x, 1, &w, &d, &e, 0);
> 5 if (ISNA(x)) return NA_STRING;
> 6 else return mkChar(d
> "vQ" == Wacek Kusnierczyk
> on Thu, 28 May 2009 00:36:07 +0200 writes:
vQ> Martin Maechler wrote:
>>
>> I have very slightly modified the changes (to get rid of -Wall
>> warnings) and also exported the function as Rf_dropTrailing0(),
>> and tested the result wi
> "PS" == Petr Savicky
> on Thu, 28 May 2009 09:36:48 +0200 writes:
PS> On Wed, May 27, 2009 at 10:51:38PM +0200, Martin Maechler wrote:
>> I have very slightly modified the changes (to get rid of -Wall
>> warnings) and also exported the function as Rf_dropTrailing0(),
On Wed, May 27, 2009 at 10:51:38PM +0200, Martin Maechler wrote:
> I have very slightly modified the changes (to get rid of -Wall
> warnings) and also exported the function as Rf_dropTrailing0(),
> and tested the result with 'make check-all' .
Thank you very much for considering the patch. -Wall
Martin Maechler wrote:
>
> I have very slightly modified the changes (to get rid of -Wall
> warnings) and also exported the function as Rf_dropTrailing0(),
> and tested the result with 'make check-all' .
> As the change seems reasonable and consequent, and as
> it seems not to produce any problems
> "PS" == Petr Savicky
> on Sat, 23 May 2009 09:44:54 +0200 writes:
PS> Function factor() in the current development version
PS> (2009-05-22) guarantees that levels are different
PS> character strings. However, they may represent the same
PS> decimal number. The follow
Function factor() in the current development version (2009-05-22)
guarantees that levels are different character strings. However, they
may represent the same decimal number. The following example is derived
from a posting by Stavros Macrakis in thread "Match .3 in a sequence"
in March
nums <- 0
19 matches
Mail list logo