Jspice3
scedext.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DefMenuSize   80
 

Functions

char * tmalloc ()
 
int cieq ()
 
int ciprefix ()
 
void strtolower ()
 
void Basic ()
 
void Undo ()
 
void Color ()
 
void Bgrnd ()
 
void Hlite ()
 
void RGB ()
 
void AlterColor ()
 
void SetGrid ()
 
void MenuParams ()
 
void MenuPrompt ()
 
void MenuMore ()
 
int GetColor ()
 
void ShowRGB ()
 
void DoAlloc ()
 
void Edit ()
 
void TitleWindow ()
 
void Save ()
 
void WriteCell ()
 
int FixCellName ()
 
void Rdraw ()
 
void ShowFull ()
 
void Expand ()
 
void MX ()
 
void MY ()
 
void Rotat0 ()
 
void Rotat90 ()
 
void Rotat180 ()
 
void Rotat270 ()
 
void Sel ()
 
void Area ()
 
void Desel ()
 
void Selection ()
 
int AreTypesInQ ()
 
void SelectTypes ()
 
void SQInit ()
 
void SQClear ()
 
void SQInsert ()
 
void SQDelete ()
 
void SQComputeBB ()
 
void SQRestore ()
 
void SQDesel ()
 
void SQShow ()
 
long * InPath ()
 
void Copy ()
 
void Move ()
 
void ShowGhost ()
 
void CopyPathWithXForm ()
 
void ShowTransformed ()
 
void SetNewTransform ()
 
void AddResultingTransform ()
 
void Break ()
 
struct pCopyPath ()
 
void Dir ()
 
char * CopyString ()
 
void Pan ()
 
void Zoom ()
 
void Windo ()
 
void LastView ()
 
void SaveLastView ()
 
void SaveViewOnStack ()
 
void Redisplay ()
 
void RedisplayAfterInterrupt ()
 
int TCheck ()
 
void SetTransform ()
 
void ShowOutput ()
 
void DoIplot ()
 
void SetIplot ()
 
void ClearIplot ()
 
char * GPstring ()
 
char * GPgetString ()
 
int GPdeleteGrafRef ()
 
void GPclearGraf ()
 
void ShowGrid ()
 
void ShowLine ()
 
void ShowManhattanLine ()
 
void Hcopy ()
 
char * HYtostr ()
 
char * HYtoascii ()
 
struct hprlistHYfromascii ()
 
char * HYgetentry ()
 
struct hprlistHYcopy ()
 
struct hyEntHYcopyEnt ()
 
void HYfree ()
 
char * KbEdit ()
 
struct hprlistHYedit ()
 
void HYrepaint ()
 
void KbCursor ()
 
void HYinit ()
 
void HYadd ()
 
void HYdel ()
 
void HYtransform ()
 
void HYtransformStretch ()
 
void HYundoTransform ()
 
void HYclearUndoFlags ()
 
void HYdeleteReference ()
 
char * Init ()
 
void InitVLT ()
 
void InitParameters ()
 
void DefaultWindows ()
 
void InitCoarseWindow ()
 
void InitFineWindow ()
 
void SetPositioning ()
 
void InitViewport ()
 
void SetCurrentAOI ()
 
void CenterFullView ()
 
void UpdateSCED ()
 
void Readin ()
 
short FBGetchar ()
 
char * FBEdit ()
 
struct hprlistFBHyEdit ()
 
void FBText ()
 
void FBPolygon ()
 
void FBPolygonClip ()
 
void FBSetRubberBanding ()
 
void Label ()
 
void BBLabel ()
 
void CDLabelBB ()
 
void ShowLabel ()
 
char SetXform ()
 
void LibraryOpen ()
 
FILE * OpenDevice ()
 
int IsCellInLib ()
 
void SetLibraryChoices ()
 
void ModelLibraryOpen ()
 
void QueueModel ()
 
struct linePrintModels ()
 
struct lineGetModelText ()
 
void DestroySCEDlibs ()
 
void LibraryClose ()
 
void ModelLibraryClose ()
 
void MoreText ()
 
int MoreLine ()
 
int EnableMore ()
 
int RepaintMore ()
 
int MorePageDisplay ()
 
void ShowMutual ()
 
struct linePrintMutual ()
 
char * GetName ()
 
void UpdateProperties ()
 
void UpdateDeviceName ()
 
void AssignWireProperties ()
 
void DoSpiceList ()
 
void DumpSpiceFile ()
 
struct lineMakeSpiceDeck ()
 
struct lineSpiceList ()
 
void ConnectRecursive ()
 
void Connect ()
 
void ShowProperties ()
 
void UpdatePropertyString ()
 
void Subcircuit ()
 
int SelectNode ()
 
void ShowTerminals ()
 
void DisplayTerminals ()
 
void TransformReferences ()
 
void TransformReferencePoint ()
 
void UndoReferenceTransform ()
 
void ClearReferenceUndoFlags ()
 
void Del ()
 
void Wires ()
 
void ShowWire ()
 
int IsManhattan ()
 
void ShowPath ()
 
void ShowPolygon ()
 
int InBox ()
 
void OversizeBox ()
 
void OutlineBox ()
 
void ShowEmptyBox ()
 
void EraseBox ()
 
void StretchPath ()
 
void ShowStretch ()
 
void Dots ()
 
void Point ()
 
int ButtonPress ()
 
int PointLoop ()
 
int PointLoopSafe ()
 
int PointColor ()
 
void FinePosition ()
 
void NotPointingAtLayout ()
 
void InitDeviceMenu ()
 
void NewSubckt ()
 
void Place ()
 
void ShowNewInstance ()
 
void NewSymbol ()
 
int MutSelected ()
 
void Push ()
 
void UpdateParent ()
 
void Pop ()
 
int CheckModified ()
 
void ClearContext ()
 
void Flatten ()
 
int OpenCell ()
 
void PToL ()
 
void ClipToGridPoint ()
 
void ShowCommandMenu ()
 
void ShowMenu ()
 
MENUGetCurrentMenu ()
 
void AlterMenuEntries ()
 
void MenuSelect ()
 
void MenuDeselect ()
 
void MenuSelectDev ()
 
void MenuDeselectDev ()
 
void FixMenuPrefix ()
 
void ShowPrompt ()
 
void ShowPromptAndWait ()
 
void ShowPromptWithColor ()
 
void RedrawPrompt ()
 
void AppendToOldPrompt ()
 
void ErasePrompt ()
 
void OutlineText ()
 
void EraseLargeCoarseViewport ()
 
void EraseFineViewport ()
 
void ShowFineViewport ()
 
void ShowCurrentObject ()
 
void ShowMarker ()
 
void InitMenus ()
 
void InitBasicMenu ()
 
int sced ()
 
int SafeCmds ()
 
void RunSpice ()
 
int CheckSaved ()
 
int CheckError ()
 
int IsSymfile ()
 
void SetPathFromSpice ()
 
void SetCDPath ()
 
char * GetHardCopyDevice ()
 
void InitSignals ()
 
char * NextCellName ()
 
void MallocFailed ()
 
struct lineAllocateLine ()
 
char * AllocateNewString ()
 
void ShowProcess ()
 
void SCEDhelp ()
 
void SCEDquitHelp ()
 

Variables

struct ksSelectQHead
 
struct ka SelectQBB
 
int IplotStatusChanged
 
struct kvView
 
struct ka MenuViewport
 
struct kp Parameters
 
struct klColorTable
 
struct kc SCursor
 
struct a CurrentAOI
 
char TypeOut [200]
 
MENUBasicMenu
 
MENUDeviceMenu
 
MENU AmbiguityMenu [DefMenuSize]
 

Macro Definition Documentation

#define DefMenuSize   80

Definition at line 555 of file scedext.h.

Function Documentation

void AddResultingTransform ( )
struct line* AllocateLine ( )
char* AllocateNewString ( )
void AlterColor ( )
void AlterMenuEntries ( )
void AppendToOldPrompt ( )
void Area ( )
int AreTypesInQ ( )
void AssignWireProperties ( )
void Basic ( )
void BBLabel ( )
void Bgrnd ( )
void Break ( )
int ButtonPress ( )
void CDLabelBB ( )
void CenterFullView ( )

Definition at line 466 of file init.c.

468 {
469  long L,B,R,T;
470  long X,Y,Width,Height;
471  double Cratio,Vratio;
472 
473  if (Not CDBB(Parameters.kpCellDesc,(struct o *)NULL,&L,&B,&R,&T))
474  MallocFailed();
475  /*
476  * Window cell automatically. How slick.
477  * Leave some white space around the perimeter.
478  * Check for a null (empty) cell.
479  */
480  if (L == R Or B == T Or (L == CDINFINITY And B == CDINFINITY)) {
481  DefaultWindows();
482  return;
483  }
485 
486  Width = R - L;
487  Height = T - B;
488  X = L + Width/2;
489  Y = B + Height/2;
490  Cratio = (double) Width/Height;
491 
492  if (Cratio < Vratio)
493  Width = Height*Vratio;
494  else
495  Height = Width/Vratio;
496 
497  InitCoarseWindow(X,Y,Width);
498  L = X - Width/2;
499  R = X + Width/2;
500  B = Y - Height/2;
501  T = Y + Height/2;
502 /*
503  correct_cell_view(&L,&B,&R,&T);
504 */
505 
506  Width = R - L;
507  Height = T - B;
508  X = L + Width/2;
509  Y = B + Height/2;
510  Cratio = (double) Width/Height;
511  if (Cratio > Vratio)
512  Width *= 1.1;
513  else
514  Width = 1.1*Height*Vratio;
515 
516  InitCoarseWindow(X,Y,Width);
517 
518  SetPositioning();
519 }
#define Or
Definition: cdmacs.h:15
#define CDINFINITY
Definition: cddefs.h:70
void SetPositioning()
Definition: init.c:322
struct kv * View
Definition: init.c:17
struct s * kpCellDesc
Definition: sced.h:207
#define Not
Definition: cdmacs.h:16
#define L
Definition: parse.c:442
void MallocFailed()
Definition: scedintr.c:857
long X
Definition: actions.c:450
struct kp Parameters
Definition: init.c:19
#define R
Definition: parse.c:444
#define NULL
Definition: spdefs.h:121
struct ka * kvCoarseViewport
Definition: sced.h:150
double kaHeight
Definition: sced.h:114
Definition: cddefs.h:142
#define And
Definition: cdmacs.h:14
int CDBB()
double kaWidth
Definition: sced.h:114
void DefaultWindows()
Definition: init.c:239
void InitCoarseWindow(long X, long Y, long Width)
Definition: init.c:265
long Y
Definition: actions.c:450
int CheckError ( )

Definition at line 696 of file scedintr.c.

701 {
702  int c;
703  struct ka *AOI,BB;
704 
705  rewind(cp_err);
706  if ((c = getc(cp_err)) == EOF) return (False);
707  ungetc(c,cp_err);
708  if (!PopUpErrMessage(cp_err)) {
710  FBEraseBox(AOI->kaLeft,AOI->kaBottom,
711  AOI->kaRight,AOI->kaTop);
712  MoreText((int)AOI->kaLeft-1,(int)AOI->kaBottom-1,
713  (int)AOI->kaRight-1,(int)AOI->kaTop-1,cp_err,MoreTextColor);
715  }
716  rewind(cp_err);
717 #ifdef HAVE_NO_FTRUNCATE
718  /* have to add something here */
719 #else
720  ftruncate(fileno(cp_err),0);
721 #endif
722  return (True);
723 }
long kaRight
Definition: sced.h:112
#define FBEraseBox(L, B, R, T)
Definition: scedmacs.h:65
long kaBottom
Definition: sced.h:112
FILE * cp_err
Definition: help.c:101
Definition: sced.h:111
struct ka * kvLargeCoarseViewport
Definition: sced.h:151
long kaTop
Definition: sced.h:112
#define True
Definition: scedstub.c:16
struct kv * View
Definition: init.c:17
static double c
Definition: vectors.c:16
void MoreText()
long kaLeft
Definition: sced.h:112
void RedisplaySCED()
GRAPH * currentgraph
Definition: graphdb.c:21
#define False
Definition: scedstub.c:15
#define MoreTextColor
Definition: sced.h:81
int PopUpErrMessage()
int CheckModified ( )

Definition at line 906 of file subckt.c.

909 {
910  struct s *SDesc;
911  struct cc *Cx = Context;
912  char *TypeIn;
913 
914  while (Cx) {
915  if (Cx->ccModified) {
916  sprintf(TypeOut,"Circuit %s has been modified. Save it? (y) ",
917  Cx->ccMaster);
919  TypeIn = FBEdit(NULL);
920  if (TypeIn == NULL) return (True);
921  if (*TypeIn != 'n' && *TypeIn != 'N') {
922  CDSymbol(Cx->ccMaster,&SDesc);
923  if (SDesc && CDUpdate(SDesc,(char *)NULL)) {
924  Cx->ccModified = False;
925  if (Not CDReflect(SDesc))
926  MallocFailed();
927  }
928  else {
929  /* shouldn't happen */
930  sprintf(TypeOut,"Can't save %s.",Cx->ccMaster);
932  return (True);
933  }
934  }
935  }
936  Cx = Cx->ccNext;
937  }
938  ClearContext();
939  return (False);
940 }
Definition: subckt.c:18
Definition: cddefs.h:119
int CDUpdate()
#define Not
Definition: cdmacs.h:16
char * ccMaster
Definition: subckt.c:23
static struct cc * Context
Definition: subckt.c:28
void ShowPromptAndWait()
void MallocFailed()
Definition: scedintr.c:857
int ccModified
Definition: subckt.c:20
#define NULL
Definition: spdefs.h:121
char TypeOut[200]
Definition: init.c:23
#define True
Definition: scedstub.c:16
struct cc * ccNext
Definition: subckt.c:25
int CDReflect()
void ClearContext()
Definition: subckt.c:944
void CDSymbol()
char * FBEdit()
#define False
Definition: scedstub.c:15
void ShowPrompt(char *str)
Definition: scedstub.c:71
int CheckSaved ( )

Definition at line 656 of file scedintr.c.

665 {
666  int i,j;
667  char *TypeIn;
668 
670  i = CheckModified();
672  if (i And j)
673  TypeIn =
674  "Both parent and current circuit have changed. Quit anyway? (n): ";
675  elif (i And Not j)
676  TypeIn = "Parent circuit has been modified. Quit anyway? (n): ";
677  elif (Not i And j)
678  TypeIn = "Current circuit has been modified. Quit anyway? (n): ";
679  else {
681  return (0);
682  }
683  ShowPrompt(TypeIn);
684  TypeIn = FBEdit(NULL);
685  if (TypeIn != NULL And (TypeIn[0] == 'Y' Or TypeIn[0] == 'y')){
687  return (1);
688  }
689  ErasePrompt();
691  return (-1);
692 }
void ErasePrompt()
Definition: viewport.c:538
#define Or
Definition: cdmacs.h:15
int kpModified
Definition: sced.h:261
int CheckModified()
Definition: subckt.c:906
#define Not
Definition: cdmacs.h:16
char * kpCellName
Definition: sced.h:210
void MenuDeselect()
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
#define elif
Definition: cdmacs.h:10
#define And
Definition: cdmacs.h:14
char * FBEdit()
char * MenuABORT
Definition: scedintr.c:63
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
int cieq ( )
int ciprefix ( )
void ClearContext ( )

Definition at line 944 of file subckt.c.

947 {
948  while (Context) pop_context();
949 }
static struct cc * Context
Definition: subckt.c:28
static int pop_context()
Definition: subckt.c:873
void ClearIplot ( )

Definition at line 199 of file grafintr.c.

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 }
Definition: library.c:18
static int DoingIplot
Definition: grafintr.c:22
#define NULL
Definition: spdefs.h:121
int IplotStatusChanged
Definition: grafintr.c:23
struct sSCEDitf * ft_sced
Definition: main.c:441
Definition: cpstd.h:21
void(* sc_clriplot)()
Definition: scedio.h:52
struct wordlist * wl_next
Definition: cpstd.h:23
char * wl_word
Definition: cpstd.h:22
#define False
Definition: scedstub.c:15
void ClearReferenceUndoFlags ( )

Definition at line 1893 of file netlist.c.

1895 {
1896  struct prpty *PDesc;
1897 
1898  PDesc = Parameters.kpCellDesc->sPrptyList;
1899  for (; PDesc; PDesc = PDesc->prpty_Succ) {
1900  if (PDesc->prpty_Value != P_NODE) continue;
1901  if (PDesc->prpty_Info == NULL) continue;
1902  free(PDesc->prpty_Info);
1903  PDesc->prpty_Info = NULL;
1904  }
1905 }
struct prpty * sPrptyList
Definition: cddefs.h:133
int prpty_Value
Definition: cdprpty.h:67
char * prpty_Info
Definition: cdprpty.h:64
struct s * kpCellDesc
Definition: sced.h:207
#define P_NODE
Definition: cdprpty.h:12
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
struct prpty * prpty_Succ
Definition: cdprpty.h:66
Definition: cdprpty.h:62
void free()
void ClipToGridPoint ( )
void Color ( )
void Connect ( )
void ConnectRecursive ( )
void Copy ( )
struct p* CopyPath ( )
void CopyPathWithXForm ( )
char* CopyString ( )
void DefaultWindows ( )

Definition at line 239 of file init.c.

241 {
242  int DefWidth;
243 
245  if (View->kvControl == FULLSCREEN)
246  DefWidth = 100;
247  else
248  DefWidth = 1000;
249  InitCoarseWindow((long)0,(long)0,(long)DefWidth*RESOLUTION);
250 
251  /* default fine window */
254 
257 
258 
259  SetPositioning();
260  SaveLastView();
261 }
int kpPointingThreshold
Definition: sced.h:279
char kvControl
Definition: sced.h:157
void SetPositioning()
Definition: init.c:322
struct kv * View
Definition: init.c:17
struct ka * kvFineViewport
Definition: sced.h:148
struct ka * kvLargeCoarseViewport
Definition: sced.h:151
struct kp Parameters
Definition: init.c:19
struct ka * kvCoarseViewport
Definition: sced.h:150
struct ka * kvFineWindow
Definition: sced.h:147
#define RESOLUTION
Definition: sced.h:36
double kaHeight
Definition: sced.h:114
#define FULLSCREEN
Definition: sced.h:49
void SaveLastView()
Definition: display.c:297
double kaWidth
Definition: sced.h:114
void InitCoarseWindow(long X, long Y, long Width)
Definition: init.c:265
void Del ( )
void Desel ( )

Definition at line 264 of file choose.c.

266 {
268  SQComputeBB();
269  if (SelectQHead != NULL) {
270  SQClear();
271  /* Take care of Instance markers */
272  OversizeBox(&SelectQBB,200);
275  }
277 }
void Redisplay()
void MenuDeselect()
void SQComputeBB()
Definition: choose.c:749
#define NULL
Definition: spdefs.h:121
void SQClear()
Definition: choose.c:690
void EraseBox()
struct ks * SelectQHead
Definition: scedext.h:64
void OversizeBox()
char * MenuDESEL
Definition: scedintr.c:72
void MenuSelect()
struct ka SelectQBB
Definition: scedext.h:65
void DestroySCEDlibs ( )

Definition at line 391 of file library.c.

393 {
394  struct lib *l;
395  struct wl *w;
396  struct ml *m;
397 
398  for (l = Lib; l; l = Lib) {
399  Lib = l->lib_next;
400  txfree(l->lib_name);
401  tfree(l);
402  }
403  Lib = NULL;
404  tfree(LibName);
405 
406  for (l = Mod; l; l = Mod) {
407  Mod = l->lib_next;
408  txfree(l->lib_name);
409  for (w = l->lib_info; w; w = l->lib_info) {
410  l->lib_info = w->wl_next;
411  txfree(w->wl_name);
412  tfree(w);
413  }
414  tfree(l);
415  }
416  Mod = NULL;
417  tfree(ModLibName);
418 
419  for (m = Models; m; m = Models) {
420  Models = m->ml_next;
421  txfree(m->ml_name);
422  tfree(m);
423  }
424  Models = NULL;
425  Mlevel = 0;
426 }
struct wl * lib_info
Definition: library.c:27
static struct lib * Lib
Definition: library.c:39
static int Mlevel
Definition: library.c:197
static char * ModLibName
Definition: library.c:186
char * ml_name
Definition: library.c:189
Definition: cddefs.h:169
Definition: library.c:18
Definition: cddefs.h:312
FILE * m
Definition: proc2mod.c:47
Definition: library.c:188
static struct lib * Mod
Definition: library.c:185
#define tfree(x)
Definition: cdmacs.h:22
void txfree()
#define NULL
Definition: spdefs.h:121
static struct ml * Models
Definition: library.c:195
static char * LibName
Definition: library.c:40
struct wl * wl_next
Definition: library.c:20
char * lib_name
Definition: library.c:25
Definition: library.c:24
char * wl_name
Definition: library.c:19
struct ml * ml_next
Definition: library.c:190
struct lib * lib_next
Definition: library.c:28
void Dir ( )

Definition at line 76 of file dir.c.

78 {
79  char *path;
80  char *c,*s;
81  struct list *wl,*wx,*wx0 = NULL;
82  char buf[BSIZE_SP];
83 
84 
86  path = PGetPath();
87 
88  for (s = path;;) {
89 
90  while (isspace(*s)) s++;
91  if (*s == '\0')
92  break;
93 
94  c = buf;
95  while (!isspace(*s) && *s != '\0')
96  *c++ = *s++;
97  *c = '\0';
98  /* buf contains the directory path */
99 
100  wl = symfiles(buf);
101 
102  list_sort(wl);
103  format_lines(wl);
104  if (wx0 == NULL)
105  wx = wx0 = alloc(list);
106  else {
107  wx->l_next = alloc(list);
108  wx = wx->l_next;
109  }
110  if (wx == NULL) MallocFailed();
111  strcat(buf," :");
112  if (!wl)
113  strcat(buf, "\n no symbol files found\n ");
114  wx->l_word = CopyString(buf);
115  wx->l_next = wl;
116  while (wx->l_next) wx = wx->l_next;
117  }
118  display_lines(wx0);
119  list_free(wx0);
120  if (!dispdev->windows)
123 }
static char buf[MAXPROMPT]
Definition: arg.c:18
#define BSIZE_SP
Definition: misc.h:19
static void display_lines()
char * MenuDIR
Definition: scedintr.c:73
Definition: cddefs.h:119
DISPDEVICE * dispdev
Definition: display.c:112
Definition: library.c:18
char * CopyString(char *s)
Definition: dir.c:36
#define alloc(type)
Definition: cdmacs.h:21
bool windows
Definition: plotdev.h:61
void MallocFailed()
Definition: scedintr.c:857
void MenuDeselect()
struct list * l_next
Definition: dir.c:55
#define NULL
Definition: spdefs.h:121
char * l_word
Definition: dir.c:54
static void list_sort()
static double c
Definition: vectors.c:16
void RedisplaySCED()
static void format_lines()
Definition: dir.c:53
static void list_free()
GRAPH * currentgraph
Definition: graphdb.c:21
static struct list * symfiles()
char * PGetPath()
Definition: paths.c:67
static char * path
Definition: paths.c:13
void MenuSelect()
void DisplayTerminals ( )
void DoAlloc ( )
void DoIplot ( )

Definition at line 161 of file grafintr.c.

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 }
Definition: library.c:18
static int DoingIplot
Definition: grafintr.c:22
char * MenuIPLOT
Definition: scedintr.c:83
void MenuDeselect()
int IplotStatusChanged
Definition: grafintr.c:23
#define True
Definition: scedstub.c:16
Definition: cpstd.h:21
#define False
Definition: scedstub.c:15
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
void DoSpiceList ( )

Definition at line 132 of file netlist.c.

135 {
136  FILE *fp;
137  char *c;
138  struct line *d,*d0;
139 
140  sprintf(TypeOut,"%s",Parameters.kpCellName);
141  if ((c = strchr(TypeOut,'.')) != NULL)
142  *c = '\0';
143  strcat(TypeOut,".ckt");
144  fp = fopen(TypeOut,"w");
145  if (fp == NULL) {
146  ShowPrompt("Can't open netlist file.");
147  return;
148  }
150  sprintf(TypeOut + 80,"Netlist is in file %s.",TypeOut);
151  ShowPrompt(TypeOut + 80);
152  d0 = MakeSpiceDeck();
153  for (d = d0; d; d = d->li_next)
154  fprintf(fp,"%s\n",d->li_line);
155  inp_deckfree(d0);
156  fclose(fp);
158 }
char * kpCellName
Definition: sced.h:210
Definition: fteinp.h:14
void MenuDeselect()
Definition: cddefs.h:237
#define NULL
Definition: spdefs.h:121
char TypeOut[200]
Definition: init.c:23
struct kp Parameters
Definition: init.c:19
char * li_line
Definition: fteinp.h:16
static double c
Definition: vectors.c:16
struct line * li_next
Definition: fteinp.h:18
void inp_deckfree()
struct line * MakeSpiceDeck()
Definition: netlist.c:183
char * MenuSPICE
Definition: netlist.c:128
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
void Dots ( )
void DumpSpiceFile ( )
void Edit ( )
int EnableMore ( )
void EraseBox ( )
void EraseFineViewport ( )

Definition at line 594 of file viewport.c.

596 {
597  /*
598  * Erase fine positioning window in coarse window and patch
599  * up the hole. 'c' will disable showing of fine positioning
600  * window in Redisplay.
601  */
606 }
void Redisplay()
#define SPLITSCREEN
Definition: sced.h:48
#define COARSEVIEWPORTONLY
Definition: sced.h:51
char kpRedisplayControl
Definition: sced.h:312
struct kp Parameters
Definition: init.c:19
struct ka * kvFineWindow
Definition: sced.h:147
struct kv * View
Definition: init.c:17
void EraseBox()
void EraseLargeCoarseViewport ( )

Definition at line 583 of file viewport.c.

585 {
590 }
long kaRight
Definition: sced.h:112
#define FBEraseBox(L, B, R, T)
Definition: scedmacs.h:65
long kaBottom
Definition: sced.h:112
struct ka * kvLargeCoarseViewport
Definition: sced.h:151
long kaTop
Definition: sced.h:112
struct kv * View
Definition: init.c:17
long kaLeft
Definition: sced.h:112
void ErasePrompt ( )

Definition at line 538 of file viewport.c.

540 {
544  BackPrompt[0] = '\0';
545  DevUpdate();
546 }
#define ERASE
Definition: scedmacs.h:11
#define gi_numtextcols
Definition: scedmacs.h:61
struct kp Parameters
Definition: init.c:19
void DevUpdate()
Definition: display.c:359
static char BackPrompt[200]
Definition: viewport.c:436
#define gi_numtextrows
Definition: scedmacs.h:60
#define FILL
Definition: scedmacs.h:13
int kpLastCursorColumn
Definition: sced.h:293
void OutlineText(int Left, int Bottom, int Right, int Top, char Type, char DisplayOrErase, int Pixel)
Definition: viewport.c:550
void Expand ( )

Definition at line 920 of file bascmd.c.

922 {
923  extern char *MenuEXPND;
924 
926  MenuDeselect(MenuEXPND);
928  }
929  else {
930  MenuSelect(MenuEXPND);
932  }
935 }
void Redisplay()
struct ka * kvCoarseWindow
Definition: sced.h:149
void EraseLargeCoarseViewport()
Definition: viewport.c:583
int kpExpandInstances
Definition: sced.h:231
void MenuDeselect()
struct kp Parameters
Definition: init.c:19
#define True
Definition: scedstub.c:16
struct kv * View
Definition: init.c:17
#define False
Definition: scedstub.c:15
void MenuSelect()
char * MenuEXPND
Definition: scedintr.c:76
char* FBEdit ( )
short FBGetchar ( )
struct hprlist* FBHyEdit ( )
void FBPolygon ( )
void FBPolygonClip ( )
void FBSetRubberBanding ( )
void FBText ( )
void FinePosition ( )
int FixCellName ( )
void FixMenuPrefix ( )
void Flatten ( )
int GetColor ( )
MENU* GetCurrentMenu ( )

Definition at line 174 of file viewport.c.

176 {
177  if (Parameters.kpMenu == BASICMENU)
178  return (BasicMenu);
180  return (AmbiguityMenu);
181  return (NULL);
182 }
#define BASICMENU
Definition: sced.h:56
char kpMenu
Definition: sced.h:319
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
#define AMBIGUITYMENU
Definition: sced.h:57
MENU AmbiguityMenu[DefMenuSize]
Definition: scedintr.c:51
MENU * BasicMenu
Definition: scedintr.c:49
char* GetHardCopyDevice ( )

Definition at line 823 of file scedintr.c.

826 {
827  struct variable *v;
828  extern char *kw_hcopydev;
829 
830  if (!cp_getvar(kw_hcopydev, VT_STRING, (char *)&v))
831  return ("prn");
832  return (v->va_string);
833 }
int cp_getvar()
#define VT_STRING
Definition: cpstd.h:63
char * kw_hcopydev
Definition: help.c:105
Definition: cpstd.h:41
struct line* GetModelText ( )
char* GetName ( )
void GPclearGraf ( )

Definition at line 364 of file grafintr.c.

365 {
366  while (GPoint[0]) {
367  HYdel(GPoint[0]);
368  (void)GPdeleteGrafRef(GPoint[0]);
369  }
371 }
int GPdeleteGrafRef(struct hyEnt *hent)
Definition: grafintr.c:334
int IplotStatusChanged
Definition: grafintr.c:23
#define True
Definition: scedstub.c:16
void HYdel()
static struct hyEnt * GPoint[9]
Definition: grafintr.c:19
int GPdeleteGrafRef ( )
char* GPgetString ( )
char* GPstring ( )
void Hcopy ( )

Definition at line 36 of file hcopy.c.

38 {
41 
45 
47  InitViewport();
51 }
static void hcpy_display()
void CenterFullView()
Definition: init.c:466
void InitViewport()
Definition: init.c:358
int kpDoingHardcopy
Definition: sced.h:287
void MenuDeselect()
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
#define True
Definition: scedstub.c:16
void RedisplaySCED()
GRAPH * currentgraph
Definition: graphdb.c:21
void(* redraw)()
Definition: ftegraph.h:70
#define False
Definition: scedstub.c:15
void MenuSelect()
void ft_hardcopy()
char * MenuHCOPY
Definition: scedintr.c:80
void Hlite ( )
void HYadd ( )
void HYclearUndoFlags ( )

Definition at line 1071 of file hypertxt.c.

1073 {
1074  struct hyEnt **hent;
1075 
1076  if (!hyBase)
1077  return;
1078 
1079  for (hent = hyBase; *hent; hent++)
1080  (*hent)->hyUndo = False;
1081 }
#define hyBase
Definition: hypertxt.c:12
int hyUndo
Definition: sced.h:189
Definition: sced.h:178
#define False
Definition: scedstub.c:15
struct hprlist* HYcopy ( )
struct hyEnt* HYcopyEnt ( )
void HYdel ( )
void HYdeleteReference ( )
struct hprlist* HYedit ( )
void HYfree ( )
struct hprlist* HYfromascii ( )
char* HYgetentry ( )
void HYinit ( )

Definition at line 834 of file hypertxt.c.

839 {
840  int i;
841  struct hyEnt **hent;
842  char *s;
843 
844  if (hyBase == NULL)
845  return;
846 
847  for (hent = hyBase; *hent; hent++) {
848  if ((*hent)->hyPointer == NULL && (
849  (*hent)->hyRefType == HY_NODE ||
850  (*hent)->hyRefType == HY_BRAN ||
851  (*hent)->hyRefType == HY_DEVN)) {
852  s = GPgetString(*hent);
853  txfree(s);
854  }
855  }
856 }
#define HY_BRAN
Definition: sced.h:165
Definition: cddefs.h:119
#define hyBase
Definition: hypertxt.c:12
#define HY_NODE
Definition: sced.h:164
void txfree()
#define NULL
Definition: spdefs.h:121
#define HY_DEVN
Definition: sced.h:166
char * GPgetString()
Definition: sced.h:178
void HYrepaint ( )
char* HYtoascii ( )
char* HYtostr ( )
void HYtransform ( )
void HYtransformStretch ( )
void HYundoTransform ( )

Definition at line 1049 of file hypertxt.c.

1051 {
1052  struct hyEnt **hent;
1053 
1054  if (!hyBase)
1055  return;
1056 
1057  for (hent = hyBase; *hent; hent++) {
1058 
1059  if ((*hent)->hyUndo) {
1060  (*hent)->hyX = (*hent)->hyOldX;
1061  (*hent)->hyY = (*hent)->hyOldY;
1062  (*hent)->hyPointer = (*hent)->hyOldPointer;
1063  (*hent)->hyOrient = (*hent)->hyOldOrient;
1064  (*hent)->hyUndo = False;
1065  }
1066  }
1067 }
#define hyBase
Definition: hypertxt.c:12
Definition: sced.h:178
#define False
Definition: scedstub.c:15
long hyX
Definition: sced.h:179
int InBox ( )
char* Init ( )

Definition at line 35 of file init.c.

37 {
38  GRAPH *graph;
39 
40  /*
41  * Initialize for default values
42  */
43  if (ColorTable == NULL) {
44 
46 
52 
53  ColorTable = (struct kl *)malloc(16*sizeof(struct kl));
54  if (ColorTable == NULL)
55  MallocFailed();
56 
60 
64 
68 
72 
76 
80 
84 
88 
92 
96 
100 
104 
108 
109  ColorTable[ExtraColor1].klR = 255;
110  ColorTable[ExtraColor1].klG = 255;
111  ColorTable[ExtraColor1].klB = 255;
112 
113  ColorTable[DrawingColor].klR = 180;
116 
117  ColorTable[ExtraColor2].klR = 255;
118  ColorTable[ExtraColor2].klG = 255;
119  ColorTable[ExtraColor2].klB = 255;
120 
121 
122  if (CDInit()) {
123  /* can't call MallocFailed() yet */
124  fprintf(stderr,"CD memory allocation failure.\n");
125  return (NULL);
126  }
127  Readin();
128  CDSetLayer(1,'S',"CED");
129  }
130 
131  if (!(graph = NewGraph())) {
132  return (NULL);
133  }
134  graph->graphtype = GR_SCED;
135 
136  if (DevNewViewport(graph) == 1) {
137  DestroyGraph(graph->graphid);
138  return (NULL);
139  }
140  /* don't draw until later */
141  graph->redraw = RedisplaySCED;
142 
143  /* remember to pop on leaving sced */
144  PushGraphContext(graph);
145 
146  DevClear();
147 
148  InitParameters();
149  InitSignals();
150  return ((char*)graph);
151 }
void InitParameters()
Definition: init.c:172
#define PromptTextColor
Definition: sced.h:80
void CDSetLayer()
#define InstanceBBColor
Definition: sced.h:84
#define CoarseGridColor
Definition: sced.h:82
#define ExtraColor2
Definition: sced.h:88
#define InstanceNameColor
Definition: sced.h:85
#define FineGridColor
Definition: sced.h:83
char * malloc()
#define DrawingColor
Definition: sced.h:87
int kpGridDisplayed
Definition: sced.h:240
#define MenuSelectedColor
Definition: sced.h:77
void Readin()
Definition: init.c:603
void RedisplaySCED(GRAPH *graph)
Definition: init.c:645
int DevNewViewport()
void DevClear()
Definition: display.c:234
int kpGridLineStyle
Definition: sced.h:237
#define GR_SCED
Definition: ftegraph.h:23
int CDInit()
Definition: cd.c:114
void MallocFailed()
Definition: scedintr.c:857
int klR
Definition: sced.h:95
struct kp Parameters
Definition: init.c:19
int kpShowGridInLargeViewport
Definition: sced.h:246
Definition: sced.h:94
void PushGraphContext()
#define NULL
Definition: spdefs.h:121
int graphtype
Definition: ftegraph.h:31
int graphid
Definition: ftegraph.h:30
#define MenuHighlightingColor
Definition: sced.h:79
#define True
Definition: scedstub.c:16
#define ExtraColor1
Definition: sced.h:86
Definition: ftegraph.h:29
#define RESOLUTION
Definition: sced.h:36
struct kl * ColorTable
Definition: init.c:20
#define MenuSelectedPrefixColor
Definition: sced.h:78
int DestroyGraph()
#define MenuTextColor
Definition: sced.h:75
int klB
Definition: sced.h:95
#define MenuTextPrefixColor
Definition: sced.h:76
long kpGrid
Definition: sced.h:234
int klG
Definition: sced.h:95
#define BackgroundColor
Definition: sced.h:73
void(* redraw)()
Definition: ftegraph.h:70
int kpCursorShape
Definition: sced.h:296
int kpGridOnTop
Definition: sced.h:243
#define False
Definition: scedstub.c:15
#define MoreTextColor
Definition: sced.h:81
void InitSignals()
Definition: scedintr.c:845
GRAPH * NewGraph()
Definition: graphdb.c:59
#define HighlightingColor
Definition: sced.h:74
void InitBasicMenu ( )

Definition at line 190 of file scedintr.c.

192 {
193  int i = 0, NumBasicMenu = 53;
194  int nrows = MenuViewport.kaY;
195 
196  if (BasicMenu == NULL)
197  BasicMenu = (MENU *) malloc(NumBasicMenu*sizeof(MENU));
198  if (BasicMenu == NULL) MallocFailed();
199  memset(BasicMenu,0,NumBasicMenu*sizeof(MENU));
200 
201  BasicMenu[i++].mEntry = MenuHELP;
202  BasicMenu[i++].mEntry = MenuCOLOR;
203  BasicMenu[i++].mEntry = MenuEDIT;
204  BasicMenu[i++].mEntry = MenuDIR;
205  BasicMenu[i++].mEntry = MenuSAVE;
206 
207  BasicMenu[i++].mEntry = MenuABORT;
208  BasicMenu[i++].mEntry = MenuSpace;
209  BasicMenu[i++].mEntry = MenuPAN;
210  BasicMenu[i++].mEntry = MenuZOOM;
211  BasicMenu[i++].mEntry = MenuWINDO;
212 
213  BasicMenu[i++].mEntry = MenuVIEW;
214  BasicMenu[i++].mEntry = MenuLAST;
215  BasicMenu[i++].mEntry = MenuEXPND;
216  BasicMenu[i++].mEntry = MenuGRID;
217  BasicMenu[i++].mEntry = MenuSpace;
218 
219  BasicMenu[i++].mEntry = MenuAREA;
220  BasicMenu[i++].mEntry = MenuSELEC;
221  BasicMenu[i++].mEntry = MenuDESEL;
222  BasicMenu[i++].mEntry = MenuMOVE;
223  BasicMenu[i++].mEntry = MenuCOPY;
224 
225  BasicMenu[i++].mEntry = MenuPUSH;
226  BasicMenu[i++].mEntry = MenuPOP;
227  if (i < nrows) BasicMenu[i++].mEntry = MenuSpace;
228  BasicMenu[i++].mEntry = MenuSTRCH;
229  BasicMenu[i++].mEntry = MenuBREAK;
230 
231  BasicMenu[i++].mEntry = MenuCRSYM;
232  BasicMenu[i++].mEntry = MenuFLATN;
233  BasicMenu[i++].mEntry = MenuDELET;
234  if (i < nrows) BasicMenu[i++].mEntry = MenuSpace;
235  BasicMenu[i++].mEntry = MenuUNDO;
236 
237  BasicMenu[i++].mEntry = MenuMX;
238  BasicMenu[i++].mEntry = MenuMY;
239  BasicMenu[i++].mEntry = Menu0;
240  if (i < nrows) BasicMenu[i++].mEntry = MenuSpace;
241  BasicMenu[i++].mEntry = MenuWIRES;
242 
243  BasicMenu[i++].mEntry = MenuLABEL;
244  BasicMenu[i++].mEntry = MenuDOTS;
245  if (i < nrows) BasicMenu[i++].mEntry = MenuSpace;
246  BasicMenu[i++].mEntry = MenuTERMS;
247  BasicMenu[i++].mEntry = MenuSUBCT;
248 
249  BasicMenu[i++].mEntry = MenuMUTUL;
250  BasicMenu[i++].mEntry = MenuPRPTY;
251  if (i < nrows) BasicMenu[i++].mEntry = MenuSpace;
252  BasicMenu[i++].mEntry = MenuRUN;
253  if (i < nrows) BasicMenu[i++].mEntry = MenuSpace;
254 
255  BasicMenu[i++].mEntry = MenuGRAF;
256  BasicMenu[i++].mEntry = MenuIPLOT;
257  BasicMenu[i++].mEntry = MenuHCOPY;
258  if (i < nrows) BasicMenu[i++].mEntry = MenuSpace;
259  BasicMenu[i++].mEntry = MenuNEWSC;
260 
261  BasicMenu[i++].mEntry = MenuSpace;
262  BasicMenu[i++].mEntry = NULL;
263 }
char * MenuFLATN
Definition: scedintr.c:77
long kaY
Definition: sced.h:113
char * MenuDIR
Definition: scedintr.c:73
char * MenuVIEW
Definition: scedintr.c:110
static char * MenuSpace
Definition: scedintr.c:114
char * MenuRUN
Definition: scedintr.c:101
char * MenuDESEL
Definition: scedintr.c:72
char * MenuLAST
Definition: scedintr.c:85
char * MenuPUSH
Definition: scedintr.c:98
char * MenuWINDO
Definition: scedintr.c:111
char * MenuGRAF
Definition: scedintr.c:78
char * MenuHELP
Definition: scedintr.c:81
char * MenuEXPND
Definition: scedintr.c:76
char * MenuGRID
Definition: scedintr.c:79
char * malloc()
char * mEntry
Definition: sced.h:364
char * MenuSUBCT
Definition: scedintr.c:106
struct ka MenuViewport
Definition: init.c:18
char * MenuSTRCH
Definition: scedintr.c:105
char * MenuDELET
Definition: scedintr.c:71
char * MenuWIRES
Definition: scedintr.c:112
char * MenuBREAK
Definition: scedintr.c:67
#define NULL
Definition: spdefs.h:121
char * MenuIPLOT
Definition: scedintr.c:83
char * MenuLABEL
Definition: scedintr.c:84
char * MenuMX
Definition: scedintr.c:90
char * MenuTERMS
Definition: scedintr.c:107
char * MenuMOVE
Definition: scedintr.c:88
char * MenuMY
Definition: scedintr.c:91
char * MenuAREA
Definition: scedintr.c:64
char * MenuEDIT
Definition: scedintr.c:75
char * MenuSAVE
Definition: scedintr.c:102
MENU * BasicMenu
Definition: scedintr.c:49
char * MenuPOP
Definition: scedintr.c:95
char * Menu0
Definition: scedintr.c:53
char * MenuDOTS
Definition: scedintr.c:74
char * MenuSELEC
Definition: scedintr.c:103
char * MenuPAN
Definition: scedintr.c:93
char * MenuZOOM
Definition: scedintr.c:113
char * MenuCRSYM
Definition: scedintr.c:70
char * MenuNEWSC
Definition: scedintr.c:92
char * MenuCOPY
Definition: scedintr.c:69
char * MenuHCOPY
Definition: scedintr.c:80
char * MenuPRPTY
Definition: scedintr.c:97
char * MenuABORT
Definition: scedintr.c:63
char * MenuUNDO
Definition: scedintr.c:108
char * MenuCOLOR
Definition: scedintr.c:68
Definition: sced.h:363
void MallocFailed()
Definition: scedintr.c:857
char * MenuMUTUL
Definition: scedintr.c:89
void InitCoarseWindow ( )
void InitDeviceMenu ( )

Definition at line 70 of file subckt.c.

72 {
73  if (DeviceMenu == NULL)
74  DeviceMenu = (MENU *) malloc(DefMenuSize*sizeof(MENU));
75  if (DeviceMenu == NULL) MallocFailed();
76  memset(DeviceMenu,0,DefMenuSize*sizeof(MENU));
77 
80  if (DeviceMenu[0].mEntry == NULL)
81  ShowPrompt("No device library found!");
83  if (DeviceMenu[0].mEntry == NULL)
84  ShowPrompt("No device library found, and no subcircuits!");
85 }
void SetLibraryChoices()
Definition: library.c:140
static void set_subckt_list()
Definition: subckt.c:267
char * malloc()
static void set_subckt_choices()
Definition: subckt.c:305
void MallocFailed()
Definition: scedintr.c:857
#define NULL
Definition: spdefs.h:121
#define DefMenuSize
Definition: scedext.h:555
MENU * DeviceMenu
Definition: scedintr.c:50
Definition: sced.h:363
void ShowPrompt(char *str)
Definition: scedstub.c:71
void InitFineWindow ( )
void InitMenus ( )

Definition at line 118 of file scedintr.c.

120 {
121 
122  Menu0 = "0 ";
123  Menu90 = "90 ";
124  Menu180 = "180 ";
125  Menu270 = "270 ";
126  MenuMINSB = "-b ";
127  MenuMINSG = "-g ";
128  MenuMINSR = "-r ";
129  MenuPLUSB = "+b ";
130  MenuPLUSG = "+g ";
131  MenuPLUSR = "+r ";
132  MenuABORT = "quit ";
133  MenuAREA = "area ";
134  MenuARRAY = "array";
135  MenuBGRND = "bgrnd";
136  MenuBREAK = "break";
137  MenuCOLOR = "color";
138  MenuCOPY = "copy ";
139  MenuCRSYM = "crsym";
140  MenuDELET = "delet";
141  MenuDESEL = "desel";
142  MenuDIR = "dir ";
143  MenuDOTS = "dots ";
144  MenuEDIT = "edit ";
145  MenuEXPND = "expnd";
146  MenuFLATN = "flatn";
147  MenuGRAF = "graf ";
148  MenuGRID = "grid ";
149  MenuHCOPY = "hcopy";
150  MenuHELP = "help";
151  MenuHLITE = "hlite";
152  MenuIPLOT = "iplot";
153  MenuLABEL = "label";
154  MenuLAST = "last ";
155  MenuMENU = "menu ";
156  MenuMORE = "more ";
157  MenuMOVE = "move ";
158  MenuMUTUL = "mutul";
159  MenuMX = "mx ";
160  MenuMY = "my ";
161  MenuNEWSC = "newsc";
162  MenuPAN = "pan ";
163  MenuPLACE = "place";
164  MenuPOP = "pop ";
165  MenuPRMPT = "prmpt";
166  MenuPRPTY = "prpty";
167  MenuPUSH = "push ";
168  MenuRDRAW = "rdraw";
169  MenuRGB = "rgb ";
170  MenuRUN = "run ";
171  MenuSAVE = "save ";
172  MenuSELEC = "selec";
173  MenuSTRCH = "strch";
174  MenuSUBCT = "subct";
175  MenuTERMS = "terms";
176  MenuUNDO = "undo ";
177  MenuUPDAT = "updat";
178  MenuVIEW = "view ";
179  MenuWINDO = "windo";
180  MenuWIRES = "wires";
181  MenuZOOM = "zoom ";
182  MenuSpace = " ";
183 
184  InitBasicMenu();
185  InitDeviceMenu();
186 }
char * MenuRDRAW
Definition: scedintr.c:99
char * MenuFLATN
Definition: scedintr.c:77
char * Menu180
Definition: scedintr.c:55
char * MenuDIR
Definition: scedintr.c:73
char * MenuVIEW
Definition: scedintr.c:110
static char * MenuSpace
Definition: scedintr.c:114
char * MenuPRMPT
Definition: scedintr.c:96
char * MenuRUN
Definition: scedintr.c:101
char * MenuDESEL
Definition: scedintr.c:72
char * MenuLAST
Definition: scedintr.c:85
char * MenuPUSH
Definition: scedintr.c:98
char * MenuWINDO
Definition: scedintr.c:111
char * MenuGRAF
Definition: scedintr.c:78
char * MenuHELP
Definition: scedintr.c:81
char * MenuEXPND
Definition: scedintr.c:76
char * MenuGRID
Definition: scedintr.c:79
char * MenuSUBCT
Definition: scedintr.c:106
char * MenuBGRND
Definition: scedintr.c:66
char * MenuPLUSR
Definition: scedintr.c:62
char * MenuMINSG
Definition: scedintr.c:58
char * MenuSTRCH
Definition: scedintr.c:105
char * Menu90
Definition: scedintr.c:54
char * MenuDELET
Definition: scedintr.c:71
char * MenuUPDAT
Definition: scedintr.c:109
char * MenuPLUSB
Definition: scedintr.c:60
char * MenuWIRES
Definition: scedintr.c:112
char * MenuBREAK
Definition: scedintr.c:67
char * MenuIPLOT
Definition: scedintr.c:83
char * MenuLABEL
Definition: scedintr.c:84
char * MenuARRAY
Definition: scedintr.c:65
char * MenuMX
Definition: scedintr.c:90
char * MenuTERMS
Definition: scedintr.c:107
char * MenuMOVE
Definition: scedintr.c:88
char * MenuMY
Definition: scedintr.c:91
char * MenuAREA
Definition: scedintr.c:64
char * MenuEDIT
Definition: scedintr.c:75
char * MenuSAVE
Definition: scedintr.c:102
char * MenuPLUSG
Definition: scedintr.c:61
char * MenuMINSB
Definition: scedintr.c:57
void InitBasicMenu()
Definition: scedintr.c:190
char * MenuPLACE
Definition: scedintr.c:94
char * MenuPOP
Definition: scedintr.c:95
char * Menu0
Definition: scedintr.c:53
char * MenuRGB
Definition: scedintr.c:100
void InitDeviceMenu()
Definition: subckt.c:70
char * MenuDOTS
Definition: scedintr.c:74
char * MenuSELEC
Definition: scedintr.c:103
char * Menu270
Definition: scedintr.c:56
char * MenuPAN
Definition: scedintr.c:93
char * MenuZOOM
Definition: scedintr.c:113
char * MenuCRSYM
Definition: scedintr.c:70
char * MenuNEWSC
Definition: scedintr.c:92
char * MenuCOPY
Definition: scedintr.c:69
char * MenuMENU
Definition: scedintr.c:86
char * MenuHCOPY
Definition: scedintr.c:80
char * MenuPRPTY
Definition: scedintr.c:97
char * MenuHLITE
Definition: scedintr.c:82
char * MenuABORT
Definition: scedintr.c:63
char * MenuUNDO
Definition: scedintr.c:108
char * MenuCOLOR
Definition: scedintr.c:68
char * MenuMINSR
Definition: scedintr.c:59
char * MenuMORE
Definition: scedintr.c:87
char * MenuMUTUL
Definition: scedintr.c:89
void InitParameters ( )

Definition at line 172 of file init.c.

174 {
175  if (Parameters.kpCellName == NULL) {
193  Parameters.kpNumX = 1;
194  Parameters.kpNumY = 1;
195  Parameters.kpDX = 0;
196  Parameters.kpDY = 0;
198 
199  /*
200  * The fine window has a FIXED width and height.
201  * What should it be?
202  * PointingThreshold is the minimum value of ViewportWidth/WindowWidth
203  * such that it is still comfortable to point with lambda precision.
204  * If PointingThreshold == 7 and FineViewportWidth ~ 467 pixels,
205  * FineWindowWidth ~ 60 lambda.
206  * Most people have prefered 6 or 7.
207  */
209 
210  View = alloc(kv);
211  if (View == NULL) MallocFailed();
213  if (View->kvFineWindow == NULL) MallocFailed();
222 
225  }
226  SCursor.kcX = SCursor.kcPredX = 0;
227  SCursor.kcY = SCursor.kcPredY = 0;
228  /* can start out in FULLSCREEN or SPLITSCREEN mode */
230  TInit();
231  TStore();
232  InitViewport();
233  DefaultWindows();
234  SQInit();
235 }
int kvFineViewportOnBottom
Definition: sced.h:156
int kpPointingThreshold
Definition: sced.h:279
char kvControl
Definition: sced.h:157
struct ka * kvCoarseWindow
Definition: sced.h:149
int kpModified
Definition: sced.h:261
struct ka * kvSmallCoarseViewport
Definition: sced.h:152
struct kv * View
Definition: init.c:17
struct s * kpCellDesc
Definition: sced.h:207
char * kpCellName
Definition: sced.h:210
char * malloc()
struct kc SCursor
Definition: init.c:21
struct s * kpTopDesc
Definition: sced.h:213
Definition: sced.h:111
long kcY
Definition: sced.h:102
struct ka * kvFineViewport
Definition: sced.h:148
#define alloc(type)
Definition: cdmacs.h:21
struct ka * kvLargeCoarseViewport
Definition: sced.h:151
double kpDY
Definition: sced.h:228
void TInit()
Definition: xforms.c:23
void TStore()
Definition: xforms.c:331
void MallocFailed()
Definition: scedintr.c:857
#define CDSYMBOLCALL
Definition: cddefs.h:43
char * kpCommand
Definition: sced.h:219
Definition: sced.h:146
struct kp Parameters
Definition: init.c:19
void InitViewport()
Definition: init.c:358
#define NULL
Definition: spdefs.h:121
#define CDROUNDFLASH
Definition: cddefs.h:45
struct ka * kvFineWindow
Definition: sced.h:147
#define True
Definition: scedstub.c:16
long kcPredY
Definition: sced.h:102
int kpNumY
Definition: sced.h:226
char * kpTopName
Definition: sced.h:216
#define FULLSCREEN
Definition: sced.h:49
int kpRotationAngle
Definition: sced.h:282
void SQInit()
Definition: choose.c:682
#define CDWIRE
Definition: cddefs.h:47
int kpEnableSelectQRedisplay
Definition: sced.h:249
#define EOS
Definition: cdmacs.h:9
long kcX
Definition: sced.h:102
int kpNumX
Definition: sced.h:225
double kpDX
Definition: sced.h:227
long kcPredX
Definition: sced.h:102
#define False
Definition: scedstub.c:15
void DefaultWindows()
Definition: init.c:239
int kpLastCursorColumn
Definition: sced.h:293
#define CDPOLYGON
Definition: cddefs.h:44
char kpSelectTypes[8]
Definition: sced.h:273
#define CDLABEL
Definition: cddefs.h:46
#define CDBOX
Definition: cddefs.h:48
void InitSignals ( )

Definition at line 845 of file scedintr.c.

846 {
847  ft_intrpt = false;
848  vec_gc();
849 }
void vec_gc()
Definition: vectors.c:681
int ft_intrpt
Definition: main.c:47
void InitViewport ( )

Definition at line 358 of file init.c.

360 {
361  struct ka *Vl, *Vs, *Vf;
362 
363  MenuViewport.kaLeft = 1;
365  MenuViewport.kaRight = 11;
366  MenuViewport.kaTop = 1;
367  /* save column width and height in X,Y integer fields */
368  MenuViewport.kaX = 5;
370  MenuViewport.kaTop + 1;
371 
372  /*
373  * The COARSE viewport is LARGE if fine-positioning isn't enabled.
374  * If it is, the LARGE COARSE viewport is split into a SMALL COARSE
375  * viewport and the FINE viewport.
376  */
378 
381  Vl->kaBottom = 2*gi_fntheight;
382  Vl->kaRight = gi_maxx;
383  Vl->kaTop = gi_maxy;
384  Vl->kaWidth = Vl->kaRight - Vl->kaLeft;
385  Vl->kaHeight = Vl->kaTop - Vl->kaBottom;
386 
388  Vs->kaLeft = Vl->kaLeft;
389  Vs->kaBottom = Vl->kaBottom + ((Vl->kaTop - Vl->kaBottom)*5)/12;
390  Vs->kaRight = Vl->kaRight;
391  Vs->kaTop = Vl->kaTop;
392  Vs->kaWidth = Vs->kaRight - Vs->kaLeft;
393  Vs->kaHeight = Vs->kaTop - Vs->kaBottom;
394 
395  Vf = View->kvFineViewport;
396  Vf->kaLeft = Vs->kaLeft;
397  Vf->kaBottom = Vl->kaBottom;
398  Vf->kaRight = Vs->kaRight;
399  Vf->kaTop = Vs->kaBottom - 1;
400  Vf->kaWidth = Vf->kaRight - Vf->kaLeft;
401  Vf->kaHeight = Vf->kaTop - Vf->kaBottom;
402  }
403  else {
404 
407  Vl->kaBottom = 2*gi_fntheight;
408  Vl->kaRight = gi_maxx;
409  Vl->kaTop = gi_maxy;
410  Vl->kaWidth = Vl->kaRight - Vl->kaLeft;
411  Vl->kaHeight = Vl->kaTop - Vl->kaBottom;
412 
414  Vs->kaLeft = Vl->kaLeft;
415  Vs->kaBottom = Vl->kaBottom;
416  Vs->kaRight = (gi_maxx - Vl->kaLeft)/2 + Vl->kaLeft;
417  Vs->kaTop = Vl->kaTop;
418  Vs->kaWidth = Vs->kaRight - Vs->kaLeft;
419  Vs->kaHeight = Vs->kaTop - Vs->kaBottom;
420 
421  Vf = View->kvFineViewport;
422  Vf->kaLeft = Vs->kaRight + 1;
423  Vf->kaBottom = Vl->kaBottom;
424  Vf->kaRight = Vl->kaRight;
425  Vf->kaTop = Vs->kaTop;
426  Vf->kaWidth = Vf->kaRight - Vf->kaLeft;
427  Vf->kaHeight = Vf->kaTop - Vf->kaBottom;
428  }
429 }
int kvFineViewportOnBottom
Definition: sced.h:156
long kaY
Definition: sced.h:113
long kaRight
Definition: sced.h:112
struct ka * kvSmallCoarseViewport
Definition: sced.h:152
struct kv * View
Definition: init.c:17
long kaBottom
Definition: sced.h:112
Definition: sced.h:111
struct ka * kvFineViewport
Definition: sced.h:148
struct ka * kvLargeCoarseViewport
Definition: sced.h:151
#define gi_fntheight
Definition: scedmacs.h:57
#define gi_maxx
Definition: scedmacs.h:58
long kaTop
Definition: sced.h:112
double kaHeight
Definition: sced.h:114
long kaLeft
Definition: sced.h:112
struct ka MenuViewport
Definition: init.c:18
#define gi_fntwidth
Definition: scedmacs.h:56
#define gi_numtextrows
Definition: scedmacs.h:60
double kaWidth
Definition: sced.h:114
long kaX
Definition: sced.h:113
#define gi_maxy
Definition: scedmacs.h:59
void InitVLT ( )

Definition at line 155 of file init.c.

157 {
158  int i;
159  double R,G,B;
160  double M = FBMAXINTENSITY;
161 
162  for (i = 0; i < 16; i++) {
163  R = ColorTable[i].klR/M;
164  G = ColorTable[i].klG/M;
165  B = ColorTable[i].klB/M;
166  DevDefineColor(i,R,G,B);
167  }
168 }
void DevDefineColor()
int klR
Definition: sced.h:95
#define G
Definition: parse.c:441
#define R
Definition: parse.c:444
struct kl * ColorTable
Definition: init.c:20
int klB
Definition: sced.h:95
#define FBMAXINTENSITY
Definition: scedmacs.h:48
int klG
Definition: sced.h:95
long* InPath ( )
int IsCellInLib ( )
int IsManhattan ( )
int IsSymfile ( )
void KbCursor ( )
char* KbEdit ( )
void Label ( )
void LastView ( )

Definition at line 201 of file display.c.

203 {
204  int i;
205  struct kw Last;
206  struct kw *Tmp;
207  char OldMenu;
208  int EscWasReturned = 0;
209 
211  Last.kwLastWindowY = View->kvCoarseWindow->kaY;
212  Last.kwLastFineWindowX = View->kvFineWindow->kaX;
213  Last.kwLastFineWindowY = View->kvFineWindow->kaY;
214  Last.kwLastWindowWidth = View->kvCoarseWindow->kaWidth;
215  Last.kwLastFineWindowWidth = View->kvFineWindow->kaWidth;
216  (Last.kwName)[5] = View->kvFineViewportOnBottom;
217  (Last.kwName)[6] = View->kvControl;
218 
219  i = 0;
220  for (Tmp = Parameters.kpWindowStack; Tmp; Tmp = Tmp->kwNext)
221  AmbiguityMenu[i++].mEntry = Tmp->kwName;
224 
225  if (i > 1) {
226  /* Show ambiguity menu. */
227  OldMenu = Parameters.kpMenu;
230 
231  /* Which viewport is user interested in? */
232  ShowPrompt("Point to the name of the desired view.");
233  loop {
234  int dummy;
235  switch (PointLoopSafe(&dummy)) {
236  case PL_ESC:
237  EscWasReturned = 1;
238  break;
239  case PL_CMD:
240  break;
241  case PL_PCW:
242  ShowPrompt("You aren't pointing at the menu.");
243  continue;
244  }
245  break;
246  }
247  Parameters.kpMenu = OldMenu;
248  ShowCommandMenu();
249  if (EscWasReturned) goto quit;
250 
251  /* find new view */
252  for (Tmp = Parameters.kpWindowStack; Tmp; Tmp = Tmp->kwNext)
253  if (strncmp(Tmp->kwName,Parameters.kpCommand,
255  break;
256  }
257  }
258  else
260 
261  /* The status of the fine window positioning is stored in
262  * the name field, as is full screen mode flag.
263  */
264  View->kvFineViewportOnBottom = (Tmp->kwName)[5];
265  View->kvControl = (Tmp->kwName)[6];
266 
267  InitViewport();
268 
269  /* change to new viewport */
271  Tmp->kwLastWindowWidth);
272 
273  SetPositioning();
274 
276 
277  Parameters.kpWindowStack->kwLastWindowX = Last.kwLastWindowX;
278  Parameters.kpWindowStack->kwLastWindowY = Last.kwLastWindowY;
279  Parameters.kpWindowStack->kwLastFineWindowX = Last.kwLastFineWindowX;
280  Parameters.kpWindowStack->kwLastFineWindowY = Last.kwLastFineWindowY;
281  Parameters.kpWindowStack->kwLastWindowWidth = Last.kwLastWindowWidth;
282  Parameters.kpWindowStack->kwLastFineWindowWidth = Last.kwLastFineWindowWidth;
283  Parameters.kpWindowStack->kwExpand = Last.kwExpand;
284  Parameters.kpWindowStack->kwExpandFineOnly = Last.kwExpandFineOnly;
285  (Parameters.kpWindowStack->kwName)[5] = (Last.kwName)[5];
286  (Parameters.kpWindowStack->kwName)[6] = (Last.kwName)[6];
287 
290 quit:
292  ErasePrompt();
293 }
struct kw * kpWindowStack
Definition: sced.h:222
#define PL_ESC
Definition: sced.h:62
void ErasePrompt()
Definition: viewport.c:538
long kwLastWindowY
Definition: sced.h:132
int kvFineViewportOnBottom
Definition: sced.h:156
long kaY
Definition: sced.h:113
#define loop
Definition: cdmacs.h:11
long kwLastWindowWidth
Definition: sced.h:133
long kwLastFineWindowY
Definition: sced.h:135
char kvControl
Definition: sced.h:157
struct ka * kvCoarseWindow
Definition: sced.h:149
long kaRight
Definition: sced.h:112
void InitCoarseWindow()
static void dummy()
Definition: mfbcursr.c:550
void Redisplay(struct ka *AOI)
Definition: display.c:383
int PointLoopSafe()
void InitViewport()
Definition: init.c:358
#define PL_PCW
Definition: sced.h:65
void EraseLargeCoarseViewport()
Definition: viewport.c:583
char * mEntry
Definition: sced.h:364
char kwName[8]
Definition: sced.h:140
struct ka MenuViewport
Definition: init.c:18
long kwLastFineWindowWidth
Definition: sced.h:136
void ShowCommandMenu()
Definition: viewport.c:121
long kwLastWindowX
Definition: sced.h:131
char * kpCommand
Definition: sced.h:219
void ShowMenu()
void MenuDeselect()
char kpMenu
Definition: sced.h:319
#define NULL
Definition: spdefs.h:121
long kwLastFineWindowX
Definition: sced.h:134
struct kp Parameters
Definition: init.c:19
char kwExpandFineOnly
Definition: sced.h:139
char kwExpand
Definition: sced.h:138
struct ka * kvFineWindow
Definition: sced.h:147
struct kv * View
Definition: init.c:17
#define AMBIGUITYMENU
Definition: sced.h:57
long kaLeft
Definition: sced.h:112
void InitFineWindow()
void SetPositioning()
Definition: init.c:322
struct kw * kwNext
Definition: sced.h:137
MENU AmbiguityMenu[DefMenuSize]
Definition: scedintr.c:51
double kaWidth
Definition: sced.h:114
void FixMenuPrefix()
#define PL_CMD
Definition: sced.h:64
Definition: sced.h:130
void ShowPrompt(char *str)
Definition: scedstub.c:71
char * MenuLAST
Definition: scedintr.c:85
long kaX
Definition: sced.h:113
void LibraryClose ( )

Definition at line 430 of file library.c.

432 {
433  struct lib *l;
434 
435  for (l = Lib; l; l = Lib) {
436  Lib = l->lib_next;
437  txfree(l->lib_name);
438  tfree(l);
439  }
440  Lib = NULL;
441  tfree(LibName);
442 }
static struct lib * Lib
Definition: library.c:39
Definition: cddefs.h:312
#define tfree(x)
Definition: cdmacs.h:22
void txfree()
#define NULL
Definition: spdefs.h:121
static char * LibName
Definition: library.c:40
char * lib_name
Definition: library.c:25
Definition: library.c:24
struct lib * lib_next
Definition: library.c:28
void LibraryOpen ( )
struct line* MakeSpiceDeck ( )

Definition at line 183 of file netlist.c.

186 {
187  struct line *line,*d;
188  int count;
189 
191  sprintf(TypeOut,"Generated by SCED from file %s",Parameters.kpCellName);
192  line = AllocateLine(TypeOut);
194  for (d = line; d->li_next; d = d->li_next) ;
195  d->li_next = AllocateLine(".end");
196  d->li_next->li_next = NULL;
197  count = 0;
198  for (d = line; d; d = d->li_next)
199  d->li_linenum = count++;
200  return (line);
201 }
int li_linenum
Definition: fteinp.h:15
struct s * kpCellDesc
Definition: sced.h:207
struct line * AllocateLine()
char * kpCellName
Definition: sced.h:210
Definition: fteinp.h:14
Definition: cddefs.h:237
#define NULL
Definition: spdefs.h:121
char TypeOut[200]
Definition: init.c:23
struct kp Parameters
Definition: init.c:19
struct line * li_next
Definition: fteinp.h:18
return(True)
void Connect(struct s *CellDesc)
Definition: netlist.c:539
struct line * SpiceList(struct s *CellDesc)
Definition: netlist.c:205
int count
Definition: output.c:152
void MallocFailed ( )

Definition at line 857 of file scedintr.c.

859 {
860  char *cp;
861  char *mktemp();
862  cp = mktemp("scXXXXXX");
863  DevHalt();
864  fprintf(stderr,"OUT OF MEMORY. SCED is DEAD!\n");
865 
866  if (Parameters.kpCellName[0] != EOS) {
868  fprintf(stderr,"\007Sorry. Couldn't save current circuit.\n");
869  else
870  fprintf(stderr,"\007Current circuit saved in %s.\n",cp);
871  }
872  longjmp(errjbuf,1);
873 }
int CDUpdate()
struct s * kpCellDesc
Definition: sced.h:207
#define Not
Definition: cdmacs.h:16
char * kpCellName
Definition: sced.h:210
void DevHalt()
Definition: display.c:226
struct kp Parameters
Definition: init.c:19
static jmp_buf errjbuf
Definition: scedintr.c:277
#define EOS
Definition: cdmacs.h:9
void MenuDeselect ( )
void MenuDeselectDev ( )
void MenuMore ( )
void MenuParams ( )
void MenuPrompt ( )
void MenuSelect ( )
void MenuSelectDev ( )
void ModelLibraryClose ( )

Definition at line 446 of file library.c.

448 {
449  struct wl *w;
450  struct ml *m;
451  struct lib *l;
452 
453  for (l = Mod; l; l = Mod) {
454  Mod = l->lib_next;
455  txfree(l->lib_name);
456  for (w = l->lib_info; w; w = l->lib_info) {
457  l->lib_info = w->wl_next;
458  txfree(w->wl_name);
459  tfree(w);
460  }
461  tfree(l);
462  }
463  Mod = NULL;
464  tfree(ModLibName);
465 
466  for (m = Models; m; m = Models) {
467  Models = m->ml_next;
468  txfree(m->ml_name);
469  tfree(m);
470  }
471  Models = NULL;
472  Mlevel = 0;
473 }
struct wl * lib_info
Definition: library.c:27
static int Mlevel
Definition: library.c:197
static char * ModLibName
Definition: library.c:186
char * ml_name
Definition: library.c:189
Definition: cddefs.h:169
Definition: library.c:18
Definition: cddefs.h:312
FILE * m
Definition: proc2mod.c:47
Definition: library.c:188
static struct lib * Mod
Definition: library.c:185
#define tfree(x)
Definition: cdmacs.h:22
void txfree()
#define NULL
Definition: spdefs.h:121
static struct ml * Models
Definition: library.c:195
struct wl * wl_next
Definition: library.c:20
char * lib_name
Definition: library.c:25
Definition: library.c:24
char * wl_name
Definition: library.c:19
struct ml * ml_next
Definition: library.c:190
struct lib * lib_next
Definition: library.c:28
void ModelLibraryOpen ( )
int MoreLine ( )
int MorePageDisplay ( )

Definition at line 233 of file moretext.c.

236 {
237  char *s, *t;
238  int Y;
239 
240  if (UsePopup) {
241  if (tmpfp) {
242  fflush(tmpfp);
243  rewind(tmpfp);
245  fclose(tmpfp);
246  unlink(tmpfn);
247  free(tmpfn);
248  tmpfp = NULL;
249  tmpfn = NULL;
250  }
251  return (MoreShowed);
252  }
253 
254  if (MoreLinePtr == MoreBuffer)
255  return (False);
256 
257  /* return if only blank lines */
258  for (s = MoreBuffer; s < MoreLinePtr; s += gi_numtextcols+1) {
259  t = s;
260  while (isspace(*t)) t++;
261  if (*t == '\0')
262  continue;
263  else
264  break;
265  }
266  if (*t == '\0')
267  return (False);
268 
271  Y = MoreBB.kaTop - gi_fntheight;
272  for (s = MoreBuffer; s < MoreLinePtr; s += gi_numtextcols+1) {
274  Y -= gi_fntheight;
275  }
276  return (True);
277 }
static char * MoreBuffer
Definition: moretext.c:26
static FILE * tmpfp
Definition: moretext.c:27
Definition: cddefs.h:119
static int UsePopup
Definition: moretext.c:21
void DevSetColor()
#define gi_numtextcols
Definition: scedmacs.h:61
void EraseLargeCoarseViewport()
Definition: viewport.c:583
#define gi_fntheight
Definition: scedmacs.h:57
#define NULL
Definition: spdefs.h:121
static struct ka MoreBB
Definition: moretext.c:25
long kaTop
Definition: sced.h:112
int unlink(char *fn)
Definition: libfuncs.c:96
#define True
Definition: scedstub.c:16
long kaLeft
Definition: sced.h:112
static int MoreShowed
Definition: moretext.c:24
void FBText()
#define False
Definition: scedstub.c:15
#define MoreTextColor
Definition: sced.h:81
static char * MoreLinePtr
Definition: moretext.c:26
Definition: cddefs.h:192
int PopUpErrMessage()
long Y
Definition: actions.c:450
#define PIXEL_COORDINATE
Definition: scedmacs.h:16
void free()
static char * tmpfn
Definition: moretext.c:28
void MoreText ( )
void Move ( )
int MutSelected ( )
void MX ( )

Definition at line 52 of file choose.c.

54 {
55  if (Parameters.kpMX) {
58  }
59  else {
62  }
63 }
void MenuDeselect()
struct kp Parameters
Definition: init.c:19
#define True
Definition: scedstub.c:16
char * MenuMX
Definition: scedintr.c:90
int kpMX
Definition: sced.h:283
#define False
Definition: scedstub.c:15
void MenuSelect()
void MY ( )

Definition at line 67 of file choose.c.

69 {
70  if (Parameters.kpMY) {
73  }
74  else {
77  }
78 }
void MenuDeselect()
int kpMY
Definition: sced.h:284
struct kp Parameters
Definition: init.c:19
#define True
Definition: scedstub.c:16
char * MenuMY
Definition: scedintr.c:91
#define False
Definition: scedstub.c:15
void MenuSelect()
void NewSubckt ( )

Definition at line 89 of file subckt.c.

91 {
92  char *TypeIn;
93  int i;
94  struct s *MasterDesc;
95 
97  ShowPrompt("New subcircuit name? ");
98  TypeIn = FBEdit(NULL);
99  if (TypeIn == NULL || *TypeIn == '\0') {
101  return;
102  }
103 
104  /* strip off any path prefix */
105  if (FixCellName(TypeIn)) {
106  ShowPromptAndWait("Warning: internal path overflow");
107  }
108 
109  if (OpenCell(TypeIn,&MasterDesc)) {
110  ShowPrompt("Bad subcell name, not found or error.");
112  return;
113  }
114  for (i = 0; i < 80 && SubCktList[i]; i++)
115  if (!strcmp(SubCktList[i],TypeIn)) break;
116  if (i < 80 && SubCktList[i] == NULL)
117  SubCktList[i] = CopyString(TypeIn);
118 
122  ShowCommandMenu();
123  ErasePrompt();
124 }
void ErasePrompt()
Definition: viewport.c:538
int OpenCell(char *Master, struct s **MasterDesc)
Definition: subckt.c:1279
void SetLibraryChoices()
Definition: library.c:140
Definition: cddefs.h:119
char * CopyString()
static char * SubCktList[80]
Definition: subckt.c:33
static void set_subckt_choices()
Definition: subckt.c:305
void ShowPromptAndWait()
void ShowCommandMenu()
Definition: viewport.c:121
void MenuDeselect()
#define NULL
Definition: spdefs.h:121
char * MenuNEWSC
Definition: scedintr.c:92
int FixCellName()
char * FBEdit()
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
void NewSymbol ( )

Definition at line 417 of file subckt.c.

