Diff of /Chitem.cpp [a6d5d6] .. [4dda5d]  Maximize  Restore

  Switch to side-by-side view

--- a/Chitem.cpp
+++ b/Chitem.cpp
@@ -5113,6 +5113,34 @@
 endofquest:
   if(ret) cb->m_name.Empty();
   else cb->m_name=key+".bam";
+  return ret;
+}
+
+int read_bam_preview(CString key, Cbam *cb, int lazy)
+{
+  loc_entry fileloc;
+  int ret;
+  int fhandle;
+  CString tmp;
+  
+  if(!cb) cb=&the_bam;
+  if(lazy && key+".bam"==cb->m_name) return 0;
+  if(icons.Lookup(key,fileloc))
+  {
+    fhandle=locate_file(fileloc, 0);
+    if(fhandle<1)
+    {
+      ret=-2;
+      goto endofquest;
+    }
+    icons.SetAt(key,fileloc);
+    ret=cb->ReadBamPreviewFromFile(fhandle, fileloc.size);
+    close(fhandle);
+  }
+  else ret=-2;
+endofquest:
+  //since this is a preview, it is incomplete
+  cb->m_name.Empty();
   return ret;
 }
 

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks