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 char* on the first occasion its value is assigned to p, thus being able to copy from p to replace without repetitive casts. make check-ed patch atatched. vQ
Index: src/main/coerce.c =================================================================== --- src/main/coerce.c (revision 48689) +++ src/main/coerce.c (working copy) @@ -297,13 +297,13 @@ const char* dropTrailing0(const char *s, char cdec) { - const char *p; - for (p = s; *p; p++) { + char *p; + for (p = (char *)s; *p; p++) { if(*p == cdec) { - char *replace = (char *) p++; + char *replace = p++; while ('0' <= *p && *p <= '9') if(*(p++) != '0') - replace = (char *) p; + replace = p; while((*(replace++) = *(p++))) ; break;
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel