428
|
1 /* System-dependent prototypes
|
|
2 Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc.
|
814
|
3 Copyright (C) 2001, 2002 Ben Wing.
|
428
|
4
|
|
5 This file is part of XEmacs.
|
|
6
|
|
7 XEmacs is free software; you can redistribute it and/or modify it
|
|
8 under the terms of the GNU General Public License as published by the
|
|
9 Free Software Foundation; either version 2, or (at your option) any
|
|
10 later version.
|
|
11
|
|
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
15 for more details.
|
|
16
|
|
17 You should have received a copy of the GNU General Public License
|
|
18 along with XEmacs; see the file COPYING. If not, write to
|
|
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
20 Boston, MA 02111-1307, USA. */
|
|
21
|
|
22 /* Synched up with: FSF 19.30. Split out of sysdep.c/emacs.c. */
|
|
23
|
440
|
24 #ifndef INCLUDED_sysdep_h_
|
|
25 #define INCLUDED_sysdep_h_
|
428
|
26
|
|
27 #include <setjmp.h>
|
|
28
|
442
|
29 #ifndef WIN32_NATIVE
|
428
|
30 extern char **environ;
|
440
|
31 #endif
|
428
|
32
|
442
|
33 #ifdef PDUMP
|
|
34 int pdump_read_file (char **pdump_start_pos, size_t *pdump_length);
|
|
35 #endif
|
|
36
|
428
|
37 int eight_bit_tty (struct device *d);
|
|
38
|
|
39 void stuff_char (struct console *con, int c);
|
|
40
|
|
41 void init_baud_rate (struct device *d);
|
|
42
|
|
43 void set_exclusive_use (int fd);
|
|
44
|
|
45 void set_descriptor_non_blocking (int fd);
|
|
46
|
|
47 int get_pty_max_bytes (int fd);
|
867
|
48 Ibyte get_eof_char (int fd);
|
428
|
49
|
|
50 /* Wait for subprocess with process id `pid' to terminate and
|
|
51 make sure it will get eliminated (not remain forever as a zombie) */
|
|
52 void wait_for_termination (int pid);
|
|
53
|
|
54 /* flush any pending output
|
|
55 * (may flush input as well; it does not matter the way we use it)
|
|
56 */
|
|
57 void flush_pending_output (int channel);
|
|
58
|
|
59 void child_setup_tty (int out);
|
|
60
|
|
61 /* Suspend the Emacs process; give terminal to its superior. */
|
|
62 void sys_suspend (void);
|
|
63 /* Suspend a process if possible; give terminal to its superior. */
|
|
64 void sys_suspend_process (int process);
|
|
65
|
|
66 void request_sigio (void);
|
|
67 void unrequest_sigio (void);
|
|
68
|
|
69 void stop_interrupts (void);
|
|
70 void start_interrupts (void);
|
|
71 void slow_down_interrupts (void);
|
|
72 void speed_up_interrupts (void);
|
|
73 void init_poll_for_quit (void);
|
|
74
|
|
75 /* Used so that signals can break out of system calls that aren't
|
|
76 naturally interruptible. */
|
|
77
|
|
78 extern JMP_BUF break_system_call_jump;
|
|
79 extern volatile int can_break_system_calls;
|
|
80
|
|
81 /* Call these functions if you want to change some terminal parameter --
|
|
82 reset the console, change the parameter, and init it again. */
|
|
83 void init_one_console (struct console *c);
|
|
84 void reset_one_console (struct console *c);
|
|
85 void init_one_device (struct device *d);
|
|
86 void reset_one_device (struct device *d);
|
|
87
|
|
88 /* Prepare all terminals for exiting Emacs; move the cursor to the
|
|
89 bottom of the frame, turn off special modes, etc. Called at exit.
|
|
90 This calls reset_one_console() on all consoles and does some other
|
|
91 stuff (e.g. fix the foreground pgroup). */
|
|
92
|
|
93 void reset_all_consoles (void);
|
|
94
|
|
95 /* Call these functions if you are going to temporarily exit back to
|
|
96 the shell (e.g. when suspending). This calls reset_one_console()
|
|
97 on the initial console and does some other stuff (e.g. fix the
|
|
98 foreground pgroup). */
|
|
99
|
|
100 void reset_initial_console (void);
|
|
101 void reinit_initial_console (void);
|
|
102
|
|
103 /* We muck around with our process group. This function needs
|
|
104 to be called at startup. The rest of the mucking is done as
|
|
105 part of the functions reset_all_consoles(), reset_initial_console(),
|
|
106 and reinit_initial_console(). */
|
|
107
|
|
108 void init_process_group (void);
|
|
109 void munge_tty_process_group (void);
|
|
110 void unmunge_tty_process_group (void);
|
|
111
|
|
112 void disconnect_controlling_terminal (void);
|
|
113
|
|
114 /* Return nonzero if safe to use tabs in output.
|
|
115 At the time this is called, init_sys_modes has not been done yet. */
|
|
116 int tabs_safe_p (struct device *d);
|
|
117
|
|
118 /* Get terminal size from system.
|
|
119 If zero or a negative number is stored, the value is not valid. */
|
|
120 void get_tty_device_size (struct device *d, int *widthp, int *heightp);
|
|
121 /* Set the logical window size associated with descriptor FD */
|
|
122 int set_window_size (int fd, int height, int width);
|
|
123
|
|
124 /* Set up the proper status flags for use of a pty. */
|
|
125 void setup_pty (int fd);
|
|
126
|
|
127 /* Return the address of the start of the text segment prior to unexec. */
|
|
128 char *start_of_text (void);
|
|
129 /* Return the address of the start of the data segment prior to unexec. */
|
|
130 void *start_of_data (void);
|
|
131
|
|
132 /* Get_system_name returns as its value a string for system-name to return. */
|
|
133 void init_system_name (void);
|
|
134
|
771
|
135 #ifdef WIN32_NATIVE
|
|
136 void *sbrk (unsigned long increment);
|
428
|
137 #endif
|
|
138
|
801
|
139 Bytecount total_data_usage (void);
|
|
140
|
440
|
141 #endif /* INCLUDED_sysdep_h_ */
|