code:
diff -ru src/part.c b/part.c
--- src/part.c	Thu May 14 06:01:00 2009 -0400
+++ b/part.c 	Thu May 14 06:01:00 2009 -0400
@@ -1767,8 +1767,8 @@
 /* to compute number of partitions */
 {
     INT erg = OK;
-    if (ni<0) return;
-    if (not EMPTYP(S_V_I(vec,ni))) return;
+    if (ni<0) return 0;
+    if (not EMPTYP(S_V_I(vec,ni))) return 0;
     else if (ni<=1) M_I_I(1,S_V_I(vec,ni));
     else {


code:
diff -r 5cd656a07aa5 src/bar.c
--- a/bar.c	Thu May 14 06:01:00 2009 -0400
+++ b/bar.c	Thu May 14 07:38:17 2009 -0400
@@ -237,7 +237,7 @@
     g = callocobject();
     e = S_V_I(a,0L);
     f = S_V_I(a,1L);
-    erg += sum(f,g);
+    erg += sym_sum(f,g);
     j=0L;
     for (i=0L;i<S_V_LI(e);i++)
         j += S_V_II(e,i)*(i+1L);
@@ -427,7 +427,7 @@
     for (i=0L;i<S_V_LI(b);i++)
         erg += kranztypus_to_matrix(S_V_I(c,i),S_V_I(b,i));
     erg += freeall(c);
-    erg += sort(b); /* AK 130592 */
+    erg += sym_sort(b); /* AK 130592 */
     ENDR("makevectorof_class_bar");
 }

@@ -615,7 +615,7 @@
     c = callocobject();
     d = callocobject();
     erg += lehmercode_bar(a,c);
-    erg += sum(S_V_I(c,1L),b);
+    erg += sym_sum(S_V_I(c,1L),b);
     for(i=0L;i<S_P_LI(a);i++)
         {
         if (S_V_II(S_V_I(c,0L),i) == 1L)
diff -r 5cd656a07aa5 src/def.h
--- a/def.h	Thu May 14 06:01:00 2009 -0400
+++ b/def.h	Thu May 14 07:38:17 2009 -0400
@@ -3105,7 +3105,7 @@
 extern INT so_character ();
 extern INT so_dimension ();
 extern OBJECTKIND s_o_k();
-extern INT sort();
+extern INT sym_sort();
 extern INT sort_rows_tableaux_apply();
 extern INT sort_vector();
 extern OBJECTSELF s_o_s();
@@ -3271,7 +3271,7 @@
 extern INT sub_part_part();
 extern INT substitute_one_matrix ();
 extern INT substitute_one_monopoly ();
-extern INT sum();
+extern INT sym_sum();
 extern INT sum_integervector();
 extern INT sum_matrix();
 extern INT sum_vector();
diff -r 5cd656a07aa5 src/di.c
--- a/di.c	Thu May 14 06:01:00 2009 -0400
+++ b/di.c	Thu May 14 07:38:17 2009 -0400
@@ -1355,7 +1355,7 @@
 				m_il_nv(0L,weight_watcher);
 				m_il_nv(0L,perm_vec);
 				copy(S_V_I(FP,0L),fix);
-				sort(fix);
+				sym_sort(fix);

 				get_perm(hweight,p,b,S_I_I(n),S_I_I(m),0L,
 						 perm_vec,weight_watcher,fix);
@@ -1502,7 +1502,7 @@
 	if(ind == m)
 	{
 		mult_perm_fix(p,fix,hfix);
-		sort(hfix);
+		sym_sort(hfix);
 		if(!hfix_in_ww(hfix,ww))
 		{
 			inc(ww);
diff -r 5cd656a07aa5 src/ga.c
--- a/ga.c	Thu May 14 06:01:00 2009 -0400
+++ b/ga.c	Thu May 14 07:38:17 2009 -0400
@@ -632,7 +632,7 @@
     else if (what == 0L)
         erg += vertikal_sum(S_V_L(a),c);
     erg += copy(a,d);
-    erg += sort(d);
+    erg += sym_sort(d);
     erg += m_il_p(S_V_II(d,S_V_LI(d)-1L),e); /* identitaet */
     for (i=0L,k=0L,j=S_V_LI(d);i<S_P_LI(e);i++)
         if (i+1L == S_V_II(d,k) )
@@ -722,7 +722,7 @@

     j=0L;
     erg += append(h,g,h2);
-    erg += sort(h2);
+    erg += sym_sort(h2);
     for (i=0L;i<S_V_LI(g);i++)
         {
         erg += m_i_i(S_V_II(g,i),S_P_I(a,j));
diff -r 5cd656a07aa5 src/galois.c
--- a/galois.c	Thu May 14 06:01:00 2009 -0400
+++ b/galois.c	Thu May 14 07:38:17 2009 -0400
@@ -758,7 +758,7 @@
 		}
         }
     FREEALL2(v,nv);
-    sort(res);
+    sym_sort(res);
     }
     S3R(k,phg_c,phg_d,"all_points_phg_store",res);
     ENDR("all_points");
diff -r 5cd656a07aa5 src/macro.h
--- a/macro.h	Thu May 14 06:01:00 2009 -0400
+++ b/macro.h	Thu May 14 07:38:17 2009 -0400
@@ -1,6 +1,8 @@
 /* file: macro.h symmetrica source code */
 #ifndef MACRO_H

+#include "string.h"
+
 #ifdef SYMMAGMA
 #define SYM_MALLOC(a) mem_malloc(a)
 #else
 #define C_O_K(a,b) ((a)->ob_kind = (OBJECTKIND)(b))
--- a/nc.c	Thu May 14 06:01:00 2009 -0400
+++ b/nc.c	Thu May 14 07:38:17 2009 -0400
@@ -204,7 +204,7 @@
     erg += mult(S_NC_C(a),S_NC_C(b),d);
     erg += m_gl_co(S_NC_GL(a),e);
     erg += mult_apply(e,d);
-    erg += sum(d,e);
+    erg += sym_sum(d,e);
     erg += m_gl_go(S_NC_GL(a),d);
     erg += div(e,d,c);
     erg += freeall(e);
@@ -617,7 +617,7 @@
         erg += mult_nc_kranz(c,a,e);
         erg += mult(S_V_I(e,1L),f,c);
         erg += div(c,g,c);
-        erg += sum(c,S_V_I(S_NC_C(b),S_I_I(d)));
+        erg += sym_sum(c,S_V_I(S_NC_C(b),S_I_I(d)));
     }
     erg += freeall(c);
     erg += freeall(d);
@@ -712,7 +712,7 @@
     for(j = 0L; j<S_V_LI(c);j++) {
         kranztypus_to_matrix(S_V_I(c,j),S_V_I(a,j));
     }
-    sort(a);
+    sym_sort(a);
     freeall(f); freeall(h); freeall(c);
     return OK;
 }
@@ -739,7 +739,7 @@
         kranztypus_to_matrix(S_V_I(c,j),S_V_I(h,j));
         }

-    sort(h);
+    sym_sort(h);
     m_l_v(S_V_L(h),a);
     for(j = 0L; j<S_V_LI(c);j++) {
         typusorder(S_V_I(h,j), zb, za, S_V_I(a,j), f);
@@ -789,7 +789,7 @@
         erg += kranztypus_to_matrix(S_V_I(c,j),S_V_I(h,j));
     }

-    erg += sort(h);
+    erg += sym_sort(h);
     erg += typusorder(S_V_I(h,S_I_I(i)), zb, za, a, f);
     erg += freeall(f);
     erg += freeall(c);
diff -r 5cd656a07aa5 src/nu.c
--- a/nu.c	Thu May 14 06:01:00 2009 -0400
+++ b/nu.c	Thu May 14 07:38:17 2009 -0400
@@ -531,13 +531,13 @@
     ENDR("add");
 }

-INT sort(a) OP a;
+INT sym_sort(a) OP a;
 /* sortiert das object in aufsteigender reihenfolge AK 270787 */
 /* AK 160986 */ /* AK 280689 V1.0 */ /* AK 050390 V1.1 */
 /* AK 070891 V1.3 */
 {
     INT erg = OK;
-    EOP("sort(1)",a);
+    EOP("sym_sort(1)",a);

     switch(S_O_K(a))
     {
@@ -547,9 +547,9 @@
         erg += sort_vector(a);break;
 #endif /* VECTORTRUE */
     default:
-        erg += WTO("sort",a); break;
+        erg += WTO("sym_sort",a); break;
     };
-    ENDR("sort");
+    ENDR("sym_sort");
 }

 INT length(a,d) OP a,d;
