Displaying 4 results from an estimated 4 matches for "cbuff".
Did you mean:
buff
2010 Jun 19
1
more powerful iconv
...rgs), 0) == NA_STRING) sub = NULL;
+ if(STRING_ELT(CADDDR(args), 0) == NA_STRING || isRawx) sub = NULL;
else sub = translateChar(STRING_ELT(CADDDR(args), 0));
mark = asLogical(CAD4R(args));
if(mark == NA_LOGICAL)
@@ -584,7 +585,7 @@
PROTECT(ans = duplicate(x));
R_AllocStringBuffer(0, &cbuff); /* 0 -> default */
for(i = 0; i < LENGTH(x); i++) {
- si = STRING_ELT(x, i);
+ si = isRawx ? x : STRING_ELT(x, i);
top_of_loop:
inbuf = CHAR(si); inb = LENGTH(si);
outbuf = cbuff.data; outb = cbuff.bufsize - 1;
@@ -622,7 +623,7 @@
goto next_char;
}
-...
2007 Sep 13
1
chartr better
...trs_old = Calloc(1, struct wtr_spec);
trs_old->type = WTR_INIT;
trs_old->next = NULL;
@@ -2084,6 +2098,7 @@
if(nc < 0) error(_("invalid multibyte string 'old'"));
wc = (wchar_t *) R_AllocStringBuffer((nc+1)*sizeof(wchar_t), &cbuff);
mbstowcs(wc, s, nc + 1);
+ wtr_build_spec(wc, trs_cnt); /* use count only */
wtr_build_spec(wc, trs_old);
s = translateChar(STRING_ELT(_new, 0));
@@ -2096,38 +2111,54 @@
/* Initialize the pointers for walking through the old and new
wtr_spec...
2007 Sep 07
1
"bug" and patch: quadratic running time for strsplit(..., fixed=TRUE) (PR#9902)
...f, j = strlen(buf));
+ q += j;
p += res;
}
i += (res - 1);
Index: src/main/sysutils.c
===================================================================
--- src/main/sysutils.c (revision 42792)
+++ src/main/sysutils.c (working copy)
@@ -490,8 +490,9 @@
R_AllocStringBuffer(2*cbuff.bufsize, &cbuff);
goto top_of_loop;
}
- for(j = 0; j < strlen(sub); j++) *outbuf++ = sub[j];
- outb -= strlen(sub);
+ memcpy(outbuf, sub, j = strlen(sub));
+ outbuf += j;
+ outb -= j;
}
inbuf++; inb--;
goto next_char;
Index: src/modules/X11/rotat...
2012 Mar 13
0
111 FIXMEs in main/src
.../* FIXME: call EncodeElement() for every element of
s.
builtin.c-
--
builtin.c: /* FIXME : cat(...) should handle ANYTHING */
builtin.c- w = strlen(p);
--
character.c: slen = strlen(ss); /* FIXME -- should handle embedded
nuls */
character.c- buf = R_AllocStringBuffer(slen+1, &cbuff);
--
character.c: FIXME: could prefer UTF-8 here
character.c- */
--
character.c: /* FIXME: could use R_Realloc instead */
character.c- cbuf = CallocCharBuf(strlen(tmp) + 1);
--
character.c: /* FIXME use this buffer for new string as well */
character.c- wc = (wchar_t *)
--
c...