min(tx, last_tx), min(ty, last_ty),
abs(tx-last_tx), abs(ty-last_ty));
GraphicsOp = Backup_G_Op;
- Backup_G_Op = NULL;
+ Backup_G_Op = 0;
Pressed = False;
}
break;
case S_HOTSPOT :
case S_WAIT_RELEASE :
GraphicsOp = Backup_G_Op;
- Backup_G_Op = NULL;
+ Backup_G_Op = 0;
break;
case S_ROTATE :
case S_SCALE_2 :
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);
}
while (!XtIsSubclass(w, applicationShellWidgetClass))
w = XtParent(w);
- status = DtHelpReturnSelectedWidgetId(w, NULL, &selWidget);
+ status = DtHelpReturnSelectedWidgetId(w, 0, &selWidget);
/* NULL value for cursor, uses default cursor value. */
switch ((int)status)
TopLevel = XtAppInitialize(&AppContext, CLASS_NAME,
option_list, XtNumber(option_list),
- &argc, argv, NULL, NULL, NULL);
+ &argc, argv, NULL, NULL, 0);
XtGetApplicationResources(TopLevel, &xrdb, resources,
XtNumber(resources), NULL, 0);
tmp2 = strchr(tmp1, c);
strcpy(newName, tmp2);
}
- if (strncmp(newName, untitledStr, 8) == 0 || last_fname[0] == NULL) Process_SaveAs();
+ if (strncmp(newName, untitledStr, 8) == 0 || last_fname[0] == '\0') Process_SaveAs();
else
{
if (SavedOnce == True)
GraphicsOp = Backup_G_Op;
if (Backup_G_Op == SELECT)
Start_HotBox(CONTINUE);
- Backup_G_Op = NULL;
+ Backup_G_Op = 0;
}
XPutImage(dpy, color_icon, Color_gc, color_img, 0, 0, x, y,
Position lx, ly;
/*** window ID of tablet ***/
- tablet_win = NULL;
+ tablet_win = 0;
/*** Nothing needs to be saved, yet ***/
Dirty = False;
pointCount = 0;
/*** file I/O related globals ***/
- last_fname[0] = NULL;
+ last_fname[0] = '\0';
X_Hot = -1;
Y_Hot = -1;
stat_out(" Init_Icons: color=%x mono=%x\n", color_icon, mono_icon);
#endif
- tmp_color = NULL;
- tmp_mono = NULL;
+ tmp_color = 0;
+ tmp_mono = 0;
/*** App. init or 'New Icon' ***/
if (!saveFlag) {
mono_icon = XCreatePixmap(dpy, root, width, height,
DefaultDepth(dpy, screen));
- if ((color_icon == NULL) || (mono_icon == NULL))
+ if ((color_icon == 0) || (mono_icon == 0))
Abort(GETSTR(10,50, "Cannot initialize application icon storage"));
XSetForeground(dpy, scratch_gc, Transparent);
sprintf(bufr, "%s*y: %d\n", bufr, y);
sprintf(bufr, "%s*width: %d\n", bufr, width);
sprintf(bufr, "%s*height: %d\n", bufr, height);
- if (last_fname[0] != NULL)
+ if (last_fname[0] != '\0')
sprintf(bufr, "%s*file: %s\n", bufr, last_fname);
write (fd, bufr, strlen(bufr));
/*** now get the information we want from the database ***/
/*** make sure values are at least somewhat reasonable ***/
- xrm_name[1] = NULL;
+ xrm_name[1] = '\0';
/* get x position */
xrm_name[0] = XrmStringToQuark ("x");