memset (&opt.compat, 0, sizeof opt.compat);
read_options (void){  char *val = NULL;   load_extension_value ("autoSignAttachments", &val);  opt.auto_sign_attach = val == NULL || *val != '1' ? 0 : 1;  xfree (val); val = NULL;    load_extension_value ("saveDecryptedAttachments", &val);  opt.save_decrypted_attach = val == NULL || *val != '1'? 0 : 1;  xfree (val); val = NULL;  load_extension_value ("encryptDefault", &val);  opt.encrypt_default = val == NULL || *val != '1'? 0 : 1;  xfree (val); val = NULL;  load_extension_value ("signDefault", &val);  opt.sign_default = val == NULL || *val != '1'? 0 : 1;  xfree (val); val = NULL;  load_extension_value ("addDefaultKey", &val);  opt.add_default_key = val == NULL || *val != '1' ? 0 : 1;  xfree (val); val = NULL;  load_extension_value ("storePasswdTime", &val);  opt.passwd_ttl = val == NULL || *val == '0'? 0 : atol (val);  xfree (val); val = NULL;  load_extension_value ("encodingFormat", &val);  opt.enc_format = val == NULL? GPG_FMT_CLASSIC  : atol (val);  xfree (val); val = NULL;  load_extension_value ("logFile", &val);  set_log_file (val);  xfree (val); val = NULL;    load_extension_value ("defaultKey", &val);  set_default_key (val);  xfree (val); val = NULL;  /* Note, that on purpose these flags are only Registry changeable.     The format of the entry is a string of of "0" and "1" digits; see     the switch below for a description. */  load_extension_value ("compatFlags", &val);  if (val)    {      const char *s = val;      int i, x;      for (s=val, i=0; *s; s++, i++)        {          x = *s == '1';          switch (i)            {            case 0: opt.compat.no_msgcache = x; break;            case 1: opt.compat.no_pgpmime = x; break;            case 2: opt.compat.no_oom_write = x; break;            case 3: opt.compat.preview_decryption = x; break;            case 4: opt.compat.old_reply_hack = x; break;            case 5: opt.compat.auto_decrypt = x; break;            case 6: opt.compat.no_attestation = x; break;            }        }      log_debug ("Note: using compatibility flags: %s", val);    }  xfree (val); val = NULL;}