[med-svn] [Git][med-team/gentle][master] 2 commits: Updated upstream repository to https://github.com/GENtle-persons/gentle-m

Steffen Möller (@moeller) gitlab at salsa.debian.org
Mon Jul 31 16:24:45 BST 2023



Steffen Möller pushed to branch master at Debian Med / gentle


Commits:
e6fec562 by Steffen Moeller at 2023-07-31T17:15:14+02:00
Updated upstream repository to https://github.com/GENtle-persons/gentle-m

- - - - -
45d1a367 by Steffen Moeller at 2023-07-31T17:23:53+02:00
Fix to open HTML files from within GENtle.

Needed to show online help.

- - - - -


6 changed files:

- debian/changelog
- debian/control
- debian/copyright
- + debian/patches/HelpDoesNotWork.patch
- debian/patches/series
- + debian/patches/strcpy_unreserved.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+gentle (1.9+cvs20100605+dfsg1-13) UNRELEASED; urgency=medium
+
+  * Increased size of char[]s (factor 10) to
+    - accomodate longer sequence lines and/or
+    - avoid compiler warnings.
+  * Now opening website with /usr/bin/open (provided e.g. by xdg-utils)
+  * Update of upstream repository.
+
+ -- Steffen Moeller <moeller at debian.org>  Mon, 31 Jul 2023 14:44:40 +0200
+
 gentle (1.9+cvs20100605+dfsg1-12) unstable; urgency=medium
 
   * Added more patches to eradicate compiler warnings on font selection.


=====================================
debian/control
=====================================
@@ -20,6 +20,7 @@ Architecture: any
 Depends: ${misc:Depends},
          ${shlibs:Depends}
 Recommends: clustalw
+Suggests: xdg-utils
 Description: suite to plan genetic cloning
  GENtle is a software for DNA and amino acid editing, database management,
  plasmid maps, restriction and ligation, alignments, sequencer data


=====================================
debian/copyright
=====================================
@@ -1,7 +1,7 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: GENtle
 Upstream-Contact: Magnus Manske <magnusmanske+gentle at googlemail.com>
-Source: https://github.com/magnusmanske/gentle-m
+Source: https://github.com/GENtle-persons/gentle-m
 Files-Excluded: */clustalw
                 */tinyxml
                 */.cvsignore


