a. Slight enhancement
b. Maintainer ship dropped (e-mail bounce) Submitted by: Pedro F. Giffuni <giffunip@yahoo.com>
This commit is contained in:
parent
9f0b011a8c
commit
a614d66ba8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=80131
@ -13,14 +13,12 @@ MASTER_SITES= ftp://ic.eecs.berkeley.edu/pub/Spice3/
|
||||
DISTNAME= sp3f4.kit
|
||||
EXTRACT_SUFX= .tar.Z
|
||||
|
||||
MAINTAINER= kaveman@magna.com.au
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= A general-purpose circuit simulation program
|
||||
|
||||
# documentation in ftp://ic.eecs.berkeley.edu/pub/Spice3/um.3f3.ps
|
||||
|
||||
# These are included as patch-ab
|
||||
#PATCH_SITES= ftp://ilpsoft.eecs.berkeley.edu/pub/SPICE3F5/
|
||||
#PATCHFILES= grid.patch newcoms.patch spsmp.patch
|
||||
# documentation in ftp://ic.eecs.berkeley.edu/pub/Spice3/um.3f3.ps/
|
||||
#PATCH_SITES= http://www.elec.mq.edu.au//cnerf/spice/
|
||||
#PATCHFILES= patches.tar.Z
|
||||
|
||||
USE_XLIB= yes
|
||||
NO_WRKSUBDIR= yes
|
||||
|
@ -3,7 +3,6 @@
|
||||
MAKE = /usr/bin/make
|
||||
INTERFACE_OPTS = -DWANT_X11
|
||||
CC = cc
|
||||
CC_OPT = -O2 -pipe
|
||||
CC_OPT_SAFE = -O2 -fno-strength-reduce -pipe
|
||||
CC_OPT_SAFE += -O2
|
||||
LDFLAGS = -L$(X11BASE)/lib -lm -ltermcap
|
||||
SYS_CFLAGS = -Dbsd
|
||||
|
@ -65,7 +65,7 @@
|
||||
|
||||
# CC_OPT: Default compile options (optimization/debug level, other)
|
||||
|
||||
! CC_OPT = -O -Os
|
||||
! CC_OPT += -Os -pipe
|
||||
|
||||
# CC_OPT_SAFE: Special compile options to override CC_OPT for code
|
||||
# which typically causes problems for most compilers (bsim1 and bsim2).
|
||||
|
@ -1,191 +1,192 @@
|
||||
--- src/bin/main.c.orig Thu Jul 29 01:48:32 1993
|
||||
+++ src/bin/main.c Mon Mar 8 12:00:35 1999
|
||||
@@ -25,6 +25,13 @@
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAS_GNUREADLINE
|
||||
+/* Added GNU Readline Support 11/3/97 -- Andrew Veliath <veliaa@rpi.edu> */
|
||||
+#include <readline/readline.h>
|
||||
+#include <readline/history.h>
|
||||
+#include "fteinput.h"
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAS_UNIX_SIGS
|
||||
#include <signal.h>
|
||||
#endif
|
||||
@@ -36,6 +43,11 @@
|
||||
#endif
|
||||
|
||||
#include "patchlev.h"
|
||||
+
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <floatingpoint.h>
|
||||
+#endif
|
||||
+
|
||||
#include "suffix.h"
|
||||
|
||||
int Patch_Level = PATCHLEVEL;
|
||||
@@ -49,6 +61,11 @@
|
||||
bool ft_intrpt = false; /* Set by the (void) signal handlers. */
|
||||
bool ft_setflag = false; /* Don't abort after an interrupt. */
|
||||
|
||||
+#ifdef HAS_GNUREADLINE
|
||||
+char gnu_history_file[512];
|
||||
+static char *application_name;
|
||||
+#endif
|
||||
+
|
||||
struct variable *(*if_getparam)( );
|
||||
|
||||
#ifdef BATCH
|
||||
@@ -181,6 +198,89 @@
|
||||
|
||||
#endif
|
||||
|
||||
+#ifdef HAS_GNUREADLINE
|
||||
+/* Adapted ../lib/cp/lexical.c:prompt() for GNU Readline -- Andrew Veliath <veliaa@rpi.edu> */
|
||||
+static char *
|
||||
+prompt()
|
||||
+{
|
||||
+ static char pbuf[128];
|
||||
+ char *p = pbuf, *s;
|
||||
+
|
||||
+ if (cp_interactive == false)
|
||||
+ return;
|
||||
+ if (cp_promptstring == NULL)
|
||||
+ s = "-> ";
|
||||
+ else
|
||||
+ s = cp_promptstring;
|
||||
+ if (cp_altprompt)
|
||||
+ s = cp_altprompt;
|
||||
+ while (*s) {
|
||||
+ switch (strip(*s)) {
|
||||
+ case '!':
|
||||
+ p += sprintf(p, "%d", where_history() + 1);
|
||||
+ break;
|
||||
+ case '\\':
|
||||
+ if (*(s + 1))
|
||||
+ p += sprintf(p, "%c", strip(*++s));
|
||||
+ default:
|
||||
+ *p = strip(*s); ++p;
|
||||
+ break;
|
||||
+ }
|
||||
+ s++;
|
||||
+ }
|
||||
+ *p = 0;
|
||||
+ return pbuf;
|
||||
+}
|
||||
+
|
||||
+/* Process device events in Readline's hook since there is no where
|
||||
+ else to do it now - AV */
|
||||
+int rl_event_func()
|
||||
+{
|
||||
+ static REQUEST reqst = { checkup_option, 0 };
|
||||
+ Input(&reqst, NULL);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* Added GNU Readline Support -- Andrew Veliath <veliaa@rpi.edu> */
|
||||
+void app_rl_readlines()
|
||||
+{
|
||||
+ char *line, *expanded_line;
|
||||
+
|
||||
+ strcpy(gnu_history_file, getenv("HOME"));
|
||||
+ strcat(gnu_history_file, "/.");
|
||||
+ strcat(gnu_history_file, application_name);
|
||||
+ strcat(gnu_history_file, "_history");
|
||||
+
|
||||
+ using_history();
|
||||
+ read_history(gnu_history_file);
|
||||
+
|
||||
+ rl_readline_name = application_name;
|
||||
+ rl_instream = cp_in;
|
||||
+ rl_outstream = cp_out;
|
||||
+ rl_event_hook = rl_event_func;
|
||||
+
|
||||
+ while (1) {
|
||||
+ history_set_pos(history_length);
|
||||
+ line = readline(prompt());
|
||||
+ if (line && *line) {
|
||||
+ int s = history_expand(line, &expanded_line);
|
||||
+
|
||||
+ if (s == 2) {
|
||||
+ fprintf(stderr, "-> %s\n", expanded_line);
|
||||
+ } else if (s == -1) {
|
||||
+ fprintf(stderr, "readline: %s\n", expanded_line);
|
||||
+ } else {
|
||||
+ cp_evloop(expanded_line);
|
||||
+ add_history(expanded_line);
|
||||
+ }
|
||||
+ free(expanded_line);
|
||||
+ }
|
||||
+ if (line) free(line);
|
||||
+ }
|
||||
+ /* History gets written in ../fte/misccoms.c com_quit */
|
||||
+}
|
||||
+#endif /* HAS_GNUREADLINE */
|
||||
+
|
||||
char *hlp_filelist[] = { "spice", 0 };
|
||||
|
||||
void
|
||||
@@ -210,6 +310,10 @@
|
||||
|
||||
#endif
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ fpsetmask(fpgetmask() & ~FP_X_INV);
|
||||
+#endif
|
||||
+
|
||||
/* MFB tends to jump to 0 on errors. This tends to catch it. */
|
||||
if (started) {
|
||||
fprintf(cp_err, "main: Internal Error: jump to zero\n");
|
||||
@@ -217,6 +321,13 @@
|
||||
}
|
||||
started = true;
|
||||
|
||||
+#ifdef HAS_GNUREADLINE
|
||||
+ if (!(application_name = strrchr(av[0],'/')))
|
||||
+ application_name = av[0];
|
||||
+ else
|
||||
+ ++application_name;
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAS_MAC_ARGCARGV
|
||||
ac = initmac(&av);
|
||||
#endif
|
||||
@@ -393,7 +504,11 @@
|
||||
# ifdef HAS_UNIX_SIGS
|
||||
/* Set up (void) signal handling */
|
||||
if (!ft_batchmode) {
|
||||
+# ifdef HAS_GNUREADLINE
|
||||
+ (void) signal(SIGINT, SIG_IGN);
|
||||
+# else
|
||||
(void) signal(SIGINT, ft_sigintr);
|
||||
+# endif
|
||||
(void) signal(SIGFPE, sigfloat);
|
||||
# ifdef SIGTSTP
|
||||
(void) signal(SIGTSTP, sigstop);
|
||||
@@ -588,7 +703,11 @@
|
||||
} else {
|
||||
(void) setjmp(jbuf);
|
||||
cp_interactive = true;
|
||||
+#ifdef HAS_GNUREADLINE
|
||||
+ app_rl_readlines();
|
||||
+#else
|
||||
while (cp_evloop((char *) NULL) == 1) ;
|
||||
+#endif /* ifelse HAS_GNUREADLINE */
|
||||
}
|
||||
|
||||
# else /* if BATCH */
|
||||
@@ -627,7 +746,11 @@
|
||||
/* Nutmeg "main" */
|
||||
(void) setjmp(jbuf);
|
||||
cp_interactive = true;
|
||||
+#ifdef HAS_GNUREADLINE
|
||||
+ app_rl_readlines();
|
||||
+#else
|
||||
while (cp_evloop((char *) NULL) == 1) ;
|
||||
+#endif /* ifelse HAS_GNUREADLINE */
|
||||
|
||||
#endif
|
||||
|
||||
*** src/bin/main.c.orig Thu Jul 29 00:48:32 1993
|
||||
--- src/bin/main.c Fri Jan 31 15:59:00 2003
|
||||
***************
|
||||
*** 25,30 ****
|
||||
--- 25,37 ----
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
+ #ifdef HAS_GNUREADLINE
|
||||
+ /* Added GNU Readline Support 11/3/97 -- Andrew Veliath <veliaa@rpi.edu> */
|
||||
+ #include <readline/readline.h>
|
||||
+ #include <readline/history.h>
|
||||
+ #include "fteinput.h"
|
||||
+ #endif
|
||||
+
|
||||
#ifdef HAS_UNIX_SIGS
|
||||
#include <signal.h>
|
||||
#endif
|
||||
***************
|
||||
*** 36,41 ****
|
||||
--- 43,49 ----
|
||||
#endif
|
||||
|
||||
#include "patchlev.h"
|
||||
+
|
||||
#include "suffix.h"
|
||||
|
||||
int Patch_Level = PATCHLEVEL;
|
||||
***************
|
||||
*** 49,54 ****
|
||||
--- 57,67 ----
|
||||
bool ft_intrpt = false; /* Set by the (void) signal handlers. */
|
||||
bool ft_setflag = false; /* Don't abort after an interrupt. */
|
||||
|
||||
+ #ifdef HAS_GNUREADLINE
|
||||
+ char gnu_history_file[512];
|
||||
+ static char *application_name;
|
||||
+ #endif
|
||||
+
|
||||
struct variable *(*if_getparam)( );
|
||||
|
||||
#ifdef BATCH
|
||||
***************
|
||||
*** 181,186 ****
|
||||
--- 194,282 ----
|
||||
|
||||
#endif
|
||||
|
||||
+ #ifdef HAS_GNUREADLINE
|
||||
+ /* Adapted ../lib/cp/lexical.c:prompt() for GNU Readline -- Andrew Veliath <veliaa@rpi.edu> */
|
||||
+ static char *
|
||||
+ prompt()
|
||||
+ {
|
||||
+ static char pbuf[128];
|
||||
+ char *p = pbuf, *s;
|
||||
+
|
||||
+ if (cp_interactive == false)
|
||||
+ return;
|
||||
+ if (cp_promptstring == NULL)
|
||||
+ s = "-> ";
|
||||
+ else
|
||||
+ s = cp_promptstring;
|
||||
+ if (cp_altprompt)
|
||||
+ s = cp_altprompt;
|
||||
+ while (*s) {
|
||||
+ switch (strip(*s)) {
|
||||
+ case '!':
|
||||
+ p += sprintf(p, "%d", where_history() + 1);
|
||||
+ break;
|
||||
+ case '\\':
|
||||
+ if (*(s + 1))
|
||||
+ p += sprintf(p, "%c", strip(*++s));
|
||||
+ default:
|
||||
+ *p = strip(*s); ++p;
|
||||
+ break;
|
||||
+ }
|
||||
+ s++;
|
||||
+ }
|
||||
+ *p = 0;
|
||||
+ return pbuf;
|
||||
+ }
|
||||
+
|
||||
+ /* Process device events in Readline's hook since there is no where
|
||||
+ else to do it now - AV */
|
||||
+ int rl_event_func()
|
||||
+ {
|
||||
+ static REQUEST reqst = { checkup_option, 0 };
|
||||
+ Input(&reqst, NULL);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Added GNU Readline Support -- Andrew Veliath <veliaa@rpi.edu> */
|
||||
+ void app_rl_readlines()
|
||||
+ {
|
||||
+ char *line, *expanded_line;
|
||||
+
|
||||
+ strcpy(gnu_history_file, getenv("HOME"));
|
||||
+ strcat(gnu_history_file, "/.");
|
||||
+ strcat(gnu_history_file, application_name);
|
||||
+ strcat(gnu_history_file, "_history");
|
||||
+
|
||||
+ using_history();
|
||||
+ read_history(gnu_history_file);
|
||||
+
|
||||
+ rl_readline_name = application_name;
|
||||
+ rl_instream = cp_in;
|
||||
+ rl_outstream = cp_out;
|
||||
+ rl_event_hook = rl_event_func;
|
||||
+
|
||||
+ while (1) {
|
||||
+ history_set_pos(history_length);
|
||||
+ line = readline(prompt());
|
||||
+ if (line && *line) {
|
||||
+ int s = history_expand(line, &expanded_line);
|
||||
+
|
||||
+ if (s == 2) {
|
||||
+ fprintf(stderr, "-> %s\n", expanded_line);
|
||||
+ } else if (s == -1) {
|
||||
+ fprintf(stderr, "readline: %s\n", expanded_line);
|
||||
+ } else {
|
||||
+ cp_evloop(expanded_line);
|
||||
+ add_history(expanded_line);
|
||||
+ }
|
||||
+ free(expanded_line);
|
||||
+ }
|
||||
+ if (line) free(line);
|
||||
+ }
|
||||
+ /* History gets written in ../fte/misccoms.c com_quit */
|
||||
+ }
|
||||
+ #endif /* HAS_GNUREADLINE */
|
||||
+
|
||||
char *hlp_filelist[] = { "spice", 0 };
|
||||
|
||||
void
|
||||
***************
|
||||
*** 217,222 ****
|
||||
--- 313,325 ----
|
||||
}
|
||||
started = true;
|
||||
|
||||
+ #ifdef HAS_GNUREADLINE
|
||||
+ if (!(application_name = strrchr(av[0],'/')))
|
||||
+ application_name = av[0];
|
||||
+ else
|
||||
+ ++application_name;
|
||||
+ #endif
|
||||
+
|
||||
#ifdef HAS_MAC_ARGCARGV
|
||||
ac = initmac(&av);
|
||||
#endif
|
||||
***************
|
||||
*** 393,399 ****
|
||||
--- 496,506 ----
|
||||
# ifdef HAS_UNIX_SIGS
|
||||
/* Set up (void) signal handling */
|
||||
if (!ft_batchmode) {
|
||||
+ # ifdef HAS_GNUREADLINE
|
||||
+ (void) signal(SIGINT, SIG_IGN);
|
||||
+ # else
|
||||
(void) signal(SIGINT, ft_sigintr);
|
||||
+ # endif
|
||||
(void) signal(SIGFPE, sigfloat);
|
||||
# ifdef SIGTSTP
|
||||
(void) signal(SIGTSTP, sigstop);
|
||||
***************
|
||||
*** 588,594 ****
|
||||
--- 695,705 ----
|
||||
} else {
|
||||
(void) setjmp(jbuf);
|
||||
cp_interactive = true;
|
||||
+ #ifdef HAS_GNUREADLINE
|
||||
+ app_rl_readlines();
|
||||
+ #else
|
||||
while (cp_evloop((char *) NULL) == 1) ;
|
||||
+ #endif /* ifelse HAS_GNUREADLINE */
|
||||
}
|
||||
|
||||
# else /* if BATCH */
|
||||
***************
|
||||
*** 627,633 ****
|
||||
--- 738,748 ----
|
||||
/* Nutmeg "main" */
|
||||
(void) setjmp(jbuf);
|
||||
cp_interactive = true;
|
||||
+ #ifdef HAS_GNUREADLINE
|
||||
+ app_rl_readlines();
|
||||
+ #else
|
||||
while (cp_evloop((char *) NULL) == 1) ;
|
||||
+ #endif /* ifelse HAS_GNUREADLINE */
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,15 +1,4 @@
|
||||
*** spice3f4/conf/hpux Fri Jan 22 20:32:01 1993
|
||||
--- conf/hpux Mon Jun 27 15:10:31 1994
|
||||
***************
|
||||
*** 11,13 ****
|
||||
--- 11,17 ----
|
||||
|
||||
CFLAGS = -O
|
||||
RANLIB = echo
|
||||
+
|
||||
+ # for release 9.0 of HP-UX define HPUXR9 for os_hpux.h.
|
||||
+ #CC_OPT = -O -DHPUXR9
|
||||
+ #CFLAGS = -O -DHPUXR9
|
||||
Fix to mos6 model
|
||||
*** spice3f4/src/lib/dev/mos6/mos6itf.h Mon Sep 28 03:25:22 1992
|
||||
--- src/lib/dev/mos6/mos6itf.h Fri Jun 17 12:59:58 1994
|
||||
***************
|
||||
@ -36,21 +25,6 @@
|
||||
MOS6getic,
|
||||
MOS6ask,
|
||||
MOS6mAsk,
|
||||
*** spice3f4/src/include/os_hpux.h Sat Apr 24 19:09:53 1993
|
||||
--- src/include/os_hpux.h Mon Jun 27 15:02:02 1994
|
||||
***************
|
||||
*** 4,11 ****
|
||||
--- 4,13 ----
|
||||
|
||||
#include "os_sysv.h"
|
||||
|
||||
+ #ifndef HPUXR9 /* latter version does not need following definitions */
|
||||
#undef HAS_ATRIGH
|
||||
#define void int
|
||||
|
||||
#define HAS_NO_IEEE_LOGB
|
||||
+ #endif
|
||||
|
||||
*** spice3f4/src/include/patchlev.h Wed Jun 15 14:32:24 1994
|
||||
--- src/include/patchlev.h Wed Jun 22 08:34:07 1994
|
||||
***************
|
||||
|
Loading…
Reference in New Issue
Block a user