The R Project SVN R

Rev

Rev 60239 | Rev 66827 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 60239 Rev 60666
Line 267... Line 267...
267
 
267
 
268
/* download(url, destfile, quiet, mode, headers, cacheOK) */
268
/* download(url, destfile, quiet, mode, headers, cacheOK) */
269
 
269
 
270
#define CPBUFSIZE 65536
270
#define CPBUFSIZE 65536
271
#define IBUFSIZE 4096
271
#define IBUFSIZE 4096
272
static SEXP in_do_download(SEXP call, SEXP op, SEXP args, SEXP env)
272
static SEXP in_do_download(SEXP args)
273
{
273
{
274
    SEXP scmd, sfile, smode, sheaders, agentFun;
274
    SEXP scmd, sfile, smode, sheaders, agentFun;
275
    const char *url, *file, *mode, *headers;
275
    const char *url, *file, *mode, *headers;
276
    int quiet, status = 0, cacheOK;
276
    int quiet, status = 0, cacheOK;
277
#ifdef Win32
277
#ifdef Win32
278
    char pbuf[30];
278
    char pbuf[30];
279
    int pc;
279
    int pc;
280
#endif
280
#endif
281
 
281
 
282
    checkArity(op, args);
-
 
283
    scmd = CAR(args); args = CDR(args);
282
    scmd = CAR(args); args = CDR(args);
284
    if(!isString(scmd) || length(scmd) < 1)
283
    if(!isString(scmd) || length(scmd) < 1)
285
	error(_("invalid '%s' argument"), "url");
284
	error(_("invalid '%s' argument"), "url");
286
    if(length(scmd) > 1)
285
    if(length(scmd) > 1)
287
	warning(_("only first element of 'url' argument used"));
286
	warning(_("only first element of 'url' argument used"));