The R Project SVN R

Rev

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

Rev 74522 Rev 76974
Line 311... Line 311...
311
    int   i, ntopics, list, overwrite, junk, setTime, rc, nnames = 0;
311
    int   i, ntopics, list, overwrite, junk, setTime, rc, nnames = 0;
312
    const void *vmax = vmaxget();
312
    const void *vmax = vmaxget();
313
 
313
 
314
    if (!isString(CAR(args)) || LENGTH(CAR(args)) != 1)
314
    if (!isString(CAR(args)) || LENGTH(CAR(args)) != 1)
315
	error(_("invalid zip name argument"));
315
	error(_("invalid zip name argument"));
316
    p = R_ExpandFileName(translateChar(STRING_ELT(CAR(args), 0)));
316
    p = R_ExpandFileName(translateCharFP(STRING_ELT(CAR(args), 0)));
317
    if (strlen(p) > PATH_MAX - 1)
317
    if (strlen(p) > PATH_MAX - 1)
318
	error(_("zip path is too long"));
318
	error(_("zip path is too long"));
319
    strcpy(zipname, p);
319
    strcpy(zipname, p);
320
    args = CDR(args);
320
    args = CDR(args);
321
    fn = CAR(args);
321
    fn = CAR(args);
Line 323... Line 323...
323
    if (ntopics > 0) {
323
    if (ntopics > 0) {
324
	if (!isString(fn))
324
	if (!isString(fn))
325
	    error(_("invalid '%s' argument"), "files");
325
	    error(_("invalid '%s' argument"), "files");
326
	topics = (const char **) R_alloc(ntopics, sizeof(char *));
326
	topics = (const char **) R_alloc(ntopics, sizeof(char *));
327
	for (i = 0; i < ntopics; i++)
327
	for (i = 0; i < ntopics; i++)
328
	    topics[i] = translateChar(STRING_ELT(fn, i));
328
	    topics[i] = translateCharFP(STRING_ELT(fn, i));
329
    }
329
    }
330
    args = CDR(args);
330
    args = CDR(args);
331
    if (!isString(CAR(args)) || LENGTH(CAR(args)) != 1)
331
    if (!isString(CAR(args)) || LENGTH(CAR(args)) != 1)
332
	error(_("invalid '%s' argument"), "exdir");
332
	error(_("invalid '%s' argument"), "exdir");
333
    p = R_ExpandFileName(translateChar(STRING_ELT(CAR(args), 0)));
333
    p = R_ExpandFileName(translateCharFP(STRING_ELT(CAR(args), 0)));
334
    if (strlen(p) > PATH_MAX - 1)
334
    if (strlen(p) > PATH_MAX - 1)
335
	error(_("'exdir' is too long"));
335
	error(_("'exdir' is too long"));
336
    strcpy(dest, p);
336
    strcpy(dest, p);
337
    if (!R_FileExists(dest))
337
    if (!R_FileExists(dest))
338
	error(_("'exdir' does not exist"));
338
	error(_("'exdir' does not exist"));