422 {
423  struct ks *SQDesc;
424  struct o *Pointer;
425  struct t *TGen;
426  struct p *Path;
427  struct prpty *PDesc;
428  FILE *FileDesc;
429  char *TypeIn;
430  char *Label;
431  char Type;
432  char Xform;
433  char *SymbolName;
434  int Layer;
435  int NumX,NumY;
436  long X,Y,DX,DY,Width,Length;
437  long Xo, Yo;
438  extern char *MenuCRSYM;
439 
440  MenuSelect(MenuCRSYM);
441  if (SelectQHead == NULL) {
442  ShowPrompt("Objects must be selected first.");
443  MenuDeselect(MenuCRSYM);
444  return;
445  }
446  ShowPrompt("Name of new symbol? ");
447  if ((TypeIn = FBEdit(NULL)) == NULL Or *TypeIn == '\0') {
448  ErasePrompt();
449  MenuDeselect(MenuCRSYM);
450  return;
451  }
452  if ((FileDesc = POpen(TypeIn,"w",(char **)NULL)) == NULL) {
453  sprintf(TypeOut,"Can't create symbol %s.",TypeIn);
455  MenuDeselect(MenuCRSYM);
456  return;
457  }
458  SQComputeBB();
459  /* The new cell origin will be the lower left corner */
460  Xo = SelectQBB.kaLeft;
461  Yo = SelectQBB.kaBottom;
462  fprintf(FileDesc,"(Symbol %s);\n",TypeIn);
463  fprintf(FileDesc,"9 %s;\n",TypeIn);
464 
465  /* catch mutual inductors if both selected */
467  for (; PDesc; PDesc = PDesc->prpty_Succ) {
468  if (PDesc->prpty_Value != P_MUT) continue;
469  if (MutSelected(PDesc)) {
470  fprintf(FileDesc,"5 %d %d %d %d %d %g;\n",
471  P_MUT,PDesc->prpty_Data->p_mut.x1,
472  PDesc->prpty_Data->p_mut.y1,
473  PDesc->prpty_Data->p_mut.x2,
474  PDesc->prpty_Data->p_mut.y2,
475  PDesc->prpty_Data->p_mut.coeff);
476  }
477  }
478 
479  GenBeginSymbol(FileDesc,0,1L,1L);
480 
481  for (SQDesc = SelectQHead; SQDesc; SQDesc = SQDesc->ksSucc) {
482  Pointer = SQDesc->ksPointer;
483  if (Pointer->oType == CDSYMBOLCALL) {
484 
485  CDCall(Pointer,&SymbolName,&NumX,&DX,&NumY,&DY);
486  /* add symbol name extension */
487  fprintf(FileDesc,"9 %s;\n",SymbolName);
488 
489  /* property list info */
490  for (PDesc = Pointer->oPrptyList; PDesc;
491  PDesc = PDesc->prpty_Succ) {
492 
493  switch (PDesc->prpty_Value) {
494  case P_NODE:
495  fprintf(FileDesc,"5 %d %d %d %ld %ld;\n",
496  P_NODE,-1,PDesc->prpty_Data->p_node.inode,
497  PDesc->prpty_Data->p_node.x-Xo,
498  PDesc->prpty_Data->p_node.y-Yo);
499  continue;
500  case P_MUT:
501  fprintf(FileDesc,"5 %d %d %d %d %d %g;\n",
502  P_MUT,PDesc->prpty_Data->p_mut.x1,
503  PDesc->prpty_Data->p_mut.y1,
504  PDesc->prpty_Data->p_mut.x2,
505  PDesc->prpty_Data->p_mut.y2,
506  PDesc->prpty_Data->p_mut.coeff);
507  continue;
508  case P_BRANCH:
509  fprintf(FileDesc,"5 %d %ld %ld %d %d;\n",
510  P_BRANCH,PDesc->prpty_Data->p_branch.x-Xo,
511  PDesc->prpty_Data->p_branch.y-Yo,
512  PDesc->prpty_Data->p_branch.r1,
513  PDesc->prpty_Data->p_branch.r2);
514  continue;
515  case P_NAME:
516  if (PDesc->prpty_Data->p_name.subname)
517  fprintf(FileDesc,"5 %d %s %d %s;\n",
518  P_NAME,PDesc->prpty_Data->p_name.name,
519  PDesc->prpty_Data->p_name.num,
520  PDesc->prpty_Data->p_name.subname);
521  else
522  fprintf(FileDesc,"5 %d %s %d;\n",
523  P_NAME,PDesc->prpty_Data->p_name.name,
524  PDesc->prpty_Data->p_name.num);
525  continue;
526  case P_MODEL:
527  case P_VALUE:
528  case P_INITC:
529  fprintf(FileDesc,"5 %d %s;\n",PDesc->prpty_Value,
530  HYtoascii((struct hprlist*)PDesc->prpty_Data));
531  continue;
532  }
533  }
534 
535  /* add symbol array extension */
536  if (NumX != 1 Or NumY != 1)
537  fprintf(FileDesc,"1 Array %d %ld %d %ld;\n",NumX,DX,NumY,DY);
538  fprintf(FileDesc,"C 0");
539  CDInitTGen(Pointer,&TGen);
540  loop {
541  CDTGen(&TGen,&Type,&X,&Y);
542  if (TGen == NULL) {
543  fprintf(FileDesc,";\n");
544  break;
545  }
546  elif (Type == CDROTATE)
547  fprintf(FileDesc," R %ld %ld",X,Y);
548  elif (Type == CDTRANSLATE)
549  fprintf(FileDesc," T %ld %ld",X-Xo,Y-Yo);
550  elif (Type == CDMIRRORX)
551  fprintf(FileDesc," MX");
552  elif (Type == CDMIRRORY)
553  fprintf(FileDesc," MY");
554  }
555  }
556  }
557 
558  GenLayer(FileDesc,'S',"CED");
559  for (SQDesc = SelectQHead; SQDesc; SQDesc = SQDesc->ksSucc) {
560  Pointer = SQDesc->ksPointer;
561  if (Pointer->oInfo == SQ_GONE) continue;
562 
563  if (Pointer->oType == CDWIRE) {
564  CDWire(Pointer,&Layer,&Width,&Path);
565  fprintf(FileDesc,"5 %d -1 0 0 0;\n",P_NODE);
566  GenWireOffset(FileDesc,Width,Path,Xo,Yo);
567  continue;
568  }
569  elif (Pointer->oType == CDPOLYGON) {
570  CDPolygon(Pointer,&Layer,&Path);
571  GenPolygonOffset(FileDesc,Path,Xo,Yo);
572  continue;
573  }
574  elif (Pointer->oType == CDLABEL) {
575  CDLabel(Pointer,&Layer,&Label,&X,&Y,&Xform);
576  fprintf(FileDesc,"94 %s %ld %ld %d",Label,X-Xo,Y-Yo,Xform);
577  fprintf(FileDesc,";\n");
578  continue;
579  }
580  }
581 
582  GenEndSymbol(FileDesc);
583  GenEnd(FileDesc);
584  fclose(FileDesc);
585  sprintf(TypeOut,"New symbol %s created and saved.",TypeIn);
586  MenuDeselect(MenuCRSYM);
588 }
struct prpty * sPrptyList
Definition: cddefs.h:133
void ErasePrompt()
Definition: viewport.c:538
#define loop
Definition: cdmacs.h:11
int struct o * Pointer
Definition: cd.c:1311
#define Or
Definition: cdmacs.h:15
int prpty_Value
Definition: cdprpty.h:67
#define SQ_GONE
Definition: sced.h:347
char * HYtoascii()
void CDCall()
void MY()
Definition: choose.c:67
struct o * ksPointer
Definition: sced.h:335
int MutSelected(struct prpty *PDesc)
Definition: subckt.c:592
char oType
Definition: cddefs.h:148
long kaBottom
Definition: sced.h:112
struct s * kpCellDesc
Definition: sced.h:207
int x1
Definition: cdprpty.h:31
struct prp_node p_node
Definition: cdprpty.h:52
#define P_MODEL
Definition: cdprpty.h:16
void CDPolygon()
int x
Definition: cdprpty.h:26
void GenPolygonOffset()
#define P_NODE
Definition: cdprpty.h:12
void GenBeginSymbol()
#define P_VALUE
Definition: cdprpty.h:17
#define P_BRANCH
Definition: cdprpty.h:15
void CDWire()
#define L
Definition: parse.c:442
Definition: cddefs.h:215
Definition: sced.h:193
int x
Definition: cdprpty.h:39
void GenEndSymbol()
union prp_data * prpty_Data
Definition: cdprpty.h:65
int r2
Definition: cdprpty.h:42
#define CDSYMBOLCALL
Definition: cddefs.h:43
long X
Definition: actions.c:450
void MenuDeselect()
#define R
Definition: parse.c:444
struct ks * ksSucc
Definition: sced.h:334
#define NULL
Definition: spdefs.h:121
char TypeOut[200]
Definition: init.c:23
struct kp Parameters
Definition: init.c:19
void GenWireOffset()
int y1
Definition: cdprpty.h:32
#define elif
Definition: cdmacs.h:10
#define P_INITC
Definition: cdprpty.h:18
#define CDROTATE
Definition: cddefs.h:55
char * subname
Definition: cdprpty.h:48
void CDLabel()
int y2
Definition: cdprpty.h:34
long kaLeft
Definition: sced.h:112
int y
Definition: cdprpty.h:27
Definition: cddefs.h:142
#define P_NAME
Definition: cdprpty.h:13
int y
Definition: cdprpty.h:40
struct prp_branch p_branch
Definition: cdprpty.h:54
struct ks * SelectQHead
Definition: scedext.h:64
int Layer
Definition: cd.c:1908
void Label()
#define CDWIRE
Definition: cddefs.h:47
#define P_MUT
Definition: cdprpty.h:14
int num
Definition: cdprpty.h:47
struct prpty * prpty_Succ
Definition: cdprpty.h:66
int r1
Definition: cdprpty.h:41
Definition: sced.h:333
#define CDTRANSLATE
Definition: cddefs.h:56
char * name
Definition: cdprpty.h:46
char * FBEdit()
int inode
Definition: cdprpty.h:25
char * MenuCRSYM
Definition: scedintr.c:70
void MX()
Definition: choose.c:52
double coeff
Definition: cdprpty.h:35
int char Type
Definition: actions.c:449
struct prp_name p_name
Definition: cdprpty.h:55
int x2
Definition: cdprpty.h:33
#define CDMIRRORY
Definition: cddefs.h:54
FILE * POpen()
Definition: cddefs.h:192
#define CDMIRRORX
Definition: cddefs.h:53
void MenuSelect()
struct prp_mut p_mut
Definition: cdprpty.h:53
long Y
Definition: actions.c:450
Definition: cdprpty.h:62
void ShowPrompt(char *str)
Definition: scedstub.c:71
#define CDPOLYGON
Definition: cddefs.h:44
short oInfo
Definition: cddefs.h:147
void GenLayer()
void CDTGen()
struct ka SelectQBB
Definition: scedext.h:65
void GenEnd()
struct prpty * oPrptyList
Definition: cddefs.h:146
void SQComputeBB()
Definition: choose.c:749
void CDInitTGen()
#define CDLABEL
Definition: cddefs.h:46
char* NextCellName ( )

Definition at line 852 of file scedintr.c.

853 {return (NULL);}
#define NULL
Definition: spdefs.h:121
void NotPointingAtLayout ( )

Definition at line 604 of file point.c.

606 {
607  ShowPrompt("You aren't pointing in the layout viewport.");
608 }
void ShowPrompt(char *str)
Definition: scedstub.c:71
int OpenCell ( )
FILE* OpenDevice ( )
void OutlineBox ( )
void OutlineText ( )
void OversizeBox ( )
void Pan ( )
void Place ( )
void Point ( )

Definition at line 72 of file point.c.

74 {
75  /*
76  * When user has typed Condition, do Action.
77  *
78  * Condition
79  * shortest unique prefix of Menu
80  * Action
81  * Return with command selected stored in Parameters.kpCommand.
82  *
83  * Condition
84  * ESC
85  * Action
86  * Forget remembered type in, return if EscReturn == True.
87  *
88  * Condition
89  * ctrl-a
90  * Action
91  * Execute abort routine.
92  *
93  * Condition
94  * point key or tablet stylus button Z
95  * Action
96  * If user is pointing at a layer in the layer table viewport,
97  * change the current layer.
98  * If user is pointing at a command menu selection, return with
99  * command selected stored as Parameters.kpCommand.
100  * If user is pointing inside a layout viewport--coarse or fine--
101  * return with Parameters.kpCommand[0] == EOS and cursor
102  * descriptor up-to-date.
103  *
104  * Condition
105  * ctrl-f or tablet stylus button 1
106  * Action
107  * Wait for user to point.
108  * Redisplay in fine viewport around where he pointed
109  * if fine positioning is enabled, or pan otherwise.
110  *
111  * Condition
112  * ctrl-g
113  * Action
114  * Change scale of magnifying glass, or otherwise window, using
115  * next two point actions.
116  *
117  * Condition
118  * ctrl-n
119  * Action
120  * Save the present view context in a list.
121  *
122  * Condition
123  * ctrl-t or ctrl-v
124  * Action
125  * Toggle position of magnifying glass, bottom or right.
126  *
127  */
128  char *TypeIn;
129  MENU *Menu;
130  unsigned long newtime;
131  int NumCommand,Buttons,Int1,Int2,Int3;
132  int Layer;
133  long X,Y,centerX,centerY;
134  char Key;
135  extern char *MenuABORT;
136 
137  /*
138  * The best way to handle interrupts reliably is to
139  * initialize the service routines as frequently as
140  * possible. Therefore, . . .
141  */
142  InitSignals();
143  Menu = GetCurrentMenu();
144  Parameters.kpCommand[NumCommand = 0] = EOS;
146  if (OldButton3) {
147  OldButton3 = False;
149  }
151 
152  loop {
153  loop {
154  point_input(&X,&Y,&Key,&Buttons);
155 
156  if (Key)
157  break;
158 
159  if ((Buttons == BUTTON1 Or
160  Buttons == BUTTON2 Or
161  Buttons == BUTTON3 Or
162  Buttons == BUTTON4) And
163  (X < gi_maxx And X > 0 And Y < gi_maxy And Y > 0))
164  break;
165 
166  }
167 
168  newtime = actiontime();
169  if (newtime > LastPointTime && newtime - LastPointTime < DEBOUNCETIME)
170  continue;
171  LastPointTime = newtime;
172 
173  switch (Key) {
174 
175  case 0:
176  break;
177 
178  case BSP:
179  case DEL:
180  if (NumCommand) NumCommand--;
181  Parameters.kpCommand[NumCommand] = EOS;
182  continue;
183 
184  case ESC:
185  Parameters.kpCommand[NumCommand = 0] = EOS;
186  /* SRW ** so we know if esc was entered */
187  Parameters.kpCommand[1] = ESC;
188  if (EscReturn) return;
189  continue;
190 
191  case NEWL:
192  Parameters.kpCommand[NumCommand = 0] = EOS;
193  if (control_at(X,Y)) return;
194  continue;
195 
196  case '!':
197  /* shell command */
198  if (LockOut) continue; /* ignore */
199  ShowPrompt("! ");
200  TypeIn = FBEdit(NULL);
201  if (TypeIn != NULL) {
202  ShowProcess(TypeIn);
203  ErasePrompt();
204  }
205  Parameters.kpCommand[NumCommand = 0] = EOS;
206  continue;
207 
208  case CTRL_A:
209  /* SRW ** abort gracefully */
210  strcpy(Parameters.kpCommand,MenuABORT);
211  NumCommand = 0;
212  return;
213 
214  case CTRL_F:
215  if (LockOut) continue; /* ignore ^F */
216  Parameters.kpCommand[NumCommand = 0] = EOS;
217  SaveLastView();
218  /* SRW ** pan if coarse viewport only */
220  if (!InBox(X,Y,View->kvCoarseViewport)) {
222  continue;
223  }
224  PToL(View->kvCoarseWindow,&X,&Y);
226  InitFineWindow(X,Y);
229  }
230  else
231  FinePosition(X,Y,Key);
232  /*
233  * This is necessary for debouncing.
234  * It takes time to redisplay, so we set the time of the last
235  * pointing event when the redisplay is finished.
236  */
238  continue;
239 
240  case CTRL_G:
241  if (LockOut) continue; /* ignore ^G */
242  Parameters.kpCommand[NumCommand = 0] = EOS;
243  if (Parameters.kpCellName[0] == EOS)
244  return;
245  loop {
246  ShowPrompt("Point to diagonal of area to be magnified.");
247  point_input(&X,&Y,&Key,&Buttons);
248  if (Key == ESC) goto skip;
249  if (Buttons == BUTTON1) {
250  if (InBox(X,Y,View->kvCoarseViewport))
251  PToL(View->kvCoarseWindow,&X,&Y);
252  elif (InBox(X,Y,View->kvFineViewport))
253  PToL(View->kvFineWindow,&X,&Y);
254  else {
256  continue;
257  }
258  OldButton3X = X;
259  OldButton3Y = Y;
260  FBSetRubberBanding('R');
261  break;
262  }
263  }
264  loop {
265  ShowPrompt("Point to second endpoint.");
266  point_input(&X,&Y,&Key,&Buttons);
267  if (Key == ESC) {
269  goto skip;
270  }
271  if (Buttons == BUTTON1) {
272  if (InBox(X,Y,View->kvCoarseViewport))
273  PToL(View->kvCoarseWindow,&X,&Y);
274  elif (InBox(X,Y,View->kvFineViewport))
275  PToL(View->kvFineWindow,&X,&Y);
276  else {
278  continue;
279  }
281  break;
282  }
283  }
285 skip:
286  ErasePrompt();
287  continue;
288 
289  case CTRL_N:
290  Parameters.kpCommand[NumCommand = 0] = EOS;
291  SaveViewOnStack();
292  continue;
293 
294  case CTRL_U:
295  case CTRL_X:
296  case SPA:
297  NumCommand = 0;
298  Parameters.kpCommand[0] = EOS;
299  continue;
300 
301  case CTRL_T:
302  case CTRL_V:
303  if (LockOut) continue; /* ignore */
304  Parameters.kpCommand[NumCommand = 0] = EOS;
306  InitViewport();
308  continue;
309  SetPositioning();
312  continue;
313 
314  default:
315  Parameters.kpCommand[NumCommand++] = Key;
316  if (NumCommand > 80) NumCommand = 80;
317  Parameters.kpCommand[NumCommand] = EOS;
318  /*
319  * Test for shortest unique prefix, or prefix matching upper
320  * case part of menu. Stupid search is plenty fast.
321  */
322  Int3 = -1;
323  Int2 = 0;
324  for (Int1 = 0; Menu[Int1].mEntry != NULL; Int1++) {
325  for (Int2 = 0; Int2 < NumCommand; Int2++) {
326  char c = Menu[Int1].mPrefix[Int2];
327  if (isupper(c)) c = tolower(c);
328  if (Parameters.kpCommand[Int2] != c) break;
329  }
330  if (Parameters.kpCommand[Int2] == EOS And Int2 > 0) {
331  if (!Menu[Int1].mPrefix[Int2]) {
332  /* found a match */
333  if (Int3 >= 0) {
334  /* oops, more than 1 match */
335  Int2 = -1;
336  break;
337  }
338  Int3 = Int1;
339  }
340  }
341  }
342  if (Int3 >= 0 && Int2 >= 0) {
343  strcpy(Parameters.kpCommand,Menu[Int3].mEntry);
344  return;
345  }
346  continue;
347  }
348  NumCommand = 0;
349  if (ButtonPress(Buttons,X,Y))
350  return;
351  }
352 }
#define NEWL
Definition: point.c:47
void ErasePrompt()
Definition: viewport.c:538
#define CTRL_V
Definition: point.c:55
static int OldButton3
Definition: point.c:58
static void new_fine_window()
int kvFineViewportOnBottom
Definition: sced.h:156
#define CTRL_A
Definition: point.c:49
#define CTRL_N
Definition: point.c:52
#define loop
Definition: cdmacs.h:11
void Redisplay()
#define Or
Definition: cdmacs.h:15
struct ka * kvCoarseWindow
Definition: sced.h:149
void PToL()
char * strcpy()
void InitCoarseWindow()
#define COARSEVIEWPORTONLY
Definition: sced.h:51
#define CTRL_X
Definition: point.c:56
void InitViewport()
Definition: init.c:358
char * kpCellName
Definition: sced.h:210
#define BUTTON4
Definition: point.c:41
void EraseLargeCoarseViewport()
Definition: viewport.c:583
int InBox()
#define BSP
Definition: point.c:45
char * mEntry
Definition: sced.h:364
#define SPA
Definition: point.c:48
char kpRedisplayControl
Definition: sced.h:312
static unsigned long actiontime()
Definition: point.c:735
#define DEL
Definition: point.c:46
struct ka * kvFineViewport
Definition: sced.h:148
void SaveViewOnStack()
Definition: display.c:323
int kpPointCoarseWindow
Definition: sced.h:258
#define CTRL_F
Definition: point.c:50
#define DEBOUNCETIME
Definition: point.c:30
char * kpCommand
Definition: sced.h:219
long X
Definition: actions.c:450
#define skip(s)
Definition: rawfile.c:268
#define BUTTON2
Definition: point.c:39
#define CTRL_G
Definition: point.c:51
#define CTRL_U
Definition: point.c:54
#define NULL
Definition: spdefs.h:121
struct ka * kvCoarseViewport
Definition: sced.h:150
struct kp Parameters
Definition: init.c:19
#define elif
Definition: cdmacs.h:10
static long OldButton3X
Definition: point.c:59
void FinePosition(long X, long Y, char Key)
Definition: point.c:612
MENU * GetCurrentMenu()
Definition: viewport.c:174
static int control_at()
char mPrefix[6]
Definition: sced.h:366
struct kv * View
Definition: init.c:17
static void point_input()
#define ESC
Definition: point.c:44
void InitFineWindow()
#define BUTTON1
Definition: point.c:38
Definition: cddefs.h:177
void SaveLastView()
Definition: display.c:297
int Layer
Definition: cd.c:1908
void ShowProcess()
void SetPositioning()
Definition: init.c:322
#define EOS
Definition: cdmacs.h:9
static int EscReturn
Definition: point.c:68
#define And
Definition: cdmacs.h:14
void FBSetRubberBanding()
void NotPointingAtLayout()
Definition: point.c:604
char * FBEdit()
int ButtonPress(int Buttons, long X, long Y)
Definition: point.c:356
int LockOut
Definition: point.c:65
#define BUTTON3
Definition: point.c:40
double kaWidth
Definition: sced.h:114
#define False
Definition: scedstub.c:15
char * MenuABORT
Definition: scedintr.c:63
Definition: sced.h:363
void InitSignals()
Definition: scedintr.c:845
long Y
Definition: actions.c:450
void ShowPrompt(char *str)
Definition: scedstub.c:71
#define CTRL_T
Definition: point.c:53
static unsigned long LastPointTime
Definition: point.c:62
static long OldButton3Y
Definition: point.c:59
int PointColor ( )
int PointLoop ( )
int PointLoopSafe ( )
void Pop ( )

