diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-editors/teco/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-editors/teco/files')
-rw-r--r-- | app-editors/teco/files/teco-double-free.diff | 20 | ||||
-rw-r--r-- | app-editors/teco/files/teco-gcc4.patch | 11 | ||||
-rw-r--r-- | app-editors/teco/files/teco-warnings.patch | 47 |
3 files changed, 78 insertions, 0 deletions
diff --git a/app-editors/teco/files/teco-double-free.diff b/app-editors/teco/files/teco-double-free.diff new file mode 100644 index 000000000000..5a62b23d90be --- /dev/null +++ b/app-editors/teco/files/teco-double-free.diff @@ -0,0 +1,20 @@ +--- te_exec2.c 1993-11-12 21:12:47.000000000 +0000 ++++ te_exec2.c.new 2005-08-21 18:31:26.495907720 +0100 +@@ -197,7 +197,7 @@ + { + if (eisw) /* if ending a file execute, restore the previous "old command string" */ + { +- fclose(eisw); /* return the file descriptor */ ++ fclose(eisw), eisw = NULL; /* return the file descriptor */ + dly_free_blist(cbuf.f); /* return the command string used by the file (after execution done) */ + cbuf.f = oldcstring.f; + cbuf.z = oldcstring.z; +@@ -214,7 +214,7 @@ + oldcstring.z = cbuf.z; + cbuf.f = NULL; /* and make it inaccessible to "rdcmd" */ + } +- if (eisw) fclose(eisw); /* if a command file had been open, close it */ ++ if (eisw) fclose(eisw), eisw = NULL; /* if a command file had been open, close it */ + esp->val1 = (eisw = t_eisw) ? -1 : 0; + esp->flag1 = colonflag; + colonflag = 0; diff --git a/app-editors/teco/files/teco-gcc4.patch b/app-editors/teco/files/teco-gcc4.patch new file mode 100644 index 000000000000..fe4d8d3759b4 --- /dev/null +++ b/app-editors/teco/files/teco-gcc4.patch @@ -0,0 +1,11 @@ +--- te_subs.c.orig 2007-03-18 19:58:40 +0100 ++++ te_subs.c 2007-03-18 19:58:57 +0100 +@@ -231,7 +231,7 @@ + char c; + { + if (isdigit(c)) return(c - '0' + 1); +- else if isalpha(c) return(mapch_l[c] - 'a' + 11); ++ else if (isalpha(c)) return(mapch_l[c] - 'a' + 11); + else if (fors) + { + if (c == '_') return (SERBUF); diff --git a/app-editors/teco/files/teco-warnings.patch b/app-editors/teco/files/teco-warnings.patch new file mode 100644 index 000000000000..f8bbfbfff181 --- /dev/null +++ b/app-editors/teco/files/teco-warnings.patch @@ -0,0 +1,47 @@ +Include stdlib.h for exit(3). +Fix conflicting type for malloc(3). +Avoid casting pointers from/to int. + +--- teco-orig/te_defs.h ++++ teco/te_defs.h +@@ -6,6 +6,7 @@ + /* version for multiple buffers 04/19/89 11.25 */ + + #include <stdio.h> ++#include <stdlib.h> + #include <ctype.h> + #include <setjmp.h> + +--- teco-orig/te_rdcmd.c ++++ teco/te_rdcmd.c +@@ -94,7 +94,8 @@ + qreg[i].f = cbuf.f; /* put the old command string in its place */ + if (qreg[i].f) qreg[i].f->b = (struct buffcell *) &qreg[i]; + qreg[i].z = cbuf.z; +- cbuf.f = (struct buffcell *) (cbuf.z = 0); /* no old command string */ ++ cbuf.f = NULL; /* no old command string */ ++ cbuf.z = 0; + err = 0; /* no previous error */ + goto restart; + } +--- teco-orig/te_utils.c ++++ teco/te_utils.c +@@ -13,7 +13,6 @@ + + struct buffcell *get_bcell() + { +- char *malloc(); + struct buffcell *p; + int i; + +--- teco-orig/te_window.c ++++ teco/te_window.c +@@ -1051,7 +1051,7 @@ + pp->c = loc % CELLSIZE; + pp->dot = loc; + } +- return( (int) pb0->f); ++ return(pb0->f != NULL); + } + + /* routine to move N lines (back, forward, or 0) */ |