no-storage.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Stub module implementing the saved-session storage APIs for tools
  3. * that don't load or save sessions.
  4. */
  5. #include "putty.h"
  6. settings_w *open_settings_w(const char *sessionname, char **errmsg)
  7. { return NULL; }
  8. void write_setting_s(settings_w *handle, const char *key, const char *value)
  9. { unreachable("where did you get a settings_w from?"); }
  10. void write_setting_i(settings_w *handle, const char *key, int value)
  11. { unreachable("where did you get a settings_w from?"); }
  12. void write_setting_fontspec(settings_w *handle, const char *name, FontSpec *fs)
  13. { unreachable("where did you get a settings_w from?"); }
  14. void write_setting_filename(settings_w *handle, const char *name, Filename *fn)
  15. { unreachable("where did you get a settings_w from?"); }
  16. void close_settings_w(settings_w *handle)
  17. { unreachable("where did you get a settings_w from?"); }
  18. settings_r *open_settings_r(const char *sessionname)
  19. { return NULL; }
  20. char *read_setting_s(settings_r *handle, const char *key)
  21. { return NULL; }
  22. int read_setting_i(settings_r *handle, const char *key, int defvalue)
  23. { return defvalue; }
  24. FontSpec *read_setting_fontspec(settings_r *handle, const char *name)
  25. { return fontspec_new_default(); }
  26. Filename *read_setting_filename(settings_r *handle, const char *name)
  27. { return filename_from_str(""); }
  28. void close_settings_r(settings_r *handle) { }
  29. void del_settings(const char *sessionname) {}
  30. settings_e *enum_settings_start(void)
  31. { return NULL; }
  32. bool enum_settings_next(settings_e *handle, strbuf *out)
  33. { unreachable("where did you get a settings_e from?"); }
  34. void enum_settings_finish(settings_e *handle)
  35. { unreachable("where did you get a settings_e from?"); }