1. 12 Mar, 2010 1 commit
    • Eli Zaretskii's avatar
      Don't use termcap.c on Posix platforms, only on MS-DOS. · 6da23aaa
      Eli Zaretskii authored
       configure.in <AC_CHECK_HEADERS>: Remove termcap.h.
       configure: Regenerated.
       src/Makefilie.in (termcapobj): Move termcap.o from here...
       (MSDOS_OBJ): ...to here.
       (termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is
       now identical to when LIBS_TERMCAP is defined.
       src/term.c: Remove (ifdef'ed away) inclusion of termcap.h.
       src/cm.c: Remove (ifdef'ed away) inclusion of termcap.h.
       src/config.in: Regenerated.
      6da23aaa
  2. 13 Jan, 2010 1 commit
  3. 19 Oct, 2009 1 commit
    • Dan Nicolaescu's avatar
      * alloc.c: Do not define struct catchtag. · d7306fe6
      Dan Nicolaescu authored
      * eval.c: Move struct catchtag definition ...
      * lisp.h: ... here.
      
      * image.c: Move png.h #include earlier to avoid warnings.
      
      * xterm.c:
      * xsmfns.c:
      * xselect.c:
      * xrdb.c:
      * xmenu.c:
      * xftfont.c:
      * xfont.c:
      * xfns.c:
      * xfaces.c:
      * xdisp.c:
      * window.c:
      * widget.c:
      * w32xfns.c:
      * w32uniscribe.c:
      * w32term.c:
      * w32select.c:
      * w32reg.c:
      * w32proc.c:
      * w32menu.c:
      * w32inevt.c:
      * w32heap.c:
      * w32font.c:
      * w32fns.c:
      * w32console.c:
      * w32.c:
      * w16select.c:
      * vm-limit.c:
      * unexsol.c:
      * unexec.c:
      * unexcw.c:
      * unexaix.c:
      * undo.c:
      * tparam.c:
      * textprop.c:
      * terminfo.c:
      * terminal.c:
      * termcap.c:
      * term.c:
      * syntax.c:
      * sound.c:
      * sheap.c:
      * search.c:
      * scroll.c:
      * region-cache.c:
      * regex.c:
      * ralloc.c:
      * process.c:
      * print.c:
      * msdos.c:
      * minibuf.c:
      * menu.c:
      * marker.c:
      * macros.c:
      * keymap.c:
      * keyboard.c:
      * intervals.c:
      * insdel.c:
      * indent.c:
      * gtkutil.c:
      * ftxfont.c:
      * ftfont.c:
      * fringe.c:
      * frame.c:
      * fontset.c:
      * font.c:
      * fns.c:
      * floatfns.c:
      * filelock.c:
      * fileio.c:
      * emacs.c:
      * editfns.c:
      * dosfns.c:
      * doprnt.c:
      * doc.c:
      * dispnew.c:
      * dired.c:
      * dbusbind.c:
      * data.c:
      * composite.c:
      * coding.c:
      * cmds.c:
      * cm.c:
      * chartab.c:
      * charset.c:
      * character.c:
      * ccl.c:
      * category.c:
      * casetab.c:
      * casefiddle.c:
      * callproc.c:
      * callint.c:
      * bytecode.c:
      * buffer.c:
      * atimer.c: Include setjmp.h.  (Bug#4643)
      
      * xlwmenu.c:
      * lwlib.c:
      * lwlib-utils.c:
      * lwlib-Xm.c:
      * lwlib-Xlw.c:
      * lwlib-Xaw.c: Include setjmp.h.
      d7306fe6
  4. 08 Jan, 2009 1 commit
  5. 14 May, 2008 1 commit
  6. 08 Jan, 2008 1 commit
  7. 25 Jul, 2007 1 commit
  8. 14 Jan, 2007 1 commit
  9. 06 Feb, 2006 1 commit
  10. 07 Aug, 2005 1 commit
  11. 04 Jul, 2005 1 commit
  12. 16 Apr, 2004 1 commit
  13. 28 Feb, 2004 1 commit
    • Karoly Lorentey's avatar
      Implemented suspending of emacsclient frames. · 0b0d3e0b
      Karoly Lorentey authored
      lib-src/emacsclient.c (quote_file_name): Renamed to quote_argument.
      (unquote_argument, handle_sigcont, handle_sigtstp): New functions.
      (out, in): New global variables for communicating with the Emacs process.
      (init_signals): Set up handlers for SIGCONT, SIGTSTP and SIGTTOU.
      (main): Changed out and in to global variables.  Prepend `-eval' or
      '-file' to each argument.  Use fsync to force sending the strings to Emacs.
      Removed obsolete -bad-version code.  Support the -suspend command.
      Cleaned up newline handling.
      
      lisp/frame.el (suspend-frame): New function.
      Substitute key definition of suspend-emacs with suspend-frame.
      
      lisp/server.el (server-log): Cosmetic change in log format.
      (server-handle-delete-tty, server-handle-delete-frame): Added logging.
      (server-handle-suspend-tty, server-quote-arg): New functions.
      (server-start): Install server-handle-suspend-tty.
      (server-process-filter): Reorganized source code for clarity.
      Implemented -resume, -suspend and -ignore commands.
      
      lisp/term/x-win.el (x-initialize-window-system): Don't change the
      binding of C-z.
      
      src/cm.c: Replaced TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT calls with
      their macro expansion.
      src/dispnew.c: Ditto.
      src/frame.c: Ditto.
      src/keyboard.c: Ditto.
      src/sysdep.c: Ditto.
      
      src/keyboard.c (tty_read_avail_input): Don't read if the terminal is
      suspended.
      src/sysdep.c (discard_tty_input, init_sys_modes, reset_sys_modes): Ditto.
      src/term.c (tty_set_terminal_modes, tty_reset_terminal_modes): Ditto.
      
      src/term.c (Vsuspend_tty_functions, Vresume_tty_functions): New hooks.
      (syms_of_term): Defvar them.
      (term_init): Don't allow opening a new frame on a suspended tty device.
      (Fsuspend_tty, Fresume_tty): New functions.
      (syms_of_term): Defsubr them.
      
      src/termchar.c (struct tty_display_info): Update documentation of
      input and output.
      (TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT): Removed.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-105
      0b0d3e0b
  14. 25 Jan, 2004 2 commits
    • Karoly Lorentey's avatar
      Cosmetic changes. · c3b4957f
      Karoly Lorentey authored
      src/cm.c (calccost, cmgoto): Cosmetic changes.
      src/keyboard.c (kbd_buffer_get_event, Fcurrent_input_mode): Ditto.
      src/term.c: Cosmetic changes.
      
      src/termchar.h (top_frame): Removed obsolete TODO comment.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-67
      c3b4957f
    • Karoly Lorentey's avatar
      Removed %T in mode-line-format. Trivial documentation changes. · da8e1115
      Karoly Lorentey authored
      lisp/bindings.el (mode-line-buffer-identification): Use the
      conditional formatting feature instead of builtin support.
      
      src/buffer.c (Vmode_line_format): Removed %T documentation.
      
      src/xdisp.c (decode_mode_spec): Removed %T processing.
      
      lib-src/emacsclient.c (pass_signal_to_emacs, init_signals): Added
      comment.
      
      src/cm.c: Cosmetic changes.
      src/termchar.h: Ditto.
      
      src/keyboard.c (interrupt_signal, handle_interrupt): Updated
      documentation.
      
      src/process.c (add_keyboard_wait_descriptor): Added docs.
      
      src/sysdep.c (init_all_sys_modes, init_sys_modes)
      (reset_all_sys_modes): Added docs.
      
      src/term.c (tty_ring_bell, tty_set_terminal_modes)
      (tty_reset_terminal_modes, tty_update_end, set_terminal_window)
      (tty_set_terminal_window, clear_to_end, tty_clear_to_end)
      (tty_clear_frame, tty_clear_end_of_line, write_glyphs)
      (tty_write_glyphs, insert_glyphs, tty_insert_glyphs, delete_glyphs)
      (tty_delete_glyphs, tty_ins_del_lines, get_named_tty_display)
      (init_initial_display, delete_tty): Added docs.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-65
      da8e1115
  15. 05 Jan, 2004 1 commit
    • Karoly Lorentey's avatar
      Converted display hooks to be display-local. Plus many bugfixes. · 428a555e
      Karoly Lorentey authored
      lib-src/emacsclient.c (window_change_signal): Renamed to pass_signal_to_emacs.
      (init_signal): Pass SIGINT and SIGQUIT to the emacs process.
      
      lisp/faces.el (face-valid-attribute-values): Use the window-system
      function, not the variable.
      (read-face-attribute, face-spec-set-match-display, frame-set-background-mode)
      (face-set-after-frame-default): Ditto.
      
      lisp/frame.el (make-frame-on-tty): Added interactive declaration
      (suggested by Robert J. Chassell).  Use tty-create-frame-with-faces,
      not make-terminal-frame.
      
      src/termhooks.h (struct display_method): Renamed to display for brevity.
      (struct display): Added all display hook variables as members of this structure.
      Added next_display, reference_count, type and display_info components.
      (FRAME_MUST_WRITE_SPACES, FRAME_FAST_CLEAR_END_OF_LINE, FRAME_LINE_INS_DEL_OK)
      (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK, FRAME_SCROLL_REGION_COST)
      (FRAME_MEMORY_BELOW_FRAME, FRAME_RIF): Updated for struct display.
      (FRAME_DISPLAY): New macro.
      (create_display, delete_display): New prototypes.
      
      src/frame.h (struct frame): Added `display' member, removed display_method.
      (FRAME_LIVE_P): Look at f->display, not f->output_data.
      
      src/termchar.h (struct tty_display_info): Removed display_method component.
      (FRAME_TTY): Use the display structure, not output_data.
      
      src/term.c (display_list): New variable.
      (cursor_to_hook, raw_cursor_to_hook, clear_to_end_hook, clear_frame_hook)
      (clear_end_of_line_hook, ins_del_lines_hook, delete_glyphs_hook)
      (ring_bell_hook, reset_terminal_modes_hook, set_terminal_modes_hook)
      (update_begin_hook, update_end_hook, set_terminal_window_hook)
      (insert_glyphs_hook, write_glyphs_hook, delete_glyphs_hoo, read_socket_hook)
      (frame_up_to_date_hook, mouse_position_hook, frame_rehighlight_hook)
      (frame_raise_lower_hook, set_vertical_scroll_bar_hook, condemn_scroll_bars_hook)
      (redeem_scroll_bar_hook, judge_scroll_bars_hook): Moved to struct display.
      (tty_display_method_template): Removed.
      (syms_of_term): Don't initialize tty_display_method_template.
      (ring_bell, set_terminal_modes, reset_terminal_modes, update_begin)
      (update_end, set_terminal_window, cursor_to, raw_cursor_to, clear_to_end)
      (clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
      (delete_glyphs, ins_del_lines): Access display hooks through the frame pointer.
      (Ftty_display_color_p): Use the frame given as a parameter, or else return nil.
      (Ftty_display_color_cells): Ditto.
      (get_named_tty): Renamed to get_named_tty_display, changed return type to struct display.
      (term_dummy_init): Renamed to initial_term_init.  Create and return an initial display.
      (term_init): Initialize a new struct display and return a pointer to
      it instead of tty_display_info.  Removed frame initialization kludge.
      (Fdelete_tty): Updated for struct display.
      (delete_tty): The parameter type is now struct display, not tty_display_info.
      Delete the display, too.
      (create_tty_output): New function for creating tty_output structures.
      (delete_tty_output): New function for deleting tty_output structures.
      (create_display): New function for creating and registering display structures.
      (delete_display): New function for deleting and unregistering display structures.
      
      src/dispextern.h: Updated prototypes.
      
      src/dispnew.c:  Include frame.h before termhooks.h.
      (init_display): Updated term_init call to new signature.
      
      src/emacs.c: Include frame.h (for termhooks.h).
      src/keymap.c: Ditto.
      src/lread.c: Ditto.
      src/xsmfns.c: Ditto.
      
      src/process.c: Include frame.h before termhooks.h.
      
      src/frame.c (Fwindow_system): New function.
      (syms_of_frame): Initialize it.
      (make_terminal_frame): Open the terminal device before creating the new frame.
      Disable scrollbars here, term_init cannot do that anymore.
      (Fdelete_frame): Use the new delete_frame_hook, don't do display-specific
      frame deletion here.  Ditto for delete_display_hook.
      (Fmouse_position, Fmouse_pixel_position, Fraise_frame, Flower_frame)
      (Fredirect_frame_focus): Access display hooks through the frame pointer.
      
      src/keyboard.c: Include frame.h before termhooks.h.
      (start_polling, input_polling_used, stop_polling, gobble_input): Ignore read_socket_hook.
      (kbd_buffer_get_event, Fset_input_mode): Access display hooks through the frame pointer.
      (read_avail_input): Loop through all display devices for and call all read_socket_hook functions.  Check ttys even if read_socket_hook returned an error.
      
      src/sysdep.c (discard_tty_input): Ignore read_socket_hook.
      (stuff_char): Don't do anything if the current frame is not on a termcap display.
      (request_sigio, unrequest_sigio): Ignore read_socket_hook.
      (init_sys_modes): Always call narrow_foreground_group.  Set up terminal modes and sigio even under X.
      
      src/xdisp.c (message2_nolog, message3_nolog, redisplay_internal)
      (set_vertical_scroll_bar, redisplay_window): Access display hooks through the frame pointer.
      (echo_area_display): Don't be afraid of termcap frames during an X+tty combo session.
      
      src/xfaces.c: Include termhooks.h.
      (Ftty_supports_face_attributes_p): Use the given frame, not selected_frame.
      
      src/xfns.c (x_set_scroll_bar_foreground, x_set_scroll_bar_background): Access display hooks through the frame pointer.
      (Fx_create_frame, x_create_tip_frame): Initialize the frame's display structure.
      src/xmenu.c: Include termhooks.h after frame.h.
      
      src/xselect.c (x_own_selection, some_frame_on_display, x_get_foreign_selection)
      (Fx_disown_selection_internal, Fx_get_cut_buffer_internal)
      (Fx_store_cut_buffer_internal, Fx_rotate_cut_buffers_internal): Don't do anything
      if the selected frame is not an X frame.
      
      src/xterm.c (x_display_method): Removed.
      (x_create_frame_display, x_delete_frame_display): New functions for handling struct display objects.
      (x_term_init): Set up a new struct display object, too.
      (x_delete_display): Delete the struct display corresponding to the X display.
      (x_initialize): Moved hook initialization to x_create_frame_display.
      
      src/xterm.h (x_display_method): Removed.
      (struct x_display_info): Added frame_display component.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-44
      428a555e
  16. 03 Jan, 2004 1 commit
    • Karoly Lorentey's avatar
      Portability fixes (now it compiles & runs fine on Solaris). · 4d553a13
      Karoly Lorentey authored
      lib-src/emacsclient.c: Removed tty proxy kludge.  Emacs should just
      use the same terminal as emacsclient.
      (ec_get_tty, ec_set_tty, master, pty_name, old_tty, tty, old_tty_valid)
      (tty_erase_char, quit_char, flow_control, meta_key, _sobuf, init_tty)
      (window_change, reset_tty, init_pty, copy_from_to)
      (pty_conversation): Removed.
      (window_change_signal): Just forward the signal to Emacs, don't do
      anything else.
      (init_signals): Don't set handlers for SIGHUP & SIGINT.
      (strprefix): New function.
      (main): Don't touch the terminal, simply tell its name to Emacs.
      
      lisp/server.el (server-frames): Changed name and semantics to server-ttys.
      (server-tty-live-p): New function.
      (server-sentinel): Delete the whole tty, not just the frame.
      (server-handle-delete-frame): Removed.
      (server-handle-delete-tty): New function. Close the client connection if
      the tty is deleted.
      (server-start): Clean up server-ttys, not server-frames.  Set up
      delete-tty-after-functions.
      (server-process-filter): Set up server-ttys, not server-frames.
      Updated protocol for sending our pid to emacsclient.
      (server-buffer-done): Don't delete the client process directly, delete
      the tty instead, and rely on the delete-tty hook to close the
      connection.  Otherwise the terminal could be left in a bad state.
      
      src/cm.c (cmputc): Don't abort on write errors.
      
      src/indent.c: #include <stdio.h>, for termchar.h.
      src/window.c: Ditto.
      src/xfaces.c: Ditto.
      
      src/sysdep.c (init_sigio, reset_sigio, request_sigio)[!SIGIO]
      (unrequest_sigio)[!SIGIO]: If SIGIO is not supported, don't do
      anything. (For Solaris.)
      (init_sys_modes): Moved tty_set_terminal_modes call back to here,
      disable window system check.
      (reset_sys_modes): Reset the terminal even if X is running.
      
      src/term.c (Vdelete_tty_after_functions): New variable.
      (syms_of_term): Initialize it.
      (Fdelete_tty): Updated docs.
      (delete_tty): Run delete-tty-after-functions.
      (term_init): Removed tty_set_terminal_modes call.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-35
      4d553a13
  17. 01 Jan, 2004 1 commit
    • Karoly Lorentey's avatar
      Separate frame-local, tty-dependent parameters from tty-local parameters. · 28d7d09f
      Karoly Lorentey authored
      src/termchar.h (struct tty_output): Redefined to contain frame-local
      tty-dependent parameters.  (Currently there are no such parameters, so
      it consists of the tty_display_info pointer.)
      (struct tty_display_info): New structure, with reference_count.
      (FRAME_TTY): Updated to reflect new termcap frame structure.
      
      src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
      
      src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
      (Wcm_init): Use tty_display_info instead of tty_output.
      
      src/cm.h: Update prototypes.
      src/dispextern.h: Ditto.
      
      src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
      Use tty_display_info instead of tty_output.
      
      src/frame.c (Fdelete_frame): Use tty_display_info instead of
      tty_output.  Fix delete_tty check.
      (make_terminal_frame): Allocate f->output_data.tty.  Increase
      reference count of tty device.
      (delete_frame): Free f->output_data.tty.  Use reference count to
      decide if the tty should be closed.
      
      src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
      unconditional definitions.
      (struct device): New declaration (at the moment, it is defined as
      empty in termhooks.h).
      (struct frame): Added display, background_pixel, foreground_pixel member.
      
      src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
      
      src/lisp.h: Declare struct display.  Update prototypes.
      
      src/sysdep.c: Update prototypes.
      (discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
      (reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
      of tty_output.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
      28d7d09f
  18. 29 Dec, 2003 1 commit
    • Karoly Lorentey's avatar
      Make sure secondary frames are deleted when emacsclient quits. · b2af72d2
      Karoly Lorentey authored
      lisp/server.el (server-sentinel): Delete frame if alive.  Fix delq
      invocation on server-frames.  
      (server-process-filter, server-buffer-done): Fix delq invocation on
      server-frames.
      
      src/cm.c (cmputc): Abort on write error, see what happens.
      
      src/keyboard.c (read_avail_input): Do delete_tty on read errors.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-21
      b2af72d2
  19. 28 Dec, 2003 1 commit
  20. 27 Dec, 2003 2 commits
    • Karoly Lorentey's avatar
      Fully eliminated global tty state variables. · fca177d4
      Karoly Lorentey authored
      lib-src/emacsclient.c (main.c): Fix error message.
      
      lisp/frame.el (make-frame-on-tty): New function.
      
      lisp/server.el (server-process-filter): Notify emacsclient if there
      was on error during evaluation.
      
      src/cm.c: Fix remaining cases of direct Wcm references.
      
      src/dispextern.h: Updated prototypes.
      
      src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call.
      (init_display): Remove reference to meta_key.
      
      src/frame.c (make_terminal_frame): Renamed first parameter to
      tty_name.  Call term_init before creating the frame.
      (Fmake_terminal_frame): Look up the `tty' and `tty-type' frame
      parameters from the currently selected terminal before the global
      default.
      (Fdelete_frame): Make sure that the new selected frame is live.
      
      src/keyboard.c (meta_key): Moved to struct tty_output.
      (read_avail_input): Fix C syntax.  Update references to meta_key.
      (Fsuspend_emacs): pass current tty to init_sys_modes via
      record_unwind_protect.
      (Fset_input_mode): Update references to meta_key.
      (Fcurrent_input_mode): Ditto.
      
      src/sysdep.c (init_sys_modes): Updated old_tty and meta_key
      references.  Don't call set_terminal_modes, it needs termcap strings.
      (reset_sys_modes): Call tty_reset_terminal_modes instead of
      reset_terminal_modes.  Updated old_tty references.
      
      src/term.c: Massive updates throuout the file.
      (TS_*, TN_*): Moved to struct tty_output.
      (RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto.
      (standout_mode, specified_window, tty_cursor_hidden): Ditto.
      (tty_set_terminal_modes, tty_reset_terminal_modes): New functions.
      (turn_on_insert, turn_off_insert): Added tty parameter.
      (turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter.
      (tty_hide_cursor, tty_show_cursor): Ditto.
      (background_highlight, highlight_if_desired): Ditto.
      (tty_capable_p): Changed first parameter to tty_output.
      (term_init): Make sure top_frame is initialized.  Don't exit on errors
      if this would have been a secondary terminal.  Call set_terminal_modes
      on the end.
      (delete_tty): New function.
      (delete_tty_1): New function.
      (print_all_frames): New function, marginally useful for debugging.
      
      src/termchar.h (struct tty_output): Changed old_tty to be a pointer.
      Removed old_tty_valid member.  Added tty-specific variables from term.c.
      
      src/xfaces.c (Ftty_supports_face_attributes_p): Update for new
      tty_capable_p.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
      fca177d4
    • Karoly Lorentey's avatar
      Full support for multiple terminal I/O (with some rough edges). · 6548cf00
      Karoly Lorentey authored
      lib-src/emacsclient.c (emacs_pid): New variable.  
      (window_change): Forward the SIGWINCH signal to the Emacs process
      after copying the size parameters to the proxy terminal.
      (copy_from_to): New parameter (sigio), kill Emacs with SIGIO if it is
      nonzero.
      (main): Set emacs_pid.
      
      lisp/server.el (server-process-filter): Send the pid of Emacs to emacsclient.
      
      src/cm.c: Added tty parameters to all functions and all Wcm macro calls.
      
      src/cm.h: Added tty parameters to all macros.   Updated function prototypes.
      (Wcm): Moved to struct tty_output.
      
      src/dispextern.h: Updated function prototypes.
      
      src/dispnew.c: Added tty parameters to all Wcm macro calls.
      (do_switch_frame): Make old frame obscured, not invisible, to solve
      problems with other-frame.
      (Wcm): Moved to struct tty_output.
      
      src/keyboard.c (read_avail_input): Select the frame corresponding to
      the tty that was read.  Slight rearrangement of tty loop.
      
      src/lisp.h (tabs_safe_p): Removed duplicate prototype.
      
      src/sysdep.c (hft_init, hft_reset): Added tty_output parameter.
      (discard_tty_input): Discard input from all ttys on APOLLO, too.
      Whatever it is.
      (narrow_foreground_group, widen_foreground_group): Added tty parameter
      (not really useful, the functions only work on the controlling tty.)
      (tabs_safe_p): Added tty parameter.
      
      src/term.c Added tty parameters to all Wcm macro calls.
      Standardised updating_frame vs. selected frame and tty_output access.
      (term_init): Allocate Wcm.
      (syms_of_term): Provide the `multi-tty' feature.
      
      src/termchar.h (struct tty_output): Added Wcm.
      
      src/xdisp.c (try_window_id): Make sure we use the tty device
      corresponding to the current frame.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-8
      6548cf00
  21. 25 Dec, 2003 1 commit
    • Karoly Lorentey's avatar
      Implemented multiple tty support. · 28d440ab
      Karoly Lorentey authored
      README.multi-tty: New file.
      
      src/termchar.h (struct terminal): Renamed to struct tty_output.  Added name, type,
      input, output, termscript, old_tty, term_initted, old_tty_valid,
      background_pixel, foreground_pixel, next fields.
      (TERMINAL_*): Renamed to TTY_* for brevity.
      (CURRENT_TERMINAL): Renamed to CURTTY for brevity.
      (tty_list): New variable.
      (TERMINAL_PTR): Removed.
      (FRAME_TTY): New function.
      (TTY_NAME, TTY_TYPE): New macros.
      
      src/term.c (current_terminal): Removed.  (_current_terminal): Removed.  (tty_list):
      New variable.  (OUTPUT, OUTPUT1, OUTPUTL, OUTPUT_IF, OUTPUT1_IF): Added tty
      parameter.  (set_terminal_modes): Added tty parameter.  (reset_terminal_modes):
      Added tty parameter.  (cursor_to, raw_cursor_to): Updated cmgoto() calls.
      (clear_end_of_line, write_glyphs): Add indirection to terminal output, updated
      cmcheckmagic() calls.  (get_named_tty): New function.  (term_dummy_init): New
      function.  (term_init): Added name parameter, added tty_output return value.
      Changed algorithm to update tty_list.  Call init_sys_modes() to set up tty
      mode on the newly opened terminal device.
      (get_current_tty): New function, intended for debugging.
      
      src/termhooks.h (termscript): Removed.
      
      src/w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Removed redundant
      definition.
      src/macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Ditto.
      
      
      src/window.c (init_window_once): Call make_terminal_frame with two zero parameters.
      
      src/cm.h (emacs_tputs): New macro to set current_tty, and then call tputs().
      (current_tty): New variable, for cmputc().
      (cmcheckmagic, cmputc, cmgoto): Added prototypes.
      
      src/cm.c (current_tty): New variable, for cmputc().
      (cmputc): Use it.
      (cmcheckmagic): Added tty parameter, look up terminal streams there.
      (calccost): Added tty parameter.  Use emacs_tputs() instead of tputs().
      (cmgoto): Added tty parameter.  Pass it on to calccost().  Use emacs_tputs()
      instead of tputs().
      
      
      src/dispextern.h (set_terminal_modes, reset_terminal_modes): Added tty parameter.
      (term_init): Added name parameter (the filename of the terminal device). Added
      return value (struct tty_output).
      
      src/dispnew.c: Replace CURTTY() with local variables throughout the file (where applicable).
      (termscript): Moved to struct tty_output.
      (terminal_type): Removed.
      
      src/emacs.c (main): Don't call init_sys_modes(), the new term_init() already does that
      during init_display().
      (shut_down_emacs): Call reset_all_sys_modes() instead of reset_sys_modes().
      
      src/frame.c (Qtty, Qtty_type): New variables.
      (syms_of_frame): Initialize them.
      (tty_display): Removed.
      (make_terminal_frame): New parameters (tty filename and type).
      Initialize output_data.tty field instead of output_data.x.  Use term_init() to
      find the right tty_output.  (Use term_dummy_init() during bootstrap.)
      (Fmake_terminal_frame): Get device filename and type from frame parameters.
      
      src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Do the right thing
      if the frame is a tty.
      (struct frame): New member in output_data: tty.
      (make_terminal_frame): Updated of prototype.
      
      src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes(), not
      reset_sys_modes().  Ditto with init_sys_modes().
      
      src/lisp.h (tty_output): Added forward declaration.
      (init_sys_modes, reset_sys_modes): Updated prototype.
      (init_all_sys_modes, reset_all_sys_modes): New prototypes.
      
      src/scroll.c: Replace CURTTY() with local variables throughout the file (where applicable).
      
      src/sysdep.c (old_tty, term_initted, old_tty_valid): Moved to struct tty_output.(
      (init_all_sys_modes): New function.
      (init_sys_modes): Added tty_output parameter.  Use it.
      (reset_all_sys_modes): New function.
      (reset_sys_modes): Added tty_output parameter.  Use it.
      
      src/Makefile.in: Update dependencies.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-2
      28d440ab
  22. 08 Sep, 2003 1 commit
  23. 01 Sep, 2003 1 commit
  24. 04 Feb, 2003 1 commit
  25. 14 Nov, 2002 1 commit
  26. 30 Jul, 2002 1 commit
  27. 21 Nov, 2000 1 commit
  28. 17 Aug, 2000 1 commit
  29. 23 Jun, 2000 2 commits
  30. 16 Sep, 1999 1 commit
  31. 20 Aug, 1999 1 commit
  32. 18 Aug, 1999 1 commit
  33. 14 Apr, 1998 1 commit
  34. 15 Jan, 1996 1 commit
  35. 07 Apr, 1995 1 commit
  36. 17 Jan, 1995 1 commit
  37. 22 Sep, 1994 1 commit