Definition at line 829 of file subckt.c.

831 {
832  int i;
833  struct s *CellDesc;
834  char *TypeIn;
835  extern char *MenuPOP;
836 
837  MenuSelect(MenuPOP);
838  if (Context == NULL)
839  ShowPrompt("There isn't a context to pop to.");
840 
841  else {
842  SQClear();
843  if (WroteCell) {
844  /*
845  * Restore cell to its old state, because we don't want
846  * a global change, but we want a change to the instance
847  * pushed from.
848  */
850  }
851  if (Parameters.kpModified) {
852  ShowPrompt("You've modified this cell. Do you want to save it (y)?");
853  TypeIn = FBEdit(NULL);
854  if (TypeIn == NULL)
855  goto quit;
856  if (TypeIn[0] != 'n' && TypeIn[0] != 'N')
857  WriteCell();
858  }
859  WroteCell = False;
863  MallocFailed();
865  }
866 quit:
867  TitleWindow();
868  MenuDeselect(MenuPOP);
869 }
int kpModified
Definition: sced.h:261
Definition: cddefs.h:119
#define ERASE
Definition: scedmacs.h:11
struct s * kpCellDesc
Definition: sced.h:207
#define Not
Definition: cdmacs.h:16
static struct cc * Context
Definition: subckt.c:28
void WriteCell()
Definition: bascmd.c:740
void MallocFailed()
Definition: scedintr.c:857
int CDClose()
void MenuDeselect()
#define NULL
Definition: spdefs.h:121
static void edit_cell()
struct kp Parameters
Definition: init.c:19
int kpShowTerminals
Definition: sced.h:255
void DisplayTerminals()
char * MenuPOP
Definition: scedintr.c:95
void TitleWindow()
Definition: bascmd.c:704
static int pop_context()
Definition: subckt.c:873
char * FBEdit()
#define False
Definition: scedstub.c:15
void SQClear()
Definition: choose.c:690
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
static int WroteCell
Definition: subckt.c:32
struct line* PrintModels ( )

Definition at line 279 of file library.c.

284 {
285  struct ml *m;
286  struct line *d,*d1,*d0;
287 
288  d0 = NULL;
289  while (Models && Models->ml_level == Mlevel) {
290  d1 = GetModelText(Models->ml_name);
291  if (d1 != NULL) {
292  if (d0 == NULL)
293  d = d0 = d1;
294  else
295  d->li_next = d1;
296  for (; d->li_next; d = d->li_next) ;
297  }
298  m = Models;
299  Models = Models->ml_next;
300  txfree(m->ml_name);
301  tfree(m);
302  }
303  Mlevel--;
304  return (d0);
305 }
static int Mlevel
Definition: library.c:197
char * ml_name
Definition: library.c:189
FILE * m
Definition: proc2mod.c:47
Definition: library.c:188
Definition: fteinp.h:14
Definition: cddefs.h:237
#define tfree(x)
Definition: cdmacs.h:22
void txfree()
#define NULL
Definition: spdefs.h:121
static struct ml * Models
Definition: library.c:195
struct line * li_next
Definition: fteinp.h:18
int ml_level
Definition: library.c:191
struct line * GetModelText(char *name)
Definition: library.c:309
struct ml * ml_next
Definition: library.c:190
struct line* PrintMutual ( )
void PToL ( )
void Push ( )
void QueueModel ( )
void Rdraw ( )

Definition at line 897 of file bascmd.c.

899 {
903 }
char * MenuRDRAW
Definition: scedintr.c:99
void MenuDeselect()
void RedisplaySCED()
GRAPH * currentgraph
Definition: graphdb.c:21
void MenuSelect()
void Readin ( )

Definition at line 603 of file init.c.

605 {
606  FILE *fp;
607  int i,d1,d2,d3,d4;
608 
609  fp = POpen(INIT_FILE,"r",(char**)NULL);
610  if (fp == NULL)
611  return;
612  (void)fgets(TypeOut,80,fp);
613  if (TypeOut[0] != 'S'|| TypeOut[1] != 'C')
614  goto error;
615  for (i = 0; i < 16; i++) {
616  if (fscanf(fp,"%d %d %d %d\n",&d1,&d2,&d3,&d4) != 4)
617  goto error;
618  if (d1 < 0 || d1 > 15)
619  goto error;
620  if (d2 < 0 || d2 > 255)
621  goto error;
622  if (d3 < 0 || d3 > 255)
623  goto error;
624  if (d4 < 0 || d4 > 255)
625  goto error;
626  ColorTable[d1].klR = d2;
627  ColorTable[d1].klG = d3;
628  ColorTable[d1].klB = d4;
629  }
630  if (fscanf(fp,"%d %d %d %d\n",&d1,&d2,&d3,&d4) != 4)
631  goto error;
633  Parameters.kpGridOnTop = d2;
636  if (fgets(TypeOut,80,fp) != NULL)
638 error:
639  fclose(fp);
640  return;
641 }
#define INIT_FILE
Definition: sced.h:25
int kpGridDisplayed
Definition: sced.h:240
int kpGridLineStyle
Definition: sced.h:237
char TypeOut[200]
Definition: init.c:23
int klR
Definition: sced.h:95
struct kp Parameters
Definition: init.c:19
int kpShowGridInLargeViewport
Definition: sced.h:246
#define NULL
Definition: spdefs.h:121
struct kl * ColorTable
Definition: init.c:20
void SetCDPath()
int klB
Definition: sced.h:95
int klG
Definition: sced.h:95
int kpGridOnTop
Definition: sced.h:243
FILE * POpen()
void Redisplay ( )
void RedisplayAfterInterrupt ( )

Definition at line 623 of file display.c.

625 {
626  TInit();
627  ShowPrompt("Interrupted. Type Ctrl A to abort.");
628  InitSignals();
629  ShowCommandMenu();
630 }
void TInit()
Definition: xforms.c:23
void ShowCommandMenu()
Definition: viewport.c:121
void InitSignals()
Definition: scedintr.c:845
void ShowPrompt(char *str)
Definition: scedstub.c:71
void RedrawPrompt ( )

Definition at line 512 of file viewport.c.

514 {
515  if (BackPrompt[0] == '\0') return;
519 }
void DevSetColor()
static char BackColor
Definition: viewport.c:437
#define ROW_COLUMN
Definition: scedmacs.h:15
struct kp Parameters
Definition: init.c:19
static char BackPrompt[200]
Definition: viewport.c:436
void FBText()
#define gi_numtextrows
Definition: scedmacs.h:60
int kpLastCursorColumn
Definition: sced.h:293
int RepaintMore ( )

Definition at line 222 of file moretext.c.

224 {
225  if (!MoreOn || UsePopup)
226  return (False);
227  (void)MorePageDisplay();
228  return (True);
229 }
static int UsePopup
Definition: moretext.c:21
static int MoreOn
Definition: moretext.c:22
int MorePageDisplay()
Definition: moretext.c:233
#define True
Definition: scedstub.c:16
#define False
Definition: scedstub.c:15
void RGB ( )

Definition at line 238 of file bascmd.c.

240 {
242  ErasePrompt();
243  ShowRGB();
245 }
void ErasePrompt()
Definition: viewport.c:538
char * MenuRGB
Definition: scedintr.c:100
void MenuDeselect()
void ShowRGB()
Definition: bascmd.c:481
void MenuSelect()
void Rotat0 ( )

Definition at line 82 of file choose.c.

84 {
88 }
char * Menu90
Definition: scedintr.c:54
struct kp Parameters
Definition: init.c:19
int kpRotationAngle
Definition: sced.h:282
void AlterMenuEntries()
void MenuSelect()
char * Menu0
Definition: scedintr.c:53
void Rotat180 ( )

Definition at line 102 of file choose.c.

104 {
108 }
char * Menu180
Definition: scedintr.c:55
struct kp Parameters
Definition: init.c:19
int kpRotationAngle
Definition: sced.h:282
char * Menu270
Definition: scedintr.c:56
void AlterMenuEntries()
void MenuSelect()
void Rotat270 ( )

Definition at line 112 of file choose.c.

114 {
118 }
void MenuDeselect()
struct kp Parameters
Definition: init.c:19
int kpRotationAngle
Definition: sced.h:282
char * Menu270
Definition: scedintr.c:56
void AlterMenuEntries()
char * Menu0
Definition: scedintr.c:53
void Rotat90 ( )

Definition at line 92 of file choose.c.

94 {
98 }
char * Menu90
Definition: scedintr.c:54
char * Menu180
Definition: scedintr.c:55
struct kp Parameters
Definition: init.c:19
int kpRotationAngle
Definition: sced.h:282
void AlterMenuEntries()
void MenuSelect()
void RunSpice ( )

Definition at line 519 of file scedintr.c.

521 {
522  char *TypeIn;
523  wordlist *wl;
524  struct line *deck;
525  static char Rcmd[64];
526  RETSIGTYPE (*intrpt)();
527 
529  ShowPrompt("Pop to top level first.");
530  return;
531  }
533 
534 
535  if ((*ft_sced->sc_inprogress)()) {
536  ShowPrompt("Resume run in progress? [y] ");
537  if ((TypeIn = FBEdit(NULL)) == NULL) {
539  ErasePrompt();
540  return;
541  }
542  if (*TypeIn != 'n' && *TypeIn != 'N') {
543  if (IplotStatusChanged) {
544  ClearIplot();
545  SetIplot();
546  }
547  intrpt = signal(SIGINT,sced_interrupt);
548  (*ft_sced->sc_resume)(NULL);
549  (void)signal(SIGINT,intrpt);
550  if (!dispdev->windows && !dispdev->hardcopy)
551  if ((*ft_sced->sc_isiplot)())
553  (void)CheckError();
554  if (!(*ft_sced->sc_inprogress)()) {
555  ShowPrompt("Analysis complete.");
556  ClearIplot();
557  }
559  return;
560  }
561 
562  }
563 
564  ClearIplot();
565  deck = MakeSpiceDeck();
566  fix_spice_deck(deck);
567  if (SourceDone)
568  (*ft_sced->sc_cktclear)();
570  (void)CheckError();
571  SourceDone = True;
572 
573  wl = GetAnalysisFromDeck();
574  if (wl == NULL) {
575  ShowPrompt("Enter analysis command : ");
576  if ((TypeIn = FBEdit(Rcmd)) != NULL) {
577  wl = cp_lexer(TypeIn);
578  strncpy(Rcmd,TypeIn,64);
579  Rcmd[63] = '\0';
580  }
581  else
582  ErasePrompt();
583  }
584  if (wl) {
585  if (wl->wl_word && *wl->wl_word) {
586  ShowPrompt("Performing analysis, please wait.");
587  SetIplot();
588  intrpt = signal(SIGINT,sced_interrupt);
589  (*ft_sced->sc_dosim)(wl->wl_word,wl->wl_next);
590  (void)signal(SIGINT,intrpt);
591  if (!dispdev->windows && !dispdev->hardcopy)
592  if ((*ft_sced->sc_isiplot)())
594  (void)CheckError();
595  if (!(*ft_sced->sc_inprogress)()) {
596  ShowPrompt("Analysis complete.");
597  ClearIplot();
598  }
599  }
600  wl_free(wl);
601  }
603 }
void ClearIplot()
Definition: grafintr.c:199
void ErasePrompt()
Definition: viewport.c:538
void wl_free()
int(* sc_inprogress)()
Definition: scedio.h:45
char * MenuRUN
Definition: scedintr.c:101
struct s * kpCellDesc
Definition: sced.h:207
DISPDEVICE * dispdev
Definition: display.c:112
char * kpCellName
Definition: sced.h:210
struct s * kpTopDesc
Definition: sced.h:213
bool hardcopy
Definition: plotdev.h:64
Definition: library.c:18
wordlist * cp_lexer()
bool windows
Definition: plotdev.h:61
Definition: fteinp.h:14
void MenuDeselect()
void SetIplot()
Definition: grafintr.c:181
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
int CheckError()
Definition: scedintr.c:696
int IplotStatusChanged
Definition: grafintr.c:23
#define True
Definition: scedstub.c:16
static RETSIGTYPE sced_interrupt()
Definition: scedintr.c:607
wordlist * GetAnalysisFromDeck()
Definition: main.c:255
struct sSCEDitf * ft_sced
Definition: main.c:441
void(* sc_dosim)()
Definition: scedio.h:46
void RedisplaySCED()
void(* sc_resume)()
Definition: scedio.h:49
static void fix_spice_deck()
Definition: cpstd.h:21
int(* sc_isiplot)()
Definition: scedio.h:50
void(* sc_cktclear)()
Definition: scedio.h:48
struct wordlist * wl_next
Definition: cpstd.h:23
void(* sc_source)()
Definition: scedio.h:47
char * FBEdit()
GRAPH * currentgraph
Definition: graphdb.c:21
char * wl_word
Definition: cpstd.h:22
#define False
Definition: scedstub.c:15
struct line * MakeSpiceDeck()
Definition: netlist.c:183
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
static int SourceDone
Definition: scedintr.c:274
int SafeCmds ( )
void Save ( )

Definition at line 715 of file bascmd.c.

717 {
718  FILE *fp;
719 
720  ShowPrompt("Saving circuit. Please wait.");
721  if (CDUpdate(Parameters.kpCellDesc,(char *)NULL)) {
724  fp = POpen(Parameters.kpCellName,"a",(char **)NULL);
725  if (fp) {
726  DumpSpiceFile(fp);
727  fclose(fp);
728  }
729  }
731  MallocFailed();
732  ShowPrompt("Current circuit has been saved.");
733  }
734  else
735  ShowPrompt("Can't save circuit.");
736 }
int kpModified
Definition: sced.h:261
int CDUpdate()
#define Not
Definition: cdmacs.h:16
struct s * kpCellDesc
Definition: sced.h:207
char * kpCellName
Definition: sced.h:210
struct s * kpTopDesc
Definition: sced.h:213
void MallocFailed()
Definition: scedintr.c:857
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
void DumpSpiceFile()
int CDReflect()
#define False
Definition: scedstub.c:15
FILE * POpen()
void ShowPrompt(char *str)
Definition: scedstub.c:71
void SaveLastView ( )

Definition at line 297 of file display.c.

299 {
300  /*
301  * Parameters.kpWindowStack is always the last view.
302  */
303  if (Parameters.kpWindowStack == NULL) {
304  if ((Parameters.kpWindowStack = alloc(kw)) == NULL)
305  MallocFailed();
308  }
319 }
struct kw * kpWindowStack
Definition: sced.h:222
long kwLastWindowY
Definition: sced.h:132
int kvFineViewportOnBottom
Definition: sced.h:156
long kaY
Definition: sced.h:113
long kwLastWindowWidth
Definition: sced.h:133
long kwLastFineWindowY
Definition: sced.h:135
char kvControl
Definition: sced.h:157
struct ka * kvCoarseWindow
Definition: sced.h:149
char * strcpy()
char kwName[8]
Definition: sced.h:140
#define alloc(type)
Definition: cdmacs.h:21
long kwLastFineWindowWidth
Definition: sced.h:136
long kwLastWindowX
Definition: sced.h:131
void MallocFailed()
Definition: scedintr.c:857
#define NULL
Definition: spdefs.h:121
long kwLastFineWindowX
Definition: sced.h:134
struct kp Parameters
Definition: init.c:19
struct ka * kvFineWindow
Definition: sced.h:147
struct kv * View
Definition: init.c:17
struct kw * kwNext
Definition: sced.h:137
double kaWidth
Definition: sced.h:114
Definition: sced.h:130
long kaX
Definition: sced.h:113
void SaveViewOnStack ( )

