Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/77dbb795c7f61253fea0773fbfe54d5ae327bc48
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/77dbb795c7f61253fea0773fbfe54d5ae327bc48
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/77dbb795c7f61253fea0773fbfe54d5ae327bc48

The branch, jmb/monkey-cc has been updated
       via  77dbb795c7f61253fea0773fbfe54d5ae327bc48 (commit)
       via  ce6aa968ba271526ca119dc8e2f8f502c58a7124 (commit)
       via  2a2a657bfc16cf4e08f8e79cecf29bae4b22726f (commit)
      from  69f358b85bd9d692c23ace2acb1d2ab9cdf7ba69 (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=77dbb795c7f61253fea0773fbfe54d5ae327bc48
commit 77dbb795c7f61253fea0773fbfe54d5ae327bc48
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>

    Monkey: ugly hack for amigaos filepaths
    
    We really need a generic way of doing platform specifics separately
    from the frontend UI code.

diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 463f0bea6..e0009113f 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -385,6 +385,30 @@ signal_handler(int sig)
 
 #endif
 
+#ifdef __AMIGA__
+#include "utils/file.h"
+static nserror (*posix_nsurl_to_path)(struct nsurl *, char **);
+static nserror amiga_nsurl_to_path(struct nsurl *url, char **path_out)
+{
+       nserror err;
+
+       err = posix_nsurl_to_path(url, path_out);
+       if (err == NSERROR_OK && *path_out != NULL && **path_out == '/') {
+               const char *p = *path_out + 1;
+               while (*p != 0 && *p != ':' && *p != '/') {
+                       p++;
+               }
+               if (*p == ':') {
+                       /* Discard the leading slash */
+                       size_t len = strlen(*path_out);
+                       memmove(*path_out, *path_out+1, len);
+               }
+       }
+
+       return err;
+}
+#endif
+
 int
 main(int argc, char **argv)
 {
@@ -416,6 +440,13 @@ main(int argc, char **argv)
                die("NetSurf operation table failed registration");
        }
 
+       /* Patch in platform-specifics */
+       /* XXX: is there a better way? */
+#ifdef __AMIGA__
+       posix_nsurl_to_path = monkey_table.file->nsurl_to_path;
+       monkey_table.file->nsurl_to_path = amiga_nsurl_to_path;
+#endif
+
        /* Unbuffer stdin/out/err */
        setbuf(stdin, NULL);
        setbuf(stdout, NULL);


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=ce6aa968ba271526ca119dc8e2f8f502c58a7124
commit ce6aa968ba271526ca119dc8e2f8f502c58a7124
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>

    Fetch: reschedule poll if there is pending work
    
    In the event that the current set of active fetches is completed
    but there are still fetches pending, we want to ensure that the
    pending work is attended to ASAP. Schedule another poll in this
    case (as, otherwise, we are relying on some other activity to
    drive progress, which is fragile and slow).

diff --git a/content/fetch.c b/content/fetch.c
index 9df29bdbf..0a14708d9 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -437,6 +437,13 @@ fetch_fdset(fd_set *read_fd_set,
                 * polling frequently.
                 */
                guit->misc->schedule(FDSET_TIMEOUT, fetcher_poll, NULL);
+       } else if (queue_ring != NULL) {
+               /* We have no active fetches, but some are pending.
+                * Reschedule the poll to cause them to be dispatched
+                * (as we are otherwise reliant on some other scheduled
+                * event causing the fdsets to be reevaluated).
+                */
+               guit->misc->schedule(SCHEDULE_TIME, fetcher_poll, NULL);
        }
 
        *maxfd_out = maxfd;


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=2a2a657bfc16cf4e08f8e79cecf29bae4b22726f
commit 2a2a657bfc16cf4e08f8e79cecf29bae4b22726f
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>

    Utils: make timersub cope with unsigned input
    
    Yes, there are some platforms insane enough to make the contents
    of struct timeval unsigned.

diff --git a/utils/sys_time.h b/utils/sys_time.h
index c9ce8202f..91a533787 100644
--- a/utils/sys_time.h
+++ b/utils/sys_time.h
@@ -54,11 +54,12 @@
 #define timersub(a, aa, result)                                                
\
        do {                                                            \
                (result)->tv_sec = (a)->tv_sec - (aa)->tv_sec;          \
-               (result)->tv_usec = (a)->tv_usec - (aa)->tv_usec;       \
-               if ((result)->tv_usec < 0) {                            \
+               (result)->tv_usec = (a)->tv_usec;                       \
+               if ((a)->tv_usec < (aa)->tv_usec) {                     \
                        --(result)->tv_sec;                             \
                        (result)->tv_usec += 1000000;                   \
                }                                                       \
+               (result)->tv_usec -= (aa)->tv_usec;                     \
        } while (0)
 #endif
 


-----------------------------------------------------------------------

Summary of changes:
 content/fetch.c         |  7 +++++++
 frontends/monkey/main.c | 31 +++++++++++++++++++++++++++++++
 utils/sys_time.h        |  5 +++--
 3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/content/fetch.c b/content/fetch.c
index 9df29bdbf..0a14708d9 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -437,6 +437,13 @@ fetch_fdset(fd_set *read_fd_set,
                 * polling frequently.
                 */
                guit->misc->schedule(FDSET_TIMEOUT, fetcher_poll, NULL);
+       } else if (queue_ring != NULL) {
+               /* We have no active fetches, but some are pending.
+                * Reschedule the poll to cause them to be dispatched
+                * (as we are otherwise reliant on some other scheduled
+                * event causing the fdsets to be reevaluated).
+                */
+               guit->misc->schedule(SCHEDULE_TIME, fetcher_poll, NULL);
        }
 
        *maxfd_out = maxfd;
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 463f0bea6..e0009113f 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -385,6 +385,30 @@ signal_handler(int sig)
 
 #endif
 
+#ifdef __AMIGA__
+#include "utils/file.h"
+static nserror (*posix_nsurl_to_path)(struct nsurl *, char **);
+static nserror amiga_nsurl_to_path(struct nsurl *url, char **path_out)
+{
+       nserror err;
+
+       err = posix_nsurl_to_path(url, path_out);
+       if (err == NSERROR_OK && *path_out != NULL && **path_out == '/') {
+               const char *p = *path_out + 1;
+               while (*p != 0 && *p != ':' && *p != '/') {
+                       p++;
+               }
+               if (*p == ':') {
+                       /* Discard the leading slash */
+                       size_t len = strlen(*path_out);
+                       memmove(*path_out, *path_out+1, len);
+               }
+       }
+
+       return err;
+}
+#endif
+
 int
 main(int argc, char **argv)
 {
@@ -416,6 +440,13 @@ main(int argc, char **argv)
                die("NetSurf operation table failed registration");
        }
 
+       /* Patch in platform-specifics */
+       /* XXX: is there a better way? */
+#ifdef __AMIGA__
+       posix_nsurl_to_path = monkey_table.file->nsurl_to_path;
+       monkey_table.file->nsurl_to_path = amiga_nsurl_to_path;
+#endif
+
        /* Unbuffer stdin/out/err */
        setbuf(stdin, NULL);
        setbuf(stdout, NULL);
diff --git a/utils/sys_time.h b/utils/sys_time.h
index c9ce8202f..91a533787 100644
--- a/utils/sys_time.h
+++ b/utils/sys_time.h
@@ -54,11 +54,12 @@
 #define timersub(a, aa, result)                                                
\
        do {                                                            \
                (result)->tv_sec = (a)->tv_sec - (aa)->tv_sec;          \
-               (result)->tv_usec = (a)->tv_usec - (aa)->tv_usec;       \
-               if ((result)->tv_usec < 0) {                            \
+               (result)->tv_usec = (a)->tv_usec;                       \
+               if ((a)->tv_usec < (aa)->tv_usec) {                     \
                        --(result)->tv_sec;                             \
                        (result)->tv_usec += 1000000;                   \
                }                                                       \
+               (result)->tv_usec -= (aa)->tv_usec;                     \
        } while (0)
 #endif
 


-- 
NetSurf Browser

Reply via email to