comparison src/vmsproc.c @ 16:0293115a14e9 r19-15b91

Import from CVS: tag r19-15b91
author cvs
date Mon, 13 Aug 2007 08:49:20 +0200
parents 376386a54a3c
children 859a2309aef8
comparison
equal deleted inserted replaced
15:ad457d5f7d04 16:0293115a14e9
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, 401 DEFUN ("call-process-internal", Fcall_process_internal,
402 Scall_process_internal, 1, MANY, 0 /* 402 Scall_process_internal, 1, MANY, 0 /*
403 Call PROGRAM synchronously in a separate process. 403 Call PROGRAM synchronously in a separate process.
470 */ 470 */
471 int i; 471 int i;
472 int arg0; 472 int arg0;
473 int firstArg; 473 int firstArg;
474 474
475 if (strcmp (string_data (XSTRING (args[0])), "*dcl*") == 0) 475 if (strcmp (XSTRING_DATA (args[0]), "*dcl*") == 0)
476 { 476 {
477 arg0 = 5; 477 arg0 = 5;
478 firstArg = 6; 478 firstArg = 6;
479 } 479 }
480 else 480 else
481 { 481 {
482 arg0 = 0; 482 arg0 = 0;
483 firstArg = 4; 483 firstArg = 4;
484 } 484 }
485 len = string_length (XSTRING (args[arg0])) + 1; 485 len = XSTRING_LENGTH (args[arg0]) + 1;
486 for (i = firstArg; i < nargs; i++) 486 for (i = firstArg; i < nargs; i++)
487 { 487 {
488 CHECK_STRING (args[i]); 488 CHECK_STRING (args[i]);
489 len += string_length (XSTRING (args[i])) + 1; 489 len += XSTRING_LENGTH (args[i]) + 1;
490 } 490 }
491 new_argv = alloca (len); 491 new_argv = alloca (len);
492 strcpy (new_argv, string_data (XSTRING (args[arg0]))); 492 strcpy (new_argv, XSTRING_DATA (args[arg0]));
493 for (i = firstArg; i < nargs; i++) 493 for (i = firstArg; i < nargs; i++)
494 { 494 {
495 strcat (new_argv, " "); 495 strcat (new_argv, " ");
496 strcat (new_argv, string_data (XSTRING (args[i]))); 496 strcat (new_argv, XSTRING_DATA (args[i]));
497 } 497 }
498 dcmd.l = len-1; 498 dcmd.l = len-1;
499 dcmd.a = new_argv; 499 dcmd.a = new_argv;
500 500
501 status = get_pty_channel (inDevName, outDevName, &inchannel, &outchannel); 501 status = get_pty_channel (inDevName, outDevName, &inchannel, &outchannel);
521 } 521 }
522 vs->inputChan = inchannel; 522 vs->inputChan = inchannel;
523 vs->outputChan = outchannel; 523 vs->outputChan = outchannel;
524 } 524 }
525 525
526 filefd = open (string_data (XSTRING (args[1])), O_RDONLY, 0); 526 filefd = open (XSTRING_DATA (args[1]), O_RDONLY, 0);
527 if (filefd < 0) 527 if (filefd < 0)
528 { 528 {
529 sys$dassgn (inchannel); 529 sys$dassgn (inchannel);
530 sys$dassgn (outchannel); 530 sys$dassgn (outchannel);
531 give_back_vms_process_stuff (vs); 531 give_back_vms_process_stuff (vs);
532 report_file_error ("Opening process input file", Fcons (args[1], Qnil)); 532 report_file_error ("Opening process input file", Fcons (args[1], Qnil));
533 } 533 }
534 else 534 else
535 close (filefd); 535 close (filefd);
536 536
537 din.l = string_length (XSTRING (args[1])); 537 din.l = XSTRING_LENGTH (args[1]);
538 din.a = string_data (XSTRING (args[1])); 538 din.a = XSTRING_DATA (args[1]);
539 539
540 /* 540 /*
541 Start a read on the process channel 541 Start a read on the process channel
542 */ 542 */
543 if (!INTP (buffer)) 543 if (!INTP (buffer))