dtappbuilder/dtcodegen: Fix up some warnings, remove use of sys_errlist[].
Removed all the cases of sys_errlist[], no one should be using that
today. Also, correct code generation so that declarations like
'Widget w = NULL; Pixmap p = NULL;' etc, aren't produced, which is
wrong. Use '0', not NULL for these.
This should also correct the 2 mis-definitions of Pixmap that commit
6a9327f2ab attempted to fix in ttsnoop.
dtappbuilder still needs a lot of work.
This commit is contained in:
@@ -140,10 +140,6 @@ static void register_palette_info(
|
||||
** **
|
||||
**************************************************************************/
|
||||
|
||||
#if !defined(linux) && !defined(CSRG_BASED)
|
||||
extern char *sys_errlist[];
|
||||
#endif
|
||||
|
||||
static Widget HelpDialog;
|
||||
|
||||
|
||||
|
||||
@@ -228,9 +228,6 @@ static XtTranslations proj_transtbl = NULL;
|
||||
static XRectangle *rband_rect = NULL;
|
||||
static Boolean mselect_adjust = False;
|
||||
|
||||
#if !defined(linux) && !defined(CSRG_BASED)
|
||||
extern char *sys_errlist[];
|
||||
#endif
|
||||
char Buf[MAXPATHLEN]; /* Work buffer */
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
@@ -93,9 +93,6 @@ static void mult_module_selected(
|
||||
** **
|
||||
**************************************************************************/
|
||||
|
||||
#if !defined(linux) && !defined(CSRG_BASED)
|
||||
extern char *sys_errlist[];
|
||||
#endif
|
||||
char Buf[MAXPATHLEN]; /* Work buffer */
|
||||
|
||||
/*************************************************************************
|
||||
@@ -374,8 +371,8 @@ projP_save_export_bil(
|
||||
}
|
||||
else /* An error occurred with stat */
|
||||
{
|
||||
sprintf(Buf, "%s: %s", new_filename, sys_errlist[errno]);
|
||||
util_printf_err(Buf);
|
||||
sprintf(Buf, "%s: %s", new_filename, strerror(errno));
|
||||
util_printf_err(Buf);
|
||||
}
|
||||
XtUnmanageChild(AB_generic_chooser);
|
||||
}
|
||||
|
||||
@@ -180,10 +180,6 @@ static void notify_proj_save_as_okCB(
|
||||
** **
|
||||
**************************************************************************/
|
||||
|
||||
#if !defined(linux) && !defined(CSRG_BASED)
|
||||
extern char *sys_errlist[];
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
** **
|
||||
** Function Definitions **
|
||||
@@ -1497,7 +1493,7 @@ proj_save_exploded(
|
||||
else /* An error occurred with stat */
|
||||
{
|
||||
obj_set_name(project, old_name);
|
||||
sprintf(Buf, "%s: %s", mod_exp_file, sys_errlist[errno]);
|
||||
sprintf(Buf, "%s: %s", mod_exp_file, strerror(errno));
|
||||
util_printf_err(Buf);
|
||||
if (old_name != NULL) util_free(old_name);
|
||||
if (old_file != NULL) util_free(old_file);
|
||||
@@ -1563,7 +1559,7 @@ proj_save_exploded(
|
||||
if ((iRet = util_mkdir_hier(dir)) < 0)
|
||||
{
|
||||
obj_set_name(project, old_name);
|
||||
sprintf(Buf, "%s: %s", dir, sys_errlist[errno]);
|
||||
sprintf(Buf, "%s: %s", dir, strerror(errno));
|
||||
util_printf_err(Buf);
|
||||
if (rel_path) util_free(rel_path);
|
||||
if (old_name != NULL) util_free(old_name);
|
||||
@@ -2140,7 +2136,7 @@ save_proj_as_bix(
|
||||
}
|
||||
else /* An error occurred with stat */
|
||||
{
|
||||
sprintf(Buf, "%s: %s", bix_file, sys_errlist[errno]);
|
||||
sprintf(Buf, "%s: %s", bix_file, strerror(errno));
|
||||
xm_buf = XmStringCreateLocalized(Buf);
|
||||
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
|
||||
(void)dtb_show_modal_message(dtb_get_toplevel_widget(),
|
||||
@@ -2229,7 +2225,7 @@ export_uil_file(
|
||||
else
|
||||
{
|
||||
/* An error occurred in stat (inside util_file_exists()) */
|
||||
sprintf(Buf, "%s: %s", fullpath, sys_errlist[errno]);
|
||||
sprintf(Buf, "%s: %s", fullpath, strerror(errno));
|
||||
xm_buf = XmStringCreateLocalized(Buf);
|
||||
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
|
||||
(void)dtb_show_modal_message(dtb_get_toplevel_widget(),
|
||||
|
||||
@@ -178,7 +178,7 @@ x_create_stencil_cursor(
|
||||
{
|
||||
if (util_get_verbosity() > 0)
|
||||
fprintf(stderr,"x_create_stencil_cursor: widget must be realized\n");
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
dpy = XtDisplay(widget);
|
||||
|
||||
Reference in New Issue
Block a user