return Qnil;
}
\f
+void
syms_of_abbrev ()
{
DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list,
}
/* Explicitly free a float cell. */
+void
free_float (ptr)
struct Lisp_Float *ptr;
{
\f
/* Initialization */
+void
init_alloc_once ()
{
/* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */
#endif /* VIRT_ADDR_VARIES */
}
+void
init_alloc ()
{
gcprolist = 0;
#endif /* not MAXPATHLEN */
#include <config.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include "lisp.h"
#include "intervals.h"
#include "window.h"
};
static int
-compare_overlays (s1, s2)
- struct sortvec *s1, *s2;
+compare_overlays (v1, v2)
+ const void *v1, *v2;
{
+ const struct sortvec *s1 = (const struct sortvec *) v1;
+ const struct sortvec *s2 = (const struct sortvec *) v2;
if (s1->priority != s2->priority)
return s1->priority - s2->priority;
if (s1->beg != s2->beg)
type_name, XSYMBOL (sym)->name->data);
}
\f
+void
init_buffer_once ()
{
register Lisp_Object tem;
Fset_buffer (Fget_buffer_create (build_string ("*scratch*")));
}
+void
init_buffer ()
{
char buf[MAXPATHLEN+1];
}
/* initialize the buffer routines */
+void
syms_of_buffer ()
{
extern Lisp_Object Qdisabled;
defsubr (&Soverlay_put);
}
+void
keys_of_buffer ()
{
initial_define_key (control_x_map, 'b', "switch-to-buffer");
return v1;
}
+void
syms_of_bytecode ()
{
Qbytecode = intern ("byte-code");
return val;
}
+void
syms_of_callint ()
{
point_marker = Fmake_marker ();
\f
#ifndef VMS /* VMS version is in vmsproc.c. */
+static int relocate_fd ();
+
/* This is the last thing run in a newly forked inferior
either synchronous or asynchronous.
Copy descriptors IN, OUT and ERR as descriptors 0, 1 and 2.
a decent error from within the child, this should be verified as an
executable directory by the parent. */
+int
child_setup (in, out, err, new_argv, set_pgrp, current_dir)
int in, out, err;
register char **new_argv;
/* Move the file descriptor FD so that its number is not less than MINFD.
If the file descriptor is moved at all, the original is freed. */
-int
+static int
relocate_fd (fd, minfd)
int fd, minfd;
{
\f
/* This is run before init_cmdargs. */
+void
init_callproc_1 ()
{
char *data_dir = egetenv ("EMACSDATA");
/* This is run after init_cmdargs, when Vinstallation_directory is valid. */
+void
init_callproc ()
{
char *data_dir = egetenv ("EMACSDATA");
#endif
}
+void
set_process_environment ()
{
register char **envp;
Vprocess_environment);
}
+void
syms_of_callproc ()
{
#ifdef DOS_NT
/* flag is CASE_UP, CASE_DOWN or CASE_CAPITALIZE or CASE_CAPITALIZE_UP.
b and e specify range of buffer to operate on. */
+void
casify_region (flag, b, e)
enum case_action flag;
Lisp_Object b, e;
return Qnil;
}
\f
+void
syms_of_casefiddle ()
{
Qidentity = intern ("identity");
defsubr (&Scapitalize_word);
}
+void
keys_of_casefiddle ()
{
initial_define_key (control_x_map, Ctl('U'), "upcase-region");
}
}
\f
+void
init_casetab_once ()
{
register int i;
XCHAR_TABLE (down)->extras[2] = Fcopy_sequence (up);
}
+void
syms_of_casetab ()
{
Qcase_table_p = intern ("case-table-p");
}
\f
+void
init_category_once ()
{
/* This has to be done here, before we call Fmake_char_table. */
Fmake_vector (make_number (95), Qnil));
}
+void
syms_of_category ()
{
Qcategoryp = intern ("categoryp");
#ifdef emacs
#include <config.h>
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
#include "lisp.h"
#include "charset.h"
#include "ccl.h"
int ic; /* Instruction Counter. */
};
+int
ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
struct ccl_program *ccl;
unsigned char *source, *destination;
}
+void
syms_of_ccl ()
{
staticpro (&Vccl_program_table);
Use macro `STRING_CHAR (STR, LEN)' instead of calling this function
directly if STR can hold an ASCII character. */
+int
string_to_non_ascii_char (str, len, actual_len)
const unsigned char *str;
int len, *actual_len;
return -1. This should be used only in the macro SPLIT_STRING
which checks range of STR in advance. */
+int
split_non_ascii_string (str, len, charset, c1, c2)
register const unsigned char *str;
register unsigned char *c1, *c2;
/* Return a character unified with C (or a character made of CHARSET,
C1, and C2) in unification table TABLE. If no unification is found
in TABLE, return C. */
+int
unify_char (table, c, charset, c1, c2)
Lisp_Object table;
int c, charset, c1, c2;
convert C to a valid multibyte character, convert it based on
DEFAULT_NONASCII_INSERT_OFFSET which makes C a Latin-1 character. */
+int
unibyte_char_to_multibyte (c)
int c;
{
}
\f
+int
charset_id_internal (charset_name)
char *charset_name;
{
return Qnil;
}
+void
init_charset_once ()
{
int i, j, k;
#ifdef emacs
+void
syms_of_charset ()
{
Qascii = intern ("ascii");
int cost; /* sums up costs */
/* ARGSUSED */
+int
evalcost (c)
char c;
{
return c;
}
+int
cmputc (c)
char c;
{
* out of <sgtty.h>.)
*/
+void
cmcostinit ()
{
char *p;
* actually perform the motion.
*/
-static
+static int
calccost (srcy, srcx, dsty, dstx, doit)
{
register int deltay,
#define USELL 2
#define USECR 3
+void
cmgoto (row, col)
{
int homecost,
Used before copying into it the info on the actual terminal.
*/
+void
Wcm_clear ()
{
bzero (&Wcm, sizeof Wcm);
* Return -2 if size not specified.
*/
+int
Wcm_init ()
{
#if 0
#include "syntax.h"
#include "window.h"
#include "keyboard.h"
+#include "dispextern.h"
Lisp_Object Qkill_forward_chars, Qkill_backward_chars, Vblink_paren_function;
return 0. A value of 1 indicates this *might* not have been simple.
A value of 2 means this did things that call for an undo boundary. */
+int
internal_self_insert (c, noautofill)
int c;
int noautofill;
\f
/* module initialization */
+void
syms_of_cmds ()
{
Qkill_backward_chars = intern ("kill-backward-chars");
defsubr (&Sself_insert_command);
}
+void
keys_of_cmds ()
{
int n;
If the current block ends before any end-of-line, we may fail to
find all the necessary designations. */
+void
encode_designation_at_bol (coding, table, src, src_end, dstp)
struct coding_system *coding;
Lisp_Object table;
This function is called only when `coding->eol_type' is
CODING_EOL_CRLF or CODING_EOL_CR. */
+int
decode_eol (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
unsigned char *source, *destination;
`coding->mode & CODING_MODE_SELECTIVE_DISPLAY' is nonzero, code
'\r' in source text also means end-of-line. */
+int
encode_eol (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
unsigned char *source, *destination;
\f
/*** 8. Post-amble ***/
+void
init_coding_once ()
{
int i;
#ifdef emacs
+void
syms_of_coding ()
{
Qtarget_idx = intern ("target-idx");
return value;
}
+void
pure_write_error ()
{
error ("Attempt to modify read-only object");
Fsignal (Qarith_error, Qnil);
}
+void
init_data ()
{
/* Don't do this if just dumping out.
#include <rmsdef.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
/* The d_nameln member of a struct dirent includes the '\0' character
on some systems, but not on others. What's worse, you can't tell
at compile-time which one it will be, since it really depends on
return file_name_completion (file, directory, 1, 0);
}
+static int file_name_completion_stat ();
+
Lisp_Object
file_name_completion (file, dirname, all_flag, ver_flag)
Lisp_Object file, dirname;
return Fsignal (Qquit, Qnil);
}
+static int
file_name_completion_stat (dirname, dp, st_addr)
Lisp_Object dirname;
DIRENTRY *dp;
return Flist (sizeof(values) / sizeof(values[0]), values);
}
\f
+void
syms_of_dired ()
{
Qdirectory_files = intern ("directory-files");
#include <stdio.h>
#include <ctype.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "lisp.h"
#include "termchar.h"
#include "termopts.h"
#include "indent.h"
#include "intervals.h"
#include "blockinput.h"
+#include "process.h"
+#include "keyboard.h"
/* I don't know why DEC Alpha OSF1 fail to compile this file if we
include the following file. */
return Qnil;
}
+void
redraw_frame (f)
FRAME_PTR f;
{
int empty;
{
register int i;
- register width = FRAME_WINDOW_WIDTH (frame);
- register height = FRAME_HEIGHT (frame);
+ register int width = FRAME_WINDOW_WIDTH (frame);
+ register int height = FRAME_HEIGHT (frame);
register struct frame_glyphs *new
= (struct frame_glyphs *) xmalloc (sizeof (struct frame_glyphs));
/* cancel_line eliminates any request to display a line at position `vpos' */
+void
cancel_line (vpos, frame)
int vpos;
register FRAME_PTR frame;
FRAME_DESIRED_GLYPHS (frame)->enable[vpos] = 0;
}
+void
clear_frame_records (frame)
register FRAME_PTR frame;
{
into the FRAME_DESIRED_GLYPHS (frame) from the FRAME_PHYS_GLYPHS (frame)
so that update_frame will not change those columns. */
+void
preserve_other_columns (w)
struct window *w;
{
for internal consistency. We cannot check that they are "right";
we can only look for something nonsensical. */
+void
verify_charstarts (w)
struct window *w;
{
cancel the columns of that window, so that when the window is
displayed over again get_display_line will not complain. */
+void
cancel_my_columns (w)
struct window *w;
{
register int i;
int pause;
int preempt_count = baud_rate / 2400 + 1;
- extern input_pending;
+ extern int input_pending;
#ifdef HAVE_WINDOW_SYSTEM
register int downto, leftmost;
#endif
extern void scrolling_1 ();
+int
scrolling (frame)
FRAME_PTR frame;
{
olen = nlen - (nsp - osp);
}
cursor_to (vpos, osp);
- insert_glyphs ((char *)0, nsp - osp);
+ insert_glyphs ((GLYPH *) 0, nsp - osp);
}
olen += nsp - osp;
/* Do any change in frame size that was requested by a signal. */
+void
do_pending_window_change ()
{
/* If window_change_signal should have run before, run it now. */
redisplay. Since this tries to resize windows, we can't call it
from a signal handler. */
+void
change_frame_size (f, newheight, newwidth, pretend, delay)
register FRAME_PTR f;
- int newheight, newwidth, pretend;
+ int newheight, newwidth, pretend, delay;
{
Lisp_Object tail, frame;
return Qnil;
}
+void
bitch_at_user ()
{
if (noninteractive)
/* Then invoke its decoding routine to set up variables
in the terminal package */
+void
init_display ()
{
#ifdef HAVE_X_WINDOWS
#endif /* SIGWINCH */
}
\f
+void
syms_of_display ()
{
defsubr (&Sredraw_frame);
RETURN_UNGCPRO (tem);
}
\f
+void
syms_of_doc ()
{
DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name,
String arguments are passed as C strings.
Integers are passed as C integers. */
+int
doprnt (buffer, bufsize, format, format_end, nargs, args)
char *buffer;
register int bufsize;
/* Like doprnt except that strings in ARGS are passed
as Lisp_Object. */
+int
doprnt_lisp (buffer, bufsize, format, format_end, nargs, args)
char *buffer;
register int bufsize;
#include <pwd.h>
#endif
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "lisp.h"
#include "intervals.h"
#include "buffer.h"
#include "blockinput.h"
#include "syssignal.h"
#include "process.h"
+#include "keyboard.h"
#ifdef HAVE_SETRLIMIT
#include <sys/time.h>
int initial_argc;
static void sort_args ();
+void syms_of_emacs ();
\f
/* Signal code for the fatal signal that was received */
int fatal_error_code;
\f
/* Code for dealing with Lisp access to the Unix command line */
-static
+static void
init_cmdargs (argc, argv, skip_args)
int argc;
char **argv;
(We don't have any real constructors or destructors.) */
#ifdef __GNUC__
#ifndef GCC_CTORS_IN_LIBC
-__do_global_ctors ()
+void __do_global_ctors ()
{}
-__do_global_ctors_aux ()
+void __do_global_ctors_aux ()
{}
-__do_global_dtors ()
+void __do_global_dtors ()
{}
/* Linux has a bug in its library; avoid an error. */
#ifndef LINUX
#endif
char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
#endif /* GCC_CTORS_IN_LIBC */
-__main ()
+void __main ()
{}
#endif /* __GNUC__ */
#endif /* ORDINARY_LINK */
}
/* ARGSUSED */
+int
main (argc, argv, envp)
int argc;
char **argv;
char stack_bottom_variable;
int skip_args = 0;
extern int errno;
- extern sys_nerr;
+ extern int sys_nerr;
#ifdef HAVE_SETRLIMIT
struct rlimit rlim;
#endif
#ifdef DOUG_LEA_MALLOC
if (initialized)
{
+ extern void r_alloc_reinit ();
malloc_set_state (malloc_state_ptr);
free (malloc_state_ptr);
r_alloc_reinit ();
return Fnreverse (lpath);
}
+void
syms_of_emacs ()
{
Qfile_name_handler_alist = intern ("file-name-handler-alist");
#include <config.h>
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
#include "lisp.h"
#include "blockinput.h"
Lisp_Object funcall_lambda ();
extern Lisp_Object ml_apply (); /* Apply a mocklisp function to unevaluated argument list */
+void
init_eval_once ()
{
specpdl_size = 50;
Vrun_hooks = Qnil;
}
+void
init_eval ()
{
specpdl_ptr = specpdl;
return apply1 (Vdebugger, arg);
}
+void
do_debug_on_call (code)
Lisp_Object code;
{
}
}
\f
+void
syms_of_eval ()
{
DEFVAR_INT ("max-specpdl-size", &max_specpdl_size,
* Value is nonzero if the string output is different from the input.
*/
+int
directory_file_name (src, dst)
char *src, *dst;
{
}
*annot = Fcdr (*annot);
}
+ return 0;
}
#ifndef WRITE_BUF_SIZE
return val;
}
\f
+void
syms_of_fileio ()
{
Qexpand_file_name = intern ("expand-file-name");
#include <sys/types.h>
#include <sys/stat.h>
+#include <signal.h>
#include <config.h>
#ifdef VMS
#include <string.h>
#endif /* USG */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "lisp.h"
#include "buffer.h"
\f
/* Initialization functions. */
+void
syms_of_filelock ()
{
defsubr (&Sunlock_buffer);
}
#endif /* HAVE_MATHERR */
+void
init_floatfns ()
{
#ifdef FLOAT_CATCH_SIGILL
#endif /* not LISP_FLOAT_TYPE */
+void
syms_of_floatfns ()
{
#ifdef LISP_FLOAT_TYPE
#include <config.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
/* Note on some machines this defines `vector' as a typedef,
so make sure we don't use that name in this file. */
#undef vector
#include "intervals.h"
#include "frame.h"
#include "window.h"
+#ifdef HAVE_MENUS
+#include "xterm.h"
+#endif
#ifndef NULL
#define NULL (void *)0
asked by mouse commands. */
int use_dialog_box;
-extern Lisp_Object Flookup_key ();
-
extern int minibuffer_auto_raise;
extern Lisp_Object minibuf_window;
return result;
}
\f
+void
syms_of_fns ()
{
Qstring_lessp = intern ("string-lessp");
return Qnil;
}
-Lisp_Object Fframe_char_width ();
-
/* Return a list of names of available fontsets matching PATTERN on
frame F. If SIZE is not 0, it is the size (maximum bound width) of
fontsets to be listed. */
return Qnil;
}
-extern Lisp_Object Fframe_parameters ();
extern Lisp_Object Qfont;
Lisp_Object Qfontset;
return info;
}
+void
syms_of_fontset ()
{
int i;
#include "charset.h"
#ifdef HAVE_WINDOW_SYSTEM
#include "fontset.h"
+#include "xterm.h"
#endif
#include "frame.h"
#include "termhooks.h"
+#include "dispextern.h"
#include "window.h"
#ifdef MSDOS
#include "msdos.h"
}
\f
+void
syms_of_frame ()
{
syms_of_frame_1 ();
defsubr (&Sset_frame_position);
}
+void
keys_of_frame ()
{
initial_define_lispy_key (global_map, "switch-frame", "handle-switch-frame");
}
\f
+static int position_indentation P_ ((int));
+
DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation,
0, 0, 0,
"Return the indentation of the current line.\n\
\f
/* file's initialization. */
+void
syms_of_indent ()
{
DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode,
#include "charset.h"
#include "window.h"
#include "blockinput.h"
+#include "region-cache.h"
#ifndef NULL
#define NULL 0
void
insert (string, nbytes)
register unsigned char *string;
- register nbytes;
+ register int nbytes;
{
if (nbytes > 0)
{
void
insert_and_inherit (string, nbytes)
register unsigned char *string;
- register nbytes;
+ register int nbytes;
{
if (nbytes > 0)
{
return unbind_to (count, val);
}
\f
+void
syms_of_insdel ()
{
staticpro (&combine_after_change_list);
INTERVAL i0, i1;
{
register Lisp_Object i0_cdr, i0_sym, i1_val;
- register i1_len;
+ register int i1_len;
if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1))
return 1;
register INTERVAL interval;
{
register INTERVAL i;
- register position_of_previous;
+ register int position_of_previous;
if (NULL_INTERVAL_P (interval))
return NULL_INTERVAL;
static void record_menu_key ();
-void swallow_events ();
-
Lisp_Object Qpolling_period;
/* List of absolute timers. Appears in order of next scheduled event. */
static Lisp_Object modify_event_symbol ();
static Lisp_Object make_lispy_switch_frame ();
static int parse_solitary_modifier ();
+static void save_getcjmp ();
+static void restore_getcjmp ();
/* > 0 if we are to echo keystrokes. */
static int echo_keystrokes;
so that it serves as a prompt for the next character.
Also start echoing. */
+void
echo_prompt (str)
char *str;
{
C can be a character, which is printed prettily ("M-C-x" and all that
jazz), or a symbol, whose name is printed. */
+void
echo_char (c)
Lisp_Object c;
{
/* Temporarily add a dash to the end of the echo string if it's not
empty, so that it serves as a mini-prompt for the very next character. */
+void
echo_dash ()
{
if (!current_kboard->immediate_echo
/* Turn off echoing, for the start of a new command. */
+void
cancel_echoing ()
{
current_kboard->immediate_echo = 0;
/* Make an auto save happen as soon as possible at command level. */
+void
force_auto_save_soon ()
{
last_auto_save = - auto_save_interval - 1;
in case get_char is called recursively.
See read_process_output. */
+static void
save_getcjmp (temp)
jmp_buf temp;
{
bcopy (getcjmp, temp, sizeof getcjmp);
}
+static void
restore_getcjmp (temp)
jmp_buf temp;
{
\f
/* Return nonzero if input events are pending. */
+int
detect_input_pending ()
{
if (!input_pending)
/* Return nonzero if input events are pending, and run any pending timers. */
+int
detect_input_pending_run_timers (do_display)
int do_display;
{
The problem is, kbd_buffer_get_event needs to be fixed to know what
to do in that case. It isn't trivial. */
+int
requeued_events_pending_p ()
{
return (!NILP (Vunread_command_events) || unread_command_char != -1);
#endif /* BSD_SYSTEM and not BSD4_1 */
}
\f
+void
set_waiting_for_input (time_to_clear)
EMACS_TIME *time_to_clear;
{
}
#endif
+void
init_keyboard ()
{
/* This is correct before outermost invocation of the editor loop */
&Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible,
};
+void
syms_of_keyboard ()
{
staticpro (&item_properties);
Vtimer_idle_list = Qnil;
}
+void
keys_of_keyboard ()
{
initial_define_key (global_map, Ctl ('Z'), "suspend-emacs");
#include <config.h>
#include <stdio.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
#undef NULL
#include "lisp.h"
#include "commands.h"
static Lisp_Object describe_buffer_bindings ();
static void describe_command (), describe_translation ();
static void describe_map ();
-Lisp_Object Fcopy_keymap ();
\f
/* Keymap object support - constructors and predicates. */
return apropos_accumulate;
}
\f
+void
syms_of_keymap ()
{
Lisp_Object tem;
defsubr (&Sapropos_internal);
}
+void
keys_of_keymap ()
{
Lisp_Object tem;
static int byte_debug_flag;
+void
clear_charpos_cache (b)
struct buffer *b;
{
}
\f
+void
syms_of_mocklisp ()
{
Qmocklisp = intern ("mocklisp");
#include <stdio.h>
+int
main (argc, argv)
int argc;
char **argv;
Lisp_Object
internal_with_output_to_temp_buffer (bufname, function, args)
char *bufname;
- Lisp_Object (*function) ();
+ Lisp_Object (*function) P_ ((Lisp_Object));
Lisp_Object args;
{
int count = specpdl_ptr - specpdl;
#include "commands.h"
#include "frame.h"
#include "blockinput.h"
+#include "keyboard.h"
+#include "dispextern.h"
#define max(a, b) ((a) > (b) ? (a) : (b))
Lisp_Object status_convert ();
+void
update_status (p)
struct Lisp_Process *p;
{
allocate_pty ()
{
struct stat stb;
- register c, i;
+ register int c, i;
int fd;
/* Some systems name their pseudoterminals so that there are gaps in
return val;
}
+void
remove_process (proc)
register Lisp_Object proc;
{
static int waiting_for_user_input_p;
/* This is here so breakpoints can be put on it. */
-static
+static void
wait_reading_process_input_1 ()
{
}
before the timeout elapsed.
Otherwise, return true iff we received input from any process. */
+int
wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
int time_limit, microsecs;
Lisp_Object read_kbd;
The characters read are decoded according to PROC's coding-system
for decoding. */
+int
read_process_output (proc, channel)
Lisp_Object proc;
register int channel;
being encoded. Should we store them in a buffer to prepend them to
the data send later? */
+void
send_process (proc, buf, len, object)
volatile Lisp_Object proc;
unsigned char *buf;
return 0;
}
\f
+void
init_process ()
{
register int i;
bzero (proc_encode_coding_system, sizeof proc_encode_coding_system);
}
+void
syms_of_process ()
{
Qprocessp = intern ("processp");
bcopy (current_frame->glyphs, temp_frame->glyphs,
current_frame->height * sizeof (GLYPH *));
bcopy (current_frame->charstarts, temp_frame->charstarts,
- current_frame->height * sizeof (GLYPH *));
+ current_frame->height * sizeof (int *));
bcopy (current_frame->used, temp_frame->used,
current_frame->height * sizeof (int));
bcopy (current_frame->highlight, temp_frame->highlight,
These are the same arguments that might be given to
scroll_frame_lines to perform this scrolling. */
+int
scroll_cost (frame, from, to, amount)
FRAME_PTR frame;
int from, to, amount;
Deletion is essentially the same as insertion.
*/
+void
do_line_insertion_deletion_costs (frame,
ins_line_string, multi_ins_string,
del_line_string, multi_del_string,
#include <config.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
#include "lisp.h"
#include "syntax.h"
#include "category.h"
If ALLOW_QUIT is non-zero, set immediate_quit. That's good to do
except when inside redisplay. */
+int
scan_buffer (target, start, end, count, shortage, allow_quit)
register int target;
int start, end;
STRING_MULTIBYTE (string));
}
\f
+void
syms_of_search ()
{
register int i;
If that many words cannot be found before the end of the buffer, return 0.
COUNT negative means scan backward and stop at word beginning. */
+int
scan_words (from, count)
register int from, count;
{
Qnil)))))))));
}
\f
+void
init_syntax_once ()
{
register int i, c;
}
}
+void
syms_of_syntax ()
{
Qsyntax_table_p = intern ("syntax-table-p");
/* Arrange for character C to be read as the next input from
the terminal. */
+void
stuff_char (c)
char c;
{
}
/*ARGSUSED*/
+void
set_exclusive_use (fd)
int fd;
{
When we are in the foreground, but not started in our own process
group, redirect the TTY to point to our own process group. We need
to be in our own process group to receive SIGIO properly. */
+void
narrow_foreground_group ()
{
int me = getpid ();
}
/* Set the tty to our original foreground group. */
+void
widen_foreground_group ()
{
if (inherited_pgroup != getpid ())
/* Return nonzero if safe to use tabs in output.
At the time this is called, init_sys_modes has not been done yet. */
+int
tabs_safe_p ()
{
struct emacs_tty tty;
This is called each time Emacs is resumed, also, but does nothing
because input_chain is no longer zero. */
+void
init_vms_input ()
{
int status;
/* Deassigning the input channel is done before exiting. */
+void
stop_vms_input ()
{
return SYS$DASSGN (input_fd);
/* Request reading one character into the keyboard buffer.
This is done as soon as the buffer becomes empty. */
+void
queue_kbd_input ()
{
int status;
/* Ast routine that is called when keyboard input comes in
in accord with the SYS$QIO above. */
+void
kbd_input_ast ()
{
register int c = -1;
/* Wait until there is something in kbd_buffer. */
+void
wait_for_kbd_input ()
{
extern int have_process_input, process_exited;
and therefore there is no I/O request queued when we return.
SYS$SETAST is used to avoid a timing error. */
+void
end_kbd_input ()
{
#ifdef ASTDEBUG
/* Wait for either input available or time interval expiry. */
+void
input_wait_timeout (timeval)
int timeval; /* Time to wait, in seconds */
{
#define BUFFER_SIZE_FACTOR 1
#endif
+void
read_input_waiting ()
{
struct input_event e;
ioctl (fd, TIOCLSET, &lmode);
}
+void
reset_sigio ()
{
if (noninteractive)
int sigheld; /* Mask of held signals */
+void
sigholdx (signum)
int signum;
{
sighold (signum);
}
+void
sigisheld (signum)
int signum;
{
sigheld |= sigbit (signum);
}
+void
sigunhold (signum)
int signum;
{
sigrelse (signum);
}
+void
sigfree () /* Free all held signals */
{
int i;
sigheld = 0;
}
+int
sigbit (i)
{
return 1 << (i - 1);
sigset_t empty_mask, full_mask;
+void
init_signals ()
{
sigemptyset (&empty_mask);
#ifdef INTERRUPTIBLE_CLOSE
+int
sys_close (fd)
int fd;
{
#ifdef HAVE_TIMEVAL
/* ARGSUSED */
+int
gettimeofday (tp, tzp)
struct timeval *tp;
struct timezone *tzp;
tp->tv_usec = 0;
if (tzp != 0)
tzp->tz_minuteswest = -1;
+ return 0;
}
#endif
* This function will go away as soon as all the stubs fixed. (fnf)
*/
+void
croak (badfunc)
char *badfunc;
{
/* Called from init_sys_modes, so it happens not very often
but at least each time Emacs is loaded. */
+void
sys_access_reinit ()
{
uic = 0;
return pathname;
}
+int
getppid ()
{
long item_code = JPI$_OWNER;
#endif
#endif
+int
sys_creat (va_alist)
va_dcl
{
#endif /* creat */
/* fwrite to stdout is S L O W. Speed it up by using fputc...*/
+int
sys_fwrite (ptr, size, num, fp)
register char * ptr;
FILE * fp;
while (tot--)
fputc (*ptr++, fp);
+ return num;
}
/*
/* return total address space available to the current process. This is
the sum of the current p0 size, p1 size and free page table entries
available. */
+int
vlimit ()
{
int item_code;
return free_pages + frep0va + (0x7fffffff - frep1va);
}
+int
define_logical_name (varname, string)
char *varname;
char *string;
return LIB$SET_LOGICAL (&envdsc, &strdsc, &lnmdsc, 0, 0);
}
+int
delete_logical_name (varname)
char *varname;
{
return LIB$DELETE_LOGICAL (&envdsc, &lnmdsc);
}
+int
ulimit ()
-{}
+{
+ return 0;
+}
+int
setpgrp ()
-{}
+{
+ return 0;
+}
+int
execvp ()
{
error ("execvp system call not implemented");
+ return -1;
}
int
return 0;
}
+int
link (file, new)
char * file, * new;
{
return 0;
}
+void
croak (badfunc)
char *badfunc;
{
return rand () - (1 << 30);
}
+void
srandom (seed)
{
srand (seed);
#ifdef AIXHFT
/* Called from init_sys_modes. */
+void
hft_init ()
{
int junk;
/* Reset the rubout key to backspace. */
+void
hft_reset ()
{
struct hfbuf buf;
*b2++ = *b1++;
#endif /* not VMS */
}
-#endif /* (defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */
+#endif /* (!defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */
#ifndef BSTRING
#ifndef bcmp
#include "disptab.h"
#include "termhooks.h"
#include "keyboard.h"
-
-extern Lisp_Object Fmake_sparse_keymap ();
+#include "dispextern.h"
+#ifdef HAVE_X_WINDOWS
+#include "xterm.h"
+#endif
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
/* Hook functions that you can set to snap out the functions in this file.
These are all extern'd in termhooks.h */
-int (*cursor_to_hook) ();
-int (*raw_cursor_to_hook) ();
+void (*cursor_to_hook) P_ ((int, int));
+void (*raw_cursor_to_hook) P_ ((int, int));
-int (*clear_to_end_hook) ();
-int (*clear_frame_hook) ();
-int (*clear_end_of_line_hook) ();
+void (*clear_to_end_hook) P_ ((void));
+void (*clear_frame_hook) P_ ((void));
+void (*clear_end_of_line_hook) P_ ((int));
-int (*ins_del_lines_hook) ();
+void (*ins_del_lines_hook) P_ ((int, int));
-int (*change_line_highlight_hook) ();
-int (*reassert_line_highlight_hook) ();
+void (*change_line_highlight_hook) P_ ((int, int, int));
+void (*reassert_line_highlight_hook) P_ ((int, int));
-int (*insert_glyphs_hook) ();
-int (*write_glyphs_hook) ();
-int (*delete_glyphs_hook) ();
+void (*insert_glyphs_hook) P_ ((GLYPH *, int));
+void (*write_glyphs_hook) P_ ((GLYPH *, int));
+void (*delete_glyphs_hook) P_ ((int));
-int (*ring_bell_hook) ();
+void (*ring_bell_hook) P_ ((void));
-int (*reset_terminal_modes_hook) ();
-int (*set_terminal_modes_hook) ();
-int (*update_begin_hook) ();
-int (*update_end_hook) ();
-int (*set_terminal_window_hook) ();
+void (*reset_terminal_modes_hook) P_ ((void));
+void (*set_terminal_modes_hook) P_ ((void));
+void (*update_begin_hook) P_ ((struct frame *));
+void (*update_end_hook) P_ ((struct frame *));
+void (*set_terminal_window_hook) P_ ((int));
-int (*read_socket_hook) ();
+int (*read_socket_hook) P_ ((int, struct input_event *, int, int));
-int (*frame_up_to_date_hook) ();
+void (*frame_up_to_date_hook) P_ ((struct frame *));
/* Return the current position of the mouse.
This should clear mouse_moved until the next motion
event arrives. */
-void (*mouse_position_hook) ( /* FRAME_PTR *f, int insist,
+void (*mouse_position_hook) P_ ((FRAME_PTR *f, int insist,
Lisp_Object *bar_window,
enum scroll_bar_part *part,
Lisp_Object *x,
Lisp_Object *y,
- unsigned long *time */ );
+ unsigned long *time));
/* When reading from a minibuffer in a different frame, Emacs wants
to shift the highlight from the selected frame to the minibuffer's
frame; under X, this means it lies about where the focus is.
This hook tells the window system code to re-decide where to put
the highlight. */
-void (*frame_rehighlight_hook) ( /* FRAME_PTR f */ );
+void (*frame_rehighlight_hook) P_ ((FRAME_PTR f));
/* If we're displaying frames using a window system that can stack
frames on top of each other, this hook allows you to bring a frame
If RAISE is non-zero, F is brought to the front, before all other
windows. If RAISE is zero, F is sent to the back, behind all other
windows. */
-void (*frame_raise_lower_hook) ( /* FRAME_PTR f, int raise */ );
+void (*frame_raise_lower_hook) P_ ((FRAME_PTR f, int raise));
/* Set the vertical scroll bar for WINDOW to have its upper left corner
at (TOP, LEFT), and be LENGTH rows high. Set its handle to
of WHOLE characters, starting at POSITION. If WINDOW doesn't yet
have a scroll bar, create one for it. */
void (*set_vertical_scroll_bar_hook)
- ( /* struct window *window,
- int portion, int whole, int position */ );
+ P_ ((struct window *window,
+ int portion, int whole, int position));
/* The following three hooks are used when we're doing a thorough
If non-zero, this hook should be safe to apply to any frame,
whether or not it can support scroll bars, and whether or not it is
currently displaying them. */
-void (*condemn_scroll_bars_hook)( /* FRAME_PTR *frame */ );
+void (*condemn_scroll_bars_hook) P_ ((FRAME_PTR frame));
/* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
Note that it's okay to redeem a scroll bar that is not condemned. */
-void (*redeem_scroll_bar_hook)( /* struct window *window */ );
+void (*redeem_scroll_bar_hook) P_ ((struct window *window));
/* Remove all scroll bars on FRAME that haven't been saved since the
last call to `*condemn_scroll_bars_hook'.
If non-zero, this hook should be safe to apply to any frame,
whether or not it can support scroll bars, and whether or not it is
currently displaying them. */
-void (*judge_scroll_bars_hook)( /* FRAME_PTR *FRAME */ );
+void (*judge_scroll_bars_hook) P_ ((FRAME_PTR FRAME));
/* Strings, numbers and flags taken from the termcap entry. */
#define FRAME_TERMCAP_P(_f_) 0
#endif /* WINDOWSNT */
+void
ring_bell ()
{
if (! NILP (Vring_bell_function))
OUTPUT (TS_visible_bell && visible_bell ? TS_visible_bell : TS_bell);
}
+void
set_terminal_modes ()
{
if (! FRAME_TERMCAP_P (selected_frame))
losecursor ();
}
+void
reset_terminal_modes ()
{
if (! FRAME_TERMCAP_P (selected_frame))
cmputc ('\r');
}
+void
update_begin (f)
FRAME_PTR f;
{
(*update_begin_hook) (f);
}
+void
update_end (f)
FRAME_PTR f;
{
updating_frame = 0;
}
+void
set_terminal_window (size)
int size;
{
set_scroll_region (0, specified_window);
}
+void
set_scroll_region (start, stop)
int start, stop;
{
losecursor ();
}
\f
+void
turn_on_insert ()
{
if (!insert_mode)
insert_mode = 1;
}
+void
turn_off_insert ()
{
if (insert_mode)
These functions are called on all terminals, but do nothing
on terminals whose standout mode does not work that way. */
+void
turn_off_highlight ()
{
if (TN_standout_width < 0)
}
}
+void
turn_on_highlight ()
{
if (TN_standout_width < 0)
empty space inside windows. What this is,
depends on the user option inverse-video. */
+void
background_highlight ()
{
if (TN_standout_width >= 0)
/* Set standout mode to the mode specified for the text to be output. */
-static
+static void
highlight_if_desired ()
{
if (TN_standout_width >= 0)
/* Write a standout marker or end-standout marker at the front of the line
at vertical position vpos. */
+void
write_standout_marker (flag, vpos)
int flag, vpos;
{
Call this when about to modify line at position VPOS
and not change whether it is highlighted. */
+void
reassert_line_highlight (highlight, vpos)
int highlight;
int vpos;
/* Call this when about to modify line at position VPOS
and change whether it is highlighted. */
+void
change_line_highlight (new_highlight, vpos, first_unused_hpos)
int new_highlight, vpos, first_unused_hpos;
{
/* Move to absolute position, specified origin 0 */
+void
cursor_to (row, col)
int row, col;
{
/* Similar but don't take any account of the wasted characters. */
+void
raw_cursor_to (row, col)
int row, col;
{
/* Erase operations */
/* clear from cursor to end of frame */
+void
clear_to_end ()
{
register int i;
/* Clear entire frame */
+void
clear_frame ()
{
if (clear_frame_hook
Note that the cursor may be moved. */
+void
clear_end_of_line (first_unused_hpos)
int first_unused_hpos;
{
Note that the cursor may be moved, on terminals lacking a `ce' string. */
+void
clear_end_of_line_raw (first_unused_hpos)
int first_unused_hpos;
{
}
+void
write_glyphs (string, len)
register GLYPH *string;
register int len;
/* If start is zero, insert blanks instead of a string at start */
+void
insert_glyphs (start, len)
register GLYPH *start;
register int len;
cmcheckmagic ();
}
+void
delete_glyphs (n)
register int n;
{
\f
/* Insert N lines at vpos VPOS. If N is negative, delete -N lines. */
+void
ins_del_lines (vpos, n)
int vpos, n;
{
if (TN_standout_width >= 0)
{
- register lower_limit
+ register int lower_limit
= (scroll_region_ok
? specified_window
: FRAME_HEIGHT (selected_frame));
*p++ = (ins_startup_cost += ins_cost_per_char);
}
-extern do_line_insertion_deletion_costs ();
-
+void
calculate_costs (frame)
FRAME_PTR frame;
{
}
\f
+void
term_init (terminal_type)
char *terminal_type;
{
}
/* VARARGS 1 */
+void
fatal (str, arg1, arg2)
char *str, *arg1, *arg2;
{
exit (1);
}
+void
syms_of_term ()
{
DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo,
#endif
#endif
-static buffer[512];
-
/* Interface to curses/terminfo library.
Turns out that all of the terminfo-level routines look
like their termcap counterparts except for tparm, which replaces
return unbind_to (count, list);
}
+void
syms_of_undo ()
{
Qinhibit_read_only = intern ("inhibit-read-only");
#include "xterm.h"
#include "frame.h"
+#include "window.h"
#include "dispextern.h"
#include "blockinput.h"
SET_FRAME_GARBAGED (f);
}
\f
+void
widget_store_internal_border (widget)
Widget widget;
{
#include "disptab.h"
#include "keyboard.h"
#include "blockinput.h"
+#include "dispextern.h"
+#ifdef HAVE_WINDOW_SYSTEM
+#include "xterm.h"
+#endif
Lisp_Object Qwindowp, Qwindow_live_p;
\f
/* Record info on buffer window w is displaying
when it is about to cease to display that buffer. */
-static
+static void
unshow_buffer (w)
register struct window *w;
{
}
/* Put replacement into the window structure in place of old. */
-static
+static void
replace_window (old, replacement)
Lisp_Object old, replacement;
{
}
}
\f
-static
+static void
make_dummy_parent (window)
Lisp_Object window;
{
return Qnil;
}
\f
+void
init_window_once ()
{
selected_frame = make_terminal_frame ();
window_initialized = 1;
}
+void
syms_of_window ()
{
staticpro (&Qwindow_configuration_change_hook);
defsubr (&Scompare_window_configurations);
}
+void
keys_of_window ()
{
initial_define_key (control_x_map, '1', "delete-other-windows");
#include "keyboard.h"
#include "coding.h"
#include "process.h"
+#include "region-cache.h"
+
+#ifdef HAVE_WINDOW_SYSTEM
+#include "xterm.h"
+#endif
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
extern void set_frame_menubar ();
}
/* initialize the window system */
+void
init_xdisp ()
{
Lisp_Object root_window;
/* Use the mouse's current position. */
FRAME_PTR new_f = selected_frame;
Lisp_Object bar_window;
- int part;
+ enum scroll_bar_part part;
unsigned long time;
if (mouse_position_hook)
passing it to the toolkit right away, is that we can safely
execute Lisp code. */
+void
x_activate_menubar (f)
FRAME_PTR f;
{
#endif /* HAVE_MENUS */
\f
+void
syms_of_xmenu ()
{
staticpro (&menu_items);
#include <config.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <paths.h>
#include <stdio.h>
#define malloc xmalloc
#define realloc xrealloc
#define free xfree
+extern long *xmalloc (), *xrealloc ();
#endif
char *x_get_string_resource ();
#include "buffer.h"
#include "charset.h"
#include "coding.h"
+#include "process.h"
#define CUT_BUFFER_SUPPORT
#include "window.h"
#include "keyboard.h"
#include "intervals.h"
+#include "process.h"
#ifdef USE_X_TOOLKIT
#include <X11/Shell.h>
is the frame to apply to. */
extern struct frame *updating_frame;
-extern waiting_for_input;
+extern int waiting_for_input;
/* This is a frame waiting to be autoraised, within XTread_socket. */
struct frame *pending_autoraise_frame;
static void show_mouse_face ();
static void do_line_dance ();
-static int XTcursor_to ();
-static int XTclear_end_of_line ();
+static void XTcursor_to ();
+static void XTclear_end_of_line ();
static int x_io_error_quitter ();
int x_catch_errors ();
void x_uncatch_errors ();
should never be called except during an update, the only exceptions
being XTcursor_to, XTwrite_glyphs and XTreassert_line_highlight. */
-static
+static void
XTupdate_begin (f)
struct frame *f;
{
UNBLOCK_INPUT;
}
-static
+static void
XTupdate_end (f)
struct frame *f;
{
/* This is called after a redisplay on frame F. */
-static
+static void
XTframe_up_to_date (f)
FRAME_PTR f;
{
Call this when about to modify line at position VPOS
and not change whether it is highlighted. */
+void
XTreassert_line_highlight (new, vpos)
int new, vpos;
{
/* Call this when about to modify line at position VPOS
and change whether it is highlighted. */
-static
+static void
XTchange_line_highlight (new_highlight, vpos, first_unused_hpos)
int new_highlight, vpos, first_unused_hpos;
{
When starting Emacs, no X window is mapped. And nothing must be done
to Emacs's own window if it is suspended (though that rarely happens). */
-static
+static void
XTset_terminal_modes ()
{
}
Exiting will make the X-windows go away, and suspending
requires no action. */
-static
+static void
XTreset_terminal_modes ()
{
/* XTclear_frame (); */
This is where display update commands will take effect.
This does not affect the place where the cursor-box is displayed. */
-static int
+static void
XTcursor_to (row, col)
register int row, col;
{
`highlight', set up by XTreassert_line_highlight or XTchange_line_highlight,
controls the pixel values used for foreground and background. */
-static
+static void
XTwrite_glyphs (start, len)
register GLYPH *start;
int len;
to column FIRST_UNUSED (exclusive). The idea is that everything
from FIRST_UNUSED onward is already erased. */
-static
+static void
XTclear_end_of_line (first_unused)
register int first_unused;
{
UNBLOCK_INPUT;
}
-static
+static void
XTclear_frame ()
{
int mask;
return x.tv_sec < y.tv_sec;
}
+void
XTflash (f)
struct frame *f;
{
#define XRINGBELL XBell (FRAME_X_DISPLAY (selected_frame), 0)
+void
XTring_bell ()
{
if (FRAME_X_DISPLAY (selected_frame) == 0)
These are not supposed to be used because we are supposed to turn
off the feature of using them. */
-static
+static void
XTinsert_glyphs (start, len)
register char *start;
register int len;
abort ();
}
-static
+static void
XTdelete_glyphs (n)
register int n;
{
This, and those operations, are used only within an update
that is bounded by calls to XTupdate_begin and XTupdate_end. */
-static
+static void
XTset_terminal_window (n)
register int n;
{
/* Perform an insert-lines or delete-lines operation,
inserting N lines or deleting -N lines at vertical position VPOS. */
+void
XTins_del_lines (vpos, n)
int vpos, n;
{
/* Just discard the mouse face information for frame F, if any.
This is used when the size of F is changed. */
+void
cancel_mouse_face (f)
FRAME_PTR f;
{
Clear out the scroll bars, and ask for expose events, so we can
redraw them. */
+void
x_scroll_bar_clear (f)
FRAME_PTR f;
{
if (! x_window_to_frame (dpyinfo, event.xselection.requestor))
goto OTHER;
#endif /* not USE_X_TOOLKIT */
- x_handle_selection_notify (&event);
+ x_handle_selection_notify (&event.xselection);
break;
case SelectionClear: /* Someone has grabbed ownership. */
if (!x_any_window_to_frame (dpyinfo, event.xproperty.window))
goto OTHER;
#endif /* not USE_X_TOOLKIT */
- x_handle_property_notify (&event);
+ x_handle_property_notify (&event.xproperty);
break;
case ReparentNotify:
/* Display the cursor on frame F, or clear it, according to ON.
Also set the frame's cursor position to X and Y. */
+void
x_display_cursor (f, on, x, y)
struct frame *f;
int on;
/* Display the cursor on frame F, or clear it, according to ON.
Don't change the cursor's position. */
+void
x_update_cursor (f, on)
struct frame *f;
int on;
/* Refresh bitmap kitchen sink icon for frame F
when we get an expose event for it. */
+void
refreshicon (f)
struct frame *f;
{
/* Calculate the absolute position in frame F
from its current recorded position values and gravity. */
+void
x_calc_absolute_position (f)
struct frame *f;
{
position values). It is -1 when calling from x_set_frame_parameters,
which means, do adjust for borders but don't change the gravity. */
+void
x_set_offset (f, xoff, yoff, change_gravity)
struct frame *f;
register int xoff, yoff;
for this size change and subsequent size changes.
Otherwise we leave the window gravity unchanged. */
+void
x_set_window_size (f, change_gravity, cols, rows)
struct frame *f;
int change_gravity;
\f
/* focus shifting, raising and lowering. */
+void
x_focus_on_frame (f)
struct frame *f;
{
#endif /* ! 0 */
}
+void
x_unfocus_frame (f)
struct frame *f;
{
/* Raise frame F. */
+void
x_raise_frame (f)
struct frame *f;
{
/* Lower frame F. */
+void
x_lower_frame (f)
struct frame *f;
{
but it will become visible later when the window manager
finishes with it. */
+void
x_make_frame_visible (f)
struct frame *f;
{
/* Make the frame visible (mapped and not iconified). */
+void
x_make_frame_invisible (f)
struct frame *f;
{
/* Change window state from mapped to iconified. */
+void
x_iconify_frame (f)
struct frame *f;
{
\f
/* Destroy the X window of frame F. */
+void
x_destroy_window (f)
struct frame *f;
{
If USER_POSITION is nonzero, we set the USPosition
flag (this is useful when FLAGS is 0). */
+void
x_wm_set_size_hint (f, flags, user_position)
struct frame *f;
long flags;
}
/* Used for IconicState or NormalState */
+void
x_wm_set_window_state (f, state)
struct frame *f;
int state;
#endif /* not USE_X_TOOLKIT */
}
+void
x_wm_set_icon_pixmap (f, pixmap_id)
struct frame *f;
int pixmap_id;
#endif /* not USE_X_TOOLKIT */
}
+void
x_wm_set_icon_position (f, icon_x, icon_y)
struct frame *f;
int icon_x, icon_y;
\f
/* Set up use of X before we make the first connection. */
+void
x_initialize ()
{
clear_frame_hook = XTclear_frame;