if (!outFile)
if (!outFile) { #if defined(WIN32)   int smrv = _setmode(_fileno(stdout), _O_BINARY); if (smrv == -1) { fprintf(stderr, "%s: Cannot change stdout to binary mode. Use -o option instead.\n", progName); return smrv; } #endif
int main(int argc, char **argv){    char *progName;    SECStatus rv;    FILE *inFile, *outFile;    PLOptState *optstate;    PLOptStatus status;    inFile = 0;    outFile = 0;    progName = strrchr(argv[0], '/');    if (!progName)	progName = strrchr(argv[0], '\\');    progName = progName ? progName+1 : argv[0];    /* Parse command line arguments */    optstate = PL_CreateOptState(argc, argv, "i:o:");    while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) {	switch (optstate->option) {	  default:	    Usage(progName);	    break;	  case 'i':	    inFile = fopen(optstate->value, "rb");	    if (!inFile) {		fprintf(stderr, "%s: unable to open \"%s\" for reading\n",			progName, optstate->value);		return -1;	    }	    break;	  case 'o':	    outFile = fopen(optstate->value, "w");	    if (!outFile) {		fprintf(stderr, "%s: unable to open \"%s\" for writing\n",			progName, optstate->value);		return -1;	    }	    break;	}    }    if (status == PL_OPT_BAD)	Usage(progName);    if (!inFile) {#if defined(WIN32)	/* If we're going to read binary data from stdin, we must put stdin	** into O_BINARY mode or else incoming \r\n's will become \n's.	*/	int smrv = _setmode(_fileno(stdin), _O_BINARY);	if (smrv == -1) {	    fprintf(stderr,	    "%s: Cannot change stdin to binary mode. Use -i option instead.\n",	            progName);	    return smrv;	}#endif    	inFile = stdin;    }    if (!outFile)     	outFile = stdout;    rv = encode_file(outFile, inFile);    if (rv != SECSuccess) {	fprintf(stderr, "%s: lossage: error=%d errno=%d\n",		progName, PORT_GetError(), errno);	return -1;    }    return 0;}