X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=storage.h;h=704f2311986ade193207dda807825d175be70c0c;hb=49d2cf19accb059b3b68d1fc2b78e606a578c3e8;hp=46e63505d4e4baa7be201bd62a19ffa1c302ec38;hpb=f6cc852c5d1c215489ccf364e581cf40fe69d9fc;p=PuTTY.git diff --git a/storage.h b/storage.h index 46e63505..704f2311 100644 --- a/storage.h +++ b/storage.h @@ -25,10 +25,14 @@ * A given key will be written at most once while saving a session. * Keys may be up to 255 characters long. String values have no length * limit. + * + * Any returned error message must be freed after use. */ -void *open_settings_w(const char *sessionname); +void *open_settings_w(const char *sessionname, char **errmsg); void write_setting_s(void *handle, const char *key, const char *value); void write_setting_i(void *handle, const char *key, int value); +void write_setting_filename(void *handle, const char *key, Filename value); +void write_setting_fontspec(void *handle, const char *key, FontSpec font); void close_settings_w(void *handle); /* @@ -44,10 +48,15 @@ void close_settings_w(void *handle); * read_setting_s() can return NULL, in which case the caller * should invent a sensible default. If an integer setting is not * present, read_setting_i() returns its provided default. + * + * read_setting_filename() and read_setting_fontspec() each read into + * the provided buffer, and return zero if they failed to. */ void *open_settings_r(const char *sessionname); char *read_setting_s(void *handle, const char *key, char *buffer, int buflen); int read_setting_i(void *handle, const char *key, int defvalue); +int read_setting_filename(void *handle, const char *key, Filename *value); +int read_setting_fontspec(void *handle, const char *key, FontSpec *font); void close_settings_r(void *handle); /*