Gitweb links:

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

The branch, chris/ndk32 has been updated
       via  a7e976b3fbc1038408b024b46dced0205514e109 (commit)
      from  cdf821454ae0328224c037398ac2f41ab4acd163 (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=a7e976b3fbc1038408b024b46dced0205514e109
commit a7e976b3fbc1038408b024b46dced0205514e109
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Amiga: switch to using OS3.2's idea of TimeVal/TimeRequest

diff --git a/frontends/amiga/font_cache.c b/frontends/amiga/font_cache.c
index b8039d2..cdb26fe 100644
--- a/frontends/amiga/font_cache.c
+++ b/frontends/amiga/font_cache.c
@@ -101,12 +101,12 @@ static void ami_font_cache_cleanup(struct MinList 
*ami_font_cache_list)
                fnode = node->objstruct;
                GetSysTime((struct timeval *)&curtime);
                SubTime((struct timeval *)&curtime, (struct timeval 
*)&fnode->lastused);
-               if(curtime.Seconds > 300)
+               if(curtime.tv_secs > 300)
                {
                        NSLOG(netsurf, INFO,
                              "Freeing %s not used for %d seconds",
                              node->dtz_Node.ln_Name,
-                             curtime.Seconds);
+                             curtime.tv_secs);
                        DelObject(node);
                }
        } while((node=nnode));
diff --git a/frontends/amiga/os3support.h b/frontends/amiga/os3support.h
index f04b37b..2df0141 100644
--- a/frontends/amiga/os3support.h
+++ b/frontends/amiga/os3support.h
@@ -120,12 +120,6 @@
 /* Renamed structures */
 #define AnchorPathOld AnchorPath
 
-/* TimeVal/TimeRequest */
-#define Seconds tv_secs
-#define Microseconds tv_micro
-#define Request tr_node
-#define Time tr_time
-
 /* ReAction (ClassAct) macros */
 #define GetFileEnd End
 #define GetFontEnd End
@@ -220,6 +214,12 @@ int alphasort(const struct dirent **d1, const struct 
dirent **d2);
 int scandir(const char *dir, struct dirent ***namelist,
   int (*filter)(const struct dirent *),
   int (*compar)(const struct dirent **, const struct dirent **));
-#endif
-#endif
 
+#else /* __amigaos4__ */
+/* TimeVal/TimeRequest */
+#define tv_secs Seconds
+#define tv_micro Microseconds
+#define tr_node Request
+#define tr_time Time
+#endif /* __amigaos4__ */
+#endif /* AMIGA_OS3SUPPRT_H_ */
diff --git a/frontends/amiga/schedule.c b/frontends/amiga/schedule.c
index 307fff3..18eb1af 100644
--- a/frontends/amiga/schedule.c
+++ b/frontends/amiga/schedule.c
@@ -83,15 +83,15 @@ static nserror ami_schedule_add_timer_event(struct 
nscallback *nscb, int t)
        struct TimeVal tv;
        ULONG time_us = t * 1000; /* t converted to ?s */
 
-       tv.Seconds = time_us / 1000000;
-       tv.Microseconds = time_us % 1000000;
+       tv.tv_secs = time_us / 1000000;
+       tv.tv_micro = time_us % 1000000;
 
        GetSysTime(&nscb->tv);
        AddTime(&nscb->tv, &tv); // now contains time when event occurs (for 
debug and heap sorting)
 
-       nscb->timereq.Request.io_Command = TR_ADDREQUEST;
-       nscb->timereq.Time.Seconds = tv.Seconds; // secs
-       nscb->timereq.Time.Microseconds = tv.Microseconds; // micro
+       nscb->timereq.tr_node.io_Command = TR_ADDREQUEST;
+       nscb->timereq.tr_time.tv_secs = tv.tv_secs; // secs
+       nscb->timereq.tr_time.tv_micro = tv.tv_micro; // micro
        SendIO((struct IORequest *)nscb);
 
        return NSERROR_OK;
@@ -219,27 +219,27 @@ static void ami_schedule_dump(void)
        PblIterator *iterator;
        struct nscallback *nscb;
        struct ClockData clockdata;
