aboutsummaryrefslogtreecommitdiffstats
path: root/lwlib
diff options
context:
space:
mode:
authorPaul Eggert2012-06-25 18:05:39 -0700
committerPaul Eggert2012-06-25 18:05:39 -0700
commitcf38a720e81b545f90dc7be81891d94df6ed059a (patch)
tree421932c3315e5ded7dab371d26820ed3172bfd23 /lwlib
parent414e642ca92b569cd74d26a2879e0e8fe9f8d6be (diff)
downloademacs-cf38a720e81b545f90dc7be81891d94df6ed059a.tar.gz
emacs-cf38a720e81b545f90dc7be81891d94df6ed059a.zip
Clean out last vestiges of the old HAVE_CONFIG_H stuff.
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/ChangeLog7
-rw-r--r--lwlib/Makefile.in2
-rw-r--r--lwlib/lwlib-Xaw.c36
-rw-r--r--lwlib/lwlib-Xlw.c2
-rw-r--r--lwlib/lwlib-Xm.c2
-rw-r--r--lwlib/lwlib-utils.c2
-rw-r--r--lwlib/lwlib.c2
-rw-r--r--lwlib/xlwmenu.c2
8 files changed, 25 insertions, 30 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index 13b4b3bb351..7f87c5d8e6a 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,10 @@
12012-06-26 Paul Eggert <eggert@cs.ucla.edu>
2
3 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
4 * Makefile.in (ALL_CFLAGS): Remove -DHAVE_CONFIG_H.
5 * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c:
6 * xlwmenu.c: Include <config.h> unconditionally.
7
12012-06-25 Dmitry Antipov <dmantipov@yandex.ru> 82012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
2 9
3 * lwlib.c (my_strcasecmp): Rename to lwlib_strcasecmp, which 10 * lwlib.c (my_strcasecmp): Rename to lwlib_strcasecmp, which
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index d43d9ca211e..d49f69b58a4 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -55,7 +55,7 @@ OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
55ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ 55ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
56 $(C_SWITCH_MACHINE) \ 56 $(C_SWITCH_MACHINE) \
57 $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \ 57 $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \
58 -DHAVE_CONFIG_H -Demacs -I../src \ 58 -Demacs -I../src \
59 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib 59 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
60 60
61.c.o: 61.c.o:
diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c
index 0a759e1a0a0..7f834df1aad 100644
--- a/lwlib/lwlib-Xaw.c
+++ b/lwlib/lwlib-Xaw.c
@@ -20,9 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21Boston, MA 02110-1301, USA. */ 21Boston, MA 02110-1301, USA. */
22 22
23#ifdef HAVE_CONFIG_H
24#include <config.h> 23#include <config.h>
25#endif
26 24
27#include <stdio.h> 25#include <stdio.h>
28#include <setjmp.h> 26#include <setjmp.h>
@@ -148,7 +146,7 @@ get_text_width_and_height (Widget widget, char *text,
148{ 146{
149 int w = 0, h = 0; 147 int w = 0, h = 0;
150 char *bp = text; 148 char *bp = text;
151 149
152 while (bp && *bp != '\0') 150 while (bp && *bp != '\0')
153 { 151 {
154 XGlyphInfo gi; 152 XGlyphInfo gi;
@@ -227,16 +225,16 @@ find_xft_data (Widget widget)
227 Widget parent = XtParent (widget); 225 Widget parent = XtParent (widget);
228 struct widget_xft_data *data = NULL; 226 struct widget_xft_data *data = NULL;
229 int nr; 227 int nr;
230 while (parent && !inst) 228 while (parent && !inst)
231 { 229 {
232 inst = lw_get_widget_instance (parent); 230 inst = lw_get_widget_instance (parent);
233 parent = XtParent (parent); 231 parent = XtParent (parent);
234 } 232 }
235 if (!inst || !inst->xft_data || !inst->xft_data[0].xft_font) return 0; 233 if (!inst || !inst->xft_data || !inst->xft_data[0].xft_font) return 0;
236 234
237 for (nr = 0; data == NULL && nr < inst->nr_xft_data; ++nr) 235 for (nr = 0; data == NULL && nr < inst->nr_xft_data; ++nr)
238 { 236 {
239 if (inst->xft_data[nr].widget == widget) 237 if (inst->xft_data[nr].widget == widget)
240 data = &inst->xft_data[nr]; 238 data = &inst->xft_data[nr];
241 } 239 }
242 240
@@ -250,7 +248,7 @@ command_press (Widget widget,
250 Cardinal *num_params) 248 Cardinal *num_params)
251{ 249{
252 struct widget_xft_data *data = find_xft_data (widget); 250 struct widget_xft_data *data = find_xft_data (widget);
253 if (data) 251 if (data)
254 { 252 {
255 char *lbl; 253 char *lbl;
256 /* Since this isn't used for rectangle buttons, use it to for armed. */ 254 /* Since this isn't used for rectangle buttons, use it to for armed. */
@@ -268,11 +266,11 @@ command_reset (Widget widget,
268 Cardinal *num_params) 266 Cardinal *num_params)
269{ 267{
270 struct widget_xft_data *data = find_xft_data (widget); 268 struct widget_xft_data *data = find_xft_data (widget);
271 if (data) 269 if (data)
272 { 270 {
273 Dimension cr; 271 Dimension cr;
274 XtVaGetValues (widget, XtNcornerRoundPercent, &cr, NULL); 272 XtVaGetValues (widget, XtNcornerRoundPercent, &cr, NULL);
275 if (cr == 1) 273 if (cr == 1)
276 { 274 {
277 char *lbl; 275 char *lbl;
278 XtVaSetValues (widget, XtNcornerRoundPercent, 0, NULL); 276 XtVaSetValues (widget, XtNcornerRoundPercent, 0, NULL);
@@ -366,14 +364,14 @@ void
366xaw_destroy_instance (widget_instance *instance) 364xaw_destroy_instance (widget_instance *instance)
367{ 365{
368#ifdef HAVE_XFT 366#ifdef HAVE_XFT
369 if (instance->xft_data) 367 if (instance->xft_data)
370 { 368 {
371 int i; 369 int i;
372 for (i = 0; i < instance->nr_xft_data; ++i) 370 for (i = 0; i < instance->nr_xft_data; ++i)
373 { 371 {
374 if (instance->xft_data[i].xft_draw) 372 if (instance->xft_data[i].xft_draw)
375 XftDrawDestroy (instance->xft_data[i].xft_draw); 373 XftDrawDestroy (instance->xft_data[i].xft_draw);
376 if (instance->xft_data[i].p != None) 374 if (instance->xft_data[i].p != None)
377 { 375 {
378 XtVaSetValues (instance->xft_data[i].widget, XtNbitmap, None, 376 XtVaSetValues (instance->xft_data[i].widget, XtNbitmap, None,
379 NULL); 377 NULL);
@@ -483,7 +481,7 @@ static XtActionsRec xaw_actions [] = {
483static Boolean actions_initted = False; 481static Boolean actions_initted = False;
484 482
485#ifdef HAVE_XFT 483#ifdef HAVE_XFT
486static XtActionsRec button_actions[] = 484static XtActionsRec button_actions[] =
487 { 485 {
488 { "my_reset", command_reset }, 486 { "my_reset", command_reset },
489 { "my_press", command_press }, 487 { "my_press", command_press },
@@ -563,7 +561,7 @@ make_dialog (char* name,
563 XtVaGetValues (dialog, 561 XtVaGetValues (dialog,
564 XtNnumChildren, &num, 562 XtNnumChildren, &num,
565 XtNchildren, &ch, NULL); 563 XtNchildren, &ch, NULL);
566 for (i = 0; i < num; ++i) 564 for (i = 0; i < num; ++i)
567 { 565 {
568 if (!XtIsSubclass (ch[i], commandWidgetClass) 566 if (!XtIsSubclass (ch[i], commandWidgetClass)
569 && XtIsSubclass (ch[i], labelWidgetClass)) 567 && XtIsSubclass (ch[i], labelWidgetClass))
@@ -574,9 +572,9 @@ make_dialog (char* name,
574 } 572 }
575 instance->xft_data = 0; 573 instance->xft_data = 0;
576 instance->nr_xft_data = 0; 574 instance->nr_xft_data = 0;
577 if (w) 575 if (w)
578 { 576 {
579 XtResource rec[] = 577 XtResource rec[] =
580 { { "font", "Font", XtRString, sizeof(String), 0, XtRString, 578 { { "font", "Font", XtRString, sizeof(String), 0, XtRString,
581 (XtPointer)"Sans-10" }}; 579 (XtPointer)"Sans-10" }};
582 char *fontName = NULL; 580 char *fontName = NULL;
@@ -590,8 +588,8 @@ make_dialog (char* name,
590 else 588 else
591 XFreeFont (XtDisplay (dialog), xfn); 589 XFreeFont (XtDisplay (dialog), xfn);
592 } 590 }
593 591
594 if (xft_font) 592 if (xft_font)
595 { 593 {
596 instance->nr_xft_data = left_buttons + right_buttons + 1; 594 instance->nr_xft_data = left_buttons + right_buttons + 1;
597 instance->xft_data = calloc (instance->nr_xft_data, 595 instance->xft_data = calloc (instance->nr_xft_data,
@@ -639,7 +637,7 @@ make_dialog (char* name,
639 { 637 {
640 ac = 0; 638 ac = 0;
641 XtSetArg (av [ac], XtNfromHoriz, button); ac++; 639 XtSetArg (av [ac], XtNfromHoriz, button); ac++;
642 if (i == 0) 640 if (i == 0)
643 { 641 {
644 /* Separator to the other buttons. */ 642 /* Separator to the other buttons. */
645 XtSetArg (av [ac], XtNhorizDistance, 30); ac++; 643 XtSetArg (av [ac], XtNhorizDistance, 30); ac++;
diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c
index a4467900f8c..e8c59905ab9 100644
--- a/lwlib/lwlib-Xlw.c
+++ b/lwlib/lwlib-Xlw.c
@@ -20,9 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21Boston, MA 02110-1301, USA. */ 21Boston, MA 02110-1301, USA. */
22 22
23#ifdef HAVE_CONFIG_H
24#include <config.h> 23#include <config.h>
25#endif
26 24
27#include <setjmp.h> 25#include <setjmp.h>
28#include <lisp.h> 26#include <lisp.h>
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c
index 4f6276850a3..acd11aec6b5 100644
--- a/lwlib/lwlib-Xm.c
+++ b/lwlib/lwlib-Xm.c
@@ -20,9 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21Boston, MA 02110-1301, USA. */ 21Boston, MA 02110-1301, USA. */
22 22
23#ifdef HAVE_CONFIG_H
24#include <config.h> 23#include <config.h>
25#endif
26 24
27#include <unistd.h> 25#include <unistd.h>
28#include <stdio.h> 26#include <stdio.h>
diff --git a/lwlib/lwlib-utils.c b/lwlib/lwlib-utils.c
index 9286691639f..65cda72fdd8 100644
--- a/lwlib/lwlib-utils.c
+++ b/lwlib/lwlib-utils.c
@@ -20,9 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21Boston, MA 02110-1301, USA. */ 21Boston, MA 02110-1301, USA. */
22 22
23#ifdef HAVE_CONFIG_H
24#include <config.h> 23#include <config.h>
25#endif
26 24
27#include <setjmp.h> 25#include <setjmp.h>
28#include <lisp.h> 26#include <lisp.h>
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c
index d1686ecd048..d436b18d222 100644
--- a/lwlib/lwlib.c
+++ b/lwlib/lwlib.c
@@ -20,9 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21Boston, MA 02110-1301, USA. */ 21Boston, MA 02110-1301, USA. */
22 22
23#ifdef HAVE_CONFIG_H
24#include <config.h> 23#include <config.h>
25#endif
26 24
27#include <setjmp.h> 25#include <setjmp.h>
28#include <lisp.h> 26#include <lisp.h>
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 31e041d3dad..e8831c37f8f 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -22,9 +22,7 @@ Boston, MA 02110-1301, USA. */
22 22
23/* Created by devin@lucid.com */ 23/* Created by devin@lucid.com */
24 24
25#ifdef HAVE_CONFIG_H
26#include <config.h> 25#include <config.h>
27#endif
28 26
29#include <setjmp.h> 27#include <setjmp.h>
30#include <lisp.h> 28#include <lisp.h>