Jspice3
grafintr.c
Go to the documentation of this file.
1 /***************************************************************************
2 SCED - Schematic Capture Editor
3 JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
4 Copyright 1990 Regents of the University of California. All rights reserved.
5 Authors: 1981 Giles C. Billingsley (parts of KIC layout editor)
6  1992 Stephen R. Whiteley
7 ****************************************************************************/
8 
9 /*
10  * Interface to Spice for output graphics.
11  */
12 
13 #include "spice.h"
14 #include "sced.h"
15 #include "scedmacs.h"
16 #include "scedio.h"
17 
18 /* selected trace hypertext entries */
19 static struct hyEnt *GPoint[9];
20 
21 /* an iplot is active if set */
22 static int DoingIplot;
24 
25 #ifdef __STDC__
26 static char *hent_string(struct ka*,int,struct hyEnt**);
27 static wordlist *GP_wl(void);
28 static int select_trace(void);
29 static void show_mark(int,int,int);
30 static int trans_mark(int);
31 static char *get_subname(struct hyEnt*);
32 static struct hyEnt *select_point(struct s*,struct ka*,int);
33 static struct hyEnt *alloc_ent(long,long,struct o*,int,int);
34 static struct hyEnt *subckt_point(struct o*,char*,struct ka*,int);
35 static char *nodestring(struct hyEnt*);
36 static int get_enode(int,struct o*);
37 static int find_wire_node(struct o*);
38 static void display_graf_references(int);
39 static int nodenum(struct hyEnt*);
40 #else
41 static char *hent_string();
42 static wordlist *GP_wl();
43 static int select_trace();
44 static void show_mark();
45 static int trans_mark();
46 static char *get_subname();
47 static struct hyEnt *select_point();
48 static struct hyEnt *alloc_ent();
49 static struct hyEnt *subckt_point();
50 static char *nodestring();
51 static int get_enode();
52 static int find_wire_node();
53 static void display_graf_references();
54 static int nodenum();
55 #endif
56 
57 /* imports from spice */
58 #ifdef __STDC__
59 extern wordlist *cp_lexer(char*);
60 extern void com_graf(wordlist*);
61 extern void wl_free(wordlist*);
62 #else
63 extern wordlist *cp_lexer();
64 extern void com_graf();
65 extern void wl_free();
66 #endif
67 
68 
69 /***********************************************************************
70  *
71  * Routines for displaying spice output graphically.
72  *
73  ***********************************************************************/
74 
75 extern char *MenuGRAF;
76 extern char *MenuIPLOT;
77 extern char *MenuEDIT;
78 
79 
80 void
81 ShowOutput(LookedAhead)
82 
83 int *LookedAhead;
84 {
85  char buf[128],*name;
86  char *s, *t;
87  wordlist *wl, opt;
88  int i;
89 
91  ShowPrompt("Pop to top level first.");
92  return;
93  }
95  ShowPrompt("Select nodes/branches, graf button to plot, undo clears all.");
97 
99 
100  loop {
101  switch (PointLoop(LookedAhead)) {
102  case PL_UND:
104  GPclearGraf();
105  ShowPrompt("All traces cleared (can't be undone).");
106  continue;
107  case PL_ESC:
108  goto quit;
109  case PL_PCW:
110  if (select_trace()) continue;
111  ShowPromptAndWait("Limit eight traces.");
112  continue;
113  case PL_CMD:
114  if (Matching(MenuGRAF)) {
115  opt.wl_next = GP_wl();
116  opt.wl_word = "-t";
117  opt.wl_prev = NULL;
118  com_graf(&opt);
119  wl_free(opt.wl_next);
120  if (!dispdev->windows && !dispdev->hardcopy)
123  (void)CheckError();
124  ShowPrompt("Select nodes/branches or press ESC to quit.");
125  *LookedAhead = False;
126  }
127  else if (Matching(MenuEDIT)) {
129  opt.wl_next = GP_wl();
130  opt.wl_word = "-t";
131  opt.wl_prev = NULL;
132  s = wl_flatten(&opt);
133  wl_free(opt.wl_next);
134  ShowPrompt("graf");
135  t = FBEdit(s);
136  ErasePrompt();
138  free(s);
139  if (t) {
140  wl = cp_lexer(t);
141  com_graf(wl);
142  wl_free(wl);
143  if (!dispdev->windows && !dispdev->hardcopy)
146  (void)CheckError();
147  }
148  *LookedAhead = False;
149  }
150  else
151  goto quit;
152  }
153  }
154 quit:
157 }
158 
159 
160 void
162 
163 {
164  wordlist wx,*wl;
165 
166  if (DoingIplot) {
168  DoingIplot = False;
169  ShowPrompt("No plotting during simulation.");
170  }
171  else {
173  DoingIplot = True;
174  ShowPrompt("Will generate plot while simulating.");
175  }
177 }
178 
179 
180 void
182 
183 {
184  wordlist wl;
185 
186  if (!DoingIplot) return;
187  wl.wl_prev = NULL;
188  wl.wl_next = GP_wl();
189  wl.wl_word = "graf";
190  if (wl.wl_next) {
191  (*ft_sced->sc_setiplot)(&wl);
192  wl_free(wl.wl_next);
193  }
195 }
196 
197 
198 void
200 
201 {
202  wordlist wl;
203 
204  if (!DoingIplot) return;
205  wl.wl_next = NULL;
206  wl.wl_word = "iplot";
207  (*ft_sced->sc_clriplot)(&wl);
209 }
210 
211 
212 char *
213 GPstring(typemask,hent)
214 
215 /* return a string naming the node/branch just pointed to */
216 int typemask; /* return these types only */
217 struct hyEnt **hent; /* point descriptor, if found */
218 {
219  struct ka AOI;
220  int Delta;
221 
223  return (NULL);
224  if (SCursor.kcInFine == True)
225  Delta = 5.0/View->kvFineRatio;
226  else
227  Delta = 5.0/View->kvCoarseRatio;
228 
229  AOI.kaLeft = SCursor.kcX - Delta;
230  AOI.kaRight = SCursor.kcX + Delta;
231  AOI.kaBottom = SCursor.kcY - Delta;
232  AOI.kaTop = SCursor.kcY + Delta;
233 
234  return (hent_string(&AOI,typemask,hent));
235 }
236 
237 
238 char *
240 
241 /* return the string associated with hent, if successful
242  * update entries in hent
243  */
244 struct hyEnt *hent;
245 {
246  char *name, buf[128];
247  struct ka AOI;
248  struct hyEnt *newent;
249  struct parent *p, *pnext;
250  int Delta = 5; /* some slop, should already be centered */
251  char *s;
252 
253  if (!hent)
254  return (NULL);
255 
256  AOI.kaLeft = hent->hyX - Delta;
257  AOI.kaRight = hent->hyX + Delta;
258  AOI.kaBottom = hent->hyY - Delta;
259  AOI.kaTop = hent->hyY + Delta;
260 
261  s = hent_string(&AOI,hent->hyRefType,&newent);
262  if (s) {
263  for (p = hent->hyParent; p; p = pnext) {
264  pnext = p->pNext;
265  txfree((char*)p);
266  }
267  *hent = *newent;
268  txfree((char*)newent);
269  }
270  return (s);
271 }
272 
273 
274 static char *
275 hent_string(AOI,typemask,hret)
276 
277 /* return a string naming the node/branch just referenced */
278 struct ka *AOI; /* region to search */
279 int typemask; /* return these types only */
280 struct hyEnt **hret; /* returned point descriptor */
281 {
282  struct hyEnt *h;
283  struct parent *p, *pnext;
284  char *name, buf[128];
285 
286  *hret = NULL;
287  h = select_point(Parameters.kpCellDesc,AOI,typemask);
288  if (h == NULL) return (NULL);
289  name = get_subname(h);
290  if (name == NULL)
291  return (NULL);
292  if (h->hyRefType == HY_NODE)
293  sprintf(buf,"v(%s)",name);
294  else {
295  strcpy(buf,name);
296  }
297  *hret = h;
298  free(name);
299  return (CopyString(buf));
300 }
301 
302 
303 static wordlist *
305 
306 /* make up command list */
307 {
308  wordlist *wl,*wl1 = NULL;
309  int i;
310  char *name;
311 
312  for (i = 0; i < 8 && GPoint[i]; i++) {
313  name = get_subname(GPoint[i]);
314  if (GPoint[i]->hyRefType == HY_NODE)
315  sprintf(TypeOut,"v(%s)",name);
316  else {
317  strcpy(TypeOut,name);
318  }
319  free(name);
320  if (wl1 == NULL)
321  wl = wl1 = cp_lexer(TypeOut);
322  else {
323  wl->wl_next = cp_lexer(TypeOut);
324  wl = wl->wl_next;
325  }
326  }
327  if (wl1)
328  wl->wl_next = NULL;
329  return (wl1);
330 }
331 
332 
333 int
335 
336 /* returns true if hent is a graf reference,
337  * in which case it is deleted
338  */
339 struct hyEnt *hent;
340 {
341  struct parent *p, *pnext;
342  int i;
343 
344  if (!hent)
345  return (False);
346  for (i = 0; i < 8; i++)
347  if (GPoint[i] == hent)
348  break;
349  if (i == 8)
350  return (False);
351  for (p = hent->hyParent; p; p = pnext) {
352  pnext = p->pNext;
353  txfree((char*)p);
354  }
355  txfree((char*)hent);
356  for ( ; i < 8; i++)
357  GPoint[i] = GPoint[i+1];
358  GPoint[i] = NULL;
359  return (True);
360 }
361 
362 
363 void
365 {
366  while (GPoint[0]) {
367  HYdel(GPoint[0]);
368  (void)GPdeleteGrafRef(GPoint[0]);
369  }
371 }
372 
373 
374 static int
376 
377 /* return False if too many traces selected */
378 {
379  struct ka AOI;
380  int i, j, Delta;
381  struct hyEnt *h;
382  struct parent *p, *pnext;
383  char *s1, *s2;
384 
385  if (SCursor.kcInFine == True)
386  Delta = 5.0/View->kvFineRatio;
387  else
388  Delta = 5.0/View->kvCoarseRatio;
389 
390  AOI.kaLeft = SCursor.kcX - Delta;
391  AOI.kaRight = SCursor.kcX + Delta;
392  AOI.kaBottom = SCursor.kcY - Delta;
393  AOI.kaTop = SCursor.kcY + Delta;
394 
396  if (h == NULL) return (True);
397 
398  /* is it already selected? */
399  for (i = 0; i < 8; i++) {
400  if (!GPoint[i])
401  continue;
402 
403  if (h->hyRefType == GPoint[i]->hyRefType) {
404  s1 = get_subname(h);
405  s2 = get_subname(GPoint[i]);
406  j = strcmp(s1,s2);
407  free(s1);
408  free(s2);
409  if (!j)
410  break;
411  }
412  }
413  if (i < 8) {
414 
415  show_mark(i,ERASE,True);
416  /* erase renumbered marks */
417  for (j = i+1; j < 8 && GPoint[j]; j++)
418  show_mark(j,ERASE,False);
419  HYdel(GPoint[i]);
420  (void)GPdeleteGrafRef(GPoint[i]);
421  /* redraw renumbered marks */
422  for (; i < 8 && GPoint[i]; i++)
424  for (p = h->hyParent; p; p = pnext) {
425  pnext = p->pNext;
426  free(p);
427  }
428  free(h);
429  }
430  else {
431 
432  for (i = 0; i < 8; i++)
433  if (!GPoint[i]) break;
434 
435  if (i == 8) {
436  for (p = h->hyParent; p; p = pnext) {
437  pnext = p->pNext;
438  free(p);
439  }
440  free(h);
441  return (False);
442  }
443 
444  GPoint[i] = h;
445  HYadd(h);
446 
448  }
450  return (True);
451 }
452 
453 
454 static void
456 
457 int i;
458 int DorE;
459 int prompt;
460 {
461  long x, y;
462  struct parent *p;
463  int orient;
464 
465  x = GPoint[i]->hyX;
466  y = GPoint[i]->hyY;
467 
468  for (p = GPoint[i]->hyParent; p; p = p->pNext) {
470  TPremultiply();
471  }
472 
473  TPoint(&x,&y);
474  orient = trans_mark(i);
475 
476  for (p = GPoint[i]->hyParent; p; p = p->pNext) {
477  TPop();
478  }
479 
480  if (DorE == DISPLAY) {
481  ShowMarker(DISPLAY,HighlightingColor,x,y,300,i+2,orient);
482  if (prompt) {
483  if (GPoint[i]->hyRefType == HY_NODE)
484  sprintf(TypeOut,"Trace %d: v(%s)",i+1,get_subname(GPoint[i]));
485  else
486  sprintf(TypeOut,"Trace %d: %s",i+1,get_subname(GPoint[i]));
488  }
489  }
490  else {
491  if (prompt) {
492  ShowPrompt("Trace deleted.");
493  }
494  ShowMarker(ERASE,HighlightingColor,x,y,300,i+2,orient);
495  }
496 }
497 
498 
499 static int
501 int i;
502 {
503  long X,Y,X1,Y1;
504  int orient;
505 
506  switch (GPoint[i]->hyOrient) {
507  default:
508  case MARK_NONE:
509  return (MARK_NONE);
510  case MARK_DN:
511  X = 0;
512  Y = -1;
513  break;
514  case MARK_RT:
515  X = 1;
516  Y = 0;
517  break;
518  case MARK_UP:
519  X = 0;
520  Y = 1;
521  break;
522  case MARK_LT:
523  X = -1;
524  Y = 0;
525  break;
526  }
527  X1 = 0;
528  Y1 = 0;
529  TPoint(&X,&Y);
530  TPoint(&X1,&Y1);
531  X -= X1;
532  Y -= Y1;
533 
534  if (X == 0) {
535  if (Y == 1)
536  orient = MARK_UP;
537  else
538  orient = MARK_DN;
539  }
540  else {
541  if (X == 1)
542  orient = MARK_RT;
543  else
544  orient = MARK_LT;
545  }
546  return (orient);
547 }
548 
549 
550 static char *
552 
553 struct hyEnt *hent;
554 {
555  char buf[256];
556  char *c;
557  struct parent *p;
558 
559  if (hent->hyRefType == HY_NODE) {
560  if (nodenum(hent) == 0) {
561  /* ground node */
562  return (CopyString("0"));
563  }
564  return (nodestring(hent));
565  }
566 
567  /* device */
568  c = GetName(hent->hyPointer->oPrptyList);
569  sprintf(buf,"%c",*c);
570  p = hent->hyParent;
571  if (p)
572  strcat(buf,":");
573  for ( ; p; p = p->pNext) {
574  c = GetName(p->pPointer->oPrptyList);
575  strcat(buf,c+1);
576  strcat(buf,":");
577  }
578  c = GetName(hent->hyPointer->oPrptyList);
579  strcat(buf,c+1);
580  if (hent->hyRefType == HY_BRAN)
581  strcat(buf,"#branch");
582  strtolower(buf);
583  return (CopyString(buf));
584 }
585 
586 
587 static struct hyEnt *
588 select_point(CellDesc,AOI,mask)
589 
590 struct s *CellDesc;
591 struct ka *AOI;
592 int mask;
593 {
594  struct g *GenDesc;
595  struct o *Pointer;
596  struct p *Path;
597  struct prpty *PDesc;
598  struct ka InvAOI;
599  struct hyEnt *h;
600  char *name,**b;
601  int i,Layer;
602  long X,Y,Width,*xy;
603  long X1,Y1;
604 
605 
606  InvAOI = *AOI;
607  TInverse();
608  TInversePoint(&InvAOI.kaLeft,&InvAOI.kaBottom);
609  TInversePoint(&InvAOI.kaRight,&InvAOI.kaTop);
610 
611  /* first check the wires */
612  if (mask & HY_NODE) {
613 
614  if (Not CDInitGen(CellDesc,1,AOI->kaLeft,AOI->kaBottom,
615  AOI->kaRight,AOI->kaTop,&GenDesc)) MallocFailed();
616  loop {
617  CDGen(CellDesc,GenDesc,&Pointer);
618  if (Pointer == NULL) break;
619  if (Pointer->oInfo == SQ_GONE) continue;
620  if (Pointer->oType != CDWIRE) continue;
621  CDWire(Pointer,&Layer,&Width,&Path);
622 
623  if ((xy = InPath((int)(AOI->kaRight - AOI->kaLeft)/2,
624  Path,(InvAOI.kaRight + InvAOI.kaLeft)/2,
625  (InvAOI.kaTop + InvAOI.kaBottom)/2)) == NULL)
626  continue;
627  tfree(GenDesc);
628  return (alloc_ent(*xy, *(xy+1), Pointer, HY_NODE, MARK_NONE));
629  }
630  }
631 
632  /* no wire selected, try the devices */
633 
634  if (Not CDInitGen(CellDesc,0,AOI->kaLeft,AOI->kaBottom,
635  AOI->kaRight,AOI->kaTop,&GenDesc)) MallocFailed();
636  loop {
637  CDGen(CellDesc,GenDesc,&Pointer);
638  if (Pointer == NULL) break;
639  if (Pointer->oInfo == SQ_GONE) continue;
640 
641  /* first check the nodes */
642  if (mask & HY_NODE) {
643  PDesc = Pointer->oPrptyList;
644  for (; PDesc; PDesc = PDesc->prpty_Succ) {
645  if (PDesc->prpty_Value != P_NODE) continue;
646  X = PDesc->prpty_Data->p_node.x;
647  Y = PDesc->prpty_Data->p_node.y;
648 
649  if (InBox(X,Y,&InvAOI)) {
650  tfree(GenDesc);
651  return (alloc_ent(X, Y, Pointer, HY_NODE, MARK_NONE));
652  }
653  }
654  }
655  /* no matching nodes */
656 
657  name = ((struct c *)Pointer->oRep)->cMaster->mName;
658 
659  if (!IsCellInLib(name)) {
660  /* a subcircuit */
661  h = subckt_point(Pointer,name,AOI,mask);
662  if (h) {
663  tfree(GenDesc);
664  return (h);
665  }
666  else
667  continue;
668  }
669 
670  PDesc = Pointer->oPrptyList;
671  for ( ; PDesc; PDesc = PDesc->prpty_Succ)
672  if (PDesc->prpty_Value == P_BRANCH) break;
673  if (PDesc == NULL) {
674  /* not a "branch" device */
675  if (mask & HY_DEVN) {
676  /* just want device's name */
677  CDBB(CellDesc,Pointer,&X,&Y,&X1,&Y1);
678  X = (X+X1)/2;
679  Y = (Y+Y1)/2;
680  tfree(GenDesc);
681  return (alloc_ent(X, Y, Pointer, HY_DEVN, MARK_NONE));
682  }
683  else
684  continue;
685  }
686 
687  /* is a "branch" device */
688  X = PDesc->prpty_Data->p_branch.x;
689  Y = PDesc->prpty_Data->p_branch.y;
690  if (InBox(X,Y,&InvAOI)) {
691  /* pointing at the "branch" area */
692 
693  if (mask & HY_BRAN) {
694  X1 = PDesc->prpty_Data->p_branch.r1;
695  Y1 = PDesc->prpty_Data->p_branch.r2;
696  if (X1 == 0) {
697  if (Y1 == 1)
698  i = MARK_UP;
699  else
700  i = MARK_DN;
701  }
702  else {
703  if (X1 == 1)
704  i = MARK_RT;
705  else
706  i = MARK_LT;
707  }
708  tfree(GenDesc);
709  return (alloc_ent(X, Y, Pointer, HY_BRAN, i));
710  }
711  }
712  if (mask & HY_DEVN) {
713  tfree(GenDesc);
714  return (alloc_ent(X, Y, Pointer, HY_DEVN, MARK_NONE));
715  }
716  }
717  return (NULL);
718 }
719 
720 
721 static struct hyEnt *
722 alloc_ent(x,y,pointer,reftype,orient)
723 
724 long x,y;
725 struct o *pointer;
726 int reftype;
727 int orient;
728 {
729  struct hyEnt *h = (struct hyEnt *)tmalloc(sizeof(struct hyEnt));
730 
731  h->hyX = x;
732  h->hyY = y;
733  h->hyPointer = pointer;
734  h->hyRefType = reftype;
735  h->hyOrient = orient;
736  return (h);
737 }
738 
739 
740 static struct hyEnt *
741 subckt_point(pointer,name,AOI,mask)
742 
743 struct o *pointer;
744 char *name;
745 struct ka *AOI;
746 int mask;
747 {
748  struct s *NewDesc;
749  struct hyEnt *h = NULL;
750  struct parent *p;
751 
752  if (!OpenCell(name,&NewDesc)) {
753  SetTransform(pointer);
754  TPremultiply();
755  h = select_point(NewDesc,AOI,mask);
756  TPop();
757  }
758 
759  if (h) {
760  p = (struct parent *)tmalloc(sizeof(struct parent));
761  p->pPointer = pointer;
762  p->pNext = h->hyParent;
763  h->hyParent = p;
764  }
765  return (h);
766 }
767 
768 
769 static char *
771 
772 struct hyEnt *h;
773 {
774  struct parent *p, *pp, *pTmp;
775  char buf[256], *c;
776  int node, nnode;
777 
778  pp = NULL;
779 
780  /* copy new reversed list */
781  pTmp = NULL;
782  for (p = h->hyParent; p; p = p->pNext) {
783  pp = (struct parent *)tmalloc(sizeof(struct parent));
784  pp->pPointer = p->pPointer;
785  pp->pNext = pTmp;
786  pTmp = pp;
787  }
788 
789  /* walk back up node naming hierarchy */
790  node = nodenum(h);
791  for (; pp; pp = p) {
792  p = pp->pNext;
793  nnode = get_enode(node,pp->pPointer);
794  if (nnode == -1)
795  break;
796  node = nnode;
797  free(pp);
798  }
799 
800  /* reverse the list */
801  pTmp = NULL;
802  for (; pp; pp = p) {
803  p = pp->pNext;
804  pp->pNext = pTmp;
805  pTmp = pp;
806  }
807  pp = pTmp;
808 
809  /* create text and free */
810  *buf = '\0';
811  for (; pp; pp = p) {
812  p = pp->pNext;
813  c = GetName(pp->pPointer->oPrptyList);
814  strcat(buf,c+1);
815  strcat(buf,":");
816  free(pp);
817  }
818  strtolower(buf);
819  sprintf(buf + strlen(buf),"%d",node);
820  return (CopyString(buf));
821 }
822 
823 
824 static int
826 
827 /* If the selected node is tied to a node in the parent
828  * subcircuit, return the parent's node, otherwise
829  * return -1.
830  */
831 int Node;
832 struct o *Pointer;
833 {
834  struct prpty *PDesc;
835  struct s *CDesc;
836  char *name;
837  int inode = -1;
838 
839  name = ((struct c *)Pointer->oRep)->cMaster->mName;
840  if (OpenCell(name,&CDesc))
841  return (-1);
842 
843  PDesc = CDesc->sPrptyList;
844  for ( ; PDesc; PDesc = PDesc->prpty_Succ) {
845  if (PDesc->prpty_Value != P_NODE) continue;
846  if (Node == PDesc->prpty_Data->p_node.enode) {
847  inode = PDesc->prpty_Data->p_node.inode;
848  break;
849  }
850  }
851  if (inode == -1)
852  return (-1);
853 
854  PDesc = Pointer->oPrptyList;
855  for ( ; PDesc; PDesc = PDesc->prpty_Succ) {
856  if (PDesc->prpty_Value != P_NODE) continue;
857  if (inode == PDesc->prpty_Data->p_node.inode)
858  return (PDesc->prpty_Data->p_node.enode);
859  }
860  return (-1);
861 }
862 
863 
864 static int
866 
867 /* return the node number of the wire in Pointer */
868 struct o *Pointer;
869 {
870  struct prpty *PDesc;
871 
872  PDesc = Pointer->oPrptyList;
873  for (; PDesc; PDesc = PDesc->prpty_Succ) {
874  if (PDesc->prpty_Value != P_NODE) continue;
875  return (PDesc->prpty_Data->p_node.enode);
876  }
877  return (-1);
878 }
879 
880 
881 static void
882 display_graf_references(DisplayOrErase)
883 
884 char DisplayOrErase;
885 {
886  int i;
887 
888  for (i = 0; i < 8 && GPoint[i]; i++) {
889  show_mark(i,DisplayOrErase,False);
890  }
891 }
892 
893 
894 static int
896 
897 struct hyEnt *h;
898 {
899  struct prpty *PDesc;
900  long X, Y;
901 
902  if (h->hyRefType != HY_NODE)
903  return (-1);
904  if (h->hyPointer->oType == CDWIRE)
905  return (find_wire_node(h->hyPointer));
906 
907  PDesc = h->hyPointer->oPrptyList;
908  for (; PDesc; PDesc = PDesc->prpty_Succ) {
909  if (PDesc->prpty_Value != P_NODE) continue;
910  X = PDesc->prpty_Data->p_node.x;
911  Y = PDesc->prpty_Data->p_node.y;
912  if (h->hyX == X && h->hyY == Y) {
913  return (PDesc->prpty_Data->p_node.enode);
914  }
915  }
916  return (-1);
917 }
struct prpty * sPrptyList
Definition: cddefs.h:133
static int find_wire_node()
#define PL_ESC
Definition: sced.h:62
void ErasePrompt()
Definition: viewport.c:538
static char buf[MAXPROMPT]
Definition: arg.c:18
#define MARK_DN
Definition: scedmacs.h:29
#define loop
Definition: cdmacs.h:11
void TPoint()
int struct o * Pointer
Definition: cd.c:1311
#define HY_BRAN
Definition: sced.h:165
int prpty_Value
Definition: cdprpty.h:67
void TInverse()
Definition: xforms.c:271
#define SQ_GONE
Definition: sced.h:347
Definition: sced.h:172
#define PL_UND
Definition: sced.h:63
long kaRight
Definition: sced.h:112
#define MARK_LT
Definition: scedmacs.h:32
void ClearIplot()
Definition: grafintr.c:199
void HYadd()
char * strcpy()
Definition: cddefs.h:119
static void prompt()
Definition: lexical.c:350
static wordlist * GP_wl()
Definition: grafintr.c:304
void SetTransform()
char * CopyString()
double kvFineRatio
Definition: sced.h:154
Definition: objects.c:1183
int PointLoop()
struct kc SCursor
Definition: init.c:21
char oType
Definition: cddefs.h:148
int enode
Definition: cdprpty.h:24
static void display_graf_references()
long kaBottom
Definition: sced.h:112
double kvCoarseRatio
Definition: sced.h:155
#define ERASE
Definition: scedmacs.h:11
#define Not
Definition: cdmacs.h:16
struct s * kpCellDesc
Definition: sced.h:207
DISPDEVICE * dispdev
Definition: display.c:112
static char * nodestring()
struct prp_node p_node
Definition: cdprpty.h:52
#define PL_PCW
Definition: sced.h:65
void com_graf()
FILE * p
Definition: proc2mod.c:48
struct parent * pNext
Definition: sced.h:175
int x
Definition: cdprpty.h:26
struct s * kpTopDesc
Definition: sced.h:213
void CDGen()
bool hardcopy
Definition: plotdev.h:64
int InBox()
#define P_NODE
Definition: cdprpty.h:12
struct o * pPointer
Definition: sced.h:173
Definition: sced.h:111
long hyY
Definition: sced.h:180
Definition: library.c:18
void wl_free()
static int DoingIplot
Definition: grafintr.c:22
int GPdeleteGrafRef(struct hyEnt *hent)
Definition: grafintr.c:334
#define P_BRANCH
Definition: cdprpty.h:15
long kcY
Definition: sced.h:102
void CDWire()
#define MARK_UP
Definition: scedmacs.h:31
char * MenuIPLOT
Definition: scedintr.c:83
Definition: cddefs.h:215
#define Matching(string)
Definition: scedmacs.h:63
void ShowPromptAndWait()
int x
Definition: cdprpty.h:39
static int get_enode()
int OpenCell()
static char * hent_string()
union prp_data * prpty_Data
Definition: cdprpty.h:65
int hyOrient
Definition: sced.h:186
int r2
Definition: cdprpty.h:42
bool windows
Definition: plotdev.h:61
int kpPointCoarseWindow
Definition: sced.h:258
char * tmalloc()
void MallocFailed()
Definition: scedintr.c:857
long X
Definition: actions.c:450
struct wordlist * wl_prev
Definition: cpstd.h:24
struct parent * hyParent
Definition: sced.h:185
CDesc
Definition: cd.c:1324
void MenuDeselect()
#define HY_NODE
Definition: sced.h:164
#define tfree(x)
Definition: cdmacs.h:22
int CDInitGen()
char * GPstring(int typemask, struct hyEnt **hent)
Definition: grafintr.c:213
void txfree()
#define NULL
Definition: spdefs.h:121
char TypeOut[200]
Definition: init.c:23
#define HY_DEVN
Definition: sced.h:166
void ShowOutput(int *LookedAhead)
Definition: grafintr.c:81
struct kp Parameters
Definition: init.c:19
int IplotStatusChanged
Definition: grafintr.c:23
long kaTop
Definition: sced.h:112
void strtolower()
int hyRefType
Definition: sced.h:188
long * InPath()
void TPremultiply()
Definition: xforms.c:216
#define True
Definition: scedstub.c:16
void HYdel()
static struct hyEnt * alloc_ent()
struct kv * View
Definition: init.c:17
static double c
Definition: vectors.c:16
struct sSCEDitf * ft_sced
Definition: main.c:441
char * MenuGRAF
Definition: scedintr.c:78
Definition: sced.h:178
struct o * oRep
Definition: cddefs.h:144
long kaLeft
Definition: sced.h:112
int y
Definition: cdprpty.h:27
#define DISPLAY
Definition: scedmacs.h:12
Definition: cddefs.h:142
void RedisplaySCED()
int y
Definition: cdprpty.h:40
Definition: cpstd.h:21
void(* sc_clriplot)()
Definition: scedio.h:52
struct prp_branch p_branch
Definition: cdprpty.h:54
Definition: cddefs.h:177
int Layer
Definition: cd.c:1908
#define CDWIRE
Definition: cddefs.h:47
static struct hyEnt * subckt_point()
static void show_mark()
static char * get_subname()
struct prpty * prpty_Succ
Definition: cdprpty.h:66
long kcX
Definition: sced.h:102
static struct hyEnt * select_point()
int r1
Definition: cdprpty.h:41
void(* sc_setiplot)()
Definition: scedio.h:51
struct wordlist * wl_next
Definition: cpstd.h:23
void ShowMarker()
#define MARK_RT
Definition: scedmacs.h:30
int CDBB()
char * FBEdit()
int inode
Definition: cdprpty.h:25
GRAPH * currentgraph
Definition: graphdb.c:21
void SetIplot()
Definition: grafintr.c:181
Definition: cddefs.h:227
char * wl_word
Definition: cpstd.h:22
static struct hyEnt * GPoint[9]
Definition: grafintr.c:19
#define False
Definition: scedstub.c:15
void TInversePoint()
void GPclearGraf()
Definition: grafintr.c:364
char * GPgetString(struct hyEnt *hent)
Definition: grafintr.c:239
void TPop()
Definition: xforms.c:64
static int select_trace()
Definition: grafintr.c:375
long hyX
Definition: sced.h:179
char * GetName()
#define PL_CMD
Definition: sced.h:64
int kcInFine
Definition: sced.h:105
static int nodenum()
static int trans_mark()
char * MenuEDIT
Definition: scedintr.c:75
void ConnectRecursive()
wordlist * cp_lexer()
char * wl_flatten()
void DoIplot()
Definition: grafintr.c:161
int IsCellInLib()
Definition: cddefs.h:192
void MenuSelect()
long Y
Definition: actions.c:450
Definition: cdprpty.h:62
void ShowPrompt(char *str)
Definition: scedstub.c:71
short oInfo
Definition: cddefs.h:147
struct prpty * oPrptyList
Definition: cddefs.h:146
void free()
struct o * hyPointer
Definition: sced.h:183
#define MARK_NONE
Definition: scedmacs.h:28
int CheckError()
Definition: scedintr.c:696
#define HighlightingColor
Definition: sced.h:74