static BOOL printConfig()

in src/native/windows/apps/prunsrv/prunsrv.c [678:723]


static BOOL printConfig(LPAPXCMDLINE lpCmdline)
{
    int i = 0;

    if (!loadConfiguration(lpCmdline)) {
		return FALSE;
	}

    fwprintf(stderr, L"%s.exe update ",lpCmdline->szExecutable);
    while (_options[i].szName) {
		if (_options[i].dwType & APXCMDOPT_INT) {
			fwprintf(stderr, L"--%s %d ", _options[i].szName, _options[i].dwValue);
		} else if (_options[i].dwType & APXCMDOPT_MSZ) {
			if (_options[i].szValue) {
				BOOL first = TRUE;
				LPCWSTR p = _options[i].szValue;
    	        fwprintf(stderr, L"--%s \"", _options[i].szName);

    	        while (*p) {
    	        	if (first) {
    	        		first = FALSE;
    	        	} else {
    	        		fwprintf(stderr, L"#");
    	        	}
    	        	// Skip to terminating NULL for this value
    	        	while (p[0]) {
    	        		if (p[0] == L'#') {
    	        			fwprintf(stderr, L"'%c'", p[0]);
    	        		} else {
    	        			fwprintf(stderr, L"%c", p[0]);
    	        		}
    	        		++p;
    	        	}
    	        	// Move to start of next value
    	        	++p;
    	        }
    	        fwprintf(stderr, L"\" ");
			}
        } else if (_options[i].szValue) {
            fwprintf(stderr, L"--%s \"%s\" ", _options[i].szName, _options[i].szValue);
        }
        // NULL options are ignored
        ++i;
    }
    return TRUE;
}