Gitweb links: ...log http://git.netsurf-browser.org/netsurf.git/shortlog/d0549e7a5b14959097a1e8696dce1b1f40c6ba54 ...commit http://git.netsurf-browser.org/netsurf.git/commit/d0549e7a5b14959097a1e8696dce1b1f40c6ba54 ...tree http://git.netsurf-browser.org/netsurf.git/tree/d0549e7a5b14959097a1e8696dce1b1f40c6ba54
The branch, svenw/cocoa has been updated via d0549e7a5b14959097a1e8696dce1b1f40c6ba54 (commit) via 8c29c675c4301c90f5038a27aa31fa640f47e5aa (commit) via a661fdf83bf63907a7a8ccc6d2ba0e67dd5ea902 (commit) via 8c3d79f6fbd7608e9449b8d6213cb07d507423fe (commit) via 5a9afe471c21de6af798a7f82ca31ece598f8c2e (commit) via 8bdea3cc7e7838b0d6c2eb33966724ed2138bf89 (commit) via 8721279687f4b99b1b815c131257dee02d86553b (commit) from b9b91d4117e500d6da6b68d505d99c34e92c1fd1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=d0549e7a5b14959097a1e8696dce1b1f40c6ba54 commit d0549e7a5b14959097a1e8696dce1b1f40c6ba54 Merge: b9b91d4 8c29c67 Author: Sven Weidauer <s...@5sw.de> Commit: Sven Weidauer <s...@5sw.de> Merge remote-tracking branch 'origin/master' into svenw/cocoa ----------------------------------------------------------------------- Summary of changes: docs/netsurf-options.md | 320 ++++++---------- frontends/atari/treeview.c | 910 +++++++++++++++++++++++--------------------- frontends/atari/treeview.h | 2 +- frontends/windows/font.c | 2 +- frontends/windows/window.c | 4 +- test/corestrings.c | 9 +- test/data/cookies | 46 +-- test/data/cookies-out | 46 +-- test/urldbtest.c | 7 +- 9 files changed, 641 insertions(+), 705 deletions(-) diff --git a/docs/netsurf-options.md b/docs/netsurf-options.md index 89b8814..5538138 100644 --- a/docs/netsurf-options.md +++ b/docs/netsurf-options.md @@ -1,169 +1,91 @@ --------------------------------------------------------------------------------- - Common NetSurf user options 4nd December 2014 --------------------------------------------------------------------------------- +Common NetSurf user options +--------------------------- - This document outlines the common configuration options supported by the - NetSurf core. +This document outlines the common configuration options supported by + the NetSurf core. Overview ======== - The users configurations are generally stored in a "Choices" file - and are loaded at browser startup. Most user interfaces provide a - way to configure these parameters in a manner consistant with the - toolkit in use. +The users configurations are generally stored in a "Choices" file and + are loaded at browser startup. Most user interfaces provide a way + to configure these parameters in a manner consistant with the + toolkit in use. - The user choices are stored as a simple key:value list. +The user choices are stored as a simple key:value list. - Each entry has a type, one of: boolean, integer, unsigned integer, - hexadecimal colour value or string. +Each entry has a type, one of: boolean, integer, unsigned integer, + hexadecimal colour value or string. General Options =============== -+----------------------+--------+-----------+----------------------------------+ -| Option Key | Type | Default | Description | -+----------------------+--------+-----------+----------------------------------+ -| http_proxy | bool | false | An HTTP proxy should be used. | -| | | | | -| http_proxy | bool | false | An HTTP proxy should be used. | -| | | | | -| http_proxy_host | string | NULL | Hostname of proxy. | -| | | | | -| http_proxy_port | int | 8080 | Proxy port. | -| | | | | -| http_proxy_auth | int | 0 | Proxy authentication method. | -| | | | | -| http_proxy_auth_user | string | NULL | Proxy authentication user name | -| | | | | -| http_proxy_auth_pass | string | NULL | Proxy authentication password | -| | | | | -| http_proxy_noproxy | string | localhost | Proxy omission list | -| | | | | -| font_size | int | 128 | Default font size / 0.1pt. | -| | | | | -| font_min_size | int | 85 | Minimum font size. | -| | | | | -| font_sans | string | NULL | Default sans serif font | -| | | | | -| font_serif | string | NULL | Default serif font | -| | | | | -| font_mono | string | NULL | Default monospace font -| | | | | -| font_cursive | string | NULL | Default cursive font -| | | | | -| font_fantasy | string | NULL | Default fantasy font -| | | | | -| accept_language | string | NULL | Accept-Language header. -| | | | | -| accept_charset | string | NULL | Accept-Charset header. -| | | | | -| memory_cache_size | int | 12MiB | Preferred maximum size of memory | -| | | | cache in bytes. | -| | | | | -| disc_cache_size | uint | 1GiB | Preferred expiry size of disc | -| | | | cache in bytes. | -| | | | | -| disc_cache_age | int | 28 | Preferred expiry age of disc | -| | | | cache in days. | -| | | | | -| block_advertisements | bool | false | Whether to block advertisements -| | | | | -| do_not_track | bool | false | Disable website tracking [1] -| | | | | -| minimum_gif_delay | int | 10 | Minimum GIF animation delay -| | | | | -| send_referer | bool | true | Whether to send the referer HTTP | -| | | | header. | -| | | | | -| foreground_images | bool | true | Whether to fetch foreground images -| | | | | -| background_images | bool | true | Whether to fetch background images -| | | | | -| animate_images | bool | true | Whether to animate images -| | | | | -| enable_javascript | bool | false | Whether to execute javascript -| | | | | -| script_timeout | int | 10 | Maximum time to wait for a script| -| | | | to run in seconds | -| | | | | -| expire_url | int | 28 | How many days to retain URL data | -| | | | for. | -| | | | | -| font_default | int | 0 | Default font family -| | | | | -| ca_bundle | string | NULL | ca-bundle location -| | | | | -| ca_path | string | NULL | ca-path location -| | | | | -| cookie_file | string | NULL | Cookie file location -| | | | | -| cookie_jar | string | NULL | Cookie jar location -| | | | | -| homepage_url | string | NULL | Home page location -| | | | | -| search_url_bar | bool | false | search web from url bar -| | | | | -| search_provider | int | 0 | default web search provider -| | | | | -| url_suggestion | bool | true | URL completion in url bar -| | | | | -| window_x | int | 0 | default x position of new windows -| | | | | -| window_y | int | 0 | default y position of new windows -| | | | | -| window_width | int | 0 | default width of new windows -| | | | | -| window_height | int | 0 | default height of new windows -| | | | | -| window_screen_width | int | 0 | width of screen when above | -| | | | options were saved | -| | | | | -| window_screen_height | int | 0 | height of screen when above | -| | | | options were saved | -| | | | | -| toolbar_status_size | int | 6667 | default size of status bar vs. | -| | | | h scroll bar | -| | | | | -| scale | int | 100 | default window scale -| | | | | -| incremental_reflow | bool | true | Whether to reflow web pages while| -| | | | objects are fetching | -| | | | | -| min_reflow_period | uint | 25 | Minimum time (in cs) between HTML| -| | | | reflows while objects are fetching -| | | | | -| core_select_menu | bool | false | Use core selection menu | -| | | | | -+----------------------+--------+-----------+----------------------------------+ + Option Key | Type | Default | Description + -------------------- | ------ | --------- | -------------------------------- + http_proxy | bool | false | An HTTP proxy should be used. + http_proxy | bool | false | An HTTP proxy should be used. + http_proxy_host | string | NULL | Hostname of proxy. + http_proxy_port | int | 8080 | Proxy port. + http_proxy_auth | int | 0 | Proxy authentication method. + http_proxy_auth_user | string | NULL | Proxy authentication user name + http_proxy_auth_pass | string | NULL | Proxy authentication password + http_proxy_noproxy | string | localhost | Proxy omission list + font_size | int | 128 | Default font size / 0.1pt. + font_min_size | int | 85 | Minimum font size. + font_sans | string | NULL | Default sans serif font + font_serif | string | NULL | Default serif font + font_mono | string | NULL | Default monospace font + font_cursive | string | NULL | Default cursive font + font_fantasy | string | NULL | Default fantasy font + accept_language | string | NULL | Accept-Language header. + accept_charset | string | NULL | Accept-Charset header. + memory_cache_size | int | 12MiB | Preferred maximum size of memory cache in bytes. + disc_cache_size | uint | 1GiB | Preferred expiry size of disc cache in bytes. + disc_cache_age | int | 28 | Preferred expiry age of disc cache in days. + block_advertisements | bool | false | Whether to block advertisements + do_not_track | bool | false | Disable website tracking [1] + minimum_gif_delay | int | 10 | Minimum GIF animation delay + send_referer | bool | true | Whether to send the referer HTTP header. + foreground_images | bool | true | Whether to fetch foreground images + background_images | bool | true | Whether to fetch background images + animate_images | bool | true | Whether to animate images + enable_javascript | bool | false | Whether to execute javascript + script_timeout | int | 10 | Maximum time to wait for a script to run in seconds + expire_url | int | 28 | How many days to retain URL data for. + font_default | int | 0 | Default font family + ca_bundle | string | NULL | ca-bundle location + ca_path | string | NULL | ca-path location + cookie_file | string | NULL | Cookie file location + cookie_jar | string | NULL | Cookie jar location + homepage_url | string | NULL | Home page location + search_url_bar | bool | false | search web from url bar + search_provider | int | 0 | default web search provider + url_suggestion | bool | true | URL completion in url bar + window_x | int | 0 | default x position of new windows + window_y | int | 0 | default y position of new windows + window_width | int | 0 | default width of new windows + window_height | int | 0 | default height of new windows + window_screen_width | int | 0 | width of screen when above options were saved + window_screen_height | int | 0 | height of screen when above options were saved + toolbar_status_size | int | 6667 | default size of status bar vs. h scroll bar + scale | int | 100 | default window scale + incremental_reflow | bool | true | Whether to reflow web pages while objects are fetching + min_reflow_period | uint | 25 | Minimum time (in cs) between HTML reflows while objects are fetching + core_select_menu | bool | false | Use core selection menu [1] http://www.w3.org/Submission/2011/SUBM-web-tracking-protection-20110224/#dnt-uas Fetcher options =============== -+--------------------------+------+------+-------------------------------------+ -| Option Key | Type | Dflt | Description | -+--------------------------+------+------+-------------------------------------+ -| max_fetchers | int | 24 | Maximum simultaneous active fetchers| -| | | | | -| max_fetchers_per_host | int | 5 | Maximum simultaneous active fetchers| -| | | | per host. (<=option_max_fetchers | -| | | | else it makes no sense) [2] | -| | | | | -| max_cached_fetch_handles | int | 6 | Maximum number of inactive fetchers | -| | | | cached. The total number of handles| -| | | | netsurf will therefore have open is| -| | | | this plus option_max_fetchers. | -| | | | | -| suppress_curl_debug | bool | true | Suppress debug output from cURL. | -| | | | | -| target_blank | bool | true | Whether to allow target="_blank" | -| | | | | -| button_2_tab | bool | true | Whether second mouse button opens in| -| | | | new tab. | -| | | | | -+--------------------------+------+------+-------------------------------------+ + Option Key | Type | Default | Description + ------------------------ | -----| ------- | ----------------------------------- + max_fetchers | int | 24 | Maximum simultaneous active fetchers + max_fetchers_per_host | int | 5 | Maximum simultaneous active fetchers per host. (<=option_max_fetchers else it makes no sense) [2] + max_cached_fetch_handles | int | 6 | Maximum number of inactive fetchers cached. The total number of handles netsurf will therefore have open is this plus option_max_fetchers. + suppress_curl_debug | bool | true | Suppress debug output from cURL. + target_blank | bool | true | Whether to allow target="_blank" + button_2_tab | bool | true | Whether second mouse button opens in new tab. [2] Note that rfc2616 section 8.1.4 says that there should be no more than two keepalive connections per host. None of the main browsers @@ -174,32 +96,18 @@ Fetcher options PDF / Print options =================== -+------------------------+------+-------+--------------------------------------+ -| Option Key | Type | Deflt | Description | -+------------------------+------+-------+--------------------------------------+ -| margin_top | int | 10 | top margin of exported page | -| | | | | -| margin_bottom | int | 10 | bottom margin of exported page | -| | | | | -| margin_left | int | 10 | left margin of exported page | -| | | | | -| margin_right | int | 10 | right margin of exported page | -| | | | | -| export_scale | int | 70 | scale of exported content | -| | | | | -| suppress_images | bool | false | suppressing images in printed content| -| | | | | -| remove_backgrounds | bool | false | turning off all backgrounds for | -| | | | printed content | -| | | | | -| enable_loosening | bool | true | turning on content loosening for | -| | | | printed content | -| | | | | -| enable_PDF_compression | bool | true | compression of PDF documents | -| | | | | -| enable_PDF_password | bool | false | setting a password and encoding PDF | -| | | | documents | -+------------------------+------+-------+--------------------------------------+ + Option Key | Type | Deflt | Description + ---------------------- | ---- | ----- | ------------------------------------ + margin_top | int | 10 | top margin of exported page + margin_bottom | int | 10 | bottom margin of exported page + margin_left | int | 10 | left margin of exported page + margin_right | int | 10 | right margin of exported page + export_scale | int | 70 | scale of exported content + suppress_images | bool | false | suppressing images in printed content + remove_backgrounds | bool | false | turning off all backgrounds for printed content + enable_loosening | bool | true | turning on content loosening for printed content + enable_PDF_compression | bool | true | compression of PDF documents + enable_PDF_password | bool | false | setting a password and encoding PDF documents System colours ============== @@ -207,35 +115,33 @@ System colours These are the css system colours which the browser also uses to style generated output. -+--------------------------------+--------+------------+ -| Option Key | Type | Default | -+--------------------------------+--------+------------+ -| sys_colour_ActiveBorder | colour | 0x00d3d3d3 | -| sys_colour_ActiveCaption | colour | 0x00f1f1f1 | -| sys_colour_AppWorkspace | colour | 0x00f1f1f1 | -| sys_colour_Background | colour | 0x006e6e6e | -| sys_colour_ButtonFace | colour | 0x00f9f9f9 | -| sys_colour_ButtonHighlight | colour | 0x00ffffff | -| sys_colour_ButtonShadow | colour | 0x00aeaeae | -| sys_colour_ButtonText | colour | 0x004c4c4c | -| sys_colour_CaptionText | colour | 0x004c4c4c | -| sys_colour_GrayText | colour | 0x00505050 | -| sys_colour_Highlight | colour | 0x00c00800 | -| sys_colour_HighlightText | colour | 0x00ffffff | -| sys_colour_InactiveBorder | colour | 0x00f1f1f1 | -| sys_colour_InactiveCaption | colour | 0x00e6e6e6 | -| sys_colour_InactiveCaptionText | colour | 0x00a6a6a6 | -| sys_colour_InfoBackground | colour | 0x008fdfef | -| sys_colour_InfoText | colour | 0x00000000 | -| sys_colour_Menu | colour | 0x00f1f1f1 | -| sys_colour_MenuText | colour | 0x004e4e4e | -| sys_colour_Scrollbar | colour | 0x00cccccc | -| sys_colour_ThreeDDarkShadow | colour | 0x00aeaeae | -| sys_colour_ThreeDFace | colour | 0x00f9f9f9 | -| sys_colour_ThreeDHighlight | colour | 0x00ffffff | -| sys_colour_ThreeDLightShadow | colour | 0x00ffffff | -| sys_colour_ThreeDShadow | colour | 0x00d5d5d5 | -| sys_colour_Window | colour | 0x00f1f1f1 | -| sys_colour_WindowFrame | colour | 0x004e4e4e | -| sys_colour_WindowText | colour | 0x00000000 | -+--------------------------------+--------+------------+ + Option Key | Type | Default + ------------------------------ | ------ | ---------- + sys_colour_ActiveBorder | colour | 0x00d3d3d3 + sys_colour_ActiveCaption | colour | 0x00f1f1f1 + sys_colour_AppWorkspace | colour | 0x00f1f1f1 + sys_colour_Background | colour | 0x006e6e6e + sys_colour_ButtonFace | colour | 0x00f9f9f9 + sys_colour_ButtonHighlight | colour | 0x00ffffff + sys_colour_ButtonShadow | colour | 0x00aeaeae + sys_colour_ButtonText | colour | 0x004c4c4c + sys_colour_CaptionText | colour | 0x004c4c4c + sys_colour_GrayText | colour | 0x00505050 + sys_colour_Highlight | colour | 0x00c00800 + sys_colour_HighlightText | colour | 0x00ffffff + sys_colour_InactiveBorder | colour | 0x00f1f1f1 + sys_colour_InactiveCaption | colour | 0x00e6e6e6 + sys_colour_InactiveCaptionText | colour | 0x00a6a6a6 + sys_colour_InfoBackground | colour | 0x008fdfef + sys_colour_InfoText | colour | 0x00000000 + sys_colour_Menu | colour | 0x00f1f1f1 + sys_colour_MenuText | colour | 0x004e4e4e + sys_colour_Scrollbar | colour | 0x00cccccc + sys_colour_ThreeDDarkShadow | colour | 0x00aeaeae + sys_colour_ThreeDFace | colour | 0x00f9f9f9 + sys_colour_ThreeDHighlight | colour | 0x00ffffff + sys_colour_ThreeDLightShadow | colour | 0x00ffffff + sys_colour_ThreeDShadow | colour | 0x00d5d5d5 + sys_colour_Window | colour | 0x00f1f1f1 + sys_colour_WindowFrame | colour | 0x004e4e4e + sys_colour_WindowText | colour | 0x00000000 diff --git a/frontends/atari/treeview.c b/frontends/atari/treeview.c index a72d268..abc1fa7 100644 --- a/frontends/atari/treeview.c +++ b/frontends/atari/treeview.c @@ -16,21 +16,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <sys/types.h> -#include <string.h> - #include "assert.h" -#include "cflib.h" -#include "netsurf/inttypes.h" -#include "utils/nsoption.h" #include "utils/log.h" #include "utils/messages.h" -#include "utils/utils.h" -#include "netsurf/plotters.h" -#include "netsurf/mouse.h" +#include "netsurf/inttypes.h" #include "netsurf/core_window.h" -#include "desktop/treeview.h" +#include "netsurf/plotters.h" #include "atari/gui.h" #include "atari/plot/plot.h" @@ -40,29 +32,6 @@ #include "atari/res/netsurf.rsh" -/** - * Declare Core Window Callbacks: - */ - -nserror atari_treeview_invalidate_area(struct core_window *cw, const struct rect *r); -void atari_treeview_update_size(struct core_window *cw, int width, int height); -void atari_treeview_scroll_visible(struct core_window *cw, - const struct rect *r); -void atari_treeview_get_window_dimensions(struct core_window *cw, - int *width, int *height); - // TODO: implement drag status! -void atari_treeview_drag_status(struct core_window *cw, - core_window_drag_status ds); - -static struct core_window_callback_table cw_t = { - .invalidate = atari_treeview_invalidate_area, - .update_size = atari_treeview_update_size, - .scroll_visible = atari_treeview_scroll_visible, - .get_window_dimensions = atari_treeview_get_window_dimensions, - .drag_status = atari_treeview_drag_status -}; - - struct atari_treeview_window { struct atari_treeview_window * prev_open; struct atari_treeview_window * next_open; @@ -80,23 +49,12 @@ struct atari_treeview_window { static struct atari_treeview_window * treeviews_open; -/* native GUI event handlers: */ -static void on_mbutton_event(struct core_window *cw, EVMULT_OUT *ev_out, - short msg[8]); -static void on_keybd_event(struct core_window *cw, EVMULT_OUT *ev_out, - short msg[8]); -static void on_redraw_event(struct core_window *cw, EVMULT_OUT *ev_out, - short msg[8]); - -/* static utils: */ -//static void atari_treeview_dump_info(struct atari_treeview_window *tv, char *s); - /** * Schedule a redraw of the treeview content * */ -static void atari_treeview_redraw_grect_request(struct core_window *cw, - GRECT *area) +static void +atari_treeview_redraw_grect_request(struct core_window *cw, GRECT *area) { struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; if (cw != NULL) { @@ -114,264 +72,77 @@ static void atari_treeview_redraw_grect_request(struct core_window *cw, int oldy1 = tv->rdw_area.g_y + tv->rdw_area.g_h; tv->rdw_area.g_x = MIN(tv->rdw_area.g_x, area->g_x); tv->rdw_area.g_y = MIN(tv->rdw_area.g_y, area->g_y); - tv->rdw_area.g_w = ( oldx1 > newx1 ) ? oldx1 - tv->rdw_area.g_x : newx1 - tv->rdw_area.g_x; - tv->rdw_area.g_h = ( oldy1 > newy1 ) ? oldy1 - tv->rdw_area.g_y : newy1 - tv->rdw_area.g_y; - } - //dbg_grect("atari_treeview_request_redraw_grect", &tv->rdw_area); - } -} - - -void atari_treeview_get_grect(struct core_window *cw, enum treeview_area_e mode, - GRECT *dest) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; + if ( oldx1 > newx1 ) { + tv->rdw_area.g_w = oldx1 - tv->rdw_area.g_x; + } else { + tv->rdw_area.g_w = newx1 - tv->rdw_area.g_x; + } - if (mode == TREEVIEW_AREA_CONTENT) { - gemtk_wm_get_grect(tv->window, GEMTK_WM_AREA_CONTENT, dest); - } - else if (mode == TREEVIEW_AREA_TOOLBAR) { - gemtk_wm_get_grect(tv->window, GEMTK_WM_AREA_TOOLBAR, dest); + if ( oldy1 > newy1 ) { + tv->rdw_area.g_h = oldy1 - tv->rdw_area.g_y; + } else { + tv->rdw_area.g_h = newy1 - tv->rdw_area.g_y; + } + } + //dbg_grect("atari_treeview_request_redraw_grect", &tv->rdw_area); } } -GUIWIN * atari_treeview_get_gemtk_window(struct core_window *cw) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; - return(tv->window); -} -/* -static void atari_treeview_dump_info(struct atari_treeview_window *tv, - char * title) +#ifdef ATARI_TREEVIEW_DUMP +static void +atari_treeview_dump_info(struct atari_treeview_window *tv, char * title) { printf("Treeview Dump (%s)\n", title); printf("=================================\n"); gemtk_wm_dump_window_info(atari_treeview_get_gemtk_window((struct core_window *)tv)); GEMTK_DBG_GRECT("Redraw Area: \n", &tv->rdw_area) - dbg_grect("Redraw Area2: \n", &tv->rdw_area); + dbg_grect("Redraw Area2: \n", &tv->rdw_area); printf("Extent: x: %d, y: %d\n", tv->extent.x, tv->extent.y); } -*/ +#endif -static bool atari_treeview_is_iconified(struct core_window *cw){ - struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; +static bool atari_treeview_is_iconified(struct core_window *cw) +{ + struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; - return((gemtk_wm_get_state(tv->window)&GEMTK_WM_STATUS_ICONIFIED) != 0); + return((gemtk_wm_get_state(tv->window)&GEMTK_WM_STATUS_ICONIFIED) != 0); } -static void atari_treeview_redraw_icon(struct core_window *cw, GRECT *clip) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; - GRECT visible, work; - OBJECT * tree = gemtk_obj_get_tree(ICONIFY); - short aesh = gemtk_wm_get_handle(tv->window); - - gemtk_wm_get_grect(tv->window, GEMTK_WM_AREA_WORK, &work); - - tree->ob_x = work.g_x; - tree->ob_y = work.g_y; - tree->ob_width = work.g_w; - tree->ob_height = work.g_h; - - wind_get_grect(aesh, WF_FIRSTXYWH, &visible); - while (visible.g_h > 0 && visible.g_w > 0) { - - if (rc_intersect(&work, &visible)) { - objc_draw(tree, 0, 8, visible.g_x, visible.g_y, visible.g_w, - visible.g_h); - } else { - //dbg_grect("redraw vis area outside", &visible); - } - - wind_get_grect(aesh, WF_NEXTXYWH, &visible); - } -} -void atari_treeview_redraw(struct core_window *cw) +static void atari_treeview_redraw_icon(struct core_window *cw, GRECT *clip) { struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; - short pxy[4]; - - if (tv != NULL && tv->is_open) { - if( tv->redraw && ((plot_get_flags() & PLOT_FLAG_OFFSCREEN) == 0) ) { - - short todo[4]; - GRECT work; - short handle = gemtk_wm_get_handle(tv->window); - struct gemtk_wm_scroll_info_s *slid; - - gemtk_wm_get_grect(tv->window, GEMTK_WM_AREA_CONTENT, &work); - slid = gemtk_wm_get_scroll_info(tv->window); - -// // Debug code: this 3 lines help to inspect the redraw -// // areas... -// pxy[0] = work.g_x; -// pxy[1] = work.g_y; -// pxy[2] = pxy[0] + work.g_w-1; -// pxy[3] = pxy[1] + work.g_h-1; -// -// vsf_color(plot_get_vdi_handle(), 0); -// v_bar(plot_get_vdi_handle(), (short*)&pxy); -// evnt_timer(500); - - struct redraw_context ctx = { - .interactive = true, - .background_images = true, - .plot = &atari_plotters - }; - plot_set_dimensions(&ctx, - work.g_x, - work.g_y, - work.g_w, - work.g_h); - if (plot_lock() == false) - return; - - if( wind_get(handle, WF_FIRSTXYWH, - &todo[0], &todo[1], &todo[2], &todo[3] )!=0 ) { - while (todo[2] && todo[3]) { - - if(!rc_intersect(&work, (GRECT*)&todo)){ - if (wind_get(handle, WF_NEXTXYWH, - &todo[0], &todo[1], &todo[2], &todo[3])==0) { - break; - } - continue; - } - pxy[0] = todo[0]; - pxy[1] = todo[1]; - pxy[2] = todo[0] + todo[2]-1; - pxy[3] = todo[1] + todo[3]-1; - vs_clip(plot_get_vdi_handle(), 1, (short*)&pxy); - - // Debug code: this 3 lines help to inspect the redraw - // areas... - -// vsf_color(plot_get_vdi_handle(), 3); -// v_bar(plot_get_vdi_handle(), (short*)&pxy); -// evnt_timer(500); - + GRECT visible, work; + OBJECT * tree = gemtk_obj_get_tree(ICONIFY); + short aesh = gemtk_wm_get_handle(tv->window); - /* convert screen to treeview coords: */ - todo[0] = todo[0] - work.g_x ;//+ slid->x_pos*slid->x_unit_px; - todo[1] = todo[1] - work.g_y ;//+ slid->y_pos*slid->y_unit_px; - if( todo[0] < 0 ){ - todo[2] = todo[2] + todo[0]; - todo[0] = 0; - } - if( todo[1] < 0 ){ - todo[3] = todo[3] + todo[1]; - todo[1] = 0; - } + gemtk_wm_get_grect(tv->window, GEMTK_WM_AREA_WORK, &work); - if (rc_intersect((GRECT *)&tv->rdw_area,(GRECT *)&todo)) { - struct rect clip; + tree->ob_x = work.g_x; + tree->ob_y = work.g_y; + tree->ob_width = work.g_w; + tree->ob_height = work.g_h; - clip.x0 = todo[0]+(slid->x_pos*slid->x_unit_px); - clip.y0 = todo[1]+(slid->y_pos*slid->y_unit_px); - clip.x1 = clip.x0 + todo[2]+(slid->x_pos*slid->x_unit_px); - clip.y1 = clip.y0 + todo[3]+(slid->y_pos*slid->y_unit_px); + wind_get_grect(aesh, WF_FIRSTXYWH, &visible); + while (visible.g_h > 0 && visible.g_w > 0) { - tv->io->draw(cw, -(slid->x_pos*slid->x_unit_px), - -(slid->y_pos*slid->y_unit_px), - &clip, &ctx); - } - vs_clip(plot_get_vdi_handle(), 0, (short*)&pxy); - if (wind_get(handle, WF_NEXTXYWH, - &todo[0], &todo[1], &todo[2], &todo[3])==0) { - break; - } - } - } else { - plot_unlock(); - return; - } - plot_unlock(); - tv->redraw = false; - tv->rdw_area.g_x = 65000; - tv->rdw_area.g_y = 65000; - tv->rdw_area.g_w = -1; - tv->rdw_area.g_h = -1; + if (rc_intersect(&work, &visible)) { + objc_draw(tree, 0, 8, visible.g_x, visible.g_y, visible.g_w, + visible.g_h); } else { - /* just copy stuff from the offscreen buffer */ + //dbg_grect("redraw vis area outside", &visible); } - } -} - - -/** - * GEMTK (netsurf's GEM toolkit) event sink - * -*/ -static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) -{ - short retval = 0; - struct atari_treeview_window *tv = (struct atari_treeview_window *) - gemtk_wm_get_user_data(win); - struct core_window *cw = (struct core_window *)tv; - - if( (ev_out->emo_events & MU_MESAG) != 0 ) { - // handle message - switch (msg[0]) { - - case WM_REDRAW: - on_redraw_event(cw, ev_out, msg); - break; - - default: - break; - } - } - if( (ev_out->emo_events & MU_KEYBD) != 0 ) { - on_keybd_event(cw, ev_out, msg); - } - if( (ev_out->emo_events & MU_BUTTON) != 0 ) { - LOG("Treeview click at: %d,%d\n", ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y); - on_mbutton_event(cw, ev_out, msg); - } - - if(tv != NULL && tv->io->gemtk_user_func != NULL){ - tv->io->gemtk_user_func(win, ev_out, msg); - } - - // TODO: evaluate return values of event handler functions and pass them on: - return(retval); -} - -static void __CDECL on_keybd_event(struct core_window *cw, EVMULT_OUT *ev_out, - short msg[8]) -{ - long kstate = 0; - long kcode = 0; - long ucs4; - long ik; - unsigned short nkc = 0; - unsigned char ascii; - struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; - - kstate = ev_out->emo_kmeta; - kcode = ev_out->emo_kreturn; - nkc= gem_to_norm( (short)kstate, (short)kcode ); - ascii = (nkc & 0xFF); - ik = nkc_to_input_key(nkc, &ucs4); - - if (ik == 0) { - if (ascii >= 9) { - tv->io->keypress(cw, ucs4); - } - } else { - tv->io->keypress(cw, ik); + wind_get_grect(aesh, WF_NEXTXYWH, &visible); } } -static void __CDECL on_redraw_event(struct core_window *cw, - EVMULT_OUT *ev_out, - short msg[8]) +static void __CDECL +on_redraw_event(struct core_window *cw, EVMULT_OUT *ev_out, short msg[8]) { GRECT work, clip; struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; @@ -428,9 +199,9 @@ static void __CDECL on_redraw_event(struct core_window *cw, } } -static void __CDECL on_mbutton_event(struct core_window *cw, - EVMULT_OUT *ev_out, - short msg[8]) + +static void __CDECL +on_mbutton_event(struct core_window *cw, EVMULT_OUT *ev_out, short msg[8]) { struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; struct gemtk_wm_scroll_info_s *slid; @@ -447,26 +218,26 @@ static void __CDECL on_mbutton_event(struct core_window *cw, /* mouse click relative origin: */ - short origin_rel_x = (mx-work.g_x) + - (slid->x_pos*slid->x_unit_px); - short origin_rel_y = (my-work.g_y) + - (slid->y_pos*slid->y_unit_px); + short origin_rel_x = (mx-work.g_x) + (slid->x_pos*slid->x_unit_px); + short origin_rel_y = (my-work.g_y) + (slid->y_pos*slid->y_unit_px); /* Only pass on events in the content area: */ - if( origin_rel_x >= 0 && origin_rel_y >= 0 - && mx < work.g_x + work.g_w - && my < work.g_y + work.g_h ) - { + if ((origin_rel_x >= 0) && + (origin_rel_y >= 0) && + (mx < work.g_x + work.g_w) && + (my < work.g_y + work.g_h)) { if (ev_out->emo_mclicks == 2) { tv->io->mouse_action(cw, - BROWSER_MOUSE_CLICK_1|BROWSER_MOUSE_DOUBLE_CLICK, - origin_rel_x, origin_rel_y); + BROWSER_MOUSE_CLICK_1 | + BROWSER_MOUSE_DOUBLE_CLICK, + origin_rel_x, + origin_rel_y); return; } graf_mkstate(&cur_rel_x, &cur_rel_y, &mbut, &dummy); /* check for click or hold: */ - if( (mbut&1) == 0 ){ + if ((mbut & 1) == 0 ) { int bms; bms = BROWSER_MOUSE_CLICK_1 | BROWSER_MOUSE_PRESS_1; if(ev_out->emo_mclicks == 2 ) { @@ -486,174 +257,126 @@ static void __CDECL on_mbutton_event(struct core_window *cw, tv->startdrag.x = origin_rel_x; tv->startdrag.y = origin_rel_y; /* First, report mouse press, to trigger entry selection */ - tv->io->mouse_action(cw, BROWSER_MOUSE_CLICK_1 | BROWSER_MOUSE_PRESS_1, cur_rel_x, - cur_rel_y); + tv->io->mouse_action(cw, + BROWSER_MOUSE_CLICK_1 | + BROWSER_MOUSE_PRESS_1, + cur_rel_x, + cur_rel_y); atari_treeview_redraw(cw); - tv->io->mouse_action(cw, BROWSER_MOUSE_DRAG_1 | BROWSER_MOUSE_DRAG_ON, - cur_rel_x, cur_rel_y); - do{ - if (abs(prev_x-cur_rel_x) > 5 || abs(prev_y-cur_rel_y) > 5) { + tv->io->mouse_action(cw, + BROWSER_MOUSE_DRAG_1 | + BROWSER_MOUSE_DRAG_ON, + cur_rel_x, + cur_rel_y); + do { + if (abs(prev_x-cur_rel_x) > 5 || + abs(prev_y-cur_rel_y) > 5) { tv->io->mouse_action(cw, - BROWSER_MOUSE_HOLDING_1 | BROWSER_MOUSE_DRAG_ON, - cur_rel_x, cur_rel_y); + BROWSER_MOUSE_HOLDING_1 | + BROWSER_MOUSE_DRAG_ON, + cur_rel_x, + cur_rel_y); prev_x = cur_rel_x; prev_y = cur_rel_y; } if (tv->redraw) { // TODO: maybe GUI poll would fit better here? - // ... is gui_poll re-entrance save? + // ... is gui_poll re-entrance save? atari_treeview_redraw(cw); } /* sample mouse button state: */ - graf_mkstate(&cur_rel_x, &cur_rel_y, &mbut, &dummy); - cur_rel_x = (cur_rel_x-work.g_x)+(slid->x_pos*slid->x_unit_px); - cur_rel_y = (cur_rel_y-work.g_y)+(slid->y_pos*slid->y_unit_px); - } while( mbut & 1 ); + graf_mkstate(&cur_rel_x, + &cur_rel_y, + &mbut, + &dummy); + cur_rel_x = (cur_rel_x-work.g_x) + + (slid->x_pos*slid->x_unit_px); + cur_rel_y = (cur_rel_y-work.g_y) + + (slid->y_pos*slid->y_unit_px); + } while (mbut & 1); /* End drag: */ - tv->io->mouse_action(cw, BROWSER_MOUSE_HOVER, cur_rel_x, cur_rel_y); + tv->io->mouse_action(cw, + BROWSER_MOUSE_HOVER, + cur_rel_x, + cur_rel_y); gem_set_cursor(&gem_cursors.arrow); } } } -struct core_window * -atari_treeview_create(GUIWIN *win, struct atari_treeview_callbacks * callbacks, - void * user_data, uint32_t flags) +static void __CDECL +on_keybd_event(struct core_window *cw, EVMULT_OUT *ev_out, short msg[8]) { + long kstate = 0; + long kcode = 0; + long ucs4; + long ik; + unsigned short nkc = 0; + unsigned char ascii; + struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; - /* allocate the core_window struct: */ - struct atari_treeview_window * tv; - struct gemtk_wm_scroll_info_s *slid; + kstate = ev_out->emo_kmeta; + kcode = ev_out->emo_kreturn; + nkc= gem_to_norm( (short)kstate, (short)kcode ); + ascii = (nkc & 0xFF); + ik = nkc_to_input_key(nkc, &ucs4); - tv = calloc(1, sizeof(struct atari_treeview_window)); - if (tv == NULL) { - LOG("calloc failed"); - atari_warn_user(messages_get_errorcode(NSERROR_NOMEM), 0); - return NULL; + if (ik == 0) { + if (ascii >= 9) { + tv->io->keypress(cw, ucs4); + } + } else { + tv->io->keypress(cw, ik); } +} - /* Store the window ref inside the new treeview: */ - tv->window = win; - tv->io = callbacks; - tv->user_data = user_data; - - // Setup gemtk event handler function: - gemtk_wm_set_event_handler(win, handle_event); - // bind window user data to treeview ref: - gemtk_wm_set_user_data(win, (void*)tv); +/** + * GEMTK (netsurf's GEM toolkit) event sink + * + */ +static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) +{ + short retval = 0; + struct atari_treeview_window *tv = (struct atari_treeview_window *) + gemtk_wm_get_user_data(win); + struct core_window *cw = (struct core_window *)tv; - // Get acces to the gemtk scroll info struct: - slid = gemtk_wm_get_scroll_info(tv->window); + if( (ev_out->emo_events & MU_MESAG) != 0 ) { + // handle message + switch (msg[0]) { - // Setup line and column height/width of the window, - // each scroll takes the configured steps: - slid->y_unit_px = 16; - slid->x_unit_px = 16; + case WM_REDRAW: + on_redraw_event(cw, ev_out, msg); + break; - assert(tv->io); - assert(tv->io->init_phase2); + default: + break; + } + } + if ((ev_out->emo_events & MU_KEYBD) != 0 ) { + on_keybd_event(cw, ev_out, msg); + } + if ((ev_out->emo_events & MU_BUTTON) != 0 ) { + LOG("Treeview click at: %d,%d\n", + ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y); + on_mbutton_event(cw, ev_out, msg); + } - /* Now that the window is configured for treeview content, */ - /* call init_phase2 which must create the treeview */ - /* descriptor, and at least setup the the default */ - /* event handlers of the treeview: */ - /* It would be more simple to not pass around the callbacks */ - /* but the treeview constructor requires them for initialization... */ - nserror err = tv->io->init_phase2((struct core_window *)tv, &cw_t); - if (err != NSERROR_OK) { - free(tv); - tv = NULL; + if (tv != NULL && tv->io->gemtk_user_func != NULL){ + tv->io->gemtk_user_func(win, ev_out, msg); } - return((struct core_window *)tv); -} - -void atari_treeview_delete(struct core_window * cw) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; - - assert(tv); - assert(tv->io->finish); - - tv->io->finish(cw); - - free(tv); -} - - -void atari_treeview_open(struct core_window *cw, GRECT *pos) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; - if (tv->window != NULL && tv->is_open == false) { - tv->is_open = true; - wind_open_grect(gemtk_wm_get_handle(tv->window), pos); - gemtk_wm_link(tv->window); - if (treeviews_open == NULL) { - treeviews_open = tv; - treeviews_open->next_open = NULL; - treeviews_open->prev_open = NULL; - } else { - struct atari_treeview_window * tmp; - tmp = treeviews_open; - while(tmp->next_open != NULL){ - tmp = tmp->next_open; - } - tmp->next_open = tv; - tv->prev_open = tmp; - tv->next_open = NULL; - } - } -} - -bool atari_treeview_is_open(struct core_window *cw) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; - return(tv->is_open); -} - -void atari_treeview_set_user_data(struct core_window * cw, - void *user_data_ptr) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; - tv->user_data = user_data_ptr; -} - -void * atari_treeview_get_user_data(struct core_window * cw) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; - return(tv->user_data); -} - -void atari_treeview_close(struct core_window *cw) -{ - struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; - if (tv->window != NULL) { - tv->is_open = false; - wind_close(gemtk_wm_get_handle(tv->window)); - gemtk_wm_unlink(tv->window); - /* unlink the window: */ - if (tv->prev_open != NULL) { - tv->prev_open->next_open = tv->next_open; - } else { - treeviews_open = tv->next_open; - } - if (tv->next_open != NULL) { - tv->next_open->prev_open = tv->prev_open; - } - } + // TODO: evaluate return values of event handler functions and pass them on: + return(retval); } /** - * Core Window Callbacks: - */ - -/** * callback from core to request an invalidation of a window area. * * The specified area of the window should now be considered @@ -664,7 +387,9 @@ void atari_treeview_close(struct core_window *cw) * \param[in] r area to redraw or NULL for the entire window area. * \return NSERROR_OK on success or appropriate error code. */ -nserror atari_treeview_invalidate_area(struct core_window *cw, const struct rect *r) +static nserror +atari_treeview_invalidate_area(struct core_window *cw, + const struct rect *r) { GRECT area; struct gemtk_wm_scroll_info_s * slid; @@ -693,6 +418,7 @@ nserror atari_treeview_invalidate_area(struct core_window *cw, const struct rect return NSERROR_OK; } + /** * Update the limits of the window * @@ -700,7 +426,8 @@ nserror atari_treeview_invalidate_area(struct core_window *cw, const struct rect * \param width the width in px, or negative if don't care * \param height the height in px, or negative if don't care */ -void atari_treeview_update_size(struct core_window *cw, int width, int height) +static void +atari_treeview_update_size(struct core_window *cw, int width, int height) { GRECT area; struct gemtk_wm_scroll_info_s *slid; @@ -732,8 +459,10 @@ void atari_treeview_update_size(struct core_window *cw, int width, int height) tv->extent.y = height; - /*printf("units content: %d, units viewport: %d\n", (height/slid->y_unit_px), - (area.g_h/slid->y_unit_px));*/ + /* printf("units content: %d, units viewport: %d\n", + (height/slid->y_unit_px), + (area.g_h/slid->y_unit_px)); + */ gemtk_wm_update_slider(tv->window, GEMTK_WM_VH_SLIDER); } } @@ -745,10 +474,11 @@ void atari_treeview_update_size(struct core_window *cw, int width, int height) * \param cw the core window object * \param r rectangle to make visible */ -void atari_treeview_scroll_visible(struct core_window *cw, const struct rect *r) +static void +atari_treeview_scroll_visible(struct core_window *cw, const struct rect *r) { /* atari frontend doesn't support dragging outside the treeview */ - /* so there is no need to implement this? */ + /* so there is no need to implement this? */ } @@ -759,10 +489,13 @@ void atari_treeview_scroll_visible(struct core_window *cw, const struct rect *r) * \param width to be set to viewport width in px, if non NULL * \param height to be set to viewport height in px, if non NULL */ -void atari_treeview_get_window_dimensions(struct core_window *cw, - int *width, int *height) +static void +atari_treeview_get_window_dimensions(struct core_window *cw, + int *width, + int *height) { - if (cw != NULL && (width != NULL || height != NULL)) { + if ((cw != NULL) && + (width != NULL || height != NULL)) { GRECT work; atari_treeview_get_grect(cw, TREEVIEW_AREA_CONTENT, &work); *width = work.g_w; @@ -777,33 +510,322 @@ void atari_treeview_get_window_dimensions(struct core_window *cw, * \param cw the core window object * \param ds the current drag status */ -void atari_treeview_drag_status(struct core_window *cw, - core_window_drag_status ds) +static void +atari_treeview_drag_status(struct core_window *cw, core_window_drag_status ds) +{ + +} + + +/** + * Declare Core Window Callbacks: + */ +static struct core_window_callback_table cw_t = { + .invalidate = atari_treeview_invalidate_area, + .update_size = atari_treeview_update_size, + .scroll_visible = atari_treeview_scroll_visible, + .get_window_dimensions = atari_treeview_get_window_dimensions, + .drag_status = atari_treeview_drag_status +}; + + +/* exported interface documented in atari/treeview.h */ +struct core_window * +atari_treeview_create(GUIWIN *win, struct atari_treeview_callbacks * callbacks, + void * user_data, uint32_t flags) +{ + + /* allocate the core_window struct: */ + struct atari_treeview_window * tv; + struct gemtk_wm_scroll_info_s *slid; + + tv = calloc(1, sizeof(struct atari_treeview_window)); + if (tv == NULL) { + LOG("calloc failed"); + atari_warn_user(messages_get_errorcode(NSERROR_NOMEM), 0); + return NULL; + } + + /* Store the window ref inside the new treeview: */ + tv->window = win; + tv->io = callbacks; + tv->user_data = user_data; + + // Setup gemtk event handler function: + gemtk_wm_set_event_handler(win, handle_event); + + // bind window user data to treeview ref: + gemtk_wm_set_user_data(win, (void*)tv); + + // Get acces to the gemtk scroll info struct: + slid = gemtk_wm_get_scroll_info(tv->window); + + // Setup line and column height/width of the window, + // each scroll takes the configured steps: + slid->y_unit_px = 16; + slid->x_unit_px = 16; + + assert(tv->io); + assert(tv->io->init_phase2); + + /* Now that the window is configured for treeview content, */ + /* call init_phase2 which must create the treeview */ + /* descriptor, and at least setup the the default */ + /* event handlers of the treeview: */ + /* It would be more simple to not pass around the callbacks */ + /* but the treeview constructor requires them for initialization... */ + nserror err = tv->io->init_phase2((struct core_window *)tv, &cw_t); + if (err != NSERROR_OK) { + free(tv); + tv = NULL; + } + + return((struct core_window *)tv); +} + + +/* exported interface documented in atari/treeview.h */ +void +atari_treeview_get_grect(struct core_window *cw, + enum treeview_area_e mode, + GRECT *dest) +{ + + struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; + + if (mode == TREEVIEW_AREA_CONTENT) { + gemtk_wm_get_grect(tv->window, GEMTK_WM_AREA_CONTENT, dest); + } + else if (mode == TREEVIEW_AREA_TOOLBAR) { + gemtk_wm_get_grect(tv->window, GEMTK_WM_AREA_TOOLBAR, dest); + } +} + + +/* exported interface documented in atari/treeview.h */ +GUIWIN * atari_treeview_get_gemtk_window(struct core_window *cw) +{ + struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; + return(tv->window); +} + + +/* exported interface documented in atari/treeview.h */ +void atari_treeview_redraw(struct core_window *cw) +{ + struct atari_treeview_window *tv = (struct atari_treeview_window *)cw; + short pxy[4]; + + if (tv != NULL && tv->is_open) { + if( tv->redraw && ((plot_get_flags() & PLOT_FLAG_OFFSCREEN) == 0) ) { + + short todo[4]; + GRECT work; + short handle = gemtk_wm_get_handle(tv->window); + struct gemtk_wm_scroll_info_s *slid; + + gemtk_wm_get_grect(tv->window, GEMTK_WM_AREA_CONTENT, &work); + slid = gemtk_wm_get_scroll_info(tv->window); + +// // Debug code: this 3 lines help to inspect the redraw +// // areas... +// pxy[0] = work.g_x; +// pxy[1] = work.g_y; +// pxy[2] = pxy[0] + work.g_w-1; +// pxy[3] = pxy[1] + work.g_h-1; +// +// vsf_color(plot_get_vdi_handle(), 0); +// v_bar(plot_get_vdi_handle(), (short*)&pxy); +// evnt_timer(500); + + struct redraw_context ctx = { + .interactive = true, + .background_images = true, + .plot = &atari_plotters + }; + plot_set_dimensions(&ctx, + work.g_x, + work.g_y, + work.g_w, + work.g_h); + if (plot_lock() == false) + return; + + if( wind_get(handle, WF_FIRSTXYWH, + &todo[0], &todo[1], &todo[2], &todo[3] )!=0 ) { + while (todo[2] && todo[3]) { + + if(!rc_intersect(&work, (GRECT*)&todo)){ + if (wind_get(handle, WF_NEXTXYWH, + &todo[0], &todo[1], &todo[2], &todo[3])==0) { + break; + } + continue; + } + pxy[0] = todo[0]; + pxy[1] = todo[1]; + pxy[2] = todo[0] + todo[2]-1; + pxy[3] = todo[1] + todo[3]-1; + vs_clip(plot_get_vdi_handle(), 1, (short*)&pxy); + + // Debug code: this 3 lines help to inspect the redraw + // areas... + +// vsf_color(plot_get_vdi_handle(), 3); +// v_bar(plot_get_vdi_handle(), (short*)&pxy); +// evnt_timer(500); + + + /* convert screen to treeview coords: */ + todo[0] = todo[0] - work.g_x ;//+ slid->x_pos*slid->x_unit_px; + todo[1] = todo[1] - work.g_y ;//+ slid->y_pos*slid->y_unit_px; + if( todo[0] < 0 ){ + todo[2] = todo[2] + todo[0]; + todo[0] = 0; + } + if( todo[1] < 0 ){ + todo[3] = todo[3] + todo[1]; + todo[1] = 0; + } + + if (rc_intersect((GRECT *)&tv->rdw_area,(GRECT *)&todo)) { + struct rect clip; + + clip.x0 = todo[0]+(slid->x_pos*slid->x_unit_px); + clip.y0 = todo[1]+(slid->y_pos*slid->y_unit_px); + clip.x1 = clip.x0 + todo[2]+(slid->x_pos*slid->x_unit_px); + clip.y1 = clip.y0 + todo[3]+(slid->y_pos*slid->y_unit_px); + + tv->io->draw(cw, -(slid->x_pos*slid->x_unit_px), + -(slid->y_pos*slid->y_unit_px), + &clip, &ctx); + } + vs_clip(plot_get_vdi_handle(), 0, (short*)&pxy); + if (wind_get(handle, WF_NEXTXYWH, + &todo[0], &todo[1], &todo[2], &todo[3])==0) { + break; + } + } + } else { + plot_unlock(); + return; + } + plot_unlock(); + tv->redraw = false; + tv->rdw_area.g_x = 65000; + tv->rdw_area.g_y = 65000; + tv->rdw_area.g_w = -1; + tv->rdw_area.g_h = -1; + } else { + /* just copy stuff from the offscreen buffer */ + } + } +} + + +/* exported interface documented in atari/treeview.h */ +void atari_treeview_delete(struct core_window * cw) +{ + struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; + + assert(tv); + assert(tv->io->finish); + + tv->io->finish(cw); + + free(tv); +} + + +/* exported interface documented in atari/treeview.h */ +void atari_treeview_open(struct core_window *cw, GRECT *pos) +{ + struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; + if (tv->window != NULL && tv->is_open == false) { + tv->is_open = true; + wind_open_grect(gemtk_wm_get_handle(tv->window), pos); + gemtk_wm_link(tv->window); + if (treeviews_open == NULL) { + treeviews_open = tv; + treeviews_open->next_open = NULL; + treeviews_open->prev_open = NULL; + } else { + struct atari_treeview_window * tmp; + tmp = treeviews_open; + while(tmp->next_open != NULL){ + tmp = tmp->next_open; + } + tmp->next_open = tv; + tv->prev_open = tmp; + tv->next_open = NULL; + } + } +} + + +/* exported interface documented in atari/treeview.h */ +bool atari_treeview_is_open(struct core_window *cw) { + struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; + return(tv->is_open); +} + + +/* exported interface documented in atari/treeview.h */ +void atari_treeview_set_user_data(struct core_window *cw, void *user_data_ptr) +{ + struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; + tv->user_data = user_data_ptr; +} + + +/* exported interface documented in atari/treeview.h */ +void * atari_treeview_get_user_data(struct core_window * cw) +{ + struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; + return(tv->user_data); +} + +/* exported interface documented in atari/treeview.h */ +void atari_treeview_close(struct core_window *cw) +{ + struct atari_treeview_window *tv = (struct atari_treeview_window*)cw; + if (tv->window != NULL) { + tv->is_open = false; + wind_close(gemtk_wm_get_handle(tv->window)); + gemtk_wm_unlink(tv->window); + /* unlink the window: */ + if (tv->prev_open != NULL) { + tv->prev_open->next_open = tv->next_open; + } else { + treeviews_open = tv->next_open; + } + if (tv->next_open != NULL) { + tv->next_open->prev_open = tv->prev_open; + } + } } + +/* exported interface documented in atari/treeview.h */ void atari_treeview_flush_redraws(void) { struct atari_treeview_window *tmp; tmp = treeviews_open; - if(tmp){ - while(tmp){ - assert(tmp->is_open); - if(tmp->redraw){ - if (atari_treeview_is_iconified((struct core_window *)tmp)) { - /* No content redraw for iconified windows */ - /* because otherwise the icon draw function would */ - /* have to deal with plot canvas coords */ - continue; - } - - atari_treeview_redraw((struct core_window *)tmp); - } - tmp = tmp->next_open; + while (tmp != NULL) { + assert(tmp->is_open); + if (tmp->redraw && + (!atari_treeview_is_iconified((struct core_window *)tmp))) { + /* Content redraw only for iconified windows + * because otherwise the icon draw function + * would have to deal with plot canvas coords + */ + atari_treeview_redraw((struct core_window *)tmp); } + tmp = tmp->next_open; } -} +} diff --git a/frontends/atari/treeview.h b/frontends/atari/treeview.h index d10129e..fe267b1 100644 --- a/frontends/atari/treeview.h +++ b/frontends/atari/treeview.h @@ -68,7 +68,7 @@ struct atari_treeview_callbacks { /** * Initalize an window to be an treeview window. * -*/ + */ struct core_window *atari_treeview_create(GUIWIN *win, struct atari_treeview_callbacks * callbacks, void * user_data, uint32_t flags); /** diff --git a/frontends/windows/font.c b/frontends/windows/font.c index 3407ec4..75464f9 100644 --- a/frontends/windows/font.c +++ b/frontends/windows/font.c @@ -280,7 +280,7 @@ win32_font_split(const plot_font_style_t *style, length, x, char_offset, - actual_x)) { + actual_x) == NSERROR_OK) { c_off = *char_offset; if (*char_offset == length) { ret = NSERROR_OK; diff --git a/frontends/windows/window.c b/frontends/windows/window.c index 976974c..c721736 100644 --- a/frontends/windows/window.c +++ b/frontends/windows/window.c @@ -1339,7 +1339,6 @@ nsws_window_resize(struct gui_window *gw, WPARAM wparam, LPARAM lparam) { - struct rect rect; RECT rstatus, rtool; if ((gw->toolbar == NULL) || @@ -1352,7 +1351,6 @@ nsws_window_resize(struct gui_window *gw, GetClientRect(gw->toolbar, &rtool); GetWindowRect(gw->statusbar, &rstatus); - win32_window_get_scroll(gw, &rect.x0, &rect.y0); gw->width = LOWORD(lparam); gw->height = HIWORD(lparam) - (rtool.bottom - rtool.top) - (rstatus.bottom - rstatus.top); @@ -1366,7 +1364,7 @@ nsws_window_resize(struct gui_window *gw, } nsws_window_update_forward_back(gw); - win32_window_set_scroll(gw, &rect); + browser_window_update(gw->bw, false); if (gw->toolbar != NULL) { SendMessage(gw->toolbar, TB_SETSTATE, diff --git a/test/corestrings.c b/test/corestrings.c index e8f68c0..02640c9 100644 --- a/test/corestrings.c +++ b/test/corestrings.c @@ -35,6 +35,13 @@ #include "test/malloc_fig.h" +/** + * The number of corestrings. + * + * This is used to test all the out of memory paths in initialisation. + */ +#define CORESTRING_TEST_COUNT 435 + START_TEST(corestrings_test) { nserror ires; @@ -58,7 +65,7 @@ static TCase *corestrings_case_create(void) TCase *tc; tc = tcase_create("corestrings"); - tcase_add_loop_test(tc, corestrings_test, 0, 437); + tcase_add_loop_test(tc, corestrings_test, 0, CORESTRING_TEST_COUNT); return tc; } diff --git a/test/data/cookies b/test/data/cookies index fc7a588..585c1e0 100644 --- a/test/data/cookies +++ b/test/data/cookies @@ -7,31 +7,31 @@ # Version Domain Domain from Set-Cookie Path Path from Set-Cookie Secure HTTP-Only Expires Last used No destroy Name Value Value was quoted Scheme URL Comment Version: 102 0 .theguardian.com 1 / 1 0 0 1476054669 1468278669 0 GU_mvt_id 439080 0 unused unused -0 .reddit.com 1 / 1 0 1 1499814590 1468278656 0 __cfduid d2c9a13e6ed171f4318aabcf558fcc6661468278590 0 unused unused -0 www.reddit.com 0 / 1 1 0 1531350591 1468278656 0 loid lLGqu0nblR8T852T20 0 https https://www.reddit.com/ -0 www.reddit.com 0 / 1 1 0 1531350591 1468278656 0 loidcreated 2016-07-11T23%3A09%3A50.925Z 0 https https://www.reddit.com/ -0 .giffgaff.com 1 / 1 0 0 1503402870 1440407964 0 visid_incap_456843 MSQtdY7lSvK9UJiZDP3daK0S2lUAAAAAQUIPAAAAAAAudOMnRSt1V9mQN5dPPA+R 0 unused unused -0 .google.com 1 / 1 0 0 1497632093 1470493285 0 SID DQAAAMoAAACuniK1mc17JMX-o-sfAVqvl0EWP0kiNpQg4lWeslWBnU_km8BK6Eww-1mC6zvnm7Jiv2vft4BOwWiAOmRzN66pbzxGNxKKGzSz2GNdWrcwvuYyQHkevwrtwmKmZGDKsgLljofq6NyNf0AP5xGXfHj18awhbbnymmv5UaDqypGx7FvptGQSMQkj_1hY6NJ5pfmO6LX8ezViJMABtqGPoO8Y8r8-eFRzLlsfbhCqM2OHkDRfoofXJCtIvDMi7Xyzoh6D5PsXbrfFZhcLSlfZpBtP 0 unused unused -0 .google.com 1 / 1 0 1 1497632093 1470493285 0 HSID A1rFmKHX-G1exnHNv 0 unused unused -0 .google.com 1 / 1 1 1 1497632093 1470493285 0 SSID A4wVZcYgXrCrwWns8 0 unused unused -0 .google.com 1 / 1 0 0 1497632093 1470493285 0 APISID IeJTJt20VmceF7bS/AACvc5cSFPpX8FJMj 0 unused unused -0 .google.com 1 / 1 1 0 1497632093 1470493285 0 SAPISID baCIIjpj-o3XQCkH/A-WEZgPvnNnguijDQ 0 unused unused -0 accounts.google.com 0 / 1 1 1 1497632093 0 0 GAPS 1:-F43DfTc9MQPBnPFtQw7SBXNDYxGRw:-byarQeQN13vrH8I 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 -0 accounts.google.com 0 / 1 1 1 1497632093 0 0 LSID mail|o.mail.google.com|s.GB|ss:DQAAAMwAAADuReoJNLFTfcVkka4Mpznq77VRSAgK_50UNJQeyKZS6zdAktvmMi42CsHIKCA_qkMe373-3PwvTioyn8OGHoKi8a2tas-mS1US4KPOXsp6GrewaR6bwkvkAudNj5H97wu9p9uek5EMljgPSIcFHyTRDwGghHc918-Z5-QVQMYswD9fA8DObnL4iFPrYJyYsz2MJcYKOMTdgBc9cutZ-zgRVJLVV1IJiluuTeQb5pjfpX4ROfo8kf4M_boTxfuwO19fn_zp5jT9qdPr4jDBM9lM 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 -0 accounts.google.com 0 / 1 1 1 1497632093 0 0 ACCOUNT_CHOOSER AFx_qI5IqJoq6XeRvabQu34G7bErRw0LzimzBZXUqP_9H8Zh2kqTpBc-jooLHKNNCggYdxTq_ENRPogKK0V35Ap5s9N-88xwKmZLX7xXnZ25EBl-8FHjjvfMxKIj2-_xnpyKtWa5fWac 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 -0 mail.google.com 0 / 1 1 1 1497632093 1435272960 0 OSID DQAAANsAAABjm3QWm7iyror5Q-r_twvLnU2MeBpDTpzoY-d-4pEomtilsx1VjIp_SphmVJcv084Ilg4o1COlySeuNAVSkeYn6qPyK93aIKN7MOmQxKvYQXIAlPiBAXD7bVX2HoAQpDXKc1BQZUfL2wLIjCwns0NQVGawofTWf8gve_FAwp6hXF9hXHrZRTU9lgt3N0yBpjElda_UiyNkhUIZP27zSS1LpXh7GaYcUgM69IUrczTnfkfIX_XunEaXBT59fmc49pbFEYlMMURG3ydiPjIhGdN9eHO27V9JhxqhuYUryTM8kg 0 https https://mail.google.com/accounts/SetOSID?continue=https%3A%2F%2Faccounts.google.co.uk%2Faccounts%2FSetSID%3Fssdc%3D1%26sidt%3DALWU2ctR9Uxp0qhL0HVYNURm01UOebegtyVV3GH%252BiVgIY9WIfqGs5NmqjVyX2IzkD0jDdGMV%252BgDLYwi9XrR%252FWsOIdwC4OO803V%252FimpsuKeLB7lk3%252FV10vr4C6wTc20A0I3ep6BLOe%252FQZgYJjfrcjzRiV2zT6fOiYXka1QrtyPIugR3R%252FaSWI%252Fau79w9hvBc%252FqqATVRi7F%252FDHv%252Be3cHMLPNOYoKwwUSOA9ORjKsyc5bCpnWM6X%252BrjsfzEEqlV5iui3EPKbBvTvCnfdF7UJjMg4EfWyMhVZaeytZdvGqJ2DfvPNmm2toULDQd4rcAAkfRZJQ95ySI4fq1ifZkfA0dhr7xnBQ0cl3%252BYTdl0yp%252BXjztO8YivQb%252Feip7gihmjfE9yRXoEboirDW8lIscN6cDDsuxzD07npdjHjRUX2wYrG4V3MLI4luH O52mwY%252BHZMN3O681HumCIBYvX%26continue%3Dhttps%253A%252F%252Fmail.google.com%252Fmail%252F%253Fauth%253DDQAAAL8AAABzUu3D7vQTObQbtiQU-X_6NnwgrsDnQe_7yXrUrFrniwP5j04Q9jVgc203CAd7rwHnO0tvXTI8MSlRISJz3tGutyOc_uw5khR4FHviJuyTEuxKJZPUmQXnIWxZf_CQoJXGGaxn1kT0scUyrxiBjTfXllUWBVa5iuEzL2lgbAINKmSlLmyg3BaTFb-l0nmDdqGznAJMDgspYtD8iBTcPnOWpGkHXUVtkE0C6KK_3z1eULl0wEne4aU0LNJhlhUa8Xk&osidt=ALWU2cvhIheonCPoG5pecDWKf0i1a-AsQKBMvxay9B54taUbBKAxr9vzwWXg2UJDvM3oYcjYFVDxpERiv9sed5ZQXUKh9UPV5epNA25PUuVZwNDOkePm6agrIhUGR9wVz4x7I6-uU0uF4VHDwS1KDpWZvQY6tMw5vti1qF2bVdLMO_UTLcEW9mdV7Oze8OZXWxFsppfVGSxHN8N1rH8xRMCj3A5QjC-OU5h-pS3N4-AI4A5LwrMj_zvtwS0BW5otNhVmt503yBBXKIIkF5i4gGXiQGVVhCFlBeosv7KbWx97PEPTzeqf59R0ZgY9p1cd_jQWi0gYUmTn -0 mail.google.com 0 /mail 1 1 1 1497632094 1435272960 0 GX DQAAAMoAAADuReoJNLFTfcVkka4MpznqQGgtWpCWbF9qPINtXVzsE62rPcFtkl_t5MhqS9Ab1zrEmWlZefvaR2bknrPqFsBfVZAtMoThXQxvoQQ7K2A1XTWfEeX09w0dJvN0A8SXsjAEebTY93dZkJr5fMomABLkbizqoRqSkv6sh4x7Ysat6VGX6m6eTg81aiCjuBHzLwlAKx63On5joEI1qYhXvKF1JMc3oEzaETTv9mw-vXHt_J-YYlPQi_nG4jQKoDFJ-XCx1fjVVGlqBsPj5Pf1-SGT 0 https https://mail.google.com/mail/?auth=DQAAAL8AAABzUu3D7vQTObQbtiQU-X_6NnwgrsDnQe_7yXrUrFrniwP5j04Q9jVgc203CAd7rwHnO0tvXTI8MSlRISJz3tGutyOc_uw5khR4FHviJuyTEuxKJZPUmQXnIWxZf_CQoJXGGaxn1kT0scUyrxiBjTfXllUWBVa5iuEzL2lgbAINKmSlLmyg3BaTFb-l0nmDdqGznAJMDgspYtD8iBTcPnOWpGkHXUVtkE0C6KK_3z1eULl0wEne4aU0LNJhlhUa8Xk -0 www.ccrexplorers.com 0 / 1 0 0 1499619054 1468082755 0 bb_lastvisit 1468083054 0 http http://www.ccrexplorers.com/forumdisplay.php?f=17 +0 .reddit.com 1 / 1 0 1 2147483647 1468278656 0 __cfduid d2c9a13e6ed171f4318aabcf558fcc6661468278590 0 unused unused +0 www.reddit.com 0 / 1 1 0 2147483647 1468278656 0 loid lLGqu0nblR8T852T20 0 https https://www.reddit.com/ +0 www.reddit.com 0 / 1 1 0 2147483647 1468278656 0 loidcreated 2016-07-11T23%3A09%3A50.925Z 0 https https://www.reddit.com/ +0 .giffgaff.com 1 / 1 0 0 2147483647 1440407964 0 visid_incap_456843 MSQtdY7lSvK9UJiZDP3daK0S2lUAAAAAQUIPAAAAAAAudOMnRSt1V9mQN5dPPA+R 0 unused unused +0 .google.com 1 / 1 0 0 2147483647 1470493285 0 SID DQAAAMoAAACuniK1mc17JMX-o-sfAVqvl0EWP0kiNpQg4lWeslWBnU_km8BK6Eww-1mC6zvnm7Jiv2vft4BOwWiAOmRzN66pbzxGNxKKGzSz2GNdWrcwvuYyQHkevwrtwmKmZGDKsgLljofq6NyNf0AP5xGXfHj18awhbbnymmv5UaDqypGx7FvptGQSMQkj_1hY6NJ5pfmO6LX8ezViJMABtqGPoO8Y8r8-eFRzLlsfbhCqM2OHkDRfoofXJCtIvDMi7Xyzoh6D5PsXbrfFZhcLSlfZpBtP 0 unused unused +0 .google.com 1 / 1 0 1 2147483647 1470493285 0 HSID A1rFmKHX-G1exnHNv 0 unused unused +0 .google.com 1 / 1 1 1 2147483647 1470493285 0 SSID A4wVZcYgXrCrwWns8 0 unused unused +0 .google.com 1 / 1 0 0 2147483647 1470493285 0 APISID IeJTJt20VmceF7bS/AACvc5cSFPpX8FJMj 0 unused unused +0 .google.com 1 / 1 1 0 2147483647 1470493285 0 SAPISID baCIIjpj-o3XQCkH/A-WEZgPvnNnguijDQ 0 unused unused +0 accounts.google.com 0 / 1 1 1 2147483647 0 0 GAPS 1:-F43DfTc9MQPBnPFtQw7SBXNDYxGRw:-byarQeQN13vrH8I 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 +0 accounts.google.com 0 / 1 1 1 2147483647 0 0 LSID mail|o.mail.google.com|s.GB|ss:DQAAAMwAAADuReoJNLFTfcVkka4Mpznq77VRSAgK_50UNJQeyKZS6zdAktvmMi42CsHIKCA_qkMe373-3PwvTioyn8OGHoKi8a2tas-mS1US4KPOXsp6GrewaR6bwkvkAudNj5H97wu9p9uek5EMljgPSIcFHyTRDwGghHc918-Z5-QVQMYswD9fA8DObnL4iFPrYJyYsz2MJcYKOMTdgBc9cutZ-zgRVJLVV1IJiluuTeQb5pjfpX4ROfo8kf4M_boTxfuwO19fn_zp5jT9qdPr4jDBM9lM 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 +0 accounts.google.com 0 / 1 1 1 2147483647 0 0 ACCOUNT_CHOOSER AFx_qI5IqJoq6XeRvabQu34G7bErRw0LzimzBZXUqP_9H8Zh2kqTpBc-jooLHKNNCggYdxTq_ENRPogKK0V35Ap5s9N-88xwKmZLX7xXnZ25EBl-8FHjjvfMxKIj2-_xnpyKtWa5fWac 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 +0 mail.google.com 0 / 1 1 1 2147483647 1435272960 0 OSID DQAAANsAAABjm3QWm7iyror5Q-r_twvLnU2MeBpDTpzoY-d-4pEomtilsx1VjIp_SphmVJcv084Ilg4o1COlySeuNAVSkeYn6qPyK93aIKN7MOmQxKvYQXIAlPiBAXD7bVX2HoAQpDXKc1BQZUfL2wLIjCwns0NQVGawofTWf8gve_FAwp6hXF9hXHrZRTU9lgt3N0yBpjElda_UiyNkhUIZP27zSS1LpXh7GaYcUgM69IUrczTnfkfIX_XunEaXBT59fmc49pbFEYlMMURG3ydiPjIhGdN9eHO27V9JhxqhuYUryTM8kg 0 https https://mail.google.com/accounts/SetOSID?continue=https%3A%2F%2Faccounts.google.co.uk%2Faccounts%2FSetSID%3Fssdc%3D1%26sidt%3DALWU2ctR9Uxp0qhL0HVYNURm01UOebegtyVV3GH%252BiVgIY9WIfqGs5NmqjVyX2IzkD0jDdGMV%252BgDLYwi9XrR%252FWsOIdwC4OO803V%252FimpsuKeLB7lk3%252FV10vr4C6wTc20A0I3ep6BLOe%252FQZgYJjfrcjzRiV2zT6fOiYXka1QrtyPIugR3R%252FaSWI%252Fau79w9hvBc%252FqqATVRi7F%252FDHv%252Be3cHMLPNOYoKwwUSOA9ORjKsyc5bCpnWM6X%252BrjsfzEEqlV5iui3EPKbBvTvCnfdF7UJjMg4EfWyMhVZaeytZdvGqJ2DfvPNmm2toULDQd4rcAAkfRZJQ95ySI4fq1ifZkfA0dhr7xnBQ0cl3%252BYTdl0yp%252BXjztO8YivQb%252Feip7gihmjfE9yRXoEboirDW8lIscN6cDDsuxzD07npdjHjRUX2wYrG4V3MLI4luH O52mwY%252BHZMN3O681HumCIBYvX%26continue%3Dhttps%253A%252F%252Fmail.google.com%252Fmail%252F%253Fauth%253DDQAAAL8AAABzUu3D7vQTObQbtiQU-X_6NnwgrsDnQe_7yXrUrFrniwP5j04Q9jVgc203CAd7rwHnO0tvXTI8MSlRISJz3tGutyOc_uw5khR4FHviJuyTEuxKJZPUmQXnIWxZf_CQoJXGGaxn1kT0scUyrxiBjTfXllUWBVa5iuEzL2lgbAINKmSlLmyg3BaTFb-l0nmDdqGznAJMDgspYtD8iBTcPnOWpGkHXUVtkE0C6KK_3z1eULl0wEne4aU0LNJhlhUa8Xk&osidt=ALWU2cvhIheonCPoG5pecDWKf0i1a-AsQKBMvxay9B54taUbBKAxr9vzwWXg2UJDvM3oYcjYFVDxpERiv9sed5ZQXUKh9UPV5epNA25PUuVZwNDOkePm6agrIhUGR9wVz4x7I6-uU0uF4VHDwS1KDpWZvQY6tMw5vti1qF2bVdLMO_UTLcEW9mdV7Oze8OZXWxFsppfVGSxHN8N1rH8xRMCj3A5QjC-OU5h-pS3N4-AI4A5LwrMj_zvtwS0BW5otNhVmt503yBBXKIIkF5i4gGXiQGVVhCFlBeosv7KbWx97PEPTzeqf59R0ZgY9p1cd_jQWi0gYUmTn +0 mail.google.com 0 /mail 1 1 1 2147483647 1435272960 0 GX DQAAAMoAAADuReoJNLFTfcVkka4MpznqQGgtWpCWbF9qPINtXVzsE62rPcFtkl_t5MhqS9Ab1zrEmWlZefvaR2bknrPqFsBfVZAtMoThXQxvoQQ7K2A1XTWfEeX09w0dJvN0A8SXsjAEebTY93dZkJr5fMomABLkbizqoRqSkv6sh4x7Ysat6VGX6m6eTg81aiCjuBHzLwlAKx63On5joEI1qYhXvKF1JMc3oEzaETTv9mw-vXHt_J-YYlPQi_nG4jQKoDFJ-XCx1fjVVGlqBsPj5Pf1-SGT 0 https https://mail.google.com/mail/?auth=DQAAAL8AAABzUu3D7vQTObQbtiQU-X_6NnwgrsDnQe_7yXrUrFrniwP5j04Q9jVgc203CAd7rwHnO0tvXTI8MSlRISJz3tGutyOc_uw5khR4FHviJuyTEuxKJZPUmQXnIWxZf_CQoJXGGaxn1kT0scUyrxiBjTfXllUWBVa5iuEzL2lgbAINKmSlLmyg3BaTFb-l0nmDdqGznAJMDgspYtD8iBTcPnOWpGkHXUVtkE0C6KK_3z1eULl0wEne4aU0LNJhlhUa8Xk +0 www.ccrexplorers.com 0 / 1 0 0 2147483647 1468082755 0 bb_lastvisit 1468083054 0 http http://www.ccrexplorers.com/forumdisplay.php?f=17 0 .theregister.co.uk 1 / 1 0 1 1471944077 1468278443 0 __cfduid dbda67dd4386142349a936c252ebac7391440408077 0 unused unused 0 nir.theregister.co.uk 0 / 1 0 0 1470697643 0 0 c 1/front.front.578426ab 0 http http://nir.theregister.co.uk/?g=c&g=sa&s=c/front.front -0 nir.theregister.co.uk 0 / 1 0 0 1499814443 0 0 sa 1 0 http http://nir.theregister.co.uk/?g=c&g=sa&s=c/front.front +0 nir.theregister.co.uk 0 / 1 0 0 2147483647 0 0 sa 1 0 http http://nir.theregister.co.uk/?g=c&g=sa&s=c/front.front 0 .regmedia.co.uk 1 / 1 0 1 1471944079 1468278443 0 __cfduid d82e13431caf77499b09ccf54c21999941440408079 0 unused unused -0 .google.co.uk 1 / 1 0 0 1497632093 1468278489 0 SID DQAAAMkAAACuniK1mc17JMX-o-sfAVqvl0EWP0kiNpQg4lWeslWBnU_km8BK6Eww-1mC6zvnm7Jiv2vft4BOwWiAOmRzN66pbzxGNxKKGzSz2GNdWrcwvuYyQHkevwrtwmKmZGDKsgLljofq6NyNf0AP5xGXfHj18awhbbnymmv5UaDqypGx7FvptGQSMQkj_1hY6NJ5pflIfSnKeEn0Y2mEVyhc1qUiGcJhVKqIRd6xaGKk7l235kOpqxjGK7I4_jTQaORZbp2-RWozAg7SHESSaOpxQ0ZT 0 unused unused -0 .google.co.uk 1 / 1 0 1 1497632093 1468278489 0 HSID ANVWylWAbjjzFxKxI 0 unused unused -0 .google.co.uk 1 / 1 1 1 1497632093 1468278489 0 SSID ANtGv1CSBG3CWbdtr 0 unused unused -0 .google.co.uk 1 / 1 0 0 1497632093 1468278489 0 APISID IeJTJt20VmceF7bS/AACvc5cSFPpX8FJMj 0 unused unused -0 .google.co.uk 1 / 1 1 0 1497632093 1468278489 0 SAPISID baCIIjpj-o3XQCkH/A-WEZgPvnNnguijDQ 0 unused unused +0 .google.co.uk 1 / 1 0 0 2147483647 1468278489 0 SID DQAAAMkAAACuniK1mc17JMX-o-sfAVqvl0EWP0kiNpQg4lWeslWBnU_km8BK6Eww-1mC6zvnm7Jiv2vft4BOwWiAOmRzN66pbzxGNxKKGzSz2GNdWrcwvuYyQHkevwrtwmKmZGDKsgLljofq6NyNf0AP5xGXfHj18awhbbnymmv5UaDqypGx7FvptGQSMQkj_1hY6NJ5pflIfSnKeEn0Y2mEVyhc1qUiGcJhVKqIRd6xaGKk7l235kOpqxjGK7I4_jTQaORZbp2-RWozAg7SHESSaOpxQ0ZT 0 unused unused +0 .google.co.uk 1 / 1 0 1 2147483647 1468278489 0 HSID ANVWylWAbjjzFxKxI 0 unused unused +0 .google.co.uk 1 / 1 1 1 2147483647 1468278489 0 SSID ANtGv1CSBG3CWbdtr 0 unused unused +0 .google.co.uk 1 / 1 0 0 2147483647 1468278489 0 APISID IeJTJt20VmceF7bS/AACvc5cSFPpX8FJMj 0 unused unused +0 .google.co.uk 1 / 1 1 0 2147483647 1468278489 0 SAPISID baCIIjpj-o3XQCkH/A-WEZgPvnNnguijDQ 0 unused unused 0 .google.co.uk 1 / 1 0 1 1484089690 0 0 NID 81=BGSfpwd63LrhVNUii2KYHfuyCUKzQv2Zg2ik1H_byGynWUgd9_q-kY48oCRapIewLtzMNYtf2KzYBk0_5OoAtNrD-0YSqXDzKalLWfQ8Vxwyywy79YDvAaX_3tprJzjp 0 unused unused -0 .bbc.co.uk 1 / 1 0 0 1595541997 1470493359 0 BBC-UID 35e7d9a5837b2e9d026d30f521339ac6826814226444c1ee4a2134fef248fe180NetSurf/3.6%20(Linux) 0 unused unused -0 news.bbc.co.uk 0 / 1 0 0 1500933997 1469574171 0 BBC-UID 25a73995333b5e9d8ea88a16a17c7b8beea45e555eb863e913853a4de2dcbdb80NetSurf%2f3%2e6%20%28Linux%29 0 http http://news.bbc.co.uk/ +0 .bbc.co.uk 1 / 1 0 0 2147483647 1470493359 0 BBC-UID 35e7d9a5837b2e9d026d30f521339ac6826814226444c1ee4a2134fef248fe180NetSurf/3.6%20(Linux) 0 unused unused +0 news.bbc.co.uk 0 / 1 0 0 2147483647 1469574171 0 BBC-UID 25a73995333b5e9d8ea88a16a17c7b8beea45e555eb863e913853a4de2dcbdb80NetSurf%2f3%2e6%20%28Linux%29 0 http http://news.bbc.co.uk/ 0 en.wikipedia.org 0 / 1 1 1 1473249600 1470493303 0 WMF-Last-Access 06-Aug-2016 0 http http://en.wikipedia.org/wiki/Main_Page diff --git a/test/data/cookies-out b/test/data/cookies-out index 143925a..404419e 100644 --- a/test/data/cookies-out +++ b/test/data/cookies-out @@ -6,26 +6,26 @@ # # Version Domain Domain from Set-Cookie Path Path from Set-Cookie Secure HTTP-Only Expires Last used No destroy Name Value Value was quoted Scheme URL Comment Version: 102 -0 www.ccrexplorers.com 0 / 1 0 0 1499619054 1468082755 0 bb_lastvisit 1468083054 0 http http://www.ccrexplorers.com/forumdisplay.php?f=17 -0 .google.com 1 / 1 0 0 1497632093 1470493285 0 SID DQAAAMoAAACuniK1mc17JMX-o-sfAVqvl0EWP0kiNpQg4lWeslWBnU_km8BK6Eww-1mC6zvnm7Jiv2vft4BOwWiAOmRzN66pbzxGNxKKGzSz2GNdWrcwvuYyQHkevwrtwmKmZGDKsgLljofq6NyNf0AP5xGXfHj18awhbbnymmv5UaDqypGx7FvptGQSMQkj_1hY6NJ5pfmO6LX8ezViJMABtqGPoO8Y8r8-eFRzLlsfbhCqM2OHkDRfoofXJCtIvDMi7Xyzoh6D5PsXbrfFZhcLSlfZpBtP 0 unused unused -0 .google.com 1 / 1 0 1 1497632093 1470493285 0 HSID A1rFmKHX-G1exnHNv 0 unused unused -0 .google.com 1 / 1 1 1 1497632093 1470493285 0 SSID A4wVZcYgXrCrwWns8 0 unused unused -0 .google.com 1 / 1 0 0 1497632093 1470493285 0 APISID IeJTJt20VmceF7bS/AACvc5cSFPpX8FJMj 0 unused unused -0 .google.com 1 / 1 1 0 1497632093 1470493285 0 SAPISID baCIIjpj-o3XQCkH/A-WEZgPvnNnguijDQ 0 unused unused -0 mail.google.com 0 / 1 1 1 1497632093 1435272960 0 OSID DQAAANsAAABjm3QWm7iyror5Q-r_twvLnU2MeBpDTpzoY-d-4pEomtilsx1VjIp_SphmVJcv084Ilg4o1COlySeuNAVSkeYn6qPyK93aIKN7MOmQxKvYQXIAlPiBAXD7bVX2HoAQpDXKc1BQZUfL2wLIjCwns0NQVGawofTWf8gve_FAwp6hXF9hXHrZRTU9lgt3N0yBpjElda_UiyNkhUIZP27zSS1LpXh7GaYcUgM69IUrczTnfkfIX_XunEaXBT59fmc49pbFEYlMMURG3ydiPjIhGdN9eHO27V9JhxqhuYUryTM8kg 0 https https://mail.google.com/accounts/SetOSID?continue=https%3A%2F%2Faccounts.google.co.uk%2Faccounts%2FSetSID%3Fssdc%3D1%26sidt%3DALWU2ctR9Uxp0qhL0HVYNURm01UOebegtyVV3GH%252BiVgIY9WIfqGs5NmqjVyX2IzkD0jDdGMV%252BgDLYwi9XrR%252FWsOIdwC4OO803V%252FimpsuKeLB7lk3%252FV10vr4C6wTc20A0I3ep6BLOe%252FQZgYJjfrcjzRiV2zT6fOiYXka1QrtyPIugR3R%252FaSWI%252Fau79w9hvBc%252FqqATVRi7F%252FDHv%252Be3cHMLPNOYoKwwUSOA9ORjKsyc5bCpnWM6X%252BrjsfzEEqlV5iui3EPKbBvTvCnfdF7UJjMg4EfWyMhVZaeytZdvGqJ2DfvPNmm2toULDQd4rcAAkfRZJQ95ySI4fq1ifZkfA0dhr7xnBQ0cl3%252BYTdl0yp%252BXjztO8YivQb%252Feip7gihmjfE9yRXoEboirDW8lIscN6cDDsuxzD07npdjHjRUX2wYrG4V3MLI4luH O52mwY%252BHZMN3O681HumCIBYvX%26continue%3Dhttps%253A%252F%252Fmail.google.com%252Fmail%252F%253Fauth%253DDQAAAL8AAABzUu3D7vQTObQbtiQU-X_6NnwgrsDnQe_7yXrUrFrniwP5j04Q9jVgc203CAd7rwHnO0tvXTI8MSlRISJz3tGutyOc_uw5khR4FHviJuyTEuxKJZPUmQXnIWxZf_CQoJXGGaxn1kT0scUyrxiBjTfXllUWBVa5iuEzL2lgbAINKmSlLmyg3BaTFb-l0nmDdqGznAJMDgspYtD8iBTcPnOWpGkHXUVtkE0C6KK_3z1eULl0wEne4aU0LNJhlhUa8Xk&osidt=ALWU2cvhIheonCPoG5pecDWKf0i1a-AsQKBMvxay9B54taUbBKAxr9vzwWXg2UJDvM3oYcjYFVDxpERiv9sed5ZQXUKh9UPV5epNA25PUuVZwNDOkePm6agrIhUGR9wVz4x7I6-uU0uF4VHDwS1KDpWZvQY6tMw5vti1qF2bVdLMO_UTLcEW9mdV7Oze8OZXWxFsppfVGSxHN8N1rH8xRMCj3A5QjC-OU5h-pS3N4-AI4A5LwrMj_zvtwS0BW5otNhVmt503yBBXKIIkF5i4gGXiQGVVhCFlBeosv7KbWx97PEPTzeqf59R0ZgY9p1cd_jQWi0gYUmTn -0 mail.google.com 0 /mail 1 1 1 1497632094 1435272960 0 GX DQAAAMoAAADuReoJNLFTfcVkka4MpznqQGgtWpCWbF9qPINtXVzsE62rPcFtkl_t5MhqS9Ab1zrEmWlZefvaR2bknrPqFsBfVZAtMoThXQxvoQQ7K2A1XTWfEeX09w0dJvN0A8SXsjAEebTY93dZkJr5fMomABLkbizqoRqSkv6sh4x7Ysat6VGX6m6eTg81aiCjuBHzLwlAKx63On5joEI1qYhXvKF1JMc3oEzaETTv9mw-vXHt_J-YYlPQi_nG4jQKoDFJ-XCx1fjVVGlqBsPj5Pf1-SGT 0 https https://mail.google.com/mail/?auth=DQAAAL8AAABzUu3D7vQTObQbtiQU-X_6NnwgrsDnQe_7yXrUrFrniwP5j04Q9jVgc203CAd7rwHnO0tvXTI8MSlRISJz3tGutyOc_uw5khR4FHviJuyTEuxKJZPUmQXnIWxZf_CQoJXGGaxn1kT0scUyrxiBjTfXllUWBVa5iuEzL2lgbAINKmSlLmyg3BaTFb-l0nmDdqGznAJMDgspYtD8iBTcPnOWpGkHXUVtkE0C6KK_3z1eULl0wEne4aU0LNJhlhUa8Xk -0 accounts.google.com 0 / 1 1 1 1497632093 0 0 GAPS 1:-F43DfTc9MQPBnPFtQw7SBXNDYxGRw:-byarQeQN13vrH8I 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 -0 accounts.google.com 0 / 1 1 1 1497632093 0 0 LSID mail|o.mail.google.com|s.GB|ss:DQAAAMwAAADuReoJNLFTfcVkka4Mpznq77VRSAgK_50UNJQeyKZS6zdAktvmMi42CsHIKCA_qkMe373-3PwvTioyn8OGHoKi8a2tas-mS1US4KPOXsp6GrewaR6bwkvkAudNj5H97wu9p9uek5EMljgPSIcFHyTRDwGghHc918-Z5-QVQMYswD9fA8DObnL4iFPrYJyYsz2MJcYKOMTdgBc9cutZ-zgRVJLVV1IJiluuTeQb5pjfpX4ROfo8kf4M_boTxfuwO19fn_zp5jT9qdPr4jDBM9lM 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 -0 accounts.google.com 0 / 1 1 1 1497632093 0 0 ACCOUNT_CHOOSER AFx_qI5IqJoq6XeRvabQu34G7bErRw0LzimzBZXUqP_9H8Zh2kqTpBc-jooLHKNNCggYdxTq_ENRPogKK0V35Ap5s9N-88xwKmZLX7xXnZ25EBl-8FHjjvfMxKIj2-_xnpyKtWa5fWac 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 -0 .giffgaff.com 1 / 1 0 0 1503402870 1440407964 0 visid_incap_456843 MSQtdY7lSvK9UJiZDP3daK0S2lUAAAAAQUIPAAAAAAAudOMnRSt1V9mQN5dPPA+R 0 unused unused -0 .reddit.com 1 / 1 0 1 1499814590 1468278656 0 __cfduid d2c9a13e6ed171f4318aabcf558fcc6661468278590 0 unused unused -0 www.reddit.com 0 / 1 1 0 1531350591 1468278656 0 loid lLGqu0nblR8T852T20 0 https https://www.reddit.com/ -0 www.reddit.com 0 / 1 1 0 1531350591 1468278656 0 loidcreated 2016-07-11T23%3A09%3A50.925Z 0 https https://www.reddit.com/ -0 .google.co.uk 1 / 1 0 0 1497632093 1468278489 0 SID DQAAAMkAAACuniK1mc17JMX-o-sfAVqvl0EWP0kiNpQg4lWeslWBnU_km8BK6Eww-1mC6zvnm7Jiv2vft4BOwWiAOmRzN66pbzxGNxKKGzSz2GNdWrcwvuYyQHkevwrtwmKmZGDKsgLljofq6NyNf0AP5xGXfHj18awhbbnymmv5UaDqypGx7FvptGQSMQkj_1hY6NJ5pflIfSnKeEn0Y2mEVyhc1qUiGcJhVKqIRd6xaGKk7l235kOpqxjGK7I4_jTQaORZbp2-RWozAg7SHESSaOpxQ0ZT 0 unused unused -0 .google.co.uk 1 / 1 0 1 1497632093 1468278489 0 HSID ANVWylWAbjjzFxKxI 0 unused unused -0 .google.co.uk 1 / 1 1 1 1497632093 1468278489 0 SSID ANtGv1CSBG3CWbdtr 0 unused unused -0 .google.co.uk 1 / 1 0 0 1497632093 1468278489 0 APISID IeJTJt20VmceF7bS/AACvc5cSFPpX8FJMj 0 unused unused -0 .google.co.uk 1 / 1 1 0 1497632093 1468278489 0 SAPISID baCIIjpj-o3XQCkH/A-WEZgPvnNnguijDQ 0 unused unused -0 nir.theregister.co.uk 0 / 1 0 0 1499814443 0 0 sa 1 0 http http://nir.theregister.co.uk/?g=c&g=sa&s=c/front.front -0 .bbc.co.uk 1 / 1 0 0 1595541997 1470493359 0 BBC-UID 35e7d9a5837b2e9d026d30f521339ac6826814226444c1ee4a2134fef248fe180NetSurf/3.6%20(Linux) 0 unused unused -0 news.bbc.co.uk 0 / 1 0 0 1500933997 1469574171 0 BBC-UID 25a73995333b5e9d8ea88a16a17c7b8beea45e555eb863e913853a4de2dcbdb80NetSurf%2f3%2e6%20%28Linux%29 0 http http://news.bbc.co.uk/ +0 www.ccrexplorers.com 0 / 1 0 0 2147483647 1468082755 0 bb_lastvisit 1468083054 0 http http://www.ccrexplorers.com/forumdisplay.php?f=17 +0 .google.com 1 / 1 0 0 2147483647 1470493285 0 SID DQAAAMoAAACuniK1mc17JMX-o-sfAVqvl0EWP0kiNpQg4lWeslWBnU_km8BK6Eww-1mC6zvnm7Jiv2vft4BOwWiAOmRzN66pbzxGNxKKGzSz2GNdWrcwvuYyQHkevwrtwmKmZGDKsgLljofq6NyNf0AP5xGXfHj18awhbbnymmv5UaDqypGx7FvptGQSMQkj_1hY6NJ5pfmO6LX8ezViJMABtqGPoO8Y8r8-eFRzLlsfbhCqM2OHkDRfoofXJCtIvDMi7Xyzoh6D5PsXbrfFZhcLSlfZpBtP 0 unused unused +0 .google.com 1 / 1 0 1 2147483647 1470493285 0 HSID A1rFmKHX-G1exnHNv 0 unused unused +0 .google.com 1 / 1 1 1 2147483647 1470493285 0 SSID A4wVZcYgXrCrwWns8 0 unused unused +0 .google.com 1 / 1 0 0 2147483647 1470493285 0 APISID IeJTJt20VmceF7bS/AACvc5cSFPpX8FJMj 0 unused unused +0 .google.com 1 / 1 1 0 2147483647 1470493285 0 SAPISID baCIIjpj-o3XQCkH/A-WEZgPvnNnguijDQ 0 unused unused +0 mail.google.com 0 / 1 1 1 2147483647 1435272960 0 OSID DQAAANsAAABjm3QWm7iyror5Q-r_twvLnU2MeBpDTpzoY-d-4pEomtilsx1VjIp_SphmVJcv084Ilg4o1COlySeuNAVSkeYn6qPyK93aIKN7MOmQxKvYQXIAlPiBAXD7bVX2HoAQpDXKc1BQZUfL2wLIjCwns0NQVGawofTWf8gve_FAwp6hXF9hXHrZRTU9lgt3N0yBpjElda_UiyNkhUIZP27zSS1LpXh7GaYcUgM69IUrczTnfkfIX_XunEaXBT59fmc49pbFEYlMMURG3ydiPjIhGdN9eHO27V9JhxqhuYUryTM8kg 0 https https://mail.google.com/accounts/SetOSID?continue=https%3A%2F%2Faccounts.google.co.uk%2Faccounts%2FSetSID%3Fssdc%3D1%26sidt%3DALWU2ctR9Uxp0qhL0HVYNURm01UOebegtyVV3GH%252BiVgIY9WIfqGs5NmqjVyX2IzkD0jDdGMV%252BgDLYwi9XrR%252FWsOIdwC4OO803V%252FimpsuKeLB7lk3%252FV10vr4C6wTc20A0I3ep6BLOe%252FQZgYJjfrcjzRiV2zT6fOiYXka1QrtyPIugR3R%252FaSWI%252Fau79w9hvBc%252FqqATVRi7F%252FDHv%252Be3cHMLPNOYoKwwUSOA9ORjKsyc5bCpnWM6X%252BrjsfzEEqlV5iui3EPKbBvTvCnfdF7UJjMg4EfWyMhVZaeytZdvGqJ2DfvPNmm2toULDQd4rcAAkfRZJQ95ySI4fq1ifZkfA0dhr7xnBQ0cl3%252BYTdl0yp%252BXjztO8YivQb%252Feip7gihmjfE9yRXoEboirDW8lIscN6cDDsuxzD07npdjHjRUX2wYrG4V3MLI4luH O52mwY%252BHZMN3O681HumCIBYvX%26continue%3Dhttps%253A%252F%252Fmail.google.com%252Fmail%252F%253Fauth%253DDQAAAL8AAABzUu3D7vQTObQbtiQU-X_6NnwgrsDnQe_7yXrUrFrniwP5j04Q9jVgc203CAd7rwHnO0tvXTI8MSlRISJz3tGutyOc_uw5khR4FHviJuyTEuxKJZPUmQXnIWxZf_CQoJXGGaxn1kT0scUyrxiBjTfXllUWBVa5iuEzL2lgbAINKmSlLmyg3BaTFb-l0nmDdqGznAJMDgspYtD8iBTcPnOWpGkHXUVtkE0C6KK_3z1eULl0wEne4aU0LNJhlhUa8Xk&osidt=ALWU2cvhIheonCPoG5pecDWKf0i1a-AsQKBMvxay9B54taUbBKAxr9vzwWXg2UJDvM3oYcjYFVDxpERiv9sed5ZQXUKh9UPV5epNA25PUuVZwNDOkePm6agrIhUGR9wVz4x7I6-uU0uF4VHDwS1KDpWZvQY6tMw5vti1qF2bVdLMO_UTLcEW9mdV7Oze8OZXWxFsppfVGSxHN8N1rH8xRMCj3A5QjC-OU5h-pS3N4-AI4A5LwrMj_zvtwS0BW5otNhVmt503yBBXKIIkF5i4gGXiQGVVhCFlBeosv7KbWx97PEPTzeqf59R0ZgY9p1cd_jQWi0gYUmTn +0 mail.google.com 0 /mail 1 1 1 2147483647 1435272960 0 GX DQAAAMoAAADuReoJNLFTfcVkka4MpznqQGgtWpCWbF9qPINtXVzsE62rPcFtkl_t5MhqS9Ab1zrEmWlZefvaR2bknrPqFsBfVZAtMoThXQxvoQQ7K2A1XTWfEeX09w0dJvN0A8SXsjAEebTY93dZkJr5fMomABLkbizqoRqSkv6sh4x7Ysat6VGX6m6eTg81aiCjuBHzLwlAKx63On5joEI1qYhXvKF1JMc3oEzaETTv9mw-vXHt_J-YYlPQi_nG4jQKoDFJ-XCx1fjVVGlqBsPj5Pf1-SGT 0 https https://mail.google.com/mail/?auth=DQAAAL8AAABzUu3D7vQTObQbtiQU-X_6NnwgrsDnQe_7yXrUrFrniwP5j04Q9jVgc203CAd7rwHnO0tvXTI8MSlRISJz3tGutyOc_uw5khR4FHviJuyTEuxKJZPUmQXnIWxZf_CQoJXGGaxn1kT0scUyrxiBjTfXllUWBVa5iuEzL2lgbAINKmSlLmyg3BaTFb-l0nmDdqGznAJMDgspYtD8iBTcPnOWpGkHXUVtkE0C6KK_3z1eULl0wEne4aU0LNJhlhUa8Xk +0 accounts.google.com 0 / 1 1 1 2147483647 0 0 GAPS 1:-F43DfTc9MQPBnPFtQw7SBXNDYxGRw:-byarQeQN13vrH8I 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 +0 accounts.google.com 0 / 1 1 1 2147483647 0 0 LSID mail|o.mail.google.com|s.GB|ss:DQAAAMwAAADuReoJNLFTfcVkka4Mpznq77VRSAgK_50UNJQeyKZS6zdAktvmMi42CsHIKCA_qkMe373-3PwvTioyn8OGHoKi8a2tas-mS1US4KPOXsp6GrewaR6bwkvkAudNj5H97wu9p9uek5EMljgPSIcFHyTRDwGghHc918-Z5-QVQMYswD9fA8DObnL4iFPrYJyYsz2MJcYKOMTdgBc9cutZ-zgRVJLVV1IJiluuTeQb5pjfpX4ROfo8kf4M_boTxfuwO19fn_zp5jT9qdPr4jDBM9lM 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 +0 accounts.google.com 0 / 1 1 1 2147483647 0 0 ACCOUNT_CHOOSER AFx_qI5IqJoq6XeRvabQu34G7bErRw0LzimzBZXUqP_9H8Zh2kqTpBc-jooLHKNNCggYdxTq_ENRPogKK0V35Ap5s9N-88xwKmZLX7xXnZ25EBl-8FHjjvfMxKIj2-_xnpyKtWa5fWac 0 https https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1 +0 .giffgaff.com 1 / 1 0 0 2147483647 1440407964 0 visid_incap_456843 MSQtdY7lSvK9UJiZDP3daK0S2lUAAAAAQUIPAAAAAAAudOMnRSt1V9mQN5dPPA+R 0 unused unused +0 .reddit.com 1 / 1 0 1 2147483647 1468278656 0 __cfduid d2c9a13e6ed171f4318aabcf558fcc6661468278590 0 unused unused +0 www.reddit.com 0 / 1 1 0 2147483647 1468278656 0 loid lLGqu0nblR8T852T20 0 https https://www.reddit.com/ +0 www.reddit.com 0 / 1 1 0 2147483647 1468278656 0 loidcreated 2016-07-11T23%3A09%3A50.925Z 0 https https://www.reddit.com/ +0 .google.co.uk 1 / 1 0 0 2147483647 1468278489 0 SID DQAAAMkAAACuniK1mc17JMX-o-sfAVqvl0EWP0kiNpQg4lWeslWBnU_km8BK6Eww-1mC6zvnm7Jiv2vft4BOwWiAOmRzN66pbzxGNxKKGzSz2GNdWrcwvuYyQHkevwrtwmKmZGDKsgLljofq6NyNf0AP5xGXfHj18awhbbnymmv5UaDqypGx7FvptGQSMQkj_1hY6NJ5pflIfSnKeEn0Y2mEVyhc1qUiGcJhVKqIRd6xaGKk7l235kOpqxjGK7I4_jTQaORZbp2-RWozAg7SHESSaOpxQ0ZT 0 unused unused +0 .google.co.uk 1 / 1 0 1 2147483647 1468278489 0 HSID ANVWylWAbjjzFxKxI 0 unused unused +0 .google.co.uk 1 / 1 1 1 2147483647 1468278489 0 SSID ANtGv1CSBG3CWbdtr 0 unused unused +0 .google.co.uk 1 / 1 0 0 2147483647 1468278489 0 APISID IeJTJt20VmceF7bS/AACvc5cSFPpX8FJMj 0 unused unused +0 .google.co.uk 1 / 1 1 0 2147483647 1468278489 0 SAPISID baCIIjpj-o3XQCkH/A-WEZgPvnNnguijDQ 0 unused unused +0 nir.theregister.co.uk 0 / 1 0 0 2147483647 0 0 sa 1 0 http http://nir.theregister.co.uk/?g=c&g=sa&s=c/front.front +0 .bbc.co.uk 1 / 1 0 0 2147483647 1470493359 0 BBC-UID 35e7d9a5837b2e9d026d30f521339ac6826814226444c1ee4a2134fef248fe180NetSurf/3.6%20(Linux) 0 unused unused +0 news.bbc.co.uk 0 / 1 0 0 2147483647 1469574171 0 BBC-UID 25a73995333b5e9d8ea88a16a17c7b8beea45e555eb863e913853a4de2dcbdb80NetSurf%2f3%2e6%20%28Linux%29 0 http http://news.bbc.co.uk/ diff --git a/test/urldbtest.c b/test/urldbtest.c index 31cba2e..75a7210 100644 --- a/test/urldbtest.c +++ b/test/urldbtest.c @@ -571,6 +571,9 @@ static TCase *urldb_add_get_case_create(void) * Session basic test case * * The databases are loaded and saved with no manipulation + * + * \warning This test will fail when 32bit time_t wraps in 2038 as the + * cookie database expiry field is limited to that size. */ START_TEST(urldb_session_test) { @@ -591,7 +594,7 @@ START_TEST(urldb_session_test) res = urldb_save(outnam); ck_assert_int_eq(res, NSERROR_OK); - /* check for the correct answer */ + /* check the url database file written and the test file match */ ck_assert_int_eq(cmp(outnam, test_urldb_out_path), 0); /* remove test output */ @@ -601,7 +604,7 @@ START_TEST(urldb_session_test) outnam = testnam(NULL); urldb_save_cookies(outnam); - /* check for the correct answer */ + /* check the cookies file written and the test file match */ ck_assert_int_eq(cmp(outnam, test_cookies_out_path), 0); /* remove test output */ -- NetSurf Browser _______________________________________________ netsurf-commits mailing list netsurf-commits@netsurf-browser.org http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org