diff options
Diffstat (limited to 'graphics/ploticus/patches/patch-bc')
-rw-r--r-- | graphics/ploticus/patches/patch-bc | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/graphics/ploticus/patches/patch-bc b/graphics/ploticus/patches/patch-bc new file mode 100644 index 00000000000..5bda8aed970 --- /dev/null +++ b/graphics/ploticus/patches/patch-bc @@ -0,0 +1,47 @@ +$NetBSD: patch-bc,v 1.1 2005/05/02 17:58:00 drochner Exp $ + +--- autorange.c.orig 2005-04-20 21:13:19.000000000 +0200 ++++ autorange.c +@@ -45,10 +45,9 @@ int mininit, maxinit; + + /* see what scaletype is being used.. */ + Egetunits( axis, unittyp ); +-/* for linear, default to automatic determination of reasonable endpoints.. */ + if( strcmp( unittyp, "linear" )==0 ) strcpy( nearest, "auto" ); +-/* for date, time, and other types, default to exact endpoints.. */ +-else strcpy( nearest, "exact" ); ++else if ( GL_smemberi( unittyp, "date time datetime" )) strcpy( nearest, "datematic" ); ++else strcpy( nearest, "exact" ); /* categories? */ + + margin = 0.0; + strcpy( dfield, "" ); +@@ -110,7 +109,7 @@ if( ndf == 0 ) return( Eerr( 7194, "auto + /* ----------------- */ + + /* override.. */ +-if( stricmp( nearest, "day" )==0 && stricmp( unittyp, "date" )==0 ) strcpy( nearest, "exact" ); ++/* if( stricmp( nearest, "day" )==0 && stricmp( unittyp, "date" )==0 ) strcpy( nearest, "exact" ); */ /* removed scg 4/19/05 */ + + /* find data min and max.. */ + +@@ -190,8 +189,8 @@ max += margin; + + /* degenerate case.. all data the same (bad if it happens to lie on inc boundary, eg: 0) - added scg 9/21/01 */ + if( min == max ) { +- min = min - 1.0; +- max = max + 1.0; ++ /* min = min - 1.0; max = max + 1.0; */ ++ min -= (min*0.2); max += (max*0.2); /* changed to work better w/ small magnitude values - scg 3/3/05 */ + } + + +@@ -208,7 +207,8 @@ else { + + /******* handle nearest= ***********/ + +-if( GL_slmember( nearest, "dat*matic" ) || ( stricmp( nearest, "exact" )==0 && GL_smember( unittyp, "datetime time" )) ) { ++if( GL_slmember( nearest, "dat*matic" ) ) { ++ /* || ( stricmp( nearest, "exact" )==0 && GL_smember( unittyp, "datetime time" )) ) { */ /* removed scg 4/19/05 */ + char foo1[40], foo2[40], foo3[40], foo4[40], foo5[40], foo6[40]; + double dfoo1, dfoo2; + /* get an automatic reasonable "nearest" value.. */ |