+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
/* $XConsortium: fileIO.c /main/8 1996/10/21 17:31:11 mgreess $ */
/*********************************************************************
* (c) Copyright 1993, 1994 Hewlett-Packard Company
if (debug)
stat_out("Entering Do_FileIO\n");
#endif
- pix_ret = NULL;
- shape_ret = NULL;
- mask_ret = NULL;
+ pix_ret = 0;
+ shape_ret = 0;
+ mask_ret = 0;
/* get file name */
if (SaveMeNot){
XmUpdateDisplay(mainWindow);
- pix_ret = NULL;
- shape_ret = NULL;
- mask_ret = NULL;
+ pix_ret = 0;
+ shape_ret = 0;
+ mask_ret = 0;
xpm_ReadAttribs.valuemask = READ_FLAGS;
xpm_ReadAttribs.colorsymbols = colorSymbols;
xpm_ReadAttribs.numsymbols = NUM_PENS;
/*** does a suffix exist? ***/
if (suffix) {
strncpy(dummy, fname, ((suffix-fname)-1));
- dummy[(int) (suffix-fname)-1] = NULL;
+ dummy[(int) (suffix-fname)-1] = '\0';
strcat(dummy, "_m.");
strcat(dummy, suffix);
#ifdef DEBUG
if (status == BitmapSuccess) {
if ((width_ret != mask_width_ret) || (height_ret != mask_height_ret)) {
XFreePixmap(dpy, mask_ret);
- mask_ret = NULL;
+ mask_ret = 0;
}
}
else
- mask_ret = NULL;
+ mask_ret = 0;
}
strcpy(last_fname, fname);
if (debug)
Dump_AttribStruct(&xpm_WriteAttribs);
#endif
- status = _DtXpmWriteFileFromPixmap(dpy, fname, color_icon, NULL,
+ status = _DtXpmWriteFileFromPixmap(dpy, fname, color_icon, 0,
&xpm_WriteAttribs);
/*******
/*** THIRD, construct the mask filename ***/
if (suffix) {
strncpy(dummy, fname, ((suffix-fname)-1));
- dummy[(int) (suffix-fname)-1] = NULL;
+ dummy[(int) (suffix-fname)-1] = '\0';
strcat(dummy, "_m.");
strcat(dummy, suffix);
}