annotate src/cm.h @ 110321:4b26adbef9a2

Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
author Michael Albinus <michael.albinus@gmx.de>
date Mon, 13 Sep 2010 17:17:01 +0200
parents 71150397fb59
children 417b1e4d63cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Cursor motion calculation definitions for GNU Emacs
75227
e90d04cd455a Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents: 68651
diff changeset
2 Copyright (C) 1985, 1989, 2001, 2002, 2003, 2004,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100951
diff changeset
3 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 This file is part of GNU Emacs.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
7 GNU Emacs is free software: you can redistribute it and/or modify
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
9 the Free Software Foundation, either version 3 of the License, or
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
10 (at your option) any later version.
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 GNU General Public License for more details.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20 /* Holds the minimum and maximum costs for the parametrized capabilities. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 struct parmcap
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 {
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 int mincost, maxcost;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 };
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 /* This structure holds everything needed to do cursor motion except the pad
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27 character (PC) and the output speed of the terminal (ospeed), which
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 termcap wants in global variables. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 struct cm
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 {
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 /* Cursor position. -1 in *both* variables means the cursor
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 position is unknown, in order to force absolute cursor motion. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 int cm_curY; /* Current row */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36 int cm_curX; /* Current column */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 /* Capabilities from termcap */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 char *cm_up; /* up (up) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 char *cm_down; /* down (do) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 char *cm_left; /* left (le) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 char *cm_right; /* right (nd) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 char *cm_home; /* home (ho) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 char *cm_cr; /* carriage return (cr) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 char *cm_ll; /* last line (ll) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 char *cm_tab; /* tab (ta) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 char *cm_backtab; /* backtab (bt) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 char *cm_abs; /* absolute (cm) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 char *cm_habs; /* horizontal absolute (ch) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 char *cm_vabs; /* vertical absolute (cv) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 #if 0
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 char *cm_ds; /* "don't send" string (ds) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 #endif
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 char *cm_multiup; /* multiple up (UP) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 char *cm_multidown; /* multiple down (DO) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 char *cm_multileft; /* multiple left (LE) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 char *cm_multiright; /* multiple right (RI) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 int cm_cols; /* number of cols on screen (co) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 int cm_rows; /* number of rows on screen (li) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 int cm_tabwidth; /* tab width (it) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 unsigned int cm_autowrap:1; /* autowrap flag (am) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 unsigned int cm_magicwrap:1; /* VT-100: cursor stays in last col but
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 will cm_wrap if next char is
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 printing (xn) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 unsigned int cm_usetabs:1; /* if set, use tabs */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 unsigned int cm_losewrap:1; /* if reach right margin, forget cursor
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 location */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68 unsigned int cm_autolf:1; /* \r performs a \r\n (rn) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 /* Parametrized capabilities. This needs to be a struct since
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 the costs are accessed through pointers. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 #if 0
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 struct parmcap cc_abs; /* absolute (cm) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 struct parmcap cc_habs; /* horizontal absolute (ch) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 struct parmcap cc_vabs; /* vertical absolute (cv) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 struct parmcap cc_multiup; /* multiple up (UP) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 struct parmcap cc_multidown; /* multiple down (DO) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 struct parmcap cc_multileft; /* multiple left (LE) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80 struct parmcap cc_multiright; /* multiple right (RI) */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 #endif
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 /* Costs for the non-parametrized capabilities */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 int cc_up; /* cost for up */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 int cc_down; /* etc. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 int cc_left;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 int cc_right;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 int cc_home;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89 int cc_cr;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 int cc_ll;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 int cc_tab;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 int cc_backtab;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 /* These are temporary, until the code is installed to use the
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 struct parmcap fields above. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95 int cc_abs;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96 int cc_habs;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 int cc_vabs;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98 };
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 extern char PC; /* Pad character */
18659
b6ced5dad84b (ospeed): Declare as short unless HAVE_TERMIOS_H and LINUX.
Richard M. Stallman <rms@gnu.org>
parents: 18473
diff changeset
101
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102 /* Shorthand */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 #ifndef NoCMShortHand
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
104 #define curY(tty) (tty)->Wcm->cm_curY
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
105 #define curX(tty) (tty)->Wcm->cm_curX
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
106 #define Up(tty) (tty)->Wcm->cm_up
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
107 #define Down(tty) (tty)->Wcm->cm_down
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
108 #define Left(tty) (tty)->Wcm->cm_left
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
109 #define Right(tty) (tty)->Wcm->cm_right
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
110 #define Tab(tty) (tty)->Wcm->cm_tab
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
111 #define BackTab(tty) (tty)->Wcm->cm_backtab
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
112 #define TabWidth(tty) (tty)->Wcm->cm_tabwidth
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
113 #define CR(tty) (tty)->Wcm->cm_cr
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
114 #define Home(tty) (tty)->Wcm->cm_home
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
115 #define LastLine(tty) (tty)->Wcm->cm_ll
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
116 #define AbsPosition(tty) (tty)->Wcm->cm_abs
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
117 #define ColPosition(tty) (tty)->Wcm->cm_habs
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
118 #define RowPosition(tty) (tty)->Wcm->cm_vabs
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
119 #define MultiUp(tty) (tty)->Wcm->cm_multiup
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
120 #define MultiDown(tty) (tty)->Wcm->cm_multidown
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
121 #define MultiLeft(tty) (tty)->Wcm->cm_multileft
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
122 #define MultiRight(tty) (tty)->Wcm->cm_multiright
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
123 #define AutoWrap(tty) (tty)->Wcm->cm_autowrap
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
124 #define MagicWrap(tty) (tty)->Wcm->cm_magicwrap
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
125 #define UseTabs(tty) (tty)->Wcm->cm_usetabs
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
126 #define FrameRows(tty) (tty)->Wcm->cm_rows
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
127 #define FrameCols(tty) (tty)->Wcm->cm_cols
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
129 #define UpCost(tty) (tty)->Wcm->cc_up
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
130 #define DownCost(tty) (tty)->Wcm->cc_down
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
131 #define LeftCost(tty) (tty)->Wcm->cc_left
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
132 #define RightCost(tty) (tty)->Wcm->cc_right
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
133 #define HomeCost(tty) (tty)->Wcm->cc_home
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
134 #define CRCost(tty) (tty)->Wcm->cc_cr
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
135 #define LastLineCost(tty) (tty)->Wcm->cc_ll
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
136 #define TabCost(tty) (tty)->Wcm->cc_tab
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
137 #define BackTabCost(tty) (tty)->Wcm->cc_backtab
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
138 #define AbsPositionCost(tty) (tty)->Wcm->cc_abs
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
139 #define ColPositionCost(tty) (tty)->Wcm->cc_habs
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
140 #define RowPositionCost(tty) (tty)->Wcm->cc_vabs
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
141 #define MultiUpCost(tty) (tty)->Wcm->cc_multiup
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
142 #define MultiDownCost(tty) (tty)->Wcm->cc_multidown
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
143 #define MultiLeftCost(tty) (tty)->Wcm->cc_multileft
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
144 #define MultiRightCost(tty) (tty)->Wcm->cc_multiright
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
145 #endif
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
147 #define cmat(tty,row,col) (curY(tty) = (row), curX(tty) = (col))
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
148 #define cmplus(tty,n) \
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
149 { \
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
150 if ((curX (tty) += (n)) >= FrameCols (tty) && !MagicWrap (tty)) \
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
151 { \
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
152 if ((tty)->Wcm->cm_losewrap) losecursor (tty); \
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
153 else if (AutoWrap (tty)) curX (tty) = 0, curY (tty)++; \
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
154 else curX (tty)--; \
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
155 } \
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 }
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
158 #define losecursor(tty) (curX(tty) = -1, curY(tty) = -1)
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 extern int cost;
109115
71150397fb59 Fix prototypes.
Juanma Barranquero <lekktu@gmail.com>
parents: 109108
diff changeset
161 extern int evalcost (int c);
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents: 52401
diff changeset
163 #define emacs_tputs(tty, str, affcnt, putc) (current_tty = (tty), tputs (str, affcnt, putc))
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents: 52401
diff changeset
164
82989
f3845715a5f6 Separate frame-local, tty-dependent parameters from tty-local parameters.
Karoly Lorentey <lorentey@elte.hu>
parents: 53340
diff changeset
165 extern struct tty_display_info *current_tty;
109099
e16f43875a48 Remove P_ and __P macros.
Jan D <jan.h.d@swipnet.se>
parents: 106815
diff changeset
166 extern void cmcheckmagic (struct tty_display_info *);
e16f43875a48 Remove P_ and __P macros.
Jan D <jan.h.d@swipnet.se>
parents: 106815
diff changeset
167 extern int cmputc (int);
e16f43875a48 Remove P_ and __P macros.
Jan D <jan.h.d@swipnet.se>
parents: 106815
diff changeset
168 extern void cmcostinit (struct tty_display_info *);
e16f43875a48 Remove P_ and __P macros.
Jan D <jan.h.d@swipnet.se>
parents: 106815
diff changeset
169 extern void cmgoto (struct tty_display_info *, int, int);
e16f43875a48 Remove P_ and __P macros.
Jan D <jan.h.d@swipnet.se>
parents: 106815
diff changeset
170 extern void Wcm_clear (struct tty_display_info *);
e16f43875a48 Remove P_ and __P macros.
Jan D <jan.h.d@swipnet.se>
parents: 106815
diff changeset
171 extern int Wcm_init (struct tty_display_info *);
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 25822
diff changeset
172
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 25822
diff changeset
173 /* arch-tag: acc1535a-7136-49d6-b22d-9bc85702251b
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 25822
diff changeset
174 (do not change this comment) */