.gitignore | 6 ++ Makefile.am | 16 ++++-- README | 25 +++++++++- configure.ac | 25 +++++++--- include/X11/Xaw/TextP.h | 2 src/AllWidgets.c | 1 src/AsciiSrc.c | 4 - src/Command.c | 4 - src/Dialog.c | 2 src/DisplayList.c | 2 src/Makefile.am | 18 +++++-- src/Paned.c | 6 +- src/Pixmap.c | 2 src/Text.c | 2 src/TextAction.c | 119 ++++++++++++++++++------------------------------ src/TextTr.c | 2 src/Tip.c | 2 src/Tree.c | 4 - src/Vendor.c | 2 xaw6.pc.in | 2 20 files changed, 140 insertions(+), 106 deletions(-)
New commits: commit 2ef9c2d730200246405cfdfc882a66fbd6728a92 Author: Adam Jackson <a...@redhat.com> Date: Thu Jul 2 13:37:13 2009 -0400 libXaw 1.0.6 diff --git a/configure.ac b/configure.ac index 3927025..044227f 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) AC_INIT([libXaw], - 1.0.5, + 1.0.6, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXaw) commit 9d9facf604d2355842a3834664a1ddc233d4d1e1 Author: Alan Coopersmith <alan.coopersm...@sun.com> Date: Mon Feb 2 20:34:32 2009 -0800 Add README with pointers to mailing list, bugzilla & git repos Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> diff --git a/README b/README index 011e3fb..14aa939 100644 --- a/README +++ b/README @@ -1,3 +1,26 @@ Xaw is the X Athena Widget Set. - Xaw is a widget set based on the X Toolkit Intrinsics (Xt) Library. + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/lib/libXaw + + http://cgit.freedesktop.org/xorg/lib/libXaw + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + commit 654fd414b7ebe3a0fccd6712bf52666d42d2a711 Author: Paulo Cesar Pereira de Andrade <p...@mandriva.com.br> Date: Fri Jan 9 20:24:10 2009 -0200 Changed AsciiSrc widget to use only binary selection transfers. Conversion from multi byte to single byte text format, and vice versa, frequently doesn't do what the user want, so, operate only on literal/binary selection transfers. diff --git a/src/TextAction.c b/src/TextAction.c index 2da0a9f..062956c 100644 --- a/src/TextAction.c +++ b/src/TextAction.c @@ -434,39 +434,6 @@ _SelectionReceived(Widget w, XtPointer client_data, Atom *selection, *length = wcslen(wlist[0]); XtFree((XtPointer)wlist); text.format = XawFmtWide; - } else { - XTextProperty textprop; - char **list; - int count; - - textprop.encoding = *type; - textprop.value = (unsigned char *)value; - textprop.nitems = strlen(value); - textprop.format = 8; - - if (XmbTextPropertyToTextList(d, &textprop, &list, &count) - != Success - || count < 1) { - XFreeStringList(list); - - /* Notify the user on strerr and in the insertion :) */ - fprintf(stderr, "Xaw Text Widget: An attempt was made to insert " - "an illegal selection.\n"); - - textprop.value = (unsigned char *)" >> ILLEGAL SELECTION << "; - textprop.nitems = strlen((char *) textprop.value); - if (XmbTextPropertyToTextList(d, &textprop, &list, &count) - != Success - || count < 1) - return; - } - - XFree(value); - value = (XPointer)list[0]; - - *length = strlen(list[0]); - XtFree((XtPointer)list); - text.format = XawFmt8Bit; } text.ptr = (char*)value; text.firstPos = 0; @@ -489,6 +456,8 @@ _SelectionReceived(Widget w, XtPointer client_data, Atom *selection, static void GetSelection(Widget w, Time timev, String *params, Cardinal num_params) { + Display *d = XtDisplay(w); + TextWidget ctx = (TextWidget)w; Atom selection; int buffer; @@ -529,7 +498,8 @@ GetSelection(Widget w, Time timev, String *params, Cardinal num_params) } else list = NULL; - XtGetSelectionValue(w, selection, XA_UTF8_STRING(XtDisplay(w)), + XtGetSelectionValue(w, selection, XawTextFormat(ctx, XawFmtWide) ? + XA_UTF8_STRING(d) : XA_TEXT(d), _SelectionReceived, (XtPointer)list, timev); } } @@ -1069,49 +1039,52 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, *length = salt->length; } /* Got *value,*length, now in COMPOUND_TEXT format. */ - if (XawTextFormat(ctx, XawFmtWide) && *type == XA_STRING) { - XTextProperty textprop; - wchar_t **wlist; - int count; - - textprop.encoding = XA_COMPOUND_TEXT(d); - textprop.value = (unsigned char *)*value; - textprop.nitems = strlen(*value); - textprop.format = 8; - if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count) - < Success - || count < 1) { + if (XawTextFormat(ctx, XawFmtWide)) { + if (*type == XA_STRING) { + XTextProperty textprop; + wchar_t **wlist; + int count; + + textprop.encoding = XA_COMPOUND_TEXT(d); + textprop.value = (unsigned char *)*value; + textprop.nitems = strlen(*value); + textprop.format = 8; + if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count) + < Success + || count < 1) { + XtFree(*value); + return (False); + } XtFree(*value); - return (False); - } - XtFree(*value); - if (XwcTextListToTextProperty(d, wlist, 1, XStringStyle, &textprop) - < Success) { - XwcFreeStringList((wchar_t**)wlist); - return (False); + if (XwcTextListToTextProperty(d, wlist, 1, XStringStyle, &textprop) + < Success) { + XwcFreeStringList((wchar_t**)wlist); + return (False); + } + *value = (XtPointer)textprop.value; + *length = textprop.nitems; + XwcFreeStringList((wchar_t**) wlist); } - *value = (XtPointer)textprop.value; - *length = textprop.nitems; - XwcFreeStringList((wchar_t**) wlist); - } else if (*type == XA_UTF8_STRING(d)) { - XTextProperty textprop; - char **list; - int count; - - textprop.encoding = XA_COMPOUND_TEXT(d); - textprop.value = (unsigned char *)*value; - textprop.nitems = strlen(*value); - textprop.format = 8; - if (Xutf8TextPropertyToTextList(d, &textprop, &list, &count) - < Success - || count < 1) { + else if (*type == XA_UTF8_STRING(d)) { + XTextProperty textprop; + char **list; + int count; + + textprop.encoding = XA_COMPOUND_TEXT(d); + textprop.value = (unsigned char *)*value; + textprop.nitems = strlen(*value); + textprop.format = 8; + if (Xutf8TextPropertyToTextList(d, &textprop, &list, &count) + < Success + || count < 1) { + XtFree(*value); + return (False); + } XtFree(*value); - return (False); + *value = *list; + *length = strlen(*list); + XFree(list); } - XtFree(*value); - *value = *list; - *length = strlen(*list); - XFree(list); } *format = 8; return (True); commit 0b9de9e69e95872dd3eddbe5c1602e42c27c53e1 Author: Paulo Cesar Pereira de Andrade <p...@mandriva.com.br> Date: Fri Jan 9 19:18:36 2009 -0200 Compile warning fixes. This uses XORG_CHANGELOG macro to properly work with the "git-log" to "git log" change (required to pass "make distcheck"), uses the XORG_CWARNFLAGS macro. Most gcc 4.3 and sparse warnings corrected. diff --git a/.gitignore b/.gitignore index da3cc60..a7993ed 100644 --- a/.gitignore +++ b/.gitignore @@ -19,5 +19,9 @@ mkinstalldirs stamp-h1 xaw6.pc xaw7.pc -xaw8.pc *~ +ChangeLog +*.o +libXaw-*.tar.* +*.patch +tags diff --git a/Makefile.am b/Makefile.am index 265ccfc..2e3f9c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,6 +42,6 @@ MAINTAINERCLEANFILES=ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 9ba2414..3927025 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,10 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_CONFIG_HEADER(config.h) +# Require xorg-macros: XORG_WITH_LINT, XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2.1 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2.1) + # Check for progs AC_PROG_CC AC_PROG_LIBTOOL @@ -19,6 +23,8 @@ AC_PROG_LIBTOOL # is in an if statement, and later calls would break if it's skipped. PKG_PROG_PKG_CONFIG +XORG_CWARNFLAGS + # # fix libtool to set SONAME to libXaw.so.$major # @@ -60,7 +66,7 @@ AC_ARG_ENABLE(xaw6, AC_HELP_STRING([--disable-xaw6], if test "x$build_v6" = xyes; then PKG_CHECK_MODULES(XAW6, xproto x11 xext xextproto xt xmu) - + XAW6_CFLAGS="$CWARNFLAGS $XAW6_CFLAGS" AC_SUBST(XAW6_CFLAGS) AC_SUBST(XAW6_LIBS) fi @@ -74,7 +80,7 @@ AC_ARG_ENABLE(xaw7, AC_HELP_STRING([--disable-xaw7], if test "x$build_v7" = xyes; then PKG_CHECK_MODULES(XAW7, xproto x11 xext xextproto xt xmu xpm) - + XAW7_CFLAGS="$CWARNFLAGS $XAW7_CFLAGS" AC_SUBST(XAW7_CFLAGS) AC_SUBST(XAW7_LIBS) fi @@ -100,6 +106,7 @@ AC_CHECK_FUNCS([iswalnum]) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile include/Makefile diff --git a/include/X11/Xaw/TextP.h b/include/X11/Xaw/TextP.h index 0edbdd2..d058e8b 100644 --- a/include/X11/Xaw/TextP.h +++ b/include/X11/Xaw/TextP.h @@ -73,6 +73,8 @@ _XFUNCPROTOBEGIN extern XtActionsRec _XawTextActionsTable[]; extern Cardinal _XawTextActionsTableCount; +extern char _XawDefaultTextTranslations[]; + #define XawLF 0x0a #define XawCR 0x0d #define XawTAB 0x09 diff --git a/src/AllWidgets.c b/src/AllWidgets.c index c943630..4d95887 100644 --- a/src/AllWidgets.c +++ b/src/AllWidgets.c @@ -32,6 +32,7 @@ in this Software without prior written authorization from The Open Group. #endif #include <X11/IntrinsicP.h> #include <X11/Xmu/WidgetNode.h> +#include <X11/Xaw/AllWidgets.h> extern WidgetClass applicationShellWidgetClass; extern WidgetClass asciiSinkObjectClass; diff --git a/src/AsciiSrc.c b/src/AsciiSrc.c index b23ba4f..eb569fc 100644 --- a/src/AsciiSrc.c +++ b/src/AsciiSrc.c @@ -1448,7 +1448,7 @@ InitStringOrFile(AsciiSrcObject src, Bool newString) if (src->ascii_src.string == NULL) XtErrorMsg("NoFile", "asciiSourceCreate", "XawError", "Creating a read only disk widget and no file specified.", - NULL, 0); + NULL, NULL); open_mode = O_RDONLY; fdopen_mode = "r"; break; @@ -1779,7 +1779,7 @@ GetDefaultPieceSize(Widget w, int offset, XrmValue *value) { static XPointer pagesize; - if (pagesize == 0) { + if (pagesize == NULL) { pagesize = (XPointer)((long)_XawGetPageSize()); if (pagesize < (XPointer)BUFSIZ) pagesize = (XPointer)BUFSIZ; diff --git a/src/Command.c b/src/Command.c index fdab1b1..845ffb8 100644 --- a/src/Command.c +++ b/src/Command.c @@ -206,11 +206,11 @@ CommandClassRec commandClassRec = { }, /* label */ { - 0, /* not used */ + NULL, /* not used */ }, /* command */ { - 0, /* not used */ + NULL, /* not used */ }, }; diff --git a/src/Dialog.c b/src/Dialog.c index 0c8b82f..62d91b8 100644 --- a/src/Dialog.c +++ b/src/Dialog.c @@ -116,7 +116,7 @@ static XtResource resources[] = { sizeof(Pixmap), XtOffsetOf(DialogRec, dialog.icon), XtRImmediate, - 0 + NULL }, }; diff --git a/src/DisplayList.c b/src/DisplayList.c index e43621b..1704286 100644 --- a/src/DisplayList.c +++ b/src/DisplayList.c @@ -2035,7 +2035,7 @@ _Xaw_Xlib_DataInitProc(String class_name, tmp_win = XCreateWindow(DisplayOfScreen(screen), RootWindowOfScreen(screen), 0, 0, 1, 1, 1, depth, - InputOutput, CopyFromParent, 0, NULL); + InputOutput, (Visual *)CopyFromParent, 0, NULL); data->mask = 0; data->gc = XCreateGC(DisplayOfScreen(screen), tmp_win, 0, &data->values); XDestroyWindow(DisplayOfScreen(screen), tmp_win); diff --git a/src/Paned.c b/src/Paned.c index 4dbdb30..a2408ba 100644 --- a/src/Paned.c +++ b/src/Paned.c @@ -242,7 +242,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(cursor), XtRImmediate, - None + NULL }, { XtNgripCursor, @@ -251,7 +251,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(grip_cursor), XtRImmediate, - None + NULL }, { XtNverticalGripCursor, @@ -278,7 +278,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(adjust_this_cursor), XtRString, - None + NULL }, { XtNverticalBetweenCursor, diff --git a/src/Pixmap.c b/src/Pixmap.c index 06e326a..a6fb5a3 100644 --- a/src/Pixmap.c +++ b/src/Pixmap.c @@ -282,7 +282,7 @@ XawLoadPixmap(String name, Screen *screen, Colormap colormap, int depth) XawParams *xaw_params; if (!name) - return (False); + return (NULL); xaw_pixmap = _XawFindPixmap(name, screen, colormap, depth); diff --git a/src/Text.c b/src/Text.c index 7d7dd2e..2fd9d3f 100644 --- a/src/Text.c +++ b/src/Text.c @@ -270,8 +270,6 @@ void _XawTextSinkDisplayText(Widget, int, int, XawTextPosition, XawTextPosition, /* * From TextTr.c */ -extern char _XawDefaultTextTranslations[]; - static XawTextSelectType defaultSelectTypes[] = { XawselectPosition, XawselectAlphaNumeric, XawselectWord, XawselectLine, XawselectParagraph, XawselectAll, XawselectNull, diff --git a/src/TextTr.c b/src/TextTr.c index c918ee6..059a792 100644 --- a/src/TextTr.c +++ b/src/TextTr.c @@ -43,6 +43,8 @@ The Japanese user typically hits their Kanji key when they want to do input. This merely makes sure the input is connected. */ +#include <X11/Xaw/Text.h> + char _XawDefaultTextTranslations[] = "c<Key>A:" "beginning-of-line()\n" "c<Key>B:" "backward-character()\n" diff --git a/src/Tip.c b/src/Tip.c index 3c4b794..f2168a6 100644 --- a/src/Tip.c +++ b/src/Tip.c @@ -311,7 +311,7 @@ XawTipRealize(Widget w, Mask *mask, XSetWindowAttributes *attr) XtBorderWidth(w), DefaultDepthOfScreen(XtScreen(w)), InputOutput, - CopyFromParent, + (Visual *)CopyFromParent, *mask, attr); } diff --git a/src/Tree.c b/src/Tree.c index 88bd51f..c37b215 100644 --- a/src/Tree.c +++ b/src/Tree.c @@ -193,7 +193,7 @@ TreeClassRec treeClassRec = { }, { /* Tree class fields */ - 0, /* ignore */ + NULL, /* ignore */ } }; @@ -314,7 +314,7 @@ delete_node(Widget parent, Widget node) for (i = pos; i < pc->tree.n_children; i++) pc->tree.children[i] = pc->tree.children[i+1]; - pc->tree.children[pc->tree.n_children]=0; + pc->tree.children[pc->tree.n_children] = NULL; } static void diff --git a/src/Vendor.c b/src/Vendor.c index a23ea7b..b9ffcf6 100644 --- a/src/Vendor.c +++ b/src/Vendor.c @@ -307,7 +307,7 @@ XawCvtCompoundTextToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, if(XmbTextPropertyToTextList(dpy, &prop, &list, &count) < Success) { XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "converter", "XmbTextPropertyToTextList", "XawError", - "conversion from CT to MB failed.", NULL, 0); + "conversion from CT to MB failed.", NULL, NULL); return False; } len = strlen(*list); commit 420efdba52593bf13d97c7e001b64caccd04cd5d Author: Jeremy Huddleston <jerem...@freedesktop.org> Date: Sat Nov 8 16:04:23 2008 -0800 Fixed compile/install on darwin diff --git a/Makefile.am b/Makefile.am index 6cdbece..265ccfc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,14 +6,22 @@ pkgconfig_DATA = if BUILD_XAW6 pkgconfig_DATA += xaw6.pc -DEFAULT_LIB = libXaw6.so +if PLATFORM_DARWIN +DEFAULT_LIB = libxaw...@libext@ +else +DEFAULT_LIB = libxa...@libext@ +endif endif if BUILD_XAW7 pkgconfig_DATA += xaw7.pc -DEFAULT_LIB = libXaw7.so +if PLATFORM_DARWIN +DEFAULT_LIB = libxaw...@libext@ +else +DEFAULT_LIB = libxa...@libext@ +endif endif @@ -26,7 +34,7 @@ EXTRA_DIST = xaw6.pc.in \ if !PLATFORM_WIN32 install-exec-hook: - cd $(DESTDIR)$(libdir) && rm -f libXaw.so && ln -s $(DEFAULT_LIB) libXaw.so + cd $(DESTDIR)$(libdir) && rm -f libx...@libext@ && ln -s $(DEFAULT_LIB) libx...@libext@ endif MAINTAINERCLEANFILES=ChangeLog diff --git a/configure.ac b/configure.ac index 5633a46..9ba2414 100644 --- a/configure.ac +++ b/configure.ac @@ -35,16 +35,22 @@ xorglibxawname="libXaw" rm -f libtool_ ]) -# Win32 DLL rules are different. +# OSX/Win32 rules are different. +platform_win32=no +platform_darwin=no +LIBEXT=so case $host_os in cygwin*|mingw*) platform_win32=yes ;; - *) - platform_win32=no + darwin*) + LIBEXT=dylib + platform_darwin=yes ;; esac +AC_SUBST(LIBEXT) AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform_win32" = "xyes") +AM_CONDITIONAL(PLATFORM_DARWIN, test "x$platform_darwin" = "xyes") # Whether to build Xaw6 diff --git a/src/Makefile.am b/src/Makefile.am index 85573ce..af4be50 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -77,8 +77,13 @@ libXaw6_la_LIBADD = $(XAW6_LIBS) if !PLATFORM_WIN32 install-exec-hook:: - -rm -f $(DESTDIR)$(libdir)/libXaw.so.6 - (cd $(DESTDIR)$(libdir) && ln -s libXaw6.so.6 libXaw.so.6) +if PLATFORM_DARWIN + -rm -f $(DESTDIR)$(libdir)/libxaw...@libext@ + (cd $(DESTDIR)$(libdir) && ln -s libxaw6...@libext@ libxaw...@libext@) +else + -rm -f $(DESTDIR)$(libdir)/libx...@libext@.6 + (cd $(DESTDIR)$(libdir) && ln -s libxa...@libext@.6 libx...@libext@.6) +endif endif endif @@ -101,8 +106,13 @@ libXaw7_la_LIBADD = $(XAW7_LIBS) if !PLATFORM_WIN32 install-exec-hook:: - -rm -f $(DESTDIR)$(libdir)/libXaw.so.7 - (cd $(DESTDIR)$(libdir) && ln -s libXaw7.so.7 libXaw.so.7) +if PLATFORM_DARWIN + -rm -f $(DESTDIR)$(libdir)/libxaw...@libext@ + (cd $(DESTDIR)$(libdir) && ln -s libxaw7...@libext@ libxaw...@libext@) +else + -rm -f $(DESTDIR)$(libdir)/libx...@libext@.7 + (cd $(DESTDIR)$(libdir) && ln -s libxa...@libext@.7 libx...@libext@.7) +endif endif endif commit a48021b05693c74bd03b51b82abec4ce3ba24dc5 Author: Peter Breitenlohner <p...@mppmu.mpg.de> Date: Sat Nov 8 15:44:22 2008 +0100 xaw6 doesn't depend on xpm diff --git a/xaw6.pc.in b/xaw6.pc.in index ba5a90a..537df32 100644 --- a/xaw6.pc.in +++ b/xaw6.pc.in @@ -7,6 +7,6 @@ Name: Xaw Description: X Athena Widgets Library, version 6 Version: @PACKAGE_VERSION@ Requires: xproto xt xmu -Requires.private: x11 xext xt xmu xpm +Requires.private: x11 xext xt xmu Cflags: -I${includedir} Libs: -L${libdir} -lXaw6 -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org