1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtappbuilder: Resolve all compiler warnings

This commit is contained in:
Peter Howkins 2018-04-24 21:55:56 +01:00
parent ee4c38da0a
commit 4007d3a460
79 changed files with 312 additions and 257 deletions

View file

@ -786,12 +786,12 @@ ab_set_busy_cursor(
ABWindow *win;
ABObj module;
ABObj winobj;
static Cursor busy_cursor = NULL;
Cursor new_cursor = NULL;
static Cursor busy_cursor = 0;
Cursor new_cursor = 0;
int num_wins;
int i;
if (busy_cursor == NULL)
if (busy_cursor == 0)
busy_cursor = XCreateFontCursor(XtDisplay(AB_toplevel), XC_watch);
if (on)
@ -1001,7 +1001,7 @@ ab_is_cur_dir(STRING dir)
ab_get_cur_dir(); /* initialize it! */
}
if ((dir == NULL) || (*dir == NULL) || (*dir == '.'))
if ((dir == NULL) || (*dir == 0) || (*dir == '.'))
{
return TRUE;
}

View file

@ -901,7 +901,7 @@ initiate_move(
ABObj geomObj;
Widget geomWidget;
Widget parent;
static Cursor move_cursor = NULL;
static Cursor move_cursor = 0;
rootObj = obj_get_root(obj);
@ -963,7 +963,7 @@ initiate_resize(
if (XtGrabPointer(widget, False,
ButtonReleaseMask | ButtonMotionMask | PointerMotionMask,
GrabModeAsync, GrabModeAsync, NULL,
GrabModeAsync, GrabModeAsync, 0,
resize_cursor, CurrentTime) == GrabSuccess)
return OK;
@ -1098,7 +1098,7 @@ interpose_button_event(
XMotionEvent *mevent;
static XEvent event_cpy;
static DoubleClickInfo *d_click = NULL;
static XtIntervalId timer_id = NULL;
static XtIntervalId timer_id = 0;
ABObj obj = (ABObj)client_data;
ABObj moveObj;

View file

@ -290,8 +290,8 @@ abobjP_get_resize_cursor(
)
{
static Cursor resize_cursor[10] =
{ NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL };
{ 0, 0, 0, 0, 0,
0, 0, 0, 0, 0 };
unsigned int shape;
if (!resize_cursor[dir])
@ -332,7 +332,7 @@ abobjP_get_resize_cursor(
break;
case NONE:
default:
return NULL;
return 0;
}
resize_cursor[dir] = XCreateFontCursor(XtDisplay(w), shape);
}

View file

@ -48,6 +48,7 @@
*
***********************************************************************
*/
#include <stdint.h>
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/cursorfont.h>
@ -452,7 +453,7 @@ turnon_select_feedback(
draw_select_feedback(selObj, resizable);
XtAddEventHandler(selWidget, StructureNotifyMask | ExposureMask, FALSE,
select_feedback_redraw, (XtPointer)resizable);
select_feedback_redraw, (XtPointer)(uintptr_t) resizable);
XtAddEventHandler(selWidget, PointerMotionMask, FALSE,
monitor_cursor, (XtPointer)selObj);
@ -480,7 +481,7 @@ turnoff_select_feedback(
x_get_widget_rect(selWidget, &w_rect);
XtRemoveEventHandler(selWidget, StructureNotifyMask | ExposureMask, FALSE,
select_feedback_redraw, (XtPointer)resizable);
select_feedback_redraw, (XtPointer)(uintptr_t) resizable);
XtRemoveEventHandler(selWidget, PointerMotionMask, FALSE,
monitor_cursor, (XtPointer)selObj);
@ -667,7 +668,7 @@ monitor_cursor(
}
else
{
if ((resize_cursor = abobjP_get_resize_cursor(selWidget, dir)) != NULL)
if ((resize_cursor = abobjP_get_resize_cursor(selWidget, dir)) != 0)
{
XDefineCursor(dpy, win, resize_cursor);
cursor_changed = TRUE;
@ -688,7 +689,7 @@ select_feedback_redraw(
)
{
ABObj selObj = NULL;
BOOL resizable = (BOOL)((unsigned int)clientdata);
BOOL resizable = (BOOL)((uintptr_t) clientdata);
Boolean redraw = FALSE;
selObj = objxm_get_obj_from_widget(selWidget);

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
@ -194,7 +195,7 @@ appfw_editor_init(
/* Primary Main Window */
n = 0;
item[n] = appfw_cgen->rootwin_opmenu_items.None_item;
item_val[n] = NULL; n++;
item_val[n] = 0; n++;
prop_obj_options_init(&(afs->rootwin), appfw_cgen->rootwin_label,
appfw_cgen->rootwin_opmenu, appfw_cgen->rootwin_opmenu_menu,
n, item, (XtPointer*)item_val,

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
@ -853,7 +854,7 @@ load_attch_obj(
&(ats->left_attach_obj),
left_offset,
left_position,
(int)left_obj);
left_obj);
set_attach_values(right_attach_type,
&(ats->right_attach_offset),
@ -861,7 +862,7 @@ load_attch_obj(
&(ats->right_attach_obj),
right_offset,
right_position,
(int)right_obj);
right_obj);
set_attach_values(top_attach_type,
&(ats->top_attach_offset),
@ -869,7 +870,7 @@ load_attch_obj(
&(ats->top_attach_obj),
top_offset,
top_position,
(int)top_obj);
top_obj);
set_attach_values(bottom_attach_type,
&(ats->bottom_attach_offset),
@ -877,7 +878,7 @@ load_attch_obj(
&(ats->bottom_attach_obj),
bottom_offset,
bottom_position,
(int)bottom_obj);
bottom_obj);
/*
* Set object name
@ -1281,12 +1282,12 @@ get_attach_info(
case AB_ATTACH_GRIDLINE:
*type = ATTCH_ED_GRIDLINE;
*offset = attachment->offset;
*position = (int)attachment->value;
*position = (int)(intptr_t) attachment->value;
break;
case AB_ATTACH_CENTER_GRIDLINE:
*type = ATTCH_ED_CENTER_GRIDLINE;
*position = (int)attachment->value;
*position = (int)(intptr_t) attachment->value;
*offset = 0;
break;
@ -1343,13 +1344,13 @@ set_attach_info(
case ATTCH_ED_GRIDLINE:
attachment->type = AB_ATTACH_GRIDLINE;
attachment->value = (void *)position;
attachment->value = (void *)(intptr_t) position;
attachment->offset = offset;
break;
case ATTCH_ED_CENTER_GRIDLINE:
attachment->type = AB_ATTACH_CENTER_GRIDLINE;
attachment->value = (void *)position;
attachment->value = (void *)(intptr_t) position;
attachment->offset = 0;
break;
@ -1572,7 +1573,7 @@ create_obj_menu_dir(
menu,
changebar,
*item = NULL;
int item_values = NULL,
int item_values = 0,
*item_val = NULL,
n = 0;
@ -1636,7 +1637,7 @@ create_obj_menu_dir(
* first one
*/
if (n > 0)
prop_options_set_value(option_setting, (XtPointer)item_val[0], False);
prop_options_set_value(option_setting, (XtPointer)(uintptr_t) item_val[0], False);
if (item)
util_free(item);
@ -2353,7 +2354,7 @@ change_attype_from_sib_to_point(
&offset, &position);
obj_set_attachment(obj, dir, AB_ATTACH_POINT,
(void *)position, offset);
(void *)(uintptr_t) position, offset);
objxm_obj_set_attachment_args(obj, OBJXM_CONFIG_BUILD);
}
}

View file

@ -1839,7 +1839,7 @@ setup_vwr_graphics(
if (!ui_handle->bg_font)
{
Font font = NULL;
Font font = 0;
XtVaGetValues(draw_area, XtNfont, &font, NULL);
ui_handle->bg_font = (XFontStruct *)XQueryFont(dpy, font);
@ -2306,8 +2306,8 @@ aob_create_ui_obj
ui->line_gc = NULL;
ui->sm_font = NULL;
ui->bg_font = NULL;
ui->fg_color = NULL;
ui->bg_color = NULL;
ui->fg_color = 0;
ui->bg_color = 0;
return(ui);
}

View file

@ -689,7 +689,7 @@ init_glyph_elm(
)
{
AB_OBJ *obj = (AB_OBJ *)client_data;
Pixmap image = NULL; /* gotta set to NULL!!! */
Pixmap image = 0;
/*
* Object glyph
@ -1882,12 +1882,12 @@ get_toplevel_drawarea(
BrowserUiObj ui;
if (!v)
return (NULL);
return 0;
ui = (BrowserUiObj)v->ui_handle;
if (!ui)
return (NULL);
return 0;
instance = (DtbBrwsMainwindowInfo)ui->ip;
@ -1904,12 +1904,12 @@ get_detailed_drawarea(
BrowserUiObj ui;
if (!v)
return (NULL);
return 0;
ui = (BrowserUiObj)v->ui_handle;
if (!ui)
return (NULL);
return 0;
instance = (DtbBrwsMainwindowInfo)(ui->ip);
@ -1926,12 +1926,12 @@ get_proj_drawarea(
BrowserUiObj ui;
if (!v)
return (NULL);
return 0;
ui = (BrowserUiObj)v->ui_handle;
if (!ui)
return (NULL);
return 0;
proj_d = (DtbProjProjMainInfo)ui->ip;

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
@ -240,7 +241,7 @@ cgenP_cancel_envCB(
DtbCgenEnvDialogInfo env_dlg = (DtbCgenEnvDialogInfo)clientData;
char buf[10];
sprintf(buf, "");
sprintf(buf, "%s", "");
XmTextFieldSetString(env_dlg->name_textf, buf);
XmTextSetString(env_dlg->textpane, buf);

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -49,6 +49,7 @@
#define _POSIX_SOURCE 1
#endif
#include <stdint.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
@ -703,7 +704,7 @@ term_execute_command(CG_SUBCOMMAND cmd_code, STRING cmd, STRING argv[])
int putenv_var_size = 0;
setpgid(0,0); /* make process group leader */
write_to_status_pipe(CG_STATUS_STARTED, cmd_code, (void*)getpgrp());
write_to_status_pipe(CG_STATUS_STARTED, cmd_code, (void*)(intptr_t) getpgrp());
for (i = 0; i < num_env_vars; ++i)
{
@ -833,7 +834,7 @@ term_execute_command(CG_SUBCOMMAND cmd_code, STRING cmd, STRING argv[])
if (status_pipe_write >= 0)
{
write_to_status_pipe(status_code, cmd_code, (void*)exit_code);
write_to_status_pipe(status_code, cmd_code, (void*)(intptr_t) exit_code);
util_fdclose(status_pipe_write);
}
subprocess_exit(exit_code);
@ -1583,12 +1584,12 @@ pipe_data_ready_proc(
switch (status_code)
{
case CG_STATUS_STARTED:
actual_process_pgid = (pid_t)status_data;
actual_process_pgid = (pid_t)(intptr_t) status_data;
/*util_dprintf(2,"rcv started: %ld\n", (long)actual_process_pgid);*/
break;
case CG_STATUS_EXITED:
exit_code = (int)status_data;
exit_code = (int)(intptr_t) status_data;
actual_process_pgid = INVALID_PID;
/*util_dprintf(2,"rcv exit(%d)\n", exit_code);*/
if (aborted)
@ -1607,7 +1608,7 @@ pipe_data_ready_proc(
break;
case CG_STATUS_SIGNALLED:
kill_signal = (int)status_data;
kill_signal = (int)(intptr_t) status_data;
/*util_dprintf(2,"rcv signalled(%d)\n", kill_signal);*/
actual_process_pgid = INVALID_PID;
goto_ready_state();

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
@ -832,7 +833,7 @@ dnd_fetch_attrs(
obj_get_drag_cursor_mask(obj), False);
if (dragOps != 0)
prop_radiobox_set_value(&(dds->drag_types_radiobox),
(XtPointer)dragType, False);
(XtPointer)(uintptr_t) dragType, False);
prop_checkbox_set_value(&(dds->drop_ops_checkbox),
ABDndOpCopy, ((dropOps & ABDndOpCopy) != 0), False);

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@ -1068,8 +1069,8 @@ import_change_modeCB(
{
XmToggleButtonCallbackStruct *state =
(XmToggleButtonCallbackStruct *)callData;
int ImportMode = (int) clientData;
ChooserInfo info = NULL;
int ImportMode = (int)(intptr_t) clientData;
ChooserInfo info = 0;
if (state->set)
{
@ -1098,7 +1099,7 @@ import_formatCB(
{
XmToggleButtonCallbackStruct *state =
(XmToggleButtonCallbackStruct *)callData;
int ImportFormat = (int) clientData;
int ImportFormat = (int)(intptr_t) clientData;
ChooserInfo info = NULL;
Widget method_rbox = NULL;
@ -1231,7 +1232,7 @@ main(int argc, char **argv)
layout_menu = (Widget) NULL;
ABInitProcInfo init_proc_info = NULL;
int status = 0;
Pixmap xpm_pixmap = NULL;
Pixmap xpm_pixmap = 0;
int num_mouse_buttons = 0;
#ifdef DEBUG /* performance testing */
@ -1569,18 +1570,18 @@ main(int argc, char **argv)
/* Register Menu Palette Obj */
pal_register_item_info(NULL, ab_menu_palitem, (int)AB_NO_SUBTYPE,
NULL, NULL);
NULL, 0);
/* Register Group Palette Obj */
pal_register_item_info(NULL, ab_group_palitem, (int)AB_CONT_GROUP,
"Group", NULL);
"Group", 0);
/* Register Paned Window Palette Obj */
pal_register_item_info(NULL, ab_panedwin_palitem, (int)AB_CONT_PANED,
NULL, NULL);
NULL, 0);
pal_register_item_info(NULL, ab_button_palitem, (int)AB_BUT_DRAWN,
"Drawn Button", NULL);
"Drawn Button", 0);
/* Register All Editable objects which are not Palette Items */
pal_register_editable_obj(AB_TYPE_PROJECT, (int)AB_NO_SUBTYPE,

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
@ -102,7 +103,7 @@ typedef struct HELP_OBJ_TYPE_INFO_REC {
int subtype;
} HelpObjTypeInfoRec;
static HelpObjTypeInfoRec HelpObjTypeInfo = {
((AB_OBJECT_TYPE)NULL), ((int) NULL),
((AB_OBJECT_TYPE)NULL), 0,
};
typedef struct HELP_EDITOR_SETTINGS {
@ -897,8 +898,8 @@ help_dispatchCB(Widget widget, XtPointer clientData, XtPointer callData)
** Checking the status of the more-help info also lets us decide whether
** the "More..." button should be enabled on the dialog.
*/
if( help_volume ==0 || *(help_volume) == NULL ||
help_location ==0 || *(help_location)== NULL){
if( help_volume ==0 || *(help_volume) == 0 ||
help_location ==0 || *(help_location)== 0){
buffer[0] = '\0';
}
else {
@ -1373,7 +1374,7 @@ help_back_hdlr(Widget widget, XtPointer clientData, XtPointer callData)
** Parse the combined volume/locationID string. Disable the "More..."
** button if there isn't any help info, and enable it if there is.
*/
if( buffer == 0 || (*buffer == NULL) ||
if( buffer == 0 || (*buffer == 0) ||
(cp=strrchr(buffer,'/')) == (char *)NULL) {
XtSetSensitive(more_button,False);
}

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
@ -877,7 +878,7 @@ typeCB(
}
/* Set the default button to be Action1 */
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != (XtPointer) AB_DEFAULT_BTN_ACTION1)
{
prop_options_set_value(&(mes->default_btn),
(XtPointer)AB_DEFAULT_BTN_ACTION1, True);
@ -928,7 +929,7 @@ typeCB(
}
/* Set the default button to be Cancel */
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_CANCEL)
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != (XtPointer) AB_DEFAULT_BTN_CANCEL)
{
prop_options_set_value(&(mes->default_btn),
(XtPointer)AB_DEFAULT_BTN_CANCEL, True);
@ -979,7 +980,7 @@ typeCB(
}
/* Set the default button to be Action2 */
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION2)
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != (XtPointer) AB_DEFAULT_BTN_ACTION2)
{
prop_options_set_value(&(mes->default_btn),
(XtPointer)AB_DEFAULT_BTN_ACTION2, True);
@ -1031,7 +1032,7 @@ typeCB(
}
/* Set the default button to be Action1 */
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != (XtPointer) AB_DEFAULT_BTN_ACTION1)
{
prop_options_set_value(&(mes->default_btn),
(XtPointer)AB_DEFAULT_BTN_ACTION1, True);
@ -1079,7 +1080,7 @@ typeCB(
}
/* Set the default button to be Action1 */
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != (XtPointer) AB_DEFAULT_BTN_ACTION1)
{
prop_options_set_value(&(mes->default_btn),
(XtPointer)AB_DEFAULT_BTN_ACTION1, True);

View file

@ -179,7 +179,7 @@ pal_register_item_info(
newsub[i] = sub[i];
newsub[i].subtype = subtype;
newsub[i].pixmap = NULL;
newsub[i].pixmap = 0;
newsub[i].subname = XtNewString(subname);
XtFree((char *)(palitem->subinfo));
palitem->subinfo = newsub;
@ -297,7 +297,7 @@ pal_get_item_pixmap(
}
*p_width = *p_height = 0;
return NULL;
return 0;
}
STRING

View file

@ -44,6 +44,7 @@
/*
* pal_combobox.c - Implements Palette ComboBox object functionality
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <ab_private/obj_notify.h>
@ -527,7 +528,7 @@ combo_box_prop_load(
/* Load Read Only */
prop_radiobox_set_value(&(pcs->combobox_type),
(XtPointer)obj_get_read_only(obj), False);
(XtPointer)(intptr_t) obj_get_read_only(obj), False);
/* Load Initial State */
prop_checkbox_set_value(&(pcs->init_state), AB_STATE_VISIBLE,

View file

@ -457,7 +457,7 @@ initiate_drag(
static unsigned int max_c_width = 0; /* The maximum cursor size */
static unsigned int max_c_height = 0;
static Pixmap item_pixmap = NULL;/* pixmap for cursor */
static Pixmap item_pixmap = 0;/* pixmap for cursor */
static GC p_gc = NULL; /* GC used for pixmap creation */
char *server_vendor = NULL;
PalItemInfo *palitem; /* palette obj */

View file

@ -44,6 +44,7 @@
/*
* pal_custdlg.c - Implements Palette CustomDialog object functionality
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <ab_private/util.h>
@ -300,7 +301,7 @@ custdlg_prop_init(
/* Window Parent */
n = 0;
item[n] = cgen->winparent_opmenu_items.None_item;
item_val[n] = NULL; n++;
item_val[n] = 0; n++;
prop_obj_options_init(&(pcs->win_parent), cgen->winparent_opmenu_label,
cgen->winparent_opmenu, cgen->winparent_opmenu_menu,
n, item, (XtPointer*)item_val,
@ -335,7 +336,7 @@ custdlg_prop_init(
/* Default Button */
n = 0;
item[n] = cgen->defaultb_opmenu_items.None_item;
item_val[n] = NULL; n++;
item_val[n] = 0; n++;
prop_obj_options_init(&(pcs->default_but), cgen->defaultb_opmenu_label,
cgen->defaultb_opmenu, cgen->defaultb_opmenu_menu,
n, item, (XtPointer*)item_val,
@ -345,7 +346,7 @@ custdlg_prop_init(
/* Help Button */
n = 0;
item[n] = cgen->helpb_opmenu_items.None_item;
item_val[n] = NULL; n++;
item_val[n] = 0; n++;
prop_obj_options_init(&(pcs->help_but), cgen->helpb_opmenu_label,
cgen->helpb_opmenu, cgen->helpb_opmenu_menu,
n, item, (XtPointer*)item_val,
@ -506,7 +507,7 @@ custdlg_prop_load(
/* Load Resize Mode */
prop_radiobox_set_value(&(pcs->resize_mode),
(XtPointer)obj_get_resizable(obj), False);
(XtPointer)(intptr_t) obj_get_resizable(obj), False);
/* Load Window Areas */
area = objxm_comp_custdlg_get_area(obj, AB_CONT_BUTTON_PANEL);
@ -867,10 +868,10 @@ custdlg_create_buttons(
obj_set_is_initially_visible(bobj, True);
obj_set_is_initially_active(bobj, True);
startpos = endpos + 10;
obj_set_attachment(bobj, AB_CP_WEST, AB_ATTACH_GRIDLINE, (void*)startpos, 0);
obj_set_attachment(bobj, AB_CP_WEST, AB_ATTACH_GRIDLINE, (void*)(intptr_t) startpos, 0);
endpos = startpos + 20;
obj_set_attachment(bobj, AB_CP_EAST, AB_ATTACH_GRIDLINE, (void*)endpos, 0);
obj_set_attachment(bobj, AB_CP_NORTH, AB_ATTACH_POINT, (void*)0, 5);
obj_set_attachment(bobj, AB_CP_EAST, AB_ATTACH_GRIDLINE, (void*)(intptr_t) endpos, 0);
obj_set_attachment(bobj, AB_CP_NORTH, AB_ATTACH_POINT, NULL, 5);
}
}

View file

@ -45,6 +45,7 @@
* pal_group.c - Implements Group object functionality
*/
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
@ -1943,7 +1944,7 @@ group_align_hcenters(
int height = abobj_get_actual_height(child);
attach.type = AB_ATTACH_GRIDLINE;
attach.value = (void *)gridline;
attach.value = (void *)(intptr_t) gridline;
attach.offset = -(height/2);
}
@ -2360,7 +2361,7 @@ group_align_vcenters(
int width = abobj_get_actual_width(child);
attach.type = AB_ATTACH_GRIDLINE;
attach.value = (void *)gridline;
attach.value = (void *)(intptr_t) gridline;
attach.offset = -(width/2);
}

View file

@ -44,6 +44,7 @@
/*
* pal_list.c - Implements Palette List object functionality
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <ab_private/obj_notify.h>
@ -706,7 +707,7 @@ list_prop_apply(
}
if (prop_changed(pls->hgt.changebar))
{
metric = (int)prop_options_get_value(&(pls->hgt_metric));
metric = (int)(intptr_t) prop_options_get_value(&(pls->hgt_metric));
new_h = prop_geomfield_get_value(&(pls->hgt), GEOM_HEIGHT);
abobj_set_num_rows(pls->current_obj,

View file

@ -43,6 +43,7 @@
/*
* pal_mainwin.c - Implements Palette Main Window object functionality
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <ab_private/ab.h>
@ -455,7 +456,7 @@ mainwin_prop_load(
/* Load Resize Mode */
prop_radiobox_set_value(&(pms->resize_mode),
(XtPointer)obj_get_resizable(obj), False);
(XtPointer)(intptr_t) obj_get_resizable(obj), False);
/* Load Icon Filename */
prop_field_set_value(&(pms->icon), obj_get_icon(obj), False);

View file

@ -44,6 +44,7 @@
* pal_menu.c - Implements Palette Menu object functionality
* NOTE: menu not actually ON the main palette
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <ab_private/obj_notify.h>
@ -577,7 +578,7 @@ menu_prop_load(
{
/* Load Tearoff */
prop_radiobox_set_value(&(pms->tearoff),
(XtPointer)(obj->info.menu.tear_off), False);
(XtPointer)(intptr_t) (obj->info.menu.tear_off), False);
/* Load Color */
prop_colorfield_set_value(&(pms->bg_color), obj_get_bg_color(obj), False);

View file

@ -44,6 +44,7 @@
/*
* pal_scale.c - Implements Palette Scale/Gauge object functionality
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <ab_private/ab.h>
@ -531,7 +532,7 @@ scale_prop_load(
/* Load Scale Type */
prop_radiobox_set_value(&(pss->scale_type),
(XtPointer)obj_get_read_only(obj), False);
(XtPointer)(intptr_t) obj_get_read_only(obj), False);
/* Load Orientation */
orient = obj_get_orientation(obj);

View file

@ -44,6 +44,7 @@
/*
* pal_termp.c - Implements Palette TermPane object functionality
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <Dt/TermPrim.h>
@ -545,7 +546,7 @@ termp_prop_apply(
}
if (prop_changed(pts->size.changebar))
{
metric = (int)prop_options_get_value(&(pts->size_metric));
metric = (int)(intptr_t) prop_options_get_value(&(pts->size_metric));
new_w = prop_geomfield_get_value(&(pts->size), GEOM_WIDTH);
new_h = prop_geomfield_get_value(&(pts->size), GEOM_HEIGHT);

View file

@ -44,6 +44,7 @@
/*
* pal_textf.c - Implements Palette TextField object functionality
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <ab_private/pal.h>
@ -466,7 +467,7 @@ textf_prop_load(
obj->label_type, obj_get_label(obj), AB_LINE_UNDEF);
/* Load Operation */
prop_radiobox_set_value(&(pts->op),
(XtPointer)obj_get_read_only(obj), False);
(XtPointer)(intptr_t) obj_get_read_only(obj), False);
/* Load Maximum Chars */
prop_field_set_numeric_value(&(pts->max_chars), obj_get_max_length(obj), False);
@ -580,7 +581,7 @@ textf_prop_apply(
}
if (prop_changed(pts->size.changebar))
{
metric = (int)prop_options_get_value(&(pts->size_metric));
metric = (int)(intptr_t) prop_options_get_value(&(pts->size_metric));
new_w = prop_geomfield_get_value(&(pts->size), GEOM_WIDTH);
abobj_set_num_columns(pts->current_obj,

View file

@ -44,6 +44,7 @@
/*
* pal_textp.c - Implements Palette TextPane object functionality
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <ab_private/util.h>
@ -488,7 +489,7 @@ textp_prop_load(
/* Load Operation */
prop_radiobox_set_value(&(pts->op),
(XtPointer)obj_get_read_only(obj), False);
(XtPointer)(intptr_t) obj_get_read_only(obj), False);
/* Load Menu Name/Title */
prop_menuname_set_value(&(pts->menuname), obj_get_menu_name(obj), False);
@ -581,7 +582,7 @@ textp_prop_apply(
}
if (prop_changed(pts->size.changebar))
{
metric = (int)prop_options_get_value(&(pts->size_metric));
metric = (int)(intptr_t) prop_options_get_value(&(pts->size_metric));
new_w = prop_geomfield_get_value(&(pts->size), GEOM_WIDTH);
new_h = prop_geomfield_get_value(&(pts->size), GEOM_HEIGHT);

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
@ -227,15 +228,15 @@ register_palette_info(
{
case AB_TYPE_BASE_WINDOW:
pal_register_item_info(palitem_w, ab_mainwin_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
case AB_TYPE_BUTTON:
if (strcmp(subtypestr, "AB_BUT_PUSH") == 0)
pal_register_item_info(palitem_w, ab_button_palitem,
(int)AB_BUT_PUSH, ab_button_palitem->name, NULL);
(int)AB_BUT_PUSH, ab_button_palitem->name, 0);
else if (strcmp(subtypestr, "AB_BUT_MENU") == 0)
pal_register_item_info(palitem_w, ab_button_palitem,
(int)AB_BUT_MENU, "Menu Button", NULL);
(int)AB_BUT_MENU, "Menu Button", 0);
break;
case AB_TYPE_COMBO_BOX:
{
@ -243,7 +244,7 @@ register_palette_info(
WidgetList children = NULL;
pal_register_item_info(palitem_w, ab_combo_box_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
num_children = 0;
XtVaGetValues(palitem_w,
@ -265,53 +266,53 @@ register_palette_info(
case AB_TYPE_CONTAINER:
if (strcmp(subtypestr, "AB_CONT_RELATIVE") == 0)
pal_register_item_info(palitem_w, ab_cpanel_palitem,
(int)AB_CONT_RELATIVE, ab_cpanel_palitem->name, NULL);
(int)AB_CONT_RELATIVE, ab_cpanel_palitem->name, 0);
else if (strcmp(subtypestr, "AB_CONT_MENU_BAR") == 0)
pal_register_item_info(palitem_w, ab_menubar_palitem,
(int)AB_CONT_MENU_BAR, ab_menubar_palitem->name, NULL);
(int)AB_CONT_MENU_BAR, ab_menubar_palitem->name, 0);
break;
case AB_TYPE_DIALOG:
pal_register_item_info(palitem_w, ab_custdlg_palitem,
(int)AB_NO_SUBTYPE, ab_custdlg_palitem->name, NULL);
(int)AB_NO_SUBTYPE, ab_custdlg_palitem->name, 0);
break;
case AB_TYPE_LABEL:
pal_register_item_info(palitem_w, ab_label_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
case AB_TYPE_TERM_PANE:
pal_register_item_info(palitem_w, ab_termp_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
case AB_TYPE_TEXT_FIELD:
pal_register_item_info(palitem_w, ab_textf_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
case AB_TYPE_TEXT_PANE:
pal_register_item_info(palitem_w, ab_textp_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
case AB_TYPE_LIST:
pal_register_item_info(palitem_w, ab_list_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
case AB_TYPE_CHOICE:
if (strcmp(subtypestr, "AB_CHOICE_EXCLUSIVE") == 0)
pal_register_item_info(palitem_w, ab_choice_palitem,
(int)AB_CHOICE_EXCLUSIVE, "Radio Box", NULL);
(int)AB_CHOICE_EXCLUSIVE, "Radio Box", 0);
else if (strcmp(subtypestr, "AB_CHOICE_OPTION_MENU") == 0)
pal_register_item_info(palitem_w, ab_choice_palitem,
(int)AB_CHOICE_OPTION_MENU, "Option Menu", NULL);
(int)AB_CHOICE_OPTION_MENU, "Option Menu", 0);
else
pal_register_item_info(palitem_w, ab_choice_palitem,
(int)AB_CHOICE_NONEXCLUSIVE, "Check Box", NULL);
(int)AB_CHOICE_NONEXCLUSIVE, "Check Box", 0);
break;
case AB_TYPE_DRAWING_AREA:
pal_register_item_info(palitem_w, ab_drawp_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
case AB_TYPE_SEPARATOR:
pal_register_item_info(palitem_w, ab_separator_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
case AB_TYPE_SPIN_BOX:
{
@ -319,7 +320,7 @@ register_palette_info(
WidgetList children = NULL;
pal_register_item_info(palitem_w, ab_spinbox_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
XtVaGetValues(palitem_w,
XtNnumChildren, &num_children,
@ -357,7 +358,7 @@ register_palette_info(
{
pal_register_item_info(palitem_w, ab_scale_palitem,
(int)False, "Scale", NULL);
(int)False, "Scale", 0);
/*
* Register sub-widgets of scale as well
*/
@ -371,7 +372,7 @@ register_palette_info(
else
{
pal_register_item_info(palitem_w, ab_scale_palitem,
(int)True, "Gauge", NULL);
(int)True, "Gauge", 0);
/*
* Register sub-widgets of gauge as well
*/
@ -386,7 +387,7 @@ register_palette_info(
}
case AB_TYPE_FILE_CHOOSER:
pal_register_item_info(palitem_w, ab_fchooser_palitem,
(int)AB_NO_SUBTYPE, NULL, NULL);
(int)AB_NO_SUBTYPE, NULL, 0);
break;
}
}

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -38,6 +38,7 @@
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"

View file

@ -48,6 +48,7 @@
*
***********************************************************************
*/
#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <Xm/MessageB.h>
@ -361,7 +362,7 @@ destroyCB(
XtPointer call_data
)
{
int yes = (int)client_data;
int yes = (int)(intptr_t) client_data;
/* REMIND: aim,1/29/94 - temp. fix for prompt dialog crashing */
if (yes == 1)

View file

@ -207,7 +207,7 @@ static UiObjPixmap object_pixmaps[] =
/*
* Default pixmap
*/
static Pixmap default_pixmap = NULL;
static Pixmap default_pixmap = 0;
static unsigned int default_pixmap_width = 0;
static unsigned int default_pixmap_height = 0;
@ -472,8 +472,8 @@ ui_set_label_glyph(
STRING fileName
)
{
Pixmap labelPixmap = NULL;
Pixmap labelInsensitivePixmap = NULL;
Pixmap labelPixmap = 0;
Pixmap labelInsensitivePixmap = 0;
XtVaGetValues(widget,
XmNlabelPixmap, &labelPixmap,
@ -797,14 +797,14 @@ ui_set_busy_cursor(
BOOL on
)
{
static Cursor busy_cursor = NULL;
static Cursor busy_cursor = 0;
static Display *dpy = NULL;
if (on) /* Turn ON busy cursor */
{
dpy = XtDisplay(AB_toplevel);
if (busy_cursor == NULL)
if (busy_cursor == 0)
busy_cursor = XCreateFontCursor(dpy, XC_watch);
XDefineCursor(dpy, window, busy_cursor);
@ -920,7 +920,7 @@ ui_get_obj_pixmap
int i;
AB_OBJECT_TYPE type;
int subtype;
Pixmap p = NULL;
Pixmap p = 0;
BOOL found = FALSE;
if (!obj || !pixmap || !width || !height)
@ -1164,7 +1164,7 @@ ui_sync_display_of_widget(Widget widget)
syncData.last_expose_ticks = 0;
syncData.timeout_ticks = 0;
syncData.display = NULL;
syncData.window = NULL;
syncData.window = 0;
#define last_expose_ticks (syncData.last_expose_ticks)
#define synced (syncData.synced)
#define timeout_ticks (syncData.timeout_ticks)
@ -1351,7 +1351,7 @@ ui_initiate_rubberband(
ButtonReleaseMask | ButtonMotionMask | PointerMotionMask,
GrabModeAsync, GrabModeAsync,
confine_to_window ? XtWindow(widget) : None,
NULL, CurrentTime) == GrabSuccess)
0, CurrentTime) == GrabSuccess)
{
rband_in_progress = True;
rubberband_func = rb_func;

View file

@ -49,6 +49,7 @@
#include <assert.h> /* assert() */
#include <stdio.h> /* FILE*, BUFSIZ */
#include <stdint.h>
#include <sys/param.h> /* MAXPATHLEN, ... */
#include <nl_types.h>
#include <X11/Intrinsic.h>
@ -174,7 +175,7 @@ typedef CGenAnyData CGenData;
#define mfobj_set_module_data(_obj,_data) \
( mfobj_set_flags(_obj, CGenFlagDataIsModule), \
((int)(mfobj_data(_obj)->info.module = (_data))) \
((int)(intptr_t)(mfobj_data(_obj)->info.module = (_data))) \
)
#define mfobj_get_module_data(obj) \

View file

@ -44,6 +44,7 @@
*/
#include <stdio.h>
#include <stdint.h>
#include <assert.h>
#include <Xm/Xm.h>
#include <Xm/XmStrDefs.h>
@ -213,10 +214,10 @@ abmfP_args_init(void)
/* INT VALUES */
#define dump_int_resource(inst,name,value) \
(wroteResource = TRUE, \
fprintf(fp,"%s.%s:\t%d\n", inst, name, value))
fprintf(fp,"%s.%s:\t%d\n", inst, name, (int)(intptr_t)value))
#define write_int_resource(name,value) \
(wroteResource = TRUE, abio_printf(fp,"%s, %d", name, (int)(value)))
(wroteResource = TRUE, abio_printf(fp,"%s, %d", name, (int)(intptr_t)(value)))
/* STRING values */
#define dump_str_resource(inst,name,value) \

View file

@ -644,53 +644,53 @@ write_define_display_var(GenCodeInfo genCodeInfo)
/*
* var: Drawable drawable = NULL;
* var: Drawable drawable = 0;
*/
static int
write_define_drawable_var(GenCodeInfo genCodeInfo)
{
make_istr_var_name(varDrawable, "drawable");
write_define_var(genCodeInfo, &abmfP_drawable_var(genCodeInfo),
"Drawable", varDrawable, abmfP_str_null);
"Drawable", varDrawable, abmfP_str_zero);
return 0;
}
/*
* var: Pixmap icon_pixmap = NULL;
* var: Pixmap icon_pixmap = 0;
*/
static int
write_define_icon_pixmap_var(GenCodeInfo genCodeInfo)
{
make_istr_var_name(varIconPixmap, "icon_pixmap");
write_define_var(genCodeInfo, &abmfP_icon_pixmap_var(genCodeInfo),
"Pixmap", varIconPixmap, abmfP_str_null);
"Pixmap", varIconPixmap, abmfP_str_zero);
return 0;
}
/*
* var: Pixmap icon_mask_pixmap = NULL;
* var: Pixmap icon_mask_pixmap = 0;
*/
static int
write_define_icon_mask_pixmap_var(GenCodeInfo genCodeInfo)
{
make_istr_var_name(varIconPixmap, "icon_mask_pixmap");
write_define_var(genCodeInfo, &abmfP_icon_mask_pixmap_var(genCodeInfo),
"Pixmap", varIconPixmap, abmfP_str_null);
"Pixmap", varIconPixmap, abmfP_str_zero);
return 0;
}
/*
* var: Pixmap label_pixmap = NULL;
* var: Pixmap label_pixmap = 0;
*/
static int
write_define_label_pixmap_var(GenCodeInfo genCodeInfo)
{
make_istr_var_name(varLabelPixmap, "label_pixmap");
write_define_var(genCodeInfo, &abmfP_label_pixmap_var(genCodeInfo),
"Pixmap", varLabelPixmap, abmfP_str_null);
"Pixmap", varLabelPixmap, abmfP_str_zero);
return 0;
}

View file

@ -190,7 +190,7 @@ write_assign_local_vars_for_icon(GenCodeInfo genCodeInfo, ABObj obj)
else
*/
{
sprintf(parentName, abmfP_get_widget_parent_name(genCodeInfo, obj));
sprintf(parentName, "%s", abmfP_get_widget_parent_name(genCodeInfo, obj));
}
}

View file

@ -264,11 +264,11 @@ static LibFuncRec abmfP_lrc_set_label_pixmaps =
" * Set the approriate resources.\n"
" */\n"
" XtVaSetValues(widget, XmNlabelType, XmPIXMAP, NULL);\n"
" if (labelPixmap != NULL)\n"
" if (labelPixmap != 0)\n"
" {\n"
" XtVaSetValues(widget, XmNlabelPixmap, labelPixmap, NULL);\n"
" }\n"
" if (labelInsensitivePixmap != NULL)\n"
" if (labelInsensitivePixmap != 0)\n"
" {\n"
" XtVaSetValues(widget, XmNlabelInsensitivePixmap, \n"
" labelInsensitivePixmap, NULL);\n"
@ -952,8 +952,8 @@ static LibFuncRec abmfP_lrc_help_dispatch =
" ** Checking the status of the more-help info also lets us decide whether\n"
" ** the \"More...\" button should be enabled on the dialog.\n"
" */\n"
" if( help_data->help_volume ==0 || *(help_data->help_volume) == NULL ||\n"
" help_data->help_locationID ==0 || *(help_data->help_locationID)== NULL){\n"
" if( help_data->help_volume ==0 || *(help_data->help_volume) == 0 ||\n"
" help_data->help_locationID ==0 || *(help_data->help_locationID)== 0){\n"
" buffer[0] = '\\0';\n"
" }\n"
" else {\n"
@ -1075,7 +1075,7 @@ static LibFuncRec abmfP_lrc_help_back_hdlr =
" ** Parse the combined volume/locationID string. Disable the \"More...\"\n"
" ** button if there isn't any help info, and enable it if there is.\n"
" */\n"
" if( buffer == 0 || (*buffer == NULL) ||\n"
" if( buffer == 0 || (*buffer == 0) ||\n"
" (cp=strrchr(buffer,'/')) == (char *)NULL) {\n"
" XtSetSensitive(more_button,False);\n"
" }\n"

View file

@ -1119,8 +1119,8 @@ dtb_help_dispatch(
** Checking the status of the more-help info also lets us decide whether
** the "More..." button should be enabled on the dialog.
*/
if( help_data->help_volume ==0 || *(help_data->help_volume) == NULL ||
help_data->help_locationID ==0 || *(help_data->help_locationID)== NULL){
if( help_data->help_volume ==0 || *(help_data->help_volume) == 0 ||
help_data->help_locationID ==0 || *(help_data->help_locationID)== 0){
buffer[0] = '\0';
}
else {

View file

@ -950,6 +950,7 @@ abmfP_write_stubs_c_file(
* Write includes.
*/
strcpy(moduleHeaderFileName, abmfP_get_ui_header_file_name(module));
abmfP_write_c_system_include(genCodeInfo, "stdint.h");
abmfP_write_c_system_include(genCodeInfo, "stdio.h");
abmfP_write_c_system_include(genCodeInfo, "Xm/Xm.h");
abmfP_write_c_local_include(genCodeInfo,

View file

@ -74,20 +74,20 @@ static int write_func_def_params(
** **
**************************************************************************/
extern STRING abmfP_str_bool= "Boolean";
extern STRING abmfP_str_int= "int";
extern STRING abmfP_str_string= "String";
extern STRING abmfP_str_void= "void";
extern STRING abmfP_str_widget = "Widget";
extern STRING abmfP_str_xtpointer = "XtPointer";
extern STRING abmfP_str_tt_msg= "Tt_message";
extern STRING abmfP_str_voidpointer= "void *";
extern STRING abmfP_str_intpointer= "int *";
extern STRING abmfP_str_argvpointer= "char ***";
STRING abmfP_str_bool= "Boolean";
STRING abmfP_str_int= "int";
STRING abmfP_str_string= "String";
STRING abmfP_str_void= "void";
STRING abmfP_str_widget = "Widget";
STRING abmfP_str_xtpointer = "XtPointer";
STRING abmfP_str_tt_msg= "Tt_message";
STRING abmfP_str_voidpointer= "void *";
STRING abmfP_str_intpointer= "int *";
STRING abmfP_str_argvpointer= "char ***";
extern STRING abmfP_str_empty = "";
extern STRING abmfP_str_null = "NULL";
extern STRING abmfP_str_zero = "0";
STRING abmfP_str_empty = "";
STRING abmfP_str_null = "NULL";
STRING abmfP_str_zero = "0";
/*************************************************************************

View file

@ -43,6 +43,7 @@
* This file contains the implementation of the uil load
* component
*/
#include <stdint.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
@ -911,7 +912,7 @@ resource_value_for_uil_arg(
ret_val = (XtPointer)uil_child;
abobj_ref = (ABObj)uil_child->header.user_data;
abobj_ref = (ABObj)(uintptr_t) uil_child->header.user_data;
if (abobj_ref == NULL)
{
@ -1425,7 +1426,7 @@ object_for_widget(
obj_get_attach_value(rr->obj, rr->dir);
if (field_widget == NULL)
return;
obj_ref = (ABObj)field_widget->header.user_data;
obj_ref = (ABObj)(uintptr_t) field_widget->header.user_data;
obj_set_attach_value(rr->obj, rr->dir, obj_ref);
XtFree((char *)rr);
}

View file

@ -547,7 +547,7 @@ output_ui_arg(FILE *fp, ABObj obj, Arg *arg)
break;
case AB_ARG_STRING:
indent(fp,DBLSP);
fprintf(fp,"XmN%s = \"%s\" ;\n",arg->name,arg->value);
fprintf(fp,"XmN%s = \"%s\" ;\n",arg->name, (char *) arg->value);
break;
case AB_ARG_BOOLEAN:
/* REMIND: handle item obj's XmNset resource for an array */
@ -568,7 +568,7 @@ output_ui_arg(FILE *fp, ABObj obj, Arg *arg)
break;
case AB_ARG_FONT:
indent(fp,DBLSP);
fprintf(fp,"XmN%s = \"%s\" ;\n",arg->name,arg->value);
fprintf(fp,"XmN%s = \"%s\" ;\n",arg->name, (char *) arg->value);
break;
case AB_ARG_LITERAL: /* istring, but not quoted in output */
indent(fp,DBLSP);

View file

@ -42,6 +42,7 @@
/*
* This file contains the mapping between uil resources and ABObj attributes
*/
#include <stdint.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
@ -3950,11 +3951,11 @@ val_proc_debug(
{
case AB_ARG_STRING:
case AB_ARG_LITERAL:
fprintf(stderr,", value = %s\n",res_value); break;
fprintf(stderr,", value = %s\n", (char*) res_value); break;
case AB_ARG_INT:
fprintf(stderr,", value = %d\n",res_value); break;
fprintf(stderr,", value = %d\n", (int)(intptr_t) res_value); break;
case AB_ARG_FLOAT:
fprintf(stderr,", value = %g\n",res_value); break;
fprintf(stderr,", value = %g\n", (double)(uintptr_t) res_value); break;
case AB_ARG_BOOLEAN:
if(res_value) fprintf(stderr,", value = TRUE\n");
else fprintf(stderr,", value = FALSE\n");

View file

@ -46,6 +46,7 @@
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <ab_private/UilDef.h>
#include <uil/UilDBDef.h>
@ -340,10 +341,10 @@ print_uil_symbol(
int i;
printf("%lx unknown type: %d size: %d byte: 0x%x\n",
az_symbol_entry,
(unsigned long) az_symbol_entry,
az_symbol_entry->header.b_tag,
az_symbol_entry->header.w_node_size,
az_symbol_entry->header.b_type);
(unsigned) az_symbol_entry->header.b_type);
l_array = (int *) az_symbol_entry->b_value;
@ -385,20 +386,20 @@ print_uil_widget(
"%s %s(0x%lx) name: %s\n",
get_object_text(az_widget_entry->header.b_type),
get_tag_text(az_widget_entry->header.b_tag),
az_widget_entry,
(unsigned long) az_widget_entry,
wid_name);
printf(
" controls: 0x%lx callbacks: 0x%lx arguments: 0x%lx parent_list: 0x%lx\n",
az_widget_entry->az_controls,
az_widget_entry->az_callbacks,
az_widget_entry->az_arguments,
az_widget_entry->parent_list);
(unsigned long) az_widget_entry->az_controls,
(unsigned long) az_widget_entry->az_callbacks,
(unsigned long) az_widget_entry->az_arguments,
(unsigned long) az_widget_entry->parent_list);
if (az_widget_entry->az_create_proc != NULL)
{
printf(" create proc: 0x%lx\n",
az_widget_entry->az_create_proc);
(unsigned long) az_widget_entry->az_create_proc);
}
}
@ -520,8 +521,8 @@ print_uil_callback(
printf(
" CALLBACK name: %s proc ref: 0x%lx proc ref list: 0x%lx\n",
name_str,
az_callback_entry->az_call_proc_ref,
az_callback_entry->az_call_proc_ref_list);
(unsigned long) az_callback_entry->az_call_proc_ref,
(unsigned long) az_callback_entry->az_call_proc_ref_list);
}
/*
@ -538,7 +539,7 @@ print_uil_list(
printf("%s LIST(0x%lx) count: %d gadget count: %d\n",
get_tag_text(az_list_entry->header.b_type),
az_list_entry,
(unsigned long) az_list_entry,
az_list_entry->w_count,
az_list_entry->w_gadget_count);
}
@ -552,10 +553,10 @@ print_uil_name(
)
{
printf("NAME(0x%lx) size: %d next name: 0x%lx object: 0x%lx",
az_name_entry,
(unsigned long) az_name_entry,
az_name_entry->header.w_node_size,
az_name_entry->az_next_name_entry,
az_name_entry->az_object);
(unsigned long) az_name_entry->az_next_name_entry,
(unsigned long) az_name_entry->az_object);
if (az_name_entry->b_flags & sym_m_referenced)
{
@ -575,8 +576,8 @@ print_uil_module(
{
printf("%s MODULE(0x%lx) version: 0x%lx \n",
az_module_entry->obj_header.az_name->c_text,
az_module_entry,
az_module_entry->az_version);
(unsigned long) az_module_entry,
(unsigned long) az_module_entry->az_version);
}
/*
@ -589,12 +590,12 @@ print_uil_color_item(
{
printf(
"COLOR ITEM(0x%lx) size: %d letter: %c index: %d color: 0x%lx next: 0x%lx\n",
az_color_item_entry,
(unsigned long) az_color_item_entry,
az_color_item_entry->header.w_node_size,
az_color_item_entry->b_letter,
az_color_item_entry->b_index,
az_color_item_entry->az_color,
az_color_item_entry->az_next);
(unsigned long) az_color_item_entry->az_color,
(unsigned long) az_color_item_entry->az_next);
}
/*
@ -606,9 +607,9 @@ print_uil_parent_list_item(
)
{
printf("PARENT LIST(0x%lx) parent: 0x%lx next: 0x%lx \n",
az_parent_list_item,
az_parent_list_item->parent,
az_parent_list_item->next);
(unsigned long) az_parent_list_item,
(unsigned long) az_parent_list_item->parent,
(unsigned long) az_parent_list_item->next);
}
/*
@ -620,9 +621,9 @@ print_uil_external_def(
)
{
printf("EXTERNAL DEF(0x%lx) next external: 0x%lx object: 0x%lx \n",
az_external_def_entry,
az_external_def_entry->az_next_object,
az_external_def_entry->az_name);
(unsigned long) az_external_def_entry,
(unsigned long) az_external_def_entry->az_next_object,
(unsigned long) az_external_def_entry->az_name);
}
/*
@ -653,8 +654,8 @@ print_uil_proc_def(
imported_flag = " imported";
printf("PROC DEF(0x%lx) name: 0x%lx %s%s%s%s count: %d %s\n",
az_proc_def_entry,
az_proc_def_entry->obj_header.az_name,
(unsigned long) az_proc_def_entry,
(unsigned long) az_proc_def_entry->obj_header.az_name,
checking_flag,
private_flag,
exported_flag,
@ -676,9 +677,9 @@ print_uil_proc_ref(
*/
printf("PROC REF(0x%lx) proc def: 0x%lx value: 0x%lx\n",
az_proc_ref_entry,
az_proc_ref_entry->az_proc_def,
az_proc_ref_entry->az_arg_value);
(unsigned long) az_proc_ref_entry,
(unsigned long) az_proc_ref_entry->az_proc_def,
(unsigned long) az_proc_ref_entry->az_arg_value);
}
/*
@ -691,14 +692,14 @@ print_uil_forward_ref(
{
printf(
"FORWARD REF(0x%lx) next ref: 0x%lx location: 0x%lx %s parent: 0x%lx\n",
az_forward_ref_entry,
az_forward_ref_entry->az_next_ref,
az_forward_ref_entry->a_update_location,
(unsigned long) az_forward_ref_entry,
(unsigned long) az_forward_ref_entry->az_next_ref,
(unsigned long) az_forward_ref_entry->a_update_location,
get_object_text(az_forward_ref_entry->header.b_type),
az_forward_ref_entry->parent);
(unsigned long) az_forward_ref_entry->parent);
printf(" name: 0x%lx %s\n",
az_forward_ref_entry->az_name,
(unsigned long) az_forward_ref_entry->az_name,
az_forward_ref_entry->az_name->c_text);
}
@ -732,9 +733,9 @@ print_uil_value(
imported_flag = " imported";
printf(" VALUE(0x%lx) size: %d name: 0x%lx %s%s%s%s",
az_value_entry,
(unsigned long) az_value_entry,
az_value_entry->header.w_node_size,
az_value_entry->obj_header.az_name,
(unsigned long) az_value_entry->obj_header.az_name,
builtin_flag, private_flag, exported_flag, imported_flag);
if (az_value_entry->obj_header.b_flags & sym_m_imported)
@ -747,12 +748,12 @@ print_uil_value(
{
case sym_k_integer_value:
printf(" integer: %d \n",
az_value_entry->value.l_integer);
(int)az_value_entry->value.l_integer);
break;
case sym_k_bool_value:
printf(" boolean: %d \n",
az_value_entry->value.l_integer);
(int)az_value_entry->value.l_integer);
break;
case sym_k_float_value:
@ -808,12 +809,12 @@ common_special_type:
case sym_k_compound_string_value:
printf(" compound string\n first component: 0x%lx\n",
az_value_entry->az_first_table_value);
(unsigned long) az_value_entry->az_first_table_value);
if ((az_value_entry->b_aux_flags & sym_m_table_entry) != 0)
{
printf(" next table entry: 0x%lx",
az_value_entry->az_next_table_value);
(unsigned long) az_value_entry->az_next_table_value);
}
break;
@ -826,7 +827,7 @@ common_special_type:
get_charset_text(az_value_entry->b_charset));
else
printf(" font charset: userdefined(%x)",
get_charset_text((long) az_value_entry->az_charset_value));
(unsigned) (uintptr_t) get_charset_text((long) az_value_entry->az_charset_value));
goto check_for_table_value;
@ -855,13 +856,13 @@ common_special_type:
printf(
" string length: %d\n charset: userdefined(%x) L_TO_R",
az_value_entry->w_length,
az_value_entry->az_charset_value);
(unsigned) (uintptr_t) az_value_entry->az_charset_value);
break;
case XmSTRING_DIRECTION_R_TO_L:
printf(
" string length: %d\n charset: userdefined(%x) R_TO_L",
az_value_entry->w_length,
az_value_entry->az_charset_value);
(unsigned) (uintptr_t) az_value_entry->az_charset_value);
break;
}
@ -873,7 +874,7 @@ check_for_table_value:
if ((az_value_entry->b_aux_flags & sym_m_table_entry) != 0)
{
printf(" next table entry: 0x%lx",
az_value_entry->az_next_table_value);
(unsigned long) az_value_entry->az_next_table_value);
}
output_text
@ -890,8 +891,8 @@ check_for_table_value:
printf(" icon width: %d height: %d colors: 0x%lx rows: 0x%lx \n",
az_value_entry->value.z_icon->w_width,
az_value_entry->value.z_icon->w_height,
az_value_entry->value.z_icon->az_color_table,
az_value_entry->value.z_icon->az_rows);
(unsigned long) az_value_entry->value.z_icon->az_color_table,
(unsigned long) az_value_entry->value.z_icon->az_rows);
break;
@ -909,7 +910,7 @@ check_for_table_value:
common_table:
printf(" %s first table entry: 0x%lx\n",
table_type, az_value_entry->az_first_table_value);
table_type, (unsigned long) az_value_entry->az_first_table_value);
break;
@ -928,7 +929,7 @@ common_table:
printf(" letter: %c index: %d color: 0x%lx\n",
az_value_entry->value.z_color[index].b_letter,
az_value_entry->value.z_color[index].b_index,
az_value_entry->value.z_color[index].az_color);
(unsigned long) az_value_entry->value.z_color[index].az_color);
}
break;
@ -1009,22 +1010,22 @@ print_uil_obj_header(
{
printf("%s(0x%lx)",
get_tag_text(az_obj_entry->header.b_tag),
az_obj_entry);
(unsigned long) az_obj_entry);
if (az_obj_entry->obj_header.az_name != NULL)
{
printf(" name: 0x%lx", az_obj_entry->obj_header.az_name);
printf(" name: 0x%lx", (unsigned long) az_obj_entry->obj_header.az_name);
}
if (az_obj_entry->obj_header.az_reference != NULL)
{
printf(" reference: 0x%lx",
az_obj_entry->obj_header.az_reference);
(unsigned long) az_obj_entry->obj_header.az_reference);
}
if (az_obj_entry->obj_header.az_next != NULL)
{
printf(" next: 0x%lx", az_obj_entry->obj_header.az_next);
printf(" next: 0x%lx", (unsigned long) az_obj_entry->obj_header.az_next);
}
if (az_obj_entry->obj_header.b_flags & sym_m_private)
@ -1052,7 +1053,7 @@ print_uil_include_file(
)
{
printf("INCLUDE FILE(0x%lx) file name: %s full file name: %s\n",
az_symbol_entry,
(unsigned long) az_symbol_entry,
az_symbol_entry->file_name, az_symbol_entry->full_file_name);
}
@ -1064,8 +1065,8 @@ print_uil_section(
{
printf("%s SECTION(0x%lx) entries: 0x%lx\n",
get_sym_section_text(az_symbol_entry->header.b_type),
az_symbol_entry,
az_symbol_entry->entries);
(unsigned long) az_symbol_entry,
(unsigned long) az_symbol_entry->entries);
}
static void
@ -1075,8 +1076,8 @@ print_uil_object_variant(
{
printf(
"DEFAULT OBJ VAR(0x%lx) next: 0x%lx object info: %d, variant_info: %d\n",
az_symbol_entry,
az_symbol_entry->next, az_symbol_entry->b_object_info,
(unsigned long) az_symbol_entry,
(unsigned long) az_symbol_entry->next, az_symbol_entry->b_object_info,
az_symbol_entry->b_variant_info);
}
@ -1086,10 +1087,10 @@ print_uil_root_entry(
)
{
printf("ROOT(0x%lx) tag: %d module: 0x%lx sections: 0x%lx\n module tail: ",
az_symbol_entry,
(unsigned long) az_symbol_entry,
az_symbol_entry->header.b_tag,
az_symbol_entry->module_hdr,
az_symbol_entry->sections);
(unsigned long) az_symbol_entry->module_hdr,
(unsigned long) az_symbol_entry->sections);
}
static char *

View file

@ -1275,7 +1275,7 @@ static BOOL bil_token_table_inited = FALSE;
/*
* Compares to entries (for qsort)
*/
static long
static int
bil_token_entry_compare(const void *leftEntry, const void *rightEntry)
{
return ((long)(((BilTokenIndexEntry)leftEntry)->string))

View file

@ -465,5 +465,5 @@ sprint(char *s)
void
bilP_reset_token_text(void)
{
sprintf(tokenText, "");
sprintf(tokenText, "%s", "");
}

View file

@ -209,7 +209,7 @@ bil_load_file(
if (bilP_load.project == NULL)
{
LoadErr = TRUE;
sprintf(Buf, catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 39,
sprintf(Buf, "%s", catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 39,
"Unable to load project."));
errmsg = Buf;
goto epilogue;

View file

@ -709,7 +709,7 @@ obj_get_safe_name(ABObj obj, STRING name, int name_size)
else if (obj_get_name(obj) == NULL)
{
char buf[256];
sprintf(buf, "(ABObj:0x%08lx)", obj);
sprintf(buf, "(ABObj:0x%08lx)", (unsigned long) obj);
strncpy(name, buf, name_size);
}
else

View file

@ -1018,7 +1018,7 @@ event_print(OBJ_EVENT *event, FILE *outFile, BOOL addNewline, STRING name)
sprintf(eventParams, "(%s %d 0x%08lx)",
obj_get_safe_name(obj, buf1, 256),
event->info.update_with_data.update_code,
event->info.update_with_data.update_data);
(unsigned long) event->info.update_with_data.update_data);
break;
default:
@ -1030,7 +1030,7 @@ event_print(OBJ_EVENT *event, FILE *outFile, BOOL addNewline, STRING name)
if (*eventParams == 0)
{
char objName[1024];
sprintf(objName, "(%#lx", obj);
sprintf(objName, "(%#lx", (unsigned long) obj);
if (obj_get_name(obj) != NULL)
{
strcat(objName, " = ");

View file

@ -1197,7 +1197,7 @@ obj_verify(ABObj obj)
if (ok)
{
obj_str_ptr_name = istr_string(obj->name);
sprintf((STRING)obj_name, "(ABObj %#lx", obj);
sprintf((STRING)obj_name, "(ABObj %#lx", (unsigned long) obj);
if (obj_str_ptr_name != NULL)
{
strcat((STRING)obj_name, " = ");
@ -1212,7 +1212,7 @@ obj_verify(ABObj obj)
}
else
{
sprintf((STRING)obj_name, "(ABObj %#lx)", obj);
sprintf((STRING)obj_name, "(ABObj %#lx)", (unsigned long) obj);
field_err("name");
}

View file

@ -308,7 +308,7 @@ xm_configure_tree(
if (configCount!= numSalientObjs)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 8,
"INTERNAL ERROR: salient counts don't match.\n") );
iRetVal= -1;

View file

@ -1052,7 +1052,7 @@ load_res_table(
}
static long
static int
xm_res_table_entry_xmname_compare(const void *leftEntry, const void *rightEntry)
{
return

View file

@ -166,7 +166,7 @@ istr_create (
entry->values[i] = num_count;
if (insert_array(1,num_count, string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -179,7 +179,7 @@ istr_create (
{ /* take int value from freelist */
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -187,7 +187,7 @@ istr_create (
entry->values[i] = freelist[freecount-1];
if (insert_array(1,freelist[freecount-1], string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -209,7 +209,7 @@ istr_create (
entry->values[i] = num_count;
if (insert_array(1, num_count, string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -222,7 +222,7 @@ istr_create (
{
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -231,7 +231,7 @@ istr_create (
if (insert_array(1,
freelist[freecount-1], string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -247,7 +247,7 @@ istr_create (
new_bucket = (Bucket)malloc (sizeof(BucketRec));
if (new_bucket == NULL)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
return NULL ;
@ -261,7 +261,7 @@ istr_create (
entry->next = new_bucket;
if (insert_array(1, num_count, string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -274,7 +274,7 @@ istr_create (
{
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -283,7 +283,7 @@ istr_create (
entry->next = new_bucket;
if (insert_array(1, freelist[freecount-1], string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -335,7 +335,7 @@ istrP_create_alloced_impl(
entry->values[i] = num_count;
if (insert_array(3,num_count, *string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -348,7 +348,7 @@ istrP_create_alloced_impl(
{ /* take int value from freelist */
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -356,7 +356,7 @@ istrP_create_alloced_impl(
entry->values[i] = freelist[freecount-1];
if (insert_array(3,freelist[freecount-1], *string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -378,7 +378,7 @@ istrP_create_alloced_impl(
entry->values[i] = num_count;
if (insert_array(3, num_count, *string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -391,7 +391,7 @@ istrP_create_alloced_impl(
{
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -400,7 +400,7 @@ istrP_create_alloced_impl(
if (insert_array(3,
freelist[freecount-1], *string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -416,7 +416,7 @@ istrP_create_alloced_impl(
new_bucket = (Bucket)malloc (sizeof(BucketRec));
if (new_bucket == NULL)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
return NULL ;
@ -430,7 +430,7 @@ istrP_create_alloced_impl(
entry->next = new_bucket;
if (insert_array(3, num_count, *string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -443,7 +443,7 @@ istrP_create_alloced_impl(
{
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -452,7 +452,7 @@ istrP_create_alloced_impl(
entry->next = new_bucket;
if (insert_array(3, freelist[freecount-1], *string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -512,7 +512,7 @@ istr_create_const(
entry->values[i] = num_count;
if (insert_array(2, num_count, string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -525,7 +525,7 @@ istr_create_const(
{ /* take int value from freelist */
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -533,7 +533,7 @@ istr_create_const(
entry->values[i] = freelist[freecount-1];
if (insert_array(2, freelist[freecount-1], string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -555,7 +555,7 @@ istr_create_const(
entry->values[i] = num_count;
if (insert_array(2, num_count, string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -568,7 +568,7 @@ istr_create_const(
{
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -577,7 +577,7 @@ istr_create_const(
if (insert_array(2,
freelist[freecount-1], string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -593,7 +593,7 @@ istr_create_const(
new_bucket = (Bucket)malloc (sizeof(BucketRec));
if (new_bucket == NULL)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
return NULL ;
@ -609,7 +609,7 @@ istr_create_const(
entry->next = new_bucket;
if (insert_array(2, num_count, string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -622,7 +622,7 @@ istr_create_const(
{
if(int_array[freelist[freecount-1]].refcount != 0)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
"ISTR: error in allocating space for string\n") );
return NULL;
@ -631,7 +631,7 @@ istr_create_const(
entry->next = new_bucket;
if (insert_array(2, freelist[freecount-1], string) == -1)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
"ISTR: error in allocating to int array\n") );
return NULL;
@ -755,7 +755,7 @@ istrP_destroy_impl(
freelist = (long *)malloc(ARRAYSIZE * sizeof(long));
if (freelist == NULL)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
return 0 ;
@ -776,7 +776,7 @@ istrP_destroy_impl(
assert(freelist != NULL);
if (freelist == NULL)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
return 0 ;
@ -935,7 +935,7 @@ insert_array(
int_array_set((STRN *)calloc(ARRAYSIZE, sizeof(STRN)));
if (int_array == NULL)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
return 0 ;
@ -970,7 +970,7 @@ insert_array(
assert(int_array != NULL);
if (int_array == NULL)
{
fprintf(stderr,
fprintf(stderr, "%s",
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
return 0 ;

View file

@ -432,7 +432,7 @@ util_cvt_path_to_relative(
}
else
{
while ((*rightmost_slash == '/') && (*rightmost_slash != NULL))
while ((*rightmost_slash == '/') && (*rightmost_slash != 0))
{
++rightmost_slash;
}