-       
+
        if(pblHeapIsEmpty(schedule_list)) return;
 
        struct TimeVal tv;
        GetSysTime(&tv);
-       Amiga2Date(tv.Seconds, &clockdata);
-       
+       Amiga2Date(tv.tv_secs, &clockdata);
+
        NSLOG(netsurf, INFO, "Current time = %d-%d-%d %d:%d:%d.%lu",
              clockdata.mday, clockdata.month, clockdata.year,
-             clockdata.hour, clockdata.min, clockdata.sec, tv.Microseconds);
+             clockdata.hour, clockdata.min, clockdata.sec, tv.tv_micro);
        NSLOG(netsurf, INFO, "Events remaining in queue:");
 
        iterator = pblHeapIterator(schedule_list);
 
        while ((nscb = pblIteratorNext(iterator)) != (void *)-1) {
-               Amiga2Date(nscb->tv.Seconds, &clockdata);
+               Amiga2Date(nscb->tv.tv_secs, &clockdata);
                NSLOG(netsurf, INFO,
                      "nscb: %p, at %d-%d-%d %d:%d:%d.%lu, callback: %p, %p",
                      nscb, clockdata.mday, clockdata.month, clockdata.year,
                      clockdata.hour, clockdata.min, clockdata.sec,
-                     nscb->tv.Microseconds, nscb->callback, nscb->p);
+                     nscb->tv.tv_micro, nscb->callback, nscb->p);
                if(CheckIO((struct IORequest *)nscb) == NULL) {
                        NSLOG(netsurf, INFO, "-> ACTIVE");
                } else {
@@ -283,7 +283,7 @@ static void ami_schedule_open_timer(struct MsgPort *msgport)
 
        OpenDevice("timer.device", UNIT_VBLANK, (struct IORequest *)tioreq, 0);
 
-       TimerBase = (struct Device *)tioreq->timereq.Request.io_Device;
+       TimerBase = (struct Device *)tioreq->timereq.tr_node.io_Device;
 #ifdef __amigaos4__
        ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase, 
"main", 1, NULL);
 #endif


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

Summary of changes:
 frontends/amiga/font_cache.c |    4 ++--
 frontends/amiga/os3support.h |   16 ++++++++--------
 frontends/amiga/schedule.c   |   24 ++++++++++++------------
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/frontends/amiga/font_cache.c b/frontends/amiga/font_cache.c
index b8039d2..cdb26fe 100644
--- a/frontends/amiga/font_cache.c
+++ b/frontends/amiga/font_cache.c
@@ -101,12 +101,12 @@ static void ami_font_cache_cleanup(struct MinList 
*ami_font_cache_list)
                fnode = node->objstruct;
                GetSysTime((struct timeval *)&curtime);
                SubTime((struct timeval *)&curtime, (struct timeval 
*)&fnode->lastused);
-               if(curtime.Seconds > 300)
+               if(curtime.tv_secs > 300)
                {
                        NSLOG(netsurf, INFO,
                              "Freeing %s not used for %d seconds",
                              node->dtz_Node.ln_Name,
-                             curtime.Seconds);
+                             curtime.tv_secs);
                        DelObject(node);
                }
        } while((node=nnode));
diff --git a/frontends/amiga/os3support.h b/frontends/amiga/os3support.h
index f04b37b..2df0141 100644
--- a/frontends/amiga/os3support.h
+++ b/frontends/amiga/os3support.h
@@ -120,12 +120,6 @@
 /* Renamed structures */
 #define AnchorPathOld AnchorPath
 
-/* TimeVal/TimeRequest */
-#define Seconds tv_secs
-#define Microseconds tv_micro
-#define Request tr_node
-#define Time tr_time
-
 /* ReAction (ClassAct) macros */
 #define GetFileEnd End
 #define GetFontEnd End
@@ -220,6 +214,12 @@ int alphasort(const struct dirent **d1, const struct 
dirent **d2);
 int scandir(const char *dir, struct dirent ***namelist,
   int (*filter)(const struct dirent *),
   int (*compar)(const struct dirent **, const struct dirent **));
