OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   18-Feb-2003 12:24:51
  Branch: OPENPKG_1_1_SOLID                Handle: 2003021811245100

  Added files:              (Branch: OPENPKG_1_1_SOLID)
    openpkg-src/w3m         w3m.patch
  Modified files:           (Branch: OPENPKG_1_1_SOLID)
    openpkg-src/w3m         w3m.spec

  Log:
    SA-2003.009-w3m; CAN-2002-1335, CAN-2002-1348

  Summary:
    Revision    Changes     Path
    1.1.2.1     +247 -0     openpkg-src/w3m/w3m.patch
    1.27.2.2    +3  -1      openpkg-src/w3m/w3m.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/w3m/w3m.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1.2.1 w3m.patch
  --- /dev/null 2003-02-18 12:24:51.000000000 +0100
  +++ w3m.patch 2003-02-18 12:24:51.000000000 +0100
  @@ -0,0 +1,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, "<!-- %s -->", tok->ptr);
  ++                        fprintf(f1, "<!-- %s -->", html_quote(tok->ptr));
  +                         goto token_end;
  +                     case HTML_TABLE:
  +                         t_stack++;
  +@@ -633,7 +634,7 @@
  +                             Strshrink(tok, 1);
  +                             fprintf(f1,
  +                                     "<!-- table stack underflow: %s -->",
  +-                                    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, "<!-- %s -->", tok->ptr);
  ++                            fprintf(f1, "<!-- %s -->",
  ++                                    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];
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/w3m/w3m.spec
  ============================================================================
  $ cvs diff -u -r1.27.2.1 -r1.27.2.2 w3m.spec
  --- openpkg-src/w3m/w3m.spec  26 Aug 2002 19:55:30 -0000      1.27.2.1
  +++ openpkg-src/w3m/w3m.spec  18 Feb 2003 11:24:51 -0000      1.27.2.2
  @@ -33,10 +33,11 @@
   Group:        Web
   License:      BSD
   Version:      0.3.1
  -Release:      1.1.0
  +Release:      1.1.1
   
   #   list of sources
   Source0:      http://belnet.dl.sourceforge.net/sourceforge/w3m/w3m-%{version}.tar.gz
  +Patch0:       w3m.patch
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -55,6 +56,7 @@
   
   %prep
       %setup -q
  +    %patch
   
   %build
       ( echo "# Configuration at `hostname`"
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to