return (int)pos;
}
- if (word != (char *)NULL)
- XtFree(word);
+ XtFree(word);
}
return -1;
* Find/Change mode
* Free the existing search string and get the new one.
*/
- if (M_search_string(pPriv))
- XtFree(M_search_string(pPriv));
+ XtFree(M_search_string(pPriv));
M_search_string(pPriv) = XmTextFieldGetString( M_findText(pPriv) );
/*
if( pString != (char *)NULL && *pString != (char)'\0' )
_DtEditorSetReplaceSensitivity( pPriv, True );
- if(pString != (char *)NULL)
- XtFree(pString);
+ XtFree(pString);
}
else {
/*
* Find/Change mode
* Free the existing Change To string and get the new one.
*/
- if (M_replace_string(pPriv))
- XtFree(M_replace_string(pPriv));
+ XtFree(M_replace_string(pPriv));
M_replace_string(pPriv) = XmTextFieldGetString(M_replaceText(pPriv));
DtEditorChange( (Widget)pPriv, (DtEditorChangeValues *)NULL,
* Find/Change mode
* Free any existing search string before getting the current one.
*/
- if (M_search_string(pPriv))
- XtFree(M_search_string(pPriv));
+ XtFree(M_search_string(pPriv));
M_search_string(pPriv) = XmTextFieldGetString(M_findText(pPriv));
/*
* Free the existing Change To string and get the new one.
*/
- if (M_replace_string(pPriv))
- XtFree(M_replace_string(pPriv));
+ XtFree(M_replace_string(pPriv));
M_replace_string(pPriv) = XmTextFieldGetString(M_replaceText(pPriv));
/*
changeValues.changeTo = XmTextFieldGetString(M_replaceText(pPriv));
DtEditorChange((Widget)pPriv, &changeValues, DtEDITOR_ALL_OCCURRENCES);
- if( changeValues.changeTo != (char *)NULL )
- XtFree( changeValues.changeTo );
+ XtFree( changeValues.changeTo );
}
* Get the selected word for use when the Find or Replace All button
* is pressed.
*/
- if (M_misspelled_string(editor))
- XtFree(M_misspelled_string(editor));
+ XtFree(M_misspelled_string(editor));
M_misspelled_string(editor) =
_XmStringUngenerate(cb->item, NULL, XmCHARSET_TEXT, XmCHARSET_TEXT);
*/
defaultButton = M_search_findBtn(editor);
}
- if(pString != (char *)NULL)
- XtFree(pString);
+ XtFree(pString);
/*
* Set the default button
if ( M_misspelled_found(editor) )
_DtEditorSetReplaceSensitivity(editor, True );
- if(pString != (char *)NULL)
- XtFree(pString);
+ XtFree(pString);
}