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-office/sc/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-office/sc/files')
-rw-r--r-- | app-office/sc/files/sc-7.16-amd64.patch | 23 | ||||
-rw-r--r-- | app-office/sc/files/sc-7.16-c.patch | 147 | ||||
-rw-r--r-- | app-office/sc/files/sc-7.16-lex-syntax.patch | 11 | ||||
-rw-r--r-- | app-office/sc/files/sc-7.16-printf.patch | 102 |
4 files changed, 283 insertions, 0 deletions
diff --git a/app-office/sc/files/sc-7.16-amd64.patch b/app-office/sc/files/sc-7.16-amd64.patch new file mode 100644 index 000000000000..e381609011bb --- /dev/null +++ b/app-office/sc/files/sc-7.16-amd64.patch @@ -0,0 +1,23 @@ +--- a/xmalloc.c ++++ b/xmalloc.c +@@ -3,19 +3,12 @@ + * $Revision: 7.16 $ + */ + ++#include <stdlib.h> + #include <curses.h> + #include "sc.h" + +-extern char *malloc(); +-extern char *realloc(); +-extern void free(); + void fatal(); + +-#ifdef SYSV3 +-extern void free(); +-extern void exit(); +-#endif +- + #define MAGIC (double)1234567890.12344 + + char * diff --git a/app-office/sc/files/sc-7.16-c.patch b/app-office/sc/files/sc-7.16-c.patch new file mode 100644 index 000000000000..fd4f06f9f8c8 --- /dev/null +++ b/app-office/sc/files/sc-7.16-c.patch @@ -0,0 +1,147 @@ +--- a/abbrev.c ++++ b/abbrev.c +@@ -122,7 +122,7 @@ + del_abbr(char *abbrev) + { + struct abbrev *a; +- struct abbrev **prev; ++ struct abbrev **prev = NULL; + + if (!(a = find_abbr(abbrev, strlen(abbrev), prev))) + return; +--- a/help.c ++++ b/help.c +@@ -14,6 +14,10 @@ + #include "sc.h" + #endif /* QREF */ + ++#ifdef TROFF ++#include <stdlib.h> ++#endif /* TROFF */ ++ + char *intro[] = { + " ", + #if defined(QREF) && defined(TROFF) +--- a/lex.c ++++ b/lex.c +@@ -27,6 +27,8 @@ + + #ifdef IEEE_MATH + #include <ieeefp.h> ++#else ++#include <math.h> + #endif /* IEEE_MATH */ + + #include <stdlib.h> +--- a/sc.h ++++ b/sc.h +@@ -14,6 +14,9 @@ + #include <stdio.h> + #endif + ++#include <unistd.h> ++#include <curses.h> ++ + #define ATBL(tbl, row, col) (*(tbl + row) + (col)) + + #define MINROWS 100 /* minimum size at startup */ +@@ -390,6 +393,7 @@ + extern char *v_name(int row, int col); + extern double eval(register struct enode *e); + extern int any_locked_cells(int r1, int c1, int r2, int c2); ++extern int are_abbrevs(); + extern int are_colors(); + extern int are_frames(); + extern int are_ranges(); +@@ -425,6 +429,7 @@ + extern struct crange *find_crange(int row, int col); + extern struct frange *find_frange(int row, int col); + extern void EvalAll(); ++extern void add_abbr(char *string); + extern void add_crange(struct ent *r_left, struct ent *r_right, int pair); + extern void add_frange(struct ent *or_left, struct ent *or_right, + struct ent *ir_left, struct ent *ir_right, int toprows, int bottomrows, +@@ -434,6 +439,7 @@ + extern void addplugin(char *ext, char *plugin, char type); + extern void backcol(int arg); + extern void backrow(int arg); ++extern void center(int sr, int sc, int er, int ec); + extern void change_color(int pair, struct enode *e); + extern void checkbounds(int *rowp, int *colp); + extern void clearent(struct ent *v); +@@ -456,9 +462,12 @@ + extern void diesave(); + extern void doend(int rowinc, int colinc); + extern void doformat(int c1, int c2, int w, int p, int r); ++extern void dogetkey(); + extern void dupcol(); + extern void duprow(); + extern void doquery(char *s, char *data, int fd); ++extern void doeval(struct enode *e, char *fmt, int row, int col, int fd); ++extern void doseval(struct enode *e, int row, int col, int fd); + extern void dostat(int fd); + extern void dotick(int tick); + extern void editexp(int row, int col); +@@ -486,11 +495,14 @@ + extern void free_ent(register struct ent *p, int unlock); + extern void getexp(int r0, int c0, int rn, int cn, int fd); + extern void getfmt(int r0, int c0, int rn, int cn, int fd); ++extern void getframe(int fd); + extern void getformat(int col, int fd); + extern void getnum(int r0, int c0, int rn, int cn, int fd); ++extern void getrange(char *name, int fd); + extern void getstring(int r0, int c0, int rn, int cn, int fd); + extern void go_last(); + extern void goraw(); ++extern void gotonote(); + extern void help(); + extern void hide_col(int arg); + extern void hide_row(int arg); +@@ -507,6 +519,8 @@ + extern void label(register struct ent *v, register char *s, int flushdir); + extern void let(struct ent *v, struct enode *e); + extern void list_colors(FILE *f); ++extern void ljustify(int sr, int sc, int er, int ec); ++extern void list_frames(FILE *f); + extern void list_ranges(FILE *f); + extern void lock_cells(struct ent *v1, struct ent *v2); + extern void markcell(); +@@ -523,6 +537,7 @@ + extern void read_hist(); + extern void remember(int save); + extern void resetkbd(); ++extern void rjustify(int sr, int sc, int er, int ec); + extern void rowshow_op(); + extern void scxfree(char *p); + extern void setauto(int i); +@@ -560,6 +575,9 @@ + extern void write_line(int c); + extern void write_ranges(FILE *f); + extern void yank_area(int sr, int sc, int er, int ec); ++extern void yankcol(int arg); ++extern void yankr(struct ent *v1, struct ent *v2); ++extern void yankrow(int arg); + extern void yyerror(char *err); + extern int yylex(); + extern int yyparse(); +--- a/screen.c ++++ b/screen.c +@@ -870,7 +870,7 @@ + } + } /* else */ + } else +- if (!*pp && color && has_colors && cr && cr->r_color != 1) { ++ if (!*pp && color && has_colors() && cr && cr->r_color != 1) { + move(r, c); + color_set(cr->r_color, NULL); + printw("%*s", fwidth[col], " "); +--- a/vi.c ++++ b/vi.c +@@ -5,6 +5,7 @@ + */ + + #include <sys/types.h> ++#include <sys/wait.h> + #ifdef BSD42 + #include <strings.h> + #else diff --git a/app-office/sc/files/sc-7.16-lex-syntax.patch b/app-office/sc/files/sc-7.16-lex-syntax.patch new file mode 100644 index 000000000000..9dcb46f25f83 --- /dev/null +++ b/app-office/sc/files/sc-7.16-lex-syntax.patch @@ -0,0 +1,11 @@ +--- a/lex.c ++++ b/lex.c +@@ -107,7 +107,7 @@ + yylex() + { + char *p = line + linelim; +- int ret; ++ int ret = 0; + static int isfunc = 0; + static bool isgoto = 0; + static bool colstate = 0; diff --git a/app-office/sc/files/sc-7.16-printf.patch b/app-office/sc/files/sc-7.16-printf.patch new file mode 100644 index 000000000000..9425105262b0 --- /dev/null +++ b/app-office/sc/files/sc-7.16-printf.patch @@ -0,0 +1,102 @@ +--- a/sc.c ++++ b/sc.c +@@ -520,7 +520,7 @@ + break; + } + } +- if (redraw) printf(redraw); ++ if (redraw) printf("%s", redraw); + exit (0); + } + +--- a/gram.y ++++ b/gram.y +@@ -1010,7 +1010,7 @@ + | S_PLUGOUT STRING '=' STRING + { addplugin($2, $4, 'w'); } + | PLUGIN { *line = '|'; +- sprintf(line + 1, $1); ++ sprintf(line + 1, "%s", $1); + readfile(line, 0); + scxfree($1); } + | /* nothing */ +--- a/vmtbl.c ++++ b/vmtbl.c +@@ -61,10 +61,10 @@ + oldptr = newptr /* wait incase we can't alloc */ + + #ifndef PSC +-static char nolonger[] = "The table can't be any longer"; ++#define NOLONGER "The table can't be any longer" + #endif /* !PSC */ + +-static char nowider[] = "The table can't be any wider"; ++#define NOWIDER "The table can't be any wider" + + /* + * grow the main && auxiliary tables (reset maxrows/maxcols as needed) +@@ -117,7 +117,7 @@ + if ((rowcol == GROWCOL) || (rowcol == GROWBOTH)) { + if ((rowcol == GROWCOL) && ((maxcols == ABSMAXCOLS) || + (topcol >= ABSMAXCOLS))) { +- error(nowider); ++ error(NOWIDER); + return (FALSE); + } + +@@ -135,14 +135,14 @@ + struct ent *** lnullit; + int lcnt; + +- GROWALLOC(row_hidden2, row_hidden, newrows, char, nolonger); ++ GROWALLOC(row_hidden2, row_hidden, newrows, char, NOLONGER); + memset(row_hidden+maxrows, 0, (newrows-maxrows)*sizeof(char)); + + /* + * alloc tbl row pointers, per net.lang.c, calloc does not + * necessarily fill in NULL pointers + */ +- GROWALLOC(tbl2, tbl, newrows, struct ent **, nolonger); ++ GROWALLOC(tbl2, tbl, newrows, struct ent **, NOLONGER); + for (lnullit = tbl+maxrows, lcnt = 0; lcnt < newrows-maxrows; + lcnt++, lnullit++) + *lnullit = (struct ent **)NULL; +@@ -151,16 +151,16 @@ + #endif /* !PSC */ + + if ((rowcol == GROWCOL) || (rowcol == GROWBOTH) || (rowcol == GROWNEW)) { +- GROWALLOC(fwidth2, fwidth, newcols, int, nowider); +- GROWALLOC(precision2, precision, newcols, int, nowider); +- GROWALLOC(realfmt2, realfmt, newcols, int, nowider); ++ GROWALLOC(fwidth2, fwidth, newcols, int, NOWIDER); ++ GROWALLOC(precision2, precision, newcols, int, NOWIDER); ++ GROWALLOC(realfmt2, realfmt, newcols, int, NOWIDER); + #ifdef PSC + memset(fwidth+maxcols, 0, (newcols-maxcols)*sizeof(int)); + memset(precision+maxcols, 0, (newcols-maxcols)*sizeof(int)); + memset(realfmt+maxcols, 0, (newcols-maxcols)*sizeof(int)); + } + #else +- GROWALLOC(col_hidden2, col_hidden, newcols, char, nowider); ++ GROWALLOC(col_hidden2, col_hidden, newcols, char, NOWIDER); + memset(col_hidden+maxcols, 0, (newcols-maxcols)*sizeof(char)); + for (i = maxcols; i < newcols; i++) { + fwidth[i] = DEFWIDTH; +@@ -172,7 +172,7 @@ + for (i = 0; i < maxrows; i++) { + if ((tbl[i] = (struct ent **)scxrealloc((char *)tbl[i], + (unsigned)(newcols * sizeof(struct ent **)))) == (struct ent **)0) { +- error(nowider); ++ error(NOWIDER); + return(FALSE); + } + for (nullit = ATBL(tbl, i, maxcols), cnt = 0; +@@ -190,7 +190,7 @@ + for (; i < newrows; i++) { + if ((tbl[i] = (struct ent **)scxmalloc((unsigned)(newcols * + sizeof(struct ent **)))) == (struct ent **)0) { +- error(nowider); ++ error(NOWIDER); + return(FALSE); + } + for (nullit = tbl[i], cnt = 0; cnt < newcols; cnt++, nullit++) |