updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / vis5d+ / patch
blob8ab966726f9350ac9c125980768154af4ea39dc9
1 diff -Naur vis5d+-1.2.1//src/misc.c vis5d+-1.2.1_new//src/misc.c
2 --- vis5d+-1.2.1//src/misc.c    2001-11-07 06:53:12.000000000 -0500
3 +++ vis5d+-1.2.1_new//src/misc.c        2010-10-16 23:26:10.000000000 -0500
4 @@ -144,10 +144,10 @@
5  
6  
7  
8 -/*** round ************************************************************
9 +/*** roundv5d ************************************************************
10     Round off x to a 'nice' value.
11  **********************************************************************/
12 -float round( float x )
13 +float roundv5d( float x )
14  {
15     float base, fudge;
16     int temp;
17 @@ -273,7 +273,7 @@
18        ctx->Variable[var]->HSliceRequest->Interval = 0.0;
19     }
20     else {
21 -      ctx->Variable[var]->HSliceRequest->Interval = round( (ctx->Variable[var]->MaxVal - ctx->Variable[var]->MinVal)
22 +      ctx->Variable[var]->HSliceRequest->Interval = roundv5d( (ctx->Variable[var]->MaxVal - ctx->Variable[var]->MinVal)
23                                          / 10.0 );
24     }
26 @@ -309,7 +309,7 @@
27        ctx->Variable[var]->VSliceRequest->Interval = 0.0;
28     }
29     else {
30 -      ctx->Variable[var]->VSliceRequest->Interval = round( (ctx->Variable[var]->MaxVal - ctx->Variable[var]->MinVal)
31 +      ctx->Variable[var]->VSliceRequest->Interval = roundv5d( (ctx->Variable[var]->MaxVal - ctx->Variable[var]->MinVal)
32                                          / 10.0 );
33     }
35 diff -Naur vis5d+-1.2.1//src/misc.h vis5d+-1.2.1_new//src/misc.h
36 --- vis5d+-1.2.1//src/misc.h    2001-11-07 06:53:12.000000000 -0500
37 +++ vis5d+-1.2.1_new//src/misc.h        2010-10-16 23:26:28.000000000 -0500
38 @@ -37,7 +37,7 @@
40  extern void die( char *msg );
42 -extern float round( float x );
43 +extern float roundv5d( float x );
45  extern int which( char *file, char *fullpath );
47 diff -Naur vis5d+-1.2.1//src/work.c vis5d+-1.2.1_new//src/work.c
48 --- vis5d+-1.2.1//src/work.c    2001-11-07 06:53:30.000000000 -0500
49 +++ vis5d+-1.2.1_new//src/work.c        2010-10-16 23:27:16.000000000 -0500
50 @@ -6791,7 +6791,7 @@
51                   request->HighLimit = floor(request->HighLimit*factor)/(float) factor;
52                 }
53          }
54 -        request->Interval = round((request->HighLimit - request->LowLimit)/5.0);
55 +        request->Interval = roundv5d((request->HighLimit - request->LowLimit)/5.0);
56          
57    }
58  }
59 --- vis5d+-1.2.1/util/kludge.f  2001-10-24 12:46:49.000000000 +0200
60 +++ vis5d+-1.2.1.new/util/kludge.f      2011-04-28 14:41:00.883619139 +0200
61 @@ -51,9 +51,13 @@
62        SUBROUTINE GETDAY(I)
63        IMPLICIT INTEGER (A-Z)
64        INTEGER MTBL(12)
65 +      INTEGER TARRAY(3)
66        DATA MTBL/0,31,59,90,120,151,181,212,243,273,304,334/
67  C
68 -      CALL IDATE(MON,IDAY,IYEAR)
69 +      CALL IDATE(TARRAY)
70 +      IDAY = TARRAY(1)
71 +      MON = TARRAY(2)
72 +      IYEAR = TARRAY(3)
73        IF (IDAY.LT.1.OR.IDAY.GT.31) RETURN
74        IF (MON.LT.1.OR.MON.GT.12) RETURN
75        IDDD=IDAY+MTBL(MON)