Definition at line 323 of file display.c.

325 {
326  int i = 0;
327  char c, buf[32];
328  struct kw *New, *Tmp;
329 
330  New = alloc(kw);
331  if (New == NULL) MallocFailed();
332 
339  (New->kwName)[5] = View->kvFineViewportOnBottom;
340  (New->kwName)[6] = View->kvControl;
341 
343  SaveLastView();
344 
345  New->kwNext = NULL;
346  for (Tmp = Parameters.kpWindowStack; Tmp->kwNext; i++,Tmp = Tmp->kwNext) ;
347  Tmp->kwNext = New;
348  sprintf(buf,"Current view assigned to: %c",'A'+i);
349  ShowPrompt(buf);
350  New->kwName[0] = 'a'+ i;
351  New->kwName[1] = '\0';
352 }
struct kw * kpWindowStack
Definition: sced.h:222
long kwLastWindowY
Definition: sced.h:132
static char buf[MAXPROMPT]
Definition: arg.c:18
int kvFineViewportOnBottom
Definition: sced.h:156
long kaY
Definition: sced.h:113
long kwLastWindowWidth
Definition: sced.h:133
long kwLastFineWindowY
Definition: sced.h:135
char kvControl
Definition: sced.h:157
struct ka * kvCoarseWindow
Definition: sced.h:149
char kwName[8]
Definition: sced.h:140
#define alloc(type)
Definition: cdmacs.h:21
long kwLastFineWindowWidth
Definition: sced.h:136
long kwLastWindowX
Definition: sced.h:131
void MallocFailed()
Definition: scedintr.c:857
#define NULL
Definition: spdefs.h:121
long kwLastFineWindowX
Definition: sced.h:134
struct kp Parameters
Definition: init.c:19
void SaveLastView()
Definition: display.c:297
struct ka * kvFineWindow
Definition: sced.h:147
struct kv * View
Definition: init.c:17
static double c
Definition: vectors.c:16
struct kw * kwNext
Definition: sced.h:137
double kaWidth
Definition: sced.h:114
Definition: sced.h:130
void ShowPrompt(char *str)
Definition: scedstub.c:71
long kaX
Definition: sced.h:113
int sced ( )
void SCEDhelp ( )

Definition at line 1090 of file scedintr.c.

1092 {
1093  int dummy;
1094  char cmd[32];
1095 
1097  ShowPrompt("Point to menu item for help (ESC to exit help).");
1099  loop {
1100  switch (PointLoopSafe(&dummy)) {
1101  case PL_ESC:
1103  if (!dispdev->windows)
1105  else
1106  ErasePrompt();
1108  return;
1109  case PL_PCW:
1110  continue;
1111  case PL_CMD:
1112  if (Matching(MenuMINSR) ||
1113  Matching(MenuPLUSR) ||
1114  Matching(MenuMINSG) ||
1115  Matching(MenuPLUSG) ||
1116  Matching(MenuMINSB) ||
1118  strcpy(Parameters.kpCommand,"chgcolor");
1119 
1120  else
1121 
1122  if (Matching(Menu0) ||
1123  Matching(Menu90) ||
1124  Matching(Menu180) ||
1125  Matching(Menu270))
1126  strcpy(Parameters.kpCommand,"rotate");
1127 
1128  else
1129 
1130  if (Matching(MenuMX) ||
1131  Matching(MenuMY))
1132  strcpy(Parameters.kpCommand,"mirror");
1133 
1134  else
1135 
1136  if (Matching(MenuSpace))
1137  continue;
1138 
1139  sprintf(cmd,"help sced:%s",Parameters.kpCommand);
1140  (void)do_spice_cmd(cmd);
1141  }
1142  }
1143 }
#define PL_ESC
Definition: sced.h:62
void ErasePrompt()
Definition: viewport.c:538
#define loop
Definition: cdmacs.h:11
char * Menu180
Definition: scedintr.c:55
static char * MenuSpace
Definition: scedintr.c:114
char * strcpy()
static void dummy()
Definition: mfbcursr.c:550
int PointLoopSafe()
DISPDEVICE * dispdev
Definition: display.c:112
char * MenuHELP
Definition: scedintr.c:81
#define PL_PCW
Definition: sced.h:65
static enum Active SCEDisActive
Definition: scedintr.c:275
char * MenuPLUSR
Definition: scedintr.c:62
#define Matching(string)
Definition: scedmacs.h:63
char * MenuMINSG
Definition: scedintr.c:58
char * Menu90
Definition: scedintr.c:54
bool windows
Definition: plotdev.h:61
char * kpCommand
Definition: sced.h:219
char * MenuPLUSB
Definition: scedintr.c:60
void MenuDeselect()
struct kp Parameters
Definition: init.c:19
char * MenuMX
Definition: scedintr.c:90
char * MenuMY
Definition: scedintr.c:91
char * MenuPLUSG
Definition: scedintr.c:61
void RedisplaySCED()
char * MenuMINSB
Definition: scedintr.c:57
char * Menu0
Definition: scedintr.c:53
char * Menu270
Definition: scedintr.c:56
GRAPH * currentgraph
Definition: graphdb.c:21
#define PL_CMD
Definition: sced.h:64
char * MenuMINSR
Definition: scedintr.c:59
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
static int do_spice_cmd()
void SCEDquitHelp ( )
void Sel ( )
void Selection ( )
int SelectNode ( )
void SelectTypes ( )
void SetCDPath ( )
void SetCurrentAOI ( )
void SetGrid ( )
void SetIplot ( )

Definition at line 181 of file grafintr.c.

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 }
static wordlist * GP_wl()
Definition: grafintr.c:304
Definition: library.c:18
void wl_free()
static int DoingIplot
Definition: grafintr.c:22
struct wordlist * wl_prev
Definition: cpstd.h:24
#define NULL
Definition: spdefs.h:121
int IplotStatusChanged
Definition: grafintr.c:23
struct sSCEDitf * ft_sced
Definition: main.c:441
Definition: cpstd.h:21
void(* sc_setiplot)()
Definition: scedio.h:51
struct wordlist * wl_next
Definition: cpstd.h:23
char * wl_word
Definition: cpstd.h:22
#define False
Definition: scedstub.c:15
void SetLibraryChoices ( )

Definition at line 140 of file library.c.

143 {
144  struct lib *w;
145  int i;
146 
147  for (i = 0,w = Lib; w; w = w->lib_next) {
148  DeviceMenu[i].mEntry = w->lib_name;
149  i++;
150  if (i == 79) break;
151  }
152  DeviceMenu[i].mEntry = NULL;
153  /*
154  FixMenuPrefix(DeviceMenu);
155  */
156 }
static struct lib * Lib
Definition: library.c:39
char * mEntry
Definition: sced.h:364
Definition: cddefs.h:169
#define NULL
Definition: spdefs.h:121
MENU * DeviceMenu
Definition: scedintr.c:50
char * lib_name
Definition: library.c:25
Definition: library.c:24
struct lib * lib_next
Definition: library.c:28
void SetNewTransform ( )
void SetPathFromSpice ( )

Definition at line 757 of file scedintr.c.

760 {
761  char buf[80], *t;
762  struct variable *v;
763  extern char *kw_sourcepath;
764  int len;
765 
766  TypeOut[0] = '\0';
767 
768  if (!cp_getvar(kw_sourcepath,VT_LIST,(char *)&v)) {
769  CDPath(".");
770  return;
771  }
772  len = 256;
773  t = tmalloc(len);
774  switch (v->va_type) {
775  case VT_STRING:
776  sprintf(t,"%s",v->va_string);
777  break;
778  case VT_NUM:
779  sprintf(t,"%d",v->va_num);
780  break;
781  case VT_REAL:
782  sprintf(t,"%lg",v->va_real);
783  break;
784  }
785  for (v = v->va_next; v; v = v->va_next) {
786  switch (v->va_type) {
787  case VT_STRING:
788  sprintf(buf," %s",v->va_string);
789  break;
790  case VT_NUM:
791  sprintf(buf," %d",v->va_num);
792  break;
793  case VT_REAL:
794  sprintf(buf," %lg",v->va_real);
795  break;
796  }
797  if (strlen(t) + strlen(buf) >= len)
798  t = trealloc(t, len += 256);
799  strcat(t,buf);
800  }
801  /* append the path to the sced system files */
802  if (strlen(t) + strlen(Sced_Path) > len)
803  t = trealloc(t, len += 256);
804  strcat(t," ");
805  strcat(t,Sced_Path);
806  CDPath(t);
807  txfree(t);
808 }
static char buf[MAXPROMPT]
Definition: arg.c:18
#define VT_LIST
Definition: cpstd.h:64
int cp_getvar()
char va_type
Definition: cpstd.h:42
char * tmalloc()
void txfree()
char TypeOut[200]
Definition: init.c:23
#define VT_NUM
Definition: cpstd.h:61
#define VT_STRING
Definition: cpstd.h:63
char * Sced_Path
Definition: ivars.c:16
#define VT_REAL
Definition: cpstd.h:62
int CDPath()
Definition: cddefs.h:192
struct variable * va_next
Definition: cpstd.h:51
char * trealloc()
Definition: cpstd.h:41
char * kw_sourcepath
Definition: options.c:417
void SetPositioning ( )

Definition at line 322 of file init.c.

324 {
325  long X,Y,Width;
326 
327  if (View->kvControl != FULLSCREEN And
329  /*
330  * Split--enable fine positioning.
331  */
334  }
335  else {
336  /*
337  * Don't split--don't enable fine positioning.
338  */
341  }
342  Width = View->kvCoarseWindow->kaWidth;
343  X = View->kvCoarseWindow->kaX;
344  Y = View->kvCoarseWindow->kaY;
345  InitCoarseWindow(X,Y,Width);
346 
347  /* it is enough to just check the width */
348  if (Width <= View->kvFineWindow->kaWidth) {
349  View->kvFineWindow->kaWidth = Width - Width/4;
352  }
353  InitFineWindow(X,Y);
354 }
long kaY
Definition: sced.h:113
int kpPointingThreshold
Definition: sced.h:279
char kvControl
Definition: sced.h:157
#define SPLITSCREEN
Definition: sced.h:48
struct ka * kvCoarseWindow
Definition: sced.h:149
struct ka * kvSmallCoarseViewport
Definition: sced.h:152
struct kv * View
Definition: init.c:17
double kvCoarseRatio
Definition: sced.h:155
#define COARSEVIEWPORTONLY
Definition: sced.h:51
char kpRedisplayControl
Definition: sced.h:312
struct ka * kvFineViewport
Definition: sced.h:148
struct ka * kvLargeCoarseViewport
Definition: sced.h:151
void InitFineWindow(long X, long Y)
Definition: init.c:293
long X
Definition: actions.c:450
struct kp Parameters
Definition: init.c:19
struct ka * kvCoarseViewport
Definition: sced.h:150
struct ka * kvFineWindow
Definition: sced.h:147
double kaHeight
Definition: sced.h:114
#define FULLSCREEN
Definition: sced.h:49
#define And
Definition: cdmacs.h:14
double kaWidth
Definition: sced.h:114
void InitCoarseWindow(long X, long Y, long Width)
Definition: init.c:265
long Y
Definition: actions.c:450
long kaX
Definition: sced.h:113
void SetTransform ( )
char SetXform ( )
void ShowCommandMenu ( )

Definition at line 121 of file viewport.c.

123 {
124  if (Parameters.kpMenu == BASICMENU) {
126  return;
127  }
130  return;
131  }
132 }
#define BASICMENU
Definition: sced.h:56
void ShowMenu(MENU *Menu)
Definition: viewport.c:136
char kpMenu
Definition: sced.h:319
struct kp Parameters
Definition: init.c:19
#define AMBIGUITYMENU
Definition: sced.h:57
MENU AmbiguityMenu[DefMenuSize]
Definition: scedintr.c:51
MENU * BasicMenu
Definition: scedintr.c:49
void ShowCurrentObject ( )
void ShowEmptyBox ( )
void ShowFineViewport ( )

Definition at line 610 of file viewport.c.

612 {
616  }
617  else {
622  /* Show fine positioning window in coarse window. */
624  /* Redisplay in magnifying glass. */
628  }
629  DevUpdate();
630 }
void Redisplay()
#define SPLITSCREEN
Definition: sced.h:48
struct ka * kvCoarseWindow
Definition: sced.h:149
long kaRight
Definition: sced.h:112
#define FBEraseBox(L, B, R, T)
Definition: scedmacs.h:65
long kaBottom
Definition: sced.h:112
#define COARSEVIEWPORTONLY
Definition: sced.h:51
void EraseLargeCoarseViewport()
Definition: viewport.c:583
char kpRedisplayControl
Definition: sced.h:312
struct ka * kvFineViewport
Definition: sced.h:148
#define FINEVIEWPORTONLY
Definition: sced.h:50
struct kp Parameters
Definition: init.c:19
long kaTop
Definition: sced.h:112
void ShowEmptyBox()
struct ka * kvFineWindow
Definition: sced.h:147
struct kv * View
Definition: init.c:17
long kaLeft
Definition: sced.h:112
void DevUpdate()
Definition: display.c:359
#define HighlightingColor
Definition: sced.h:74
void ShowFull ( )

Definition at line 907 of file bascmd.c.

909 {
911  SaveLastView();
913  CenterFullView();
916 }
void Redisplay()
struct ka * kvCoarseWindow
Definition: sced.h:149
void CenterFullView()
Definition: init.c:466
void EraseLargeCoarseViewport()
Definition: viewport.c:583
char * MenuVIEW
Definition: scedintr.c:110
void MenuDeselect()
struct kv * View
Definition: init.c:17
void SaveLastView()
Definition: display.c:297
void MenuSelect()
void ShowGhost ( )
void ShowGrid ( )

Definition at line 18 of file gridline.c.

20 {
21  /*
22  * Show grid for Window within AOI.
23  * Window maps to Viewport.
24  */
25  long YInL,XInL;
26  long XInP,YInP;
27  long Left,Top,Right,Bottom;
28  long Step;
29 
31  return;
32 
34  DevSetLinestyle(1);
35 
36  /*
37  *
38  * The grid is computed relative to (0,0).
39  *
40  */
41  Step = Parameters.kpGrid*5;
42 
43  if (
47  And
50 
51  Top = View->kvCoarseWindow->kaTop -
52  (View->kvCoarseWindow->kaTop % Step);
53 
54  if (View->kvCoarseWindow->kaTop >= 0)
55  Top += Step;
56 
57  Bottom = View->kvCoarseWindow->kaBottom;
58 
59  Left = View->kvCoarseWindow->kaLeft -
60  (View->kvCoarseWindow->kaLeft % Step);
61 
62  if (View->kvCoarseWindow->kaLeft < 0)
63  Left -= Step;
64 
65  Right = View->kvCoarseWindow->kaRight;
66 
67  if (Parameters.kpGridLineStyle == 0) {
68 
69  /* point grid */
70  for (YInL = Top; YInL >= Bottom; YInL -= Parameters.kpGrid) {
71  YInP = .5+(YInL - View->kvCoarseWindow->kaBottom)*
73  YInP += View->kvCoarseViewport->kaBottom;
74  if (YInP < CurrentAOI.aBC) break;
75  if (YInP > CurrentAOI.aTC) continue;
76  for (XInL = Left; XInL <= Right; XInL += Parameters.kpGrid) {
77  XInP = .5+(XInL - View->kvCoarseWindow->kaLeft)*
79  XInP += View->kvCoarseViewport->kaLeft;
80  if (XInP > CurrentAOI.aRC) break;
81  if (XInP < CurrentAOI.aLC) continue;
82  if ((Top-YInL) % Step == 0 || (XInL-Left) % Step == 0)
84  else
86 
87  DevPixel((int)XInP,(int)YInP);
88  }
89  }
90  }
91  else {
92 
93  /* Horizontal grid lines */
94  for (YInL = Top; YInL >= Bottom; YInL -= Parameters.kpGrid) {
95 
96  YInP = .5+(YInL - View->kvCoarseWindow->kaBottom)*
98  YInP += View->kvCoarseViewport->kaBottom;
99  if (YInP < CurrentAOI.aBC) break;
100  if (YInP > CurrentAOI.aTC) continue;
101 
102  if ((Top-YInL) % Step == 0)
104  else
106 
107  DevLine((int)CurrentAOI.aLC,(int)YInP,
108  (int)CurrentAOI.aRC,(int)YInP);
109 
110  }
111 
112  /* Vertical grid lines */
113  for (XInL = Left; XInL <= Right; XInL += Parameters.kpGrid) {
114 
115  XInP = .5+(XInL - View->kvCoarseWindow->kaLeft)*
117  XInP += View->kvCoarseViewport->kaLeft;
118  if (XInP > CurrentAOI.aRC) break;
119  if (XInP < CurrentAOI.aLC) continue;
120 
121  if ((XInL-Left) % Step == 0)
123  else
125 
126  DevLine((int)XInP,(int)CurrentAOI.aBC,
127  (int)XInP,(int)CurrentAOI.aTC);
128 
129  }
130  }
131  }
132 
136 
137 
138  Top = View->kvFineWindow->kaTop -
139  (View->kvFineWindow->kaTop % Step);
140 
141  if (View->kvFineWindow->kaTop >= 0)
142  Top += Step;
143 
144  Bottom = View->kvFineWindow->kaBottom;
145 
146  Left = View->kvFineWindow->kaLeft -
147  (View->kvFineWindow->kaLeft % Step);
148 
149  if (View->kvFineWindow->kaLeft < 0)
150  Left -= Step;
151 
152  Right = View->kvFineWindow->kaRight;
153 
154  if (Parameters.kpGridLineStyle == 0) {
155 
156  /* point grid */
157  for (YInL = Top; YInL >= Bottom; YInL -= Parameters.kpGrid) {
158  YInP = .5+(YInL - View->kvFineWindow->kaBottom)*
159  View->kvFineRatio;
160  YInP += View->kvFineViewport->kaBottom;
161  if (YInP < CurrentAOI.aBF) break;
162  if (YInP > CurrentAOI.aTF) continue;
163  for (XInL = Left; XInL <= Right; XInL += Parameters.kpGrid) {
164  XInP = .5+(XInL - View->kvFineWindow->kaLeft)*
165  View->kvFineRatio;
166  XInP += View->kvFineViewport->kaLeft;
167  if (XInP > CurrentAOI.aRF) break;
168  if (XInP < CurrentAOI.aLF) continue;
169  if ((Top-YInL) % Step == 0 || (XInL-Left) % Step == 0)
171  else
173 
174  DevPixel((int)XInP,(int)YInP);
175  }
176  }
177  }
178  else {
179  /* Horizontal grid lines */
180  for (YInL = Top; YInL >= Bottom; YInL -= Parameters.kpGrid) {
181 
182  YInP = .5+(YInL - View->kvFineWindow->kaBottom)*
183  View->kvFineRatio;
184  YInP += View->kvFineViewport->kaBottom;
185  if (YInP < CurrentAOI.aBF) break;
186  if (YInP > CurrentAOI.aTF) continue;
187 
188  if ((Top-YInL) % Step == 0)
190  else
192  DevLine((int)CurrentAOI.aLF,(int)YInP,
193  (int)CurrentAOI.aRF,(int)YInP);
194  }
195 
196  /* Vertical grid lines */
197  for (XInL = Left; XInL <= Right; XInL += Parameters.kpGrid){
198 
199  XInP = .5+(XInL - View->kvFineWindow->kaLeft)*
200  View->kvFineRatio;
201  XInP += View->kvFineViewport->kaLeft;
202  if (XInP > CurrentAOI.aRF) break;
203  if (XInP < CurrentAOI.aLF) continue;
204 
205  if ((XInL-Left) % Step == 0)
207  else
209  DevLine((int)XInP,(int)CurrentAOI.aBF,
210  (int)XInP,(int)CurrentAOI.aTF);
211  }
212  }
213  }
214  DevSetLinestyle(0);
215 }
long aTF
Definition: sced.h:121
int kpPointingThreshold
Definition: sced.h:279
#define Or
Definition: cdmacs.h:15
struct ka * kvCoarseWindow
Definition: sced.h:149
long kaRight
Definition: sced.h:112
double kvFineRatio
Definition: sced.h:154
void DevSetColor()
if(TDesc==NULL)
Definition: cd.c:1326
long kaBottom
Definition: sced.h:112
double kvCoarseRatio
Definition: sced.h:155
#define COARSEVIEWPORTONLY
Definition: sced.h:51
long aBF
Definition: sced.h:121
#define CoarseGridColor
Definition: sced.h:82
long aTC
Definition: sced.h:122
#define FineGridColor
Definition: sced.h:83
void DevSetLinestyle()
void DevDefineLinestyle()
int kpGridDisplayed
Definition: sced.h:240
char kpRedisplayControl
Definition: sced.h:312
long aLC
Definition: sced.h:122
struct a CurrentAOI
Definition: init.c:22
struct ka * kvFineViewport
Definition: sced.h:148
struct ka * kvLargeCoarseViewport
Definition: sced.h:151
#define FINEVIEWPORTONLY
Definition: sced.h:50
int kpGridLineStyle
Definition: sced.h:237
long * Left
Definition: cd.c:1907
long aLF
Definition: sced.h:121
int kpShowGridInLargeViewport
Definition: sced.h:246
struct ka * kvCoarseViewport
Definition: sced.h:150
struct kp Parameters
Definition: init.c:19
int aInFine
Definition: sced.h:123
long kaTop
Definition: sced.h:112
long * Top
Definition: cd.c:1907
long * Right
Definition: cd.c:1907
struct ka * kvFineWindow
Definition: sced.h:147
void DevPixel()
void DevLine()
long aRC
Definition: sced.h:122
struct kv * View
Definition: init.c:17
long kaLeft
Definition: sced.h:112
long * Bottom
Definition: cd.c:1907
long aBC
Definition: sced.h:122
#define And
Definition: cdmacs.h:14
long kpGrid
Definition: sced.h:234
long aRF
Definition: sced.h:121
int aInCoarse
Definition: sced.h:124
void ShowLabel ( )
void ShowLine ( )
void ShowManhattanLine ( )
void ShowMarker ( )
void ShowMenu ( )
void ShowMutual ( )
void ShowNewInstance ( )
void ShowOutput ( )
void ShowPath ( )
void ShowPolygon ( )
void ShowProcess ( )
void ShowPrompt ( )
void ShowPromptAndWait ( )
void ShowPromptWithColor ( )
void ShowProperties ( )
void ShowRGB ( )