=====================================
debian/patches/HelpDoesNotWork.patch
=====================================
@@ -0,0 +1,90 @@
+Index: gentle2/main.cpp
+===================================================================
+--- gentle2.orig/main.cpp
++++ gentle2/main.cpp
+@@ -420,7 +420,7 @@ int MyApp::OnExit ()
+ //    return 0;
+     }
+ 
+-void MyApp::launchBrowser ( wxString url )
++void MyApp::launchBrowser ( const wxString url )
+ 	{
+ //	wxMessageBox ( url ) ;
+ //	if ( wxLaunchDefaultBrowser ( url ) ) return ;
+@@ -432,18 +432,18 @@ void MyApp::launchBrowser ( wxString url
+ 	\brief Returns the command line to invoke the browser.
+ 	\param command The URL/file.
+ */
+-wxString MyApp::getHTMLCommand ( wxString command )
++wxString MyApp::getHTMLCommand ( const wxString command )
+     {
+ #ifdef __WXMAC__
+ 	return _T("open ") + command ;
+-#endif
++#else
+     wxString ret ;
+     ret = getFileFormatCommand ( command , _T("html") ) ;
+     if ( ret.IsEmpty() ) ret = getFileFormatCommand ( command , _T("htm") ) ;
+     if ( !ret.IsEmpty() ) return ret ;
+-
+ // Fallback
+ #ifdef __WXMSW__    
++	wxPrintf(stderr,"E getHTMLCommand: Running backup code to assign application to HTML-formatted file.");
+     wxRegKey regKey;
+     wxString idName(_T("HKEY_CLASSES_ROOT\\.html"));
+     regKey.SetName(idName);    
+@@ -459,8 +459,15 @@ wxString MyApp::getHTMLCommand ( wxStrin
+         q += _T(" \"") + command + _T("\"") ;
+     return q ;
+ #else
++#ifdef __DEBIAN__
++	return _T("open ") + command ;
++#else
++	wxPrintf(stderr,"E getHTMLCommand: Returning empty string as command top open HTML file.");
+     return _T("") ;
+ #endif
++#endif
++#endif
++
+     }
+ 
+ /**	\fn MyApp::getFileFormatCommand ( wxString command )
+@@ -468,7 +475,7 @@ wxString MyApp::getHTMLCommand ( wxStrin
+ 	\param type The file ending to find the application for.
+ 	\param file The URL/file.
+ */
+-wxString MyApp::getFileFormatCommand ( wxString type , wxString file )
++wxString MyApp::getFileFormatCommand ( const wxString type , const wxString file )
+ 	{
+     wxFileType *ft = mtm.GetFileTypeFromExtension ( type ) ;
+     if ( !ft ) return _T("") ;
+@@ -479,7 +486,7 @@ wxString MyApp::getFileFormatCommand ( w
+ 	\brief Returns the application associated with a file type. Windows only.
+ 	\param type The file ending to find the application for.
+ */
+-wxString MyApp::getFileFormatApplication ( wxString type )
++wxString MyApp::getFileFormatApplication ( const wxString type )
+     {
+ #ifdef __WXMSW__    
+     wxRegKey regKey;
+Index: gentle2/main.h
+===================================================================
+--- gentle2.orig/main.h
++++ gentle2/main.h
+@@ -185,12 +185,12 @@ class MyApp : public wxApp
+     virtual void init_txt ( wxString lang , wxString csv , wxHashString *target = NULL , int ln = 1 ) ;
+     virtual void do_my_ass ( bool b , wxString msg = _T("") ) ;
+     virtual void do_my_log ( wxString function , wxString msg = _T("") ) ;
+-    virtual wxString getHTMLCommand ( wxString command ) ; ///< Returns the command line for running a browser
+-    virtual wxString getFileFormatApplication ( wxString type ) ; ///< Returns application associated with a file type
+-    virtual wxString getFileFormatCommand ( wxString type , wxString file ) ; ///< Returns the command line for running this file
++    virtual wxString getHTMLCommand ( const wxString command ) ; ///< Returns the command line for running a browser
++    virtual wxString getFileFormatApplication ( const wxString type ) ; ///< Returns application associated with a file type
++    virtual wxString getFileFormatCommand ( const wxString type , const wxString file ) ; ///< Returns the command line for running this file
+     virtual wxString get_GENtle_version () ; ///< Returns the GENtle version string
+ 	virtual wxString getLocalDBname () ; ///< Returns the filename of the default local database
+-	virtual void launchBrowser ( wxString url ) ;
++	virtual void launchBrowser ( const wxString url ) ;
+     
+     MyFrame *frame; ///< The application frame
+     wxMimeTypesManager mtm ; ///< The MIME types manager


=====================================
debian/patches/series
=====================================
@@ -13,3 +13,5 @@ DoNotShowBoxAboutMarkersLoading.patch
 ExpandOverridesAll.patch
 YetAnotherMissingReturn.patch
 YetAnotherPenSelection.patch
+strcpy_unreserved.patch
+HelpDoesNotWork.patch


=====================================
debian/patches/strcpy_unreserved.patch
=====================================
@@ -0,0 +1,77 @@
+Index: gentle2/ureadseq.c
+===================================================================
+--- gentle2.orig/ureadseq.c
++++ gentle2/ureadseq.c
+@@ -101,7 +101,7 @@ struct ReadSeqVars {
+   boolean allDone, done, filestart, addit;
+   FILE  *f;
+   long  linestart;
+-  char  s[256], *sp;
++  char  s[256*10+42], *sp; // to reduce the chance to run into unallocated memory
+ 
+   //int (*isseqchar)();
+    int  (*isseqchar)(int c);
+@@ -183,16 +183,16 @@ Local void countseq(char *s, struct Read
+ }
+ 
+ 
+-Local void addinfo(char *s, struct ReadSeqVars *V)
++Local void addinfo(const char * const s, struct ReadSeqVars * const V)
+ {
+-  char s2[256], *si;
+-  boolean saveadd;
++  char s2[256*10+42+314]; // needs to be long enough to accept V->s
+ 
+-  si = s2;
+-  while (*s == ' ') s++;
+-  sprintf(si, " %d)  %s\n", V->nseq, s);
++  char * const si = s2;
++  const char *stmp=s;
++  while (*stmp == ' ') stmp++;
++  snprintf(si, sizeof(s2)-1, " %d)  %s\n", V->nseq, stmp); // skipping prefix of spaces
+ 
+-  saveadd = V->addit;
++  const boolean saveadd = V->addit;
+   V->addit = true;
+   V->isseqchar = isAnyChar;
+   addseq( si, V);
+@@ -1565,7 +1565,7 @@ short writeSeq(FILE *outf, const char *s
+ /* dump sequence to standard output */
+ {
+   const short kSpaceAll = -9;
+-#define kMaxseqwidth  250
++#define kMaxseqwidth  2500
+ 
+   boolean baseonlynum= false; /* nocountsymbols -- only count true bases, not "-" */
+   short  numline = 0; /* only true if we are writing seq number line (for interleave) */
+@@ -1577,10 +1577,10 @@ short writeSeq(FILE *outf, const char *s
+ 
+   short linesout = 0, seqtype = kNucleic;
+   long  i, j, l, l1, ibase;
+-  char  idword[31], endstr[10];
++  char  idword[31+42], endstr[10+42];
+   char  seqnamestore[128], *seqname = seqnamestore;
+   char  s[kMaxseqwidth], *cp;
+-  char  nameform[10], numform[10], nocountsymbols[10];
++  char  nameform[10+42], numform[10+42], nocountsymbols[10+42];
+   unsigned long checksum = 0, checktotal = 0;
+ 
+   gPretty.atseq++;
+@@ -1592,7 +1592,7 @@ short writeSeq(FILE *outf, const char *s
+   sscanf( seqname, "%30s", idword);
+   sprintf(numform, "%ld", seqlen);
+   numwidth= strlen(numform)+1;
+-  nameform[0]= '\0';
++  nameform[0]= 0;
+ 
+   if (strstr(seqname,"checksum") != NULL) {
+     cp = strstr(seqname,"bases");
+@@ -1602,7 +1602,7 @@ short writeSeq(FILE *outf, const char *s
+       }
+     }
+ 
+-  strcpy( endstr,"");
++  endstr[0]=0;
+   l1 = 0;
+ 
+   if (outform == kGCG || outform == kMSF)



View it on GitLab: https://salsa.debian.org/med-team/gentle/-/compare/402644f2dadb21a375681687237dd7b24807bc42...45d1a36770719ad4fb58279dcef37418d3b0b285

-- 
View it on GitLab: https://salsa.debian.org/med-team/gentle/-/compare/402644f2dadb21a375681687237dd7b24807bc42...45d1a36770719ad4fb58279dcef37418d3b0b285
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230731/284edbc4/attachment-0001.htm>


More information about the debian-med-commit mailing list