1 |
/* Synchronous subprocess invocation for GNU Emacs. |
/* Synchronous subprocess invocation for GNU Emacs. |
2 |
Copyright (C) 1985,86,87,88,93,94,95,99, 2000, 2001 |
Copyright (C) 1985,86,87,88,93,94,95,99, 2000,01,02,03,04 |
3 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of GNU Emacs. |
This file is part of GNU Emacs. |
130 |
this is exit code of synchronous subprocess. */ |
this is exit code of synchronous subprocess. */ |
131 |
int synch_process_retcode; |
int synch_process_retcode; |
132 |
|
|
133 |
|
extern Lisp_Object Qredisplay_dont_pause; |
134 |
|
|
135 |
extern Lisp_Object Vdoc_file_name; |
extern Lisp_Object Vdoc_file_name; |
136 |
|
|
137 |
extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system; |
extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system; |
222 |
int fd[2]; |
int fd[2]; |
223 |
int filefd; |
int filefd; |
224 |
register int pid; |
register int pid; |
225 |
char buf[16384]; |
char buf[16384*4]; |
226 |
char *bufptr = buf; |
char *bufptr = buf; |
227 |
int bufsize = 16384; |
int bufsize = sizeof buf; |
228 |
int count = SPECPDL_INDEX (); |
int count = SPECPDL_INDEX (); |
229 |
|
|
230 |
register const unsigned char **new_argv |
register const unsigned char **new_argv |
773 |
|
|
774 |
if (this_read == 0) |
if (this_read == 0) |
775 |
{ |
{ |
776 |
|
// fprintf(stderr, "read 0, total=%d\n", total_read); |
777 |
process_coding.mode |= CODING_MODE_LAST_BLOCK; |
process_coding.mode |= CODING_MODE_LAST_BLOCK; |
778 |
break; |
break; |
779 |
} |
} |
781 |
nread += this_read; |
nread += this_read; |
782 |
total_read += this_read; |
total_read += this_read; |
783 |
|
|
784 |
|
// fprintf(stderr, "read %d+%d of %d, total=%d\n", nread, this_read, bufsize, total_read); |
785 |
|
|
786 |
if (display_on_the_fly) |
if (display_on_the_fly) |
787 |
break; |
break; |
788 |
} |
} |
835 |
continue; |
continue; |
836 |
} |
} |
837 |
|
|
838 |
|
// fprintf(stderr, "produced %d\n", process_coding.produced); |
839 |
|
|
840 |
if (process_coding.produced > 0) |
if (process_coding.produced > 0) |
841 |
insert_1_both (decoding_buf, process_coding.produced_char, |
insert_1_both (decoding_buf, process_coding.produced_char, |
842 |
process_coding.produced, 0, 1, 0); |
process_coding.produced, 0, 1, 0); |
936 |
|
|
937 |
if (!NILP (display) && INTERACTIVE) |
if (!NILP (display) && INTERACTIVE) |
938 |
{ |
{ |
939 |
|
extern int windows_or_buffers_changed; |
940 |
|
int count = SPECPDL_INDEX (); |
941 |
|
|
942 |
if (first) |
if (first) |
943 |
prepare_menu_bars (); |
prepare_menu_bars (); |
944 |
first = 0; |
first = 0; |
945 |
|
specbind (Qredisplay_dont_pause, Qt); |
946 |
redisplay_preserve_echo_area (1); |
redisplay_preserve_echo_area (1); |
947 |
|
unbind_to (count, Qnil); |
948 |
} |
} |
949 |
immediate_quit = 1; |
immediate_quit = 1; |
950 |
QUIT; |
QUIT; |