head 1.7; access; symbols OPENPKG_E1_MP_HEAD:1.4 OPENPKG_E1_MP:1.4 OPENPKG_E1_MP_2_STABLE:1.4 OPENPKG_E1_FP:1.4 OPENPKG_2_STABLE_MP:1.4 OPENPKG_2_STABLE_20061018:1.4 OPENPKG_2_STABLE_20060622:1.4 OPENPKG_2_STABLE:1.4.0.2 OPENPKG_2_STABLE_BP:1.4 OPENPKG_2_5_SOLID:1.3.0.10 OPENPKG_2_5_SOLID_BP:1.3 OPENPKG_2_4_RELEASE:1.3 OPENPKG_2_4_SOLID:1.3.0.8 OPENPKG_2_4_SOLID_BP:1.3 OPENPKG_2_3_RELEASE:1.3 OPENPKG_2_3_SOLID:1.3.0.6 OPENPKG_2_3_SOLID_BP:1.3 OPENPKG_2_2_RELEASE:1.3 OPENPKG_2_2_SOLID:1.3.0.4 OPENPKG_2_2_SOLID_BP:1.3 OPENPKG_2_1_RELEASE:1.3 OPENPKG_2_1_SOLID:1.3.0.2 OPENPKG_2_1_SOLID_BP:1.3 OPENPKG_2_0_RELEASE:1.1 OPENPKG_2_0_SOLID:1.1.0.4 OPENPKG_2_0_SOLID_BP:1.1 OPENPKG_1_1_SOLID:1.1.0.2; locks; strict; comment @# @; 1.7 date 2009.12.25.09.29.16; author rse; state Exp; branches; next 1.6; commitid B09Mwx7xwjvXKJgu; 1.6 date 2007.06.03.08.17.08; author rse; state Exp; branches; next 1.5; commitid KAM3aa9rjNfArrks; 1.5 date 2007.04.13.19.24.19; author rse; state Exp; branches; next 1.4; commitid giZ53Lq2qoL6MWds; 1.4 date 2006.02.19.08.21.53; author rse; state Exp; branches; next 1.3; commitid LXyEfqIxmgCSxamr; 1.3 date 2004.04.29.07.26.41; author rse; state dead; branches; next 1.2; 1.2 date 2004.03.24.10.48.16; author tho; state Exp; branches; next 1.1; 1.1 date 2003.02.18.11.24.51; author thl; state dead; branches 1.1.2.1; next ; 1.1.2.1 date 2003.02.18.11.24.51; author thl; state Exp; branches; next ; desc @@ 1.7 log @fix building against GC 7.2.x @ text @Index: Makefile.in --- Makefile.in.orig 2007-05-29 14:01:04 +0200 +++ Makefile.in 2009-12-24 22:39:59 +0100 @@@@ -119,7 +119,7 @@@@ DEFUNS=$(top_srcdir)/main.c $(top_srcdir)/menu.c SCRIPTSUBDIRS= scripts -SUBDIRS = $(SCRIPTSUBDIRS) w3mimg libwc po +SUBDIRS = $(SCRIPTSUBDIRS) w3mimg libwc .PHONY: $(SUBDIRS) all: $(TARGETS) all-scripts $(NLSTARGET) @@@@ -134,7 +134,7 @@@@ $(OBJS) $(LOBJS): fm.h funcname1.h tagtable.c: tagtable.tab mktable$(EXT) html.h - ./mktable$(EXT) 100 $(srcdir)/tagtable.tab > $@@ + -./mktable$(EXT) 100 $(srcdir)/tagtable.tab > $@@ indep.o: indep.c fm.h funcname1.h func.o: funcname.c functable.c funcname1.h @@@@ -167,7 +167,7 @@@@ functable.c: funcname.tab mktable$(EXT) sort funcname.tab | $(AWK) -f $(top_srcdir)/functable.awk > functable.tab - ./mktable$(EXT) 100 functable.tab > $@@ + -./mktable$(EXT) 100 functable.tab > $@@ -rm -f functable.tab mktable$(EXT): mktable.o dummy.o $(ALIB) Index: main.c --- main.c.orig 2007-05-31 03:19:50 +0200 +++ main.c 2009-12-25 10:21:26 +0100 @@@@ -842,7 +842,8 @@@@ mySignal(SIGPIPE, SigPipe); #endif - orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); + orig_GC_warn_proc = GC_get_warn_proc(); + GC_set_warn_proc(wrap_GC_warn_proc); err_msg = Strnew(); if (load_argc == 0) { /* no URL specified */ @ 1.6 log @upgrading package: w3m 0.5.1 -> 0.5.2 @ text @d3 1 a3 1 +++ Makefile.in 2007-06-02 13:11:37 +0200 d31 13 @ 1.5 log @MFE: Security Fix (OpenPKG-SA-2006.044, OpenPKG-TT-E1#31) @ text @d2 3 a4 3 --- Makefile.in.orig 2004-04-26 19:04:48 +0200 +++ Makefile.in 2006-02-19 09:17:44 +0100 @@@@ -117,7 +117,7 @@@@ d13 18 a30 30 Index: file.c --- file.c.orig 2004-04-16 20:47:19 +0200 +++ file.c 2006-02-19 09:16:54 +0100 @@@@ -7891,7 +7892,7 @@@@ uf->scheme = SCM_LOCAL; } UFhalfclose(uf); - uf->stream = newFileStream(f1, (void (*)())pclose); + uf->stream = newFileStream(f1, (void (*)())fclose); } static FILE * ----------------------------------------------------------------------------- Security Fix (OpenPKG-SA-2006.044, OpenPKG-TT-E1#31) Index: file.c --- file.c 10 Dec 2006 11:06:12 -0000 1.249 +++ file.c 27 Dec 2006 02:15:24 -0000 1.250 @@@@ -8021,7 +8021,7 @@@@ ans = inputChar(prompt); } else { - printf(prompt); + printf("%s", prompt); fflush(stdout); ans = Strfgets(stdin)->ptr; } @ 1.4 log @apply a patch from the FreeBSD ports which closes the pipe for gzipped stream properly; move substitution into patch file, too @ text @d25 18 @ 1.3 log @upgrading package: w3m 0.5 -> 0.5.1 @ text @d1 4 a4 5 --- Makefile.in.orig 2004-03-24 11:29:09.000000000 +0100 +++ Makefile.in 2004-03-24 11:30:52.000000000 +0100 @@@@ -35,7 +35,7 @@@@ ETC_DIR = $(sysconfdir) CONF_DIR = $(sysconfdir)/$(PACKAGE) d6 19 a24 5 -CFLAGS = $(OPTS) @@CFLAGS@@ $(DEFS) +CFLAGS = $(OPTS) @@CFLAGS@@ -I$(includedir) $(DEFS) WCCFLAGS = @@WCCFLAGS@@ CPPFLAGS = @@CPPFLAGS@@ DEFS = @@DEFS@@ -I. -I$(top_srcdir) -DAUXBIN_DIR=\"$(AUXBIN_DIR)\" \ @ 1.2 log @Fixed -I /OpkgRoot/include for libwc @ text @@ 1.1 log @file w3m.patch was initially added on branch OPENPKG_1_1_SOLID. @ text @d1 11 @ 1.1.2.1 log @SA-2003.009-w3m; CAN-2002-1335, CAN-2002-1348 @ text @a0 247 --- file.c.orig Mon Jun 24 15:32:11 2002 +++ file.c Mon Feb 17 16:46:47 2003 @@@@ -3046,11 +3046,11 @@@@ Strcat_charp(tmp, html_quote(Strnew_charp_n(q, nw)->ptr)); } else - Strcat_charp(tmp, q); + Strcat_charp(tmp, html_quote(q)); } else #endif - Strcat_charp(tmp, q); + Strcat_charp(tmp, html_quote(q)); goto img_end; } if (w > 0 && i > 0) { @@@@ -6178,7 +6178,7 @@@@ HTMLlineproc0(lineBuf2->ptr, &htmlenv1, internal); } if (obuf.status != R_ST_NORMAL) - HTMLlineproc1(correct_irrtag(obuf.status)->ptr, &htmlenv1); + HTMLlineproc0(correct_irrtag(obuf.status)->ptr, &htmlenv1, internal); obuf.status = R_ST_NORMAL; completeHTMLstream(&htmlenv1, &obuf); flushline(&htmlenv1, &obuf, 0, 2, htmlenv1.limit); --- frame.c.orig Mon Jun 17 17:50:45 2002 +++ frame.c Mon Feb 17 16:46:47 2003 @@@@ -519,14 +519,15 @@@@ frame.body->attr = F_UNLOADED; if (frame.body->flags & FB_NO_BUFFER) fprintf(f1, "Open %s with other method", - frame.body->url); + html_quote(frame.body->url)); else if (frame.body->url) - fprintf(f1, "Can't open %s", frame.body->url); + fprintf(f1, "Can't open %s", + html_quote(frame.body->url)); else fprintf(f1, "This frame (%s) contains no src attribute", - frame.body->name ? frame.body-> - name : "(no name)"); + frame.body->name ? html_quote(frame.body->name) + : "(no name)"); break; } parseURL2(frame.body->url, &base, currentURL); @@@@ -620,7 +621,7 @@@@ /* prohibit_tags */ Strshrinkfirst(tok, 1); Strshrink(tok, 1); - fprintf(f1, "", tok->ptr); + fprintf(f1, "", html_quote(tok->ptr)); goto token_end; case HTML_TABLE: t_stack++; @@@@ -633,7 +634,7 @@@@ Strshrink(tok, 1); fprintf(f1, "", - tok->ptr); + html_quote(tok->ptr)); goto token_end; } break; @@@@ -653,7 +654,8 @@@@ if (!t_stack) { Strshrinkfirst(tok, 1); Strshrink(tok, 1); - fprintf(f1, "", tok->ptr); + fprintf(f1, "", + html_quote(tok->ptr)); goto token_end; } --- table.c.orig Wed Apr 17 04:42:27 2002 +++ table.c Mon Feb 17 16:46:47 2003 @@@@ -155,7 +155,7 @@@@ static int bsearch_2short(short e1, short *ent1, short e2, short *ent2, int base, - char *indexarray, int nent) + short *indexarray, int nent) { int n = nent; int k = 0; @@@@ -181,7 +181,7 @@@@ } static int -bsearch_double(double e, double *ent, char *indexarray, int nent) +bsearch_double(double e, double *ent, short *indexarray, int nent) { int n = nent; int k = 0; @@@@ -234,11 +234,11 @@@@ dv2sv(double *dv, short *iv, int size) { int i, k, iw; - char *indexarray; + short *indexarray; double *edv; double w = 0., x; - indexarray = NewAtom_N(char, size); + indexarray = NewAtom_N(short, size); edv = NewAtom_N(double, size); for (i = 0; i < size; i++) { iv[i] = ceil(dv[i]); @@@@ -250,8 +250,11 @@@@ x = edv[k]; w += x; i = bsearch_double(x, edv, indexarray, k); - if (k > i) - bcopy(indexarray + i, indexarray + i + 1, k - i); + if (k > i) { + int ii; + for (ii = i; ii < k; ii++) + indexarray[ii + 1] = indexarray[ii]; + } indexarray[i] = k; } iw = min((int)(w + 0.5), size); @@@@ -854,7 +857,7 @@@@ static void check_cell_width(short *tabwidth, short *cellwidth, short *col, short *colspan, short maxcell, - char *indexarray, int space, int dir) + short *indexarray, int space, int dir) { int i, j, k, bcol, ecol; int swidth, width; @@@@ -934,13 +937,14 @@@@ set_integered_width(struct table *t, double *dwidth, short *iwidth) { int i, j, k, n, bcol, ecol, step; - char *indexarray, *fixed; + short *indexarray; + char *fixed; double *mod; double sum = 0., x = 0.; struct table_cell *cell = &t->cell; int rulewidth = table_rule_width(t); - indexarray = NewAtom_N(char, t->maxcol + 1); + indexarray = NewAtom_N(short, t->maxcol + 1); mod = NewAtom_N(double, t->maxcol + 1); for (i = 0; i <= t->maxcol; i++) { iwidth[i] = ceil_at_intervals(ceil(dwidth[i]), rulewidth); @@@@ -952,8 +956,11 @@@@ x = mod[k]; sum += x; i = bsearch_double(x, mod, indexarray, k); - if (k > i) - bcopy(indexarray + i, indexarray + i + 1, k - i); + if (k > i) { + int ii; + for (ii = i; ii < k; ii++) + indexarray[ii + 1] = indexarray[ii]; + } indexarray[i] = k; } @@@@ -1477,7 +1484,7 @@@@ struct { short *row; short *rowspan; - char *indexarray; + short *indexarray; short maxcell; short size; short *height; @@@@ -1511,12 +1518,14 @@@@ if (cell.row[idx] == j && cell.rowspan[idx] == rowspan) c = idx; } + if (c >= MAXROWCELL) + continue; if (c >= cell.size) { if (cell.size == 0) { cell.size = max(MAXCELL, c + 1); cell.row = NewAtom_N(short, cell.size); cell.rowspan = NewAtom_N(short, cell.size); - cell.indexarray = NewAtom_N(char, cell.size); + cell.indexarray = NewAtom_N(short, cell.size); cell.height = NewAtom_N(short, cell.size); } else { @@@@ -1524,7 +1533,7 @@@@ cell.row = New_Reuse(short, cell.row, cell.size); cell.rowspan = New_Reuse(short, cell.rowspan, cell.size); - cell.indexarray = New_Reuse(char, cell.indexarray, + cell.indexarray = New_Reuse(short, cell.indexarray, cell.size); cell.height = New_Reuse(short, cell.height, cell.size); } @@@@ -1534,9 +1543,11 @@@@ cell.row[cell.maxcell] = j; cell.rowspan[cell.maxcell] = rowspan; cell.height[cell.maxcell] = 0; - if (cell.maxcell > k) - bcopy(cell.indexarray + k, cell.indexarray + k + 1, - cell.maxcell - k); + if (cell.maxcell > k) { + int ii; + for (ii = k; ii < cell.maxcell; ii++) + cell.indexarray[ii + 1] = cell.indexarray[ii]; + } cell.indexarray[k] = cell.maxcell; } @@@@ -2649,9 +2660,11 @@@@ cell->width[cell->maxcell] = 0; cell->minimum_width[cell->maxcell] = 0; cell->fixed_width[cell->maxcell] = 0; - if (cell->maxcell > k) - bcopy(cell->index + k, cell->index + k + 1, - cell->maxcell - k); + if (cell->maxcell > k) { + int ii; + for (ii = k; ii < cell->maxcell; ii++) + cell->index[ii + 1] = cell->index[ii]; + } cell->index[k] = cell->maxcell; } if (cell->icell > cell->maxcell) --- table.h.orig Fri Nov 30 11:10:24 2001 +++ table.h Mon Feb 17 16:46:47 2003 @@@@ -34,14 +34,15 @@@@ #define TBL_IN_COL 4 #define MAXCELL 20 +#define MAXROWCELL 1000 struct table_cell { short col[MAXCELL]; short colspan[MAXCELL]; - char index[MAXCELL]; + short index[MAXCELL]; short maxcell; short icell; #ifdef MATRIX - char eindex[MAXCELL]; + short eindex[MAXCELL]; short necell; #endif /* MATRIX */ short width[MAXCELL]; @