comparison src/callproc.c @ 311:9e60d5c117db

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Wed, 03 Jul 1991 00:08:25 +0000
parents 558b874b5259
children 350065270fc8
comparison
equal deleted inserted replaced
310:88bee8093f43 311:9e60d5c117db
119 = (unsigned char **) alloca ((max (2, nargs - 2)) * sizeof (char *)); 119 = (unsigned char **) alloca ((max (2, nargs - 2)) * sizeof (char *));
120 struct buffer *old = current_buffer; 120 struct buffer *old = current_buffer;
121 #if 0 121 #if 0
122 int mask; 122 int mask;
123 #endif 123 #endif
124 struct gcpro gcpro1;
125
126 GCPRO1 (*args);
127 gcpro1.nvars = nargs;
128
129 CHECK_STRING (args[0], 0); 124 CHECK_STRING (args[0], 0);
130 125
131 if (nargs <= 1 || NULL (args[1])) 126 if (nargs <= 1 || NULL (args[1]))
132 args[1] = build_string ("/dev/null"); 127 args[1] = build_string ("/dev/null");
133 else 128 else
244 if (XTYPE (buffer) == Lisp_Int) 239 if (XTYPE (buffer) == Lisp_Int)
245 { 240 {
246 #ifndef subprocesses 241 #ifndef subprocesses
247 wait_without_blocking (); 242 wait_without_blocking ();
248 #endif /* subprocesses */ 243 #endif /* subprocesses */
249
250 UNGCPRO;
251 return Qnil; 244 return Qnil;
252 } 245 }
253 246
254 record_unwind_protect (call_process_cleanup, 247 record_unwind_protect (call_process_cleanup,
255 Fcons (make_number (fd[0]), make_number (pid))); 248 Fcons (make_number (fd[0]), make_number (pid)));
282 immediate_quit = 0; 275 immediate_quit = 0;
283 276
284 set_buffer_internal (old); 277 set_buffer_internal (old);
285 278
286 unbind_to (count, Qnil); 279 unbind_to (count, Qnil);
287
288 UNGCPRO;
289 280
290 if (synch_process_death) 281 if (synch_process_death)
291 return build_string (synch_process_death); 282 return build_string (synch_process_death);
292 return make_number (synch_process_retcode); 283 return make_number (synch_process_retcode);
293 } 284 }
317 register Lisp_Object *args; 308 register Lisp_Object *args;
318 { 309 {
319 register Lisp_Object filename_string, start, end; 310 register Lisp_Object filename_string, start, end;
320 char tempfile[20]; 311 char tempfile[20];
321 int count = specpdl_ptr - specpdl; 312 int count = specpdl_ptr - specpdl;
322 struct gcpro gcpro1;
323
324 GCPRO1 (*args);
325 gcpro1.nvars = 2;
326 313
327 #ifdef VMS 314 #ifdef VMS
328 strcpy (tempfile, "tmp:emacsXXXXXX."); 315 strcpy (tempfile, "tmp:emacsXXXXXX.");
329 #else 316 #else
330 strcpy (tempfile, "/tmp/emacsXXXXXX"); 317 strcpy (tempfile, "/tmp/emacsXXXXXX");
341 Fdelete_region (start, end); 328 Fdelete_region (start, end);
342 329
343 args[3] = filename_string; 330 args[3] = filename_string;
344 Fcall_process (nargs - 2, args + 2); 331 Fcall_process (nargs - 2, args + 2);
345 332
346 UNGCPRO;
347 return unbind_to (count, Qnil); 333 return unbind_to (count, Qnil);
348 } 334 }
349 335
350 #ifndef VMS /* VMS version is in vmsproc.c. */ 336 #ifndef VMS /* VMS version is in vmsproc.c. */
351 337