comparison src/vmsproc.c @ 82:6a378aca36af r20-0b91

Import from CVS: tag r20-0b91
author cvs
date Mon, 13 Aug 2007 09:07:36 +0200
parents 131b0175ea99
children
comparison
equal deleted inserted replaced
81:ebca3d831cea 82:6a378aca36af
393 /* ??? I suspect that maybe this shouldn't be done on VMS. */ 393 /* ??? I suspect that maybe this shouldn't be done on VMS. */
394 /* Close Emacs's descriptors that this process should not have. */ 394 /* Close Emacs's descriptors that this process should not have. */
395 close_process_descs (); 395 close_process_descs ();
396 396
397 if (STRINGP (current_buffer->directory)) 397 if (STRINGP (current_buffer->directory))
398 chdir (string_data (XSTRING (current_buffer->directory))); 398 chdir (XSTRING_DATA (current_buffer->directory));
399 } 399 }
400 400
401 DEFUN ("call-process-internal", Fcall_process_internal, 1, MANY, 0 /* 401 DEFUN ("call-process-internal", Fcall_process_internal, 1, MANY, 0 /*
402 Call PROGRAM synchronously in a separate process. 402 Call PROGRAM synchronously in a separate process.
403 Program's input comes from file INFILE (nil means null device, `NLA0:'). 403 Program's input comes from file INFILE (nil means null device, `NLA0:').
467 */ 467 */
468 int i; 468 int i;
469 int arg0; 469 int arg0;
470 int firstArg; 470 int firstArg;
471 471
472 if (strcmp (string_data (XSTRING (args[0])), "*dcl*") == 0) 472 if (strcmp (XSTRING_DATA (args[0]), "*dcl*") == 0)
473 { 473 {
474 arg0 = 5; 474 arg0 = 5;
475 firstArg = 6; 475 firstArg = 6;
476 } 476 }
477 else 477 else
478 { 478 {
479 arg0 = 0; 479 arg0 = 0;
480 firstArg = 4; 480 firstArg = 4;
481 } 481 }
482 len = string_length (XSTRING (args[arg0])) + 1; 482 len = XSTRING_LENGTH (args[arg0]) + 1;
483 for (i = firstArg; i < nargs; i++) 483 for (i = firstArg; i < nargs; i++)
484 { 484 {
485 CHECK_STRING (args[i]); 485 CHECK_STRING (args[i]);
486 len += string_length (XSTRING (args[i])) + 1; 486 len += XSTRING_LENGTH (args[i]) + 1;
487 } 487 }
488 new_argv = alloca (len); 488 new_argv = alloca (len);
489 strcpy (new_argv, string_data (XSTRING (args[arg0]))); 489 strcpy (new_argv, XSTRING_DATA (args[arg0]));
490 for (i = firstArg; i < nargs; i++) 490 for (i = firstArg; i < nargs; i++)
491 { 491 {
492 strcat (new_argv, " "); 492 strcat (new_argv, " ");
493 strcat (new_argv, string_data (XSTRING (args[i]))); 493 strcat (new_argv, XSTRING_DATA (args[i]));
494 } 494 }
495 dcmd.l = len-1; 495 dcmd.l = len-1;
496 dcmd.a = new_argv; 496 dcmd.a = new_argv;
497 497
498 status = get_pty_channel (inDevName, outDevName, &inchannel, &outchannel); 498 status = get_pty_channel (inDevName, outDevName, &inchannel, &outchannel);
518 } 518 }
519 vs->inputChan = inchannel; 519 vs->inputChan = inchannel;
520 vs->outputChan = outchannel; 520 vs->outputChan = outchannel;
521 } 521 }
522 522
523 filefd = open (string_data (XSTRING (args[1])), O_RDONLY, 0); 523 filefd = open (XSTRING_DATA (args[1]), O_RDONLY, 0);
524 if (filefd < 0) 524 if (filefd < 0)
525 { 525 {
526 sys$dassgn (inchannel); 526 sys$dassgn (inchannel);
527 sys$dassgn (outchannel); 527 sys$dassgn (outchannel);
528 give_back_vms_process_stuff (vs); 528 give_back_vms_process_stuff (vs);
529 report_file_error ("Opening process input file", Fcons (args[1], Qnil)); 529 report_file_error ("Opening process input file", Fcons (args[1], Qnil));
530 } 530 }
531 else 531 else
532 close (filefd); 532 close (filefd);
533 533
534 din.l = string_length (XSTRING (args[1])); 534 din.l = XSTRING_LENGTH (args[1]);
535 din.a = string_data (XSTRING (args[1])); 535 din.a = XSTRING_DATA (args[1]);
536 536
537 /* 537 /*
538 Start a read on the process channel 538 Start a read on the process channel
539 */ 539 */
540 if (!INTP (buffer)) 540 if (!INTP (buffer))