search for: canread

Displaying 9 results from an estimated 9 matches for "canread".

2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
...sep, what, stripwhite, dec, quotes, comstr; - int c, flush, fill, blskip, multiline, escapes, skipNul; + int c = 0, flush, fill, blskip, multiline, escapes, skipNul; R_xlen_t nmax, nlines, nskip; const char *p, *encoding; RCNTXT cntxt; @@ -952,7 +952,7 @@ if(!data.con->canread) error(_("cannot read from this connection")); } - for (R_xlen_t i = 0; i < nskip; i++) /* MBCS-safe */ + for (R_xlen_t i = 0; i < nskip && c != R_EOF; i++) /* MBCS-safe */ while ((c = scanchar(FALSE, &data)) != '\n' && c != R_EOF); } M...
2006 Oct 09
1
Discussion starter for package level Connection API
...rite to this connection")); return con->vfprintf(con,format,ap); } int R_FgetcConnection(int idx){ Rconnection con = getConnection(idx); if (!con) return EOF; /* just like fgetc(3)? */ if(!con->isopen) error(_("connection is not open")); if(!con->canread) error(_("cannot read from this connection")); return con->fgetc(con); } double R_SeekConnection(int idx, double where, int origin, int rw){ Rconnection con = getConnection(idx); if (!con) return -1; /* just like fseek(3)? */ if(!con->isopen) error(_("con...
2023 Mar 13
0
scan(..., skip=1e11): infinite loop; cannot interrupt
...str; >?-????int?c,?flush,?fill,?blskip,?multiline,?escapes,?skipNul; >?+????int?c?=?0,?flush,?fill,?blskip,?multiline,?escapes,?skipNul; >???????R_xlen_t?nmax,?nlines,?nskip; >???????const?char?*p,?*encoding; >???????RCNTXT?cntxt; >?@@?-952,7?+952,7?@@ >????????if(!data.con->canread) >????error(_("cannot?read?from?this?connection")); >????} >?-?for?(R_xlen_t?i?=?0;?i?<?nskip;?i++)?/*?MBCS-safe?*/ >?+?for?(R_xlen_t?i?=?0;?i?<?nskip?&&?c?!=?R_EOF;?i++)?/*?MBCS-safe?*/ >????????while?((c?=?scanchar(FALSE,?&data))?!=?'\n'?&&am...
2003 May 23
1
Opening a file in mode "r+" or "r+b"
...n read from them but cannot write. After experimenting with flag combinations it seems that all the other modes work well, so looked at the source code. If I'm not mistaken line 247 in connections.c should be changed from if(mlen >= 2 && con->mode[1] == '+') con->canread = TRUE; to if(mlen >= 2 && con->mode[1] == '+') con->canwrite = TRUE; This explained my earlier R script tests, ie that the only way to write to a file is to truncate it ("w"/"w+" flag) or by appending to it ("a"/"ab"). Regard...
2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
Hello, All: I have a 4.54 GB file that I'm trying to read in chunks using "scan(..., skip=__)". It works as expected for small values of "skip" but goes into an infinite loop for "skip=1e11" and similar large values of skip: I cannot even interrupt it; I must kill R. Below please find sessionInfo() with a toy example. My real problem is a large
2005 Aug 22
2
RFC: "loop connections"
...if(!new->description) { free(new->class); free(new); - error(_("allocation of text connection failed")); + error(_("allocation of loop connection failed")); } init_con(new, description, mode); + new->text = isText; new->isopen = TRUE; new->canread = FALSE; - new->open = &text_open; - new->close = &outtext_close; - new->destroy = &outtext_destroy; - new->vfprintf = &text_vfprintf; - new->seek = &text_seek; - new->private = (void*) malloc(sizeof(struct outtextconn)); + new->open = &...
2005 Sep 18
0
Updated rawConnection() patch
...escription) + 1); - if(!new->description) { - free(new->class); free(new); - error(_("allocation of text connection failed")); - } + if(!new->description) goto f3; init_con(new, description, mode); + new->text = isText; new->isopen = TRUE; new->canread = FALSE; new->open = &text_open; new->close = &outtext_close; new->destroy = &outtext_destroy; - new->vfprintf = &text_vfprintf; new->seek = &text_seek; new->private = (void*) malloc(sizeof(struct outtextconn)); - if(!new->priv...
1998 Sep 23
9
managing users from smbpasswd rather than /etc/passwd
I have samba installed on a web server (behind a firewall). It's working fine with all the WINS networking here (eg, password authentication from the NT servers, etc). I (we) want this web server - a linux redhat 5.x box currently running samba-1.9.18p8 - to have as few actual unix login accounts as possible. What I want/need to do is to allow LOTS of people in the faculty here
2001 Feb 17
4
Comments on R-1.2.1 builds (PR#851)
...s.c, Line = 127 An enumerated type is mixed with another type. con->canwrite = (con->mode[0] == 'w' || con->mode[0] == 'a'); ^ cc-1185 c89: WARNING File = connections.c, Line = 128 An enumerated type is mixed with another type. con->canread = !con->canwrite; ^ cc-1185 c89: WARNING File = connections.c, Line = 291 An enumerated type is mixed with another type. con->canwrite = (con->mode[0] == 'w'); ^ cc-1185 c89: WARNING File = connections.c, Line = 292 An enumerated...