aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/html.cc15
2 files changed, 3 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 07bebd48..4ff4ac02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -112,6 +112,7 @@ dillo-fltk2
- Made TopGroup a PackedGroup, simplifying UI code and removing workarounds.
- Added a redraw(DAMAGE_HIGHLIGHT) call to Back, Forw and Stop buttons.
- Fixed a segfault bug when closing a bw under active networking.
+ - Removed the unused SPCBuf variable.
Patches: Johannes Hofmann
+- Made progress bars resize automatically.
Patches: Johannes Hofmann, Jorge Arellano Cid
diff --git a/src/html.cc b/src/html.cc
index 46d3e3bd..6564a5f9 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -296,8 +296,6 @@ public: //BUG: for now everything is public
Dstr *Stash;
bool_t StashSpace;
- char *SPCBuf; /* Buffer for white space */
-
int pre_column; /* current column, used in PRE tags with tabs */
bool_t PreFirstChar; /* used to skip the first CR or CRLF in PRE tags */
bool_t PrevWasCR; /* Flag to help parsing of "\r\n" in PRE tags */
@@ -836,8 +834,6 @@ DilloHtml::DilloHtml(BrowserWindow *p_bw, const DilloUrl *url,
Stash = dStr_new("");
StashSpace = FALSE;
- SPCBuf = NULL;
-
pre_column = 0;
PreFirstChar = FALSE;
PrevWasCR = FALSE;
@@ -1024,7 +1020,6 @@ void DilloHtml::closeParser(int ClientKey)
delete (stack);
dStr_free(Stash, TRUE);
- dFree(SPCBuf);
dStr_free(attr_data, TRUE);
/* Fit the UTF-8 buffer */
@@ -1443,9 +1438,7 @@ static void Html_process_space(DilloHtml *html, const char *space,
html->SPCPending = FALSE;
} else if (parse_mode == DILLO_HTML_PARSE_MODE_VERBATIM) {
- char *Pword = dStrndup(space, spacesize);
- dStr_append(html->Stash, Pword);
- dFree(Pword);
+ dStr_append_l(html->Stash, space, spacesize);
html->SPCPending = FALSE;
} else if (parse_mode == DILLO_HTML_PARSE_MODE_PRE) {
@@ -1488,8 +1481,6 @@ static void Html_process_space(DilloHtml *html, const char *space,
/* SGML_SPCDEL ignores white space inmediately after an open tag */
html->SPCPending = FALSE;
} else {
- dFree(html->SPCBuf);
- html->SPCBuf = dStrndup(space, spacesize);
html->SPCPending = TRUE;
}
@@ -1523,9 +1514,7 @@ static void Html_process_word(DilloHtml *html, const char *word, int size)
} else if (parse_mode == DILLO_HTML_PARSE_MODE_VERBATIM) {
/* word goes in untouched, it is not processed here. */
- Pword = dStrndup(word, size);
- dStr_append(html->Stash, Pword);
- dFree(Pword);
+ dStr_append_l(html->Stash, word, size);
}
if (parse_mode == DILLO_HTML_PARSE_MODE_STASH ||