Definition at line 481 of file bascmd.c.

483 {
484  int r,g,b;
485 
489 
492 
493  sprintf(TypeOut," (%d,%d,%d)",r,g,b);
494 
497 }
#define PromptTextColor
Definition: sced.h:80
void DevSetColor()
#define ERASE
Definition: scedmacs.h:11
#define gi_numtextcols
Definition: scedmacs.h:61
int kpColor
Definition: sced.h:252
struct kl * ColorTable
Definition: init.c:20
int klR
Definition: sced.h:95
#define ROW_COLUMN
Definition: scedmacs.h:15
char TypeOut[200]
Definition: init.c:23
struct kp Parameters
Definition: init.c:19
void OutlineText()
int klB
Definition: sced.h:95
Definition: cddefs.h:162
void FBText()
int klG
Definition: sced.h:95
Definition: cddefs.h:227
#define gi_numtextrows
Definition: scedmacs.h:60
#define FILL
Definition: scedmacs.h:13
int kpLastCursorColumn
Definition: sced.h:293
void ShowStretch ( )
void ShowTerminals ( )

Definition at line 1710 of file netlist.c.

1713 {
1714 
1719  }
1720  else {
1724  }
1725 }
#define ERASE
Definition: scedmacs.h:11
void DisplayTerminals(int DisplayOrErase)
Definition: netlist.c:1729
void MenuDeselect()
struct kp Parameters
Definition: init.c:19
#define True
Definition: scedstub.c:16
int kpShowTerminals
Definition: sced.h:255
#define DISPLAY
Definition: scedmacs.h:12
char * MenuTERMS
Definition: scedintr.c:107
#define False
Definition: scedstub.c:15
void MenuSelect()
void ShowTransformed ( )
void ShowWire ( )
struct line* SpiceList ( )
void SQClear ( )

Definition at line 690 of file choose.c.

693 {
694  struct ks *SQDesc,*SQNext;
695 
696  for (SQDesc = SelectQHead; SQDesc; SQDesc = SQNext) {
697  SQNext = SQDesc->ksSucc;
698  SQDesc->ksPointer->oInfo = SQ_OLD;
699  tfree(SQDesc);
700  }
701  SelectQHead = NULL;
702 }
#define SQ_OLD
Definition: sced.h:341
struct o * ksPointer
Definition: sced.h:335
#define tfree(x)
Definition: cdmacs.h:22
struct ks * ksSucc
Definition: sced.h:334
#define NULL
Definition: spdefs.h:121
struct ks * SelectQHead
Definition: scedext.h:64
Definition: sced.h:333
short oInfo
Definition: cddefs.h:147
void SQComputeBB ( )

Definition at line 749 of file choose.c.

752 {
753  struct ks *SQDesc;
754  struct ka BB;
755  int Info;
756 
761 
762  for (SQDesc = SelectQHead; SQDesc != NULL; SQDesc = SQDesc->ksSucc) {
763  Info = SQDesc->ksPointer->oInfo;
764  if (Info == SQ_OLDSEL || Info == SQ_NEWSEL ||
765  (Info > 10 && Info <= 255)) {
766  get_BB(SQDesc->ksPointer,&BB);
767  UpdateBB(SelectQBB,BB);
768  }
769  }
770 }
long kaRight
Definition: sced.h:112
#define CDINFINITY
Definition: cddefs.h:70
struct o * ksPointer
Definition: sced.h:335
long kaBottom
Definition: sced.h:112
Definition: sced.h:111
static void get_BB()
struct ks * ksSucc
Definition: sced.h:334
#define NULL
Definition: spdefs.h:121
long kaTop
Definition: sced.h:112
#define UpdateBB(BB2, BB1)
Definition: choose.c:165
long kaLeft
Definition: sced.h:112
struct ks * SelectQHead
Definition: scedext.h:64
Definition: sced.h:333
#define SQ_NEWSEL
Definition: sced.h:353
short oInfo
Definition: cddefs.h:147
struct ka SelectQBB
Definition: scedext.h:65
#define SQ_OLDSEL
Definition: sced.h:344
void SQDelete ( )
void SQDesel ( )
void SQInit ( )

Definition at line 682 of file choose.c.

684 {
685  SelectQHead = NULL;
686 }
#define NULL
Definition: spdefs.h:121
struct ks * SelectQHead
Definition: scedext.h:64
void SQInsert ( )
void SQRestore ( )
void SQShow ( )

Definition at line 940 of file choose.c.

943 {
944  struct ks *SQDesc;
945  int Info;
946 
948  for (SQDesc = SelectQHead; SQDesc; SQDesc = SQDesc->ksSucc) {
949  Info = SQDesc->ksPointer->oInfo;
950  /* Test for user interrupt */
953  return;
954  }
955  if (Info == SQ_OLDSEL || Info == SQ_NEWSEL ||
956  (Info > 10 && Info <= 255)) {
957  /* Show Selected Objects */
959  }
960  }
961 }
struct o * ksPointer
Definition: sced.h:335
#define Not
Definition: cdmacs.h:16
struct ks * ksSucc
Definition: sced.h:334
struct kp Parameters
Definition: init.c:19
void RedisplayAfterInterrupt()
Definition: display.c:623
static void sq_display_selected()
struct ks * SelectQHead
Definition: scedext.h:64
int kpEnableSelectQRedisplay
Definition: sced.h:249
Definition: sced.h:333
#define SQ_NEWSEL
Definition: sced.h:353
short oInfo
Definition: cddefs.h:147
#define SQ_OLDSEL
Definition: sced.h:344
int kpSIGINTERRUPT
Definition: sced.h:267
void StretchPath ( )
void strtolower ( )
void Subcircuit ( )
int TCheck ( )

Definition at line 634 of file display.c.

636 {
637  char *TypeIn;
638 
639  if (TFull()) {
640  ShowPrompt("Cell hierarchy is too deep. MORE");
641  (void)FBGetchar(ERASE);
642  ShowPrompt("Probably you have a recursive hierarchy.");
643  TInit();
644  return (True);
645  }
646  return (False);
647 }
#define ERASE
Definition: scedmacs.h:11
int TFull()
Definition: xforms.c:47
void TInit()
Definition: xforms.c:23
#define True
Definition: scedstub.c:16
short FBGetchar()
#define False
Definition: scedstub.c:15
void ShowPrompt(char *str)
Definition: scedstub.c:71
void TitleWindow ( )

Definition at line 704 of file bascmd.c.

706 {
707  char Title[80];
708 
709  sprintf(Title,"Circuit: %s",Parameters.kpCellName);
710  DevTitle(Title,"sced");
711 }
char * kpCellName
Definition: sced.h:210
struct kp Parameters
Definition: init.c:19
void DevTitle()
char* tmalloc ( )
void TransformReferencePoint ( )
void TransformReferences ( )
void Undo ( )

Definition at line 43 of file bascmd.c.

45 {
47  ShowPrompt("Sorry, but it's too late.");
49 }
char * MenuUNDO
Definition: objects.c:115
void MenuDeselect()
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
void UndoReferenceTransform ( )

Definition at line 1876 of file netlist.c.

1878 {
1879  struct prpty *PDesc;
1880 
1881  PDesc = Parameters.kpCellDesc->sPrptyList;
1882  for (; PDesc; PDesc = PDesc->prpty_Succ) {
1883  if (PDesc->prpty_Value != P_NODE) continue;
1884  if (PDesc->prpty_Info == NULL) continue;
1885  free(PDesc->prpty_Data);
1886  PDesc->prpty_Data = (union prp_data*)PDesc->prpty_Info;
1887  PDesc->prpty_Info = NULL;
1888  }
1889 }
struct prpty * sPrptyList
Definition: cddefs.h:133
int prpty_Value
Definition: cdprpty.h:67
char * prpty_Info
Definition: cdprpty.h:64
struct s * kpCellDesc
Definition: sced.h:207
#define P_NODE
Definition: cdprpty.h:12
union prp_data * prpty_Data
Definition: cdprpty.h:65
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
struct prpty * prpty_Succ
Definition: cdprpty.h:66
Definition: cdprpty.h:62
void free()
void UpdateDeviceName ( )
void UpdateParent ( )
void UpdateProperties ( )
void UpdatePropertyString ( )
void UpdateSCED ( )

Definition at line 570 of file init.c.

572 {
573  FILE *fp;
574  int i;
575  char *c;
576  extern char *MenuUPDAT;
577 
578  MenuSelect(MenuUPDAT);
579  fp = fopen(INIT_FILE,"w");
580  if (fp == NULL) {
581  ShowPrompt("Can't open file.");
582  return;
583  }
584  fprintf(fp,"SCED init file\n");
585  for (i = 0; i < 16; i++) {
586  fprintf(fp,"%d %3d %3d %3d\n",i,
587  ColorTable[i].klR,ColorTable[i].klG,ColorTable[i].klB);
588  }
589  fprintf(fp,"%d %d %d %d\n",Parameters.kpGridDisplayed,
593  c = PGetPath();
594  if (c && *c)
595  fprintf(fp,"%s\n",c);
596  fclose(fp);
597  ShowPrompt("Init file has been saved.");
598  MenuDeselect(MenuUPDAT);
599 }
#define INIT_FILE
Definition: sced.h:25
int kpGridDisplayed
Definition: sced.h:240
int kpGridLineStyle
Definition: sced.h:237
struct kp Parameters
Definition: init.c:19
void MenuDeselect()
int kpShowGridInLargeViewport
Definition: sced.h:246
#define NULL
Definition: spdefs.h:121
char * MenuUPDAT
Definition: scedintr.c:109
static double c
Definition: vectors.c:16
struct kl * ColorTable
Definition: init.c:20
int kpGridOnTop
Definition: sced.h:243
char * PGetPath()
Definition: paths.c:67
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
void Windo ( )
void Wires ( )
void WriteCell ( )

Definition at line 740 of file bascmd.c.

742 {
743  struct prpty *PDesc;
744  char *TypeIn,NewName[128],*t;
745  FILE *fp;
746 
748  if (Parameters.kpCellName[0] == '\0') {
749  ShowPrompt("There isn't anything to write.");
751  return;
752  }
753  ShowPrompt("Circuit name?");
754  TypeIn = FBEdit(Parameters.kpCellName);
755  if (TypeIn == NULL Or *TypeIn == '\0' Or *TypeIn == '\n') {
757  ErasePrompt();
758  return;
759  }
760  t = NewName;
761  while (isspace(*TypeIn)) TypeIn++;
762  if (*TypeIn == '\0') {
764  ErasePrompt();
765  return;
766  }
767  while (*TypeIn && !isspace(*TypeIn))
768  *t++ = *TypeIn++;
769  *t = '\0';
770 
771  ShowPrompt("Writing circuit. Please wait.");
772 
773  if (strcmp(Parameters.kpCellName,NewName)) {
774  /* new name given */
775  TypeIn = Parameters.kpCellDesc->sName;
776  Parameters.kpCellDesc->sName = NewName;
777 
778  /* change the subcircuit's reference name */
780  for (; PDesc; PDesc = PDesc->prpty_Succ)
781  if (PDesc->prpty_Value == P_NAME) break;
782  if (PDesc && PDesc->prpty_Data->p_name.subname) {
783  t = PDesc->prpty_Data->p_name.subname;
784  PDesc->prpty_Data->p_name.subname = NewName;
785  }
786 
787  if (Not CDUpdate(Parameters.kpCellDesc,NewName)) {
788  ShowPrompt("Can't save circuit.");
790  Parameters.kpCellDesc->sName = TypeIn;
791  return;
792  }
793  if (PDesc && PDesc->prpty_Data->p_name.subname) {
794  PDesc->prpty_Data->p_name.subname = t;
795  }
797  Parameters.kpCellDesc->sName = TypeIn;
799  fp = POpen(NewName,"a",(char **)NULL);
800  if (fp) {
801  DumpSpiceFile(fp);
802  fclose(fp);
803  }
804  }
805  UpdateParent(NewName);
806  ShowPrompt("New circuit has been saved.");
807  }
808  else {
809  if (Not CDUpdate(Parameters.kpCellDesc,(char *)NULL)) {
810  ShowPrompt("Can't save circuit.");
812  return;
813  }
815  fp = POpen(Parameters.kpCellName,"a",(char **)NULL);
816  if (fp) {
817  DumpSpiceFile(fp);
818  fclose(fp);
819  }
820  }
821  ShowPrompt("Current circuit has been saved.");
824  MallocFailed();
825  }
827 }
struct prpty * sPrptyList
Definition: cddefs.h:133
void ErasePrompt()
Definition: viewport.c:538
void UpdateParent()
#define Or
Definition: cdmacs.h:15
int prpty_Value
Definition: cdprpty.h:67
int kpModified
Definition: sced.h:261
int CDUpdate()
#define Not
Definition: cdmacs.h:16
struct s * kpCellDesc
Definition: sced.h:207
char * kpCellName
Definition: sced.h:210
struct s * kpTopDesc
Definition: sced.h:213
union prp_data * prpty_Data
Definition: cdprpty.h:65
void MallocFailed()
Definition: scedintr.c:857
void MenuDeselect()
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
char * subname
Definition: cdprpty.h:48
void DumpSpiceFile()
char * MenuSAVE
Definition: scedintr.c:102
#define P_NAME
Definition: cdprpty.h:13
int CDReflect()
struct prpty * prpty_Succ
Definition: cdprpty.h:66
char * FBEdit()
#define False
Definition: scedstub.c:15
struct prp_name p_name
Definition: cdprpty.h:55
char * sName
Definition: cddefs.h:122
FILE * POpen()
Definition: cddefs.h:192
void MenuSelect()
Definition: cdprpty.h:62
void ShowPrompt(char *str)
Definition: scedstub.c:71
void Zoom ( )

Variable Documentation

MENU AmbiguityMenu[DefMenuSize]

Definition at line 51 of file scedintr.c.

MENU* BasicMenu

Definition at line 49 of file scedintr.c.

struct kl* ColorTable

Definition at line 20 of file init.c.

struct a CurrentAOI

Definition at line 22 of file init.c.

MENU* DeviceMenu

Definition at line 50 of file scedintr.c.

int IplotStatusChanged

Definition at line 23 of file grafintr.c.

struct ka MenuViewport

Definition at line 18 of file init.c.

struct kp Parameters

Definition at line 19 of file init.c.

struct kc SCursor

Definition at line 21 of file init.c.

struct ka SelectQBB

Definition at line 65 of file scedext.h.

struct ks* SelectQHead

Definition at line 64 of file scedext.h.

char TypeOut[200]

Definition at line 23 of file init.c.

struct kv* View

Definition at line 17 of file init.c.