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

Diff of /trunk/Src/wptFileManager.cpp

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

revision 31 by twoaday, Thu Oct 20 12:35:59 2005 UTC revision 32 by twoaday, Mon Oct 24 08:03:48 2005 UTC
# Line 48  Line 48 
48  #include "openpgp.h"  #include "openpgp.h"
49    
50  void progress_cleanup (progress_filter_s *pfx);  void progress_cleanup (progress_filter_s *pfx);
51    BOOL CALLBACK file_secdel_confirm_dlg_proc (HWND dlg, UINT msg,
52                                                WPARAM wparam, LPARAM lparam);
53  char* gpg_keylist_to_pattern (gpgme_key_t *rset, int n);  char* gpg_keylist_to_pattern (gpgme_key_t *rset, int n);
54  gpgme_error_t sym_passphrase_cb (void *hook, const char *hint, const char *pass_inf,  gpgme_error_t sym_passphrase_cb (void *hook, const char *hint, const char *pass_inf,
55                                   int prev_was_bad, int fd);                                   int prev_was_bad, int fd);
56    
57  /*-- wptFileVerifyDlg.cpp --*/  /*-- wptFileVerifyDlg.cpp --*/
58  int  file_verify_add_state (file_sig_ctx_t c);  void file_verify_add_state (file_sig_ctx_t c);
59  void file_verify_use_event (void);  void file_verify_use_event (void);
60  void file_verify_wait (void);  void file_verify_wait (void);
61    
# Line 63  static const char * mm_files[] = {".mov" Line 64  static const char * mm_files[] = {".mov"
64                                    ".gif", ".jpg", ".png", ".jpeg", ".dib", 0};                                    ".gif", ".jpg", ".png", ".jpeg", ".dib", 0};
65    
66    
67  char *  /* Check if the drive given by @fname is a floppy disc.
68  fm_quote_file (const char * name)     Return value: 1 for success. */
69    static int
70    is_floppy_disc (const char * fname)
71  {  {
72      char * p;      char drv[32] = {0};
73      size_t len = strlen (name) + 8;      int i=0;
74    
75      if (*name == '"')      if (!strstr (fname, ":\\"))
76          return m_strdup (name); /* avoid double quotes */          return 0;
     p = new char[len + 1];  
     if (!p)  
         BUG (0);  
     _snprintf (p, len, "\"%s\"", name);  
77    
78      return p;      while (fname && *fname && *fname != '\\')
79  } /* fm_quote_file */          drv[i++] = *fname++;
80        drv[i++] = '\\';
81        drv[i++] = '\0';
82        i = GetDriveType (drv);
83        if (i == DRIVE_REMOVABLE)
84            return -1;
85        return 0;
86    }
87    
88    
89    /* Ask the user to overwrite file @fname.
90       Return value: 0 for cancel. */
91  int  int
92  overwrite_file (const char * fname)  overwrite_file (const char *fname)
93  {  {
94      int id;      int id;
95    
# Line 91  overwrite_file (const char * fname) Line 99  overwrite_file (const char * fname)
99                    _("\"%s\" already exists.\n"                    _("\"%s\" already exists.\n"
100                      "Replace existing file?"), fname);                      "Replace existing file?"), fname);
101      return id == IDNO ? 0 : -1;      return id == IDNO ? 0 : -1;
102  } /* overwrite_file */  }
103    
104    
105    /* Removes 'critical' attributes from the file @fname.
106       If @force is 1, the user is not asked for permission. */
107  static void  static void
108  remove_crit_file_attrs (const char * fname, int force)  remove_crit_file_attrs (const char *fname, int force)
109  {  {
110      u32 f_attr;      u32 f_attr;
111      int id;      int id;
# Line 113  remove_crit_file_attrs (const char * fna Line 123  remove_crit_file_attrs (const char * fna
123          if (id == IDYES)          if (id == IDYES)
124              SetFileAttributes (fname, FILE_ATTRIBUTE_NORMAL);              SetFileAttributes (fname, FILE_ATTRIBUTE_NORMAL);
125      }      }
126  } /* remove_crit_file_attrs */  }
127    
128    
129  static int inline  static int inline
130  is_directory (const char * fname)  is_directory (const char *fname)
131  {      {    
132      return GetFileAttributes (fname) & FILE_ATTRIBUTE_DIRECTORY? 1 : 0;      return GetFileAttributes (fname) & FILE_ATTRIBUTE_DIRECTORY? 1 : 0;
133  } /* is_directory */  }
134    
135    
136  static int inline  static int inline
137  is_openpgp_ext (const char * name)  is_openpgp_ext (const char *name)
138  {  {
139      if (strstr (name, ".gpg") || strstr (name, ".asc")      if (strstr (name, ".gpg") || strstr (name, ".asc")
140          || strstr (name, ".sig") || strstr (name, ".pgp"))          || strstr (name, ".sig") || strstr (name, ".pgp"))
# Line 178  file_get_extension (gpgme_ctx_t ctx, gpg Line 188  file_get_extension (gpgme_ctx_t ctx, gpg
188      if (!use_armor && sigmode == GPGME_SIG_MODE_DETACH)      if (!use_armor && sigmode == GPGME_SIG_MODE_DETACH)
189          return ".sig";          return ".sig";
190      return ".gpg";      return ".gpg";
191  } /* file_get_extension */  }
192    
193    
194    char*
195    fm_quote_file (const char * name)
196    {
197        char * p;
198        size_t len = strlen (name) + 8;
199    
200        if (*name == '"')
201            return m_strdup (name); /* avoid double quotes */
202        p = new char[len + 1];
203        if (!p)
204            BUG (0);
205        _snprintf (p, len, "\"%s\"", name);
206    
207        return p;
208    } /* fm_quote_file */
209    
210    
211    
212    /* Check the armor type of the file @fname and return
213       a string representation of it. */
214    static const char *
215    fm_check_armor_type (const char *fname, int *r_type)
216    {
217        FILE * fp;
218        char header[768], * p;
219        
220        if (r_type)
221            *r_type = PGP_NONE;
222        fp = fopen (fname, "rb");
223        if (!fp)
224            return "UNKNOWN";
225        p = fgets (header, sizeof (header) - 1, fp);
226        fclose (fp);
227        if (!p)
228            return "UNKNOWN";
229    
230        if (strncmp (header, "-----", 5))
231            goto leave;
232        if (strstr( header, "BEGIN PGP PUBLIC KEY" )) {
233            if (r_type) *r_type = PGP_PUBKEY;
234            return "PUBKEY";
235        }
236        else if (strstr (header, "BEGIN PGP PRIVATE KEY") ||
237                 strstr (header, "BEGIN PGP SECRET KEY")) {
238            if (r_type) *r_type = PGP_SECKEY;
239            return "SECKEY";
240        }
241        else if (strstr (header, "BEGIN PGP MESSAGE")) {
242            if (r_type) *r_type = PGP_MESSAGE;
243            return "ENCRYPTED";
244        }
245        else if (strstr( header, "BEGIN PGP SIGNED MESSAGE")) {
246            if (r_type) *r_type = PGP_CLEARSIG;
247            return "SIGNED-CLEAR";
248        }
249        else if (strstr(header, "BEGIN PGP SIGNATURE")) {
250            if (r_type) *r_type = PGP_SIG;
251            return "SIGNED-DETACH";
252        }
253    
254    leave:
255        return "UNKNOWN";
256    }
257    
258    
259    /* Extract file type from @fname. If @r_type is valid,
260       it contains the PGP type on success. */
261    static const char *
262    fm_get_file_type (const char *fname, int *r_type)
263    {        
264        gpg_iobuf_t inp;
265        armor_filter_context_t afx;
266        PACKET * pkt = (PACKET *)calloc (1, sizeof *pkt);
267        int i = 0, rc = 0;
268        const char *s = NULL;
269    
270        if (r_type)
271            *r_type = PGP_NONE;
272        if (!fname) {
273            safe_free (pkt);
274            return NULL;
275        }
276    
277        if (is_floppy_disc (fname))
278            return fm_check_armor_type (fname, r_type);
279    
280        inp = gpg_iobuf_open (fname);
281        if (!inp) {
282            const char *s = winpt_strerror (WPTERR_FILE_OPEN);
283            log_box( _("File Manager"), MB_ERR, "\"%s\": %s", fname, s );
284            safe_free( pkt );
285            return NULL;
286        }
287        gpg_iobuf_ioctl (inp, 3, 1, NULL); /* disable cache */
288        if (gpg_iobuf_get_filelength (inp) > 32000000 /* 32MB */
289            && !is_openpgp_ext (fname)) {
290            gpg_iobuf_close (inp);
291            return "UNKNOWN";
292        }
293    
294        if (gpg_use_armor_filter(inp)) {
295            memset (&afx, 0, sizeof (afx));
296            gpg_iobuf_push_filter (inp, gpg_armor_filter, &afx);
297        }
298        
299        gpg_init_packet (pkt);
300        while (!(rc = gpg_parse_packet (inp, pkt))) {
301            switch (pkt->pkttype) {
302            case PKT_PUBKEY_ENC:
303                s = "ENCRYPTED";rc = -2;
304                if (r_type) *r_type = PGP_MESSAGE;
305                break;
306            case PKT_SYMKEY_ENC:
307            case PKT_ENCRYPTED:
308                s = "SYMKEYENC";rc = -2;
309                if (r_type) *r_type = PGP_MESSAGE;
310                break;
311            case PKT_SIGNATURE:
312            case PKT_ONEPASS_SIG:
313                s = "SIGNED";   rc = -2;
314                if (r_type) *r_type = PGP_SIG;
315                break;
316            case PKT_PUBLIC_KEY:
317                s = "PUBKEY";   rc = -2;
318                if (r_type) *r_type = PGP_PUBKEY;
319                break;
320            case PKT_SECRET_KEY:
321                s = "SECKEY";   rc = -2;
322                if (r_type) *r_type = PGP_SECKEY;
323                break;
324            }
325            gpg_free_packet (pkt);
326            gpg_init_packet (pkt);
327            if (rc == -2)
328                break; /* found */
329        }
330        safe_free (pkt);
331        gpg_iobuf_close (inp);
332        if (!s)
333            s = fm_check_armor_type (fname, r_type);
334        if (!s)
335            s = "UNKNOWN";
336        if (!strcmp (s, "SIGNED")
337            && strcmp (fm_check_armor_type (fname, r_type), "SIGNED-CLEAR ")) {
338            if (r_type) *r_type = PGP_SIG;
339            s = "SIGNED-DETACH";
340        }
341        return s;
342    }
343    
344    
345  int  int
346  fm_build( listview_ctrl_t *lv, HWND ctrl )  fm_build (listview_ctrl_t *lv, HWND ctrl)
347  {  {
348      int i, rc = 0;      int i, rc = 0;
349      listview_ctrl_t c;      listview_ctrl_t c;
# Line 272  fm_check_for_entry( listview_ctrl_t lv, Line 433  fm_check_for_entry( listview_ctrl_t lv,
433    
434    
435  static int  static int
436  fm_set_ftype (listview_ctrl_t lv, const char * name)  fm_set_ftype (listview_ctrl_t lv, const char *name)
437  {  {
438      const char *type;      const char *type;
439      int rc;      int rc;
# Line 280  fm_set_ftype (listview_ctrl_t lv, const Line 441  fm_set_ftype (listview_ctrl_t lv, const
441      rc = fm_check_for_entry (lv, name);      rc = fm_check_for_entry (lv, name);
442      if (rc)      if (rc)
443          return 0;          return 0;
444      type = fm_get_file_type (name);      type = fm_get_file_type (name, NULL);
445      if (!type || !strcmp (type, "UNKNOWN"))      if (!type || !strcmp (type, "UNKNOWN"))
446          type = gnupg_check_file_ext (name);              type = gnupg_check_file_ext (name, NULL);
447      rc = listview_add_item (lv, " ");      rc = listview_add_item (lv, " ");
448      if (rc)      if (rc)
449          return -1;          return -1;
# Line 346  fm_add_opened_files (listview_ctrl_t lv, Line 507  fm_add_opened_files (listview_ctrl_t lv,
507  {  {
508      OPENFILENAME open;      OPENFILENAME open;
509      const char *type;        const char *type;  
510      char file[1024] = "";      char file[512] = "";
511      int rc;      int rc;
512            
513      memset( &open, 0, sizeof (open) );      /* XXX: support to add multiple files. */
514        memset (&open, 0, sizeof (open));
515      open.lStructSize = sizeof (OPENFILENAME);      open.lStructSize = sizeof (OPENFILENAME);
516      open.hInstance = glob_hinst;      open.hInstance = glob_hinst;
517      open.lpstrTitle = _("File Open");      open.lpstrTitle = _("File Open");
# Line 360  fm_add_opened_files (listview_ctrl_t lv, Line 522  fm_add_opened_files (listview_ctrl_t lv,
522      open.Flags = 0;      open.Flags = 0;
523            
524      if (GetOpenFileName (&open)) {      if (GetOpenFileName (&open)) {
525          type = fm_get_file_type (open.lpstrFile);          type = fm_get_file_type (open.lpstrFile, NULL);
526          if (!type)          if (!type)
527              return WPTERR_FILE_OPEN;              return WPTERR_FILE_OPEN;
528          if (!strcmp (type, "UNKNOWN"))          if (!strcmp (type, "UNKNOWN"))
529              type = gnupg_check_file_ext (open.lpstrFile);              type = gnupg_check_file_ext (open.lpstrFile, NULL);
530          rc = listview_add_item (lv, "");          rc = listview_add_item (lv, "");
531          if( !rc ) {          if (!rc) {
532              listview_add_sub_item (lv, 0, 0, type);              listview_add_sub_item (lv, 0, 0, type);
533              listview_add_sub_item (lv, 0, 1, open.lpstrFile);              listview_add_sub_item (lv, 0, 1, open.lpstrFile);
534          }          }
# Line 376  fm_add_opened_files (listview_ctrl_t lv, Line 538  fm_add_opened_files (listview_ctrl_t lv,
538  }  }
539    
540    
 /* Check the armor type of the file @fname and return  
    a string representation of it. */  
 static const char *  
 fm_check_armor_type (const char *fname)  
 {  
     FILE * fp;  
     char header[768], * p;  
       
     fp = fopen (fname, "rb");  
     if (!fp)  
         return "UNKNOWN";  
     p = fgets (header, sizeof (header) - 1, fp);  
     fclose (fp);  
     if (!p)  
         return "UNKNOWN";  
   
     if( strncmp( header, "-----", 5 ) )  
         goto leave;  
     if( strstr( header, "BEGIN PGP PUBLIC KEY" ) )  
         return "PUBKEY";  
     else if( strstr( header, "BEGIN PGP PRIVATE KEY" ) )  
         return "SECKEY";  
     else if( strstr( header, "BEGIN PGP SECRET KEY" ) )  
         return "SECKEY";  
     else if( strstr( header, "BEGIN PGP MESSAGE" ) )  
         return "ENCRYPTED";  
     else if( strstr( header, "BEGIN PGP SIGNED MESSAGE" ) )  
         return "SIGNED-CLEAR";  
     else if( strstr(header, "BEGIN PGP SIGNATURE" ) )  
         return "SIGNED-DETACH";  
   
 leave:  
     return "UNKNOWN";  
 }  
   
   
541  int  int
542  fm_assume_onepass_sig (const char * fname)  fm_assume_onepass_sig (const char * fname)
543  {  {
# Line 421  fm_assume_onepass_sig (const char * fnam Line 547  fm_assume_onepass_sig (const char * fnam
547      PACKET * pkt = (PACKET *)calloc (1, sizeof *pkt);      PACKET * pkt = (PACKET *)calloc (1, sizeof *pkt);
548      int check = 0;      int check = 0;
549    
550      if (!fname)      if (!fname) {
     {  
551          gpg_data_new_from_clipboard (&dat, 0);          gpg_data_new_from_clipboard (&dat, 0);
552          gpg_data_release_and_set_file (dat, "gpgme.tmp");          gpg_data_release_and_set_file (dat, "gpgme.tmp");
553    
# Line 430  fm_assume_onepass_sig (const char * fnam Line 555  fm_assume_onepass_sig (const char * fnam
555          if (!fp)          if (!fp)
556              return 0;              return 0;
557          gpg_iobuf_ioctl (fp, 3, 1, NULL);          gpg_iobuf_ioctl (fp, 3, 1, NULL);
558          if (gpg_use_armor_filter(fp))          if (gpg_use_armor_filter(fp)) {
         {  
559              memset (&afx, 0, sizeof (afx));              memset (&afx, 0, sizeof (afx));
560              gpg_iobuf_push_filter (fp, gpg_armor_filter, &afx);              gpg_iobuf_push_filter (fp, gpg_armor_filter, &afx);
561          }          }
# Line 449  fm_assume_onepass_sig (const char * fnam Line 573  fm_assume_onepass_sig (const char * fnam
573  }  }
574    
575    
 static int  
 is_floppy_disc (const char * fname)  
 {  
     char drv[32] = {0};  
     int i=0;  
   
     if (!strstr (fname, ":\\"))  
         return 0;  
   
     while (fname && *fname && *fname != '\\')  
         drv[i++] = *fname++;  
     drv[i++] = '\\';  
     drv[i++] = '\0';  
     i = GetDriveType (drv);  
     if (i == DRIVE_REMOVABLE)  
         return -1;  
     return 0;  
 }  
   
   
 const char *  
 fm_get_file_type (const char * fname)  
 {          
     gpg_iobuf_t inp;  
     armor_filter_context_t afx;  
     PACKET * pkt = (PACKET *)calloc (1, sizeof *pkt);  
     int i = 0, rc = 0;  
     const char * s = NULL;  
   
     if (!fname) {  
         safe_free (pkt);  
         return NULL;  
     }  
   
     if (is_floppy_disc (fname))  
         return fm_check_armor_type (fname);  
   
     inp = gpg_iobuf_open (fname);  
     if (!inp) {  
         const char *s = winpt_strerror (WPTERR_FILE_OPEN);  
         log_box( _("File Manager"), MB_ERR, "\"%s\": %s", fname, s );  
         safe_free( pkt );  
         return NULL;  
     }  
     gpg_iobuf_ioctl (inp, 3, 1, NULL); /* disable cache */  
     if (gpg_iobuf_get_filelength (inp) > 32000000 /* 32MB */  
         && !is_openpgp_ext (fname)) {  
         gpg_iobuf_close (inp);  
         return "UNKNOWN";  
     }  
   
     if (gpg_use_armor_filter(inp)) {  
         memset (&afx, 0, sizeof (afx));  
         gpg_iobuf_push_filter (inp, gpg_armor_filter, &afx);  
     }  
       
     gpg_init_packet (pkt);  
     while (!(rc = gpg_parse_packet (inp, pkt))) {  
         switch (pkt->pkttype) {  
         case PKT_PUBKEY_ENC:  s = "ENCRYPTED";rc = -2; break;  
         case PKT_SYMKEY_ENC:  
         case PKT_ENCRYPTED:   s = "SYMKEYENC";rc = -2; break;  
         case PKT_SIGNATURE:  
         case PKT_ONEPASS_SIG: s = "SIGNED";   rc = -2; break;  
         case PKT_PUBLIC_KEY:  s = "PUBKEY";   rc = -2; break;  
         case PKT_SECRET_KEY:  s = "SECKEY";   rc = -2; break;  
         }  
         gpg_free_packet (pkt);  
         gpg_init_packet (pkt);  
         if (rc == -2)  
             break; /* found */  
     }  
     safe_free (pkt);  
     gpg_iobuf_close (inp);  
     if (!s)  
         s = fm_check_armor_type (fname);  
     if (!s)  
         s = "UNKNOWN";  
     if (!strcmp( s, "SIGNED")  
         && strcmp (fm_check_armor_type (fname), "SIGNED-CLEAR "))  
         s = "SIGNED-DETACH";  
     return s;  
 } /* fm_get_file_type */  
   
   
576  int  int
577  fm_get_current_pos (listview_ctrl_t lv)  fm_get_current_pos (listview_ctrl_t lv)
578  {  {
# Line 1582  leave: Line 1621  leave:
1621  }  }
1622    
1623    
1624    /* Parse the command line and process the given file. */  
1625  int  int
1626  fm_parse_command_line (char *cmdl)  fm_parse_command_line (char *cmdl)
1627  {  {
# Line 1589  fm_parse_command_line (char *cmdl) Line 1629  fm_parse_command_line (char *cmdl)
1629      const char *s;      const char *s;
1630      char *p, *fn = NULL;      char *p, *fn = NULL;
1631      int count = 0, detached = 0;      int count = 0, detached = 0;
1632        int type;
1633            
1634      if( !cmdl || !*cmdl )      if (!cmdl || !*cmdl)
1635          return 0;          return 0;
1636    
1637      fm_state_new( &ctx );          fm_state_new (&ctx);    
1638      ctx->dlg = GetActiveWindow( );      ctx->dlg = GetActiveWindow ();
1639      ctx->cache_cb = 1;              ctx->cache_cb = 1;
1640            
1641      p = cmdl;      p = cmdl;
1642      if( p && *p > 32 && !stristr( p, "winpt.exe" )      if (p && *p > 32 && !stristr (p, "winpt.exe")
1643                       && !strstr( p, "--" ) ) {                       && !strstr (p, "--" )) {
1644          count++;          count++;
1645          if (*p == '"') { /* need to remove quotes */          if (*p == '"') { /* need to remove quotes */
1646              fn = new char[strlen( p )];              fn = new char[strlen (p)];
1647              if (!fn)              if (!fn)
1648                  BUG( NULL );                  BUG (NULL);
1649              memcpy( fn, p+1, strlen( p ) - 2 );              memcpy (fn, p+1, strlen (p) - 2);
1650              fn[strlen( p ) -2] = '\0';              fn[strlen (p) -2] = '\0';
1651          }          }
1652          else          else
1653              fn = m_strdup (p);              fn = m_strdup (p);
1654          s = fm_get_file_type (fn);          s = fm_get_file_type (fn, &type);
1655            log_box ("debug", MB_OK, "%s %d", s, type);
1656          if (!s || !strcmp (s, "UNKNOWN"))          if (!s || !strcmp (s, "UNKNOWN"))
1657              s = gnupg_check_file_ext (fn);              s = gnupg_check_file_ext (fn, &type);
1658          if (*s == 'U') {          if (type == PGP_NONE) {
1659              log_box( _("File Manager"), MB_ERR, _("%s: no valid OpenPGP data found."), p );              log_box (_("File Manager"), MB_ERR,
1660                         _("%s: no valid OpenPGP data found."), p);
1661                free_if_alloc (fn);
1662              return count;              return count;
1663          }          }
1664                    
1665          switch( *s ) {          log_box ("debug", MB_OK, "type=%d", type); /*XXX: debug*/
1666          case 'E': fm_decrypt (ctx, fn); break;          switch (type) {
1667          case 'P': fm_import (ctx, fn); break;          case PGP_MESSAGE:
1668          case 'S':              fm_decrypt (ctx, fn);
1669              if (s[1] == 'Y') {              break;
1670                  fm_decrypt (ctx, fn);  
1671                  break;          case PGP_PUBKEY:
1672              }          case PGP_SECKEY:
1673                fm_import (ctx, fn);
1674                break;
1675    
1676            case PGP_SIG:
1677            case PGP_CLEARSIG:
1678              file_verify_use_event ();              file_verify_use_event ();
1679              if (s[1] == 'I') {              if (type == PGP_SIG)    
1680                  if (strlen (s) == 13 && s[7] == 'D')                  detached = 1;
1681                      detached = 1;              fm_verify (ctx, detached, fn);
1682                  fm_verify( ctx, detached, fn );              file_verify_wait ();
             }  
             file_verify_wait( );  
1683              break;              break;
1684          }          }
1685      }      }
1686    
1687      memset( &ctx->pass_cb, 0, sizeof (ctx->pass_cb) );      wipememory (&ctx->pass_cb, sizeof (ctx->pass_cb));
1688      safe_free( fn );      free_if_alloc (fn);
1689      fm_state_release( ctx );      fm_state_release (ctx);
1690      return count;      return count;
1691  } /* fm_parse_command_line */  }
1692    
1693    
1694  const char *  const char*
1695  default_dirname( const char * name )  default_dirname (const char *name)
1696  {  {
1697      char * p = strrchr( name, '\\' );      char * p = strrchr( name, '\\' );
1698      if( !p )      if( !p )
# Line 1704  fm_encrypt_directory( fm_state_t c, cons Line 1751  fm_encrypt_directory( fm_state_t c, cons
1751          unlink( s );          unlink( s );
1752      }      }
1753  leave:  leave:
1754        FindClose (hd);
1755      pk_list_free( list );      pk_list_free( list );
1756      free_if_alloc( patt );      free_if_alloc( patt );
1757      return rc;      return rc;
# Line 1741  fm_print_md( listview_ctrl_t lv, HWND dl Line 1789  fm_print_md( listview_ctrl_t lv, HWND dl
1789    
1790      if( listview_count_items( lv, 0 ) == 0 )      if( listview_count_items( lv, 0 ) == 0 )
1791          return;          return;
1792      memset( &mdctx, 0, sizeof (mdctx) );      memset (&mdctx, 0, sizeof (mdctx));
1793      mdctx.lv = lv;      mdctx.lv = lv;
1794      mdctx.mdalgo = mdalgo;      mdctx.mdalgo = mdalgo;
1795      DialogBoxParam( glob_hinst, (LPCTSTR)IDD_WINPT_FILE_MDSUM, dlg,      DialogBoxParam( glob_hinst, (LPCTSTR)IDD_WINPT_FILE_MDSUM, dlg,

Legend:
Removed from v.31  
changed lines
  Added in v.32

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26