")\n"
"{\n"
"#define pixmapReturn (*pixmapReturnPtr)\n"
- " Pixmap pixmap = NULL;\n"
+ " Pixmap pixmap = 0;\n"
" Screen *screen = NULL;\n"
" Pixel fgPixel = 0;\n"
" Pixel bgPixel = 0;\n"
" {\n"
" pixmap = XmGetPixmap(screen, fileName, fgPixel, bgPixel);\n"
" }\n"
- " pixmap_found = ((pixmap != NULL) && (pixmap != XmUNSPECIFIED_PIXMAP));\n"
+ " pixmap_found = ((pixmap != 0) && (pixmap != XmUNSPECIFIED_PIXMAP));\n"
"\n"
" if (!pixmap_found)\n"
" {\n"
" sprintf(image_path, \"%s/%s\", dtb_get_exe_dir(), fileName);\n"
" pixmap = XmGetPixmap(screen, image_path, fgPixel, bgPixel);\n"
" }\n"
- " pixmap_found = ((pixmap != NULL) && (pixmap != XmUNSPECIFIED_PIXMAP));\n"
+ " pixmap_found = ((pixmap != 0) && (pixmap != XmUNSPECIFIED_PIXMAP));\n"
"\n"
" if (!pixmap_found)\n"
" {\n"
" sprintf(image_path, \"%s/bitmaps/%s\", dtb_get_exe_dir(), fileName);\n"
" pixmap = XmGetPixmap(screen, image_path, fgPixel, bgPixel);\n"
" }\n"
- " pixmap_found = ((pixmap != NULL) && (pixmap != XmUNSPECIFIED_PIXMAP));\n"
+ " pixmap_found = ((pixmap != 0) && (pixmap != XmUNSPECIFIED_PIXMAP));\n"
"\n"
" if (!pixmap_found)\n"
" {\n"
"\n"
" dpy = XtDisplayOfObject(widget);\n"
"\n"
- " if(pixmap == XmUNSPECIFIED_PIXMAP || pixmap == (Pixmap)NULL) {\n"
- " return((Pixmap)NULL);\n"
+ " if(pixmap == XmUNSPECIFIED_PIXMAP || pixmap == 0) {\n"
+ " return(0);\n"
" }\n"
"\n"
" XtVaGetValues(widget,\n"
"\n"
" /* Get width/height of source pixmap */\n"
" if (!XGetGeometry(dpy,pixmap,&root,&x,&y,&width,&height,&bw,&depth)) {\n"
- " return((Pixmap)NULL);\n"
+ " return((Pixmap)0);\n"
" }\n"
" gcv.foreground = background;\n"
" gcv.fill_style = FillStippled;\n"
"/*\n"
" * Sets the label and insensitive label pixmaps of the widget. \n"
" *\n"
- " * If either (or both) pixmap is NULL, it is ignored.\n"
+ " * If either (or both) pixmap is 0, it is ignored.\n"
" */\n"
"int\n"
"dtb_set_label_pixmaps(\n"
" Pixmap labelInsensitivePixmap\n"
")\n"
"{\n"
- " if ( (widget == NULL)\n"
- " || ((labelPixmap == NULL) && (labelInsensitivePixmap == NULL)) )\n"
+ " if ( (widget == 0)\n"
+ " || ((labelPixmap == 0) && (labelInsensitivePixmap == 0)) )\n"
" {\n"
" return -1;\n"
" }\n"
")\n"
"{\n"
" int rc = 0; /* return code */\n"
- " Pixmap tmpPixmap = NULL;\n"
+ " Pixmap tmpPixmap = 0;\n"
" int depth;\n"
"\n"
" if (dtb_file_has_extension(fileName, \"pm\") ||\n"
"\n"
" if (rc < 0)\n"
" {\n"
- " *pixmap = NULL;\n"
+ " *pixmap = 0;\n"
" return rc;\n"
" }\n"
"\n"
")\n"
"{\n"
" int rc = 0; /* return code */\n"
- " Pixmap labelPixmap = NULL;\n"
- " Pixmap insensitivePixmap = NULL;\n"
+ " Pixmap labelPixmap = 0;\n"
+ " Pixmap insensitivePixmap = 0;\n"
" int depth;\n"
"\n"
" rc = dtb_cvt_image_file_to_pixmap(widget, fileName, &labelPixmap);\n"
"{\n"
" Display *display = NULL;\n"
" Screen *screen = NULL;\n"
- " Drawable window = NULL;\n"
+ " Drawable window = 0;\n"
" long bgPixel = 0;\n"
" long fgPixel = 0;\n"
" unsigned int depth = 0;\n"
- " Pixmap labelPixmap = NULL;\n"
+ " Pixmap labelPixmap = 0;\n"
"\n"
- " if ( (widget == NULL)\n"
+ " if ( (widget == 0)\n"
" || (width < 1)\n"
" || (height < 1)\n"
" || (bitmapData == NULL) )\n"
" display = XtDisplay(widget);\n"
" screen = XtScreen(widget);\n"
" window = XtWindow(widget);\n"
- " if (window == NULL)\n"
+ " if (window == 0)\n"
" {\n"
" /* Widget has not been realized, yet */\n"
" window = RootWindowOfScreen(screen);\n"
" width, height,\n"
" fgPixel, bgPixel,\n"
" depth);\n"
- " if (labelPixmap == NULL)\n"
+ " if (labelPixmap == 0)\n"
" {\n"
" return -1;\n"
" }\n"
"\n"
- " dtb_set_label_pixmaps(widget, labelPixmap, NULL);\n"
+ " dtb_set_label_pixmaps(widget, labelPixmap, 0);\n"
"\n"
" return 0;\n"
"}"
" int status = 0;\n"
" Display *display = NULL;\n"
" Screen *screen = NULL;\n"
- " Drawable window = NULL;\n"
- " Pixmap labelPixmap = NULL;\n"
+ " Drawable window = 0;\n"
+ " Pixmap labelPixmap = 0;\n"
"\n"
- " if ( (widget == NULL)\n"
+ " if ( (widget == 0)\n"
" || (xpmData == NULL) )\n"
" {\n"
" return -1;\n"
" display = XtDisplay(widget);\n"
" screen = XtScreen(widget);\n"
" window = XtWindow(widget);\n"
- " if (window == NULL)\n"
+ " if (window == 0)\n"
" {\n"
" /* Widget has not been realized, yet */\n"
" window = RootWindowOfScreen(screen);\n"
" if (status != XpmSuccess)\n"
" return -1;\n"
"\n"
- " dtb_set_label_pixmaps(widget, labelPixmap, NULL);\n"
+ " dtb_set_label_pixmaps(widget, labelPixmap, 0);\n"
"\n"
" return 0;\n"
"}"
"** Routines to save and access the toplevel widget for an application.\n"
"** This is useful in dtb_ convenience functions, and also probably by\n"
"** developers in routines they provide in their _stubs.c files.\n"
- "** static Widget dtb_project_toplevel_widget = (Widget) NULL;\n"
+ "** static Widget dtb_project_toplevel_widget = (Widget) 0;\n"
"*/\n"
"void\n"
"dtb_save_toplevel_widget(\n"
" WidgetList children;\n"
" int numChildren, i;\n"
"\n"
- " if (widget == NULL || !XtIsSubclass(widget, xmPanedWindowWidgetClass))\n"
+ " if (widget == 0 || !XtIsSubclass(widget, xmPanedWindowWidgetClass))\n"
" return;\n"
"\n"
" XtVaGetValues(widget,\n"
" Arg wargs[10];\n"
" char buffer[100];\n"
" Widget back_button;\n"
- " static Widget Quick_help_dialog = (Widget)NULL;\n"
+ " static Widget Quick_help_dialog = (Widget)0;\n"
" static Widget MoreButton;\n"
"\n"
" /* \n"
" ** its internal stack mechanism takes repeated settings as separate items\n"
" ** and updates the stack for each.)\n"
" */\n"
- " if(Quick_help_dialog == (Widget)NULL) {\n"
+ " if(Quick_help_dialog == (Widget)0) {\n"
" /* Create shared help dialog */\n"
" i = 0;\n"
" XtSetArg(wargs[i],XmNtitle, \"Application Help\"); i++;\n"
" Arg wargs[10];\n"
" String buffer, vol, loc;\n"
" char *cp;\n"
- " static Widget GeneralHelpDialog = (Widget) NULL;\n"
+ " static Widget GeneralHelpDialog = (Widget) 0;\n"
" Widget help_dialog = (Widget)clientData;\n"
" Widget more_button;\n"
"\n"
" loc = cp; \n"
" }\n"
"\n"
- " if(GeneralHelpDialog == (Widget)NULL) {\n"
+ " if(GeneralHelpDialog == (Widget)0) {\n"
" /* Create General Help Dialog */\n"
" i = 0;\n"
" XtSetArg(wargs[i],XmNtitle, \"Application Help\"); i++;\n"
" ** for one that has an XmNhelpCallback, and call the first one we\n"
" ** find.\n"
" */\n"
- " while(target != (Widget)NULL) {\n"
+ " while(target != (Widget)0) {\n"
" if( XtHasCallbacks(target,XmNhelpCallback) == XtCallbackHasSome) {\n"
" XtCallCallbacks(target,XmNhelpCallback,(XtPointer)NULL);\n"
" return;\n"
"{\n"
" int i;\n"
" Arg wargs[10];\n"
- " static Widget GeneralHelpDialog = (Widget) NULL;\n"
+ " static Widget GeneralHelpDialog = (Widget)0;\n"
" \n"
- " if(GeneralHelpDialog == (Widget)NULL) {\n"
+ " if(GeneralHelpDialog == (Widget)0) {\n"
" /* Create General Help Dialog */\n"
" i = 0;\n"
" XtSetArg(wargs[i],XmNtitle, \"Application Help\"); i++;\n"
" DtbObjectHelpData override_help\n"
")\n"
"{\n"
- " Widget msg_dlg = (Widget) NULL;\n"
- " Widget shell = (Widget) NULL;\n"
- " Widget button = (Widget) NULL;\n"
- " Widget action_button = (Widget) NULL;\n"
+ " Widget msg_dlg = (Widget) 0;\n"
+ " Widget shell = (Widget) 0;\n"
+ " Widget button = (Widget) 0;\n"
+ " Widget action_button = (Widget) 0;\n"
" unsigned char default_btn = XmDIALOG_NONE;\n"
" Arg arg[12];\n"
" int n = 0;\n"
" DTB_ACTION3_BUTTON);\n"
" }\n"
"\n"
- " if (action_button != (Widget) NULL)\n"
+ " if (action_button != (Widget) 0)\n"
" {\n"
" XtVaSetValues(action_button, \n"
" XmNdefaultButtonShadowThickness, 2,\n"
"{\n"
" int i, numChildren = 0;\n"
" WidgetList children = NULL;\n"
- " Widget action_button = NULL;\n"
+ " Widget action_button = 0;\n"
" int button = -1;\n"
" Boolean Found = False;\n"
"\n"
")\n"
"{\n"
" DtbObjectHelpData help_data_copy = (DtbObjectHelpData)NULL;\n"
- " Widget msg_dlg = (Widget) NULL, \n"
- " action_btn = (Widget) NULL;\n"
+ " Widget msg_dlg = (Widget) 0, \n"
+ " action_btn = (Widget) 0;\n"
"\n"
" if (override_help != (DtbObjectHelpData) NULL)\n"
" {\n"
" msg_dlg = dtb_create_message_dlg(parent, \n"
" mbr, override_msg, help_data_copy);\n"
"\n"
- " if (msg_dlg == (Widget) NULL)\n"
+ " if (msg_dlg == (Widget) 0)\n"
" return;\n"
"\n"
" /* Add Callbacks if necessary */\n"
" if (mbr->action2_callback != (XtCallbackProc) NULL)\n"
" {\n"
" action_btn = dtb_MessageBoxGetActionButton(msg_dlg, DTB_ACTION2_BUTTON);\n"
- " if (action_btn != NULL)\n"
+ " if (action_btn != 0)\n"
" XtAddCallback(action_btn, XmNactivateCallback,\n"
" mbr->action2_callback, NULL);\n"
" }\n"
" if (mbr->action3_callback != (XtCallbackProc) NULL)\n"
" {\n"
- " action_btn = dtb_MessageBoxGetActionButton(msg_dlg, DTB_ACTION3_BUTTON); if (action_btn != NULL)\n"
+ " action_btn = dtb_MessageBoxGetActionButton(msg_dlg, DTB_ACTION3_BUTTON); if (action_btn != 0)\n"
" XtAddCallback(action_btn, XmNactivateCallback,\n"
" mbr->action3_callback, NULL);\n"
" }\n"
") \n"
"{\n"
" XtAppContext app;\n"
- " Widget modal_dlg_pane = (Widget) NULL;\n"
- " Widget action2_button = (Widget) NULL;\n"
- " Widget action3_button = (Widget) NULL;\n"
+ " Widget modal_dlg_pane = (Widget) 0;\n"
+ " Widget action2_button = (Widget) 0;\n"
+ " Widget action3_button = (Widget) 0;\n"
" DtbObjectHelpData help_data_copy = (DtbObjectHelpData)NULL;\n"
" DTB_MODAL_ANSWER answer = DTB_ANSWER_NONE;\n"
" XtCallbackRec ok_callback[] = {\n"
" modal_dlg_pane = dtb_create_message_dlg(parent, mbr, \n"
" override_msg, help_data_copy);\n"
"\n"
- " if (modal_dlg_pane == (Widget) NULL)\n"
+ " if (modal_dlg_pane == (Widget) 0)\n"
" return (answer);\n"
" \n"
" XtVaSetValues(modal_dlg_pane,\n"
"\n"
" action2_button = dtb_MessageBoxGetActionButton(modal_dlg_pane,\n"
" DTB_ACTION2_BUTTON);\n"
- " if (action2_button != (Widget) NULL)\n"
+ " if (action2_button != (Widget) 0)\n"
" {\n"
" XtVaSetValues(action2_button,\n"
" XmNuserData, (XtPointer) &answer,\n"
")\n"
"{\n"
" WidgetList children_list;\n"
- " Widget label_widget = NULL;\n"
+ " Widget label_widget = 0;\n"
" int i,\n"
" num_children = 0;\n"
" char *subobj_name = NULL,\n"
" strcpy(underscore_ptr, \"_label\");\n"
" label_widget = XtNameToWidget(widget, label_name);\n"
" }\n"
- " if (label_widget == NULL)\n"
+ " if (label_widget == 0)\n"
" {\n"
" strcpy(label_name+1, subobj_name);\n"
" strcat(label_name, \"_label\");\n"
" if (num_children > 0)\n"
" return(get_label_widget(children_list[0]));\n"
"\n"
- " return (NULL);\n"
+ " return (0);\n"
"}"
}; /* abmfP_lrc_get_label_widget */
LibFunc abmfP_lib_get_label_widget = &(abmfP_lrc_get_label_widget);
")\n"
"{\n"
" Widget cur = w;\n"
- " Widget cur_parent = NULL;\n"
+ " Widget cur_parent = 0;\n"
" Position offset = 0;\n"
"\n"
" if (!ancestor || !w || (w == ancestor))\n"
")\n"
"{\n"
" WidgetList children_list;\n"
- " Widget lbl_widget = NULL;\n"
+ " Widget lbl_widget = 0;\n"
" Dimension lbl_width = 0;\n"
"\n"
" lbl_widget = get_label_widget(widget);\n"
" Dimension *label_width\n"
")\n"
"{\n"
- " Widget cur_widest = NULL;\n"
+ " Widget cur_widest = 0;\n"
" Dimension cur_width = 0;\n"
" int i;\n"
"\n"
" Dimension *value_width\n"
")\n"
"{\n"
- " Widget cur_widest = NULL;\n"
+ " Widget cur_widest = 0;\n"
" Dimension cur_width = 0;\n"
" int i;\n"
"\n"
"{\n"
" DTB_GROUP_TYPES group_type;\n"
" WidgetList children_list = NULL;\n"
- " Widget ret_child = NULL;\n"
+ " Widget ret_child = 0;\n"
" int num_children = 0,\n"
" num_rows,\n"
" num_columns,\n"
"\n"
" if (!parent || !group_info || \n"
" (x_pos < 0) || (y_pos < 0))\n"
- " return (NULL);\n"
+ " return (0);\n"
"\n"
" group_type = group_info->group_type;\n"
" num_rows = group_info->num_rows;\n"
" NULL);\n"
"\n"
" if (num_children <= 0)\n"
- " return (NULL);\n"
+ " return (0);\n"
"\n"
" switch (group_type)\n"
" {\n"
" group_info->num_cols = num_cols;\n"
" group_info->hoffset = hoffset;\n"
" group_info->voffset = voffset;\n"
- " group_info->ref_widget = NULL;\n"
+ " group_info->ref_widget = 0;\n"
"\n"
" align_children(parent, group_info, True);\n"
"\n"
"{\n"
" WidgetList children_list = NULL,\n"
" one_col;\n"
- " Widget previous_child = NULL,\n"
+ " Widget previous_child = 0,\n"
" child,\n"
" ref_widget,\n"
- " previous_ref_widget = NULL;\n"
+ " previous_ref_widget = 0;\n"
" Dimension ref_lbl_width = 0,\n"
" max_label_width = 0,\n"
" max_value_width = 0;\n"
")\n"
"{\n"
" WidgetList children_list;\n"
- " Widget previous_child = NULL,\n"
+ " Widget previous_child = 0,\n"
" child,\n"
" cur_child;\n"
" int num_children = 0,\n"
" /* look for an empty slot */\n"
" for (i = 0; i < numPopupMenus; ++i)\n"
" {\n"
- " if (popupMenus[i].widget == NULL)\n"
+ " if (popupMenus[i].widget == 0)\n"
" {\n"
" foundEntry = True;\n"
" break;\n"
")\n"
"{\n"
" int i = 0;\n"
- " Widget menu = NULL;\n"
+ " Widget menu = 0;\n"
"\n"
" if (event->type == ButtonPress)\n"
" {\n"
" }\n"
" }\n"
"\n"
- " if (menu != NULL)\n"
+ " if (menu != 0)\n"
" {\n"
" XmMenuPosition(menu, (XButtonPressedEvent*)event);\n"
" XtManageChild(menu);\n"
" if ( (popupMenus[i].widget == widget) \n"
" || (popupMenus[i].menu == widget) )\n"
" {\n"
- " popupMenus[i].widget = NULL;\n"
+ " popupMenus[i].widget = 0;\n"
" popupMenus[i].menu = NULL;\n"
" break;\n"
" }\n"
")\n"
"{\n"
" DtbDragSite dragSite = (DtbDragSite)XtCalloc(1,sizeof(DtbDragSiteRec));\n"
- " Widget sourceIcon = NULL;\n"
+ " Widget sourceIcon = 0;\n"
"\n"
" if (dragSite != NULL)\n"
" {\n"
" dragSite->operations = operations;\n"
" dragSite->bufferIsText = bufferIsText;\n"
" dragSite->allowDropOnRootWindow = allowDropOnRootWindow;\n"
- " if ((cursor != NULL) && (cursorMask != NULL))\n"
+ " if ((cursor != 0) && (cursorMask != 0))\n"
" {\n"
" dragSite->sourceIcon = \n"
" DtDndCreateSourceIcon(widget, cursor, cursorMask);\n"