summaryrefslogtreecommitdiff
path: root/cad/spice/patches/patch-ab
blob: 95786963ccf8099913b557b4e054c2be46a2cc70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
$NetBSD: patch-ab,v 1.2 1998/08/07 10:36:29 agc Exp $

NOTE: This are Berkeley patches for 3F4
*** src/lib/fte/grid.c.orig	Sun Apr 25 14:53:11 1993
--- src/lib/fte/grid.c	Sat Jan 29 10:47:59 1994
***************
*** 17,22 ****
--- 17,23 ----
  #include "suffix.h"
  
  #define RAD_TO_DEG	(180.0 / M_PI)
+ #define LABEL_CHARS	20
  
  static double *lingrid(), *loggrid();
  static void polargrid(), smithgrid();
***************
*** 225,231 ****
      int max;
      static double dd[2];
      int mult = 1;
!     char buf[16], *s;
      int slim, digits;
  
      if (axis == y_axis && graph->grid.ysized) {
--- 226,232 ----
      int max;
      static double dd[2];
      int mult = 1;
!     char buf[LABEL_CHARS], *s;
      int slim, digits;
  
      if (axis == y_axis && graph->grid.ysized) {
***************
*** 477,483 ****
  drawlingrid(graph, units, spacing, nsp, dst, lmt, hmt, onedec, mult, mag,
      digits, axis)
      GRAPH *graph;
!     char units[16];
      bool onedec;
      int nsp, spacing, mult;
      double hmt, lmt, dst;
--- 478,484 ----
  drawlingrid(graph, units, spacing, nsp, dst, lmt, hmt, onedec, mult, mag,
      digits, axis)
      GRAPH *graph;
!     char *units;
      bool onedec;
      int nsp, spacing, mult;
      double hmt, lmt, dst;
***************
*** 488,494 ****
  
      int i, j;
      double m, step;
!     char buf[16];
  
      /* i counts how many pixels we have drawn, and j counts which unit
       * we are at.
--- 489,495 ----
  
      int i, j;
      double m, step;
!     char buf[LABEL_CHARS];
  
      /* i counts how many pixels we have drawn, and j counts which unit
       * we are at.
***************
*** 567,573 ****
      double k;
      double decs;
      double mag, gain;
!     char buf[32], *s;
  
      if (axis == x_axis && graph->grid.xsized) {
        lmt = graph->grid.xaxis.log.lmt;
--- 568,574 ----
      double k;
      double decs;
      double mag, gain;
!     char buf[LABEL_CHARS], *s;
  
      if (axis == x_axis && graph->grid.xsized) {
        lmt = graph->grid.xaxis.log.lmt;
***************
*** 671,677 ****
  {
      int i, j, k, l, m;
      double t;
!     char buf[16];
  
      /* Now plot every pp'th decade line, with subs lines between them. */
      if (subs > 1)
--- 672,678 ----
  {
      int i, j, k, l, m;
      double t;
!     char buf[LABEL_CHARS];
  
      /* Now plot every pp'th decade line, with subs lines between them. */
      if (subs > 1)
*** src/lib/fte/newcoms.c.orig	Sun Mar  7 16:30:58 1993
--- src/lib/fte/newcoms.c	Wed Feb 23 22:39:55 1994
***************
*** 151,156 ****
--- 151,160 ----
  	    /* Copy from the first */
  	    vname = cp_unquote(wl->wl_word);
  	    dv = vec_get(vname);
+ 	    if (!dv) {
+ 		printf("'%s' reference vector not found\n", vname);
+ 		return;
+ 	    }
  	    numdims = dv->v_numdims;
  	    dims = dv->v_dims;
  	    wl = wl->wl_next;
*** src/lib/sparse/spsmp.c.orig	Wed Feb  3 14:20:50 1993
--- src/lib/sparse/spsmp.c	Sun Jan 30 11:53:10 1994
***************
*** 483,492 ****
  int CreateIfMissing;
  {
  MatrixPtr Matrix = (MatrixPtr)eMatrix;
! ElementPtr Element = Matrix->FirstInCol[Col];
  
  /* Begin `SMPfindElt'. */
      ASSERT( IS_SPARSE( Matrix ) );
      Element = spcFindElementInCol(Matrix, &Element, Row, Col, CreateIfMissing);
      return (SMPelement *)Element;
  }
--- 485,497 ----
  int CreateIfMissing;
  {
  MatrixPtr Matrix = (MatrixPtr)eMatrix;
! ElementPtr Element;
  
  /* Begin `SMPfindElt'. */
      ASSERT( IS_SPARSE( Matrix ) );
+     Row = Matrix->ExtToIntRowMap[Row];
+     Col = Matrix->ExtToIntColMap[Col];
+     Element = Matrix->FirstInCol[Col];
      Element = spcFindElementInCol(Matrix, &Element, Row, Col, CreateIfMissing);
      return (SMPelement *)Element;
  }