@@ -641,7 +641,7 @@
     ENDR("content");
 }

-INT sum(a,res) OP a,res;
+INT sym_sum(a,res) OP a,res;
 /* AK 280689 V1.0 */ /* AK 050390 V1.1 */ /* AK 120391 V1.2 */
 /* AK 140891 V1.3 */
 /* AK 170298 V2.0 */
@@ -649,7 +649,7 @@
     INT erg = OK;
     COP("sum(1)",a);
     COP("sum(2)",res);
-    CE2(a,res,sum);
+    CE2(a,res,sym_sum);

     switch(S_O_K(a))
     {
@@ -680,7 +680,7 @@
         erg += WTO("sum",a); break;
     };

-    ENDR("sum");
+    ENDR("sym_sum");
 }

diff -r 5cd656a07aa5 src/part.c
--- a/part.c	Thu May 14 06:01:00 2009 -0400
+++ b/part.c	Thu May 14 07:38:17 2009 -0400
@@ -347,7 +347,7 @@
     if (a == b) { /* a := a+a */
         if (S_PA_K(a) == VECTOR) {
             erg += append_apply_vector(S_PA_S(a),S_PA_S(b));
-            erg += sort(S_PA_S(a));
+            erg += sym_sort(S_PA_S(a));
             goto endr_ende;
         }
         else if (S_PA_K(a) == EXPONENT) {
@@ -406,7 +406,7 @@
             k=S_PA_LI(b)-1;
 /*
             erg += append_apply_vector(S_PA_S(a),S_PA_S(b));
-            erg += sort(S_PA_S(a));
+            erg += sym_sort(S_PA_S(a));
 */
             inc_vector_co(S_PA_S(a),S_PA_LI(b));
             for (j=S_PA_LI(a)-1;j>=0;j--)
diff -r 5cd656a07aa5 src/perm.c
--- a/perm.c	Thu May 14 06:01:00 2009 -0400
+++ b/perm.c	Thu May 14 07:38:17 2009 -0400
@@ -833,9 +833,9 @@
     /* s = Anzahl der spalten */

     s = S_V_LI(S_V_I(a,0L));
-    sum(S_V_I(a,0L),summe);/* composition ist vector */
+    sym_sum(S_V_I(a,0L),summe);/* composition ist vector */
     z = S_I_I(summe);
-    FREEALL(summe);
+    FREEALL(summe);
     m_ilih_nm(s,z,b);
     C_O_K(b,KRANZTYPUS);
     for (i=0L;i<s;i++)
@@ -1114,7 +1114,7 @@
         erg += kranztypus_to_matrix(S_V_I(c,i),S_V_I(h,i));
     }

-    erg += sort(h);
+    erg += sym_sort(h);

     erg += chartafel(b,ct);

@@ -1926,7 +1926,7 @@
     OP c;
     c = CALLOCOBJECT();
     erg += lehmercode_permutation(a,c); /*result is a vector */
-    erg += sum(c,b);
+    erg += sym_sum(c,b);
     FREEALL(c);
     }
     ENDR("numberof_inversionen");
@@ -2364,7 +2364,7 @@
     COP("rz_lehmercode(2)",b);

     zw = callocobject();
-    erg += sum(lc,zw);
+    erg += sym_sum(lc,zw);
     if (NULLP(zw))
         {
         erg += m_il_integervector((INT)0,b);
diff -r 5cd656a07aa5 src/rest.c
--- a/rest.c	Thu May 14 06:01:00 2009 -0400
+++ b/rest.c	Thu May 14 07:38:17 2009 -0400
@@ -3998,7 +3998,7 @@
                 oj = j;
                 }
         }
-    erg += sum(c,b);
+    erg += sym_sum(c,b);
 eee:
     erg += freeall(c);
     ENDR("charge_word");
diff -r 5cd656a07aa5 src/ta.c
--- a/ta.c	Thu May 14 06:01:00 2009 -0400
+++ b/ta.c	Thu May 14 07:38:17 2009 -0400
@@ -1596,7 +1596,7 @@
     {
     OP d,e;
     e = CALLOCOBJECT();
-    erg += sum(content,e); /* AK 271098 */
+    erg += sym_sum(content,e); /* AK 271098 */
     d = CALLOCOBJECT();
     erg += weight(shape,d);
     if (NEQ(d,e))
@@ -1821,7 +1821,7 @@
     CE3(matrix, column_index, row_index,matrix_twoword);
     c = callocobject();
     erg += zeilen_summe(matrix,c);
-    erg += sum(c,c);
+    erg += sym_sum(c,c);
     erg += m_l_v(c,column_index);
     erg += m_l_v(c,row_index);
     for(i=0,l=0;i<S_M_HI(matrix);i++)
diff -r 5cd656a07aa5 src/zyk.c
--- a/zyk.c	Thu May 14 06:01:00 2009 -0400
+++ b/zyk.c	Thu May 14 07:38:17 2009 -0400
@@ -804,7 +804,7 @@
     zykeltypvec = CALLOCOBJECT();
     ak_order = CALLOCOBJECT();

-    sum(numztvec,ak_order); /* AK 060295 */
+    sym_sum(numztvec,ak_order); /* AK 060295 */

@@ -1176,7 +1176,7 @@
     erg += m_i_i(0,c);
     while (z!=NULL)
         {
-        erg += sum(S_PO_S(z),e);
+        erg += sym_sum(S_PO_S(z),e);
         erg += hoch(b,e,e);
         erg += mult_apply(S_PO_K(z),e);
         erg += add_apply(e,c);

license: mit


code:
diff --git a/lib/t1lib/parseAFM.c b/lib/t1lib/parseAFM.c
index 6a31d7f..ba64541 100644
--- a/lib/t1lib/parseAFM.c
+++ b/lib/t1lib/parseAFM.c
@@ -199,7 +199,9 @@ static char *token(stream)
     idx = 0;

     while (ch != EOF && ch != ' ' && ch != CR  && ch != LF &&
-	   ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';'){
+	   ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';'
+     && idx < (MAX_NAME -1))
+    {
       ident[idx++] = ch;
       ch = fgetc(stream);
     } /* while */
@@ -235,7 +237,7 @@ static char *linetoken(stream)
     while ((ch = fgetc(stream)) == ' ' || ch == '\t' );

     idx = 0;
-    while (ch != EOF && ch != CR  && ch != LF && ch != CTRL_Z)
+    while (ch != EOF && ch != CR  && ch != LF && ch != CTRL_Z && idx < (MAX_NAME - 1))
     {
         ident[idx++] = ch;
         ch = fgetc(stream);


code:
Description: Don't lookup previous point if there isn't any
Author: Marc Deslauriers <marc.deslauriers@canonical.com>
Forwarded: no

Index: t1lib-5.1.2/lib/type1/type1.c
===================================================================
--- t1lib-5.1.2.orig/lib/type1/type1.c	2011-12-13 14:24:14.280965637 -0600
+++ t1lib-5.1.2/lib/type1/type1.c	2011-12-13 14:25:25.893320747 -0600
@@ -1700,6 +1700,7 @@
   long pindex = 0;

   /* compute hinting for previous segment! */
+  if (ppoints == NULL) Error0i("RLineTo: No previous point!\n");
   FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx, dy);

   /* Allocate a new path point and pre-setup data */
@@ -1728,6 +1729,7 @@
   long pindex = 0;

   /* compute hinting for previous point! */
+  if (ppoints == NULL) Error0i("RRCurveTo: No previous point!\n");
   FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx1, dy1);

   /* Allocate three new path points and pre-setup data */
@@ -1903,6 +1905,7 @@
     FindStems( currx, curry, 0, 0, dx, dy);
   }
   else {
+    if (ppoints == NULL) Error0i("RMoveTo: No previous point!\n");
     FindStems( currx, curry, ppoints[numppoints-2].x, ppoints[numppoints-2].y, dx, dy);
   }


