Check-in [2674622249]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More confusing "(BYTE *) & val" style punctuation. I blame GNU indent, although its confusion is understandable.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2674622249d10d83841f864ac82ae9d0c3d5579e
User & Date: jacob 2005-03-02 09:53:50.000
Context
2005-03-02
17:33
Draglists, implemented as up-down preference lists as in GTK. check-in: c7b9eac6fd user: owen tags: trunk
09:53
More confusing "(BYTE *) & val" style punctuation. I blame GNU indent, although its confusion is understandable. check-in: 2674622249 user: jacob tags: trunk
2005-03-01
18:46
nit: confusing punctuation check-in: edd34de4f8 user: jacob tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to windows/winpgen.c.
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
    pps.comment = comment;
    do {
	if (needs_pass) {
	    int dlgret;
	    dlgret = DialogBoxParam(hinst,
				    MAKEINTRESOURCE(210),
				    NULL, PassphraseProc,
				    (LPARAM) & pps);
	    if (!dlgret) {
		ret = -2;
		break;
	    }
	} else
	    *passphrase = '\0';
	if (type == SSH_KEYTYPE_SSH1) {







|







658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
    pps.comment = comment;
    do {
	if (needs_pass) {
	    int dlgret;
	    dlgret = DialogBoxParam(hinst,
				    MAKEINTRESOURCE(210),
				    NULL, PassphraseProc,
				    (LPARAM) &pps);
	    if (!dlgret) {
		ret = -2;
		break;
	    }
	} else
	    *passphrase = '\0';
	if (type == SSH_KEYTYPE_SSH1) {
Changes to windows/winpgntc.c.
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#endif

    /*
     * The user either passed a null callback (indicating that the
     * query is required to be synchronous) or CreateThread failed.
     * Either way, we need a synchronous request.
     */
    id = SendMessage(hwnd, WM_COPYDATA, (WPARAM) NULL, (LPARAM) & cds);
    if (id > 0) {
	retlen = 4 + GET_32BIT(p);
	ret = snewn(retlen, unsigned char);
	if (ret) {
	    memcpy(ret, p, retlen);
	    *out = ret;
	    *outlen = retlen;







|







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#endif

    /*
     * The user either passed a null callback (indicating that the
     * query is required to be synchronous) or CreateThread failed.
     * Either way, we need a synchronous request.
     */
    id = SendMessage(hwnd, WM_COPYDATA, (WPARAM) NULL, (LPARAM) &cds);
    if (id > 0) {
	retlen = 4 + GET_32BIT(p);
	ret = snewn(retlen, unsigned char);
	if (ret) {
	    memcpy(ret, p, retlen);
	    *out = ret;
	    *outlen = retlen;
Changes to windows/winstore.c.
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
		      1 + strlen(value));
}

void write_setting_i(void *handle, const char *key, int value)
{
    if (handle)
	RegSetValueEx((HKEY) handle, key, 0, REG_DWORD,
		      (CONST BYTE *) & value, sizeof(value));
}

void close_settings_w(void *handle)
{
    RegCloseKey((HKEY) handle);
}








|







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
		      1 + strlen(value));
}

void write_setting_i(void *handle, const char *key, int value)
{
    if (handle)
	RegSetValueEx((HKEY) handle, key, 0, REG_DWORD,
		      (CONST BYTE *) &value, sizeof(value));
}

void close_settings_w(void *handle)
{
    RegCloseKey((HKEY) handle);
}

153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
int read_setting_i(void *handle, const char *key, int defvalue)
{
    DWORD type, val, size;
    size = sizeof(val);

    if (!handle ||
	RegQueryValueEx((HKEY) handle, key, 0, &type,
			(BYTE *) & val, &size) != ERROR_SUCCESS ||
	size != sizeof(val) || type != REG_DWORD)
	return defvalue;
    else
	return val;
}

int read_setting_fontspec(void *handle, const char *name, FontSpec *result)







|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
int read_setting_i(void *handle, const char *key, int defvalue)
{
    DWORD type, val, size;
    size = sizeof(val);

    if (!handle ||
	RegQueryValueEx((HKEY) handle, key, 0, &type,
			(BYTE *) &val, &size) != ERROR_SUCCESS ||
	size != sizeof(val) || type != REG_DWORD)
	return defvalue;
    else
	return val;
}

int read_setting_fontspec(void *handle, const char *name, FontSpec *result)