aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Antipov2012-07-31 15:37:38 +0400
committerDmitry Antipov2012-07-31 15:37:38 +0400
commitc09bfb2f140b2885af17185634451e2abfd6e91c (patch)
treef0529721a19d42d6ba84f0ed96ab10562d40a727
parent906debc3b7206396a00f9dd91a519909c1c9d3bb (diff)
downloademacs-c09bfb2f140b2885af17185634451e2abfd6e91c.tar.gz
emacs-c09bfb2f140b2885af17185634451e2abfd6e91c.zip
Miscellaneous fixes for non-default X toolkits.
* configure.ac (MOTIF): Check for /usr/include/openmotif and /usr/(lib|lib64)/openmotif if --with-x-toolkit=motif. * lwlib/lwlib-Xm.c (make_menu_in_widget): Remove unused variable. * src/xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings. * src/xterm.c (x_frame_of_widget): Remove redundant prototype. Move under #ifdef USE_LUCID. (x_create_toolkit_scroll_bar): Adjust scroll_bar_name definition and usage to avoid warnings.
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac19
-rw-r--r--lwlib/ChangeLog5
-rw-r--r--lwlib/lwlib-Xm.c3
-rw-r--r--src/ChangeLog9
-rw-r--r--src/xfns.c6
-rw-r--r--src/xterm.c11
7 files changed, 46 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b1660ef853..698aa4f14dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Improve OpenMotif detection on GNU/Linux systems.
4 * configure.ac (MOTIF): Check for /usr/include/openmotif
5 and /usr/(lib|lib64)/openmotif if --with-x-toolkit=motif.
6
12012-07-31 Andreas Schwab <schwab@linux-m68k.org> 72012-07-31 Andreas Schwab <schwab@linux-m68k.org>
2 8
3 * Makefile.in (install-arch-indep): Avoid eval. 9 * Makefile.in (install-arch-indep): Avoid eval.
diff --git a/configure.ac b/configure.ac
index 6776c09a8bc..1de8766c63f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2139,7 +2139,21 @@ fi
2139 2139
2140LIBXP= 2140LIBXP=
2141if test "${USE_X_TOOLKIT}" = "MOTIF"; then 2141if test "${USE_X_TOOLKIT}" = "MOTIF"; then
2142 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, 2142 # OpenMotif may be installed in such a way on some GNU/Linux systems.
2143 if test -d /usr/include/openmotif; then
2144 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
2145 emacs_cv_openmotif=yes
2146 case "$canonical" in
2147 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
2148 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
2149 ;;
2150 *)
2151 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
2152 esac
2153 else
2154 emacs_cv_openmotif=no
2155 fi
2156 AC_CACHE_CHECK(for (Open)Motif version 2.1, emacs_cv_motif_version_2_1,
2143 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Xm/Xm.h>]], 2157 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Xm/Xm.h>]],
2144 [[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) 2158 [[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
2145int x = 5; 2159int x = 5;
@@ -2149,6 +2163,9 @@ Motif version prior to 2.1.
2149 emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)]) 2163 emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)])
2150 if test $emacs_cv_motif_version_2_1 = yes; then 2164 if test $emacs_cv_motif_version_2_1 = yes; then
2151 AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp) 2165 AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp)
2166 if test x$emacs_cv_openmotif = xyes; then
2167 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
2168 fi
2152 else 2169 else
2153 AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif, 2170 AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif,
2154 # We put this in CFLAGS temporarily to precede other -I options 2171 # We put this in CFLAGS temporarily to precede other -I options
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index 0c0a88a8408..207a1200169 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,8 @@
12012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Avoid unused variable warning if --with-x-toolkit=motif.
4 * lwlib-Xm.c (make_menu_in_widget): Remove unused variable.
5
12012-07-06 Paul Eggert <eggert@cs.ucla.edu> 62012-07-06 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). 8 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c
index acd11aec6b5..eccb4db23a6 100644
--- a/lwlib/lwlib-Xm.c
+++ b/lwlib/lwlib-Xm.c
@@ -490,7 +490,6 @@ make_menu_in_widget (widget_instance* instance,
490 int child_index; 490 int child_index;
491 widget_value* cur; 491 widget_value* cur;
492 Widget button = 0; 492 Widget button = 0;
493 Widget title = 0;
494 Widget menu; 493 Widget menu;
495 Arg al [256]; 494 Arg al [256];
496 int ac; 495 int ac;
@@ -554,7 +553,7 @@ make_menu_in_widget (widget_instance* instance,
554 { 553 {
555 ac = 0; 554 ac = 0;
556 XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++; 555 XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
557 title = button = XmCreateLabel (widget, cur->name, al, ac); 556 button = XmCreateLabel (widget, cur->name, al, ac);
558 } 557 }
559 else if (lw_separator_p (cur->name, &separator, 1)) 558 else if (lw_separator_p (cur->name, &separator, 1))
560 { 559 {
diff --git a/src/ChangeLog b/src/ChangeLog
index ac16e529b1e..0c791bcd17c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Miscellaneous fixes for non-default X toolkits.
4 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
5 * xterm.c (x_frame_of_widget): Remove redundant prototype.
6 Move under #ifdef USE_LUCID.
7 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
8 definition and usage to avoid warnings.
9
12012-07-31 Jan Djärv <jan.h.d@swipnet.se> 102012-07-31 Jan Djärv <jan.h.d@swipnet.se>
2 11
3 * nsterm.m (openFiles): Fix previous checkin. 12 * nsterm.m (openFiles): Fix previous checkin.
diff --git a/src/xfns.c b/src/xfns.c
index c8c96b642f0..bca43dbd306 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5382,7 +5382,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
5382 /* Create the dialog with PROMPT as title, using DIR as initial 5382 /* Create the dialog with PROMPT as title, using DIR as initial
5383 directory and using "*" as pattern. */ 5383 directory and using "*" as pattern. */
5384 dir = Fexpand_file_name (dir, Qnil); 5384 dir = Fexpand_file_name (dir, Qnil);
5385 dir_xmstring = XmStringCreateLocalized (SDATA (dir)); 5385 dir_xmstring = XmStringCreateLocalized (SSDATA (dir));
5386 pattern_xmstring = XmStringCreateLocalized ("*"); 5386 pattern_xmstring = XmStringCreateLocalized ("*");
5387 5387
5388 XtSetArg (al[ac], XmNtitle, SDATA (prompt)); ++ac; 5388 XtSetArg (al[ac], XmNtitle, SDATA (prompt)); ++ac;
@@ -5435,12 +5435,12 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
5435 5435
5436 XmTextPosition last_pos = XmTextFieldGetLastPosition (wtext); 5436 XmTextPosition last_pos = XmTextFieldGetLastPosition (wtext);
5437 XmTextFieldReplace (wtext, 0, last_pos, 5437 XmTextFieldReplace (wtext, 0, last_pos,
5438 (SDATA (Ffile_name_nondirectory (default_filename)))); 5438 (SSDATA (Ffile_name_nondirectory (default_filename))));
5439 5439
5440 /* Select DEFAULT_FILENAME in the files list box. DEFAULT_FILENAME 5440 /* Select DEFAULT_FILENAME in the files list box. DEFAULT_FILENAME
5441 must include the path for this to work. */ 5441 must include the path for this to work. */
5442 5442
5443 default_xmstring = XmStringCreateLocalized (SDATA (default_filename)); 5443 default_xmstring = XmStringCreateLocalized (SSDATA (default_filename));
5444 5444
5445 if (XmListItemExists (list, default_xmstring)) 5445 if (XmListItemExists (list, default_xmstring))
5446 { 5446 {
diff --git a/src/xterm.c b/src/xterm.c
index b5c5ce33d6c..60f65aa9508 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1438,12 +1438,12 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
1438 1438
1439#ifdef USE_X_TOOLKIT 1439#ifdef USE_X_TOOLKIT
1440 1440
1441static struct frame *x_frame_of_widget (Widget);
1442static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *, 1441static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *,
1443 XrmValue *, XrmValue *, XtPointer *); 1442 XrmValue *, XrmValue *, XtPointer *);
1444static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer, 1443static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer,
1445 XrmValue *, Cardinal *); 1444 XrmValue *, Cardinal *);
1446 1445
1446#ifdef USE_LUCID
1447 1447
1448/* Return the frame on which widget WIDGET is used.. Abort if frame 1448/* Return the frame on which widget WIDGET is used.. Abort if frame
1449 cannot be determined. */ 1449 cannot be determined. */
@@ -1478,9 +1478,6 @@ x_frame_of_widget (Widget widget)
1478 abort (); 1478 abort ();
1479} 1479}
1480 1480
1481
1482#ifdef USE_LUCID
1483
1484/* Allocate a color which is lighter or darker than *PIXEL by FACTOR 1481/* Allocate a color which is lighter or darker than *PIXEL by FACTOR
1485 or DELTA. Try a color with RGB values multiplied by FACTOR first. 1482 or DELTA. Try a color with RGB values multiplied by FACTOR first.
1486 If this produces the same color as PIXEL, try a color where all RGB 1483 If this produces the same color as PIXEL, try a color where all RGB
@@ -1496,7 +1493,7 @@ x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap
1496 return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta); 1493 return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta);
1497} 1494}
1498 1495
1499#endif 1496#endif /* USE_LUCID */
1500 1497
1501 1498
1502/* Structure specifying which arguments should be passed by Xt to 1499/* Structure specifying which arguments should be passed by Xt to
@@ -4635,7 +4632,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
4635 Widget widget; 4632 Widget widget;
4636 Arg av[20]; 4633 Arg av[20];
4637 int ac = 0; 4634 int ac = 0;
4638 char const *scroll_bar_name = SCROLL_BAR_NAME; 4635 const char *scroll_bar_name = SCROLL_BAR_NAME;
4639 unsigned long pixel; 4636 unsigned long pixel;
4640 4637
4641 BLOCK_INPUT; 4638 BLOCK_INPUT;
@@ -4665,7 +4662,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
4665 } 4662 }
4666 4663
4667 widget = XmCreateScrollBar (f->output_data.x->edit_widget, 4664 widget = XmCreateScrollBar (f->output_data.x->edit_widget,
4668 scroll_bar_name, av, ac); 4665 (char *) scroll_bar_name, av, ac);
4669 4666
4670 /* Add one callback for everything that can happen. */ 4667 /* Add one callback for everything that can happen. */
4671 XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback, 4668 XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback,