Mercurial > hg > xemacs-beta
annotate src/sysdep.h @ 814:a634e3b7acc8
[xemacs-hg @ 2002-04-14 12:41:59 by ben]
latest changes
TODO.ben-mule-21-5: Update.
make-docfile.c: Add basic support for handling ISO 2022 doc strings -- we parse
the basic charset designation sequences so we know whether we're
in ASCII and have to pay attention to end quotes and such.
Reformat code according to coding standards.
abbrev.el: Add `global-abbrev-mode', which turns on or off abbrev-mode in all
buffers. Added `defining-abbrev-turns-on-abbrev-mode' -- if
non-nil, defining an abbrev through an interactive function will
automatically turn on abbrev-mode, either globally or locally
depending on the command. This is the "what you'd expect"
behavior.
indent.el: general function for indenting a balanced expression in a
mode-correct way. Works similar to indent-region in that a mode
can specify a specific command to do the whole operation; if not,
figure out the region using forward-sexp and indent each line
using indent-according-to-mode.
keydefs.el: Removed.
Modify M-C-backslash to do indent-region-or-balanced-expression.
Make S-Tab just insert a TAB char, like it's meant to do.
make-docfile.el: Now that we're using the call-process-in-lisp, we need to load
an extra file win32-native.el because we're running a bare temacs.
menubar-items.el: Totally redo the Cmds menu so that most used commands appear
directly on the menu and less used commands appear in submenus.
The old way may have been very pretty, but rather impractical.
process.el: Under Windows, don't ever use old-call-process-internal, even
in batch mode. We can do processes in batch mode.
subr.el: Someone recoded truncate-string-to-width, saying "the FSF version
is too complicated and does lots of hard-to-understand stuff" but
the resulting recoded version was *totally* wrong! it
misunderstood the basic point of this function, which is work in
*columns* not chars. i dumped ours and copied the version from
FSF 21.1. Also added truncate-string-with-continuation-dots,
since this idiom is used often.
config.inc.samp, xemacs.mak: Separate out debug and optimize flags.
Remove all vestiges of USE_MINIMAL_TAGBITS,
USE_INDEXED_LRECORD_IMPLEMENTATION, and GUNG_HO, since those
ifdefs have long been removed.
Make error-checking support actually work.
Some rearrangement of config.inc.samp to make it more logical.
Remove callproc.c and ntproc.c from xemacs.mak, no longer used.
Make pdump the default.
lisp.h: Add support for strong type-checking of Bytecount, Bytebpos,
Charcount, Charbpos, and others, by making them classes,
overloading the operators to provide integer-like operation and
carefully controlling what operations are allowed. Not currently
enabled in C++ builds because there are still a number of compile
errors, and it won't really work till we merge in my "8-bit-Mule"
workspace, in which I make use of the new types Charxpos,
Bytexpos, Memxpos, representing a "position" either in a buffer or
a string. (This is especially important in the extent code.)
abbrev.c, alloc.c, eval.c, buffer.c, buffer.h, editfns.c, fns.c, text.h: Warning fixes, some of them related to new C++ strict type
checking of Bytecount, Charbpos, etc.
dired.c: Caught an actual error due to strong type checking -- char len
being passed when should be byte len.
alloc.c, backtrace.h, bytecode.c, bytecode.h, eval.c, sysdep.c: Further optimize Ffuncall:
-- process arg list at compiled-function creation time, converting
into an array for extra-quick access at funcall time.
-- rewrite funcall_compiled_function to use it, and inline this
function.
-- change the order of check for magic stuff in
SPECBIND_FAST_UNSAFE to be faster.
-- move the check for need to garbage collect into the allocation
code, so only a single flag needs to be checked in funcall.
buffer.c, symbols.c: add debug funs to check on mule optimization info in buffers and
strings.
eval.c, emacs.c, text.c, regex.c, scrollbar-msw.c, search.c: Fix evil crashes due to eistrings not properly reinitialized under
pdump. Redo a bit some of the init routines; convert some
complex_vars_of() into simple vars_of(), because they didn't need
complex processing.
callproc.c, emacs.c, event-stream.c, nt.c, process.c, process.h, sysdep.c, sysdep.h, syssignal.h, syswindows.h, ntproc.c: Delete. Hallelujah, praise the Lord, there is no god
but Allah!!!
fix so that processes can be invoked in bare temacs -- thereby
eliminating any need for callproc.c. (currently only eliminated
under NT.) remove all crufty and unnecessary old process code in
ntproc.c and elsewhere. move non-callproc-specific stuff (mostly
environment) into process.c, so callproc.c can be left out under
NT.
console-tty.c, doc.c, file-coding.c, file-coding.h, lstream.c, lstream.h: fix doc string handling so it works with Japanese, etc docs.
change handling of "character mode" so callers don't have to
manually set it (quite error-prone).
event-msw.c: spacing fixes.
lread.c: eliminate unused crufty vintage-19 "FSF defun hack" code.
lrecord.h: improve pdump description docs.
buffer.c, ntheap.c, unexnt.c, win32.c, emacs.c: Mule-ize some unexec and startup code. It was pseudo-Mule-ized
before by simply always calling the ...A versions of functions,
but that won't cut it -- eventually we want to be able to run
properly even if XEmacs has been installed in a Japanese
directory. (The current problem is the timing of the loading of
the Unicode tables; this will eventually be fixed.) Go through and
fix various other places where the code was not Mule-clean.
Provide a function mswindows_get_module_file_name() to get our own
name without resort to PATH_MAX and such. Add a big comment in
main() about the problem with Unicode table load timing that I
just alluded to.
emacs.c: When error-checking is enabled (interpreted as "user is developing
XEmacs"), don't ask user to "pause to read messages" when a fatal
error has occurred, because it will wedge if we are in an inner
modal loop (typically when a menu is popped up) and make us unable
to get a useful stack trace in the debugger.
text.c: Correct update_entirely_ascii_p_flag to actually work.
lisp.h, symsinit.h: declarations for above changes.
author | ben |
---|---|
date | Sun, 14 Apr 2002 12:43:31 +0000 |
parents | 2b676dc88c66 |
children | 2b6fa2618f76 |
rev | line source |
---|---|
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 void wait_without_blocking (void); | |
48 | |
49 int get_pty_max_bytes (int fd); | |
665 | 50 Intbyte get_eof_char (int fd); |
428 | 51 |
52 /* Wait for subprocess with process id `pid' to terminate and | |
53 make sure it will get eliminated (not remain forever as a zombie) */ | |
54 void wait_for_termination (int pid); | |
55 | |
56 /* flush any pending output | |
57 * (may flush input as well; it does not matter the way we use it) | |
58 */ | |
59 void flush_pending_output (int channel); | |
60 | |
61 void child_setup_tty (int out); | |
62 | |
63 /* Suspend the Emacs process; give terminal to its superior. */ | |
64 void sys_suspend (void); | |
65 /* Suspend a process if possible; give terminal to its superior. */ | |
66 void sys_suspend_process (int process); | |
67 | |
68 void request_sigio (void); | |
69 void unrequest_sigio (void); | |
70 | |
71 void stop_interrupts (void); | |
72 void start_interrupts (void); | |
73 void slow_down_interrupts (void); | |
74 void speed_up_interrupts (void); | |
75 void init_poll_for_quit (void); | |
76 | |
77 /* Used so that signals can break out of system calls that aren't | |
78 naturally interruptible. */ | |
79 | |
80 extern JMP_BUF break_system_call_jump; | |
81 extern volatile int can_break_system_calls; | |
82 | |
83 /* Call these functions if you want to change some terminal parameter -- | |
84 reset the console, change the parameter, and init it again. */ | |
85 void init_one_console (struct console *c); | |
86 void reset_one_console (struct console *c); | |
87 void init_one_device (struct device *d); | |
88 void reset_one_device (struct device *d); | |
89 | |
90 /* Prepare all terminals for exiting Emacs; move the cursor to the | |
91 bottom of the frame, turn off special modes, etc. Called at exit. | |
92 This calls reset_one_console() on all consoles and does some other | |
93 stuff (e.g. fix the foreground pgroup). */ | |
94 | |
95 void reset_all_consoles (void); | |
96 | |
97 /* Call these functions if you are going to temporarily exit back to | |
98 the shell (e.g. when suspending). This calls reset_one_console() | |
99 on the initial console and does some other stuff (e.g. fix the | |
100 foreground pgroup). */ | |
101 | |
102 void reset_initial_console (void); | |
103 void reinit_initial_console (void); | |
104 | |
105 /* We muck around with our process group. This function needs | |
106 to be called at startup. The rest of the mucking is done as | |
107 part of the functions reset_all_consoles(), reset_initial_console(), | |
108 and reinit_initial_console(). */ | |
109 | |
110 void init_process_group (void); | |
111 void munge_tty_process_group (void); | |
112 void unmunge_tty_process_group (void); | |
113 | |
114 void disconnect_controlling_terminal (void); | |
115 | |
116 /* Return nonzero if safe to use tabs in output. | |
117 At the time this is called, init_sys_modes has not been done yet. */ | |
118 int tabs_safe_p (struct device *d); | |
119 | |
120 /* Get terminal size from system. | |
121 If zero or a negative number is stored, the value is not valid. */ | |
122 void get_tty_device_size (struct device *d, int *widthp, int *heightp); | |
123 /* Set the logical window size associated with descriptor FD */ | |
124 int set_window_size (int fd, int height, int width); | |
125 | |
126 /* Set up the proper status flags for use of a pty. */ | |
127 void setup_pty (int fd); | |
128 | |
129 /* Return the address of the start of the text segment prior to unexec. */ | |
130 char *start_of_text (void); | |
131 /* Return the address of the start of the data segment prior to unexec. */ | |
132 void *start_of_data (void); | |
133 | |
134 /* Get_system_name returns as its value a string for system-name to return. */ | |
135 void init_system_name (void); | |
136 | |
771 | 137 #ifdef WIN32_NATIVE |
138 void *sbrk (unsigned long increment); | |
428 | 139 #endif |
140 | |
801 | 141 Bytecount total_data_usage (void); |
142 | |
440 | 143 #endif /* INCLUDED_sysdep_h_ */ |