/[winpt]/trunk/Src/wptGPG.cpp
ViewVC logotype

Diff of /trunk/Src/wptGPG.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 271 by twoaday, Sun Nov 5 08:57:45 2006 UTC revision 273 by twoaday, Fri Dec 8 10:22:17 2006 UTC
# Line 233  gnupg_load_config (void) Line 233  gnupg_load_config (void)
233  {      {    
234      config_file_t opt;      config_file_t opt;
235      char *conf;      char *conf;
236        int rc = 0;
237            
238      conf = get_gnupg_cfgfile ();      conf = get_gnupg_cfgfile ();
239      if (!conf)      if (!conf)
# Line 241  gnupg_load_config (void) Line 242  gnupg_load_config (void)
242          free_if_alloc (conf);          free_if_alloc (conf);
243          return -1;          return -1;
244      }      }
245        free_if_alloc (conf);
246      if (conf_find_option (opt, "ask-cert-level"))      if (conf_find_option (opt, "ask-cert-level"))
247          reg_prefs.gpg.ask_cert_level = 1;          reg_prefs.gpg.ask_cert_level = 1;
248      if (conf_find_option (opt, "ask-cert-expire"))      if (conf_find_option (opt, "ask-cert-expire"))
249          reg_prefs.gpg.ask_cert_expire = 1;          reg_prefs.gpg.ask_cert_expire = 1;
250        /* The 'textmode' option for GPG is useful for text files
251           but it breaks the output of any binary data. Thus we return
252           a warning here to inform the user that binary output is broken. */
253        if (conf_find_option (opt, "textmode"))
254            rc = -2;
255      release_config (opt);      release_config (opt);
256      free_if_alloc (conf);  
257      return 0;      return rc;
258  }  }
259    
260    
# Line 666  check_gnupg_options (const char *buf, in Line 673  check_gnupg_options (const char *buf, in
673      int nbytes = 0, lineno=0;      int nbytes = 0, lineno=0;
674      unsigned j;      unsigned j;
675                    
676      for  (j = 0; j < strlen (buf) && j < sizeof (line); j++) {      for  (j = 0; j < strlen (buf) && j < DIM (line); j++) {
677          line[nbytes++] = buf[j];          line[nbytes++] = buf[j];
678          if (buf[j] == '\n' || j == (strlen (buf) - 1)) {          if (buf[j] == '\n' || j == (strlen (buf) - 1)) {
679              line[nbytes] = '\0';              line[nbytes] = '\0';

Legend:
Removed from v.271  
changed lines
  Added in v.273

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26