* details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
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);
int i, j;
int mask_needed;
Boolean SUN;
- char *base_name, *suffix, fname[256], *tmp, *tmp2, *vend;
+ char *base_name, *suffix, fname[MAXPATHLEN], *tmp, *tmp2, *vend;
Pixmap scratch_pix;
XImage *scratch_shape, *scratch_mask;
struct stat statbuf; /* Information on a file. */
netfile = tt_host_file_netfile(fnameIn, tmp+1);
localfile = tt_netfile_file(netfile);
- strncpy(fname, localfile, MAXPATHLEN);
+ strncpy(fname, localfile, MAXPATHLEN - 1);
+ fname[MAXPATHLEN - 1] = 0;
tmp[0] = ':';
tt_free(netfile);
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);
}
icon_height = height;
fileFormat = FORMAT_XPM;
XmToggleButtonGadgetSetState(formatMenu_xpm_tb, True, True);
-/* This line is not realy needed since an Exposed event will be generated */
+/* This line is not really needed since an Exposed event will be generated */
Repaint_Exposed_Tablet();
XDestroyImage(scratch_img);
XFreePixmap(dpy, pix_ret);
icon_height = height;
fileFormat = FORMAT_XBM;
XmToggleButtonGadgetSetState(formatMenu_xbm_tb, True, True);
-/* This line is not realy needed since an Exposed event will be generated */
+/* This line is not really needed since an Exposed event will be generated */
Repaint_Exposed_Tablet();
if (mask_ret) {
XDestroyImage(test_img);