*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 17 Dec 1998 11:28:44 +0100
changeset 2418 1c4566aeee44
parent 2417 1e40a40e56e0
child 2419 b2633c30ff7a
*** empty log message ***
WinWorkstat.st
WinWorkstation.st
--- a/WinWorkstat.st	Wed Dec 16 23:46:58 1998 +0100
+++ b/WinWorkstat.st	Thu Dec 17 11:28:44 1998 +0100
@@ -630,65 +630,56 @@
 static int
 st2RGB(int color,struct gcData *gcData)
 {
-  int ir,ig,ib;
-  if (gcData)
-  {
-    if (gcData->bitmapColorBitCount == 1)
-    {
-      if (color)
-	return WhitePixel;
-      else
-	return BlackPixel;
-    }
-  }
-  if (__depth < 15)
-  {
-    return 0;
-  }
-  else
-  {
-    if ((__depth == 16) || (__depth == 15))
-    {
-      ib = (color & 0x1f) << 3;
-      ig = ((color >> 5) & 0x3f) << 2;
-      ir = ((color >> 11) & 0x1f) << 3;
-      ir |= 7;
-      ig |= 3;
-      ib |= 7;
-      return RGB(ir,ig,ib);
-    }
-    return (color & 0xffffff);
-  }
+    int ir,ig,ib;
+
+    if (gcData) {
+	if (gcData->bitmapColorBitCount == 1) {
+	  if (color)
+	      return WhitePixel;
+	  else
+	      return BlackPixel;
+	}
+    }
+    if (__depth < 15) {
+	return 0;
+    } else {
+	if ((__depth == 16) || (__depth == 15)) {
+	    ib = (color & 0x1f) << 3;
+	    ig = ((color >> 5) & 0x3f) << 2;
+	    ir = ((color >> 11) & 0x1f) << 3;
+	    ir |= 7;
+	    ig |= 3;
+	    ib |= 7;
+	    return RGB(ir,ig,ib);
+	}
+	return (color & 0xffffff);
+    }
 }
 
 static int
 RGB2st(int r,int g,int b)
 {
-  int ir,ig,ib,id;
-  if (__depth < 15)
-  {
-    id = 0;
-  }
-  else
-  {
-    if ((__depth == 16) || (__depth == 15))
-    {
-      ir = (r >> 11) & 0x1f;
-      ig = (g >> 10) & 0x3f;
-      ib = (b >> 11) & 0x1f;
-
-      id = ( ir << 11 ) | ( ig << 5 ) | ib;
-    }
-    else
-    {
-      ir = (r >> 8) & 0xff;
-      ig = (g >> 8) & 0xff;
-      ib = (b >> 8) & 0xff;
-
-      id = RGB( ir, ig, ib);
-    }
-  }
-  return id;
+    int ir,ig,ib,id;
+
+    if (__depth < 15) {
+	id = 0;
+    }
+    else {
+	if ((__depth == 16) || (__depth == 15)) {
+	    ir = (r >> 11) & 0x1f;
+	    ig = (g >> 10) & 0x3f;
+	    ib = (b >> 11) & 0x1f;
+
+	    id = ( ir << 11 ) | ( ig << 5 ) | ib;
+	} else {
+	    ir = (r >> 8) & 0xff;
+	    ig = (g >> 8) & 0xff;
+	    ib = (b >> 8) & 0xff;
+
+	    id = RGB( ir, ig, ib);
+	}
+    }
+    return id;
 }
 
 static int
@@ -1445,8 +1436,9 @@
 			enqEvent(ENQ_AT_END, ExposureMask, hWnd, message, wParam, upd.left, upd.top, upd.right-upd.left+1, upd.bottom-upd.top+1);
 		    }
 		}
-	    } else
+            } else {
 		*pDefault = 0;
+            }
 	    return 0;
 	    break;
 
