lin-club  

r2llib-0.10 and biditext-0.05 "cycling dolphins" released

mulix
Sat, 28 Jul 2001 10:14:50 -0700

hello, dear clubbers

a bit later than planned, new r2llib and biditext releases.

notable changes:

* biditext has profiling support. preliminary tests show that the 'old
style' biditext is still faster, but only by a few microseconds.
tzafrir, please test this so that we could pinpoint the bug you
experienced.

* r2llib uses absolute filenames internally
* r2llib now provides get_text_encoding() and init_from_text_encoding()
for persistent tokens accross process boundaries, so that refreshd can
stop peaking under the skirt.

code can be found at the usual places:

http://www.pointer.co.il/~mulix/r2l/r2llib-0.10.tar.gz
http://www.pointer.co.il/~mulix/r2l/biditext-mulix-0.05.tar.gz

if you want to play with the profiling stuff, 'new style' biditext comes
with it turned *on* by default, and here's a diff you can apply to the
'old style' biditext 0.9.1 to add profiling support to it, or just get
http://www.pointer.co.il/~mulix/r2l/biditext-0.9.1-with-profiling.tar.gz

diff -ur biditext/ImText.c biditext-prof/ImText.c
--- biditext/ImText.c   Thu Jul 12 03:12:35 2001
+++ biditext-prof/ImText.c      Sat Jul 28 20:16:00 2001
@@ -26,6 +26,9 @@
 #include <X11/Xlibint.h>
 #include <fribidi/fribidi.h>
 #include <sys/stat.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdio.h>

 int
 #if NeedFunctionPrototypes
@@ -52,7 +55,12 @@
     int FirstTimeThrough = True;
     int lastX = 0;

-    #include "common8.h"
+    struct timeval tv1, tv2;
+#include "common8.h"
+    gettimeofday(&tv2, NULL);
+    fprintf(stderr, "%ld.%6ld\n",
+           tv2.tv_sec - tv1.tv_sec - (tv2.tv_usec - tv1.tv_usec < 0),
+           (tv2.tv_usec - tv1.tv_usec) + (1000000 * (tv2.tv_usec - tv1.tv_usec < 0)));

     LockDisplay(dpy);
     FlushGC(dpy, gc);
diff -ur biditext/Makefile biditext-prof/Makefile
--- biditext/Makefile   Thu Jul 12 03:12:35 2001
+++ biditext-prof/Makefile      Sat Jul 28 20:23:28 2001
@@ -3,7 +3,7 @@
 LIBDIR = $(PREFIX)/lib
 BINDIR = $(PREFIX)/bin

-VERSION=0.9.1
+VERSION=0.9.1-with-profiling

 CFLAGS = -Wall -O2 -fno-strength-reduce

diff -ur biditext/Text.c biditext-prof/Text.c
--- biditext/Text.c     Thu Jul 12 03:12:35 2001
+++ biditext-prof/Text.c        Sat Jul 28 20:16:12 2001
@@ -29,6 +29,9 @@
 #include <X11/Xlibint.h>
 #include <fribidi/fribidi.h>
 #include <sys/stat.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdio.h>

 #if NeedFunctionPrototypes
 XDrawString(
@@ -53,7 +56,13 @@
     register xPolyText8Req *req;
     char *CharacterOffset = (char *)string;

+    static struct timeval tv1, tv2;
     #include "common8.h"
+    gettimeofday(&tv2, NULL);
+    fprintf(stderr, "%ld.%6ld\n",
+           tv2.tv_sec - tv1.tv_sec - (tv2.tv_usec - tv1.tv_usec < 0),
+           (tv2.tv_usec - tv1.tv_usec) + (1000000 * (tv2.tv_usec - tv1.tv_usec < 0)));
+

     if (length <= 0)
        return 0;
diff -ur biditext/Text16.c biditext-prof/Text16.c
--- biditext/Text16.c   Thu Jul 12 03:12:35 2001
+++ biditext-prof/Text16.c      Sat Jul 28 20:17:20 2001
@@ -25,6 +25,9 @@
 #include <X11/Xlibint.h>
 #include <fribidi/fribidi.h>
 #include <sys/stat.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdio.h>

 int
 #if NeedFunctionPrototypes
@@ -50,7 +53,12 @@
     register xPolyText16Req *req;
     XChar2b *CharacterOffset = (XChar2b *)string;

+    static struct timeval tv1, tv2;
     #include "common16.h"
+    gettimeofday(&tv2, NULL);
+    fprintf(stderr, "%ld.%6ld\n",
+           tv2.tv_sec - tv1.tv_sec - (tv2.tv_usec - tv1.tv_usec < 0),
+           (tv2.tv_usec - tv1.tv_usec) + (1000000 * (tv2.tv_usec - tv1.tv_usec < 0)));

     if (length <= 0)
        return 0;
Only in biditext: biditext-0.9.1.tar.gz
diff -ur biditext/common.h biditext-prof/common.h
--- biditext/common.h   Thu Jul 12 03:12:35 2001
+++ biditext-prof/common.h      Sat Jul 28 20:15:17 2001
@@ -34,6 +34,8 @@

     XFontStruct *xfont;

+    gettimeofday(&tv1, NULL);
+
     /* retrieve X atoms, if needed */
     if (!atom_charset_registry) { atom_charset_registry = XInternAtom(dpy, 
"CHARSET_REGISTRY", 1); }
     if (!atom_charset_encoding) { atom_charset_encoding = XInternAtom(dpy, 
"CHARSET_ENCODING", 1); }

-- 
mulix
http://www.advogato.com/person/mulix

linux/reboot.h: #define LINUX_REBOOT_MAGIC1 0xfee1dead