Hi,

there is some odd bug which probably nobody will care about in sselp:
It is somewhat cosmetic, searching ML on this didn't revealed anything useful. 
(please point me to threads, if im wrong)


Select the *String* NULL or make the selection a newline:

Selection="
"
./sselp 
Selection=NULL
,./sselp 


Using XInternAtom seems to fix the Symptom:



# lit. NULL 
,./sselp 
NULL
,diff -Naub sselp
sselp         sselp.c       sselp.c.orig  sselp.o       
,diff -Naub sselp.c.orig sselp.c
--- sselp.c.orig        Mon Mar  2 00:24:56 2009
+++ sselp.c     Mon Mar  2 00:45:16 2009
@@ -11,6 +11,7 @@
        Display *dpy;
        Atom utf8_string;
        Atom xa_clip_string;
+       Atom lit_null_string;
        Window w;
        XEvent ev;
        Atom typeret;
@@ -23,6 +24,7 @@
                return NULL;
        utf8_string = XInternAtom(dpy, "UTF8_STRING", False);
        xa_clip_string = XInternAtom(dpy, "_SSELP_STRING", False);
+       lit_null_string = XInternAtom(dpy, "NULL", True);
        w = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 10, 10, 200, 200,
                        1, CopyFromParent, CopyFromParent);
        XConvertSelection(dpy, XA_PRIMARY, utf8_string, xa_clip_string,


I believe, there must be a better solution to this.


As a completly different question I noted that the data pointer is not 
initialized to NULL:

,grep '*data' sselp.c
        unsigned char *data;
        unsigned char *data;

Shouldn't this look like unsigned char *data = NULL;  ?


regards
Stefan
-- 
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 ¿/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

Reply via email to