pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] Changes to pspp/src/cartesian.c


From: John Darrington
Subject: [Pspp-cvs] Changes to pspp/src/cartesian.c
Date: Thu, 13 Jan 2005 23:05:49 -0500

Index: pspp/src/cartesian.c
diff -u pspp/src/cartesian.c:1.5 pspp/src/cartesian.c:1.6
--- pspp/src/cartesian.c:1.5    Thu Dec  2 05:52:51 2004
+++ pspp/src/cartesian.c        Fri Jan 14 04:05:47 2005
@@ -53,6 +53,8 @@
 void 
 chart_write_xlabel(struct chart *ch, const char *label)
 {
+  if ( ! ch ) 
+    return ;
 
   pl_savestate_r(ch->lp);
 
@@ -69,6 +71,9 @@
 void 
 chart_write_ylabel(struct chart *ch, const char *label)
 {
+  if ( ! ch ) 
+    return ;
+
   pl_savestate_r(ch->lp);
 
   pl_move_r(ch->lp, ch->data_bottom, ch->ordinate_right);
@@ -86,6 +91,10 @@
 {
   int ds;
 
+  if ( ! chart ) 
+    return ;
+
+
   pl_savestate_r(chart->lp);
 
   pl_filltype_r(chart->lp,1);
@@ -124,13 +133,18 @@
 void
 chart_datum(struct chart *ch, int dataset UNUSED, double x, double y)
 {
+
+  if ( ! ch ) 
+    return ;
+
+
+
   const double x_pos = 
     (x - ch->x_min) * ch->abscissa_scale + ch->data_left ; 
 
   const double y_pos = 
     (y - ch->y_min) * ch->ordinate_scale + ch->data_bottom ;
 
-
   pl_savestate_r(ch->lp);    
   
   pl_fmarker_r(ch->lp, x_pos, y_pos, 6, 15);
@@ -151,6 +165,10 @@
   double x1, y1;
   double x2, y2 ;
 
+  if ( ! ch ) 
+    return ;
+
+
   if ( lim_dim == CHART_DIM_Y ) 
     {
       x1 = ( limit1 - intercept ) / slope ;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]