diff options
author | Greg Hudson <ghudson@mit.edu> | 1994-11-11 23:37:06 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 1994-11-11 23:37:06 +0000 |
commit | 871015103e76d90b44f9fca9e126e1cff5827c79 (patch) | |
tree | bd0cb0466cc04f1be289dbd5bb7fc520f99953b4 /clients | |
parent | d5341b61b8099184f275753d18abbaa8b0308772 (diff) |
Correct bug with XawAsciiSourceFreeString().
Diffstat (limited to 'clients')
-rw-r--r-- | clients/xzwrite/edit_window.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/clients/xzwrite/edit_window.c b/clients/xzwrite/edit_window.c index 4f48e45..0cfc0c7 100644 --- a/clients/xzwrite/edit_window.c +++ b/clients/xzwrite/edit_window.c @@ -21,15 +21,15 @@ void send_message() { char *buf; int ret; + Widget text_source; /* I should do more interesting things with these error conditions */ - XtVaGetValues(editor, - XtNstring, (XtArgVal) &buf, - NULL); + XtVaGetValues(editor, XtNstring, (XtArgVal) &buf, + XTNtextSource, (XtArgVal) &text_source, NULL); ret = zeph_send_message(¤t_dest, buf); - XawAsciiSourceFreeString(editor); + XawAsciiSourceFreeString(text_source); switch (ret) { case SEND_OK: @@ -45,6 +45,9 @@ void send_message() /* Only the second argument matters */ if (defs.close_on_send) XtCallActionProc(toplevel, "CloseSend", NULL, NULL, 0); + + if (defs.clear_on_send) + XTCallActionProc(toplevel, "ClearEditor", NULL, NULL, 0); } void edit_set_title(dest) @@ -111,13 +114,13 @@ void edit_yank_next() void edit_yank_store() { char *buf; + Widget text_source; - XtVaGetValues(editor, - XtNstring, (XtArgVal) &buf, - NULL); + XtVaGetValues(editor, XtNstring, (XtArgVal) &buf, + XtNtextSource, (XtArgVal) &text_source, NULL); if (buf != NULL && *buf != '\0') yank_store(¤t_dest, buf); - XawAsciiSourceFreeString(editor); + XawAsciiSourceFreeString(text_source); } |