[cmucl-commit] [git] CMU Common Lisp branch rtoy-clm-text-callback created. 20f-55-g6c4a967

Raymond Toy rtoy at common-lisp.net
Sat Oct 25 19:30:46 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, rtoy-clm-text-callback has been created
        at  6c4a96760e4fcd9a03c3a2ae2d4d41369d9caf39 (commit)

- Log -----------------------------------------------------------------
commit 6c4a96760e4fcd9a03c3a2ae2d4d41369d9caf39
Merge: 2dd94c9 b16eb20
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Sat Oct 25 10:50:05 2014 -0700

    Merge branch 'clm-text-callback' of /Volumes/share2/src/clnet/rkreuter/cmucl into rtoy-clm-text-callback


commit b16eb2050e77c6fba3eb438d7a2317aa64cee778
Author: Richard M Kreuter <kreuter at progn.net>
Date:   Wed Sep 17 20:41:06 2014 -0400

    Remove some printf debugging in write_text_callback.

diff --git a/src/motif/server/callbacks.c b/src/motif/server/callbacks.c
index 832b019..d6ded37 100644
--- a/src/motif/server/callbacks.c
+++ b/src/motif/server/callbacks.c
@@ -207,8 +207,6 @@ void write_text_callback(message_t reply,XmTextVerifyCallbackStruct *info)
         message_write_int(reply,info->endPos,int_tag);
         }
      else if( info->reason == XmCR_MODIFYING_TEXT_VALUE ) {
-        printf("modifying_text_value: %s ; length=%d\n",info->text->ptr,
-               info->text->length);
         message_write_int(reply,info->startPos,int_tag);
         message_write_int(reply,info->endPos,int_tag);
 	if (info->text->ptr==NULL)
@@ -217,9 +215,6 @@ void write_text_callback(message_t reply,XmTextVerifyCallbackStruct *info)
 	  really_write_string(reply,info->text->ptr,info->text->length+1);
         /* ***** Perhaps this should be an enumerated type ***** */
         message_write_int(reply,info->text->format,int_tag);
-	//        printf("modifying_text_value: %s ; length=%d\n",info->text->ptr,
-	//               info->text->length);
-        fflush(stdout);
         }
      }
 }

commit 3c56ee77a02d7379a1de77a8919375debfe856d3
Author: Richard M Kreuter <kreuter at progn.net>
Date:   Wed Sep 17 20:36:01 2014 -0400

    Fix bugs around XmTextField's callbacks.
    
    * On the motifd side, writing callbacks with reason
      XmCR_MODIFYING_TEXT_VALUE would segfault when the text was NULL
      (e.g., due to backspacing).
    
    * On the Lisp side, decoding of callbacks in READ-CALLBACK-INFO used
      the :TEXT for the widget-type, when the correct type is :TEXT-FIELD.

diff --git a/src/motif/lisp/callbacks.lisp b/src/motif/lisp/callbacks.lisp
index fe7c975..688a9c5 100644
--- a/src/motif/lisp/callbacks.lisp
+++ b/src/motif/lisp/callbacks.lisp
@@ -326,7 +326,7 @@
 	   (setf (list-callback-selection-type info)
 		 (toolkit-read-value reply)))
 	 info))
-      (:text
+      (:text-field
        (let ((info (make-text-callback reason event)))
 	 (when (member reason '(:cr-losing-focus :cr-modifying-text-value
 						 :cr-moving-insert-cursor))
diff --git a/src/motif/server/callbacks.c b/src/motif/server/callbacks.c
index d0852c4..832b019 100644
--- a/src/motif/server/callbacks.c
+++ b/src/motif/server/callbacks.c
@@ -207,13 +207,18 @@ void write_text_callback(message_t reply,XmTextVerifyCallbackStruct *info)
         message_write_int(reply,info->endPos,int_tag);
         }
      else if( info->reason == XmCR_MODIFYING_TEXT_VALUE ) {
+        printf("modifying_text_value: %s ; length=%d\n",info->text->ptr,
+               info->text->length);
         message_write_int(reply,info->startPos,int_tag);
         message_write_int(reply,info->endPos,int_tag);
-        really_write_string(reply,info->text->ptr,info->text->length+1);
+	if (info->text->ptr==NULL)
+	  really_write_string(reply,"",1);
+	else
+	  really_write_string(reply,info->text->ptr,info->text->length+1);
         /* ***** Perhaps this should be an enumerated type ***** */
         message_write_int(reply,info->text->format,int_tag);
-        printf("modifying_text_value: %s ; length=%d\n",info->text->ptr,
-               info->text->length);
+	//        printf("modifying_text_value: %s ; length=%d\n",info->text->ptr,
+	//               info->text->length);
         fflush(stdout);
         }
      }

-----------------------------------------------------------------------


hooks/post-receive
-- 
CMU Common Lisp


More information about the cmucl-commit mailing list