~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Colin Watson reports that gnome-session has been known to leave
[sgt/putty]
/
unix
/
uxstore.c
diff --git
a/unix/uxstore.c
b/unix/uxstore.c
index
2476e4e
..
e7b9c15
100644
(file)
--- a/
unix/uxstore.c
+++ b/
unix/uxstore.c
@@
-220,7
+220,7
@@
void close_settings_w(void *handle)
* FIXME: the above comment is a bit out of date. Did it happen?
*/
* FIXME: the above comment is a bit out of date. Did it happen?
*/
-struct keyval {
+struct
s
keyval {
const char *key;
const char *value;
};
const char *key;
const char *value;
};
@@
-229,15
+229,15
@@
static tree234 *xrmtree = NULL;
int keycmp(void *av, void *bv)
{
int keycmp(void *av, void *bv)
{
- struct
keyval *a = (struct
keyval *)av;
- struct
keyval *b = (struct
keyval *)bv;
+ struct
skeyval *a = (struct s
keyval *)av;
+ struct
skeyval *b = (struct s
keyval *)bv;
return strcmp(a->key, b->key);
}
void provide_xrm_string(char *string)
{
char *p, *q, *key;
return strcmp(a->key, b->key);
}
void provide_xrm_string(char *string)
{
char *p, *q, *key;
- struct keyval *xrms, *ret;
+ struct
s
keyval *xrms, *ret;
p = q = strchr(string, ':');
if (!q) {
p = q = strchr(string, ':');
if (!q) {
@@
-248,7
+248,7
@@
void provide_xrm_string(char *string)
q++;
while (p > string && p[-1] != '.' && p[-1] != '*')
p--;
q++;
while (p > string && p[-1] != '.' && p[-1] != '*')
p--;
- xrms = snew(struct keyval);
+ xrms = snew(struct
s
keyval);
key = snewn(q-p, char);
memcpy(key, p, q-p);
key[q-p-1] = '\0';
key = snewn(q-p, char);
memcpy(key, p, q-p);
key[q-p-1] = '\0';
@@
-270,7
+270,7
@@
void provide_xrm_string(char *string)
const char *get_setting(const char *key)
{
const char *get_setting(const char *key)
{
- struct keyval tmp, *ret;
+ struct
s
keyval tmp, *ret;
tmp.key = key;
if (xrmtree) {
ret = find234(xrmtree, &tmp, NULL);
tmp.key = key;
if (xrmtree) {
ret = find234(xrmtree, &tmp, NULL);
@@
-297,14
+297,14
@@
void *open_settings_r(const char *sessionname)
while ( (line = fgetline(fp)) ) {
char *value = strchr(line, '=');
while ( (line = fgetline(fp)) ) {
char *value = strchr(line, '=');
- struct keyval *kv;
+ struct
s
keyval *kv;
if (!value)
continue;
*value++ = '\0';
value[strcspn(value, "\r\n")] = '\0'; /* trim trailing NL */
if (!value)
continue;
*value++ = '\0';
value[strcspn(value, "\r\n")] = '\0'; /* trim trailing NL */
- kv = snew(struct keyval);
+ kv = snew(struct
s
keyval);
kv->key = dupstr(line);
kv->value = dupstr(value);
add234(ret, kv);
kv->key = dupstr(line);
kv->value = dupstr(value);
add234(ret, kv);
@@
-321,7
+321,7
@@
char *read_setting_s(void *handle, const char *key, char *buffer, int buflen)
{
tree234 *tree = (tree234 *)handle;
const char *val;
{
tree234 *tree = (tree234 *)handle;
const char *val;
- struct keyval tmp, *kv;
+ struct
s
keyval tmp, *kv;
tmp.key = key;
if (tree != NULL &&
tmp.key = key;
if (tree != NULL &&
@@
-344,7
+344,7
@@
int read_setting_i(void *handle, const char *key, int defvalue)
{
tree234 *tree = (tree234 *)handle;
const char *val;
{
tree234 *tree = (tree234 *)handle;
const char *val;
- struct keyval tmp, *kv;
+ struct
s
keyval tmp, *kv;
tmp.key = key;
if (tree != NULL &&
tmp.key = key;
if (tree != NULL &&
@@
-416,7
+416,7
@@
void write_setting_filename(void *handle, const char *name, Filename result)
void close_settings_r(void *handle)
{
tree234 *tree = (tree234 *)handle;
void close_settings_r(void *handle)
{
tree234 *tree = (tree234 *)handle;
- struct keyval *kv;
+ struct
s
keyval *kv;
if (!tree)
return;
if (!tree)
return;