File xbench-0.2.patch of Package xbench

--- benches.h
+++ benches.h	2000/04/17 08:00:46
@@ -146,10 +146,10 @@
     {   "bitmapcopy400",    1, bitmapcopy_setup, bitmapcopy_bench, bitmapcopy_cleanup, bitmapcopy_msg, 400 },
     {   "bitmapcopy500",    2, bitmapcopy_setup, bitmapcopy_bench, bitmapcopy_cleanup, bitmapcopy_msg, 500 },
 
-    {   "imagestring:fixed",1, imagestring_setup, imagestring_bench, imagestring_cleanup, imagestring_msg, (unsigned)"fixed" },
-    {   "imagestring:6x12", 2, imagestring_setup, imagestring_bench, imagestring_cleanup, imagestring_msg, (unsigned)"6x12" },
-    {   "imagestring:8x13", 2, imagestring_setup, imagestring_bench, imagestring_cleanup, imagestring_msg, (unsigned)"8x13" },
-    {   "imagestring:9x15", 2, imagestring_setup, imagestring_bench, imagestring_cleanup, imagestring_msg, (unsigned)"9x15" },
+    {   "imagestring:fixed",1, imagestring_setup, imagestring_bench, imagestring_cleanup, imagestring_msg, 1 },
+    {   "imagestring:6x12", 2, imagestring_setup, imagestring_bench, imagestring_cleanup, imagestring_msg, 2 },
+    {   "imagestring:8x13", 2, imagestring_setup, imagestring_bench, imagestring_cleanup, imagestring_msg, 3 },
+    {   "imagestring:9x15", 2, imagestring_setup, imagestring_bench, imagestring_cleanup, imagestring_msg, 4 },
 
     {   "complex1",         1, complex1_setup, complex1_bench, complex1_cleanup, complex1_msg, 0 },
 
--- imagestr.c
+++ imagestr.c	2000/04/17 07:48:21
@@ -30,12 +30,24 @@
  *
  * almost everywhere used esp. in terminal emulators
  */
-imagestring_setup(dpy, win, fontName)
+imagestring_setup(dpy, win, fontNumber)
 Display *dpy;
 Window win;
-char *fontName;
+unsigned fontNumber;
 {
 	int screen = DefaultScreen(dpy);
+	char *fontName;
+
+	switch (fontNumber) {
+	case 1: fontName="fixed";
+	  break;
+	case 2: fontName="6x12";
+	  break;
+	case 3: fontName="8x13";
+	  break;
+	case 4: fontName="9x15";
+	  break;
+	}
 
 	fontinfo = XLoadQueryFont(dpy, fontName);
 	if (fontinfo == NULL) {
@@ -86,10 +98,22 @@
 	return (nstrings * len);
 }
 
-imagestring_msg(deltaT, nchars, fontName, rate)
-char *fontName;
+imagestring_msg(deltaT, nchars, fontNumber, rate)
+unsigned fontNumber;
 double rate;
 {
+        char *fontName;
+	switch (fontNumber) {
+	case 1: fontName="fixed";
+	  break;
+	case 2: fontName="6x12";
+	  break;
+	case 3: fontName="8x13";
+	  break;
+	case 4: fontName="9x15";
+	  break;
+	}
+
 	printf("DRAW IMAGE STRING - font=\"%s\" (height = %d)\n", fontName, fontHeight);
 	printf("\n");
 	printf("%d chars in %d secs\n", nchars, deltaT);