Remove alternative K&R declarations.
* lwlib/lwlib.c (allocate_widget_instance, get_widget_info) (get_widget_instance, find_instance, set_one_value) (update_one_widget_instance, update_all_widget_values) (lw_modify_all_widgets, lw_get_widget, lw_make_widget) (lw_create_widget, lw_pop_all_widgets, lw_show_busy) (lw_refigure_widget, lw_allow_resizing): Remove alternative K&R declarations. * lwlib/lwlib-Xlw.c (xlw_update_one_widget): (xlw_pop_instance): Likewise. * lwlib/lwlib-Xaw.c (xaw_update_one_widget, xaw_pop_instance): Likewise. * lwlib/lwlib-Xm.c (P_): Remove. * src/xdisp.c (store_mode_line_noprop_char): Remove K&R alternative declaration.
This commit is contained in:
parent
295d0d8f20
commit
d8825aa36e
7 changed files with 17 additions and 154 deletions
|
|
@ -1,3 +1,18 @@
|
||||||
|
2010-07-08 Dan Nicolaescu <dann@ics.uci.edu>
|
||||||
|
|
||||||
|
* lwlib.c (allocate_widget_instance, get_widget_info)
|
||||||
|
(get_widget_instance, find_instance, set_one_value)
|
||||||
|
(update_one_widget_instance, update_all_widget_values)
|
||||||
|
(lw_modify_all_widgets, lw_get_widget, lw_make_widget)
|
||||||
|
(lw_create_widget, lw_pop_all_widgets, lw_show_busy)
|
||||||
|
(lw_refigure_widget, lw_allow_resizing): Remove alternative K&R
|
||||||
|
declarations.
|
||||||
|
* lwlib-Xlw.c (xlw_update_one_widget):
|
||||||
|
(xlw_pop_instance): Likewise.
|
||||||
|
* lwlib-Xaw.c (xaw_update_one_widget, xaw_pop_instance):
|
||||||
|
Likewise.
|
||||||
|
* lwlib-Xm.c (P_): Remove.
|
||||||
|
|
||||||
2010-07-07 Andreas Schwab <schwab@linux-m68k.org>
|
2010-07-07 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
|
* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
|
||||||
|
|
|
||||||
|
|
@ -348,16 +348,8 @@ command_reset (Widget widget,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
xaw_update_one_widget (widget_instance *instance, Widget widget,
|
xaw_update_one_widget (widget_instance *instance, Widget widget,
|
||||||
widget_value *val, Boolean deep_p)
|
widget_value *val, Boolean deep_p)
|
||||||
#else
|
|
||||||
xaw_update_one_widget (instance, widget, val, deep_p)
|
|
||||||
widget_instance *instance;
|
|
||||||
Widget widget;
|
|
||||||
widget_value *val;
|
|
||||||
Boolean deep_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
if (XtIsSubclass (widget, scrollbarWidgetClass))
|
if (XtIsSubclass (widget, scrollbarWidgetClass))
|
||||||
|
|
@ -474,13 +466,7 @@ xaw_popup_menu (Widget widget, XEvent *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
xaw_pop_instance (widget_instance *instance, Boolean up)
|
xaw_pop_instance (widget_instance *instance, Boolean up)
|
||||||
#else
|
|
||||||
xaw_pop_instance (instance, up)
|
|
||||||
widget_instance *instance;
|
|
||||||
Boolean up;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Widget widget = instance->widget;
|
Widget widget = instance->widget;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -210,16 +210,8 @@ lw_lucid_widget_p (Widget widget)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
xlw_update_one_widget (widget_instance* instance, Widget widget,
|
xlw_update_one_widget (widget_instance* instance, Widget widget,
|
||||||
widget_value* val, Boolean deep_p)
|
widget_value* val, Boolean deep_p)
|
||||||
#else
|
|
||||||
xlw_update_one_widget (instance, widget, val, deep_p)
|
|
||||||
widget_instance* instance;
|
|
||||||
Widget widget;
|
|
||||||
widget_value* val;
|
|
||||||
Boolean deep_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Arg al[1];
|
Arg al[1];
|
||||||
|
|
||||||
|
|
@ -237,13 +229,7 @@ xlw_update_one_value (widget_instance *instance, Widget widget, widget_value *va
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
xlw_pop_instance (widget_instance* instance, Boolean up)
|
xlw_pop_instance (widget_instance* instance, Boolean up)
|
||||||
#else
|
|
||||||
xlw_pop_instance (instance, up)
|
|
||||||
widget_instance* instance;
|
|
||||||
Boolean up;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,6 @@ Boston, MA 02110-1301, USA. */
|
||||||
#include <Xm/DialogS.h>
|
#include <Xm/DialogS.h>
|
||||||
#include <Xm/Form.h>
|
#include <Xm/Form.h>
|
||||||
|
|
||||||
#undef P_
|
|
||||||
#if defined __STDC__ || defined PROTOTYPES
|
|
||||||
#define P_(X) X
|
|
||||||
#else
|
|
||||||
#define P_(X) ()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum do_call_type { pre_activate, selection, no_selection, post_activate };
|
enum do_call_type { pre_activate, selection, no_selection, post_activate };
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
114
lwlib/lwlib.c
114
lwlib/lwlib.c
|
|
@ -298,18 +298,8 @@ mark_widget_destroyed (Widget widget, XtPointer closure, XtPointer call_data)
|
||||||
instance->widget = NULL;
|
instance->widget = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The messy #ifdef PROTOTYPES here and elsewhere are prompted by a
|
|
||||||
flood of warnings about argument promotion from proprietary ISO C
|
|
||||||
compilers. (etags still only makes one entry for each function.) */
|
|
||||||
static widget_instance *
|
static widget_instance *
|
||||||
#ifdef PROTOTYPES
|
|
||||||
allocate_widget_instance (widget_info* info, Widget parent, Boolean pop_up_p)
|
allocate_widget_instance (widget_info* info, Widget parent, Boolean pop_up_p)
|
||||||
#else
|
|
||||||
allocate_widget_instance (info, parent, pop_up_p)
|
|
||||||
widget_info* info;
|
|
||||||
Widget parent;
|
|
||||||
Boolean pop_up_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_instance* instance =
|
widget_instance* instance =
|
||||||
(widget_instance*)malloc (sizeof (widget_instance));
|
(widget_instance*)malloc (sizeof (widget_instance));
|
||||||
|
|
@ -335,13 +325,7 @@ free_widget_instance (widget_instance *instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
static widget_info *
|
static widget_info *
|
||||||
#ifdef PROTOTYPES
|
|
||||||
get_widget_info (LWLIB_ID id, Boolean remove_p)
|
get_widget_info (LWLIB_ID id, Boolean remove_p)
|
||||||
#else
|
|
||||||
get_widget_info (id, remove_p)
|
|
||||||
LWLIB_ID id;
|
|
||||||
Boolean remove_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_info* info;
|
widget_info* info;
|
||||||
widget_info* prev;
|
widget_info* prev;
|
||||||
|
|
@ -371,13 +355,7 @@ lw_get_widget_info (LWLIB_ID id)
|
||||||
}
|
}
|
||||||
|
|
||||||
static widget_instance *
|
static widget_instance *
|
||||||
#ifdef PROTOTYPES
|
|
||||||
get_widget_instance (Widget widget, Boolean remove_p)
|
get_widget_instance (Widget widget, Boolean remove_p)
|
||||||
#else
|
|
||||||
get_widget_instance (widget, remove_p)
|
|
||||||
Widget widget;
|
|
||||||
Boolean remove_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_info* info;
|
widget_info* info;
|
||||||
widget_instance* instance;
|
widget_instance* instance;
|
||||||
|
|
@ -410,14 +388,7 @@ lw_get_widget_instance (Widget widget)
|
||||||
}
|
}
|
||||||
|
|
||||||
static widget_instance*
|
static widget_instance*
|
||||||
#ifdef PROTOTYPES
|
|
||||||
find_instance (LWLIB_ID id, Widget parent, Boolean pop_up_p)
|
find_instance (LWLIB_ID id, Widget parent, Boolean pop_up_p)
|
||||||
#else
|
|
||||||
find_instance (id, parent, pop_up_p)
|
|
||||||
LWLIB_ID id;
|
|
||||||
Widget parent;
|
|
||||||
Boolean pop_up_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_info* info = get_widget_info (id, False);
|
widget_info* info = get_widget_info (id, False);
|
||||||
widget_instance* instance;
|
widget_instance* instance;
|
||||||
|
|
@ -638,14 +609,7 @@ name_to_widget (widget_instance *instance, char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
set_one_value (widget_instance* instance, widget_value* val, Boolean deep_p)
|
set_one_value (widget_instance* instance, widget_value* val, Boolean deep_p)
|
||||||
#else
|
|
||||||
set_one_value (instance, val, deep_p)
|
|
||||||
widget_instance* instance;
|
|
||||||
widget_value* val;
|
|
||||||
Boolean deep_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Widget widget = name_to_widget (instance, val->name);
|
Widget widget = name_to_widget (instance, val->name);
|
||||||
|
|
||||||
|
|
@ -667,13 +631,7 @@ set_one_value (instance, val, deep_p)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
update_one_widget_instance (widget_instance* instance, Boolean deep_p)
|
update_one_widget_instance (widget_instance* instance, Boolean deep_p)
|
||||||
#else
|
|
||||||
update_one_widget_instance (instance, deep_p)
|
|
||||||
widget_instance* instance;
|
|
||||||
Boolean deep_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_value *val;
|
widget_value *val;
|
||||||
|
|
||||||
|
|
@ -687,13 +645,7 @@ update_one_widget_instance (instance, deep_p)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
update_all_widget_values (widget_info* info, Boolean deep_p)
|
update_all_widget_values (widget_info* info, Boolean deep_p)
|
||||||
#else
|
|
||||||
update_all_widget_values (info, deep_p)
|
|
||||||
widget_info* info;
|
|
||||||
Boolean deep_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_instance* instance;
|
widget_instance* instance;
|
||||||
widget_value* val;
|
widget_value* val;
|
||||||
|
|
@ -706,14 +658,7 @@ update_all_widget_values (info, deep_p)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
#ifdef PROTOTYPES
|
|
||||||
lw_modify_all_widgets (LWLIB_ID id, widget_value* val, Boolean deep_p)
|
lw_modify_all_widgets (LWLIB_ID id, widget_value* val, Boolean deep_p)
|
||||||
#else
|
|
||||||
lw_modify_all_widgets (id, val, deep_p)
|
|
||||||
LWLIB_ID id;
|
|
||||||
widget_value* val;
|
|
||||||
Boolean deep_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_info* info = get_widget_info (id, False);
|
widget_info* info = get_widget_info (id, False);
|
||||||
widget_value* new_val;
|
widget_value* new_val;
|
||||||
|
|
@ -894,14 +839,7 @@ lw_register_widget (type, name, id, val, pre_activate_cb,
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget
|
Widget
|
||||||
#ifdef PROTOTYPES
|
|
||||||
lw_get_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p)
|
lw_get_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p)
|
||||||
#else
|
|
||||||
lw_get_widget (id, parent, pop_up_p)
|
|
||||||
LWLIB_ID id;
|
|
||||||
Widget parent;
|
|
||||||
Boolean pop_up_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_instance* instance;
|
widget_instance* instance;
|
||||||
|
|
||||||
|
|
@ -910,14 +848,7 @@ lw_get_widget (id, parent, pop_up_p)
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget
|
Widget
|
||||||
#ifdef PROTOTYPES
|
|
||||||
lw_make_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p)
|
lw_make_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p)
|
||||||
#else
|
|
||||||
lw_make_widget (id, parent, pop_up_p)
|
|
||||||
LWLIB_ID id;
|
|
||||||
Widget parent;
|
|
||||||
Boolean pop_up_p;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_instance* instance;
|
widget_instance* instance;
|
||||||
widget_info* info;
|
widget_info* info;
|
||||||
|
|
@ -937,25 +868,10 @@ lw_make_widget (id, parent, pop_up_p)
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget
|
Widget
|
||||||
#ifdef PROTOTYPES
|
|
||||||
lw_create_widget (char* type, char* name, LWLIB_ID id, widget_value* val,
|
lw_create_widget (char* type, char* name, LWLIB_ID id, widget_value* val,
|
||||||
Widget parent, Boolean pop_up_p,
|
Widget parent, Boolean pop_up_p,
|
||||||
lw_callback pre_activate_cb, lw_callback selection_cb,
|
lw_callback pre_activate_cb, lw_callback selection_cb,
|
||||||
lw_callback post_activate_cb, lw_callback highlight_cb)
|
lw_callback post_activate_cb, lw_callback highlight_cb)
|
||||||
#else
|
|
||||||
lw_create_widget (type, name, id, val, parent, pop_up_p, pre_activate_cb,
|
|
||||||
selection_cb, post_activate_cb, highlight_cb)
|
|
||||||
char* type;
|
|
||||||
char* name;
|
|
||||||
LWLIB_ID id;
|
|
||||||
widget_value* val;
|
|
||||||
Widget parent;
|
|
||||||
Boolean pop_up_p;
|
|
||||||
lw_callback pre_activate_cb;
|
|
||||||
lw_callback selection_cb;
|
|
||||||
lw_callback post_activate_cb;
|
|
||||||
lw_callback highlight_cb;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
lw_register_widget (type, name, id, val, pre_activate_cb, selection_cb,
|
lw_register_widget (type, name, id, val, pre_activate_cb, selection_cb,
|
||||||
post_activate_cb, highlight_cb);
|
post_activate_cb, highlight_cb);
|
||||||
|
|
@ -1102,13 +1018,7 @@ lw_raise_all_pop_up_widgets (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
lw_pop_all_widgets (LWLIB_ID id, Boolean up)
|
lw_pop_all_widgets (LWLIB_ID id, Boolean up)
|
||||||
#else
|
|
||||||
lw_pop_all_widgets (id, up)
|
|
||||||
LWLIB_ID id;
|
|
||||||
Boolean up;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_info* info = get_widget_info (id, False);
|
widget_info* info = get_widget_info (id, False);
|
||||||
widget_instance* instance;
|
widget_instance* instance;
|
||||||
|
|
@ -1309,13 +1219,7 @@ lw_set_keyboard_focus (Widget parent, Widget w)
|
||||||
|
|
||||||
/* Show busy */
|
/* Show busy */
|
||||||
static void
|
static void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
show_one_widget_busy (Widget w, Boolean flag)
|
show_one_widget_busy (Widget w, Boolean flag)
|
||||||
#else
|
|
||||||
show_one_widget_busy (w, flag)
|
|
||||||
Widget w;
|
|
||||||
Boolean flag;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Pixel foreground = 0;
|
Pixel foreground = 0;
|
||||||
Pixel background = 1;
|
Pixel background = 1;
|
||||||
|
|
@ -1334,13 +1238,7 @@ show_one_widget_busy (w, flag)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
lw_show_busy (Widget w, Boolean busy)
|
lw_show_busy (Widget w, Boolean busy)
|
||||||
#else
|
|
||||||
lw_show_busy (w, busy)
|
|
||||||
Widget w;
|
|
||||||
Boolean busy;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
widget_instance* instance = get_widget_instance (w, False);
|
widget_instance* instance = get_widget_instance (w, False);
|
||||||
widget_info* info;
|
widget_info* info;
|
||||||
|
|
@ -1362,13 +1260,7 @@ lw_show_busy (w, busy)
|
||||||
/* This hack exists because Lucid/Athena need to execute the strange
|
/* This hack exists because Lucid/Athena need to execute the strange
|
||||||
function below to support geometry management. */
|
function below to support geometry management. */
|
||||||
void
|
void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
lw_refigure_widget (Widget w, Boolean doit)
|
lw_refigure_widget (Widget w, Boolean doit)
|
||||||
#else
|
|
||||||
lw_refigure_widget (w, doit)
|
|
||||||
Widget w;
|
|
||||||
Boolean doit;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#if defined (USE_XAW)
|
#if defined (USE_XAW)
|
||||||
XawPanedSetRefigureMode (w, doit);
|
XawPanedSetRefigureMode (w, doit);
|
||||||
|
|
@ -1410,13 +1302,7 @@ lw_set_main_areas (Widget parent, Widget menubar, Widget work_area)
|
||||||
/* Manage resizing for Motif. This disables resizing when the menubar
|
/* Manage resizing for Motif. This disables resizing when the menubar
|
||||||
is about to be modified. */
|
is about to be modified. */
|
||||||
void
|
void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
lw_allow_resizing (Widget w, Boolean flag)
|
lw_allow_resizing (Widget w, Boolean flag)
|
||||||
#else
|
|
||||||
lw_allow_resizing (w, flag)
|
|
||||||
Widget w;
|
|
||||||
Boolean flag;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#if defined (USE_MOTIF)
|
#if defined (USE_MOTIF)
|
||||||
xm_manage_resizing (w, flag);
|
xm_manage_resizing (w, flag);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
2010-07-08 Dan Nicolaescu <dann@ics.uci.edu>
|
2010-07-08 Dan Nicolaescu <dann@ics.uci.edu>
|
||||||
|
|
||||||
|
* xdisp.c (store_mode_line_noprop_char): Remove K&R alternative declaration.
|
||||||
|
|
||||||
Clean up include guards.
|
Clean up include guards.
|
||||||
* tparam.c: Remove include guards for config.h, string.h and code
|
* tparam.c: Remove include guards for config.h, string.h and code
|
||||||
that assumes #ifndef emacs.
|
that assumes #ifndef emacs.
|
||||||
|
|
|
||||||
|
|
@ -9630,12 +9630,7 @@ unwind_format_mode_line (Lisp_Object vector)
|
||||||
Re-allocate mode_line_noprop_buf if necessary. */
|
Re-allocate mode_line_noprop_buf if necessary. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
#ifdef PROTOTYPES
|
|
||||||
store_mode_line_noprop_char (char c)
|
store_mode_line_noprop_char (char c)
|
||||||
#else
|
|
||||||
store_mode_line_noprop_char (c)
|
|
||||||
char c;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
/* If output position has reached the end of the allocated buffer,
|
/* If output position has reached the end of the allocated buffer,
|
||||||
double the buffer's size. */
|
double the buffer's size. */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue