Mercurial > emacs
annotate src/cm.h @ 30408:e3e2c9051c5f
Got rid of all byte-compiler warnings on Emacs.
Add to the menu when the file is loaded, not in ada-mode-hook.
Add -toolbar to the default ddd command Switches moved from
ada-prj-default-comp-cmd and ada-prj-default-make-cmd to
ada-prj-default-comp-opt
(ada-add-ada-menu): Remove the map and name parameters Add the Ada
Reference Manual to the menu
(ada-check-current): rewritten as a call to ada-compile-current
(ada-compile): Removed.
(ada-compile-application, ada-compile-current, ada-check-current):
Set the compilation-search-path so that compile.el automatically
finds the sources in src_dir. Automatic scrollong of the
compilation buffer. C-uC-cC-c asks for confirmation before
compiling
(ada-compile-current): New parameter, prj-field
(ada-complete-identifier): Load the .ali file before doing
processing
(ada-find-ali-file-in-dir): prepend build_dir to obj_dir to
conform to gnatmake's behavior.
(ada-find-file-in-dir): New function
(ada-find-references): Set the environment variables for gnatfind
(ada-find-src-file-in-dir): New function.
(ada-first-non-nil): Removed
(ada-gdb-application): Add support for jdb, the java debugger.
(ada-get-ada-file-name): Load the original-file first if not done
yet.
(ada-get-all-references): Handles the new ali syntax (parent types
are found between <>).
(ada-initialize-runtime-library): New function
(ada-mode-hook): Always load a project file when a file is opened,
so that the casing exceptions are correctly read.
(ada-operator-re): Add all missing operators ("abs", "rem", "**").
(ada-parse-prj-file): Use find-file-noselect instead of find-file
to open the project file, since the latter does not work with
speedbar Get default values before loading the prj file, or the
default executable file name is wrong. Use the absolute value of
src_dir to initialize ada-search-directories and
compilation-search-path,... Add the standard runtime library to
the search path for find-file.
(ada-prj-default-debugger): Was missing an opening '{'
(ada-prj-default-bind-opt, ada-prj-default-link-opt): New
variables.
(ada-prj-default-gnatmake-opt): New variable
(ada-prj-find-prj-file): Handles non-file buffers For non-Ada
buffers, the project file is the default one Save the windows
configuration before displaying the menu.
(ada-prj-src-dir, ada-prj-obj-dir, ada-prj-comp-opt,...): Removed
(ada-read-identifier): Fix xrefs on operators (for "mod", "and",
...) regexp-quote identifiers names to support operators +,
-,... in regexps.
(ada-remote): New function.
(ada-run-application): Erase the output buffer before starting the
run Support remote execution of the application. Use
call-process, or the arguments are incorrectly parsed
(ada-set-default-project-file): Reread the content of the active
project file, not the one from the current buffer When a project
file is set as the default project, all directories are
automatically associated with it.
(ada-set-environment): New function
(ada-treat-cmd-string): New special variable ${current}
(ada-treat-cmd-string): Revised. The substitution is now done for
any ${...} substring
(ada-xref-current): If no body was found, compiles the spec
instead. Setup ADA_{SOURCE,OBJECTS}_PATH before running the
compiler to get rid of command line length limitations.
(ada-xref-get-project-field): New function
(ada-xref-project-files): New variable
(ada-xref-runtime-library-specs-path)
(ada-xref-runtime-library-ali-path): New variables
(ada-xref-set-default-prj-values): Default run command now does a
cd to the build directory. New field: main_unit Provide a default
file name even if the current buffer has no prj file.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 24 Jul 2000 11:13:11 +0000 |
parents | 3a33e6b4847d |
children | 695cf19ef79e d7ddb3e565de |
rev | line source |
---|---|
486 | 1 /* Cursor motion calculation definitions for GNU Emacs |
2 Copyright (C) 1985, 1989 Free Software Foundation, Inc. | |
3 | |
4 This file is part of GNU Emacs. | |
5 | |
6 GNU Emacs is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
12244 | 8 the Free Software Foundation; either version 2, or (at your option) |
486 | 9 any later version. |
10 | |
11 GNU Emacs is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GNU Emacs; see the file COPYING. If not, write to | |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
12244
diff
changeset
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
12244
diff
changeset
|
19 Boston, MA 02111-1307, USA. */ |
486 | 20 |
21 /* Holds the minimum and maximum costs for the parametrized capabilities. */ | |
22 struct parmcap | |
23 { | |
24 int mincost, maxcost; | |
25 }; | |
26 | |
27 /* This structure holds everything needed to do cursor motion except the pad | |
28 character (PC) and the output speed of the terminal (ospeed), which | |
29 termcap wants in global variables. */ | |
30 | |
31 struct cm | |
32 { | |
33 /* Cursor position. -1 in *both* variables means the cursor | |
34 position is unknown, in order to force absolute cursor motion. */ | |
35 | |
36 int cm_curY; /* Current row */ | |
37 int cm_curX; /* Current column */ | |
38 | |
39 /* Capabilities from termcap */ | |
40 char *cm_up; /* up (up) */ | |
41 char *cm_down; /* down (do) */ | |
42 char *cm_left; /* left (le) */ | |
43 char *cm_right; /* right (nd) */ | |
44 char *cm_home; /* home (ho) */ | |
45 char *cm_cr; /* carriage return (cr) */ | |
46 char *cm_ll; /* last line (ll) */ | |
47 char *cm_tab; /* tab (ta) */ | |
48 char *cm_backtab; /* backtab (bt) */ | |
49 char *cm_abs; /* absolute (cm) */ | |
50 char *cm_habs; /* horizontal absolute (ch) */ | |
51 char *cm_vabs; /* vertical absolute (cv) */ | |
52 #if 0 | |
53 char *cm_ds; /* "don't send" string (ds) */ | |
54 #endif | |
55 char *cm_multiup; /* multiple up (UP) */ | |
56 char *cm_multidown; /* multiple down (DO) */ | |
57 char *cm_multileft; /* multiple left (LE) */ | |
58 char *cm_multiright; /* multiple right (RI) */ | |
59 int cm_cols; /* number of cols on screen (co) */ | |
60 int cm_rows; /* number of rows on screen (li) */ | |
61 int cm_tabwidth; /* tab width (it) */ | |
62 unsigned int cm_autowrap:1; /* autowrap flag (am) */ | |
63 unsigned int cm_magicwrap:1; /* VT-100: cursor stays in last col but | |
64 will cm_wrap if next char is | |
65 printing (xn) */ | |
66 unsigned int cm_usetabs:1; /* if set, use tabs */ | |
67 unsigned int cm_losewrap:1; /* if reach right margin, forget cursor | |
68 location */ | |
69 unsigned int cm_autolf:1; /* \r performs a \r\n (rn) */ | |
70 | |
71 /* Parametrized capabilities. This needs to be a struct since | |
72 the costs are accessed through pointers. */ | |
73 | |
74 #if 0 | |
75 struct parmcap cc_abs; /* absolute (cm) */ | |
76 struct parmcap cc_habs; /* horizontal absolute (ch) */ | |
77 struct parmcap cc_vabs; /* vertical absolute (cv) */ | |
78 struct parmcap cc_multiup; /* multiple up (UP) */ | |
79 struct parmcap cc_multidown; /* multiple down (DO) */ | |
80 struct parmcap cc_multileft; /* multiple left (LE) */ | |
81 struct parmcap cc_multiright; /* multiple right (RI) */ | |
82 #endif | |
83 | |
84 /* Costs for the non-parametrized capabilities */ | |
85 int cc_up; /* cost for up */ | |
86 int cc_down; /* etc. */ | |
87 int cc_left; | |
88 int cc_right; | |
89 int cc_home; | |
90 int cc_cr; | |
91 int cc_ll; | |
92 int cc_tab; | |
93 int cc_backtab; | |
94 /* These are temporary, until the code is installed to use the | |
95 struct parmcap fields above. */ | |
96 int cc_abs; | |
97 int cc_habs; | |
98 int cc_vabs; | |
99 }; | |
100 | |
101 extern struct cm Wcm; /* Terminal capabilities */ | |
102 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
|
103 |
486 | 104 /* Shorthand */ |
105 #ifndef NoCMShortHand | |
106 #define curY Wcm.cm_curY | |
107 #define curX Wcm.cm_curX | |
108 #define Up Wcm.cm_up | |
109 #define Down Wcm.cm_down | |
110 #define Left Wcm.cm_left | |
111 #define Right Wcm.cm_right | |
112 #define Tab Wcm.cm_tab | |
113 #define BackTab Wcm.cm_backtab | |
114 #define TabWidth Wcm.cm_tabwidth | |
115 #define CR Wcm.cm_cr | |
116 #define Home Wcm.cm_home | |
117 #define LastLine Wcm.cm_ll | |
118 #define AbsPosition Wcm.cm_abs | |
119 #define ColPosition Wcm.cm_habs | |
120 #define RowPosition Wcm.cm_vabs | |
121 #define MultiUp Wcm.cm_multiup | |
122 #define MultiDown Wcm.cm_multidown | |
123 #define MultiLeft Wcm.cm_multileft | |
124 #define MultiRight Wcm.cm_multiright | |
125 #define AutoWrap Wcm.cm_autowrap | |
126 #define MagicWrap Wcm.cm_magicwrap | |
127 #define UseTabs Wcm.cm_usetabs | |
776 | 128 #define FrameRows Wcm.cm_rows |
129 #define FrameCols Wcm.cm_cols | |
486 | 130 |
131 #define UpCost Wcm.cc_up | |
132 #define DownCost Wcm.cc_down | |
133 #define LeftCost Wcm.cc_left | |
134 #define RightCost Wcm.cc_right | |
135 #define HomeCost Wcm.cc_home | |
136 #define CRCost Wcm.cc_cr | |
137 #define LastLineCost Wcm.cc_ll | |
138 #define TabCost Wcm.cc_tab | |
139 #define BackTabCost Wcm.cc_backtab | |
140 #define AbsPositionCost Wcm.cc_abs | |
141 #define ColPositionCost Wcm.cc_habs | |
142 #define RowPositionCost Wcm.cc_vabs | |
143 #define MultiUpCost Wcm.cc_multiup | |
144 #define MultiDownCost Wcm.cc_multidown | |
145 #define MultiLeftCost Wcm.cc_multileft | |
146 #define MultiRightCost Wcm.cc_multiright | |
147 #endif | |
148 | |
149 #define cmat(row,col) (curY = (row), curX = (col)) | |
150 #define cmplus(n) \ | |
151 { \ | |
776 | 152 if ((curX += (n)) >= FrameCols && !MagicWrap) \ |
486 | 153 { \ |
154 if (Wcm.cm_losewrap) losecursor (); \ | |
155 else if (AutoWrap) curX = 0, curY++; \ | |
156 else curX--; \ | |
157 } \ | |
158 } | |
159 | |
160 #define losecursor() (curX = -1, curY = -1) | |
161 | |
162 extern int cost; | |
163 extern int evalcost (); | |
164 | |
10438 | 165 extern void cmcheckmagic (); |
8986
331db4842ffb
(cmputc): Return int rather than void.
Richard M. Stallman <rms@gnu.org>
parents:
776
diff
changeset
|
166 extern int cmputc (); |
21516
73d30d93f2b6
Update return types of declarations.
Andreas Schwab <schwab@suse.de>
parents:
19023
diff
changeset
|
167 extern void cmcostinit (); |
73d30d93f2b6
Update return types of declarations.
Andreas Schwab <schwab@suse.de>
parents:
19023
diff
changeset
|
168 extern void cmgoto (); |
73d30d93f2b6
Update return types of declarations.
Andreas Schwab <schwab@suse.de>
parents:
19023
diff
changeset
|
169 extern void Wcm_clear (); |
486 | 170 extern int Wcm_init (); |