diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | dpi/downloads.cc | 2 | ||||
-rw-r--r-- | dw/findtext.hh | 2 | ||||
-rw-r--r-- | dw/style.hh | 4 | ||||
-rw-r--r-- | lout/object.cc | 4 | ||||
-rw-r--r-- | src/dialog.cc | 2 | ||||
-rw-r--r-- | src/html.cc | 18 | ||||
-rw-r--r-- | src/uicmd.cc | 3 | ||||
-rw-r--r-- | src/url.h | 12 |
9 files changed, 26 insertions, 23 deletions
@@ -20,6 +20,8 @@ dillo-2.1 +- Allowed compilation with older machines by removing a few C99isms. - Added use of inttypes.h when stdint.h isn't found. Patches: Dan Fandrich ++- Reduced warnings with gcc-4.3. + Patch: Thomas Orgis +- Added the "middle_click_drags_page" dillorc option. Patch: Jorge Arellano, Thomas Orgis +- Set the File menu label to hide when the File menu-button is shown. diff --git a/dpi/downloads.cc b/dpi/downloads.cc index d2f3a54b..9252d4cf 100644 --- a/dpi/downloads.cc +++ b/dpi/downloads.cc @@ -513,7 +513,7 @@ void DLItem::log_text_add(const char *buf, ssize_t st) if (isdigit(*q++ = *p)) { // keep here } else if (*p == 'K') { - for(--q; isdigit(q[-1]); --q); log_state = ST_discard; + for(--q; isdigit(q[-1]); --q) ; log_state = ST_discard; } else { log_state = ST_copy; } diff --git a/dw/findtext.hh b/dw/findtext.hh index d0c20206..e9fb57c2 100644 --- a/dw/findtext.hh +++ b/dw/findtext.hh @@ -65,7 +65,7 @@ private: inline static bool charsEqual (char c1, char c2, bool caseSens) { return caseSens ? c1 == c2 : tolower (c1) == tolower (c2) || - isspace (c1) && isspace (c2); } + (isspace (c1) && isspace (c2)); } public: FindtextState (); diff --git a/dw/style.hh b/dw/style.hh index 492efd30..0dd7fbd4 100644 --- a/dw/style.hh +++ b/dw/style.hh @@ -346,11 +346,11 @@ inline Length createAbsLength(int n) { return (n << 2) | 1; } /** \brief Returns a percentage, \em v is relative to 1, not to 100. */ inline Length createPerLength(double v) { - return (int)(v * (1 << 18)) & ~3 | 2; } + return ((int)(v * (1 << 18)) & ~3) | 2; } /** \brief Returns a relative length. */ inline Length createRelLength(double v) { - return (int)(v * (1 << 18)) & ~3 | 3; } + return ((int)(v * (1 << 18)) & ~3) | 3; } /** \brief Returns true if \em l is an absolute length. */ inline bool isAbsLength(Length l) { return (l & 3) == 1; } diff --git a/lout/object.cc b/lout/object.cc index 7da124fa..9e36e20c 100644 --- a/lout/object.cc +++ b/lout/object.cc @@ -251,7 +251,7 @@ bool PairBase::equals(Object *other) return // Identical? - this == other || + this == other || ( (// Both first parts are NULL, ... (first == NULL && otherPair->first == NULL) || // ... or both first parts are not NULL and equal @@ -260,7 +260,7 @@ bool PairBase::equals(Object *other) // Same with second part. ((second == NULL && otherPair->second == NULL) || (second != NULL && otherPair->second != NULL - && second->equals (otherPair->second))); + && second->equals (otherPair->second)))); } int PairBase::hashValue() diff --git a/src/dialog.cc b/src/dialog.cc index 69781f32..8408782f 100644 --- a/src/dialog.cc +++ b/src/dialog.cc @@ -193,7 +193,7 @@ int a_Dialog_choice5(const char *QuestionTxt, txt[0] = txt[6] = NULL; txt[1] = alt1; txt[2] = alt2; txt[3] = alt3; txt[4] = alt4; txt[5] = alt5; - for (int i=1; txt[i]; ++i, ++nb); + for (int i=1; txt[i]; ++i, ++nb) ; Window *window = new Window(ww,wh,"Choice5"); window->begin(); diff --git a/src/html.cc b/src/html.cc index 248091aa..88607395 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1007,7 +1007,7 @@ static int Html_parse_entity(DilloHtml *html, const char *token, } else if (isalpha(*s)) { /* character entity reference */ - while (*++s && (isalnum(*s) || strchr(":_.-", *s))); + while (*++s && (isalnum(*s) || strchr(":_.-", *s))) ; c = *s; *s = 0; @@ -1187,10 +1187,10 @@ static void Html_process_word(DilloHtml *html, const char *word, int size) Pword = a_Html_parse_entities(html, word, size); for (start = i = 0; Pword[i]; start = i) if (isspace(Pword[i])) { - while (Pword[++i] && isspace(Pword[i])); + while (Pword[++i] && isspace(Pword[i])) ; Html_process_space(html, Pword + start, i - start); } else { - while (Pword[++i] && !isspace(Pword[i])); + while (Pword[++i] && !isspace(Pword[i])) ; ch = Pword[i]; Pword[i] = 0; DW2TB(html->dw)->addText(Pword, S_TOP(html)->style); @@ -1209,7 +1209,7 @@ static void Html_process_word(DilloHtml *html, const char *word, int size) Pword = a_Html_parse_entities(html, word, size); for (i = 0; Pword[i]; ++i) if (strchr("\t\f\n\r", Pword[i])) - for (j = i; (Pword[j] = Pword[j+1]); ++j); + for (j = i; (Pword[j] = Pword[j+1]); ++j) ; DW2TB(html->dw)->addText(Pword, S_TOP(html)->style); dFree(Pword); @@ -1331,8 +1331,8 @@ static void Html_tag_cleanup_at_close(DilloHtml *html, int TagIdx) (cmp = (new_idx != html->stack->getRef(stack_idx)->tag_idx)) && ((w3c_mode && Tags[html->stack->getRef(stack_idx)->tag_idx].EndTag == 'O') || - (!w3c_mode && - (Tags[html->stack->getRef(stack_idx)->tag_idx].EndTag == 'O') || + ((!w3c_mode && + (Tags[html->stack->getRef(stack_idx)->tag_idx].EndTag == 'O')) || Tags[html->stack->getRef(stack_idx)->tag_idx].TagLevel < Tags[new_idx].TagLevel))) { --stack_idx; @@ -1516,7 +1516,7 @@ static void Html_parse_doctype(DilloHtml *html, const char *tag, int tagsize) * and replace '\n' and '\r' with ' ' inside quoted strings. */ for (i = 0, p = ntag; *p; ++p) { if (isspace(*p)) { - for (ntag[i++] = ' '; isspace(p[1]); ++p); + for (ntag[i++] = ' '; isspace(p[1]); ++p) ; } else if ((quote = *p) == '"' || *p == '\'') { for (ntag[i++] = *p++; (ntag[i++] = *p) && *p != quote; ++p) { if (*p == '\n' || *p == '\r') @@ -2945,7 +2945,7 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize) sprintf(delay_str, "."); /* Skip to anything after "URL=" */ - while (*content && *(content++) != '='); + while (*content && *(content++) != '=') ; /* Send a custom HTML message. * TODO: This is a hairy hack, @@ -3766,7 +3766,7 @@ static int Html_write_raw(DilloHtml *html, char *buf, int bufsize, int Eof) if (isspace(buf[buf_index])) { /* whitespace: group all available whitespace */ - while (++buf_index < bufsize && isspace(buf[buf_index])); + while (++buf_index < bufsize && isspace(buf[buf_index])) ; Html_process_space(html, buf + token_start, buf_index - token_start); token_start = buf_index; diff --git a/src/uicmd.cc b/src/uicmd.cc index e315417e..c093f73e 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -85,11 +85,12 @@ public: void remove (Widget *w) { TabGroup::remove (w); /* fixup resizable in case we just removed it */ - if (resizable () == w) + if (resizable () == w) { if (children () > 0) resizable (child (children () - 1)); else resizable (NULL); + } if (children () < 2) hideLabels (); @@ -95,12 +95,12 @@ extern "C" { struct _DilloUrl { Dstr *url_string; const char *buffer; - const char *scheme; // - const char *authority; // - const char *path; // These are references only - const char *query; // (no need to free them) - const char *fragment; // - const char *hostname; // + const char *scheme; /**/ + const char *authority; /**/ + const char *path; /* These are references only */ + const char *query; /* (no need to free them) */ + const char *fragment; /**/ + const char *hostname; /**/ int port; int flags; Dstr *data; /* POST */ |