1 /* -*- tab-width: 4 -*-
2  *
3  * Electric(tm) VLSI Design System
4  *
5  * File: usr.h
6  * User interface tool: header file
7  * Written by: Steven M. Rubin, Static Free Software
8  *
9  * Copyright (c) 2000 Static Free Software.
10  *
11  * Electric(tm) is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * Electric(tm) is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with Electric(tm); see the file COPYING.  If not, write to
23  * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
24  * Boston, Mass 02111-1307, USA.
25  *
26  * Static Free Software
27  * 4119 Alpine Road
28  * Portola Valley, California 94028
29  * info@staticfreesoft.com
30  */
31 
32 #if defined(__cplusplus) && !defined(ALLCPLUSPLUS)
33 extern "C"
34 {
35 #endif
36 
37 /******************** CONSTANTS ********************/
38 
39 /* the meaning of NODEINST->userbits: (other bit (0137400177) used globally) */
40 #define KILLN                   0200		/* if on, this nodeinst is marked for death */
41 #define REWANTN                 0400		/* nodeinst re-drawing is scheduled */
42 #define RELOCLN                01000		/* only local nodeinst re-drawing desired */
43 #define RETDONN                02000		/* transparent nodeinst re-draw is done */
44 #define REODONN                04000		/* opaque nodeinst re-draw is done */
45 #define NODEFLAGBIT           010000		/* general flag used in spreading and highlighting */
46 #define WANTEXP               020000		/* if on, nodeinst wants to be (un)expanded */
47 #define TEMPFLG               040000		/* temporary flag for nodeinst display */
48 #define HARDSELECTN          0100000		/* set if hard to select */
49 #define NVISIBLEINSIDE     040000000		/* set if node only visible inside cell */
50 
51 /* the meaning of ARCINST->userbits: (bits 0-1, 4-24 (0177777763) used globally) */
52 #define KILLA             0200000000		/* if on, this arcinst is marked for death */
53 #define REWANTA           0400000000		/* arcinst re-drawing is scheduled */
54 #define RELOCLA          01000000000		/* only local arcinst re-drawing desired */
55 #define RETDONA          02000000000		/* transparent arcinst re-draw is done */
56 #define REODONA          04000000000		/* opaque arcinst re-draw is done */
57 #define ARCFLAGBIT      010000000000		/* general flag used in spreading and highlighting */
58 #define HARDSELECTA     020000000000		/* set if hard to select */
59 
60 /* the meaning of NODEPROTO->userbits: (bits 0-23 (077777777) used globally) */
61 #define NHASOPA           0100000000		/* set if prototype has opaque graphics */
62 #define NFIRSTOPA       017600000000		/* index of first opaque layer (if any) */
63 #define NFIRSTOPASH               25		/* right shift of NFIRSTOPA */
64 #define NINVISIBLE      020000000000		/* set if primitive is invisible */
65 
66 	/* the meaning of ARCPROTO->userbits: (bits 0-22,31 (020037777777) used globally) */
67 #define CANCONNECT         040000000		/* temporary for finding port connections */
68 #define AHASOPA           0100000000		/* set if prototype has opaque graphics */
69 #define AFIRSTOPA        07600000000		/* index of first opaque layer (if any) */
70 #define AINVISIBLE      010000000000		/* set if arc is invisible */
71 #define AFIRSTOPASH               25		/* right shift of AFIRSTOPA */
72 
73 /* the meaning of PORTPROTO->userbits: (bits 0-31 used globally) */
74 
75 /* the meaning of "us_tool->toolstate" (bits 0-6 (0177) used globally) */
76 #define NOKEYLOCK            0200000		/* set to ignore key lockout after errors */
77 #define JUSTTHEFACTS         0400000		/* set to print only informative messages */
78 #define NODETAILS           01000000		/* set to make no mention of specific commands */
79 #define USEDIALOGS          02000000		/* set to use dialogs where appropriate */
80 #define ONESHOTMENU         04000000		/* set to have fixed menus highlight in one-shot mode */
81 #define INTERACTIVE        010000000		/* set if cursor commands drag */
82 #define INTEGRAL           020000000		/* set if windows must be integral pixels */
83 #define ECHOBIND           040000000		/* set to echo bound commands in full */
84 #define MENUON            0100000000		/* set if menu is on */
85 #define SHOWXY            0200000000		/* set to display cursor rather than TECH/LAMBDA */
86 #define TTYAUDIT          0400000000		/* set to log messages window */
87 #define TERMBEEP         01000000000		/* set to enable terminal beep */
88 #define TERMNOINTERRUPT  02000000000		/* set to disable interrupts */
89 
90 /* the meaning of "tool:user.USER_optionflags" */
91 #define NOTEXTSELECT                  01	/* set to disable selection of ALL text unless "special" option used */
92 #define DRAWTINYCELLS                 02	/* clear to "hash-out" tiny cells */
93 #define CHECKDATE                     04	/* set to check cell dates */
94 #define NOEXTRASOUND                 010	/* set to disable extra sounds (like arc-creation clicks) */
95 #define NOPRIMCHANGES                020	/* set to lock lockable primitives */
96 #define PORTLABELS                  0700	/* bits for port labels */
97 #define PORTLABELSSH                   6	/* right shift for port labels */
98 #define PORTSFULL                      0	/* ports as complete text */
99 #define PORTSCROSS                  0100	/* ports drawn as crosses */
100 #define PORTSSHORT                  0300	/* ports drawn as shortened text */
101 
102 #define NOINSTANCESELECT           02000	/* set to disable selection of instances unless "special" option used */
103 #define NOMOVEAFTERDUP             04000	/* set to disable moving of objects after duplication */
104 #define DUPCOPIESPORTS            010000	/* set to have duplication/array/extract copy ports */
105 #define NO3DPERSPECTIVE           020000	/* set to turn off perspective in 3D view */
106 #define EXPANDEDDIALOGSDEF        040000	/* set to have expanded dialogs default to expanded */
107 #define CENTEREDPRIMITIVES       0100000	/* set to place primitives by centers */
108 #define AUTOSWITCHTECHNOLOGY     0200000	/* set to switch technology when cell changes */
109 #define EXPORTLABELS            01400000	/* bits for export labels */
110 #define EXPORTLABELSSH                17	/* right shift for export labels */
111 #define EXPORTSFULL                    0	/* exports drawn as complete text */
112 #define EXPORTSCROSS             0400000	/* exports drawn as crosses */
113 #define EXPORTSSHORT            01400000	/* exports drawn as shortened text */
114 #define MOVENODEWITHEXPORT      02000000	/* move node when export text is moved */
115 #define NODATEORVERSION         04000000	/* set to supress date/version in output files */
116 #define BEEPAFTERLONGJOB       010000000	/* set to beep after a long job */
117 #define CELLCENTERALWAYS       020000000	/* set to place cell-center in new cells */
118 #define MUSTENCLOSEALL         040000000	/* set to force area-selection to completely enclose objects */
119 #define HIDETXTNODE           0100000000	/* set to supress node text */
120 #define HIDETXTARC            0200000000	/* set to supress arc text */
121 #define HIDETXTPORT           0400000000	/* set to supress port text */
122 #define HIDETXTEXPORT        01000000000	/* set to supress export text */
123 #define HIDETXTNONLAY        02000000000	/* set to supress nonlayout text */
124 #define HIDETXTINSTNAME      04000000000	/* set to supress instance name text */
125 #define HIDETXTCELL         010000000000	/* set to supress cell text */
126 #define NOPROMPTBEFOREWRITE 020000000000	/* set to disable file name dialog before writing output files */
127 
128 /* the meaning of "JAVA_flags" on the user tool object */
129 #define JAVANOCOMPILER             1		/* disable compiler */
130 #define JAVANOEVALUATE             2		/* do not evaluate code */
131 #define JAVAUSEJOSE                4		/* Use Jose */
132 
133 /* special keys */
134 #define CTRLCKEY                  03		/* the Control-C key */
135 #define CTRLDKEY                  04		/* the Control-D key */
136 #define BACKSPACEKEY             010		/* the BACKSPACE key */
137 #define TABKEY                   011		/* the TAB key */
138 #define ESCKEY                   033		/* the Escape key */
139 #define DELETEKEY               0177		/* the DELETE key */
140 
141 /* the O/S capabilities */
142 #define CANLOGINPUT               01		/* can log input for playback */
143 #define CANUSEFRAMES              02		/* can display multiple window frames */
144 #define CANSHOWPOPUP              04		/* can display popup menus */
145 #define CANRUNPROCESS            010		/* can run subprocesses (fork and exec) */
146 #define CANHAVENOWINDOWS         020		/* can exist with no edit windows */
147 #define CANSTATUSPERFRAME        040		/* can put separate status info in each frame */
148 #define CANCHOOSEFACES          0100		/* can choose alternate type faces */
149 #define CANMODIFYFONTS          0200		/* can modify fonts with italic, bold, etc. */
150 #define CANSCALEFONTS           0400		/* can scale fonts smoothly */
151 #define CANDOTHREADS           01000		/* can handle threads */
152 #define CANHAVEQUITCOMMAND     02000		/* can have quit command in menu */
153 
154 /* the icon styles (in tool:user.USER_icon_style) */
155 #define ICONSTYLESIDEIN             03			/* side number for input ports     (         */
156 #define ICONSTYLESIDEINSH            0			/* shift for ICONSTYLESIDEIN */
157 #define ICONSTYLESIDEOUT           014			/* side number for input ports      0=left   */
158 #define ICONSTYLESIDEOUTSH           2			/* shift for ICONSTYLESIDEOUT */
159 #define ICONSTYLESIDEBIDIR         060			/* side number for input ports      1=right  */
160 #define ICONSTYLESIDEBIDIRSH         4			/* shift for ICONSTYLESIDEBIDIR */
161 #define ICONSTYLESIDEPOWER        0300			/* side number for input ports      2=top    */
162 #define ICONSTYLESIDEPOWERSH         6			/* shift for ICONSTYLESIDEPOWER */
163 #define ICONSTYLESIDEGROUND      01400			/* side number for input ports      3=bottom */
164 #define ICONSTYLESIDEGROUNDSH        8			/* shift for ICONSTYLESIDEGROUND */
165 #define ICONSTYLESIDECLOCK       06000			/* side number for input ports     )         */
166 #define ICONSTYLESIDECLOCKSH        10			/* shift for ICONSTYLESIDECLOCK */
167 #define ICONSTYLEPORTLOC       0140000			/* location of ports */
168 #define ICONSTYLEPORTLOCSH          14			/* shift for ICONSTYLEPORTLOC */
169 #define ICONSTYLEPORTSTYLE     0600000			/* style of port text */
170 #define ICONSTYLEPORTSTYLESH        16			/* shift for ICONSTYLEPORTSTYLE */
171 #define ICONSTYLEDRAWNOLEADS  01000000			/* nonzero to remove leads */
172 #define ICONSTYLEDRAWNOBODY   02000000			/* nonzero to remove body */
173 #define ICONSTYLETECH        014000000			/* technology of ports  0=generic, 1=schematic */
174 #define ICONSTYLETECHSH             20			/* shift for ICONSTYLETECH */
175 #define ICONINSTLOC          060000000			/* instance location */
176 #define ICONINSTLOCSH               22			/* shift for ICONINSTLOC */
177 #define ICONSTYLEREVEXPORT  0100000000			/* nonzero to reverse export order */
178 
179 #define ICONSTYLEDEFAULT (0<<ICONSTYLESIDEINSH) | (1<<ICONSTYLESIDEOUTSH) | \
180 						 (2<<ICONSTYLESIDEBIDIRSH) | (3<<ICONSTYLESIDEPOWERSH) | \
181 						 (3<<ICONSTYLESIDEGROUNDSH) | (0<<ICONSTYLESIDECLOCKSH) | \
182 						 (1<<ICONSTYLEPORTLOCSH) | (0<<ICONSTYLEPORTSTYLESH) | \
183 						 (0<<ICONSTYLETECHSH)
184 #define ICONLEADDEFLEN   2
185 #define ICONLEADDEFSEP   2
186 
187 /* the "style" parameter to "us_getcolormap()" */
188 #define COLORSEXISTING             0		/* reload existing colors */
189 #define COLORSDEFAULT              1		/* load default colors (gray background) */
190 #define COLORSBLACK                2		/* load black background colors */
191 #define COLORSWHITE                3		/* load white background colors */
192 
193 /* editor defaults in the user interface */
194 #define DEFAULTBUTTONHANDLER     us_buttonhandler
195 #define DEFAULTCHARHANDLER       us_charhandler
196 #define DEFAULTCHANGEHANDLER       0
197 #define DEFAULTTERMHANDLER         0
198 #define DEFAULTREDISPHANDLER     us_redisplay
199 
200 /* the values in call to "us_gethighlighted()" */
201 #define WANTNODEINST                1		/* want nodes */
202 #define WANTARCINST                 2		/* want arcs */
203 
204 /* the meaning of "us_state" */
205 #define COMMANDFAILED             01		/* set if current command has error */
206 #define SKIPKEYS                  02		/* set to ignore further single-key commands */
207 #define GOTXY                     04		/* set if X/Y co-ordinates are known */
208 #define LANGLOOP                 010		/* set if interpreting language code */
209 #define HIGHLIGHTSET             020		/* set if highlighting turned on in broadcast */
210 #define DIDINPUT                 040		/* set if just did input but haven't executed yet */
211 #define MACROTERMINATED         0100		/* set if macro has terminated early */
212 #define SNAPMODE               03600		/* snapping mode bits */
213 #define SNAPMODENONE               0		/* snapping mode: none */
214 #define SNAPMODECENTER          0200		/* snapping mode: center (circles, arcs) */
215 #define SNAPMODEMIDPOINT        0400		/* snapping mode: midpoint (lines) */
216 #define SNAPMODEENDPOINT        0600		/* snapping mode: endpoint (lines, arcs) */
217 #define SNAPMODETANGENT        01000		/* snapping mode: tangent (circles, arcs) */
218 #define SNAPMODEPERP           01200		/* snapping mode: perpendicular (lines, arcs, circles) */
219 #define SNAPMODEQUAD           01400		/* snapping mode: quadrant (circles, arcs) */
220 #define SNAPMODEINTER          01600		/* snapping mode: any intersection */
221 #define NONOVERLAPPABLEDISPLAY 04000		/* set to disallow overlappable layers in display */
222 #define NONPERSISTENTCURNODE  010000		/* clear to have current node be persistent */
223 #define CURCELLCHANGED        020000		/* set if current cell changed */
224 #define MEASURINGDISTANCE     040000		/* set if measuring distance */
225 #define MEASURINGDISTANCEINI 0100000		/* set if measurement initializing */
226 
227 /* cursor definitions */
228 #define NORMALCURSOR               0		/* a normal arrow cursor */
229 #define WANTTTYCURSOR              1		/* a "use the TTY" cursor */
230 #define PENCURSOR                  2		/* a "pen" cursor */
231 #define NULLCURSOR                 3		/* a null cursor */
232 #define MENUCURSOR                 4		/* a menu selection cursor */
233 #define HANDCURSOR                 5		/* a hand cursor (for dragging) */
234 #define TECHCURSOR                 6		/* the technology edit cursor ("T") */
235 #define IBEAMCURSOR                7		/* the text edit cursor ("I") */
236 #define WAITCURSOR                 8		/* the hourglass cursor */
237 #define LRCURSOR                   9		/* a left/right pointing cursor */
238 #define UDCURSOR                  10		/* an up/down pointing cursor */
239 
240 #define MESSAGESWIDTH             80		/* width of messages window */
241 #define DEFAULTEXPLORERTEXTSIZE   12		/* default size of text in explorer window */
242 
243 #define DISPLAYSMALLSHIFT         20		/* fraction of screen that shifts when arrows are clicked */
244 #define DISPLAYLARGESHIFT          2		/* fraction of screen that shifts when scrollbar is clicked */
245 
246 /******************** VARIABLES ********************/
247 
248 /* static display information */
249 extern INTBIG       us_longcount;			/* number of long commands */
250 extern void       (*us_displayroutine)(POLYGON*, WINDOWPART*); /* routine for graphics display */
251 extern INTBIG       us_cursorstate;			/* see defines above */
252 extern INTBIG       us_normalcursor;		/* default cursor to use */
253 extern BOOLEAN      us_optionschanged;		/* true if options changed */
254 extern INTBIG       us_layer_letters_key;	/* variable key for "USER_layer_letters" */
255 extern INTBIG       us_highlightedkey;		/* variable key for "USER_highlighted" */
256 extern INTBIG       us_highlightstackkey;	/* variable key for "USER_highlightstack" */
257 extern INTBIG       us_binding_keys_key;	/* variable key for "USER_binding_keys" */
258 extern INTBIG       us_binding_buttons_key;	/* variable key for "USER_binding_buttons" */
259 extern INTBIG       us_binding_menu_key;	/* variable key for "USER_binding_menu" */
260 extern INTBIG       us_current_node_key;	/* variable key for "USER_current_node" */
261 extern INTBIG       us_current_arc_key;		/* variable key for "USER_current_arc" */
262 extern INTBIG       us_placement_angle_key;	/* variable key for "USER_placement_angle" */
263 extern INTBIG       us_alignment_ratio_key;	/* variable key for "USER_alignment_ratio" */
264 extern INTBIG       us_alignment_edge_ratio_key;/* variable key for "USER_alignment_edge_ratio" */
265 extern INTBIG       us_arcstylekey;			/* variable key for "USER_arc_style" */
266 extern INTBIG       us_current_technology_key;	/* variable key for "USER_current_technology" */
267 extern INTBIG       us_current_window_key;	/* variable key for "USER_current_window" */
268 extern INTBIG       us_current_constraint_key;	/* variable key for "USER_current_constraint" */
269 extern INTBIG       us_colormap_red_key;	/* variable key for "USER_colormap_red" */
270 extern INTBIG       us_colormap_green_key;	/* variable key for "USER_colormap_green" */
271 extern INTBIG       us_colormap_blue_key;	/* variable key for "USER_colormap_blue" */
272 extern INTBIG       us_copyright_file_key;	/* variable key for "USER_copyright_file" */
273 extern INTBIG       us_menu_position_key;	/* variable key for "USER_colormap_position" */
274 extern INTBIG       us_menu_x_key;			/* variable key for "USER_colormap_x" */
275 extern INTBIG       us_menu_y_key;			/* variable key for "USER_colormap_y" */
276 extern INTBIG       us_macrorunningkey;		/* variable key for "USER_macrorunning" */
277 extern INTBIG       us_macrobuildingkey;	/* variable key for "USER_macrobuilding" */
278 extern INTBIG       us_text_editorkey;		/* variable key for "USER_text_editor" */
279 extern INTBIG       us_optionflagskey;		/* variable key for "USER_optionflags" */
280 extern INTBIG       us_gridfloatskey;		/* variable key for "USER_grid_floats" */
281 extern INTBIG       us_gridboldspacingkey;	/* variable key for "USER_grid_bold_spacing" */
282 extern INTBIG       us_quickkeyskey;		/* variable key for "USER_quick_keys" */
283 extern INTBIG       us_interactiveanglekey;	/* variable key for "USER_interactive_angle" */
284 extern INTBIG       us_tinylambdaperpixelkey;	/* variable key for "USER_tiny_lambda_per_pixel" */
285 extern INTBIG       us_ignoreoptionchangeskey;	/* variable key for "USER_ignore_option_changes" */
286 extern INTBIG       us_displayunitskey;		/* variable key for "USER_display_units" */
287 extern INTBIG       us_electricalunitskey;	/* variable key for "USER_electrical_units" */
288 extern INTBIG       us_motiondelaykey;		/* variable key for "USER_motion_delay" */
289 extern INTBIG       us_java_flags_key;		/* variable key for "JAVA_flags" */
290 extern INTBIG       us_edtec_option_key;	/* variable key for "EDTEC_option" */
291 
292 extern INTBIG       us_electricalunits;		/* mirror for "USER_electrical_units" */
293 extern INTBIG       us_javaflags;			/* mirror for "JAVA_flags" */
294 extern INTBIG       us_useroptions;			/* mirror for "USER_optionflags" */
295 extern INTBIG       us_tinyratio;			/* mirror for "USER_tiny_lambda_per_pixel" */
296 extern INTBIG       us_separatechar;		/* separating character in port names */
297 
298 /* file type descriptors */
299 extern INTBIG       us_filetypecolormap;	/* Color map */
300 extern INTBIG       us_filetypehelp;		/* Help */
301 extern INTBIG       us_filetypelog;			/* Log */
302 extern INTBIG       us_filetypemacro;		/* Macro */
303 extern INTBIG       us_filetypenews;		/* News */
304 
305 /* internal state */
306 extern INTBIG       us_state;				/* miscellaneous state of user interface */
307 
308 /* user interface state */
309 extern NODEPROTO   *us_curnodeproto;		/* current nodeproto */
310 extern ARCPROTO    *us_curarcproto;			/* current arcproto */
311 extern INTBIG       us_alignment_ratio;		/* current alignment in fractional units */
312 extern INTBIG       us_edgealignment_ratio;	/* current edge alignment in fractional units */
313 extern BOOLEAN      us_dupdistset;			/* true if duplication distance is valid */
314 extern NODEINST    *us_dupnode;				/* a node that was duplicated */
315 extern LIBRARY     *us_clipboardlib;		/* library with cut/copy/paste cell */
316 extern NODEPROTO   *us_clipboardcell;		/* cell with cut/copy/paste objects */
317 extern INTBIG       us_dupx, us_dupy;		/* amount to move duplicated objects */
318 extern WINDOWFRAME *us_menuframe;			/* window frame on which menu resides */
319 #ifndef USEQT
320 extern INTSML       us_erasech, us_killch;	/* the erase and kill characters */
321 #endif
322 extern INTBIG       us_menux, us_menuy;		/* number of menu elements on the screen */
323 extern INTBIG       us_menupos;				/* position: 0:top 1:bottom 2:left 3:right */
324 extern INTBIG       us_menuxsz,us_menuysz;	/* size of menu elements */
325 extern INTBIG       us_menuhnx,us_menuhny;	/* highlighted nodeinst menu entry */
326 extern INTBIG       us_menuhax,us_menuhay;	/* highlighted arcinst menu entry */
327 extern INTBIG       us_menulx,us_menuhx;	/* X: low and high of menu area */
328 extern INTBIG       us_menuly,us_menuhy;	/* Y: low and high of menu area */
329 extern INTBIG       us_lastmeasurex, us_lastmeasurey;	/* last measured distance */
330 extern BOOLEAN      us_validmesaure;		/* true if a measure was done */
331 extern INTBIG       us_explorerratio;		/* percentage of window used by cell explorer */
332 extern FILE        *us_logrecord;			/* logging record file */
333 extern FILE        *us_logplay;				/* logging playback file */
334 extern FILE        *us_termaudit;			/* messages window auditing file */
335 extern FILE        *us_tracefile;			/* trace file */
336 extern INTBIG       us_logflushfreq;		/* session logging flush frequency */
337 extern INTBIG       us_quickkeyfactcount;	/* number of quick keys in "factory" setup */
338 extern CHAR       **us_quickkeyfactlist;	/* quick keys in "factory" setup */
339 extern INTBIG       us_lastcommandcount;	/* the keyword count for the last command set by the "remember" command */
340 extern INTBIG       us_lastcommandtotal;	/* size of keyword array for the last command set by the "remember" command */
341 extern CHAR       **us_lastcommandpar;		/* the keywords for the last command set by the "remember" command */
342 
343 /******************** HIGHLIGHT MODULES ********************/
344 
345 /*
346  * Highlight modules contain the following:
347  *
348  *  status   fromgeom  fromport   frompoint  fromvar     cell         what is selected
349  * ========  ========  =========  =========  ========  =========  ============================
350  * HIGHFROM  nodeinst  ---------  ---------  --------  nodeproto  node
351  * HIGHFROM  arcinst   ---------  ---------  --------  nodeproto  arc
352  * HIGHFROM  nodeinst  portproto  ---------  --------  nodeproto  node and port
353  * HIGHFROM  nodeinst  ---------  integer    --------  nodeproto  node and outline point
354  * HIGHTEXT  nodeinst  ---------  ---------  variable  nodeproto  displayable variable on node
355  * HIGHTEXT  arcinst   ---------  ---------  variable  nodeproto  displayable variable on arc
356  * HIGHTEXT  nodeinst  portproto  ---------  variable  nodeproto  displayable variable on port
357  * HIGHTEXT  --------  ---------  ---------  variable  nodeproto  displayable variable on cell
358  * HIGHTEXT  nodeinst  portproto  ---------  --------  nodeproto  port name
359  * HIGHTEXT  nodeinst  ---------  ---------  --------  nodeproto  node name
360  * HIGHBBOX  --------  ---------  ---------  --------  nodeproto  bounding box
361  * HIGHLINE  --------  ---------  ---------  --------  nodeproto  line
362  */
363 
364 #define NOHIGHLIGHT ((HIGHLIGHT *)-1)
365 #define HIGHFROM                  01		/* set to display "from" object */
366 #define HIGHBBOX                  04		/* set to display bounding box */
367 #define HIGHLINE                 010		/* set to display a line */
368 #define HIGHTEXT                 020		/* set to display text */
369 #define HIGHTYPE                 037		/* the above highlight types */
370 #define HIGHEXTRA                040		/* set to display extra information */
371 #define HIGHSNAP                0100		/* set if snap point selected */
372 #define HIGHSNAPTAN             0200		/* set if tangent snap point selected */
373 #define HIGHSNAPPERP            0400		/* set if perpendicular snap point selected */
374 #define HIGHNOBOX              01000		/* set to disable basic selection box */
375 
376 typedef struct Ihighlight
377 {
378 	struct Ihighlight *nexthighlight;		/* next in linked list */
379 	INTBIG            status;				/* nature of this highlighting (see above) */
380 	NODEPROTO        *cell;					/* the cell containing this highlight */
381 	GEOM             *fromgeom;				/* "from" object: geometry module */
382 	PORTPROTO        *fromport;				/* "from" object: port on node */
383 	INTBIG            frompoint;			/* "from" object: polygon vertex */
384 	VARIABLE         *fromvar;				/* "from" object: variable with text */
385 	VARIABLE         *fromvarnoeval;		/* "from" object: unevaluated variable with text */
386 	INTBIG            snapx, snapy;			/* HIGHSNAP: coordinate of snap point */
387 	INTBIG            stalx,staly;			/* HIGHBBOX: lower corner HIGHLINE: point 1 */
388 	INTBIG            stahx,stahy;			/* HIGHBBOX: upper corner HIGHLINE: point 2 */
389 } HIGHLIGHT;
390 
391 /******************** MACRO PACKAGE MODULES ********************/
392 
393 #define NOMACROPACK ((MACROPACK *)-1)
394 
395 typedef struct Imacropack
396 {
397 	CHAR               *packname;			/* name of this macro package */
398 	INTBIG              total;				/* number of macros in this package */
399 	struct  Imacropack *nextmacropack;		/* next in list of macros */
400 } MACROPACK;
401 
402 extern MACROPACK *us_macropacktop;			/* top of list of defined macro packages */
403 extern MACROPACK *us_curmacropack;			/* current macro package */
404 
405 /******************** USER COMMAND MODULES ********************/
406 
407 #define NOUSERCOM     ((USERCOM *)-1)
408 #define NUMKEYS                  256		/* maximum keys on keyboard */
409 #define NUMBUTS                   45		/* maximum buttons on tablet/mouse */
410 
411 typedef struct Iusercom
412 {
413 	INTBIG             active;				/* command index (-1 if none) */
414 	CHAR              *comname;				/* name of this command */
415 	struct Ipopupmenu *menu;				/* pop-up menu to execute (if command is one) */
416 	CHAR              *message;				/* message to place in menu */
417 	NODEPROTO         *nodeglyph;			/* nodeproto glyph to display in menu */
418 	ARCPROTO          *arcglyph;			/* arcproto glyph to display in menu */
419 	INTBIG             count;				/* number of valid parameters */
420 	CHAR              *word[MAXPARS];		/* parameter from user */
421 	struct Iusercom   *nextcom;				/* next in list */
422 } USERCOM;
423 
424 extern USERCOM *us_usercomfree;				/* list of free user commands */
425 extern USERCOM *us_lastcom;					/* last command and arguments */
426 
427 /******************** POP-UP MENU MODULES ********************/
428 
429 #define NOPOPUPMENUITEM ((POPUPMENUITEM *)-1)
430 
431 typedef struct
432 {
433 	CHAR    *attribute;						/* attribute name */
434 	CHAR    *value;							/* value of the attribute (0 for none) */
435 	COMCOMP *valueparse;					/* command completion for "value" field */
436 	INTBIG   maxlen;						/* length of value field (-1 to preserve) */
437 	USERCOM *response;						/* command in this menu entry */
438 	BOOLEAN  changed;						/* true if value is changed */
439 } POPUPMENUITEM;
440 
441 #define NOPOPUPMENU ((POPUPMENU *)-1)
442 
443 typedef struct Ipopupmenu
444 {
445 	CHAR              *name;				/* pop-up menu name */
446 	POPUPMENUITEM     *list;				/* array of pop-up menu items */
447 	INTBIG             total;				/* number of items */
448 	CHAR              *header;				/* header information for the menu */
449 	struct Ipopupmenu *nextpopupmenu;		/* next in linked list */
450 } POPUPMENU;
451 
452 extern POPUPMENU *us_firstpopupmenu;		/* list of existing pop-up menus */
453 
454 /******************** PULLDOWN MENUS ********************/
455 
456 #define MENUBARHEIGHT             25		/* size in pixels */
457 
458 extern INTBIG      us_pulldownmenucount;	/* number of pulldown menus */
459 extern INTBIG     *us_pulldownmenupos;		/* position of pulldown menus */
460 extern POPUPMENU **us_pulldowns;			/* the current pulldown menus */
461 
462 /******************** BINDINGS ********************/
463 
464 typedef struct
465 {
466 	NODEPROTO *nodeglyph;					/* node to be drawn in the menu */
467 	ARCPROTO  *arcglyph;					/* arc to be drawn in the menu */
468 	INTBIG     backgroundcolor;				/* background color of the menu */
469 	INTBIG     menumessagesize;				/* size of text to be drawn in the menu */
470 	CHAR      *menumessage;					/* text to be drawn in the menu */
471 	POPUPMENU *popup;						/* popup menu that goes here */
472 	BOOLEAN    inputpopup;					/* true if the popup is input type */
473 	CHAR      *command;						/* command to execute */
474 } COMMANDBINDING;
475 
476 /******************** HOOKS TO DIALOGS IN OTHER TOOLS ********************/
477 
478 #define NODIALOGHOOK ((DIALOGHOOK *)-1)
479 
480 typedef struct IDialogHook
481 {
482 	CHAR               *terminputkeyword;
483 	COMCOMP            *getlinecomp;
484 	void              (*routine)(void);
485 	struct IDialogHook *nextdialoghook;
486 } DIALOGHOOK;
487 
488 /******************** STATUS BAR ********************/
489 
490 typedef struct
491 {
492 	INTBIG line;							/* line in status area where field resides */
493 	INTBIG startper, endper;				/* percentage of status line used by field */
494 	CHAR  *label;							/* field label */
495 } STATUSFIELD;
496 
497 extern STATUSFIELD *us_statusalign;			/* current node alignment */
498 extern STATUSFIELD *us_statusangle;			/* current placement angle */
499 extern STATUSFIELD *us_statusarc;			/* current arc prototype */
500 extern STATUSFIELD *us_statuscell;			/* current cell */
501 extern STATUSFIELD *us_statuscellsize;		/* current cell size */
502 extern STATUSFIELD *us_statusselectcount;	/* current selection count */
503 extern STATUSFIELD *us_statusgridsize;		/* current grid size */
504 extern STATUSFIELD *us_statuslambda;		/* current lambda */
505 extern STATUSFIELD *us_statusnode;			/* current node prototype */
506 extern STATUSFIELD *us_statustechnology;	/* current technology */
507 extern STATUSFIELD *us_statusxpos;			/* current x position */
508 extern STATUSFIELD *us_statusypos;			/* current y position */
509 extern STATUSFIELD *us_statusproject;		/* current project */
510 extern STATUSFIELD *us_statusroot;			/* current root */
511 extern STATUSFIELD *us_statuspart;			/* current part */
512 extern STATUSFIELD *us_statuspackage;		/* current package */
513 extern STATUSFIELD *us_statusselection;		/* current selection */
514 
515 /******************** EDITOR TABLE ********************/
516 
517 typedef struct
518 {
519 	CHAR    *editorname;							/* name of this editor */
520 	WINDOWPART *(*makeeditor)(WINDOWPART*, CHAR*, INTBIG*, INTBIG*);/* create new editor in window */
521 	void    (*terminate)(EDITOR*);						/* terminate editor */
522 	INTBIG  (*totallines)(WINDOWPART*);					/* report number of lines in editor buffer */
523 	CHAR   *(*getline)(WINDOWPART*, INTBIG);			/* get line from editor buffer */
524 	void    (*addline)(WINDOWPART*, INTBIG, CHAR*);		/* add line to editor buffer */
525 	void    (*replaceline)(WINDOWPART*, INTBIG, CHAR*);	/* replace line in editor */
526 	void    (*deleteline)(WINDOWPART*, INTBIG);			/* delete line in editor */
527 	void    (*highlightline)(WINDOWPART*, INTBIG, INTBIG);	/* highlight line in editor */
528 	void    (*suspendgraphics)(WINDOWPART*);			/* suspend display changes in editor */
529 	void    (*resumegraphics)(WINDOWPART*);				/* resume display changes in editor */
530 	void    (*writetextfile)(WINDOWPART*, CHAR*);		/* write editer buffer to file */
531 	void    (*readtextfile)(WINDOWPART*, CHAR*);		/* read file into editor */
532 	void    (*editorterm)(WINDOWPART*);					/* editor termination routine */
533 	void    (*shipchanges)(WINDOWPART*);				/* routine to force any changes out */
534 	BOOLEAN (*gotchar)(WINDOWPART*, INTSML, INTBIG);	/* character input routine */
535 	void    (*cut)(WINDOWPART*);						/* text cut routine */
536 	void    (*copy)(WINDOWPART*);						/* text copy routine */
537 	void    (*paste)(WINDOWPART*);						/* text paste routine */
538 	void    (*undo)(WINDOWPART*);						/* text undo routine */
539 	void    (*search)(WINDOWPART*, CHAR*, CHAR*, INTBIG);	/* text search/replace routine */
540 	void    (*pan)(WINDOWPART*, INTBIG, INTBIG);		/* pan window in direction */
541 } EDITORTABLE;
542 
543 extern EDITORTABLE us_editortable[];
544 extern INTBIG us_currenteditor;
545 
546 /******************** PARSING MODULES ********************/
547 
548 /* the main command table (with additional information) */
549 struct commandinfo
550 {
551 	CHAR    *name;							/* name of this command */
552 	void   (*routine)(INTBIG, CHAR*[]);		/* routine to execute this command */
553 	INTBIG   params;						/* number of parameters to command */
554 	COMCOMP *par[TEMPLATEPARS];				/* parameter types */
555 };
556 
557 /* defined in "usercom.c" */
558 extern struct commandinfo us_lcommand[];
559 
560 #define MAXKEYWORD               100		/* maximum keywords on input */
561 
562 extern KEYWORD *us_pathiskey;				/* the current keyword list */
563 
564 /******************** MIRRORING VARIABLES ********************/
565 
566 typedef struct
567 {
568 	INTBIG  *key;
569 	INTBIG  *value;
570 } VARMIRROR;
571 
572 /******************** PROTOTYPES ********************/
573 
574 /* prototypes for tool interface */
575 void   us_init(INTBIG*, CHAR1*[], TOOL*);
576 void   us_done(void);
577 void   us_set(INTBIG, CHAR*[]);
578 INTBIG us_request(CHAR*, va_list);
579 void   us_examinenodeproto(NODEPROTO*);
580 void   us_slice(void);
581 void   us_startbatch(TOOL*, BOOLEAN);
582 void   us_endbatch(void);
583 void   us_startobjectchange(INTBIG, INTBIG);
584 void   us_endobjectchange(INTBIG, INTBIG);
585 void   us_modifynodeinst(NODEINST*,INTBIG,INTBIG,INTBIG,INTBIG,INTBIG,INTBIG);
586 void   us_modifynodeproto(NODEPROTO*);
587 void   us_modifydescript(INTBIG, INTBIG, INTBIG, UINTBIG*);
588 void   us_newobject(INTBIG, INTBIG);
589 void   us_killobject(INTBIG, INTBIG);
590 void   us_newvariable(INTBIG, INTBIG, INTBIG, INTBIG);
591 void   us_killvariable(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, UINTBIG*);
592 void   us_modifyvariable(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
593 void   us_readlibrary(LIBRARY*);
594 void   us_eraselibrary(LIBRARY*);
595 void   us_writelibrary(LIBRARY*, BOOLEAN);
596 
597 /* prototypes for user commands */
598 void us_arc(INTBIG, CHAR*[]);
599 void us_array(INTBIG, CHAR*[]);
600 void us_bind(INTBIG, CHAR*[]);
601 void us_color(INTBIG, CHAR*[]);
602 void us_commandfile(INTBIG, CHAR*[]);
603 void us_constraint(INTBIG, CHAR*[]);
604 void us_copycell(INTBIG, CHAR*[]);
605 void us_create(INTBIG, CHAR*[]);
606 void us_debug(INTBIG, CHAR*[]);
607 void us_defarc(INTBIG, CHAR*[]);
608 void us_defnode(INTBIG, CHAR*[]);
609 void us_duplicate(INTBIG, CHAR*[]);
610 void us_echo(INTBIG, CHAR*[]);
611 void us_editcell(INTBIG, CHAR*[]);
612 void us_erase(INTBIG, CHAR*[]);
613 void us_find(INTBIG, CHAR*[]);
614 void us_getproto(INTBIG, CHAR*[]);
615 void us_grid(INTBIG, CHAR*[]);
616 void us_help(INTBIG, CHAR*[]);
617 void us_if(INTBIG, CHAR*[]);
618 void us_interpret(INTBIG, CHAR*[]);
619 void us_iterate(INTBIG, CHAR*[]);
620 void us_killcell(INTBIG, CHAR*[]);
621 void us_lambda(INTBIG, CHAR*[]);
622 void us_library(INTBIG, CHAR*[]);
623 void us_macbegin(INTBIG, CHAR*[]);
624 void us_macdone(INTBIG, CHAR*[]);
625 void us_macend(INTBIG, CHAR*[]);
626 void us_menu(INTBIG, CHAR*[]);
627 void us_mirror(INTBIG, CHAR*[]);
628 void us_move(INTBIG, CHAR*[]);
629 void us_node(INTBIG, CHAR*[]);
630 void us_offtool(INTBIG, CHAR*[]);
631 void us_ontool(INTBIG, CHAR*[]);
632 void us_outhier(INTBIG, CHAR*[]);
633 void us_package(INTBIG, CHAR*[]);
634 void us_port(INTBIG, CHAR*[]);
635 void us_quit(INTBIG, CHAR*[]);
636 void us_redraw(INTBIG, CHAR*[]);
637 void us_remember(INTBIG, CHAR*[]);
638 void us_rename(INTBIG, CHAR*[]);
639 void us_replace(INTBIG, CHAR*[]);
640 void us_rotate(INTBIG, CHAR*[]);
641 void us_show(INTBIG, CHAR*[]);
642 void us_size(INTBIG, CHAR*[]);
643 void us_spread(INTBIG, CHAR*[]);
644 void us_system(INTBIG, CHAR*[]);
645 void us_technology(INTBIG, CHAR*[]);
646 void us_telltool(INTBIG, CHAR*[]);
647 void us_terminal(INTBIG, CHAR*[]);
648 void us_text(INTBIG, CHAR*[]);
649 void us_undo(INTBIG, CHAR*[]);
650 void us_var(INTBIG, CHAR*[]);
651 void us_view(INTBIG, CHAR*[]);
652 void us_visiblelayers(INTBIG, CHAR*[]);
653 void us_window(INTBIG, CHAR*[]);
654 void us_yanknode(INTBIG, CHAR*[]);
655 
656 /* prototypes for text editing */
657 void           us_describeeditor(CHAR**);
658 WINDOWPART    *us_makeeditor(WINDOWPART*, CHAR*, INTBIG*, INTBIG*);
659 INTBIG         us_totallines(WINDOWPART*);
660 CHAR          *us_getline(WINDOWPART*, INTBIG);
661 void           us_addline(WINDOWPART*, INTBIG, CHAR*);
662 void           us_replaceline(WINDOWPART*, INTBIG, CHAR*);
663 void           us_deleteline(WINDOWPART*, INTBIG);
664 void           us_highlightline(WINDOWPART*, INTBIG, INTBIG);
665 void           us_suspendgraphics(WINDOWPART*);
666 void           us_resumegraphics(WINDOWPART*);
667 void           us_writetextfile(WINDOWPART*, CHAR*);
668 void           us_readtextfile(WINDOWPART*, CHAR*);
669 void           us_editorterm(WINDOWPART*);
670 void           us_shipchanges(WINDOWPART*);
671 BOOLEAN        us_gotchar(WINDOWPART*, INTSML, INTBIG);
672 void           us_cuttext(WINDOWPART*);
673 void           us_copytext(WINDOWPART*);
674 void           us_pastetext(WINDOWPART*);
675 void           us_undotext(WINDOWPART*);
676 void           us_searchtext(WINDOWPART*, CHAR*, CHAR*, INTBIG);
677 void           us_pantext(WINDOWPART*, INTBIG, INTBIG);
678 
679 /* prototypes for intratool interface */
680 void           us_3dbuttonhandler(WINDOWPART *w, INTBIG but, INTBIG x, INTBIG y);
681 void           us_3denddrawing(void);
682 void           us_3dfillview(WINDOWPART *win);
683 void           us_3dpanview(WINDOWPART *win, INTBIG x, INTBIG y);
684 void           us_3dsetinteraction(INTBIG interaction);
685 void           us_3dsetupviewing(WINDOWPART*);
686 void           us_3dshowpoly(POLYGON*, WINDOWPART*);
687 void           us_3dstartdrawing(WINDOWPART*);
688 void           us_3dzoomview(WINDOWPART *win, float z);
689 void           us_abortcommand(CHAR*, ...);
690 void           us_abortedmsg(void);
691 void           us_addcellcenter(NODEINST *ni);
692 void           us_addhighlight(HIGHLIGHT*);
693 void           us_addparameter(NODEINST *ni, INTBIG key, INTBIG addr, INTBIG type, UINTBIG *descript);
694 void           us_addpossiblearcconnections(void*);
695 void           us_adjustdisplayabletext(NODEINST*);
696 void           us_adjustelectricalunits(LIBRARY *lib, INTBIG newunits);
697 void           us_adjustfornodeincell(NODEPROTO *prim, NODEPROTO *cell, INTBIG *cx, INTBIG *cy);
698 BOOLEAN        us_adjustparameterlocations(NODEINST *ni);
699 void           us_adjustperpendicularsnappoints(HIGHLIGHT*, HIGHLIGHT*);
700 void           us_adjustquickkeys(VARIABLE *var, BOOLEAN warnofchanges);
701 void           us_adjusttangentsnappoints(HIGHLIGHT*, HIGHLIGHT*);
702 void           us_alignnodes(INTBIG total, NODEINST **nodelist, BOOLEAN horizontal, INTBIG direction);
703 INTBIG         us_alignvalue(INTBIG, INTBIG, INTBIG*);
704 EDITOR        *us_alloceditor(void);
705 USERCOM       *us_allocusercom(void);
706 void           us_appendargs(void*, USERCOM*);
707 void           us_arrayfromfile(CHAR *file);
708 void           us_beginchanges(void);
709 CHAR          *us_bettervariablename(CHAR *pt);
710 INTBIG         us_bottomrecurse(NODEINST*, PORTPROTO*);
711 USERCOM       *us_buildcommand(INTBIG, CHAR*[]);
712 void           us_buildquickkeylist(void);
713 void           us_buildtexthighpoly(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, POLYGON*);
714 void           us_buttonhandler(WINDOWPART*, INTBIG, INTBIG, INTBIG);
715 BOOLEAN        us_cantedit(NODEPROTO*, NODEINST*, BOOLEAN);
716 BOOLEAN        us_charhandler(WINDOWPART*, INTSML, INTBIG);
717 void           us_chatportproto(NODEINST*, PORTPROTO*);
718 void           us_check_cell_date(NODEPROTO*, UINTBIG);
719 void           us_checkdatabase(BOOLEAN);
720 void           us_checkspiceparts(void);
721 BOOLEAN        us_cleanupcell(NODEPROTO*, BOOLEAN);
722 void           us_clearclipboard(void);
723 void           us_clearhighlightcount(void);
724 void           us_clearwindow(WINDOWPART*);
725 CHAR          *us_commandvarname(INTSML);
726 void           us_computearcfartextbit(ARCINST *ai);
727 void           us_computenodefartextbit(NODEINST *ni);
728 UINTBIG        us_computewipestate(NODEINST *ni);
729 void           us_continuesessionlogging(void);
730 NODEPROTO     *us_convertcell(NODEPROTO*, TECHNOLOGY*);
731 CHAR          *us_convertmactoworld(CHAR *buf);
732 CHAR          *us_convertworldtomac(CHAR *buf);
733 void           us_copyexplorerwindow(void);
734 void           us_copylisttocell(GEOM**, NODEPROTO*, NODEPROTO*, BOOLEAN, BOOLEAN, BOOLEAN);
735 void           us_copyobjects(WINDOWPART*);
736 NODEPROTO     *us_copyrecursively(NODEPROTO*, CHAR*, LIBRARY*, VIEW*, BOOLEAN, BOOLEAN, CHAR*, BOOLEAN, BOOLEAN, BOOLEAN);
737 void           us_coverimplant(void);
738 void           us_createexplorerstruct(WINDOWPART*);
739 void           us_createqueuedexports(void);
740 NODEPROTO     *us_currentexplorernode(void);
741 BOOLEAN        us_cursoroverhigh(HIGHLIGHT*, INTBIG, INTBIG, WINDOWPART*);
742 INTBIG         us_curvearcaboutpoint(ARCINST *ai, INTBIG xcur, INTBIG ycur);
743 INTBIG         us_curvearcthroughpoint(ARCINST *ai, INTBIG xcur, INTBIG ycur);
744 void           us_cutobjects(WINDOWPART*);
745 void           us_deleteexplorerstruct(WINDOWPART*);
746 void           us_delcellmessage(NODEPROTO*);
747 void           us_delhighlight(HIGHLIGHT*);
748 void           us_delnodeprotocenter(NODEPROTO*);
749 void           us_deltecedlayercell(NODEPROTO *np);
750 void           us_deltecednodecell(NODEPROTO *np);
751 BOOLEAN        us_demandxy(INTBIG*, INTBIG*);
752 CHAR          *us_describeboundkey(INTSML key, INTBIG special, INTBIG readable);
753 void           us_describecontents(NODEPROTO*);
754 CHAR          *us_describefont(INTBIG);
755 CHAR          *us_describemenunode(COMMANDBINDING *commandbinding);
756 CHAR          *us_describenodeinsttype(NODEPROTO *np, NODEINST *ni, INTBIG bits);
757 CHAR          *us_describestyle(INTBIG);
758 CHAR          *us_describetextdescript(UINTBIG*);
759 void           us_dialogeditor(void);
760 CHAR          *us_displayedportname(PORTPROTO *pp, INTBIG dispstyle);
761 void           us_docommands(FILE*, BOOLEAN, CHAR*);
762 void           us_doexpand(NODEINST*, INTBIG, INTBIG);
763 void           us_dofillet(void);
764 void           us_dokillcell(NODEPROTO *np);
765 void           us_dopeek(INTBIG, INTBIG, INTBIG, INTBIG, NODEPROTO*, WINDOWPART*);
766 void           us_doubchanges(void);
767 void           us_dounexpand(NODEINST*);
768 INTBIG         us_drawarcinst(ARCINST*, INTBIG, XARRAY, INTBIG, WINDOWPART*);
769 void           us_drawdispwindowsliders(WINDOWPART *w);
770 void           us_drawexplorericon(WINDOWPART *w, INTBIG lx, INTBIG ly);
771 INTBIG         us_drawcell(NODEINST*, INTBIG, XARRAY, INTBIG, WINDOWPART*);
772 void           us_drawcellvariable(VARIABLE *var, NODEPROTO *np);
773 void           us_drawhorizontalslider(WINDOWPART*, INTBIG, INTBIG, INTBIG, INTBIG);
774 void           us_drawhorizontalsliderthumb(WINDOWPART*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
775 void           us_drawmenu(INTBIG, WINDOWFRAME*);
776 void           us_drawmenuentry(INTBIG, INTBIG, CHAR*);
777 INTBIG         us_drawnodeinst(NODEINST*, INTBIG, XARRAY, INTBIG, WINDOWPART*);
778 void           us_drawnodeprotovariables(NODEPROTO *np, XARRAY trans, WINDOWPART *w, BOOLEAN ignoreinherit);
779 void           us_drawportprotovariables(PORTPROTO *pp, INTBIG on, XARRAY trans, WINDOWPART *w, BOOLEAN ignoreinherit);
780 void           us_drawslidercorner(WINDOWPART *win, INTBIG lx, INTBIG hx, INTBIG ly, INTBIG hy, BOOLEAN drawtopright);
781 void           us_drawverticalslider(WINDOWPART*, INTBIG, INTBIG, INTBIG, BOOLEAN);
782 void           us_drawverticalsliderthumb(WINDOWPART*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
783 void           us_drawwindow(WINDOWPART*, INTBIG);
784 void           us_drawwindowicon(WINDOWPART *w, INTBIG lx, INTBIG ly, INTBIG *dots);
785 void           us_dumppulldownmenus(void);
786 void           us_editvariabletext(VARIABLE*, INTBIG, INTBIG, CHAR*);
787 void           us_emitcopyright(FILE *f, CHAR *prefix, CHAR *postfix);
788 void           us_endchanges(WINDOWPART*);
789 void           us_ensurepropertechnology(NODEPROTO *cell, CHAR *forcedtechnology, BOOLEAN always);
790 void           us_ensurewindow(NODEPROTO*);
791 void           us_erasegeometry(NODEPROTO*);
792 void           us_erasenodeinst(NODEINST*);
793 void           us_eraseobjectsinlist(NODEPROTO *np, GEOM **list);
794 INTBIG         us_erasepassthru(NODEINST*, BOOLEAN, ARCINST**);
795 void           us_erasescreen(WINDOWFRAME*);
796 void           us_erasewindow(WINDOWPART*);
797 BOOLEAN        us_evaluatevariable(CHAR*, INTBIG*, INTBIG*, CHAR**);
798 void           us_execute(USERCOM*, BOOLEAN, BOOLEAN, BOOLEAN);
799 void           us_executesafe(USERCOM*, BOOLEAN, BOOLEAN, BOOLEAN);
800 BOOLEAN        us_expandaddrtypearray(INTBIG*, INTBIG**, INTBIG**, INTBIG);
801 void           us_explorebuttonhandler(WINDOWPART*, INTBIG, INTBIG, INTBIG);
802 BOOLEAN        us_explorecharhandler(WINDOWPART*, INTSML, INTBIG);
803 void           us_explorehpan(WINDOWPART*, INTBIG);
804 void           us_explorevpan(WINDOWPART*, INTBIG);
805 void           us_explorerreadoutinit(WINDOWPART *w);
806 CHAR          *us_explorerreadoutnext(WINDOWPART *w, INTBIG *indent, INTBIG *style, BOOLEAN **donelist, void **en);
807 void           us_exploreredisphandler(WINDOWPART*);
808 int            us_exportnameindexascending(const void *e1, const void *e2);
809 int            us_exportnametypeascending(const void *e1, const void *e2);
810 BOOLEAN        us_celledithandler(WINDOWPART*, INTSML, INTBIG);
811 BOOLEAN        us_cellfromtech(NODEPROTO *cell, TECHNOLOGY *tech);
812 BOOLEAN        us_figuredrawpath(GEOM *fromgeom, PORTPROTO *fromport, GEOM *togeom, PORTPROTO *toport,
813 				INTBIG *xcur, INTBIG *ycur);
814 void           us_figuregrabpoint(UINTBIG*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
815 void           us_figuretechopaque(TECHNOLOGY*);
816 void           us_figuretechselectability(void);
817 void           us_figurevariableplace(UINTBIG*, INTBIG, CHAR*[]);
818 INTBIG         us_fillcomcomp(USERCOM*, COMCOMP*[]);
819 INTBIG         us_findboundkey(INTSML key, INTBIG special, CHAR **binding);
820 void           us_findlowerport(NODEINST**, PORTPROTO**);
821 void           us_findnamedmenu(CHAR *name, INTBIG *key, INTBIG *item);
822 void           us_findobject(INTBIG, INTBIG, WINDOWPART*, HIGHLIGHT*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
823 void           us_findexistingparameter(NODEINST *ni, INTBIG key, UINTBIG *textdescript);
824 VARIABLE      *us_findparametersource(VARIABLE *var, NODEINST *ni);
825 void           us_forceeditchanges(void);
826 void           us_freebindingparse(COMMANDBINDING *commandbinding);
827 void           us_freecomekmemory(void);
828 void           us_freecomtvmemory(void);
829 void           us_freediacommemory(void);
830 void           us_freeedemacsmemory(void);
831 void           us_freeeditor(EDITOR*);
832 void           us_freeedpacmemory(void);
833 void           us_freeedtecpmemory(void);
834 void           us_freehighmemory(void);
835 void           us_freemiscmemory(void);
836 void           us_freenetmemory(void);
837 void           us_freeparsememory(void);
838 void           us_freewindowmemory(void);
839 void           us_freestatusmemory(void);
840 void           us_freetranslatememory(void);
841 void           us_freeusercom(USERCOM*);
842 void           us_fullview(NODEPROTO*, INTBIG*, INTBIG*, INTBIG*, INTBIG*);
843 void           us_geomhaschanged(GEOM *geom);
844 BOOLEAN        us_geominrect(GEOM *geom, INTBIG slx, INTBIG shx, INTBIG sly, INTBIG shy);
845 INTBIG        *us_getallhighlighted(void);
846 void           us_getarcbounds(ARCINST *ai, INTBIG *nlx, INTBIG *nhx, INTBIG *nly, INTBIG *nhy);
847 NODEPROTO     *us_getareabounds(INTBIG*, INTBIG*, INTBIG*, INTBIG*);
848 CHAR          *us_getboundkey(CHAR *binding, INTSML *boundkey, INTBIG *boundspecial);
849 GEOM          *us_getclosest(INTBIG, INTBIG, INTBIG, NODEPROTO*);
850 void           us_getcolormap(TECHNOLOGY*, INTBIG, BOOLEAN);
851 INTBIG         us_getcolormapentry(CHAR*, BOOLEAN);
852 COMCOMP       *us_getcomcompfromkeyword(CHAR *keyword);
853 void           us_gethighaddrtype(HIGHLIGHT *high, INTBIG *addr, INTBIG *type);
854 void           us_gethighdescript(HIGHLIGHT *high, UINTBIG *descript);
855 GEOM         **us_gethighlighted(INTBIG type, INTBIG *textcount, CHAR ***textinfo);
856 CHAR          *us_gethighstring(HIGHLIGHT *high);
857 void           us_gethightextcenter(HIGHLIGHT *high, INTBIG*, INTBIG*, INTBIG*);
858 void           us_gethightextsize(HIGHLIGHT *high, INTBIG *xw, INTBIG *yw, WINDOWPART *w);
859 void           us_getlenwidoffset(NODEINST *ni, UINTBIG *descript, INTBIG *xoff, INTBIG *yoff);
860 void           us_getlowleft(NODEINST*, INTBIG*, INTBIG*);
861 VARIABLE      *us_getmacro(CHAR*);
862 MACROPACK     *us_getmacropack(CHAR*);
863 void           us_getnewparameterpos(NODEPROTO *np, INTBIG *xoff, INTBIG *yoff);
864 void           us_getnodebounds(NODEINST *ni, INTBIG *nlx, INTBIG *nhx, INTBIG *nly, INTBIG *nhy);
865 void           us_getnodedisplayposition(NODEINST *ni, INTBIG *xpos, INTBIG *ypos);
866 NODEINST      *us_getnodeonarcinst(GEOM**, PORTPROTO**, GEOM*, PORTPROTO*, INTBIG, INTBIG, INTBIG);
867 BOOLEAN        us_getnodetext(NODEINST*, WINDOWPART*, POLYGON*, VARIABLE**, VARIABLE**, PORTPROTO**);
868 UINTBIG        us_getobject(INTBIG, BOOLEAN);
869 TECHNOLOGY    *us_getobjectinfo(INTBIG addr, INTBIG type, INTBIG *lx, INTBIG *hx, INTBIG *ly, INTBIG *hy);
870 HIGHLIGHT     *us_getonehighlight(void);
871 BOOLEAN        us_getonesnappoint(INTBIG *x, INTBIG *y);
872 INTBIG         us_getplacementangle(NODEPROTO *np);
873 POPUPMENU     *us_getpopupmenu(CHAR*);
874 INTBIG        *us_getprintcolors(TECHNOLOGY *tech);
875 void           us_getquickkeylist(INTBIG *quickkeycount, CHAR ***quickkeylist);
876 void           us_getslide(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG*, INTBIG*);
877 void           us_getsnappoint(HIGHLIGHT*, INTBIG*, INTBIG*);
878 INTBIG         us_gettextposition(CHAR*);
879 void           us_gettextscreensize(CHAR *str, UINTBIG *descript, WINDOWPART *w,
880 				TECHNOLOGY *tech, GEOM *geom, INTBIG *xw, INTBIG *yw);
881 INTBIG         us_gettextsize(CHAR*, INTBIG);
882 void           us_gettruewindowbounds(WINDOWPART *w, INTBIG *lx, INTBIG *hx, INTBIG *ly, INTBIG *hy);
883 BOOLEAN        us_gettwoobjects(GEOM**, PORTPROTO**, GEOM**, PORTPROTO**);
884 BOOLEAN        us_getvar(CHAR*, INTBIG*, INTBIG*, CHAR**, BOOLEAN*, INTBIG*);
885 void           us_graphcells(NODEPROTO *top);
886 void           us_gridset(WINDOWPART*, INTBIG);
887 BOOLEAN        us_hasotherwindowpart(INTBIG x, INTBIG y, WINDOWPART *ow);
888 void           us_highlighteverywhere(GEOM*, PORTPROTO*, INTBIG, BOOLEAN, INTBIG, BOOLEAN);
889 void           us_highlighthaschanged(void);
890 void           us_highlightmenu(INTBIG, INTBIG, INTBIG);
891 void           us_highlightwindow(WINDOWPART*, BOOLEAN);
892 TECHNOLOGY    *us_hightech(HIGHLIGHT *high);
893 NODEPROTO     *us_highcell(HIGHLIGHT *high);
894 void           us_hsvtorgb(float, float, float, INTBIG*, INTBIG*, INTBIG*);
895 void           us_identifyports(INTBIG, NODEINST**, NODEPROTO*, INTBIG, BOOLEAN);
896 void           us_illustratecommandset(void);
897 void           us_inheritattributes(NODEINST *ni);
898 BOOLEAN        us_initialbinding(void);
899 void           us_initlayerletters(void);
900 void           us_initnodetext(NODEINST*, INTBIG, WINDOWPART*);
901 void           us_initqueuedexports(void);
902 void           us_initsearchcircuittext(WINDOWPART *win);
903 void           us_initstatus(void);
904 CHAR          *us_invisiblepintextname(VARIABLE *var);
905 BOOLEAN        us_islasteval(INTSML, INTBIG);
906 void           us_killcurrentwindow(BOOLEAN);
907 void           us_killwindowpickanother(WINDOWPART*);
908 CHAR          *us_layerletters(TECHNOLOGY*, INTBIG);
909 void           us_layouttext(CHAR *layer, INTBIG tsize, INTBIG scale, INTBIG font,
910 					INTBIG italic, INTBIG bold, INTBIG underline, INTBIG separation, CHAR *msg);
911 int            us_librarytemp1ascending(const void *e1, const void *e2);
912 INTBIG         us_makearcuserbits(ARCPROTO*);
913 USERCOM       *us_makecommand(CHAR*);
914 ARCINST       *us_makeconnection(NODEINST*, PORTPROTO*, ARCPROTO*, NODEINST*, PORTPROTO*,
915 				ARCPROTO*, NODEPROTO*, INTBIG, INTBIG,
916 				ARCINST**, ARCINST**, NODEINST**, NODEINST**,
917 				INTBIG, BOOLEAN, INTBIG*, BOOLEAN);
918 CHAR          *us_makecellline(NODEPROTO*, INTBIG);
919 BOOLEAN        us_makehighlight(CHAR*, HIGHLIGHT*);
920 CHAR          *us_makehighlightstring(HIGHLIGHT*);
921 NODEPROTO     *us_makeiconcell(PORTPROTO*, CHAR*, CHAR*, LIBRARY*);
922 PORTPROTO     *us_makenewportproto(NODEPROTO*, NODEINST*, PORTPROTO*, CHAR*, INTBIG, INTBIG, UINTBIG*);
923 BOOLEAN        us_makescreen(INTBIG*, INTBIG*, INTBIG*, INTBIG*, WINDOWPART*);
924 void           us_maketextpoly(CHAR*, WINDOWPART*, INTBIG, INTBIG, NODEINST*, TECHNOLOGY*, UINTBIG*, POLYGON*);
925 void           us_manymove(GEOM**, NODEINST**, INTBIG, INTBIG, INTBIG);
926 BOOLEAN        us_matchpurecommand(CHAR *command, CHAR *purecommand);
927 INTBIG         us_modarcbits(INTBIG, BOOLEAN, CHAR*, GEOM**);
928 void           us_modifytextdescript(HIGHLIGHT*, UINTBIG*);
929 void           us_moveselectedtext(INTBIG numtexts, CHAR **textlist, GEOM**, INTBIG odx, INTBIG ody);
930 NODEPROTO     *us_needcell(void);
931 BOOLEAN        us_needwindow(void);
932 void           us_nettravel(NODEINST*, INTBIG);
933 MACROPACK     *us_newmacropack(CHAR*);
934 NODEPROTO     *us_newnodeproto(CHAR *name, LIBRARY *lib);
935 CHAR          *us_nextvars(void);
936 BOOLEAN        us_nodemoveswithtext(HIGHLIGHT *high);
937 NODEPROTO     *us_nodetocreate(BOOLEAN getcontents, NODEPROTO *cell);
938 void           us_nulldisplayroutine(POLYGON*, WINDOWPART*);
939 void           us_parsebinding(CHAR*, COMMANDBINDING*);
940 INTBIG         us_parsecommand(CHAR*, CHAR*[]);
941 void           us_pasteobjects(WINDOWPART*);
942 NODEINST      *us_pickhigherinstance(NODEPROTO *inp);
943 CHAR          *us_plugincommand(INTBIG menukey, INTBIG menuitem, CHAR *command);
944 void           us_pophighlight(BOOLEAN);
945 POPUPMENUITEM *us_popupmenu(POPUPMENU**, BOOLEAN*, BOOLEAN, INTBIG, INTBIG, INTBIG);
946 PORTPROTO     *us_portdetails(PORTPROTO*, INTBIG, CHAR*[], NODEINST*, INTBIG*, INTBIG*, BOOLEAN, CHAR*, CHAR**);
947 void           us_portposition(NODEINST *ni, PORTPROTO *pp, INTBIG *x, INTBIG *y);
948 void           us_portsynchronize(LIBRARY*);
949 BOOLEAN        us_preventloss(LIBRARY*, INTBIG, BOOLEAN);
950 void           us_printarctoolinfo(ARCINST*);
951 void           us_printcolorvalue(INTBIG);
952 void           us_printmacro(VARIABLE*);
953 void           us_printmacros(void);
954 void           us_printnodetoolinfo(NODEINST*);
955 void           us_printtechnology(TECHNOLOGY*);
956 void           us_pushhighlight(void);
957 CHAR          *us_putintoinfstr(CHAR *str);
958 void           us_queueexport(PORTPROTO *pp);
959 BOOLEAN        us_queuenewexport(NODEINST *ni, PORTPROTO *pp, PORTPROTO *origpp);
960 void           us_queueopaque(GEOM*, BOOLEAN);
961 void           us_queueredraw(GEOM*, BOOLEAN);
962 void           us_recursivelyreplacemenu(POPUPMENU *pm, POPUPMENU *oldpm, POPUPMENU *newpm);
963 void           us_recursivemark(NODEPROTO *np);
964 void           us_redisplay(WINDOWPART*);
965 void           us_redisplaynow(WINDOWPART*, BOOLEAN);
966 void           us_redoexplorerwindow(void);
967 void           us_redostatus(WINDOWFRAME*);
968 BOOLEAN        us_reexportport(PORTPROTO*, NODEINST*);
969 void           us_regridselected(void);
970 CHAR          *us_removeampersand(CHAR *name);
971 void           us_removeubchange(NODEPROTO*);
972 void           us_renameport(PORTPROTO*, CHAR*);
973 void           us_renametecedcell(NODEPROTO *np, CHAR *oldname);
974 void           us_replaceallarcs(NODEPROTO *cell, GEOM **list, ARCPROTO *ap, BOOLEAN connected, BOOLEAN thiscell);
975 void           us_replacecircuittext(WINDOWPART *win, CHAR *replace);
976 void           us_replacelibraryreferences(LIBRARY *oldlib, LIBRARY *newlib);
977 NODEINST      *us_replacenodeinst(NODEINST *oldni, NODEPROTO *newnp, BOOLEAN ignoreportnames, BOOLEAN allowdeletedports);
978 void           us_reportarcscreated(CHAR *who, INTBIG numarcs1, CHAR *type1, INTBIG numarcs2, CHAR *type2);
979 void           us_rgbtohsv(INTBIG, INTBIG, INTBIG, float*, float*, float*);
980 void           us_rotatedescript(GEOM*, UINTBIG*);
981 void           us_rotatedescriptI(GEOM*, UINTBIG*);
982 ARCINST       *us_runarcinst(NODEINST*, PORTPROTO*, INTBIG, INTBIG, NODEINST*, PORTPROTO*, INTBIG, INTBIG, ARCPROTO*, INTBIG);
983 BOOLEAN        us_samecontents(NODEPROTO *np1, NODEPROTO *np2, INTBIG explain);
984 BOOLEAN        us_samekey(INTSML key1, INTBIG special1, INTSML key2, INTBIG special2);
985 BOOLEAN        us_saveeverything(void);
986 BOOLEAN        us_saveoptdlog(BOOLEAN atquit);
987 void           us_saveoptions(void);
988 void           us_scaletowindow(INTBIG*, INTBIG*, WINDOWPART*);
989 void           us_scaletraceinfo(NODEINST*, INTBIG, INTBIG, INTBIG, INTBIG);
990 void           us_scanforkeyequiv(POPUPMENU*);
991 void           us_searchcircuittext(WINDOWPART *win, CHAR *search, CHAR *replaceall, INTBIG bits);
992 INTBIG         us_selectarea(NODEPROTO *np, INTBIG slx, INTBIG shx, INTBIG sly, INTBIG shy,
993 				INTBIG special, INTBIG selport, INTBIG nobbox, CHAR ***highlist);
994 void           us_selectsnap(HIGHLIGHT*, INTBIG, INTBIG);
995 void           us_settool(INTBIG, CHAR*[], INTBIG);
996 void           us_setalignment(WINDOWFRAME*);
997 void           us_setarcname(ARCINST*, CHAR*);
998 void           us_setarcproto(ARCPROTO*, BOOLEAN);
999 void           us_setcolorentry(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, BOOLEAN);
1000 void           us_setcursorpos(WINDOWFRAME*, INTBIG, INTBIG);
1001 void           us_setdescriptoffset(UINTBIG*, INTBIG, INTBIG);
1002 void           us_setessentialbounds(NODEPROTO *cell);
1003 void           us_setcellname(WINDOWPART *w);
1004 void           us_setcellsize(WINDOWPART *w);
1005 void           us_setfind(HIGHLIGHT*, INTBIG, INTBIG, INTBIG, INTBIG);
1006 void           us_setfloatvariablevalue(GEOM *geom, INTBIG key, VARIABLE *oldvar, float value);
1007 void           us_setgridsize(WINDOWPART *w);
1008 void           us_sethighlight(HIGHLIGHT*, INTBIG);
1009 void           us_setkeybinding(CHAR *binding, INTSML key, INTBIG special, BOOLEAN quietly);
1010 void           us_setkeyequiv(POPUPMENU*, INTBIG);
1011 void           us_setlambda(WINDOWFRAME*);
1012 void           us_setmenunodearcs(void);
1013 void           us_setmenusize(INTBIG, INTBIG, INTBIG, BOOLEAN);
1014 void           us_setmultiplehighlight(CHAR*, BOOLEAN);
1015 void           us_setnodeangle(WINDOWFRAME*);
1016 void           us_setnodeproto(NODEPROTO*);
1017 void           us_setnodeprotocenter(INTBIG, INTBIG, NODEPROTO*);
1018 NODEPROTO     *us_setscrolltocurrentcell(INTBIG scrollitem, BOOLEAN curinstance, BOOLEAN curcell,
1019 					BOOLEAN forcecurlib, BOOLEAN justcells, void *dia);
1020 void           us_setselectioncount(void);
1021 void           us_settechname(WINDOWFRAME*);
1022 void           us_settrace(NODEINST*, INTBIG*, INTBIG);
1023 INTBIG         us_setunexpand(NODEINST*, INTBIG);
1024 void           us_setvariablevalue(GEOM *geom, INTBIG key, CHAR *newvalue, INTBIG oldtype, UINTBIG *descript);
1025 void           us_setwindowmode(WINDOWPART*, INTBIG oldstate, INTBIG newstate);
1026 void           us_setxarray(INTBIG addr, INTBIG type, CHAR *name, XARRAY array);
1027 BOOLEAN        us_setxy(INTBIG, INTBIG);
1028 void           us_shadowarcproto(WINDOWFRAME*, ARCPROTO*);
1029 void           us_shadownodeproto(WINDOWFRAME*, NODEPROTO*);
1030 void           us_showallhighlight(void);
1031 void           us_showcurrentarcproto(void);
1032 void           us_showcurrentnodeproto(void);
1033 void           us_showlayercoverage(NODEPROTO *cell);
1034 void           us_showpoly(POLYGON*, WINDOWPART*);
1035 void           us_showwindowmode(WINDOWPART *w);
1036 NODEPROTO     *us_skeletonize(NODEPROTO *np, CHAR *newname, LIBRARY *newlib, BOOLEAN quiet);
1037 void           us_slideleft(INTBIG);
1038 void           us_slideup(INTBIG);
1039 int            us_sortarcsbyname(const void *e1, const void *e2);
1040 NODEPROTO    **us_sortlib(LIBRARY*, CHAR*);
1041 int            us_sortnodesbyname(const void *e1, const void *e2);
1042 int            us_sortpopupmenuascending(const void *e1, const void *e2);
1043 WINDOWPART    *us_splitcurrentwindow(INTBIG, BOOLEAN, WINDOWPART**, INTBIG);
1044 INTBIG         us_spreadaround(NODEINST *ni, INTBIG amount, CHAR *direction);
1045 void           us_spreadrotateconnection(NODEINST *theni);
1046 void           us_squarescreen(WINDOWPART*, WINDOWPART*, BOOLEAN, INTBIG*, INTBIG*, INTBIG*, INTBIG*, INTBIG);
1047 INTBIG         us_stretchtonodes(ARCPROTO *typ, INTBIG wid, NODEINST *ni1, PORTPROTO *pp1, INTBIG otherx, INTBIG othery);
1048 CHAR          *us_stripampersand(CHAR*);
1049 WINDOWPART    *us_subwindow(INTBIG, INTBIG, INTBIG, INTBIG, WINDOWPART*);
1050 void           us_switchtocell(NODEPROTO*, INTBIG, INTBIG, INTBIG, INTBIG, NODEINST*, PORTPROTO*, BOOLEAN, BOOLEAN, BOOLEAN);
1051 void           us_switchtolibrary(LIBRARY*);
1052 void           us_tecedaddfunstring(void*, INTBIG);
1053 void           us_teceddeletelayercell(NODEPROTO *np);
1054 void           us_teceddeletenodecell(NODEPROTO *np);
1055 void           us_tecedentry(INTBIG, CHAR*[]);
1056 INTBIG         us_tecedgetoption(NODEINST*);
1057 void           us_tecedrenamecell(CHAR *oldname, CHAR *newname);
1058 CHAR          *us_teceddescribenode(NODEINST *ni);
1059 CHAR          *us_techname(NODEPROTO *np);
1060 CHAR          *us_tempoptionslibraryname(void);
1061 void           us_textcellchanges(WINDOWPART*, INTBIG, CHAR*, CHAR*, INTBIG);
1062 void           us_toolturnedon(TOOL *tool);
1063 BOOLEAN        us_topofallthings(CHAR**);
1064 BOOLEAN        us_topofarcnodes(CHAR**);
1065 BOOLEAN        us_topofcells(CHAR**);
1066 BOOLEAN        us_topofcommands(CHAR**);
1067 BOOLEAN        us_topofconstraints(CHAR**);
1068 BOOLEAN        us_topofcports(CHAR**);
1069 BOOLEAN        us_topofedtecarc(CHAR**);
1070 BOOLEAN        us_topofedteclay(CHAR**);
1071 BOOLEAN        us_topofedtecnode(CHAR**);
1072 BOOLEAN        us_topofexpports(CHAR**);
1073 BOOLEAN        us_topofhighlight(CHAR**);
1074 BOOLEAN        us_topoflayers(CHAR**);
1075 BOOLEAN        us_topofmacros(CHAR**);
1076 BOOLEAN        us_topofmbuttons(CHAR**);
1077 BOOLEAN        us_topofnodes(CHAR**);
1078 BOOLEAN        us_topofpopupmenu(CHAR**);
1079 BOOLEAN        us_topofports(CHAR**);
1080 BOOLEAN        us_topofprims(CHAR**);
1081 BOOLEAN        us_topofvars(CHAR**);
1082 BOOLEAN        us_topofwindows(CHAR**);
1083 void           us_translationdlog(void);
1084 CHAR          *us_trueattributename(VARIABLE *var);
1085 void           us_undisplayobject(GEOM*);
1086 void           us_undoportproto(NODEINST*, PORTPROTO*);
1087 void           us_undrawcellvariable(VARIABLE *var, NODEPROTO *np);
1088 CHAR          *us_uniqueobjectname(CHAR *name, NODEPROTO *cell, INTBIG type, void *exclude);
1089 CHAR          *us_uniqueportname(CHAR*, NODEPROTO*);
1090 void           us_unknowncommand(void);
1091 void           us_unqueueredraw(LIBRARY *lib);
1092 void           us_validatemenu(POPUPMENU *pm);
1093 BOOLEAN        us_validname(CHAR *name, INTBIG type);
1094 void           us_varchanges(WINDOWPART*, INTBIG, CHAR*, CHAR*, INTBIG);
1095 CHAR          *us_variableattributes(VARIABLE*, INTBIG);
1096 CHAR          *us_variabletypename(INTBIG);
1097 INTBIG         us_variabletypevalue(CHAR*);
1098 CHAR          *us_variableunits(VARIABLE *var);
1099 WINDOWPART    *us_wantnewwindow(INTBIG orientation);
1100 void           us_wanttodraw(INTBIG, INTBIG, INTBIG, INTBIG, WINDOWPART*, GRAPHICS*, INTBIG);
1101 void           us_wanttoread(CHAR*);
1102 INTBIG         us_widestarcinst(ARCPROTO*, NODEINST*, PORTPROTO*);
1103 BOOLEAN        us_windowcansplit(WINDOWPART*, WINDOWPART*, WINDOWPART*);
1104 void           us_windowfit(WINDOWFRAME*, BOOLEAN, INTBIG);
1105 BOOLEAN        us_windowgetsexploericon(WINDOWPART *w);
1106 void           us_writeprotoname(PORTPROTO*, INTBIG, XARRAY, INTBIG, INTBIG, WINDOWPART*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
1107 void           us_writetext(INTBIG, INTBIG, INTBIG, INTBIG, GRAPHICS*, CHAR*, UINTBIG*, WINDOWPART*, TECHNOLOGY*);
1108 void           us_yankonenode(NODEINST*);
1109 
1110 /* terminal interface */
1111 void           us_ttyprint(BOOLEAN, CHAR*, va_list);
1112 
1113 /* the status bar */
1114 STATUSFIELD   *ttydeclarestatusfield(INTBIG line, INTBIG startper, INTBIG endper, CHAR *label);
1115 void           ttyfreestatusfield(STATUSFIELD *field);
1116 void           ttysetstatusfield(WINDOWFRAME *frame, STATUSFIELD *field, CHAR *message, BOOLEAN cancrop);
1117 INTBIG         ttynumstatuslines(void);
1118 
1119 /* popup and pulldown menus */
1120 void           nativemenuload(INTBIG, CHAR*[]);
1121 void           nativemenurename(POPUPMENU*, INTBIG);
1122 INTBIG         nativepopupmenu(POPUPMENU **menu, BOOLEAN header, INTBIG left, INTBIG top);
1123 
1124 #if defined(__cplusplus) && !defined(ALLCPLUSPLUS)
1125 }
1126 #endif
1127