if ((fd = open(src->multi_src.string, open_mode, 0666))) {
if ((fd = open(src->multi_src.string, open_mode, 0666)) != -1) {
InitStringOrFile(src, newString)    MultiSrcObject src;    Boolean newString;{    mode_t open_mode = 0;    const char *fdopen_mode = NULL;    int fd;    FILE * file;    char fileName[TMPSIZ];    Display *d = XtDisplayOfObject((Widget)src);    if (src->multi_src.type == XawAsciiString) {	if (src->multi_src.string == NULL)	    src->multi_src.length = 0;	else if (! src->multi_src.use_string_in_place) {	    int length;            String temp = XtNewString(src->multi_src.string);            if ( src->multi_src.allocated_string )                XtFree( src->multi_src.string );            src->multi_src.allocated_string = True;	    src->multi_src.string = temp;	    length = strlen(src->multi_src.string);	    /* Wasteful, throwing away the WC string, but need side effect! */            (void) _XawTextMBToWC(d, src->multi_src.string, &length);	    src->multi_src.length = (XawTextPosition) length;	} else {	    src->multi_src.length = strlen(src->multi_src.string);	    /* In case the length resource is incorrectly set */	    if (src->multi_src.length > src->multi_src.multi_length)		src->multi_src.multi_length = src->multi_src.length;	    if (src->multi_src.multi_length == MAGIC_VALUE) 		src->multi_src.piece_size = src->multi_src.length;	    else		src->multi_src.piece_size = src->multi_src.multi_length + 1;	}		       /*((TextWidget)src->object.parent)->text.lastPos = src->multi_src.length;*/	return(NULL);    }/* * type is XawAsciiFile. */        src->multi_src.is_tempfile = FALSE;    switch (src->text_src.edit_mode) {    case XawtextRead:	if (src->multi_src.string == NULL)	    XtErrorMsg("NoFile", "multiSourceCreate", "XawError",		     "Creating a read only disk widget and no file specified.",		       NULL, 0);	open_mode = O_RDONLY;	fdopen_mode = "r";	break;    case XawtextAppend:    case XawtextEdit:	if (src->multi_src.string == NULL) {            src->multi_src.allocated_string = False;	    src->multi_src.string = fileName;	    (void) tmpnam(src->multi_src.string);	    src->multi_src.is_tempfile = TRUE;	    open_mode = O_WRONLY | O_CREAT | O_EXCL;	    fdopen_mode = "w";	} else {/* O_NOFOLLOW is a BSD & Linux extension */#ifdef O_NOFOLLOW	    	    open_mode = O_RDWR | O_NOFOLLOW;#else	    open_mode = O_RDWR;	/* unsafe; subject to race conditions */#endif	    fdopen_mode = "r+";	}	break;    default:	XtErrorMsg("badMode", "multiSourceCreate", "XawError",		"Bad editMode for multi source; must be Read, Append or Edit.",		   NULL, NULL);    }    /* Allocate new memory for the temp filename, because it is held in     * a stack memory buffer.  We must verify that all routines that set     * .string first check .allocated_string and free it - plumbing Sheeran.     */    if (newString || src->multi_src.is_tempfile) {	String temp = XtNewString(src->multi_src.string);	if ( src->multi_src.allocated_string )            XtFree( src->multi_src.string );	src->multi_src.string = temp;	src->multi_src.allocated_string = TRUE;    }        if (!src->multi_src.is_tempfile) {	if ((fd = open(src->multi_src.string, open_mode, 0666))) {	    if ((file = fdopen(fd, fdopen_mode)) != NULL) {		(void)fseek(file, 0, SEEK_END);		src->multi_src.length = (XawTextPosition)ftell(file);		return (file);	    }	}	{	    String params[2];	    Cardinal num_params = 2;	    	    params[0] = src->multi_src.string;	    params[1] = strerror(errno);	    XtAppWarningMsg(XtWidgetToApplicationContext((Widget)src),			    "openError", "multiSourceCreate", "XawWarning",			    "Cannot open file %s; %s", params, &num_params);	}    }    src->multi_src.length = 0;    return(NULL);#undef StrLen}