/[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 23 by twoaday, Fri Sep 30 10:10:16 2005 UTC revision 24 by twoaday, Sat Oct 8 10:43:08 2005 UTC
# Line 266  check_gnupg_prog( void ) Line 266  check_gnupg_prog( void )
266    
267    
268  static int  static int
269  parse_version_nr( const char * buf, int *major, int *minor, int *patch )  parse_version_nr (const char * buf, int *major, int *minor, int *patch)
270  {  {
271      char tmp[8];      char tmp[8];
272      int i;      int i;
273            
     if( strncmp( buf, "gpg ", 4 ) )  
         return -1;      
     buf += 4;  
     if( strncmp( buf, "(GnuPG) ", 8 ) )  
         return -1;      
     buf += 8;  
274      i=0;      i=0;
275      while( buf && *buf != '.' && i < 8 )      while( buf && *buf != '.' && i < 8 )
276          tmp[i++] = *buf++;          tmp[i++] = *buf++;
# Line 311  check_gnupg_engine (int * r_major, int * Line 305  check_gnupg_engine (int * r_major, int *
305          gpgme_release (ctx);          gpgme_release (ctx);
306          return -1;          return -1;
307      }      }
308      if( strstr( eng, "IDEA" ) )      /* We need to exec GPG again to find out if IDEA is available. */
309        if (gpg_get_version (&eng))
310            return -1;
311        if (strstr (eng, "IDEA"))
312          idea_available = 1;          idea_available = 1;
313        free (eng);
314      rc = parse_version_nr( inf->version, &major, &minor, &patch );      rc = parse_version_nr( inf->version, &major, &minor, &patch );
315      if( rc ) {      if( rc ) {
316          gpgme_release (ctx);          gpgme_release (ctx);
317          return rc;          return rc;
318      }      }
319      if( major < *r_major      if (major < *r_major || minor < *r_minor)
      || minor < *r_minor)  
320          rc = 1;          rc = 1;
321      else {      else {
322          if (patch < *r_patch )          if (patch < *r_patch)
323              rc = 1;              rc = 1;
324          rc = 0;          rc = 0;
325      }      }

Legend:
Removed from v.23  
changed lines
  Added in v.24

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26