freebsd-ports/cad/spice/files/patch-src_lib_fte_where_c
Philip M. Gollucci 0ec10e2e24 -Clean some warnings by using string.h instead of strings.h
Applied several patches from this website:
http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/secD.html
specifically fixes for:
- Where command causes crashes
- Recognition of scale factors in arbitrary source
- Current Controlled Switch in subckt, parsing error
- Noise analysis bug
- Save segmentation faults
- BSIM1 model xpart parameter random
- Tran analysis default TSTEP

PR:             ports/143727
Submitted by:   "Pedro F. Giffuni" <giffunip@tutopia.com>
2010-02-11 19:40:33 +00:00

18 lines
514 B
Text

--- src/lib/fte/where.c.orig 2010-02-09 15:32:23.000000000 +0000
+++ src/lib/fte/where.c 2010-02-09 15:35:36.000000000 +0000
@@ -17,6 +17,15 @@
{
char *msg;
+ /*CDHW typing where with no current circuit caused crashes CDHW*/
+ if (!ft_curckt) {
+ fprintf(cp_err, "There is no current circuit\n");
+ return;
+ }
+ else if (ft_curckt->ci_ckt != "") {
+ fprintf(cp_err, "No unconverged node found.\n");
+ return;
+ }
msg = (*ft_sim->nonconvErr)((GENERIC *) (ft_curckt->ci_ckt), 0);
printf("%s", msg);