"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "html_tbl.c" between
links-1.03.tar.gz and links-1.04.tar.gz

About: Links is a Lynx-like text WWW browser (table support and pop-up dialog boxes).

html_tbl.c  (links-1.03):html_tbl.c  (links-1.04)
#include "links.h" #include "links.h"
#define format format_
#define AL_TR -1 #define AL_TR -1
#define VAL_TR -1 #define VAL_TR -1
#define VAL_TOP 0 #define VAL_TOP 0
#define VAL_MIDDLE 1 #define VAL_MIDDLE 1
#define VAL_BOTTOM 2 #define VAL_BOTTOM 2
#define W_AUTO -1 #define W_AUTO -1
#define W_REL -2 #define W_REL -2
skipping to change at line 357 skipping to change at line 355
*bad_html = mem_realloc(*bad_html, (*bhp + ALLOC_GR) * si zeof(struct s_e)); *bad_html = mem_realloc(*bad_html, (*bhp + ALLOC_GR) * si zeof(struct s_e));
} }
lbhp = (*bad_html)[(*bhp)++].s = html; lbhp = (*bad_html)[(*bhp)++].s = html;
} }
while (html < eof && *html != '<') html++; while (html < eof && *html != '<') html++;
if (html >= eof) { if (html >= eof) {
if (p) CELL(t, x, y)->end = html; if (p) CELL(t, x, y)->end = html;
if (lbhp) (*bad_html)[*bhp-1].e = html; if (lbhp) (*bad_html)[*bhp-1].e = html;
goto scan_done; goto scan_done;
} }
if (html + 2 <= eof && (html[1] == '!' || html[1] == '?')) { if (eof - html >= 2 && (html[1] == '!' || html[1] == '?')) {
html = skip_comment(html, eof); html = skip_comment(html, eof);
goto se; goto se;
} }
if (parse_element(html, eof, &t_name, &t_namelen, &t_attr, &en)) { if (parse_element(html, eof, &t_name, &t_namelen, &t_attr, &en)) {
html++; html++;
goto se; goto se;
} }
if (t_namelen == 5 && !casecmp(t_name, "TABLE", 5)) { if (t_namelen == 5 && !casecmp(t_name, "TABLE", 5)) {
en = skip_table(en, eof); en = skip_table(en, eof);
goto see; goto see;
skipping to change at line 953 skipping to change at line 951
for (s = 0; s < cell->colspan; s++) { for (s = 0; s < cell->colspan; s++) {
xw += t->w_c[i + s]; xw += t->w_c[i + s];
if (s < cell->colspan - 1) xw += get_vlin e_width(t, i + s + 1) >= 0; if (s < cell->colspan - 1) xw += get_vlin e_width(t, i + s + 1) >= 0;
} }
for (s = 0; s < cell->rowspan; s++) { for (s = 0; s < cell->rowspan; s++) {
yw += t->r_heights[j + s]; yw += t->r_heights[j + s];
if (s < cell->rowspan - 1) yw += get_hlin e_width(t, j + s + 1) >= 0; if (s < cell->rowspan - 1) yw += get_hlin e_width(t, j + s + 1) >= 0;
} }
html_stack_dup(); html_stack_dup();
html_top.dontkill = 1; html_top.dontkill = 1;
if (cell->b) format.attr |= AT_BOLD; if (cell->b) format_.attr |= AT_BOLD;
memcpy(&format.bg, &cell->bgcolor, sizeof(struct memcpy(&format_.bg, &cell->bgcolor, sizeof(struct
rgb)); rgb));
memcpy(&par_format.bgcolor, &cell->bgcolor, sizeo f(struct rgb)); memcpy(&par_format.bgcolor, &cell->bgcolor, sizeo f(struct rgb));
p = format_html_part(cell->start, cell->end, cell ->align, t->cellpd, xw, f, t->p->xp + xp, t->p->yp + yp + (cell->valign != VAL_M IDDLE && cell->valign != VAL_BOTTOM ? 0 : (yw - cell->height) / (cell->valign == VAL_MIDDLE ? 2 : 1)), NULL, cell->link_num); p = format_html_part(cell->start, cell->end, cell ->align, t->cellpd, xw, f, t->p->xp + xp, t->p->yp + yp + (cell->valign != VAL_M IDDLE && cell->valign != VAL_BOTTOM ? 0 : (yw - cell->height) / (cell->valign == VAL_MIDDLE ? 2 : 1)), NULL, cell->link_num);
cell->xpos = xp; cell->xpos = xp;
cell->ypos = yp; cell->ypos = yp;
cell->xw = xw; cell->xw = xw;
cell->yw = yw; cell->yw = yw;
for (yt = 0; yt < p->y; yt++) { for (yt = 0; yt < p->y; yt++) {
xxpand_lines(t->p, yp + yt); xxpand_lines(t->p, yp + yt);
xxpand_line(t->p, yp + yt, xp + t->w_c[i] ); xxpand_line(t->p, yp + yt, xp + t->w_c[i] );
} }
 End of changes. 3 change blocks. 
6 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)