#define MY_NUM 7
_DtSubstitutionRec mySubs [MY_NUM];
- if (spec == NULL || *spec == NULL)
+ if (spec == NULL || *spec == '\0')
{
errno = EINVAL;
return NULL;
{
errno = EINVAL;
_DtHelpProcessUnlock();
- return NULL;
+ return 0;
}
/*
*ret_ids = NULL;
if (_DtHelpCeGetSdlVolIds(volume, -1, &idSegs) != 0)
- return NULL;
+ return 0;
if (_SdlVolumeMinorNumber(_DtHelpCeGetSdlVolumePtr(volume)) >= SDL_DTD_1_1)
hiddenNo = 0;
if (*id != pDAS->scr_timer_id)
return;
- pDAS->scr_timer_id = NULL;
+ pDAS->scr_timer_id = 0;
maxY = pDAS->maxYpos;
dispY = pDAS->firstVisible + pDAS->dispUseHeight;
if (pDAS->scr_timer_id)
{
XtRemoveTimeOut (pDAS->scr_timer_id);
- pDAS->scr_timer_id = NULL;
+ pDAS->scr_timer_id = 0;
}
_DtHelpClearSelection (client_data);
}
if (pDAS->scr_timer_id)
{
XtRemoveTimeOut (pDAS->scr_timer_id);
- pDAS->scr_timer_id = NULL;
+ pDAS->scr_timer_id = 0;
}
newX = callback->event->xbutton.x;
if (pDAS->scr_timer_id)
{
XtRemoveTimeOut (pDAS->scr_timer_id);
- pDAS->scr_timer_id = NULL;
+ pDAS->scr_timer_id = 0;
}
newX = event->xmotion.x;
XFreeGC (dpy, pDAS->normalGC);
XFreeGC (dpy, pDAS->pixmapGC);
XFreeGC (dpy, pDAS->invertGC);
- if (pDAS->def_pix != NULL &&
+ if (pDAS->def_pix != 0 &&
XmDestroyPixmap(XDefaultScreenOfDisplay(dpy), pDAS->def_pix) == False)
XFreePixmap(dpy, pDAS->def_pix);
if (pDAS->context != NULL)
#define GROW_SIZE 5
static Boolean QuarksInited = FALSE;
-static XrmQuark StringFontQuark = NULL;
+static XrmQuark StringFontQuark = 0;
static XrmName DefaultFontQuarks[_DtHelpFontQuarkNumber];
static XrmBinding FontBindings[_DtHelpFontQuarkNumber] =
{ XrmBindLoosely, XrmBindLoosely, XrmBindLoosely, XrmBindLoosely,
static DtHelpDAFSMetrics DefaultMetrics = { FALSE, 0, 0 };
static DtHelpDAFontInfo DefFontInfo = { NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, 0, 0, 0, 0, 0};
+ NULL, 0, NULL, 0, 0, 0, 0, 0};
/******************************************************************************
*
retValue.addr = (XtPointer) &xrm_list[_DT_HELP_FONT_CHAR_SET];
xrmList[0] = XrmStringToQuark (buffer);
xrmList[1] = XrmStringToQuark ("code_set");
- xrmList[2] = NULL;
+ xrmList[2] = 0;
XrmQPutResource (&(fontInfo->font_idx_db),
((XrmBindingList) FontBindings),
xrmList, _DtHelpXrmQuark, &retValue);
sprintf (buffer, "%d", font_index);
xrmList[0] = XrmStringToQuark (buffer);
xrmList[1] = XrmStringToQuark ("code_set");
- xrmList[2] = NULL;
+ xrmList[2] = 0;
/*
* look in my font data base for the quark.
sprintf (buffer, "%d", font_index);
xrmList[0] = XrmStringToQuark (buffer);
xrmList[1] = XrmStringToQuark ("language");
- xrmList[2] = NULL;
+ xrmList[2] = 0;
/*
* look in my font data base for the quark.
DefaultFontQuarks[_DT_HELP_FONT_LANG_TER] = XrmStringToQuark ("C");
DefaultFontQuarks[_DT_HELP_FONT_CHAR_SET] =
XrmStringToQuark ("ISO-8859-1");
- DefaultFontQuarks[_DT_HELP_FONT_END] = NULL;
+ DefaultFontQuarks[_DT_HELP_FONT_END] = 0;
QuarksInited = True;
}
_DtHelpProcessUnlock();
retValue.addr = (XtPointer) &myQuark;
xrmList[0] = XrmStringToQuark (buffer);
xrmList[1] = XrmStringToQuark ("code_set");
- xrmList[2] = NULL;
+ xrmList[2] = 0;
XrmQPutResource (&(fontInfo->font_idx_db),
((XrmBindingList) FontBindings),
xrmList, _DtHelpXrmQuark, &retValue);
* system includes
*/
#include <string.h>
+#include <stdlib.h>
/*
* private includes
(char) False, /* char top_block; */
(char) False, /* char dup_flag; */
0, /* int sdl_type; */
- NULL, /* void *match_info; */
+ 0, /* void *match_info; */
NULL, /* void *id_info; */
NULL, /* void *tmp_info; */
};
srch->curVolRadBtnSens = False;
srch->volLeftCnt = 0;
srch->volListHead = NULL; /* info on search topics found */
- srch->workProcId = NULL;
+ srch->workProcId = 0;
}
\f
int junk;
unsigned int width, height;
unsigned char *data;
- Pixmap scaled_pixmap=NULL;
+ Pixmap scaled_pixmap = 0;
Display *dpy = DisplayOfScreen(screen);
Drawable drawable = RootWindowOfScreen(screen);
XImage ximage;
)
{
int result = -1;
- Pixmap pixmap = NULL;
+ Pixmap pixmap = 0;
ilFile inFile;
ilPipe inPipe;
ilFileImage inImage;
if (result == -1)
{
XFreePixmap (dpy, pixmap);
- pixmap = NULL;
+ pixmap = 0;
}
}
}
float ratio
)
{
- XImage *image, **imageptr = NULL;
+ XImage *image = NULL;
+ XImage **imageptr = 0;
XImage *shapeimage, **shapeimageptr = NULL;
int ErrorStatus;
int switchFlag = 0;
*/
if (pixmap_return) {
- *pixmap_return = NULL;
+ *pixmap_return = 0;
imageptr = ℑ
}
if (shapemask_return) {
- *shapemask_return = NULL;
+ *shapemask_return = 0;
shapeimageptr = &shapeimage;
}
int i, j;
int result;
short done;
- Pixmap pixmap = NULL;
+ Pixmap pixmap = 0;
XpmAttributes xpmAttr;
Visual vis2;
XGCValues gcvalues;
g.f_black, g.f_white, ratio);
/* Set the returned colors parameters */
- if (*ret_pixmap != NULL)
+ if (*ret_pixmap != 0)
{
if (g.f_do_visual == DO_COLOR)
{
unsigned int pixHeight = 0;
Dimension pWidth, pHeight;
char *ptr;
- Pixmap pix = NULL, mask = NULL;
+ Pixmap pix = 0, mask = 0;
_DtGrStream stream;
Screen *scrptr = ScreenOfDisplay (dpy, screen);
static enum _DtGrColorModel ForceColor = _DtGrCOLOR;
result = _DtGrOpenFile(&stream, filename);
if (result != 0)
- pix = NULL;
+ pix = 0;
else
{
/* Create a pixmap from the image data stream */
}
}
- if (pix == NULL)
+ if (pix == 0)
{
/*
* Try to get a localized pixmap
* This is a cached pixmap.....
* Make sure XFreePixmaps does not free this one.
*/
- if (*def_pix == NULL)
+ if (*def_pix == 0)
{
*def_pix = XmGetPixmap(scrptr, "Dthgraphic", fore_ground, back_ground);
if (*def_pix != XmUNSPECIFIED_PIXMAP)
&pixWidth, &pixHeight, &border, &depth) == 0)
{
XmDestroyPixmap(scrptr, *def_pix);
- *def_pix = NULL;
+ *def_pix = 0;
}
}
else
- *def_pix = NULL;
+ *def_pix = 0;
/*
* couldn't get a localized pixmap, go with a build in default
*/
- if (*def_pix == NULL)
+ if (*def_pix == 0)
{
pixWidth = Missing_bm_width;
pixHeight = Missing_bm_height;
callDataInfo.locationId = NULL;
callDataInfo.helpVolume = NULL;
callDataInfo.specification = NULL;
- callDataInfo.hyperType = NULL;
+ callDataInfo.hyperType = 0;
/* All we do is envoke the applications close callback */
callDataInfo.locationId = NULL;
callDataInfo.helpVolume = NULL;
callDataInfo.specification = NULL;
- callDataInfo.hyperType = NULL;
+ callDataInfo.hyperType = 0;
/* All we do is envoke the applications close callback */
XtCallCallbackList((Widget)qw,qw->qhelp_dialog.qhelp.closeCallback,
Widget shellWidget,
Cursor cursorIn)
{
- static Cursor DfltOnItemCursor = NULL;
+ static Cursor DfltOnItemCursor = 0;
Widget widget;
Widget child;
CompositeWidget comp_widget;
/* Make the target cursor */
- if (cursorIn != NULL)
+ if (cursorIn != 0)
cursor = cursorIn;
else
#if 0
#else
{
_DtHelpProcessLock();
- if (NULL == DfltOnItemCursor)
+ if (0 == DfltOnItemCursor)
{
char *bits;
char *maskBits;
*/
if (list != NULL)
{
- while (NULL != *list)
+ while ('\0' != *list)
{
/*
* it matches, return true
if (fileName != file_xid)
free (fileName);
- if (pGS->pix == NULL)
+ if (pGS->pix == 0)
{
free(pReg);
free(pGS);
pDAS->searchColor = DA_args.search_color;
pDAS->depth = 0;
pDAS->spc_chars = NULL;
- pDAS->scr_timer_id = NULL;
- pDAS->def_pix = NULL;
+ pDAS->scr_timer_id = 0;
+ pDAS->def_pix = 0;
pDAS->context = NULL;
pDAS->vertIsMapped = False;
pDAS->horzIsMapped = False;
dstdata.producerObject = (ilObject) NULL;
des = *pimdes;
des.compression = IL_UNCOMPRESSED;
- des.compInfo.g4.flags = NULL;
+ des.compInfo.g4.flags = 0;
dstdata.pDes = &des;
dstdata.pFormat = IL_FORMAT_BIT;
dstdata.width = pinfo->width;
dstdata.producerObject = (ilObject) NULL;
des = *pimdes;
des.compression = IL_UNCOMPRESSED;
- des.compInfo.g4.flags = NULL;
+ des.compInfo.g4.flags = 0;
dstdata.pDes = &des;
dstdata.pFormat = IL_FORMAT_BIT;
dstdata.width = pinfo->width;