diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2009-02-09 14:56:31 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2009-02-09 14:56:31 -0300 |
commit | e32686c10a4f4fe7c34b181845220b5c491f32fb (patch) | |
tree | c090052c311a3a1732d03dc17fe357f97437b397 /src | |
parent | 74f64426001a693759e47963f99965e0e6ee847d (diff) |
whitespace cleanup: 's/ +$//g'
Diffstat (limited to 'src')
-rw-r--r-- | src/IO/IO.c | 4 | ||||
-rw-r--r-- | src/IO/http.c | 2 | ||||
-rw-r--r-- | src/cache.c | 8 | ||||
-rw-r--r-- | src/capi.c | 4 | ||||
-rw-r--r-- | src/chain.c | 2 | ||||
-rw-r--r-- | src/css.cc | 16 | ||||
-rw-r--r-- | src/css.hh | 6 | ||||
-rw-r--r-- | src/cssparser.cc | 4 | ||||
-rw-r--r-- | src/decode.c | 4 | ||||
-rw-r--r-- | src/dialog.cc | 6 | ||||
-rw-r--r-- | src/dicache.c | 2 | ||||
-rw-r--r-- | src/findbar.cc | 2 | ||||
-rw-r--r-- | src/findbar.hh | 2 | ||||
-rw-r--r-- | src/form.hh | 8 | ||||
-rw-r--r-- | src/html.cc | 60 | ||||
-rw-r--r-- | src/html_common.hh | 16 | ||||
-rw-r--r-- | src/menu.cc | 48 | ||||
-rw-r--r-- | src/misc.c | 2 | ||||
-rw-r--r-- | src/nav.c | 2 | ||||
-rw-r--r-- | src/plain.cc | 2 | ||||
-rw-r--r-- | src/styleengine.cc | 46 | ||||
-rw-r--r-- | src/styleengine.hh | 2 | ||||
-rw-r--r-- | src/table.cc | 4 | ||||
-rw-r--r-- | src/table.hh | 4 | ||||
-rw-r--r-- | src/ui.cc | 26 | ||||
-rw-r--r-- | src/uicmd.cc | 10 | ||||
-rw-r--r-- | src/web.cc | 2 |
27 files changed, 147 insertions, 147 deletions
diff --git a/src/IO/IO.c b/src/IO/IO.c index a0e18226..77790131 100644 --- a/src/IO/IO.c +++ b/src/IO/IO.c @@ -152,10 +152,10 @@ static void IO_close_fd(IOData_t *io, int CloseCode) /* Stop the polling on this FD */ if (CloseCode & IO_StopRd) { events |= DIO_READ; - } + } if (CloseCode & IO_StopWr) { events |= DIO_WRITE; - } + } a_IOwatch_remove_fd(io->FD, events); _MSG(" end IO close (%d) <=====\n", io->FD); } diff --git a/src/IO/http.c b/src/IO/http.c index 738937db..d8ef6113 100644 --- a/src/IO/http.c +++ b/src/IO/http.c @@ -362,7 +362,7 @@ static int Http_connect_socket(ChainLink *Info) struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&name; socket_len = sizeof(struct sockaddr_in6); sin6->sin6_family = dh->af; - sin6->sin6_port = + sin6->sin6_port = S->port ? htons(S->port) : htons(DILLO_URL_HTTP_PORT); memcpy(&sin6->sin6_addr, dh->data, dh->alen); inet_ntop(dh->af, dh->data, buf, sizeof(buf)); diff --git a/src/cache.c b/src/cache.c index 8ab9e1a4..e634b337 100644 --- a/src/cache.c +++ b/src/cache.c @@ -668,7 +668,7 @@ static void Cache_parse_header(CacheEntry_t *entry) entry->Flags |= CA_ForceRedirect; /* 301 Moved Permanently */ else if (header[11] == '2') entry->Flags |= CA_TempRedirect; /* 302 Temporary Redirect */ - + location_url = a_Url_new(location_str, URL_STR_(entry->Url)); if (URL_FLAGS(location_url) & (URL_Post + URL_Get) && dStrcasecmp(URL_SCHEME(location_url), "dpi") == 0 && @@ -827,7 +827,7 @@ void a_Cache_process_dbuf(int Op, const char *buf, size_t buf_size, _MSG("__a_Cache_process_dbuf__\n"); if (Op == IORead) { - /* + /* * Cache_get_header() will set CA_GotHeader if it has a full header, and * Cache_parse_header() will unset it if the header ends being * merely an informational response from the server (i.e., 100 Continue) @@ -863,7 +863,7 @@ void a_Cache_process_dbuf(int Op, const char *buf, size_t buf_size, dStr_free(dstr1, 1); dStr_free(dstr2, 1); dStr_free(dstr3, 1); - + if (entry->Data->len) entry->Flags &= ~CA_IsEmpty; @@ -969,7 +969,7 @@ static void Cache_auth_callback(void *vdata) /* * Set a timeout function to ask for user/password. - */ + */ static void Cache_auth_entry(CacheEntry_t *entry, BrowserWindow *bw) { static int busy = 0; @@ -423,7 +423,7 @@ const char *a_Capi_get_content_type(const DilloUrl *url) } /* - * Set the Content-Type for the URL. + * Set the Content-Type for the URL. */ const char *a_Capi_set_content_type(const DilloUrl *url, const char *ctype, const char *from) @@ -554,7 +554,7 @@ void a_Capi_ccc(int Op, int Branch, int Dir, ChainLink *Info, if (Data2 && !strcmp(Data2, "DpidERROR")) a_UIcmd_set_msg(conn->bw, "ERROR: can't start dpid daemon " - "(URL scheme = '%s')!", + "(URL scheme = '%s')!", URL_SCHEME(conn->url)); /* finish conn */ Capi_conn_unref(conn); diff --git a/src/chain.c b/src/chain.c index 37f43a7f..1045bb9c 100644 --- a/src/chain.c +++ b/src/chain.c @@ -153,7 +153,7 @@ DataBuf *a_Chain_dbuf_new(void *buf, int size, int code) /* * Check whether the CCC is operative. * Also used to hook debug information. - * + * * Return value: 1 if ready to use, 0 if not operative. */ int a_Chain_check(char *FuncStr, int Op, int Branch, int Dir, @@ -98,7 +98,7 @@ bool CssSelector::match (Doctree *docTree, const DoctreeNode *node) { if (node == NULL) return false; - + switch (comb) { case CHILD: if (!sel->match (node)) @@ -125,8 +125,8 @@ bool CssSelector::match (Doctree *docTree, const DoctreeNode *node) { comb = cs->combinator; node = docTree->parent (node); - } - + } + return true; } @@ -196,7 +196,7 @@ bool CssSimpleSelector::match (const DoctreeNode *n) { return false; if (id != NULL && (n->id == NULL || dStrcasecmp (id, n->id) != 0)) return false; - + return true; } @@ -285,7 +285,7 @@ void CssStyleSheet::addRule (CssRule *rule) { CssSimpleSelector *top = rule->selector->top (); RuleList *ruleList = NULL; lout::object::ConstString *string; - + if (top->id) { string = new lout::object::ConstString (top->id); ruleList = idTable->get (string); @@ -318,7 +318,7 @@ void CssStyleSheet::apply (CssPropertyList *props, Doctree *docTree, const DoctreeNode *node) { RuleList *ruleList[4]; int numLists = 0, index[4] = {0, 0, 0, 0}; - + if (node->id) { lout::object::ConstString idString (node->id); @@ -412,7 +412,7 @@ void CssContext::apply (CssPropertyList *props, Doctree *docTree, if (nonCssHints) nonCssHints->apply (props); - + if (sheet[CSS_PRIMARY_AUTHOR]) sheet[CSS_PRIMARY_AUTHOR]->apply (props, docTree, node); @@ -441,7 +441,7 @@ void CssContext::addRule (CssSelector *sel, CssPropertyList *props, void CssContext::buildUserAgentStyle () { const char *cssBuf = - "body {background-color: #dcd1ba; font-family: sans-serif; color: black;" + "body {background-color: #dcd1ba; font-family: sans-serif; color: black;" " margin: 5px}" "big {font-size: 1.17em}" "blockquote, dd {margin-left: 40px; margin-right: 40px}" @@ -34,7 +34,7 @@ typedef enum { 'font-weight' */ CSS_TYPE_STRING, /* <string> */ CSS_TYPE_SYMBOL, /* Symbols, which are directly copied (as - opposed to CSS_TYPE_ENUM and + opposed to CSS_TYPE_ENUM and CSS_TYPE_MULTI_ENUM). Used for 'font-family'. */ CSS_TYPE_UNUSED /* Not yet used. Will itself get unused some @@ -43,7 +43,7 @@ typedef enum { /* * Lengths are represented as int in the following way: - * + * * +---+ - - - +---+---+- - - - - -+---+---+---+---+ * | integer part | decimal fraction | type | * +---+ - - - +---+---+- - - - - -+---+---+---+---+ @@ -213,7 +213,7 @@ class CssProperty { /** * \brief A list of CssProperty objects. - */ + */ class CssPropertyList : public lout::misc::SimpleVector <CssProperty> { int refCount; bool ownerOfStrings; diff --git a/src/cssparser.cc b/src/cssparser.cc index 81e289a2..625bb8a0 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -485,7 +485,7 @@ static void Css_next_token(CssParser * parser) escaped = true; d = Css_getc(parser); if (isxdigit(d)) { - /* Read hex Unicode char. (Actually, strings are yet only 8 + /* Read hex Unicode char. (Actually, strings are yet only 8 * bit.) */ hexbuf[0] = d; j = 1; @@ -1009,7 +1009,7 @@ static bool Css_parse_simple_selector(CssParser * parser, Css_next_token(parser); if (parser->space_separated) return true; - } else if (parser->ttype == CSS_TK_CHAR && + } else if (parser->ttype == CSS_TK_CHAR && (parser->tval[0] == '#' || parser->tval[0] == '.' || parser->tval[0] == ':')) { diff --git a/src/decode.c b/src/decode.c index 8b8d9081..1207d68d 100644 --- a/src/decode.c +++ b/src/decode.c @@ -244,7 +244,7 @@ Decode *a_Decode_content_init(const char *format) MSG("Content-Encoding '%s' not recognized.\n", format); } } - return dc; + return dc; } /* @@ -294,7 +294,7 @@ Decode *a_Decode_charset_init(const char *format) MSG("Unable to convert from character encoding: '%s'\n", format); } } - return dc; + return dc; } /* diff --git a/src/dialog.cc b/src/dialog.cc index 38854fb3..c02ee223 100644 --- a/src/dialog.cc +++ b/src/dialog.cc @@ -11,7 +11,7 @@ // UI dialogs -#include <math.h> // for rint() +#include <math.h> // for rint() #include <fltk/Window.h> #include <fltk/ask.h> @@ -129,11 +129,11 @@ void *a_Dialog_make_text_window(const char *txt, const char *title) int wh = prefs.height, ww = prefs.width, bh = 30; int lines, line_num_width; Font *textfont = font(prefs.font_monospace, 0); - + Window *window = new Window(ww, wh, title ? title : "Untitled"); window->callback(window_close_cb, window); window->begin(); - + TextDisplay *td = new TextDisplay(0,0,ww, wh-bh); td->buffer()->text(txt); diff --git a/src/dicache.c b/src/dicache.c index a95b1a52..86578ba1 100644 --- a/src/dicache.c +++ b/src/dicache.c @@ -408,7 +408,7 @@ static void *Dicache_image(int ImgType, const char *MimeType, void *Ptr, if (!DicEntry) { /* Let's create an entry for this image... */ DicEntry = a_Dicache_add_entry(web->url); - DicEntry->DecoderData = + DicEntry->DecoderData = (ImgType == DIC_Png) ? a_Png_new(web->Image, DicEntry->url, DicEntry->version) : (ImgType == DIC_Gif) ? diff --git a/src/findbar.cc b/src/findbar.cc index ea1c80f1..2045d2a0 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -89,7 +89,7 @@ void Findbar::search_cb2(Widget *widget, void *vfb) /* * Somehow fltk even regards the first loss of focus for the * window as a WHEN_ENTER_KEY_ALWAYS event. - */ + */ if (event_key() == ReturnKey) search_cb(widget, vfb); } diff --git a/src/findbar.hh b/src/findbar.hh index 90982ffd..84922ac0 100644 --- a/src/findbar.hh +++ b/src/findbar.hh @@ -20,7 +20,7 @@ class Findbar : public Group { CheckButton *check_btn; xpmImage *hideImg; Input *i; - + static void search_cb (Widget *, void *); static void searchBackwards_cb (Widget *, void *); static void search_cb2 (Widget *, void *); diff --git a/src/form.hh b/src/form.hh index fd48a18d..32ca88dd 100644 --- a/src/form.hh +++ b/src/form.hh @@ -4,7 +4,7 @@ #include "url.h" /* - * Typedefs + * Typedefs */ typedef enum { @@ -19,7 +19,7 @@ typedef enum { } DilloHtmlEnc; /* - * Classes + * Classes */ class DilloHtmlForm; @@ -27,7 +27,7 @@ class DilloHtmlInput; class DilloHtml; /* - * Form API + * Form API */ DilloHtmlForm *a_Html_form_new(DilloHtml *html, @@ -44,7 +44,7 @@ void a_Html_form_display_hiddens2(void *v_form, bool display); /* - * Form parsing functions + * Form parsing functions */ void Html_tag_open_form(DilloHtml *html, const char *tag, int tagsize); diff --git a/src/html.cc b/src/html.cc index fa46de34..92e6c196 100644 --- a/src/html.cc +++ b/src/html.cc @@ -48,7 +48,7 @@ #include "dw/ruler.hh" /*----------------------------------------------------------------------------- - * Defines + * Defines *---------------------------------------------------------------------------*/ /* Define to 1 to ignore white space immediately after an open tag, @@ -201,7 +201,7 @@ static void Html_free(void *data) /* * Used by the "Load images" page menuitem. - */ + */ void a_Html_load_images(void *v_html, DilloUrl *pattern) { DilloHtml *html = (DilloHtml*)v_html; @@ -210,7 +210,7 @@ void a_Html_load_images(void *v_html, DilloUrl *pattern) } /* - * Search for form + * Search for form */ static bool Html_contains_form(DilloHtml *html, void *v_form) { @@ -230,9 +230,9 @@ void a_Html_form_submit(void *v_html, void *v_form) DilloHtml *html = (DilloHtml*)v_html; if (Html_contains_form(html, v_form)) { - /* it's still valid */ + /* it's still valid */ a_Html_form_submit2(v_form); - } + } } /* @@ -243,7 +243,7 @@ void a_Html_form_reset(void *v_html, void *v_form) DilloHtml *html = (DilloHtml*)v_html; if (Html_contains_form(html, v_form)) { - /* it's still valid */ + /* it's still valid */ a_Html_form_reset2(v_form); } } @@ -306,7 +306,7 @@ static void Html_add_new_linkimage(DilloHtml *html, * sets the style at the top of the stack. */ void a_Html_tag_set_align_attr(DilloHtml *html, - CssPropertyList *props, + CssPropertyList *props, const char *tag, int tagsize) { const char *align; @@ -948,7 +948,7 @@ static int Html_parse_entity(DilloHtml *html, const char *token, /* strtol with base 16 accepts leading "0x" - we don't */ if (*s == '0' && s[1] == 'x') { s++; - isocode = 0; + isocode = 0; } else { isocode = strtol(s, &s, 16); } @@ -1041,7 +1041,7 @@ char *a_Html_parse_entities(DilloHtml *html, const char *token, int toksize) /* * Parse spaces */ -static void Html_process_space(DilloHtml *html, const char *space, +static void Html_process_space(DilloHtml *html, const char *space, int spacesize) { char *spc; @@ -1178,7 +1178,7 @@ static void Html_process_word(DilloHtml *html, const char *word, int size) if (strchr("\t\f\n\r", Pword[i])) { if (i == 0 || (i > 0 && Pword[i-1] != ' ')) Pword[i] = ' '; - else + else for (--i; strchr("\t\f\n\r", Pword[j+1]); ++j) ; } } @@ -1446,7 +1446,7 @@ static int * recognizes the "HTML Level" with or without the URL. The convention * comes from mozilla (see URLs below), but Dillo doesn't have the same * rendering modes, so it may be better to chose another behaviour. --Jcid - * + * * http://www.mozilla.org/docs/web-developer/quirks/doctypes.html * http://lists.auriga.wearlab.de/pipermail/dillo-dev/2004-October/002300.html * @@ -1881,7 +1881,7 @@ static void Html_tag_open_font(DilloHtml *html, const char *tag, int tagsize) if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "color"))) { if (prefs.contrast_visited_color && html->InVisitedLink) { color = html->visited_color; - } else { + } else { /* use the tag-specified color */ color = a_Html_color_parse(html, attrbuf, -1); } @@ -2058,7 +2058,7 @@ DilloImage *a_Html_image_new(DilloHtml *html, const char *tag, /* * Tell cache to retrieve image */ -static void Html_load_image(BrowserWindow *bw, DilloUrl *url, +static void Html_load_image(BrowserWindow *bw, DilloUrl *url, DilloImage *Image) { DilloWeb *Web; @@ -2198,7 +2198,7 @@ static void Html_tag_open_area(DilloHtml *html, const char *tag, int tagsize) const char *attrbuf; int link = -1; Shape *shape = NULL; - + if (!(html->InFlags & IN_MAP)) { BUG_MSG("<area> element not inside <map>\n"); return; @@ -2260,7 +2260,7 @@ static void Html_tag_open_area(DilloHtml *html, const char *tag, int tagsize) dReturn_if_fail ( url != NULL ); if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "alt"))) a_Url_set_alt(url, attrbuf); - + link = Html_set_new_link(html, &url); } if (type == BACKGROUND) @@ -2283,7 +2283,7 @@ static void Html_tag_open_object(DilloHtml *html, const char *tag, int tagsize) if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "codebase"))) { base_url = a_Html_url_new(html, attrbuf, NULL, 0); } - + if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "data"))) { url = a_Html_url_new(html, attrbuf, URL_STR(base_url), (base_url != NULL)); @@ -2294,7 +2294,7 @@ static void Html_tag_open_object(DilloHtml *html, const char *tag, int tagsize) } else { html->styleEngine->setPseudoLink (); } - + props.set(PROPERTY_X_LINK, CSS_TYPE_INTEGER, Html_set_new_link(html, &url)); html->styleEngine->setNonCssHints (&props); @@ -2418,7 +2418,7 @@ static void Html_tag_close_a(DilloHtml *html, int TagIdx) /* * <BLOCKQUOTE> */ -static void Html_tag_open_blockquote(DilloHtml *html, +static void Html_tag_open_blockquote(DilloHtml *html, const char *tag, int tagsize) { DW2TB(html->dw)->addParbreak (9, html->styleEngine->wordStyle ()); @@ -2474,7 +2474,7 @@ static void Html_tag_open_ul(DilloHtml *html, const char *tag, int tagsize) props.set(CSS_PROPERTY_LIST_STYLE_TYPE, CSS_TYPE_ENUM, list_style_type); html->styleEngine->setNonCssHints (&props); - } + } DW2TB(html->dw)->addParbreak (9, html->styleEngine->wordStyle ()); Html_add_textblock(html, 9); @@ -2561,7 +2561,7 @@ static void Html_tag_open_li(DilloHtml *html, const char *tag, int tagsize) int *list_number; const char *attrbuf; char buf[16]; - + if (S_TOP(html)->list_type == HTML_LIST_NONE) BUG_MSG("<li> outside <ul> or <ol>\n"); @@ -2622,7 +2622,7 @@ static void Html_tag_open_hr(DilloHtml *html, const char *tag, int tagsize) char *width_ptr; const char *attrbuf; int32_t size = 0; - + width_ptr = a_Html_get_attr_wdef(html, tag, tagsize, "width", NULL); if (width_ptr) { props.set (CSS_PROPERTY_WIDTH, CSS_TYPE_LENGTH_PERCENTAGE, @@ -2632,9 +2632,9 @@ static void Html_tag_open_hr(DilloHtml *html, const char *tag, int tagsize) if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "size"))) size = strtol(attrbuf, NULL, 10); - - a_Html_tag_set_align_attr(html, &props, tag, tagsize); - + + a_Html_tag_set_align_attr(html, &props, tag, tagsize); + /* TODO: evaluate attribute */ if (a_Html_get_attr(html, tag, tagsize, "noshade")) { props.set (CSS_PROPERTY_BORDER_TOP_STYLE, CSS_TYPE_ENUM, BORDER_SOLID); @@ -2645,15 +2645,15 @@ static void Html_tag_open_hr(DilloHtml *html, const char *tag, int tagsize) if (size <= 0) size = 1; } - - if (size > 0) { + + if (size > 0) { CssLength size_top = CSS_CREATE_LENGTH ((size+1)/2, CSS_LENGTH_TYPE_PX); CssLength size_bottom = CSS_CREATE_LENGTH (size / 2, CSS_LENGTH_TYPE_PX); props.set (CSS_PROPERTY_BORDER_TOP_WIDTH, CSS_TYPE_LENGTH_PERCENTAGE, size_top); - props.set (CSS_PROPERTY_BORDER_LEFT_WIDTH, CSS_TYPE_LENGTH_PERCENTAGE, + props.set (CSS_PROPERTY_BORDER_LEFT_WIDTH, CSS_TYPE_LENGTH_PERCENTAGE, size_top); - props.set (CSS_PROPERTY_BORDER_BOTTOM_WIDTH, CSS_TYPE_LENGTH_PERCENTAGE, + props.set (CSS_PROPERTY_BORDER_BOTTOM_WIDTH, CSS_TYPE_LENGTH_PERCENTAGE, size_bottom); props.set (CSS_PROPERTY_BORDER_RIGHT_WIDTH, CSS_TYPE_LENGTH_PERCENTAGE, size_bottom); @@ -2808,7 +2808,7 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize) html->stop_parser = true; /* The cache buffer is no longer valid */ a_UIcmd_repush(html->bw); } - } + } } } @@ -3436,7 +3436,7 @@ static void Html_process_tag(DilloHtml *html, char *tag, int tagsize) (tag[tagsize-2] == '/' && /* XML: */ (strchr(" \"'", tag[tagsize-3]) || /* [ "']/> */ (size_t)tagsize == strlen(Tags[ni].name) + 3))) { /* <x/> */ - + _MSG("Close: %s\n", Tags[ni].name); Html_tag_cleanup_at_close(html, ni); /* This was a close tag */ diff --git a/src/html_common.hh b/src/html_common.hh index c69b0271..8856825d 100644 --- a/src/html_common.hh +++ b/src/html_common.hh @@ -16,7 +16,7 @@ #include "styleengine.hh" /* - * Macros + * Macros */ // Dw to Textblock @@ -52,18 +52,18 @@ old_style->unref (); \ } while (FALSE) #else -#define HTML_SET_TOP_ATTR(html, var, val) +#define HTML_SET_TOP_ATTR(html, var, val) #endif /* - * Typedefs + * Typedefs */ typedef struct _DilloLinkImage DilloLinkImage; typedef struct _DilloHtmlState DilloHtmlState; typedef enum { - DT_NONE, - DT_HTML, + DT_NONE, + DT_HTML, DT_XHTML } DilloHtmlDocumentType; @@ -105,7 +105,7 @@ typedef enum { } DilloHtmlProcessingState; /* - * Data Structures + * Data Structures */ struct _DilloLinkImage { @@ -140,7 +140,7 @@ struct _DilloHtmlState { }; /* - * Classes + * Classes */ class DilloHtml { @@ -237,7 +237,7 @@ public: }; /* - * Parser functions + * Parser functions */ int a_Html_tag_index(const char *tag); diff --git a/src/menu.cc b/src/menu.cc index 9d03c439..ee9a1bda 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -41,7 +41,7 @@ static BrowserWindow *popup_bw = NULL; // Where to place the filemenu popup static int popup_x, popup_y; // History popup direction (-1 = back, 1 = forward). -static int history_direction = -1; +static int history_direction = -1; // History popup, list of URL-indexes. static int *history_list = NULL; @@ -115,7 +115,7 @@ static void Menu_link_cb(Widget*, void *user_data) a_Menu_link_popup(popup_bw, url); } -/* +/* * Open URL */ static void Menu_open_url_cb(Widget* ) @@ -124,7 +124,7 @@ static void Menu_open_url_cb(Widget* ) a_UIcmd_open_url(popup_bw, popup_url); } -/* +/* * Open URL in new window */ static void Menu_open_url_nw_cb(Widget* ) @@ -133,7 +133,7 @@ static void Menu_open_url_nw_cb(Widget* ) a_UIcmd_open_url_nw(popup_bw, popup_url); } -/* +/* * Open URL in new Tab */ static void Menu_open_url_nt_cb(Widget* ) @@ -143,7 +143,7 @@ static void Menu_open_url_nt_cb(Widget* ) a_UIcmd_open_url_nt(popup_bw, popup_url, focus); } -/* +/* * Add bookmark */ static void Menu_add_bookmark_cb(Widget* ) @@ -151,7 +151,7 @@ static void Menu_add_bookmark_cb(Widget* ) a_UIcmd_add_bookmark(popup_bw, popup_url); } -/* +/* * Find text */ static void Menu_find_text_cb(Widget* ) @@ -159,7 +159,7 @@ static void Menu_find_text_cb(Widget* ) ((UI *)popup_bw->ui)->set_findbar_visibility(1); } -/* +/* * Save link */ static void Menu_save_link_cb(Widget* ) @@ -167,7 +167,7 @@ static void Menu_save_link_cb(Widget* ) a_UIcmd_save_link(popup_bw, popup_url); } -/* +/* * Save current page */ static void Menu_save_page_cb(Widget* ) @@ -175,7 +175,7 @@ static void Menu_save_page_cb(Widget* ) a_UIcmd_save(popup_bw); } -/* +/* * View current page source */ static void Menu_view_page_source_cb(Widget* ) @@ -183,7 +183,7 @@ static void Menu_view_page_source_cb(Widget* ) a_UIcmd_view_page_source(popup_url); } -/* +/* * View current page's bugs */ static void Menu_view_page_bugs_cb(Widget* ) @@ -238,7 +238,7 @@ static void Menu_form_hiddens_cb(Widget *w, void *user_data) a_Html_form_display_hiddens(doc, v_form, !visible); } -/* +/* * Validate URL with the W3C */ static void Menu_bugmeter_validate_w3c_cb(Widget* ) @@ -251,7 +251,7 @@ static void Menu_bugmeter_validate_w3c_cb(Widget* ) dStr_free(dstr, 1); } -/* +/* * Validate URL with the WDG */ static void Menu_bugmeter_validate_wdg_cb(Widget* ) @@ -265,7 +265,7 @@ static void Menu_bugmeter_validate_wdg_cb(Widget* ) dStr_free(dstr, 1); } -/* +/* * Show info page for the bug meter */ static void Menu_bugmeter_about_cb(Widget* ) @@ -323,7 +323,7 @@ static void Menu_popup_cb2(void *data) /* * Page popup menu (construction & popup) */ -void a_Menu_page_popup(BrowserWindow *bw, const DilloUrl *url, +void a_Menu_page_popup(BrowserWindow *bw, const DilloUrl *url, bool_t has_bugs) { // One menu for every browser window @@ -345,13 +345,13 @@ void a_Menu_page_popup(BrowserWindow *bw, const DilloUrl *url, i->callback(Menu_view_page_bugs_cb); i = new Item("Bookmark this page"); i->callback(Menu_add_bookmark_cb); - new Divider(); + new Divider(); i = new Item("Find Text"); i->callback(Menu_find_text_cb); //i->shortcut(CTRL+'f'); i = new Item("Jump to..."); i->deactivate(); - new Divider(); + new Divider(); i = new Item("Save page As..."); i->callback(Menu_save_page_cb); @@ -387,12 +387,12 @@ void a_Menu_link_popup(BrowserWindow *bw, const DilloUrl *url) i->callback(Menu_open_url_nw_cb); i = new Item("Open Link in New Tab"); i->callback(Menu_open_url_nt_cb); - new Divider(); + new Divider(); i = new Item("Bookmark this Link"); i->callback(Menu_add_bookmark_cb); i = new Item("Copy Link location"); i->callback(Menu_copy_urlstr_cb); - new Divider(); + new Divider(); i = new Item("Save Link As..."); i->callback(Menu_save_link_cb); @@ -425,7 +425,7 @@ void a_Menu_image_popup(BrowserWindow *bw, const DilloUrl *url, popup_page_url = a_Url_dup(page_url); a_Url_free(popup_link_url); popup_link_url = a_Url_dup(link_url); - + if (!pm) { Item *i; pm = new PopupMenu(0,0,0,0,"&IMAGE OPTIONS"); @@ -561,7 +561,7 @@ void a_Menu_bugmeter_popup(BrowserWindow *bw, const DilloUrl *url) i->callback(Menu_bugmeter_validate_w3c_cb); i = new Item("Validate URL with WDG"); i->callback(Menu_bugmeter_validate_wdg_cb); - new Divider(); + new Divider(); i = new Item("About Bug Meter..."); i->callback(Menu_bugmeter_about_cb); pm->type(PopupMenu::POPUP123); @@ -614,7 +614,7 @@ void a_Menu_history_popup(BrowserWindow *bw, int direction) /* * Toggle use of remote stylesheets - */ + */ static void Menu_remote_css_cb(Widget *wid) { _MSG("Menu_remote_css_cb\n"); @@ -624,7 +624,7 @@ static void Menu_remote_css_cb(Widget *wid) /* * Toggle use of embedded CSS style - */ + */ static void Menu_embedded_css_cb(Widget *wid) { prefs.parse_embedded_css = wid->state() ? 1 : 0; @@ -633,7 +633,7 @@ static void Menu_embedded_css_cb(Widget *wid) /* * Toggle loading of images -- and load them if enabling. - */ + */ static void Menu_imgload_toggle_cb(Widget *wid) { if ((prefs.load_images = wid->state() ? 1 : 0)) { @@ -667,7 +667,7 @@ void a_Menu_tools_popup(BrowserWindow *bw, void *v_wid) it = new ToggleItem("Use embedded CSS"); it->callback(Menu_embedded_css_cb); it->state(prefs.parse_embedded_css); - new Divider(); + new Divider(); it = new ToggleItem("Load images"); it->callback(Menu_imgload_toggle_cb); it->state(prefs.load_images); @@ -150,7 +150,7 @@ int a_Misc_get_content_type_from_data(void *Data, size_t Size, const char **PT) * All in the above set regard [00-31] as control characters. * LATIN1: [7F-9F] unused * CP-1251 {7F,98} unused (two characters). - * + * * We'll use [0-31] as indicators of non-text content. * Better heuristics are welcomed! :-) */ @@ -546,7 +546,7 @@ void a_Nav_save_url(BrowserWindow *bw, { DilloWeb *Web = a_Web_new(url); Web->bw = bw; - Web->filename = dStrdup(filename); + Web->filename = dStrdup(filename); Web->flags |= WEB_Download; /* TODO: keep track of this client */ a_Capi_open_url(Web, Nav_save_cb, Web); diff --git a/src/plain.cc b/src/plain.cc index eefc6614..2fb725a3 100644 --- a/src/plain.cc +++ b/src/plain.cc @@ -109,7 +109,7 @@ DilloPlain::DilloPlain(BrowserWindow *p_bw, const DilloUrl *p_url) styleAttrs.margin.setVal (5); styleAttrs.font = style::Font::create (layout, &fontAttrs); styleAttrs.color = style::Color::create (layout, prefs.text_color); - styleAttrs.backgroundColor = + styleAttrs.backgroundColor = style::Color::create (layout, prefs.bg_color); widgetStyle = style::Style::create (layout, &styleAttrs); diff --git a/src/styleengine.cc b/src/styleengine.cc index a4d5003a..c7d8a39e 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -34,7 +34,7 @@ StyleEngine::StyleEngine (dw::core::Layout *layout) { font_attrs.size = (int) (14 * prefs.font_factor + 0.5); font_attrs.weight = 400; font_attrs.style = FONT_STYLE_NORMAL; - + style_attrs.initValues (); style_attrs.font = Font::create (layout, &font_attrs); style_attrs.color = Color::create (layout, 0); @@ -146,11 +146,11 @@ void StyleEngine::endElement (int element) { if (n->wordStyle) n->wordStyle->unref (); if (n->id) - dFree ((void*) n->id); + dFree ((void*) n->id); if (n->klass) - dFree ((void*) n->klass); + dFree ((void*) n->klass); if (n->styleAttribute) - dFree ((void*) n->styleAttribute); + dFree ((void*) n->styleAttribute); stack->setSize (stack->size () - 1); } @@ -167,19 +167,19 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { */ for (int i = 0; i < props->size (); i++) { CssProperty *p = props->getRef (i); - + switch (p->name) { case CSS_PROPERTY_FONT_FAMILY: // \todo handle comma separated lists of font names if (strcmp (p->value.strVal, "serif") == 0) fontAttrs.name = prefs.font_serif; - else if (strcmp (p->value.strVal, "sans-serif") == 0) + else if (strcmp (p->value.strVal, "sans-serif") == 0) fontAttrs.name = prefs.font_sans_serif; - else if (strcmp (p->value.strVal, "cursive") == 0) + else if (strcmp (p->value.strVal, "cursive") == 0) fontAttrs.name = prefs.font_cursive; - else if (strcmp (p->value.strVal, "fantasy") == 0) + else if (strcmp (p->value.strVal, "fantasy") == 0) fontAttrs.name = prefs.font_fantasy; - else if (strcmp (p->value.strVal, "monospace") == 0) + else if (strcmp (p->value.strVal, "monospace") == 0) fontAttrs.name = prefs.font_monospace; else fontAttrs.name = p->value.strVal; @@ -268,29 +268,29 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { for (int i = 0; i < props->size (); i++) { CssProperty *p = props->getRef (i); - + switch (p->name) { /* \todo missing cases */ case CSS_PROPERTY_BACKGROUND_COLOR: attrs->backgroundColor = Color::create (layout, p->value.intVal); - break; + break; case CSS_PROPERTY_BORDER_TOP_COLOR: attrs->borderColor.top = Color::create (layout, p->value.intVal); - break; + break; case CSS_PROPERTY_BORDER_BOTTOM_COLOR: attrs->borderColor.bottom = Color::create (layout, p->value.intVal); - break; + break; case CSS_PROPERTY_BORDER_LEFT_COLOR: attrs->borderColor.left = Color::create (layout, p->value.intVal); - break; + break; case CSS_PROPERTY_BORDER_RIGHT_COLOR: attrs->borderColor.right = Color::create (layout, p->value.intVal); - break; + break; case CSS_PROPERTY_BORDER_BOTTOM_STYLE: attrs->borderStyle.bottom = (BorderStyle) p->value.intVal; break; @@ -321,10 +321,10 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { break; case CSS_PROPERTY_COLOR: attrs->color = Color::create (layout, p->value.intVal); - break; + break; case CSS_PROPERTY_CURSOR: attrs->cursor = (Cursor) p->value.intVal; - break; + break; case CSS_PROPERTY_LIST_STYLE_TYPE: attrs->listStyleType = (ListStyleType) p->value.intVal; break; @@ -383,15 +383,15 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { } /* make sure border colors are set */ - if (attrs->borderColor.top == NULL) + if (attrs->borderColor.top == NULL) attrs->borderColor.top = attrs->color; - if (attrs->borderColor.bottom == NULL) + if (attrs->borderColor.bottom == NULL) attrs->borderColor.bottom = attrs->color; - if (attrs->borderColor.left == NULL) + if (attrs->borderColor.left == NULL) attrs->borderColor.left = attrs->color; - if (attrs->borderColor.right == NULL) + if (attrs->borderColor.right == NULL) attrs->borderColor.right = attrs->color; - + } /** @@ -487,7 +487,7 @@ Style * StyleEngine::style0 (CssPropertyList *nonCssProperties) { if (styleAttributeProps) delete styleAttributeProps; - + return stack->getRef (stack->size () - 1)->style; } diff --git a/src/styleengine.hh b/src/styleengine.hh index a17a350c..ffa13ac9 100644 --- a/src/styleengine.hh +++ b/src/styleengine.hh @@ -32,7 +32,7 @@ class StyleEngine : public Doctree { public: StyleEngine (dw::core::Layout *layout); ~StyleEngine (); - + /* Doctree interface */ inline const DoctreeNode *top () { return stack->getRef (stack->size () - 1); diff --git a/src/table.cc b/src/table.cc index 96a4e0ca..20981fde 100644 --- a/src/table.cc +++ b/src/table.cc @@ -28,7 +28,7 @@ using namespace dw::core; using namespace dw::core::style; /* - * Forward declarations + * Forward declarations */ static void Html_tag_open_table_cell(DilloHtml *html, @@ -228,7 +228,7 @@ void Html_tag_open_th(DilloHtml *html, const char *tag, int tagsize) } /* - * Utilities + * Utilities */ /* diff --git a/src/table.hh b/src/table.hh index 8068c184..aca717ba 100644 --- a/src/table.hh +++ b/src/table.hh @@ -2,13 +2,13 @@ #define __TABLE_HH__ /* - * Classes + * Classes */ class DilloHtml; /* - * Table parsing functions + * Table parsing functions */ void Html_tag_open_table(DilloHtml *html, const char *tag, int tagsize); @@ -99,7 +99,7 @@ public: }; /* - * Disable: UpKey, DownKey, PageUpKey, PageDownKey and + * Disable: UpKey, DownKey, PageUpKey, PageDownKey and * CTRL+{o,r,HomeKey,EndKey} */ int CustInput::handle(int e) @@ -385,7 +385,7 @@ PackedGroup *UI::make_toolbar(int tw, int th) b->tooltip("Next page"); b->callback(b1_cb, (void *)UI_FORW); b->clear_tab_to_focus(); - + Home = b = new HighlightButton(xpos, 0, bw, bh, (lbl) ? "Home" : 0); b->image(icons->ImgHome); b->tooltip("Go to the Home page"); @@ -397,13 +397,13 @@ PackedGroup *UI::make_toolbar(int tw, int th) b->tooltip("Reload"); b->callback(b1_cb, (void *)UI_RELOAD); b->clear_tab_to_focus(); - + Save = b = new HighlightButton(xpos, 0, bw, bh, (lbl) ? "Save" : 0); b->image(icons->ImgSave); b->tooltip("Save this page"); b->callback(b1_cb, (void *)UI_SAVE); b->clear_tab_to_focus(); - + Stop = b = new HighlightButton(xpos, 0, bw, bh, (lbl) ? "Stop" : 0); b->image(icons->ImgStopMulti); b->tooltip("Stop loading"); @@ -531,7 +531,7 @@ Group *UI::make_panel(int ww) icons = &small_icons; else icons = &standard_icons; - + if (PanelSize == P_tiny) { if (Small_Icons) xpos = 0, bw = 22, bh = 22, fh = 0, lh = 22, lbl = 0; @@ -595,7 +595,7 @@ Group *UI::make_panel(int ww) g2->resizable(pg); g2->end(); - + // Toolbar g3 = new Group(0,fh+lh,ww,bh); g3->begin(); @@ -611,12 +611,12 @@ Group *UI::make_panel(int ww) w = make_progress_bars(1,0); } pg->add(w); - + g3->resizable(pg); // Better than 'w3' and it also works pg->box(BORDER_FRAME); //g3->box(EMBOSSED_BOX); g3->end(); - + g1->resizable(g3); g1->end(); } @@ -626,7 +626,7 @@ Group *UI::make_panel(int ww) /* * User Interface constructor - */ + */ UI::UI(int x, int y, int ww, int wh, const char* label, const UI *cur_ui) : Group(x, y, ww, wh, label) { @@ -640,7 +640,7 @@ UI::UI(int x, int y, int ww, int wh, const char* label, const UI *cur_ui) : add(TopGroup); resizable(TopGroup); set_flag(RAW_LABEL); - + if (cur_ui) { PanelSize = cur_ui->PanelSize; CuteColor = cur_ui->CuteColor; @@ -675,7 +675,7 @@ UI::UI(int x, int y, int ww, int wh, const char* label, const UI *cur_ui) : // Find text bar findbar = new Findbar(ww, 28); - TopGroup->add(findbar); + TopGroup->add(findbar); // Status Panel StatusPanel = new Group(0, 0, ww, s_h, 0); @@ -702,7 +702,7 @@ UI::UI(int x, int y, int ww, int wh, const char* label, const UI *cur_ui) : StatusPanel->resizable(Status); - TopGroup->add(StatusPanel); + TopGroup->add(StatusPanel); // Make the full screen button (to be attached to the viewport later) // TODO: attach to the viewport @@ -902,7 +902,7 @@ void UI::set_img_prog(int n_img, int t_img, int cmd) } else { IProg->activate(); if (cmd == 1) { - snprintf(str, 32, "%s%d of %d", + snprintf(str, 32, "%s%d of %d", (PanelSize == 0) ? "" : "Images\n", n_img, t_img); } else if (cmd == 2) { str[0] = '\0'; diff --git a/src/uicmd.cc b/src/uicmd.cc index 05b1a523..4bcbec7b 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -76,7 +76,7 @@ public: return 1; } // Avoid focus change. - return 0; + return 0; } } return TabGroup::handle(e); @@ -207,7 +207,7 @@ BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, const void *vbw) viewport->setBufferedDrawing (true); else viewport->setBufferedDrawing (false); - + layout->attachView (viewport); new_ui->set_render_layout(*viewport); @@ -259,7 +259,7 @@ static BrowserWindow *UIcmd_tab_new(const void *vbw) Layout *layout = new Layout (platform); FltkViewport *viewport = new FltkViewport (0, 0, 1, 1); - + layout->attachView (viewport); new_ui->set_render_layout(*viewport); @@ -508,7 +508,7 @@ void a_UIcmd_save(void *vbw) if (name) { a_Nav_save_url(bw, url, name); } - } + } } /* @@ -953,7 +953,7 @@ void a_UIcmd_fullscreen_toggle(BrowserWindow *bw) void a_UIcmd_findtext_search(BrowserWindow *bw, const char *key, int case_sens, int backwards) { Layout *l = (Layout *)bw->render_layout; - + switch (l->search(key, case_sens, backwards)) { case FindtextState::RESTART: a_UIcmd_set_msg(bw, "No further occurrences of \"%s\". " @@ -81,7 +81,7 @@ int a_Web_dispatch_by_type (const char *Type, DilloWeb *Web, styleAttrs.margin.setVal (5); styleAttrs.font = style::Font::create (layout, &fontAttrs); styleAttrs.color = style::Color::create (layout, 0xff0000); - styleAttrs.backgroundColor = + styleAttrs.backgroundColor = style::Color::create (layout, prefs.bg_color); widgetStyle = style::Style::create (layout, &styleAttrs); dw->setStyle (widgetStyle); |