Displaying 4 results from an estimated 4 matches for "usedralloc".
Did you mean:
use_calloc
2005 Nov 27
1
segfault on write.dcf with gzfile connection
...;ve not tested on
other platforms.
Index: connections.c
===================================================================
--- connections.c (revision 36434)
+++ connections.c (working copy)
@@ -186,8 +186,11 @@
{
char buf[BUFSIZE], *b = buf, *vmax = vmaxget();
int res, usedRalloc = FALSE;
+ va_list aq;
- res = vsnprintf(buf, BUFSIZE, format, ap);
+ va_copy(aq, ap);
+ res = vsnprintf(buf, BUFSIZE, format, aq);
+ va_end(aq);
if(res >= BUFSIZE) { /* res is the desired output length */
usedRalloc = TRUE;
b = R_alloc(res + 1, sizeof(char))...
2006 Sep 29
1
Possible bug in Rcons_vprintf
...==============
--- src/main/printutils.c (revision 39548)
+++ src/main/printutils.c (working copy)
@@ -638,7 +638,7 @@
res = R_BUFSIZE;
}
#endif /* HAVE_VA_COPY */
- R_WriteConsole(p, strlen(buf));
+ R_WriteConsole(p, strlen(p));
#ifdef HAVE_VA_COPY
if(usedRalloc) vmaxset(vmax);
if(usedVasprintf) free(p);
Jeff
--
http://biostat.mc.vanderbilt.edu/JeffreyHorner
2005 Aug 22
2
RFC: "loop connections"
...;
}
@@ -1765,7 +1802,7 @@
static int text_vfprintf(Rconnection con, const char *format, va_list ap)
{
- Routtextconn this = (Routtextconn)con->private;
+ Routloopconn this = (Routloopconn)con->private;
char buf[BUFSIZE], *b = buf, *p, *q, *vmax = vmaxget();
int res = 0, usedRalloc = FALSE, buffree,
already = strlen(this->lastline);
@@ -1830,24 +1867,41 @@
return res;
}
-static void outtext_init(Rconnection con, char *mode, int idx)
+static size_t raw_write(const void *ptr, size_t size, size_t nitems,
+ Rconnection con)
+{
+ Routloopconn this = (Routloopconn...
2005 Sep 18
0
Updated rawConnection() patch
...+ (len>>3) + 16);
+ R_PreserveObject(this->data);
+ R_ReleaseObject(tmp);
+ }
+}
+
#define LAST_LINE_LEN 256
static int text_vfprintf(Rconnection con, const char *format, va_list ap)
@@ -1803,7 +1841,6 @@
char buf[BUFSIZE], *b = buf, *p, *q, *vmax = vmaxget();
int res = 0, usedRalloc = FALSE, buffree,
already = strlen(this->lastline);
- SEXP tmp;
if(already >= BUFSIZE) {
/* This will fail so just call vsnprintf to get the length of
@@ -1841,13 +1878,9 @@
for(p = b; ; p = q+1) {
q = Rf_strchr(p, '\n');
if(q) {
- int idx = ConnIndex(con);...