synchronize_system_messages_locale ();
signame = strsignal (code);
if (signame == 0)
- signame = "unknown";
- string = build_string (signame);
+ string = build_string ("unknown");
+ else
+ {
+ int c1, c2;
+
+ string = make_unibyte_string (signame, strlen (signame));
+ if (! NILP (Vlocale_coding_system))
+ string = (code_convert_string_norecord
+ (string, Vlocale_coding_system, 0));
+ c1 = STRING_CHAR ((char *) SDATA (string), 0);
+ c2 = DOWNCASE (c1);
+ if (c1 != c2)
+ Faset (string, make_number (0), make_number (c2));
+ }
string2 = build_string (coredump ? " (core dumped)\n" : "\n");
- SSET (string, 0, DOWNCASE (SREF (string, 0)));
return concat2 (string, string2);
}
else if (EQ (symbol, Qexit))
#endif
if (forkin < 0)
report_file_error ("Opening pty", Qnil);
-#if defined (DONT_REOPEN_PTY)
- /* In the case that vfork is defined as fork, the parent process
- (Emacs) may send some data before the child process completes
- tty options setup. So we setup tty before forking. */
- child_setup_tty (forkout);
-#endif /* DONT_REOPEN_PTY */
#else
forkin = forkout = -1;
#endif /* not USG, or USG_SUBTTY_WORKS */
#endif /* SIGCHLD */
#endif /* !POSIX_SIGNALS */
-#if !defined (DONT_REOPEN_PTY)
if (pty_flag)
child_setup_tty (xforkout);
-#endif /* not DONT_REOPEN_PTY */
#ifdef WINDOWSNT
pid = child_setup (xforkin, xforkout, xforkout,
new_argv, 1, current_dir);
register int nbytes;
char *chars;
register Lisp_Object outstream;
- register struct buffer *old = current_buffer;
register struct Lisp_Process *p = XPROCESS (proc);
register int opoint;
struct coding_system *coding = proc_decode_coding_system[channel];
int opoint_byte;
Lisp_Object text;
struct buffer *b;
+ int count = SPECPDL_INDEX ();
odeactivate = Vdeactivate_mark;
+ record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
Fset_buffer (p->buffer);
opoint = PT;
opoint_byte = PT_BYTE;
current_buffer->read_only = old_read_only;
SET_PT_BOTH (opoint, opoint_byte);
- set_buffer_internal (old);
+ unbind_to (count, Qnil);
}
return nbytes;
}
}
len = coding->produced;
- buf = SDATA (coding->dst_object);
+ object = coding->dst_object;
+ buf = SDATA (object);
}
if (pty_max_bytes == 0)
/* Running filters might relocate buffers or strings.
Arrange to relocate BUF. */
- if (CODING_REQUIRE_ENCODING (coding))
- offset = buf - SDATA (coding->dst_object);
- else if (BUFFERP (object))
+ if (BUFFERP (object))
offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf);
else if (STRINGP (object))
offset = buf - SDATA (object);
wait_reading_process_output (1, 0, 0, 0, Qnil, NULL, 0);
#endif
- if (CODING_REQUIRE_ENCODING (coding))
- buf = offset + SDATA (coding->dst_object);
- else if (BUFFERP (object))
+ if (BUFFERP (object))
buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset);
else if (STRINGP (object))
buf = offset + SDATA (object);