aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2010-07-12 21:23:00 +0300
committerEli Zaretskii <[email protected]>2010-07-12 21:23:00 +0300
commitfc549af9e08b8c54c9632f69053affc95112bde0 (patch)
treebc076195ecc90369a818492d2a201211c6383bfd /src/process.c
parentded80a25b7d4a088dd4c4a714666705749106138 (diff)
Fix the MS-DOS build (fallout from 2010-07-12T14:16:[email protected], 2010-07-12T17:04:[email protected], 2010-07-12T17:21:[email protected]).
msdos/sed1v2.inp (C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS): Edit to empty. msdos/sed3v2.inp(C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS): Edit to empty. src/process.c (setup_process_coding_systems): Move to the part shared by non-subprocesses systems, and make its body empty when subprocesses is not defined. (close_process_descs): Move to the part shared by non-subprocesses systems.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c118
1 files changed, 61 insertions, 57 deletions
diff --git a/src/process.c b/src/process.c
index 8de85354dd..226326d9c5 100644
--- a/src/process.c
+++ b/src/process.c
@@ -642,38 +642,6 @@ remove_process (register Lisp_Object proc)
deactivate_process (proc);
}
-/* Setup coding systems of PROCESS. */
-
-void
-setup_process_coding_systems (Lisp_Object process)
-{
- struct Lisp_Process *p = XPROCESS (process);
- int inch = p->infd;
- int outch = p->outfd;
- Lisp_Object coding_system;
-
- if (inch < 0 || outch < 0)
- return;
-
- if (!proc_decode_coding_system[inch])
- proc_decode_coding_system[inch]
- = (struct coding_system *) xmalloc (sizeof (struct coding_system));
- coding_system = p->decode_coding_system;
- if (! NILP (p->filter))
- ;
- else if (BUFFERP (p->buffer))
- {
- if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters))
- coding_system = raw_text_coding_system (coding_system);
- }
- setup_coding_system (coding_system, proc_decode_coding_system[inch]);
-
- if (!proc_encode_coding_system[outch])
- proc_encode_coding_system[outch]
- = (struct coding_system *) xmalloc (sizeof (struct coding_system));
- setup_coding_system (p->encode_coding_system,
- proc_encode_coding_system[outch]);
-}
DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0,
doc: /* Return t if OBJECT is a process. */)
@@ -4113,31 +4081,6 @@ deactivate_process (Lisp_Object proc)
}
}
-/* Close all descriptors currently in use for communication
- with subprocess. This is used in a newly-forked subprocess
- to get rid of irrelevant descriptors. */
-
-void
-close_process_descs (void)
-{
-#ifndef DOS_NT
- int i;
- for (i = 0; i < MAXDESC; i++)
- {
- Lisp_Object process;
- process = chan_process[i];
- if (!NILP (process))
- {
- int in = XPROCESS (process)->infd;
- int out = XPROCESS (process)->outfd;
- if (in >= 0)
- emacs_close (in);
- if (out >= 0 && in != out)
- emacs_close (out);
- }
- }
-#endif
-}
DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output,
0, 4, 0,
@@ -7208,6 +7151,67 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
/* The following functions are needed even if async subprocesses are
not supported. Some of them are no-op stubs in that case. */
+/* Setup coding systems of PROCESS. */
+
+void
+setup_process_coding_systems (Lisp_Object process)
+{
+#ifdef subprocesses
+ struct Lisp_Process *p = XPROCESS (process);
+ int inch = p->infd;
+ int outch = p->outfd;
+ Lisp_Object coding_system;
+
+ if (inch < 0 || outch < 0)
+ return;
+
+ if (!proc_decode_coding_system[inch])
+ proc_decode_coding_system[inch]
+ = (struct coding_system *) xmalloc (sizeof (struct coding_system));
+ coding_system = p->decode_coding_system;
+ if (! NILP (p->filter))
+ ;
+ else if (BUFFERP (p->buffer))
+ {
+ if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters))
+ coding_system = raw_text_coding_system (coding_system);
+ }
+ setup_coding_system (coding_system, proc_decode_coding_system[inch]);
+
+ if (!proc_encode_coding_system[outch])
+ proc_encode_coding_system[outch]
+ = (struct coding_system *) xmalloc (sizeof (struct coding_system));
+ setup_coding_system (p->encode_coding_system,
+ proc_encode_coding_system[outch]);
+#endif
+}
+
+/* Close all descriptors currently in use for communication
+ with subprocess. This is used in a newly-forked subprocess
+ to get rid of irrelevant descriptors. */
+
+void
+close_process_descs (void)
+{
+#ifndef DOS_NT
+ int i;
+ for (i = 0; i < MAXDESC; i++)
+ {
+ Lisp_Object process;
+ process = chan_process[i];
+ if (!NILP (process))
+ {
+ int in = XPROCESS (process)->infd;
+ int out = XPROCESS (process)->outfd;
+ if (in >= 0)
+ emacs_close (in);
+ if (out >= 0 && in != out)
+ emacs_close (out);
+ }
+ }
+#endif
+}
+
DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0,
doc: /* Return the (or a) process associated with BUFFER.
BUFFER may be a buffer or the name of one. */)