From: Peter Howkins Date: Tue, 24 Apr 2018 20:55:56 +0000 (+0100) Subject: dtappbuilder: Resolve all compiler warnings X-Git-Tag: 2.2.4a~62 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4007d3a4603e8dcc2f3ab223dba7af126c49a568;p=oweals%2Fcde.git dtappbuilder: Resolve all compiler warnings --- diff --git a/cde/programs/dtappbuilder/src/ab/ab_utils.c b/cde/programs/dtappbuilder/src/ab/ab_utils.c index 6a2c4af4..ea629b60 100644 --- a/cde/programs/dtappbuilder/src/ab/ab_utils.c +++ b/cde/programs/dtappbuilder/src/ab/ab_utils.c @@ -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; } diff --git a/cde/programs/dtappbuilder/src/ab/abobj_events.c b/cde/programs/dtappbuilder/src/ab/abobj_events.c index 73b7a899..9c51d80d 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_events.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_events.c @@ -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; diff --git a/cde/programs/dtappbuilder/src/ab/abobj_resize.c b/cde/programs/dtappbuilder/src/ab/abobj_resize.c index 5ca15add..a750d31c 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_resize.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_resize.c @@ -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); } diff --git a/cde/programs/dtappbuilder/src/ab/abobj_select.c b/cde/programs/dtappbuilder/src/ab/abobj_select.c index 2d34f1ef..13171415 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_select.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_select.c @@ -48,6 +48,7 @@ * *********************************************************************** */ +#include #include #include #include @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/about_box_stubs.c b/cde/programs/dtappbuilder/src/ab/about_box_stubs.c index 0ada81de..90b371ae 100644 --- a/cde/programs/dtappbuilder/src/ab/about_box_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/about_box_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/appfw_stubs.c b/cde/programs/dtappbuilder/src/ab/appfw_stubs.c index 706b9324..fadbc02f 100644 --- a/cde/programs/dtappbuilder/src/ab/appfw_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/appfw_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #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, diff --git a/cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c index bbea9ccf..9617fcba 100644 --- a/cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #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); } } diff --git a/cde/programs/dtappbuilder/src/ab/brws.c b/cde/programs/dtappbuilder/src/ab/brws.c index cfbfb2a5..cf7c7bbe 100644 --- a/cde/programs/dtappbuilder/src/ab/brws.c +++ b/cde/programs/dtappbuilder/src/ab/brws.c @@ -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); } diff --git a/cde/programs/dtappbuilder/src/ab/brws_mthds.c b/cde/programs/dtappbuilder/src/ab/brws_mthds.c index c4b8f65d..b9d8f171 100644 --- a/cde/programs/dtappbuilder/src/ab/brws_mthds.c +++ b/cde/programs/dtappbuilder/src/ab/brws_mthds.c @@ -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; diff --git a/cde/programs/dtappbuilder/src/ab/brws_stubs.c b/cde/programs/dtappbuilder/src/ab/brws_stubs.c index a653e3db..104feee1 100644 --- a/cde/programs/dtappbuilder/src/ab/brws_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/brws_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/button_stubs.c b/cde/programs/dtappbuilder/src/ab/button_stubs.c index 89442cce..61807025 100644 --- a/cde/programs/dtappbuilder/src/ab/button_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/button_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/cgen_env_stubs.c b/cde/programs/dtappbuilder/src/ab/cgen_env_stubs.c index 198a554b..7a562886 100644 --- a/cde/programs/dtappbuilder/src/ab/cgen_env_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/cgen_env_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #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); diff --git a/cde/programs/dtappbuilder/src/ab/cgen_props_stubs.c b/cde/programs/dtappbuilder/src/ab/cgen_props_stubs.c index 4ed6bece..9c04e134 100644 --- a/cde/programs/dtappbuilder/src/ab/cgen_props_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/cgen_props_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/cgen_utils.c b/cde/programs/dtappbuilder/src/ab/cgen_utils.c index c658b532..c87a9f1b 100644 --- a/cde/programs/dtappbuilder/src/ab/cgen_utils.c +++ b/cde/programs/dtappbuilder/src/ab/cgen_utils.c @@ -49,6 +49,7 @@ #define _POSIX_SOURCE 1 #endif +#include #include #include #include @@ -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(); diff --git a/cde/programs/dtappbuilder/src/ab/cgen_win_stubs.c b/cde/programs/dtappbuilder/src/ab/cgen_win_stubs.c index 46f535b2..da96cf97 100644 --- a/cde/programs/dtappbuilder/src/ab/cgen_win_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/cgen_win_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/choice_stubs.c b/cde/programs/dtappbuilder/src/ab/choice_stubs.c index 3d495be5..d2d08e02 100644 --- a/cde/programs/dtappbuilder/src/ab/choice_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/choice_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/color_chooser_stubs.c b/cde/programs/dtappbuilder/src/ab/color_chooser_stubs.c index 666eb124..43f0e0af 100644 --- a/cde/programs/dtappbuilder/src/ab/color_chooser_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/color_chooser_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/combobox_stubs.c b/cde/programs/dtappbuilder/src/ab/combobox_stubs.c index 6dca2b17..104d25cf 100644 --- a/cde/programs/dtappbuilder/src/ab/combobox_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/combobox_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/conn_stubs.c b/cde/programs/dtappbuilder/src/ab/conn_stubs.c index e1b82e61..5a62c784 100644 --- a/cde/programs/dtappbuilder/src/ab/conn_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/conn_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/cpanel_stubs.c b/cde/programs/dtappbuilder/src/ab/cpanel_stubs.c index beebd408..f53c6069 100644 --- a/cde/programs/dtappbuilder/src/ab/cpanel_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/cpanel_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/custdlg_stubs.c b/cde/programs/dtappbuilder/src/ab/custdlg_stubs.c index 7918ee5e..ef78e75d 100644 --- a/cde/programs/dtappbuilder/src/ab/custdlg_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/custdlg_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c index dacb3ebe..ee53ba9a 100644 --- a/cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #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); diff --git a/cde/programs/dtappbuilder/src/ab/drawp_stubs.c b/cde/programs/dtappbuilder/src/ab/drawp_stubs.c index b2ad4b17..d341cb3a 100644 --- a/cde/programs/dtappbuilder/src/ab/drawp_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/drawp_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/dtbuilder.c.src b/cde/programs/dtappbuilder/src/ab/dtbuilder.c.src index 638a1870..9dd5af81 100644 --- a/cde/programs/dtappbuilder/src/ab/dtbuilder.c.src +++ b/cde/programs/dtappbuilder/src/ab/dtbuilder.c.src @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include @@ -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, diff --git a/cde/programs/dtappbuilder/src/ab/fchooser_stubs.c b/cde/programs/dtappbuilder/src/ab/fchooser_stubs.c index afaf6b3e..66a0abfe 100644 --- a/cde/programs/dtappbuilder/src/ab/fchooser_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/fchooser_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/group_stubs.c b/cde/programs/dtappbuilder/src/ab/group_stubs.c index 6933cbc0..ffccc55c 100644 --- a/cde/programs/dtappbuilder/src/ab/group_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/group_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/help_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/help_ed_stubs.c index 361c88d8..cab1f1c5 100644 --- a/cde/programs/dtappbuilder/src/ab/help_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/help_ed_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #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); } diff --git a/cde/programs/dtappbuilder/src/ab/label_stubs.c b/cde/programs/dtappbuilder/src/ab/label_stubs.c index 0bab4a5f..60f9084c 100644 --- a/cde/programs/dtappbuilder/src/ab/label_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/label_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/list_stubs.c b/cde/programs/dtappbuilder/src/ab/list_stubs.c index b8223b62..7bed5ad0 100644 --- a/cde/programs/dtappbuilder/src/ab/list_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/list_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/mainwin_stubs.c b/cde/programs/dtappbuilder/src/ab/mainwin_stubs.c index 3173fa80..b5c4d7b0 100644 --- a/cde/programs/dtappbuilder/src/ab/mainwin_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/mainwin_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/menu_stubs.c b/cde/programs/dtappbuilder/src/ab/menu_stubs.c index de36927b..6c5e00eb 100644 --- a/cde/programs/dtappbuilder/src/ab/menu_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/menu_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/menubar_stubs.c b/cde/programs/dtappbuilder/src/ab/menubar_stubs.c index af70b9fb..868a24fe 100644 --- a/cde/programs/dtappbuilder/src/ab/menubar_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/menubar_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/message_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/message_ed_stubs.c index c3501bc1..ae7a989f 100644 --- a/cde/programs/dtappbuilder/src/ab/message_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/message_ed_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #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); diff --git a/cde/programs/dtappbuilder/src/ab/pal.c b/cde/programs/dtappbuilder/src/ab/pal.c index 9a37c4ff..2eaa3703 100644 --- a/cde/programs/dtappbuilder/src/ab/pal.c +++ b/cde/programs/dtappbuilder/src/ab/pal.c @@ -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 diff --git a/cde/programs/dtappbuilder/src/ab/pal_combobox.c b/cde/programs/dtappbuilder/src/ab/pal_combobox.c index 7a6fad2e..6b9a9a4c 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_combobox.c +++ b/cde/programs/dtappbuilder/src/ab/pal_combobox.c @@ -44,6 +44,7 @@ /* * pal_combobox.c - Implements Palette ComboBox object functionality */ +#include #include #include #include @@ -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, diff --git a/cde/programs/dtappbuilder/src/ab/pal_create.c b/cde/programs/dtappbuilder/src/ab/pal_create.c index ad60a6df..3ebc3a8a 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_create.c +++ b/cde/programs/dtappbuilder/src/ab/pal_create.c @@ -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 */ diff --git a/cde/programs/dtappbuilder/src/ab/pal_custdlg.c b/cde/programs/dtappbuilder/src/ab/pal_custdlg.c index d6f3834d..fea7c6ee 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_custdlg.c +++ b/cde/programs/dtappbuilder/src/ab/pal_custdlg.c @@ -44,6 +44,7 @@ /* * pal_custdlg.c - Implements Palette CustomDialog object functionality */ +#include #include #include #include @@ -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); } } diff --git a/cde/programs/dtappbuilder/src/ab/pal_group.c b/cde/programs/dtappbuilder/src/ab/pal_group.c index ff8723c7..05e48d36 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_group.c +++ b/cde/programs/dtappbuilder/src/ab/pal_group.c @@ -45,6 +45,7 @@ * pal_group.c - Implements Group object functionality */ +#include #include #include #include @@ -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); } diff --git a/cde/programs/dtappbuilder/src/ab/pal_list.c b/cde/programs/dtappbuilder/src/ab/pal_list.c index f58560ae..29e663b4 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_list.c +++ b/cde/programs/dtappbuilder/src/ab/pal_list.c @@ -44,6 +44,7 @@ /* * pal_list.c - Implements Palette List object functionality */ +#include #include #include #include @@ -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, diff --git a/cde/programs/dtappbuilder/src/ab/pal_mainwin.c b/cde/programs/dtappbuilder/src/ab/pal_mainwin.c index b92cfd61..83f35f0b 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_mainwin.c +++ b/cde/programs/dtappbuilder/src/ab/pal_mainwin.c @@ -43,6 +43,7 @@ /* * pal_mainwin.c - Implements Palette Main Window object functionality */ +#include #include #include #include @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_menu.c b/cde/programs/dtappbuilder/src/ab/pal_menu.c index 51fa46ad..8b3551d6 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_menu.c +++ b/cde/programs/dtappbuilder/src/ab/pal_menu.c @@ -44,6 +44,7 @@ * pal_menu.c - Implements Palette Menu object functionality * NOTE: menu not actually ON the main palette */ +#include #include #include #include @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_scale.c b/cde/programs/dtappbuilder/src/ab/pal_scale.c index 2b551a3e..d18d133a 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_scale.c +++ b/cde/programs/dtappbuilder/src/ab/pal_scale.c @@ -44,6 +44,7 @@ /* * pal_scale.c - Implements Palette Scale/Gauge object functionality */ +#include #include #include #include @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_termp.c b/cde/programs/dtappbuilder/src/ab/pal_termp.c index 907368e9..32789ca2 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_termp.c +++ b/cde/programs/dtappbuilder/src/ab/pal_termp.c @@ -44,6 +44,7 @@ /* * pal_termp.c - Implements Palette TermPane object functionality */ +#include #include #include #include
@@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_textf.c b/cde/programs/dtappbuilder/src/ab/pal_textf.c index 2f605a84..7570550c 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_textf.c +++ b/cde/programs/dtappbuilder/src/ab/pal_textf.c @@ -44,6 +44,7 @@ /* * pal_textf.c - Implements Palette TextField object functionality */ +#include #include #include #include @@ -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, diff --git a/cde/programs/dtappbuilder/src/ab/pal_textp.c b/cde/programs/dtappbuilder/src/ab/pal_textp.c index de9afc85..bd73c9b2 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_textp.c +++ b/cde/programs/dtappbuilder/src/ab/pal_textp.c @@ -44,6 +44,7 @@ /* * pal_textp.c - Implements Palette TextPane object functionality */ +#include #include #include #include @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/palette_stubs.c b/cde/programs/dtappbuilder/src/ab/palette_stubs.c index 8f40f0fa..004bc6e5 100644 --- a/cde/programs/dtappbuilder/src/ab/palette_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/palette_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #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; } } diff --git a/cde/programs/dtappbuilder/src/ab/panedwin_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/panedwin_ed_stubs.c index e756b41d..e5017d59 100644 --- a/cde/programs/dtappbuilder/src/ab/panedwin_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/panedwin_ed_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/proj_stubs.c b/cde/programs/dtappbuilder/src/ab/proj_stubs.c index 70257fe8..567a920b 100644 --- a/cde/programs/dtappbuilder/src/ab/proj_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/proj_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/revolv_stubs.c b/cde/programs/dtappbuilder/src/ab/revolv_stubs.c index 84a4f64e..a891453a 100644 --- a/cde/programs/dtappbuilder/src/ab/revolv_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/revolv_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/scale_stubs.c b/cde/programs/dtappbuilder/src/ab/scale_stubs.c index a9cf0e4a..405f24a9 100644 --- a/cde/programs/dtappbuilder/src/ab/scale_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/scale_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/sep_stubs.c b/cde/programs/dtappbuilder/src/ab/sep_stubs.c index f8368e85..718c7b02 100644 --- a/cde/programs/dtappbuilder/src/ab/sep_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/sep_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/spinbox_stubs.c b/cde/programs/dtappbuilder/src/ab/spinbox_stubs.c index 034a432c..3bc06b38 100644 --- a/cde/programs/dtappbuilder/src/ab/spinbox_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/spinbox_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/termp_stubs.c b/cde/programs/dtappbuilder/src/ab/termp_stubs.c index b5426487..4d980288 100644 --- a/cde/programs/dtappbuilder/src/ab/termp_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/termp_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/textf_stubs.c b/cde/programs/dtappbuilder/src/ab/textf_stubs.c index 871118d8..6f93879b 100644 --- a/cde/programs/dtappbuilder/src/ab/textf_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/textf_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/textp_stubs.c b/cde/programs/dtappbuilder/src/ab/textp_stubs.c index 5e60a1c1..2b04f3fa 100644 --- a/cde/programs/dtappbuilder/src/ab/textp_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/textp_stubs.c @@ -38,6 +38,7 @@ * ** DELETE THE GENERATED COMMENTS! ** */ +#include #include #include #include "dtb_utils.h" diff --git a/cde/programs/dtappbuilder/src/ab/ui_msg.c b/cde/programs/dtappbuilder/src/ab/ui_msg.c index dedf682e..cc55c57d 100644 --- a/cde/programs/dtappbuilder/src/ab/ui_msg.c +++ b/cde/programs/dtappbuilder/src/ab/ui_msg.c @@ -48,6 +48,7 @@ * *********************************************************************** */ +#include #include #include #include @@ -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) diff --git a/cde/programs/dtappbuilder/src/ab/ui_util.c b/cde/programs/dtappbuilder/src/ab/ui_util.c index 9c5bbf16..4738b382 100644 --- a/cde/programs/dtappbuilder/src/ab/ui_util.c +++ b/cde/programs/dtappbuilder/src/ab/ui_util.c @@ -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; diff --git a/cde/programs/dtappbuilder/src/abmf/abmfP.h b/cde/programs/dtappbuilder/src/abmf/abmfP.h index bc1facf3..d5a6333a 100644 --- a/cde/programs/dtappbuilder/src/abmf/abmfP.h +++ b/cde/programs/dtappbuilder/src/abmf/abmfP.h @@ -49,6 +49,7 @@ #include /* assert() */ #include /* FILE*, BUFSIZ */ +#include #include /* MAXPATHLEN, ... */ #include #include @@ -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) \ diff --git a/cde/programs/dtappbuilder/src/abmf/args.c b/cde/programs/dtappbuilder/src/abmf/args.c index 23d09fbd..96f12534 100644 --- a/cde/programs/dtappbuilder/src/abmf/args.c +++ b/cde/programs/dtappbuilder/src/abmf/args.c @@ -44,6 +44,7 @@ */ #include +#include #include #include #include @@ -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) \ diff --git a/cde/programs/dtappbuilder/src/abmf/create_decls.c b/cde/programs/dtappbuilder/src/abmf/create_decls.c index 3c4f9624..060943ac 100644 --- a/cde/programs/dtappbuilder/src/abmf/create_decls.c +++ b/cde/programs/dtappbuilder/src/abmf/create_decls.c @@ -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; } diff --git a/cde/programs/dtappbuilder/src/abmf/instances.c b/cde/programs/dtappbuilder/src/abmf/instances.c index fbddd058..4a5fc770 100644 --- a/cde/programs/dtappbuilder/src/abmf/instances.c +++ b/cde/programs/dtappbuilder/src/abmf/instances.c @@ -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)); } } diff --git a/cde/programs/dtappbuilder/src/abmf/lib_func_strings.c b/cde/programs/dtappbuilder/src/abmf/lib_func_strings.c index 2be03cf3..54d8e4c8 100644 --- a/cde/programs/dtappbuilder/src/abmf/lib_func_strings.c +++ b/cde/programs/dtappbuilder/src/abmf/lib_func_strings.c @@ -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" diff --git a/cde/programs/dtappbuilder/src/abmf/lib_funcs.c b/cde/programs/dtappbuilder/src/abmf/lib_funcs.c index 1c701b62..c1b662e5 100644 --- a/cde/programs/dtappbuilder/src/abmf/lib_funcs.c +++ b/cde/programs/dtappbuilder/src/abmf/lib_funcs.c @@ -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 { diff --git a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c index 04705433..ef66418f 100644 --- a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c +++ b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c @@ -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, diff --git a/cde/programs/dtappbuilder/src/abmf/write_c.c b/cde/programs/dtappbuilder/src/abmf/write_c.c index 834c0315..0accd811 100644 --- a/cde/programs/dtappbuilder/src/abmf/write_c.c +++ b/cde/programs/dtappbuilder/src/abmf/write_c.c @@ -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 ***"; - -extern STRING abmfP_str_empty = ""; -extern STRING abmfP_str_null = "NULL"; -extern STRING abmfP_str_zero = "0"; +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 ***"; + +STRING abmfP_str_empty = ""; +STRING abmfP_str_null = "NULL"; +STRING abmfP_str_zero = "0"; /************************************************************************* diff --git a/cde/programs/dtappbuilder/src/libABil/abuil_load.c b/cde/programs/dtappbuilder/src/libABil/abuil_load.c index bed2474a..c14616f6 100644 --- a/cde/programs/dtappbuilder/src/libABil/abuil_load.c +++ b/cde/programs/dtappbuilder/src/libABil/abuil_load.c @@ -43,6 +43,7 @@ * This file contains the implementation of the uil load * component */ +#include #include #include #include @@ -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); } diff --git a/cde/programs/dtappbuilder/src/libABil/abuil_print.c b/cde/programs/dtappbuilder/src/libABil/abuil_print.c index 1298b9b1..db19e1ab 100644 --- a/cde/programs/dtappbuilder/src/libABil/abuil_print.c +++ b/cde/programs/dtappbuilder/src/libABil/abuil_print.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c b/cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c index b21be9df..1c1a6e7b 100644 --- a/cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c +++ b/cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c @@ -42,6 +42,7 @@ /* * This file contains the mapping between uil resources and ABObj attributes */ +#include #include #include #include @@ -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"); diff --git a/cde/programs/dtappbuilder/src/libABil/abuil_trav.c b/cde/programs/dtappbuilder/src/libABil/abuil_trav.c index accdc454..4db9d99b 100644 --- a/cde/programs/dtappbuilder/src/libABil/abuil_trav.c +++ b/cde/programs/dtappbuilder/src/libABil/abuil_trav.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -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 * diff --git a/cde/programs/dtappbuilder/src/libABil/bil.c b/cde/programs/dtappbuilder/src/libABil/bil.c index 6e39ede9..285b7936 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil.c +++ b/cde/programs/dtappbuilder/src/libABil/bil.c @@ -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)) diff --git a/cde/programs/dtappbuilder/src/libABil/bil_lexer.c b/cde/programs/dtappbuilder/src/libABil/bil_lexer.c index e39be391..b2d0ede1 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_lexer.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_lexer.c @@ -465,5 +465,5 @@ sprint(char *s) void bilP_reset_token_text(void) { - sprintf(tokenText, ""); + sprintf(tokenText, "%s", ""); } diff --git a/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c b/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c index 89620fe6..66b89fb3 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c @@ -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; diff --git a/cde/programs/dtappbuilder/src/libABobj/obj.c b/cde/programs/dtappbuilder/src/libABobj/obj.c index 8b873161..c367afba 100644 --- a/cde/programs/dtappbuilder/src/libABobj/obj.c +++ b/cde/programs/dtappbuilder/src/libABobj/obj.c @@ -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 diff --git a/cde/programs/dtappbuilder/src/libABobj/obj_notify.c b/cde/programs/dtappbuilder/src/libABobj/obj_notify.c index 37cd41cb..90d1c096 100644 --- a/cde/programs/dtappbuilder/src/libABobj/obj_notify.c +++ b/cde/programs/dtappbuilder/src/libABobj/obj_notify.c @@ -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, " = "); diff --git a/cde/programs/dtappbuilder/src/libABobj/obj_utils.c b/cde/programs/dtappbuilder/src/libABobj/obj_utils.c index cd08c837..bb34c5cb 100644 --- a/cde/programs/dtappbuilder/src/libABobj/obj_utils.c +++ b/cde/programs/dtappbuilder/src/libABobj/obj_utils.c @@ -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"); } diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxm_config.c b/cde/programs/dtappbuilder/src/libABobjXm/objxm_config.c index 9a0358ea..f7f8d29c 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxm_config.c +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxm_config.c @@ -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; diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c b/cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c index 89a98cce..98a16f16 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c @@ -1052,7 +1052,7 @@ load_res_table( } -static long +static int xm_res_table_entry_xmname_compare(const void *leftEntry, const void *rightEntry) { return diff --git a/cde/programs/dtappbuilder/src/libAButil/istr.c b/cde/programs/dtappbuilder/src/libAButil/istr.c index 81af6d10..6206ba1b 100644 --- a/cde/programs/dtappbuilder/src/libAButil/istr.c +++ b/cde/programs/dtappbuilder/src/libAButil/istr.c @@ -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 ; diff --git a/cde/programs/dtappbuilder/src/libAButil/util_file.c b/cde/programs/dtappbuilder/src/libAButil/util_file.c index 12e9e02a..52aebe8c 100644 --- a/cde/programs/dtappbuilder/src/libAButil/util_file.c +++ b/cde/programs/dtappbuilder/src/libAButil/util_file.c @@ -432,7 +432,7 @@ util_cvt_path_to_relative( } else { - while ((*rightmost_slash == '/') && (*rightmost_slash != NULL)) + while ((*rightmost_slash == '/') && (*rightmost_slash != 0)) { ++rightmost_slash; }