summaryrefslogtreecommitdiff
path: root/cad/spice/patches/patch-ae
blob: 1621bb6e532a953895dbbb747e5fc824b8d77659 (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
$NetBSD: patch-ae,v 1.2 2006/10/09 20:04:38 mlelstv Exp $

--- src/lib/fte/grid.c.orig	1993-04-25 23:53:11.000000000 +0200
+++ src/lib/fte/grid.c
@@ -17,11 +17,14 @@ Copyright 1990 Regents of the University
 #include "suffix.h"
 
 #define RAD_TO_DEG	(180.0 / M_PI)
+#define LABEL_CHARS	20
 
 static double *lingrid(), *loggrid();
 static void polargrid(), smithgrid();
 static void drawpolargrid( );
 static void drawsmithgrid( );
+static void drawlingrid( );
+static void drawloggrid( );
 
 static void arcset();
 static double cliparc();
@@ -225,7 +228,7 @@ lingrid(graph, lo, hi, delta, type, axis
     int max;
     static double dd[2];
     int mult = 1;
-    char buf[16], *s;
+    char buf[LABEL_CHARS], *s;
     int slim, digits;
 
     if (axis == y_axis && graph->grid.ysized) {
@@ -473,11 +476,11 @@ lingrid(graph, lo, hi, delta, type, axis
     return (dd);
 }
 
-static
+static void
 drawlingrid(graph, units, spacing, nsp, dst, lmt, hmt, onedec, mult, mag,
     digits, axis)
     GRAPH *graph;
-    char units[16];
+    char *units;
     bool onedec;
     int nsp, spacing, mult;
     double hmt, lmt, dst;
@@ -488,7 +491,7 @@ drawlingrid(graph, units, spacing, nsp, 
 
     int i, j;
     double m, step;
-    char buf[16];
+    char buf[LABEL_CHARS];
 
     /* i counts how many pixels we have drawn, and j counts which unit
      * we are at.
@@ -567,7 +570,7 @@ loggrid(graph, lo, hi, type, axis)
     double k;
     double decs;
     double mag, gain;
-    char buf[32], *s;
+    char buf[LABEL_CHARS], *s;
 
     if (axis == x_axis && graph->grid.xsized) {
       lmt = graph->grid.xaxis.log.lmt;
@@ -661,7 +664,7 @@ loggrid(graph, lo, hi, type, axis)
 
 }
 
-static
+static void
 drawloggrid(graph, units, hmt, lmt, decsp, subs, pp, axis)
     GRAPH *graph;
     char *units;
@@ -671,7 +674,7 @@ drawloggrid(graph, units, hmt, lmt, decs
 {
     int i, j, k, l, m;
     double t;
-    char buf[16];
+    char buf[LABEL_CHARS];
 
     /* Now plot every pp'th decade line, with subs lines between them. */
     if (subs > 1)