code:
Description: Fix for libpng 1.6
Author: Programmer Nerd <theprogrammernerd@gmail.com>
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743388#20
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743388
Reviewed-by: Tobias Frost <tobi@debian.org>>
Last-Update: 2016-04-07
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/t4k_loaders.c
+++ b/src/t4k_loaders.c
@@ -1028,12 +1028,9 @@
       {
         png_init_io(png_ptr, fi);

-        info_ptr->width = surf->w;
-        info_ptr->height = surf->h;
-        info_ptr->bit_depth = 8;
-        info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
-        info_ptr->interlace_type = 1;
-        info_ptr->valid = 0;	/* will be updated by various png_set_FOO() functions */
+	png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8,
+		PNG_COLOR_TYPE_RGB_ALPHA,  PNG_INTERLACE_NONE,
+                PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);

         png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
                        PNG_sRGB_INTENT_PERCEPTUAL);


code:
Taken from Debian:
https://salsa.debian.org/multimedia-team/taopm/-/raw/master/debian/patches/01-add-missing-headers.diff

Description: Adding missing headers
Author: Tiago Bortoletto Vaz <tiago@debian.org>
Last-Update: 2013-04-17
--- a/libtao/Tao.cc
+++ b/libtao/Tao.cc
@@ -18,6 +18,7 @@

 #include "Tao.h"
 #include <iostream>
+#include <stdio.h>

 extern Tao tao;
 float &Time = tao.synthesisEngine.time;
--- a/libtao/TaoDevice.cc
+++ b/libtao/TaoDevice.cc
@@ -20,6 +20,7 @@
 #include "Tao.h"
 #include "TaoAccessPoint.h"
 #include "TaoInstrument.h"
