summaryrefslogtreecommitdiff
path: root/lwlib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-06-25 18:05:39 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-06-25 18:05:39 -0700
commitcf38a720e81b545f90dc7be81891d94df6ed059a (patch)
tree421932c3315e5ded7dab371d26820ed3172bfd23 /lwlib
parent414e642ca92b569cd74d26a2879e0e8fe9f8d6be (diff)
downloademacs-cf38a720e81b545f90dc7be81891d94df6ed059a.tar.gz
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 @@
+2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
+
+ Clean out last vestiges of the old HAVE_CONFIG_H stuff.
+ * Makefile.in (ALL_CFLAGS): Remove -DHAVE_CONFIG_H.
+ * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c:
+ * xlwmenu.c: Include <config.h> unconditionally.
+
2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
* 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
ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
$(C_SWITCH_MACHINE) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \
- -DHAVE_CONFIG_H -Demacs -I../src \
+ -Demacs -I../src \
-I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
.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
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <stdio.h>
#include <setjmp.h>
@@ -148,7 +146,7 @@ get_text_width_and_height (Widget widget, char *text,
{
int w = 0, h = 0;
char *bp = text;
-
+
while (bp && *bp != '\0')
{
XGlyphInfo gi;
@@ -227,16 +225,16 @@ find_xft_data (Widget widget)
Widget parent = XtParent (widget);
struct widget_xft_data *data = NULL;
int nr;
- while (parent && !inst)
+ while (parent && !inst)
{
inst = lw_get_widget_instance (parent);
parent = XtParent (parent);
}
if (!inst || !inst->xft_data || !inst->xft_data[0].xft_font) return 0;
- for (nr = 0; data == NULL && nr < inst->nr_xft_data; ++nr)
+ for (nr = 0; data == NULL && nr < inst->nr_xft_data; ++nr)
{
- if (inst->xft_data[nr].widget == widget)
+ if (inst->xft_data[nr].widget == widget)
data = &inst->xft_data[nr];
}
@@ -250,7 +248,7 @@ command_press (Widget widget,
Cardinal *num_params)
{
struct widget_xft_data *data = find_xft_data (widget);
- if (data)
+ if (data)
{
char *lbl;
/* Since this isn't used for rectangle buttons, use it to for armed. */
@@ -268,11 +266,11 @@ command_reset (Widget widget,
Cardinal *num_params)
{
struct widget_xft_data *data = find_xft_data (widget);
- if (data)
+ if (data)
{
Dimension cr;
XtVaGetValues (widget, XtNcornerRoundPercent, &cr, NULL);
- if (cr == 1)
+ if (cr == 1)
{
char *lbl;
XtVaSetValues (widget, XtNcornerRoundPercent, 0, NULL);
@@ -366,14 +364,14 @@ void
xaw_destroy_instance (widget_instance *instance)
{
#ifdef HAVE_XFT
- if (instance->xft_data)
+ if (instance->xft_data)
{
int i;
- for (i = 0; i < instance->nr_xft_data; ++i)
+ for (i = 0; i < instance->nr_xft_data; ++i)
{
if (instance->xft_data[i].xft_draw)
XftDrawDestroy (instance->xft_data[i].xft_draw);
- if (instance->xft_data[i].p != None)
+ if (instance->xft_data[i].p != None)
{
XtVaSetValues (instance->xft_data[i].widget, XtNbitmap, None,
NULL);
@@ -483,7 +481,7 @@ static XtActionsRec xaw_actions [] = {
static Boolean actions_initted = False;
#ifdef HAVE_XFT
-static XtActionsRec button_actions[] =
+static XtActionsRec button_actions[] =
{
{ "my_reset", command_reset },
{ "my_press", command_press },
@@ -563,7 +561,7 @@ make_dialog (char* name,
XtVaGetValues (dialog,
XtNnumChildren, &num,
XtNchildren, &ch, NULL);
- for (i = 0; i < num; ++i)
+ for (i = 0; i < num; ++i)
{
if (!XtIsSubclass (ch[i], commandWidgetClass)
&& XtIsSubclass (ch[i], labelWidgetClass))
@@ -574,9 +572,9 @@ make_dialog (char* name,
}
instance->xft_data = 0;
instance->nr_xft_data = 0;
- if (w)
+ if (w)
{
- XtResource rec[] =
+ XtResource rec[] =
{ { "font", "Font", XtRString, sizeof(String), 0, XtRString,
(XtPointer)"Sans-10" }};
char *fontName = NULL;
@@ -590,8 +588,8 @@ make_dialog (char* name,
else
XFreeFont (XtDisplay (dialog), xfn);
}
-
- if (xft_font)
+
+ if (xft_font)
{
instance->nr_xft_data = left_buttons + right_buttons + 1;
instance->xft_data = calloc (instance->nr_xft_data,
@@ -639,7 +637,7 @@ make_dialog (char* name,
{
ac = 0;
XtSetArg (av [ac], XtNfromHoriz, button); ac++;
- if (i == 0)
+ if (i == 0)
{
/* Separator to the other buttons. */
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
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <setjmp.h>
#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
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <unistd.h>
#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
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <setjmp.h>
#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
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <setjmp.h>
#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. */
/* Created by devin@lucid.com */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <setjmp.h>
#include <lisp.h>