The R Project SVN R

Rev

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

Rev 75783 Rev 77228
Line 384... Line 384...
384
 
384
 
385
 
385
 
386
    if (!strcmp(argv[cmdarg], "INSTALL")) {
386
    if (!strcmp(argv[cmdarg], "INSTALL")) {
387
	/* Unix has --no-restore except for MM's undocumented --use-vanilla */
387
	/* Unix has --no-restore except for MM's undocumented --use-vanilla */
388
	snprintf(cmd, CMD_LEN,
388
	snprintf(cmd, CMD_LEN,
389
		 "\"%s/%s/Rterm.exe\" -e tools:::.install_packages() R_DEFAULT_PACKAGES= LC_COLLATE=C --no-restore --slave --args ",
389
		 "\"%s/%s/Rterm.exe\" -e tools:::.install_packages() R_DEFAULT_PACKAGES= LC_COLLATE=C --no-restore --no-echo --args ",
390
		 getRHOME(3), BINDIR);
390
		 getRHOME(3), BINDIR);
391
	PROCESS_CMD("nextArg");
391
	PROCESS_CMD("nextArg");
392
    } else if (!strcmp(argv[cmdarg], "REMOVE")) {
392
    } else if (!strcmp(argv[cmdarg], "REMOVE")) {
393
	snprintf(cmd, CMD_LEN,
393
	snprintf(cmd, CMD_LEN,
394
		 "\"\"%s/%s/Rterm.exe\" -f \"%s/share/R/REMOVE.R\" R_DEFAULT_PACKAGES=NULL --no-restore --slave --args",
394
		 "\"\"%s/%s/Rterm.exe\" -f \"%s/share/R/REMOVE.R\" R_DEFAULT_PACKAGES=NULL --no-restore --no-echo --args",
395
		 getRHOME(3), BINDIR, getRHOME(3));
395
		 getRHOME(3), BINDIR, getRHOME(3));
396
	for (i = cmdarg + 1; i < argc; i++){
396
	for (i = cmdarg + 1; i < argc; i++){
397
	    strcat(cmd, " ");
397
	    strcat(cmd, " ");
398
	    if (strlen(cmd) + strlen(argv[i]) > 9900) {
398
	    if (strlen(cmd) + strlen(argv[i]) > 9900) {
399
		fprintf(stderr, "command line too long\n");
399
		fprintf(stderr, "command line too long\n");
Line 409... Line 409...
409
	/* the outermost double quotes are needed for cmd.exe */ 
409
	/* the outermost double quotes are needed for cmd.exe */ 
410
	strcat(cmd, "\"");
410
	strcat(cmd, "\"");
411
	return(system(cmd));
411
	return(system(cmd));
412
    } else if (!strcmp(argv[cmdarg], "build")) {
412
    } else if (!strcmp(argv[cmdarg], "build")) {
413
	snprintf(cmd, CMD_LEN,
413
	snprintf(cmd, CMD_LEN,
414
		 "\"%s/%s/Rterm.exe\" -e tools:::.build_packages() R_DEFAULT_PACKAGES= LC_COLLATE=C --no-restore --slave --args ",
414
		 "\"%s/%s/Rterm.exe\" -e tools:::.build_packages() R_DEFAULT_PACKAGES= LC_COLLATE=C --no-restore --no-echo --args ",
415
		 getRHOME(3), BINDIR);
415
		 getRHOME(3), BINDIR);
416
	PROCESS_CMD("nextArg");
416
	PROCESS_CMD("nextArg");
417
    } else if (!strcmp(argv[cmdarg], "check")) {
417
    } else if (!strcmp(argv[cmdarg], "check")) {
418
	snprintf(cmd, CMD_LEN,
418
	snprintf(cmd, CMD_LEN,
419
		 "\"%s/%s/Rterm.exe\" -e tools:::.check_packages() R_DEFAULT_PACKAGES= LC_COLLATE=C --no-restore --slave --args ",
419
		 "\"%s/%s/Rterm.exe\" -e tools:::.check_packages() R_DEFAULT_PACKAGES= LC_COLLATE=C --no-restore --no-echo --args ",
420
		 getRHOME(3), BINDIR);
420
		 getRHOME(3), BINDIR);
421
	PROCESS_CMD("nextArg");
421
	PROCESS_CMD("nextArg");
422
    } else if (!strcmp(argv[cmdarg], "Rprof")) {
422
    } else if (!strcmp(argv[cmdarg], "Rprof")) {
423
	snprintf(cmd, CMD_LEN,
423
	snprintf(cmd, CMD_LEN,
424
		 "\"%s/%s/Rterm.exe\" -e tools:::.Rprof() R_DEFAULT_PACKAGES=utils LC_COLLATE=C --vanilla --slave --args ",
424
		 "\"%s/%s/Rterm.exe\" -e tools:::.Rprof() R_DEFAULT_PACKAGES=utils LC_COLLATE=C --vanilla --no-echo --args ",
425
		 getRHOME(3), BINDIR);
425
		 getRHOME(3), BINDIR);
426
	PROCESS_CMD("nextArg");
426
	PROCESS_CMD("nextArg");
427
   } else if (!strcmp(argv[cmdarg], "texify")) {
427
   } else if (!strcmp(argv[cmdarg], "texify")) {
428
	if (argc < cmdarg+2) {
428
	if (argc < cmdarg+2) {
429
	    fprintf(stderr, "\nUsage: %s texify [options] filename\n", RCMD);
429
	    fprintf(stderr, "\nUsage: %s texify [options] filename\n", RCMD);
Line 432... Line 432...
432
	snprintf(cmd, CMD_LEN,
432
	snprintf(cmd, CMD_LEN,
433
		 "texify.exe -I \"%s/share/texmf/tex/latex\" -I \"%s/share/texmf/bibtex/bst\"", getRHOME(3), getRHOME(3));
433
		 "texify.exe -I \"%s/share/texmf/tex/latex\" -I \"%s/share/texmf/bibtex/bst\"", getRHOME(3), getRHOME(3));
434
	PROCESS_CMD(" ");
434
	PROCESS_CMD(" ");
435
    } else if (!strcmp(argv[cmdarg], "SHLIB")) {
435
    } else if (!strcmp(argv[cmdarg], "SHLIB")) {
436
	snprintf(cmd, CMD_LEN,
436
	snprintf(cmd, CMD_LEN,
437
		 "\"%s/%s/Rterm.exe\" -e tools:::.SHLIB() R_DEFAULT_PACKAGES=NULL --no-restore --slave --no-site-file --no-init-file --args",
437
		 "\"%s/%s/Rterm.exe\" -e tools:::.SHLIB() R_DEFAULT_PACKAGES=NULL --no-restore --no-echo --no-site-file --no-init-file --args",
438
		 getRHOME(3), BINDIR);
438
		 getRHOME(3), BINDIR);
439
	PROCESS_CMD(" ");
439
	PROCESS_CMD(" ");
440
    } else if (!strcmp(argv[cmdarg], "Rdiff")) {
440
    } else if (!strcmp(argv[cmdarg], "Rdiff")) {
441
	snprintf(cmd, CMD_LEN,
441
	snprintf(cmd, CMD_LEN,
442
		 "\"%s/%s/Rterm.exe\" -e tools:::.Rdiff() R_DEFAULT_PACKAGES=NULL --vanilla --slave --args ",
442
		 "\"%s/%s/Rterm.exe\" -e tools:::.Rdiff() R_DEFAULT_PACKAGES=NULL --vanilla --no-echo --args ",
443
		 getRHOME(3), BINDIR);
443
		 getRHOME(3), BINDIR);
444
	PROCESS_CMD("nextArg");
444
	PROCESS_CMD("nextArg");
445
    } else if (!strcmp(argv[cmdarg], "Rdconv")) {
445
    } else if (!strcmp(argv[cmdarg], "Rdconv")) {
446
	snprintf(cmd, CMD_LEN,
446
	snprintf(cmd, CMD_LEN,
447
		 "\"%s/%s/Rterm.exe\" -e tools:::.Rdconv() R_DEFAULT_PACKAGES= LC_COLLATE=C --vanilla --slave --args ",
447
		 "\"%s/%s/Rterm.exe\" -e tools:::.Rdconv() R_DEFAULT_PACKAGES= LC_COLLATE=C --vanilla --no-echo --args ",
448
		 getRHOME(3), BINDIR);
448
		 getRHOME(3), BINDIR);
449
	PROCESS_CMD("nextArg");
449
	PROCESS_CMD("nextArg");
450
    } else if (!strcmp(argv[cmdarg], "Rd2txt")) {
450
    } else if (!strcmp(argv[cmdarg], "Rd2txt")) {
451
	snprintf(cmd, CMD_LEN,
451
	snprintf(cmd, CMD_LEN,
452
		 "\"%s/%s/Rterm.exe\" -e tools:::.Rdconv() R_DEFAULT_PACKAGES= LC_COLLATE=C --vanilla --slave --args nextArg-tnextArgtxt",
452
		 "\"%s/%s/Rterm.exe\" -e tools:::.Rdconv() R_DEFAULT_PACKAGES= LC_COLLATE=C --vanilla --no-echo --args nextArg-tnextArgtxt",
453
		 getRHOME(3), BINDIR);
453
		 getRHOME(3), BINDIR);
454
	PROCESS_CMD("nextArg");
454
	PROCESS_CMD("nextArg");
455
    } else if (!strcmp(argv[cmdarg], "Rd2pdf")) {
455
    } else if (!strcmp(argv[cmdarg], "Rd2pdf")) {
456
	snprintf(cmd, CMD_LEN,
456
	snprintf(cmd, CMD_LEN,
457
		 "\"%s/%s/Rterm.exe\" -e tools:::..Rd2pdf() R_DEFAULT_PACKAGES= LC_ALL=C --vanilla --slave --args ",
457
		 "\"%s/%s/Rterm.exe\" -e tools:::..Rd2pdf() R_DEFAULT_PACKAGES= LC_ALL=C --vanilla --no-echo --args ",
458
		 getRHOME(3), BINDIR);
458
		 getRHOME(3), BINDIR);
459
	PROCESS_CMD("nextArg");
459
	PROCESS_CMD("nextArg");
460
    } else if (!strcmp(argv[cmdarg], "Sweave")) {
460
    } else if (!strcmp(argv[cmdarg], "Sweave")) {
461
	snprintf(cmd, CMD_LEN,
461
	snprintf(cmd, CMD_LEN,
462
		 "\"%s/%s/Rterm.exe\" --no-restore --slave -e utils:::.Sweave() --args ",
462
		 "\"%s/%s/Rterm.exe\" --no-restore --no-echo -e utils:::.Sweave() --args ",
463
		 getRHOME(3), BINDIR);
463
		 getRHOME(3), BINDIR);
464
	PROCESS_CMD("nextArg");
464
	PROCESS_CMD("nextArg");
465
    } else if (!strcmp(argv[cmdarg], "Stangle")) {
465
    } else if (!strcmp(argv[cmdarg], "Stangle")) {
466
	snprintf(cmd, CMD_LEN,
466
	snprintf(cmd, CMD_LEN,
467
		 "\"%s/%s/Rterm.exe\" --vanilla --slave -e utils:::.Stangle() --args ",
467
		 "\"%s/%s/Rterm.exe\" --vanilla --no-echo -e utils:::.Stangle() --args ",
468
		 getRHOME(3), BINDIR);
468
		 getRHOME(3), BINDIR);
469
	PROCESS_CMD("nextArg");
469
	PROCESS_CMD("nextArg");
470
    } else {
470
    } else {
471
	/* not one of those handled internally */
471
	/* not one of those handled internally */
472
	p = argv[cmdarg];
472
	p = argv[cmdarg];