193 int i = 0, NumBasicMenu = 53;
196 if (BasicMenu ==
NULL)
199 memset(BasicMenu,0,NumBasicMenu*
sizeof(
MENU));
312 RETSIGTYPE (*sc_intr)();
313 RETSIGTYPE (*sc_float)();
337 sc_intr = signal(SIGINT,SIG_IGN);
338 sc_float = signal(SIGFPE,SIG_IGN);
352 if (BasicMenu ==
NULL)
360 signal(SIGINT,sc_intr);
361 signal(SIGFPE,sc_float);
370 signal(SIGINT,sc_intr);
371 signal(SIGFPE,sc_float);
382 int i, LookedAhead =
False;
405 ShowPrompt(
"You haven't selected a cell to edit.");
409 if (
SafeCmds(&LookedAhead))
continue;
413 if (i == -1)
continue;
525 static char Rcmd[64];
526 RETSIGTYPE (*intrpt)();
542 if (*TypeIn !=
'n' && *TypeIn !=
'N') {
549 (void)signal(SIGINT,intrpt);
578 strncpy(Rcmd,TypeIn,64);
586 ShowPrompt(
"Performing analysis, please wait.");
590 (void)signal(SIGINT,intrpt);
621 struct line *
d,*d0,*d1,*dn;
624 for (d = deck; d; d = dn) {
674 "Both parent and current circuit have changed. Quit anyway? (n): ";
676 TypeIn =
"Parent circuit has been modified. Quit anyway? (n): ";
678 TypeIn =
"Current circuit has been modified. Quit anyway? (n): ";
685 if (TypeIn !=
NULL And (TypeIn[0] ==
'Y' Or TypeIn[0] ==
'y')){
717 #ifdef HAVE_NO_FTRUNCATE 720 ftruncate(fileno(
cp_err),0);
734 (void)fgets(buf,8,fp);
736 if (buf[0] !=
'(')
return (
False);
737 if (buf[1] !=
'S')
return (
False);
738 if (buf[2] !=
'y')
return (
False);
739 if (buf[3] !=
'm')
return (
False);
740 if (buf[4] !=
'b')
return (
False);
741 if (buf[5] !=
'o')
return (
False);
742 if (buf[6] !=
'l')
return (
False);
776 sprintf(t,
"%s",v->va_string);
779 sprintf(t,
"%d",v->va_num);
782 sprintf(t,
"%lg",v->va_real);
788 sprintf(buf,
" %s",v->va_string);
791 sprintf(buf,
" %d",v->va_num);
794 sprintf(buf,
" %lg",v->va_real);
797 if (strlen(t) + strlen(buf) >= len)
832 return (v->va_string);
862 cp = mktemp(
"scXXXXXX");
864 fprintf(stderr,
"OUT OF MEMORY. SCED is DEAD!\n");
868 fprintf(stderr,
"\007Sorry. Couldn't save current circuit.\n");
870 fprintf(stderr,
"\007Current circuit saved in %s.\n",cp);
912 c =
tmalloc(strlen(
string) + strlen(buf) + 2);
913 sprintf(c,
"%s %s",
string,buf);
948 if (!cp || !strlen(cp)) {
1008 if (strlen(
TypeOut) + strlen(
string) < 200)
1049 if (prompt !=
NULL) {
1050 (void)fprintf(
cp_out,prompt);
1067 if (c ==
NULL || *c ==
'\0' || *c ==
'\n')
return (
NULL);
1097 ShowPrompt(
"Point to menu item for help (ESC to exit help).");
static char buf[MAXPROMPT]
MENU AmbiguityMenu[DefMenuSize]
#define FBEraseBox(L, B, R, T)
int SCEDline(char *string)
char * SCEDfgets(char *s, int n, FILE *fp, char *prompt)
static enum Active SCEDisActive
static char * PathFromFile
int SafeCmds(int *LookedAhead)
struct ka * kvLargeCoarseViewport
struct line * AllocateLine(char *string)
void ShowProcess(char *cp)
char * GetHardCopyDevice()
static RETSIGTYPE sced_interrupt()
wordlist * GetAnalysisFromDeck()
struct sSCEDitf * ft_sced
char * AllocateNewString(char *string, char *buf)
static void fix_spice_deck()
struct wordlist * wl_next
struct line * MakeSpiceDeck()
struct variable * va_next
void ShowPrompt(char *str)
void SetCDPath(char *Path)
static int do_spice_cmd()