XWorkstation.st
changeset 2146 1c13fdc62a9f
parent 2140 21ad63e0c739
child 2156 0cb3b353630f
--- a/XWorkstation.st	Fri Jun 12 16:31:52 1998 +0200
+++ b/XWorkstation.st	Sat Jun 13 13:55:14 1998 +0200
@@ -3085,9 +3085,11 @@
         win = _WindowVal(aDrawableId);
 
         if( __isSmallInteger(scaleY) ) 
-	    sY = (float) __intVal( scaleY );
+            sY = (float) __intVal( scaleY );
         else if (__isFloat(scaleY)) 
-	    sY = __floatVal( scaleY );
+            sY = __floatVal( scaleY );
+        else if (__isShortFloat(scaleY)) 
+            sY = __shortFloatVal( scaleY );
         else {
             t = __SSEND0(scaleY, @symbol(asFloat), 0);
             if (! __isFloat(t)) goto fail;
@@ -3095,9 +3097,11 @@
         }
 
         if( __isSmallInteger(transY) ) 
-	    tY = (float) __intVal( transY );
+            tY = (float) __intVal( transY );
         else if (__isFloat(transY)) 
-	    tY = __floatVal( transY );
+            tY = __floatVal( transY );
+        else if (__isShortFloat(transY)) 
+            tY = __shortFloatVal( transY );
         else {
             t = __SSEND0(transY, @symbol(asFloat), 0);
             if (! __isFloat(t)) goto fail;
@@ -3105,9 +3109,11 @@
         }
 
         if( __isSmallInteger(startX) ) 
-	    x = (float) __intVal( startX );
+            x = (float) __intVal( startX );
         else if (__isFloat(startX)) 
-	    x = __floatVal( startX );
+            x = __floatVal( startX );
+        else if (__isShortFloat(startX)) 
+            x = __shortFloatVal( startX );
         else {
             t = __SSEND0(startX, @symbol(asFloat), 0);
             if (! __isFloat(t)) goto fail;
@@ -3115,9 +3121,11 @@
         }
 
         if( __isSmallInteger(stepX) ) 
-	    step = (float) __intVal( stepX );
+            step = (float) __intVal( stepX );
         else if (__isFloat(stepX)) 
-	    step = __floatVal( stepX );
+            step = __floatVal( stepX );
+        else if (__isShortFloat(stepX)) 
+            step = __shortFloatVal( stepX );
         else {
             t = __SSEND0(stepX, @symbol(asFloat), 0);
             if (! __isFloat(t)) goto fail;
@@ -3126,26 +3134,22 @@
 
         num = __intVal( noY );
 
-        if( num > 200 )
-        {
+        if( num > 200 ) {
             if( ! (points = (XPoint *) malloc ( sizeof(XPoint) * num )) )
                 goto fail;
-
             mustFree = 1;
+        } else {
+            points = qPoints;
         }
-        else
-            points = qPoints;
-
-        for( i = 0; i < num; ++i )
-        {
+        for( i = 0; i < num; ++i ) {
             yA  = __AT_(yValues, __MKSMALLINT(i+1) );
 
             if( __isFloat(yA) )
                 y = __floatVal( yA );
             else if( __isSmallInteger(yA) )
                 y = (float) __intVal( yA );
-	    else if( __isShortFloat( yA) )
-		y = __shortFloatVal( yA );
+            else if( __isShortFloat( yA) )
+                y = __shortFloatVal( yA );
             else {
                 t = __SSEND0(yA, @symbol(asFloat), 0);
                 if (! __isFloat(t)) goto fail;
@@ -3161,9 +3165,9 @@
         XDrawLines(myDpy, win, gc, points, num, CoordModeOrigin);
         LEAVE_XLIB();
 
-        if( mustFree )
+        if( mustFree ) {
             free( points );
-
+        }
         RETURN ( self );
     }
 
@@ -3171,9 +3175,9 @@
     if( mustFree )
         free( points );
 %}.
-
     self primitiveFailed
 
+    "Modified: / 13.6.1998 / 13:51:39 / cg"
 !
 
 displayPointX:x y:y in:aDrawableId with:aGCId
@@ -9906,6 +9910,6 @@
 !XWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.282 1998-06-09 12:30:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.283 1998-06-13 11:55:14 cg Exp $'
 ! !
 XWorkstation initialize!