if (0 == strcasecomp(mc->testcommand, "test -n \"$DISPLAY\"")) {
if (0 == strcmp(mc->testcommand, "test \"$DISPLAY\"") || 0 == strcmp(mc->testcommand, "test \"$DISPLAY\" != \"\"") || 0 == strcasecomp(mc->testcommand, "test -n \"$DISPLAY\"")) {
PRIVATE int PassesTest ARGS1(	struct MailcapEntry *,	mc){    int result;    char *cmd, TmpFileName[LY_MAXPATH];    /*     *  Make sure we have a command     */    if (!mc->testcommand)	return(1);    /*     *  Save overhead of system() calls by faking these. - FM     */    if (0 == strcasecomp(mc->testcommand, "test -n \"$DISPLAY\"")) {	FREE(mc->testcommand);	CTRACE(tfp, "PassesTest: Testing for XWINDOWS environment.\n");    	if (LYgetXDisplay() != NULL) {	    CTRACE(tfp, "PassesTest: Test passed!\n");	    return(0 == 0);	} else {	    CTRACE(tfp, "PassesTest: Test failed!\n");	    return(-1 == 0);	}    }    if (0 == strcasecomp(mc->testcommand, "test -z \"$DISPLAY\"")) {	FREE(mc->testcommand);	CTRACE(tfp, "PassesTest: Testing for NON_XWINDOWS environment.\n");    	if (LYgetXDisplay() == NULL) {	    CTRACE(tfp,"PassesTest: Test passed!\n");	    return(0 == 0);	} else {	    CTRACE(tfp,"PassesTest: Test failed!\n");	    return(-1 == 0);	}    }    /*     *  Why do anything but return success for this one! - FM     */    if (0 == strcasecomp(mc->testcommand, "test -n \"$LYNX_VERSION\"")){	FREE(mc->testcommand);	CTRACE(tfp, "PassesTest: Testing for LYNX environment.\n");	CTRACE(tfp, "PassesTest: Test passed!\n");	return(0 == 0);    } else    /*     *  ... or failure for this one! - FM     */    if (0 == strcasecomp(mc->testcommand, "test -z \"$LYNX_VERSION\"")) {	FREE(mc->testcommand);	CTRACE(tfp, "PassesTest: Testing for non-LYNX environment.\n");	CTRACE(tfp, "PassesTest: Test failed!\n");	return(-1 == 0);    }    result = RememberTestResult(RTR_lookup, mc->testcommand, 0);    if(result == -1) {	/*	 *  Build the command and execute it.	 */	if (strchr(mc->testcommand, '%')) {	    if (LYOpenTemp(TmpFileName, HTML_SUFFIX, "w") == 0)		ExitWithError(CANNOT_OPEN_TEMP);	    LYCloseTemp(TmpFileName);	} else {	    /* We normally don't need a temp file name - kw */	    TmpFileName[0] = '\0';	}	cmd = (char *)malloc(1024);	if (!cmd)	    ExitWithError(MEMORY_EXHAUSTED_ABORT);	BuildCommand(&cmd, 1024,		     mc->testcommand,		     TmpFileName,		     strlen(TmpFileName));	CTRACE(tfp, "PassesTest: Executing test command: %s\n", cmd);	result = LYSystem(cmd);	FREE(cmd);	LYRemoveTemp(TmpFileName);	RememberTestResult(RTR_add, mc->testcommand, result ? 1 : 0);    }    /*     *  Free the test command as well since     *  we wont be needing it anymore.     */    FREE(mc->testcommand);    if (result) {	CTRACE(tfp,"PassesTest: Test failed!\n");    } else {	CTRACE(tfp,"PassesTest: Test passed!\n");    }    return(result == 0);}