@@ -10474,6 +10466,6 @@
 !WinWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/WinWorkstat.st,v 1.79 1998-12-16 22:46:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/WinWorkstat.st,v 1.80 1998-12-17 10:28:44 cg Exp $'
 ! !
 WinWorkstation initialize!
--- a/WinWorkstation.st	Wed Dec 16 23:46:58 1998 +0100
+++ b/WinWorkstation.st	Thu Dec 17 11:28:44 1998 +0100
@@ -630,65 +630,56 @@
 static int
 st2RGB(int color,struct gcData *gcData)
 {
-  int ir,ig,ib;
-  if (gcData)
-  {
-    if (gcData->bitmapColorBitCount == 1)
-    {
-      if (color)
-	return WhitePixel;
-      else
-	return BlackPixel;
-    }
-  }
-  if (__depth < 15)
-  {
-    return 0;
-  }
-  else
-  {
-    if ((__depth == 16) || (__depth == 15))
-    {
-      ib = (color & 0x1f) << 3;
-      ig = ((color >> 5) & 0x3f) << 2;
-      ir = ((color >> 11) & 0x1f) << 3;
-      ir |= 7;
-      ig |= 3;
-      ib |= 7;
-      return RGB(ir,ig,ib);
-    }
-    return (color & 0xffffff);
-  }
+    int ir,ig,ib;
+
+    if (gcData) {
+	if (gcData->bitmapColorBitCount == 1) {
+	  if (color)
+	      return WhitePixel;
+	  else
+	      return BlackPixel;
+	}
+    }
+    if (__depth < 15) {
+	return 0;
+    } else {
+	if ((__depth == 16) || (__depth == 15)) {
+	    ib = (color & 0x1f) << 3;
+	    ig = ((color >> 5) & 0x3f) << 2;
+	    ir = ((color >> 11) & 0x1f) << 3;
+	    ir |= 7;
+	    ig |= 3;
+	    ib |= 7;
+	    return RGB(ir,ig,ib);
+	}
+	return (color & 0xffffff);
+    }
 }
 
 static int
 RGB2st(int r,int g,int b)
 {
-  int ir,ig,ib,id;
-  if (__depth < 15)
-  {
-    id = 0;
-  }
-  else
-  {
-    if ((__depth == 16) || (__depth == 15))
-    {
-      ir = (r >> 11) & 0x1f;
-      ig = (g >> 10) & 0x3f;
-      ib = (b >> 11) & 0x1f;
-
-      id = ( ir << 11 ) | ( ig << 5 ) | ib;
-    }
-    else
-    {
-      ir = (r >> 8) & 0xff;
-      ig = (g >> 8) & 0xff;
-      ib = (b >> 8) & 0xff;
-
-      id = RGB( ir, ig, ib);
-    }
-  }
-  return id;
+    int ir,ig,ib,id;
+
+    if (__depth < 15) {
+	id = 0;
+    }
+    else {
+	if ((__depth == 16) || (__depth == 15)) {
+	    ir = (r >> 11) & 0x1f;
+	    ig = (g >> 10) & 0x3f;
+	    ib = (b >> 11) & 0x1f;
+
+	    id = ( ir << 11 ) | ( ig << 5 ) | ib;
+	} else {
+	    ir = (r >> 8) & 0xff;
+	    ig = (g >> 8) & 0xff;
+	    ib = (b >> 8) & 0xff;
+
+	    id = RGB( ir, ig, ib);
+	}
+    }
+    return id;
 }
 
 static int
@@ -1445,8 +1436,9 @@
 			enqEvent(ENQ_AT_END, ExposureMask, hWnd, message, wParam, upd.left, upd.top, upd.right-upd.left+1, upd.bottom-upd.top+1);
 		    }
 		}
-	    } else
+            } else {
 		*pDefault = 0;
+            }
 	    return 0;
 	    break;
 
@@ -10474,6 +10466,6 @@
 !WinWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.79 1998-12-16 22:46:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.80 1998-12-17 10:28:44 cg Exp $'
 ! !
 WinWorkstation initialize!