home *** CD-ROM | disk | FTP | other *** search
- #include "stdio.h"
-
- /* This is functionally the same as the original term.c with regard to execution
- on the Macintosh. Most of the code in the original term.c was never used.
- 15K was saved off the final program size when all the dead code was removed.. */
-
- /* Terminal charateristics that higher levels want to look at.
- These are all extern'd in termchar.h */
-
- int screen_width; /* Number of usable columns */
- int screen_height; /* Number of lines */
- int must_write_spaces; /* Nonzero means spaces in the text
- must actually be output; can't just skip
- over some columns to leave them blank. */
- int min_padding_speed; /* Speed below which no padding necessary */
-
- int line_ins_del_ok; /* Terminal can insert and delete lines */
- int char_ins_del_ok; /* Terminal can insert and delete chars */
- int scroll_region_ok; /* Terminal supports setting the scroll window */
- int memory_below_screen; /* Terminal remembers lines scrolled off bottom */
- int fast_clear_end_of_line; /* Terminal has a `ce' string */
-
- int dont_calculate_costs; /* Nonzero means don't bother computing */
- /* various cost tables; we won't use them. */
-
- /* Nonzero means no need to redraw the entire screen on resuming
- a suspended Emacs. This is useful on terminals with multiple pages,
- where one page is used for Emacs and another for all else. */
- int no_redraw_on_reenter;
-
- // This is never used, because dont_calculate_costs is set true,
- // and ins_del_chars_ok is set false. But the program won't link without it.
- int *DC_ICcost;
-
- int (*move_cursor_hook) ();
- int (*raw_move_cursor_hook) ();
- int (*clear_to_end_hook) ();
- int (*clear_screen_hook) ();
- int (*clear_end_of_line_hook) ();
- int (*ins_del_lines_hook) ();
- int (*change_line_highlight_hook) ();
- int (*reassert_line_highlight_hook) ();
- int (*insert_chars_hook) ();
- int (*output_chars_hook) ();
- int (*delete_chars_hook) ();
- int (*ring_bell_hook) ();
- int (*reset_terminal_modes_hook) ();
- int (*set_terminal_modes_hook) ();
- int (*update_begin_hook) ();
- int (*update_end_hook) ();
- int (*set_terminal_window_hook) ();
- int (*read_socket_hook) ();
- int (*fix_screen_hook) ();
- int (*calculate_costs_hook) ();
-
- term_init() { }
- ring_bell() { (*ring_bell_hook)(); }
- update_end() { (*update_end_hook)(); }
- insert_chars() { }
- delete_chars() { }
-
- clear_to_end() { (*clear_to_end_hook)(); }
- clear_screen() { (*clear_screen_hook)(); }
- update_begin() { (*update_begin_hook)(); }
- set_terminal_modes() { }
- move_cursor(row,col) { (*move_cursor_hook)(row,col); }
-
- ins_del_lines(vpos,n) { (*ins_del_lines_hook)(vpos,n); }
- reset_terminal_modes() { }
- raw_move_cursor(row,col) { (*raw_move_cursor_hook)(row,col); }
- set_terminal_window(size) { (*set_terminal_window_hook)(size); }
- output_chars(char *string,int len) { (*output_chars_hook)(string,len); }
-
- clear_end_of_line(first_unused_hpos) { clear_end_of_line_raw(first_unused_hpos); }
- reassert_line_highlight(highlight,vpos) { (*reassert_line_highlight_hook)(highlight,vpos); }
- clear_end_of_line_raw(first_unused_hpos) { (*clear_end_of_line_hook)(first_unused_hpos); }
- change_line_highlight(new_highlight,vpos,first_unused_hpos) { (*change_line_highlight_hook)(new_highlight, vpos, first_unused_hpos); }
-
- calculate_costs()
- {
- CalcIDCosts(0,0,0,0,0,0);
- }
-
- fatal(str,arg1,arg2)
- char *str;
- {
- fprintf(stderr, "emacs: ");
- fprintf(stderr, str, arg1, arg2);
- fflush(stderr);
- exit(1);
- }
-