+#include <cstring>

 TaoDevice::TaoDevice()
     {
--- a/libtao/TaoInstrument.cc
+++ b/libtao/TaoInstrument.cc
@@ -23,6 +23,7 @@
 //#include <sys/types.h>
 #include <iostream>
 #include <cmath>
+#include <cstring>

 float TaoInstrument::defaultMass=3.5;		// Set to optimum value for
                                                 // frequency response of
--- a/libtao/TaoOutput.cc
+++ b/libtao/TaoOutput.cc
@@ -24,6 +24,7 @@
 #include <fstream>
 #include "TaoOutput.h"
 #include "Tao.h"
+#include <cstring>

 extern Tao tao;

--- a/libtao/TaoPitch.cc
+++ b/libtao/TaoPitch.cc
@@ -30,6 +30,7 @@
 #include "TaoPitch.h"
 #include <iostream>
 #include <cmath>
+#include <cstring>

 // This class allows pitches and frequencies to be specified in a number of
 // different formats including the following:
--- a/taoparse/taoparser.yy
+++ b/taoparse/taoparser.yy
@@ -19,7 +19,8 @@

 #include <iostream>
 #include <sstream>
-#include <string>
+#include <cstring>
+#include <stdio.h>
 #include "taoparserdefs.h"

 int yyerror(char *s);
--- a/libtao/TaoGraphicsEngine.cc
+++ b/libtao/TaoGraphicsEngine.cc
@@ -27,7 +27,8 @@
 #include "TaoInstrument.h"
 #include "TaoAccessPoint.h"
 #include "TaoDevice.h"
-#include <string>
+#include <cstring>
+#include <stdio.h>

 extern Tao tao;
 extern void taoMasterTick();
--- a/tao2aiff/tao2aiff.cc
+++ b/tao2aiff/tao2aiff.cc
@@ -25,6 +25,8 @@
 #include <cmath>
 #include "audiofile.h"
 #include "tao2aiff.h"
+#include <cstdlib>
+#include <cstring>

 main(int argc, char **argv)
--- a/tao2wav/tao2wav.cc
+++ b/tao2wav/tao2wav.cc
@@ -25,6 +25,8 @@
 #include <cmath>
 #include "audiofile.h"
 #include "tao2wav.h"
+#include <cstdlib>
+#include <cstring>

 main(int argc, char **argv)
     {


code:
Taken from Debian:
https://salsa.debian.org/multimedia-team/taopm/-/raw/master/debian/patches/02-fix-parser-yyerror.diff

Description: Use a constant char, dummy comment.
Author: Tiago Bortoletto Vaz <tiago@debian.org>
Last-Update: 2013-04-17
--- a/taoparse/taoparser.yy
+++ b/taoparse/taoparser.yy
@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include "taoparserdefs.h"

-int yyerror(char *s);
+int yyerror(const char *s);

 //#ifdef LINUX
 int yylex(void);
@@ -2924,7 +2924,7 @@
     }

-int yyerror (char *s)
+int yyerror (const char *s)
     {
     parse_error(what_I_expected_here);
     std::cout << "PARSE_FAILED";


code:
This patch is needed in order to build Guix on a Btrfs file system.

From da922703282b0d3b8837a99a9c7fdd32f1d20d49 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Tue, 9 Jan 2018 20:16:14 -0500
Subject: [PATCH] Remove nonportable check for files containing only zeroes.

This check benefitted only one unlikely case (large files containing
only zeroes, on systems that do not support SEEK_HOLE) and was based
on an assumption about file system behavior that is not mandated by
POSIX and no longer holds in practice, namely that for sufficiently
large files, (st_blocks == 0) implies that the file contains only
zeroes.  Examples of file systems that violate this assumption include
Linux's /proc file system and Btrfs.

* src/sparse.c (sparse_scan_file_wholesparse): Remove this function.
(sparse_scan_file_seek): Remove the initial check for files containing
only zeroes.
---
 src/sparse.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/src/sparse.c b/src/sparse.c
index d41c0ea..3de6560 100644
--- a/src/sparse.c
+++ b/src/sparse.c
@@ -261,26 +261,6 @@ sparse_scan_file_raw (struct tar_sparse_file *file)
   return tar_sparse_scan (file, scan_end, NULL);
 }

-static bool
-sparse_scan_file_wholesparse (struct tar_sparse_file *file)
-{
-  struct tar_stat_info *st = file->stat_info;
-  struct sp_array sp = {0, 0};
-
-  /* Note that this function is called only for truly sparse files of size >= 1
-     block size (checked via ST_IS_SPARSE before).  See the thread
-     http://www.mail-archive.com/bug-tar@gnu.org/msg04209.html for more info */
-  if (ST_NBLOCKS (st->stat) == 0)
-    {
-      st->archive_file_size = 0;
-      sp.offset = st->stat.st_size;
-      sparse_add_map (st, &sp);
-      return true;
-    }
-
-  return false;
-}
-
 #ifdef SEEK_HOLE
 /* Try to engage SEEK_HOLE/SEEK_DATA feature. */
 static bool
@@ -343,10 +323,6 @@ sparse_scan_file_seek (struct tar_sparse_file *file)
 static bool
 sparse_scan_file (struct tar_sparse_file *file)
 {
-  /* always check for completely sparse files */
-  if (sparse_scan_file_wholesparse (file))
-    return true;
-
   switch (hole_detection)
     {
     case HOLE_DETECTION_DEFAULT:
--
2.15.1


code:
Skip tests that rely on unlinkat(2) behavior that varies between
kernel versions and is unspecified.

See <http://bugs.gnu.org/20597>
and <http://lists.gnu.org/archive/html/bug-tar/2015-06/msg00000.html>.

--- tar-1.28/tests/testsuite	2014-07-27 22:35:27.000000000 +0200
+++ tar-1.28/tests/testsuite	2015-06-16 00:21:16.906380739 +0200
@@ -34680,6 +34680,7 @@ find .
 )"
 at_fn_check_prepare_notrace 'an embedded newline' "remfiles08a.at:31"
 ( $at_check_trace;
+exit 77
 mkdir gnu
 (cd gnu
 TEST_TAR_FORMAT=gnu
@@ -34762,6 +34763,7 @@ find .
 )"
 at_fn_check_prepare_notrace 'an embedded newline' "remfiles08b.at:36"
 ( $at_check_trace;
+exit 77
 mkdir gnu
 (cd gnu
 TEST_TAR_FORMAT=gnu
@@ -34850,6 +34852,7 @@ find .
 )"
 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:31"
 ( $at_check_trace;
+exit 77
 mkdir gnu
 (cd gnu
 TEST_TAR_FORMAT=gnu


code:
From 1431ba3a99582e4c3d2693ac37e57f361858affd Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 11 Jun 2018 18:39:44 +0200
Subject: [PATCH] bootstrappable: Force static link.

---
 libtcc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libtcc.c b/libtcc.c
index 3448f44..02ab850 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -735,6 +735,9 @@ LIBTCCAPI TCCState *tcc_new(void)
     tcc_state = s;
     ++nb_states;

+#if BOOTSTRAP
+    s->static_link = 1;
+#endif
     s->alacarte_link = 1;
     s->nocommon = 1;
     s->warn_implicit_function_declaration = 1;
--
2.16.2


code:
From f7fa48c4c75a1e748dc5071e709c0b62ff739eaa Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Mon, 9 Dec 2019 10:02:20 +0000
Subject: [PATCH] Fix [abd4abedd2]: Failed to build tk 8.6.10 with cross
 compile

Patch taken from upstream to fix cross-compilation. To be removed on next Tcl release.

---
 compat/strtol.c  | 2 +-
 compat/strtoul.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compat/strtol.c b/compat/strtol.c
index b7f69196ce2..811006a64c3 100644
--- a/compat/strtol.c
+++ b/compat/strtol.c
@@ -53,7 +53,7 @@ strtol(
      */

     p = string;
-    while (TclIsSpaceProc(*p)) {
+    while (isspace(UCHAR(*p))) {
 	p += 1;
     }

diff --git a/compat/strtoul.c b/compat/strtoul.c
index e37eb05f823..15587f1da1a 100644
--- a/compat/strtoul.c
+++ b/compat/strtoul.c
@@ -74,7 +74,7 @@ strtoul(
      */

     p = string;
-    while (TclIsSpaceProc(*p)) {
+    while (isspace(UCHAR(*p))) {
 	p += 1;
     }
     if (*p == '-') {


code:
Install everything in PREFIX, set EXTRA_PATH to find it there.

--- ./Makefile.in~	2016-02-06 01:29:16.595090365 +0100
+++ ./Makefile.in	2016-02-06 09:29:04.286008931 +0100
@@ -133,9 +133,9 @@
 # require for testing here (like TCLX_LIBRARY).
 #========================================================================

-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR)
+EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(libdir)
 #EXTRA_PATH     = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLLIBPATH      = $(top_builddir)
+TCLLIBPATH      = $(pkglibdir)
 TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
 		  @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
 		  PATH="$(EXTRA_PATH):$(PATH)" \


code:
--- tests/commands.at
+++ tests/commands.at
@@ -921,26 +921,27 @@ AT_CLEANUP
 TCSH_UNTESTED([notify])

-AT_SETUP([onintr])
-
-AT_DATA([onintr.csh],
-[[onintr label
-kill -INT $$
-echo fail
-label:
-echo caught
-onintr -
-kill -INT $$
-echo OK
-onintr -
-kill -INT $$
-]])
-AT_CHECK([tcsh -f onintr.csh], ,
-[caught
-OK
-])
-
-AT_CLEANUP
+# XXX This test does not work: "fail" is printed on stdout.
+#AT_SETUP([onintr])
+#
+#AT_DATA([onintr.csh],
+#[[onintr label
+#kill -INT $$
+#echo fail
+#label:
+#echo caught
+#onintr -
+#kill -INT $$
+#echo OK
+#onintr -
+#kill -INT $$
+#]])
+#AT_CHECK([tcsh -f onintr.csh], ,
+#[caught
+#OK
+#])
+#
+#AT_CLEANUP

 AT_SETUP([popd])
--- tests/lexical.at
+++ tests/lexical.at
@@ -35,9 +35,9 @@ AT_CHECK([if [ ! -t 0 ]; then exit 77; fi],, [Skipping comment tests])
 AT_CHECK([echo 'echo OK@%:@comment' | tcsh -f], , [OK
 ])

-AT_CHECK([tcsh -f -c 'echo @%:@no comment'], ,
-[@%:@no comment
-])
+#AT_CHECK([tcsh -f -c 'echo @%:@no comment'], ,
+#[@%:@no comment
+#])

 AT_DATA([comment2.csh],
 [[echo testing...@%:@\
--- tests/subst.at
+++ tests/subst.at
@@ -54,7 +54,7 @@ AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }')
 , [1
 ])

-AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)/foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
+AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)//foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
 	  | wc -l | tr -d ' \t'], , [1
 ])

--- tests/variables.at
+++ tests/variables.at
@@ -666,7 +666,8 @@ set listflags=(-xA $cwd/args.sh)
 ls-F -something .
 ]])
 AT_DATA([args.sh],
-[[echo "$@"
+[[#!/bin/sh
+echo "$@"
 ]])
 chmod a+x args.sh
 AT_CHECK([tcsh -f listflags.csh], ,
@@ -728,55 +729,57 @@ TCSH_UNTESTED([$ oid])
 AT_SETUP([$ owd])

 AT_DATA([owd.csh],
-[[echo $owd
-cd /
+[[mkdir -p a/b/
 echo $owd
-pushd /bin
+cd a
+echo $owd
+pushd b
 echo $owd
 popd
 echo $owd
 ]])
-AT_CHECK([tcsh -f owd.csh | sed "s,$PWD,CWD,"], ,
+AT_CHECK([tcsh -f owd.csh | sed "s,$PWD,CWD,g"], ,
 [
 CWD
-/bin / @&t@
-/
-/ @&t@
-/bin
+CWD/a/b CWD/a @&t@
+CWD/a
+CWD/a @&t@
+CWD/a/b
 ])

 AT_CLEANUP

-AT_SETUP([$ path])
-
-mkdir subdir
-AT_DATA([script.sh],
-[[echo home
-]])
-AT_DATA([subdir/script.sh],
-[[echo subdir
-]])
-chmod a+x script.sh subdir/script.sh
-AT_DATA([path.csh],
-[[echo $?path
-set path=(. subdir)
-script.sh
-set path=(subdir .)
-script.sh
-printenv PATH
-setenv PATH :foo::bar:
-echo $path
-]])
-AT_CHECK([tcsh -f path.csh], ,
-[1
-home
-subdir
-subdir:.
-. foo . bar .
-])
-
-AT_CLEANUP
+# XXX Not sure why this does not work. "home" is printed out twice on stdout.
+#AT_SETUP([$ path])
+#
+#mkdir subdir
+#AT_DATA([script.sh],
+#[[echo home
+#]])
+#AT_DATA([subdir/script.sh],
+#[[echo subdir
+#]])
+#chmod a+x script.sh subdir/script.sh
+#AT_DATA([path.csh],
+#[[echo $?path
+#set path=(. subdir)
+#script.sh
+#set path=(subdir .)
+#script.sh
+#printenv PATH
+#setenv PATH :foo::bar:
+#echo $path
+#]])
+#AT_CHECK([tcsh -f path.csh], ,
+#[1
+#home
+#subdir
+#subdir:.
+#. foo . bar .
+#])
+#
+#AT_CLEANUP

 AT_SETUP([$ printexitvalue])


code:
Add support for '-h' (help).

https://github.com/PaulStoffregen/teensy_loader_cli/pull/26

---
 teensy_loader_cli.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/teensy_loader_cli.c b/teensy_loader_cli.c
index d4a6cc5..0a06209 100644
--- a/teensy_loader_cli.c
+++ b/teensy_loader_cli.c
@@ -37,7 +37,8 @@ void usage(const char *err)
 {
 	if(err != NULL) fprintf(stderr, "%s\n\n", err);
 	fprintf(stderr,
-		"Usage: teensy_loader_cli --mcu=<MCU> [-w] [-h] [-n] [-b] [-v] <file.hex>\n"
+		"Usage: teensy_loader_cli --mcu=<MCU> [-h] [-w] [-n] [-b] [-v] <file.hex>\n"
+		"\t-h : Print this help message\n"
 		"\t-w : Wait for device to appear\n"
 		"\t-r : Use hard reboot if device not online\n"
 		"\t-s : Use soft reboot if device not online (Teensy3.x only)\n"
@@ -1081,6 +1082,7 @@ void parse_flag(char *arg)
 	int i;
 	for(i=1; arg[i]; i++) {
 		switch(arg[i]) {
+			case 'h': usage(NULL); break;
 			case 'w': wait_for_device_to_appear = 1; break;
 			case 'r': hard_reboot_device = 1; break;
 			case 's': soft_reboot_device = 1; break;
--
2.7.4


code:
This test incorrectly expects the libpurple search path to initially
contain exactly one element.  Remove this incorrect assertion.

--- telegram-purple-1.3.1-checkout/test/loadtest.c	2018-10-27 16:25:06.258459600 +0200
+++ telegram-purple-1.3.1-checkout/test/loadtest.c	2018-10-27 16:25:11.830434770 +0200
@@ -156,7 +156,7 @@ static void tdf_inject_plugin (void) {
   printf ("Injecting our module into purple_plugins_* ...\n");
   purple_plugins_init ();
   GList *search_paths = purple_plugins_get_search_paths ();
-  assert (!search_paths->prev && !search_paths->next && search_paths->data);
+  assert (!search_paths->prev && search_paths->data);
   GList *new_paths = g_list_append (search_paths, g_strdup ("bin/"));
   assert (new_paths == search_paths);
   // Load "my" path before the default.


code:
Prevent a memory leak in call-channel, which otherwise would cause a
test failure in file-transfer-channel.c.

Taken from upstream:
https://gitlab.freedesktop.org/telepathy/telepathy-glib/commit/2e8b2cc0db09b781d99e3755bb6d01548037fe7b

diff --git a/telepathy-glib/call-channel.c b/telepathy-glib/call-channel.c
index 8ed76323be32f83c5f4d6045a50bc1698d8093fd..2a1fa203d4be9f0c8b99344225f4ba9900666ffc 100644
--- a/telepathy-glib/call-channel.c
+++ b/telepathy-glib/call-channel.c
@@ -525,6 +525,8 @@ update_call_members (TpCallChannel *self,

   _tp_channel_contacts_queue_prepare_async ((TpChannel *) self,
       contacts, update_call_members_prepared_cb, data);
+
+  g_ptr_array_unref (contacts);
 }

 static void


code:
Patch derived from discussion at https://savannah.nongnu.org/bugs/?37503

--- texi2html-5.0/texi2html.pl	2010-06-30 17:01:27.000000000 -0500
+++ texi2html-5.0/texi2html.pl	2014-07-09 01:17:57.062990582 -0500
@@ -2589,7 +2589,12 @@
     my $state = shift;

     # FIXME this should be done only once, for @documentencoding
-    my $encoding = lc(Texi2HTML::Config::get_conf('DOCUMENT_ENCODING'));
+    my $encoding;
+    my $input_encoding = Texi2HTML::Config::get_conf('documentencoding');
+    if (defined($input_encoding))
+    {
+      $encoding = lc($input_encoding);
+    }
     if (defined($encoding) and $encoding ne '' and exists($Texi2HTML::Config::t2h_encoding_aliases{$encoding}))
     {
        $encoding = $Texi2HTML::Config::t2h_encoding_aliases{$encoding};

Fix failures in test/encodings.

--- texi2html-5.0/texi2html.pl	2014-07-09 01:22:06.000000000 -0500
+++ texi2html-5.0/texi2html.pl	2014-07-10 23:23:47.182097602 -0500
@@ -53,6 +53,7 @@
 # for translations
 #use encoding 'utf8';
 #use utf8;
+binmode STDERR, ':encoding(utf8)';

 #
 # According to


code:
Do not try to regenerate po files; use the reference files that are packaged
in the tarball.

--- a/Makefile.in	2010-06-30 17:02:28.000000000 -0500
+++ b/Makefile.in	2014-08-16 00:22:38.447050269 -0500
@@ -1022,15 +1022,7 @@

 i18n/en.thl i18n/: $(po_document_dir)/po_document/$(PACKAGE)_document.pot
 	$(MKDIR_P) i18n
-	if test '$(USE_NLS)' = 'yes'; then \
-	  for file in "$(srcdir)/$(po_document_dir)/po_document/"*".po"; do lang=`basename "$$file" .po | sed 's/\..*//'`; \
-		test "$$lang" = 'en' && continue; \
-		msgexec -i "$$file" "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" $$lang > i18n/$$lang.thl; \
-	  done; \
-	  msgexec -i $< "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" en > i18n/en.thl; \
-	else \
-	  cp -p i18n_ref/*.thl i18n; \
-	fi
+	cp -p i18n_ref/*.thl i18n

 i18n_ref:
 	$(MKDIR_P) i18n_ref

Have install-sh install .mo files locally for in-source tests, so that msgfmt
is not needed.

--- a/Makefile.in	2010-06-30 17:02:28.000000000 -0500
+++ b/Makefile.in	2014-08-16 00:22:38.447050269 -0500
@@ -1052,19 +1044,8 @@
 # update the po files, and install locally the .mo files for the in
 # source tests
 check-local: makeinfo.pl texi2any.pl
-	if test '$(USE_NLS)' = 'yes'; then \
-	  cd $(po_document_dir)/po_document && $(MAKE) $(AM_MAKEFLAGS) update-po; \
-	fi
-	rm -rf locales
-	for file in "$(srcdir)/$(po_document_dir)/po_document/"*.po; do \
-	  basename=`basename "$$file" .po` ; \
-	  $(MKDIR_P) "locales/$$basename/LC_MESSAGES/" ; \
-	  if test '$(USE_NLS)' = 'yes'; then \
-	    $(MSGFMT) "$$file" -o "locales/$$basename/LC_MESSAGES/texi2html_document.mo" ; \
-	  else \
-	    cp -p "$(srcdir)/$(po_document_dir)/po_document/$$basename.mo" "locales/$$basename/LC_MESSAGES/texi2html_document.mo" ; \
-	  fi; \
-	done
+	$(MAKE) -C po_document localedir="$(abs_srcdir)/locales" install-data
+	$(MAKE) -C po_messages localedir="$(abs_srcdir)/locales" install-data

 makeinfo.pl texi2any.pl:
 	-$(LN_S) $(srcdir)/texi2html.pl $@


code:
Fix a deprecation warning with newer Perl that breaks some tests.

--- a/tp/Texinfo/Parser.pm
+++ b/tp/Texinfo/Parser.pm
@@ -5438,12 +5438,12 @@
     }
   } elsif ($command eq 'clickstyle') {
     # REMACRO
-    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) {
+    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*/) {
       $args = ['@'.$1];
       $self->{'clickstyle'} = $1
         unless(_ignore_global_commands($self));
       $remaining = $line;
-      $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
+      $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
       $has_comment = 1 if (defined($4));
     } else {
       $self->line_error (sprintf($self->__(


code:
Fix build with Poppler 0.83 and later.

Taken from Arch Linux, but adjusted to patch the versioned Poppler
files, as upstream applies it after copying them in place.
https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler-0.83.patch?h=packages/texlive-bin

diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
--- texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
+++ texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
@@ -723,7 +723,7 @@
 #endif
     // initialize
     if (!isInit) {
-        globalParams = new GlobalParams();
+        globalParams.reset(new GlobalParams());
         globalParams->setErrQuiet(false);
         isInit = true;
     }
@@ -1108,6 +1108,5 @@
             delete_document(p);
         }
         // see above for globalParams
-        delete globalParams;
     }
 }
diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
--- texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
+++ texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
@@ -79,7 +79,7 @@
         exit(1);
     }
     fileName = new GString(argv[1]);
-    globalParams = new GlobalParams();
+    globalParams.reset(new GlobalParams());
     doc = new PDFDoc(fileName);
     if (!doc->isOk()) {
         fprintf(stderr, "Invalid PDF file\n");
@@ -100,7 +100,7 @@
     if (objnum == 0) {
         srcStream = catalogDict.dictLookup("SourceObject");
         static char const_SourceFile[] = "SourceFile";
-        if (!srcStream.isStream(const_SourceFile)) {
+        if (!srcStream.isDict(const_SourceFile)) {
             fprintf(stderr, "No SourceObject found\n");
             exit(1);
         }
@@ -202,5 +202,4 @@
         fprintf(stderr, "Cross-reference table extracted to %s\n", outname);
     fclose(outfile);
     delete doc;
-    delete globalParams;
 }


code:
Fix build with Poppler 0.86 and later.

Taken from Arch Linux, but adjusted to patch the versioned Poppler
files, as upstream applies it after copying them in place.
https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler-0.86.patch?h=packages/texlive-bin

--- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc	2020-03-03 21:11:35.102711802 +0000
+++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc	2020-03-03 21:13:13.057420111 +0000
@@ -757,7 +757,7 @@
     if (page_name) {
         // get page by name
         GString name(page_name);
-        LinkDest *link = pdf_doc->doc->findDest(&name);
+        LinkDest *link = pdf_doc->doc->findDest(&name).get();
         if (link == 0 || !link->isOk())
             pdftex_fail("PDF inclusion: invalid destination <%s>", page_name);
         Ref ref = link->getPageRef();


code:
Retain environment setting of "HOME" for tests that need os.path.expanduser()
to return a readable directory in the build chroot.

--- thefuck-3.25/tests/conftest.py
+++ thefuck-3.25/tests/conftest.py
@@ -64,6 +64,7 @@ def set_shell(monkeypatch):

 @pytest.fixture(autouse=True)
 def os_environ(monkeypatch):
-    env = {'PATH': os.environ['PATH']}
+    env = {'PATH': os.environ['PATH'],
+           'HOME': os.environ['HOME']}
     monkeypatch.setattr('os.environ', env)
     return env


code:
Copied from Debian.

From c18f27a58792f7fbd0b30a0ff50d6b40a82f940d Mon Sep 17 00:00:00 2001
From: Geoff McLane <ubuntu@geoffair.info>
Date: Wed, 3 Jun 2015 20:26:03 +0200
Subject: [PATCH] Issue #217 - avoid len going negative, ever...

---
 src/lexer.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lexer.c b/src/lexer.c
index 376a3d8..664f806 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -3739,16 +3740,17 @@ static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name,
         /* and prompts attributes unless --literal-attributes is set to yes      */
         /* #994841 - Whitespace is removed from value attributes                 */

-        if (munge &&
+        /* Issue #217 - Also only if/while (len > 0) - MUST NEVER GO NEGATIVE! */
+        if ((len > 0) && munge &&
             TY_(tmbstrcasecmp)(name, "alt") &&
             TY_(tmbstrcasecmp)(name, "title") &&
             TY_(tmbstrcasecmp)(name, "value") &&
             TY_(tmbstrcasecmp)(name, "prompt"))
         {
-            while (TY_(IsWhite)(lexer->lexbuf[start+len-1]))
+            while (TY_(IsWhite)(lexer->lexbuf[start+len-1]) && (len > 0))
                 --len;

-            while (TY_(IsWhite)(lexer->lexbuf[start]) && start < len)
+            while (TY_(IsWhite)(lexer->lexbuf[start]) && (start < len) && (len > 0))
             {
                 ++start;
                 --len;


code:
From a53b6ee4519a7657164610ac14a82c57b1273bf6 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Mon, 23 Nov 2015 06:54:36 -0500
Subject: [PATCH] Use STL.

Software that uses the shared library, such as Kodi, assume that TinyXML was
compiled with STL activated.

---
 tinyxml.h   | 2 ++
 xmltest.cpp | 1 +
 2 files changed, 3 insertions(+)

diff --git a/tinyxml.h b/tinyxml.h
index a3589e5..6cbfc7d 100644
--- a/tinyxml.h
+++ b/tinyxml.h
@@ -43,6 +43,8 @@ distribution.
 #define DEBUG
 #endif

+#define TIXML_USE_STL 1
+
 #ifdef TIXML_USE_STL
 	#include <string>
  	#include <iostream>
diff --git a/xmltest.cpp b/xmltest.cpp
index 663c157..057dbfe 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -2,6 +2,7 @@
    Test program for TinyXML.
 */

+#define TIXML_USE_STL 1

 #ifdef TIXML_USE_STL
 	#include <iostream>
--
2.5.0


code:
Description: Debian patches to make tipp10 compile
Author: Christoph Martin <chrism@debian.org>
Last-Update: 2016-07-20

https://sources.debian.net/data/main/t/tipp10/2.1.0-2/debian/patches/0001-FixCompiling

--- a/widget/tickerboard.cpp
+++ b/widget/tickerboard.cpp
@@ -97,7 +97,8 @@ void TickerBoard::startTicker(bool wasPa

 		if (tickerSpeed == 50) {
 			scrollOffset = 290;
-			scroll(-290, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
+			const QRect qr = QRect(10, 15, 590, 35);
+			scroll(-290, 0, qr); //contentsRect());
 		}

 		startFlag = true;
@@ -153,7 +154,8 @@ void TickerBoard::changeChar() {
 			scrollOffset = 0;
 		} else {
 			scrollOffset = 290;
-			scroll(-290, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
+			const QRect qr = QRect(10, 15, 590, 35);
+			scroll(-290, 0, qr); //contentsRect());
 		}
 		splitLesson();
 	}
@@ -242,7 +244,8 @@ void TickerBoard::progress() {

 				// Move ticker 1 pixel to left
 				scrollOffset++;
-				scroll(-1, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
+				const QRect qr = QRect(10, 15, 590, 35);
+				scroll(-1, 0, qr); //contentsRect());

 				if ((lessonOffset - scrollOffset) <= 30) {
 					setSpeed(tickerSpeed);
@@ -265,14 +268,16 @@ void TickerBoard::progress() {
 			// 160 pixels overage (because the user must see at least the next word)
 			if ((lessonOffset - scrollOffset) > 200) {
 				scrollOffset += (lessonOffset - scrollOffset) - 200;
-				scroll(-((lessonOffset - scrollOffset) - 200), 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
+				const QRect qr = QRect(10, 15, 590, 35);
+				scroll(-((lessonOffset - scrollOffset) - 200), 0, qr); //contentsRect());
 			}
 		} else {
 			// If the user types faster than the ticker, move ticker faster after
 			// 160 pixels overage (because the user must see at least the next word)
 			if ((lessonOffset - scrollOffset) > 280) {
 				scrollOffset += 570;
-				scroll(-570, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
+				const QRect qr = QRect(10, 15, 590, 35);
+				scroll(-570, 0, qr); //contentsRect());
 			}

 		}
--- a/widget/settingspages.cpp
+++ b/widget/settingspages.cpp
@@ -501,7 +501,7 @@ void DatabasePage::writeSettings() {
 	QSettings settings;
 	#endif
 	settings.beginGroup("database");
-	settings.setValue("pathpro", lineDatabasePath->text() + "/" + QString::QString(APP_USER_DB));
+	settings.setValue("pathpro", lineDatabasePath->text() + "/" + QString(APP_USER_DB));
 	settings.endGroup();
 }

--- a/widget/lessondialog.cpp
+++ b/widget/lessondialog.cpp
@@ -89,7 +89,7 @@ void LessonDialog::updateContent() {
 			*lessonData = lineLessonContent->toPlainText().split("\n", QString::SkipEmptyParts);
 			// Delete empty lines
 			for (int i = 0; i < lessonData->size(); i++) {
-				if (QString::QString(lessonData->at(i).toLocal8Bit().constData()).simplified() == "") {
+				if (QString(lessonData->at(i).toLocal8Bit().constData()).simplified() == "") {
 					lessonData->removeAt(i);
 				}
 			}
@@ -259,7 +259,7 @@ void LessonDialog::clickSave() {
 	contentList = lineLessonContent->toPlainText().split("\n", QString::SkipEmptyParts);
 	// Delete empty lines
 	for (i = 0; i < contentList.size(); i++) {
-		if (QString::QString(contentList.at(i).toLocal8Bit().constData()).simplified() == "") {
+		if (QString(contentList.at(i).toLocal8Bit().constData()).simplified() == "") {
 			contentList.removeAt(i);
 		}
 	}
--- a/sql/chartablesql.cpp
+++ b/sql/chartablesql.cpp
@@ -57,7 +57,7 @@ QVariant CharSqlModel::data(const QModel
 			// Read the unicode value
 			unicode = value.toInt();
 			// Convert unicode to a char
-			unicodeToChar = QString::QString(QChar(unicode)); //"\'" + QString::QString(QChar(unicode)) + "\'";
+			unicodeToChar = QString(QChar(unicode)); //"\'" + QString::QString(QChar(unicode)) + "\'";
 			return unicodeToChar;
 		} else {
 			// Last column (error weight)
--- a/sql/startsql.cpp
+++ b/sql/startsql.cpp
@@ -344,7 +344,7 @@ bool StartSql::updateOwnLesson(QString l
 		for (i = 0; i < content.size(); i++) {
 			//simplifiedContent = QString::QString(
 			//	content.at(i)).replace(QChar(0x27), "''", Qt::CaseSensitive).simplified();
-			simplifiedContent = trim(QString::QString(
+			simplifiedContent = trim(QString(
 				content.at(i)).replace(QChar(0x27), "''", Qt::CaseSensitive));

 			if (!query.exec("INSERT INTO own_content VALUES(NULL,'" +
--- a/def/defines.h
+++ b/def/defines.h
@@ -27,9 +27,9 @@ Foundation, Inc., 51 Franklin Street, Fi
 #define DEFINES_H

 // OS constants
-#define APP_WIN						true
+#define APP_WIN						false
 #define APP_MAC						false
-#define APP_X11						false
+#define APP_X11						true
 #define APP_PORTABLE				false //at least one of the 3 OS must be true too!

 // Languages
@@ -47,6 +47,7 @@ Foundation, Inc., 51 Franklin Street, Fi
 #define APP_URL 					"http://www.tipp10.com"
 #define APP_DB 						"tipp10v2.template"
 #define APP_USER_DB					"tipp10v2.db"
+#define APP_SHARE_DIR					"/usr/share/tipp10"

 // Update constants
 #define UPDATE_URL 					"www.tipp10.com"
--- a/tipp10.pro
+++ b/tipp10.pro
@@ -88,3 +88,15 @@ SOURCES         += 	main.cpp \
                     sql/startsql.cpp \
                     games/abcrainwidget.cpp \
                     games/charball.cpp
+
+target.path = /usr/bin/
+INSTALLS += target
+share.path = /usr/share/tipp10/
+share.files = release/* *wav
+INSTALLS += share
+desktop.path = /usr/share/applications/
+desktop.files = tipp10.desktop
+INSTALLS += desktop
+pixmap.path = /usr/share/pixmaps/
+pixmap.files = tipp10.png
+INSTALLS += pixmap
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -179,11 +179,13 @@ static bool createConnection() {
 				CANCEL_NO, "Betroffener Pfad:\n" + dbPath);*/
 			// Try to create new databae in user path
 			// Exist a database in the program dir?
-			if (QFile::exists(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate)) {
+			// if (QFile::exists(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate)) {
+		  	if (QFile::exists(QString(APP_SHARE_DIR) + "/" + dbNameTemplate)) {
 			//if (QFile::exists(":/" + dbNameTemplate)) {
 				// A database exist in the program dir
 				// -> copy database to user home dir
-				QFile file(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate);
+				// QFile file(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate);
+			  	QFile file(QString(APP_SHARE_DIR) + "/" + dbNameTemplate);
 				//QFile file(":/" + dbNameTemplate);
 				if (file.copy(dbPath)) {
 					QFile::setPermissions(dbPath, QFile::permissions(dbPath) | QFile::WriteUser);
@@ -229,7 +231,8 @@ static bool createConnection() {
 		// Exist a database in user's home dir?
 		if (!QFile::exists(dbPath)) {
 			// Exist a database template in the program dir?
-			dbPath = QCoreApplication::applicationDirPath() + "/" + dbNameTemplate;
+			// dbPath = QCoreApplication::applicationDirPath() + "/" + dbNameTemplate;
+		  	dbPath = QString(APP_SHARE_DIR) + "/" + dbNameTemplate;
 			//dbPath = ":/" + dbNameTemplate;
 			if (QFile::exists(dbPath)) {
 				// A database template exist in the program dir
--- a/widget/helpbrowser.cpp
+++ b/widget/helpbrowser.cpp
@@ -52,13 +52,15 @@ HelpBrowser::HelpBrowser(QString link, Q
     textBrowser->setOpenExternalLinks(true);

     textBrowser->setSource(QString("file:///") +
-    	QCoreApplication::applicationDirPath() +
+	// QCoreApplication::applicationDirPath() +
+    	APP_SHARE_DIR +
     	QString("/help/") + language + QString("/index.html"));

     if (link != "") {

 		textBrowser->setSource(QString("file:///") +
-			QCoreApplication::applicationDirPath() +
+			// QCoreApplication::applicationDirPath() +
+			APP_SHARE_DIR +
 			QString("/help/") + language + QString("/content/") + link);

 	}
--- a/tipp10.desktop
+++ b/tipp10.desktop
@@ -1,10 +1,10 @@
 [Desktop Entry]
-Encoding=UTF-8
 Name=TIPP10
 Comment=Touch Typing Tutor
 Comment[de]=10-Finger-Schreibtrainer
 Exec=tipp10
 Icon=tipp10.png
 Terminal=false
 Type=Application
 Categories=Education;
+Keywords=learning;touchtyping


code:
Description: Remove license dialog and license key checking

https://sources.debian.net/data/main/t/tipp10/2.1.0-2/debian/patches/0002-RemoveLicenseCode

--- a/main.cpp
+++ b/main.cpp
@@ -33,7 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fi
 #include "def/defines.h"
 #include "sql/connection.h"
 #include "widget/mainwindow.h"
-#include "widget/licensedialog.h"
 #include "widget/illustrationdialog.h"

 int main(int argc, char *argv[]) {
@@ -59,7 +58,7 @@ int main(int argc, char *argv[]) {
 	QSettings settings;
 	#endif

-	// Read/write language, license key and show illustration flag
+	// Read/write language and show illustration flag
 	settings.beginGroup("general");
 	QString languageGui = settings.value("language_gui",
 		QLocale::system().name()).toString();
@@ -101,7 +100,6 @@ int main(int argc, char *argv[]) {
 	QString languageLesson = settings.value("language_lesson",
 		"").toString();

-	QString licenseKey = settings.value("licensekey", "").toString();
 	bool showIllustration = settings.value("check_illustration", true).toBool();
 	bool useNativeStyle = settings.value("check_native_style", false).toBool();
 	settings.endGroup();
--- a/tipp10.pro
+++ b/tipp10.pro
@@ -43,7 +43,6 @@ HEADERS         += 	def/defines.h \
                     widget/helpbrowser.h \
                     widget/companylogo.h \
                     widget/errormessage.h \
-                    widget/licensedialog.h \
                     widget/txtmessagedialog.h \
                     widget/checkversion.h \
                     sql/connection.h \
@@ -78,7 +77,6 @@ SOURCES         += 	main.cpp \
                     widget/helpbrowser.cpp \
                     widget/companylogo.cpp \
                     widget/errormessage.cpp \
-                    widget/licensedialog.cpp \
                     widget/txtmessagedialog.cpp \
                     widget/checkversion.cpp \
                     sql/lessontablesql.cpp \
--- a/widget/licensedialog.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-Copyright (c) 2006-2009, Tom Thielicke IT Solutions
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.
-*/
-
-/****************************************************************
-**
-** Implementation of the LicenseDialog class
-** File name: licensedialog.cpp
-**
-****************************************************************/
-
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QMessageBox>
-#include <QSettings>
-#include <QCoreApplication>
-
-#include "licensedialog.h"
-#include "def/defines.h"
-
-LicenseDialog::LicenseDialog(QWidget *parent) : QDialog(parent) {
-
-	setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
-
-	setWindowTitle(tr("Lizenznummer"));
-	setWindowIcon(QIcon(":/img/" + QString(ICON_FILENAME)));
-
-	// Create texbox
-    createLineEdit();
-
-	// Create buttons
-    createButtons();
-
-	// Set the layout of all widgets created above
-	createLayout();
-
-	lineLicensing->setFocus();
-}
-
-void LicenseDialog::createButtons() {
-	//Buttons
-	buttonOk = new QPushButton(this);
-	buttonDemo = new QPushButton(this);
-
-	buttonOk->setText(tr("&Ok"));
-	buttonDemo->setText(tr("&Demo starten"));
-	buttonDemo->setToolTip(tr("Im Demo-Modus koennen pro Lektion nur\n"
-		"10 Schriftzeichen eingegeben werden"));
-
-	buttonOk->setDefault(true);
-	// Widget connections
-    connect(buttonOk, SIGNAL(clicked()), this, SLOT(clickOk()));
-    connect(buttonDemo, SIGNAL(clicked()), this, SLOT(clickDemo()));
-}
-
-void LicenseDialog::createLineEdit() {
-
-	lineLicensing = new QLineEdit();
-	lineLicensing->setInputMask(">NNNNNNNNNNNNNN");
-
-	labelLicensing = new QLabel(tr("Bitte geben Sie Ihre Lizenznummer "
-		"(ohne Leerzeichen) ein, "
-		"die Sie im Arbeitsbuch (Schulbuch) auf Seite 3 finden:"));
-
-	labelLicensing->setWordWrap(true);
-}
-
-void LicenseDialog::createLayout() {
-	// Button layout horizontal
-	QHBoxLayout *buttonLayoutHorizontal = new QHBoxLayout;
-    buttonLayoutHorizontal->addStretch(1);
-    buttonLayoutHorizontal->addWidget(buttonDemo);
-    buttonLayoutHorizontal->addWidget(buttonOk);
-	// Full layout of all widgets vertical
-	QVBoxLayout *mainLayout = new QVBoxLayout;
-    mainLayout->addSpacing(1);
-    mainLayout->addWidget(labelLicensing);
-    mainLayout->addSpacing(1);
-    mainLayout->addWidget(lineLicensing);
-    mainLayout->addSpacing(1);
-    mainLayout->addLayout(buttonLayoutHorizontal);
-    mainLayout->setMargin(15);
-    mainLayout->setSpacing(15);
-    // Pass layout to parent widget (this)
-	this->setLayout(mainLayout);
-}
-
-void LicenseDialog::clickOk() {
-
-	// Check license key
-	if (!checkLicenseKey(lineLicensing->text())) {
-
-		// License key is wrong
-
-		// Message to the user
-		QMessageBox::information(0, APP_NAME,
-			tr("Die eingegebene Lizenznummer ist leider nicht "
-			"korrekt.\nBitte ueberpruefen Sie die Schreibweise."));
-
-		lineLicensing->setFocus();
-
-	} else {
-
-		// License key is ok
-		writeSettings();
-		accept();
-	}
-}
-
-void LicenseDialog::clickDemo() {
-	accept();
-}
-
-bool LicenseDialog::checkLicenseKey(QString licenseKey) {
-	if (licenseKey.size() == 14 &&
-		licenseKey[0].isLetter() &&
-		licenseKey[1].isLetter() &&
-		(licenseKey.mid(2, 2) == "39" ||
-		licenseKey.mid(2, 2) == "41" ||
-		licenseKey.mid(2, 2) == "43" ||
-		licenseKey.mid(2, 2) == "49" ||
-		licenseKey.mid(2, 2) == "99") &&
-		licenseKey[4].isDigit() &&
-		licenseKey[5].isDigit() &&
-		licenseKey[6].isDigit() &&
-		licenseKey[7].isLetter() &&
-		licenseKey[8].isDigit() &&
-		licenseKey[9].isDigit() &&
-		licenseKey[10].isDigit() &&
-		licenseKey[11].isDigit() &&
-		licenseKey[12].isLetter() &&
-		licenseKey[13].isLetter()) {
-
-		return true;
-	}
-	return false;
-}
-
-void LicenseDialog::writeSettings() {
-	// Saves settings of the startwiget
-	// (uses the default constructor of QSettings, passing
-	// the application and company name see main function)
-	#if APP_PORTABLE
-	QSettings settings(QCoreApplication::applicationDirPath() +
-    	"/portable/settings.ini", QSettings::IniFormat);
-    #else
-	QSettings settings;
-	#endif
-
-	settings.beginGroup("general");
-	settings.setValue("licensekey", lineLicensing->text());
-	settings.endGroup();
-}
--- a/widget/licensedialog.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-Copyright (c) 2006-2009, Tom Thielicke IT Solutions
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.
-*/
-
-/****************************************************************
-**
-** Definition of the LicenseDialog class
-** File name: licensedialog.h
-**
-****************************************************************/
-
-#ifndef LICENSEDIALOG_H
-#define LICENSEDIALOG_H
-
-#include <QDialog>
-#include <QWidget>
-#include <QPushButton>
-#include <QLabel>
-#include <QLineEdit>
-#include <QString>
-
-//! The LicenseDialog class provides a license input widget.
-/*!
-	The LicenseDialog class shows a dialog to enter a license key.
-
-	@author Tom Thielicke, s712715
-	@version 0.0.1
-	@date 09.09.2008
-*/
-class LicenseDialog : public QDialog {
-	Q_OBJECT
-
-	public:
-
-		//! Constructor, creates two table objects and provide it in two tabs.
-		LicenseDialog(QWidget *parent = 0);
-
-		bool checkLicenseKey(QString licenseKey);
-
-	public slots:
-
-	private slots:
-
-		//! Start button pressed
-		void clickOk();
-
-		//! Demo button pressed
-		void clickDemo();
-
-	private:
-
-		//! Creates a cancel and a ok button.
-		void createButtons();
-
-		//! Creates a textbox.
-		void createLineEdit();
-
-		//! Creates the layout of the complete class.
-		void createLayout();
-
-		//! Writes user settings
-		void writeSettings();
-
-		QPushButton *buttonOk;
-		QPushButton *buttonDemo;
-		QLabel *labelLicensing;
-		QLineEdit *lineLicensing;
-};
-
-#endif //LICENSEDIALOG_H
--- a/widget/mainwindow.cpp
+++ b/widget/mainwindow.cpp
@@ -116,11 +116,6 @@ void MainWindow::closeEvent(QCloseEvent
 	}
 }

-bool MainWindow::checkLicenseKey(QString licenseKey) {
-
-    return false;
-}
-
 void MainWindow::createMenu() {
 	//Mac-Version:
 	//-----------
--- a/widget/mainwindow.h
+++ b/widget/mainwindow.h
@@ -39,7 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fi
 #include "trainingwidget.h"
 #include "evaluationwidget.h"
 #include "illustrationdialog.h"
-#include "licensedialog.h"
 #include "games/abcrainwidget.h"
 #include "helpbrowser.h"


code:
This patch hard-codes the Tk library directory during package initialization.

See <http://core.tcl.tk/tk/tktview/765642ffffffffffffff>.

diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index b5cbbab..96b5501 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -988,6 +988,7 @@ TkCreateMainWindow(

     Tcl_SetVar2(interp, "tk_patchLevel", NULL, TK_PATCH_LEVEL, TCL_GLOBAL_ONLY);
     Tcl_SetVar2(interp, "tk_version",    NULL, TK_VERSION,     TCL_GLOBAL_ONLY);
+    Tcl_SetVar2(interp, "tk_library",    NULL, TK_LIBRARY,     TCL_GLOBAL_ONLY);

     tsdPtr->numMainWindows++;
     return tkwin;
diff --git a/unix/Makefile.in b/unix/Makefile.in
index f21fdbb..c61b0df 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1029,7 +1029,7 @@ tkVisual.o: $(GENERIC_DIR)/tkVisual.c
 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c

 tkWindow.o: $(GENERIC_DIR)/tkWindow.c
-	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkWindow.c
+	$(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" $(GENERIC_DIR)/tkWindow.c

 tkButton.o: $(GENERIC_DIR)/tkButton.c
 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c


code:
Description: Avoid error messages when opening a new tomb
 Make sure control file exists and has user ownership before user writes to it.
Author: Sven Geuer <debmaint@g-e-u-e-r.de>
Bug: https://github.com/dyne/Tomb/issues/369
Last-Update: 2019-11-04
--- a/tomb
+++ b/tomb
@@ -2197,14 +2197,15 @@
 # {{{ Open

 _update_control_file() {
-	# replaces a control file with new contents and gives it user ownership
+	# make sure a control file exists, gives it user ownership
+	# and replaces it with new contents
 	# stdin = contents
 	# $1 = path to control file
 	# $2 = contents
 	[[ "$2" = "" ]] && return 1
 	_sudo touch "$1"
-	print "$2" > "$1"
 	_sudo chown ${_UID}:${_GID} "$1"
+	print "$2" > "$1"
 	_verbose "updated control file $1 = $2"
 }