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
|
$NetBSD: patch-ae,v 1.1 2002/03/15 00:22:43 jmc Exp $
--- src/lcore.c.orig Fri Mar 15 00:16:32 2002
+++ src/lcore.c Fri Mar 15 00:16:44 2002
@@ -113,7 +113,7 @@
case 1: sprintf(TeXt,"[^H]");return TeXt;
case 2: sprintf(TeXt,"[^F]");return TeXt;
case 3: sprintf(TeXt,"[^T]");return TeXt;
- case 4: sprintf(TeXt,"%g",*(double*)(a->a)); return TeXt;
+ case 4: sprintf(TeXt,"%g",a->d); return TeXt;
case 6: sprintf(TeXt,"%d",*(int*)(a->a)); return TeXt;
case 5: sprintf(TeXt,"[^II]");return TeXt;
case 8: sprintf(TeXt,"[^IF]");return TeXt;
@@ -180,6 +180,7 @@
tmp->a=(char *)malloc(sizeof(double));
dd=(double *)(tmp->a);
(*dd)=d;
+ tmp->d = d;
tmp->g=1;tmp->f=4<<1;tmp->b=NULL;
return tmp;
}
@@ -197,9 +198,7 @@
/*--X FNAME: "GetDouble" DESC: "Takes a double from atom a" */
double GetDbleOld(ATOM a)
{
- double *dd;
- dd=(double*)(a->a);
- return *dd;
+ return a->d;
}
/*--X VNAME: "Pos" DESC: "Temporary variable for a string to list conversion" */
@@ -249,7 +248,7 @@
{
double *d;
t=mkatm(sizeof(double));t->f=4<<1;
- d=(double*)(t->a);
+ d=&t->d;
sscanf(c,"%lf",d);
}
return t;
|