-#endif
-#endif
 
+#else /* __amigaos4__ */
+/* TimeVal/TimeRequest */
+#define tv_secs Seconds
+#define tv_micro Microseconds
+#define tr_node Request
+#define tr_time Time
+#endif /* __amigaos4__ */
+#endif /* AMIGA_OS3SUPPRT_H_ */
diff --git a/frontends/amiga/schedule.c b/frontends/amiga/schedule.c
index 307fff3..18eb1af 100644
--- a/frontends/amiga/schedule.c
+++ b/frontends/amiga/schedule.c
@@ -83,15 +83,15 @@ static nserror ami_schedule_add_timer_event(struct 
nscallback *nscb, int t)
        struct TimeVal tv;
        ULONG time_us = t * 1000; /* t converted to ?s */
 
-       tv.Seconds = time_us / 1000000;
-       tv.Microseconds = time_us % 1000000;
+       tv.tv_secs = time_us / 1000000;
+       tv.tv_micro = time_us % 1000000;
 
        GetSysTime(&nscb->tv);
        AddTime(&nscb->tv, &tv); // now contains time when event occurs (for 
debug and heap sorting)
 
-       nscb->timereq.Request.io_Command = TR_ADDREQUEST;
-       nscb->timereq.Time.Seconds = tv.Seconds; // secs
-       nscb->timereq.Time.Microseconds = tv.Microseconds; // micro
+       nscb->timereq.tr_node.io_Command = TR_ADDREQUEST;
+       nscb->timereq.tr_time.tv_secs = tv.tv_secs; // secs
+       nscb->timereq.tr_time.tv_micro = tv.tv_micro; // micro
        SendIO((struct IORequest *)nscb);
 
        return NSERROR_OK;
@@ -219,27 +219,27 @@ static void ami_schedule_dump(void)
        PblIterator *iterator;
        struct nscallback *nscb;
        struct ClockData clockdata;
-       
+
        if(pblHeapIsEmpty(schedule_list)) return;
 
        struct TimeVal tv;
        GetSysTime(&tv);
-       Amiga2Date(tv.Seconds, &clockdata);
-       
+       Amiga2Date(tv.tv_secs, &clockdata);
+
        NSLOG(netsurf, INFO, "Current time = %d-%d-%d %d:%d:%d.%lu",
              clockdata.mday, clockdata.month, clockdata.year,
-             clockdata.hour, clockdata.min, clockdata.sec, tv.Microseconds);
+             clockdata.hour, clockdata.min, clockdata.sec, tv.tv_micro);
        NSLOG(netsurf, INFO, "Events remaining in queue:");
 
        iterator = pblHeapIterator(schedule_list);
 
        while ((nscb = pblIteratorNext(iterator)) != (void *)-1) {
-               Amiga2Date(nscb->tv.Seconds, &clockdata);
+               Amiga2Date(nscb->tv.tv_secs, &clockdata);
                NSLOG(netsurf, INFO,
                      "nscb: %p, at %d-%d-%d %d:%d:%d.%lu, callback: %p, %p",
                      nscb, clockdata.mday, clockdata.month, clockdata.year,
                      clockdata.hour, clockdata.min, clockdata.sec,
-                     nscb->tv.Microseconds, nscb->callback, nscb->p);
+                     nscb->tv.tv_micro, nscb->callback, nscb->p);
                if(CheckIO((struct IORequest *)nscb) == NULL) {
                        NSLOG(netsurf, INFO, "-> ACTIVE");
                } else {
@@ -283,7 +283,7 @@ static void ami_schedule_open_timer(struct MsgPort *msgport)
 
        OpenDevice("timer.device", UNIT_VBLANK, (struct IORequest *)tioreq, 0);
 
-       TimerBase = (struct Device *)tioreq->timereq.Request.io_Device;
+       TimerBase = (struct Device *)tioreq->timereq.tr_node.io_Device;
 #ifdef __amigaos4__
        ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase, 
"main", 1, NULL);
 #endif


-- 
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to