summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-11-19 15:50:22 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2016-11-19 15:50:22 (GMT)
commitec239402eac198af635f14970bf411e5690dd02e (patch)
treeba5dfbc0d235795de3c20bd63d9d07964e21f791
parentd3c7d410a87f02956523b64bc5af380804e67690 (diff)
downloadnetsurf-ec239402eac198af635f14970bf411e5690dd02e.tar.gz
netsurf-ec239402eac198af635f14970bf411e5690dd02e.tar.bz2
Move memory functions from misc.c to memory.c
-rw-r--r--frontends/amiga/Makefile2
-rw-r--r--frontends/amiga/arexx.c1
-rw-r--r--frontends/amiga/bitmap.c1
-rw-r--r--frontends/amiga/clipboard.c2
-rw-r--r--frontends/amiga/download.c1
-rw-r--r--frontends/amiga/dt_anim.c2
-rw-r--r--frontends/amiga/file.c1
-rw-r--r--frontends/amiga/filetype.c2
-rw-r--r--frontends/amiga/font_bullet.c1
-rw-r--r--frontends/amiga/gui.c1
-rwxr-xr-xfrontends/amiga/gui_options.c2
-rwxr-xr-xfrontends/amiga/history_local.c1
-rw-r--r--frontends/amiga/icon.c2
-rw-r--r--frontends/amiga/iff_dr2d.c2
-rwxr-xr-xfrontends/amiga/login.c2
-rw-r--r--frontends/amiga/menu.c2
-rwxr-xr-xfrontends/amiga/misc.c52
-rw-r--r--frontends/amiga/misc.h9
-rwxr-xr-xfrontends/amiga/object.c2
-rw-r--r--frontends/amiga/plotters.c2
-rw-r--r--frontends/amiga/print.c1
-rw-r--r--frontends/amiga/schedule.c2
-rwxr-xr-xfrontends/amiga/search.c2
-rw-r--r--frontends/amiga/theme.c2
-rw-r--r--frontends/amiga/tree.c2
25 files changed, 23 insertions, 76 deletions
diff --git a/frontends/amiga/Makefile b/frontends/amiga/Makefile
index a2c1b13..ea6e8fe 100644
--- a/frontends/amiga/Makefile
+++ b/frontends/amiga/Makefile
@@ -37,7 +37,7 @@ MESSAGES_FILTER=ami
# sources purely for the Amiga build
S_FRONTEND := gui.c tree.c history.c hotlist.c schedule.c file.c \
- misc.c bitmap.c font.c filetype.c utf8.c login.c \
+ misc.c bitmap.c font.c filetype.c utf8.c login.c memory.c \
plotters.c object.c menu.c save_pdf.c arexx.c version.c \
cookies.c ctxmenu.c clipboard.c help.c font_scan.c \
launch.c search.c history_local.c download.c iff_dr2d.c \
diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c
index 062f00b..ad2d237 100644
--- a/frontends/amiga/arexx.c
+++ b/frontends/amiga/arexx.c
@@ -42,6 +42,7 @@
#include "amiga/hotlist.h"
#include "amiga/tree.h"
#include "amiga/libs.h"
+#include "amiga/memory.h"
#include "amiga/misc.h"
#include "amiga/theme.h"
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 8c691ed..7609d94 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -54,6 +54,7 @@
#include "amiga/gui.h"
#include "amiga/bitmap.h"
#include "amiga/plotters.h"
+#include "amiga/memory.h"
#include "amiga/misc.h"
#include "amiga/rtg.h"
diff --git a/frontends/amiga/clipboard.c b/frontends/amiga/clipboard.c
index 2dce068..4933f59 100644
--- a/frontends/amiga/clipboard.c
+++ b/frontends/amiga/clipboard.c
@@ -45,7 +45,7 @@
#include "amiga/iff_cset.h"
#include "amiga/iff_dr2d.h"
#include "amiga/menu.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/utf8.h"
#define ID_UTF8 MAKE_ID('U','T','F','8')
diff --git a/frontends/amiga/download.c b/frontends/amiga/download.c
index 93536f4..0750e5e 100644
--- a/frontends/amiga/download.c
+++ b/frontends/amiga/download.c
@@ -64,6 +64,7 @@
#include "amiga/file.h"
#include "amiga/iff_dr2d.h"
#include "amiga/libs.h"
+#include "amiga/memory.h"
#include "amiga/misc.h"
#include "amiga/theme.h"
#include "amiga/utf8.h"
diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c
index 1946788..3175cf1 100644
--- a/frontends/amiga/dt_anim.c
+++ b/frontends/amiga/dt_anim.c
@@ -46,7 +46,7 @@
#include "amiga/bitmap.h"
#include "amiga/filetype.h"
#include "amiga/datatypes.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/plotters.h"
typedef struct amiga_dt_anim_content {
diff --git a/frontends/amiga/file.c b/frontends/amiga/file.c
index 1bba30e..db0e716 100644
--- a/frontends/amiga/file.c
+++ b/frontends/amiga/file.c
@@ -40,6 +40,7 @@
#include "amiga/filetype.h"
#include "amiga/icon.h"
#include "amiga/iff_dr2d.h"
+#include "amiga/memory.h"
#include "amiga/misc.h"
#include "amiga/save_pdf.h"
#include "amiga/theme.h"
diff --git a/frontends/amiga/filetype.c b/frontends/amiga/filetype.c
index 61e4929..8c658ee 100644
--- a/frontends/amiga/filetype.c
+++ b/frontends/amiga/filetype.c
@@ -31,7 +31,7 @@
#include "utils/utils.h"
#include "amiga/filetype.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/object.h"
/**
diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c
index 48e49f3..bb0adb5 100644
--- a/frontends/amiga/font_bullet.c
+++ b/frontends/amiga/font_bullet.c
@@ -41,6 +41,7 @@
#include "utils/utf8.h"
#include "utils/utils.h"
+#include "amiga/memory.h"
#include "amiga/misc.h"
#include "amiga/font.h"
#include "amiga/font_bullet.h"
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 459e768..df03756 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -141,6 +141,7 @@
#include "amiga/libs.h"
#include "amiga/login.h"
#include "amiga/menu.h"
+#include "amiga/memory.h"
#include "amiga/misc.h"
#include "amiga/nsoption.h"
#include "amiga/plotters.h"
diff --git a/frontends/amiga/gui_options.c b/frontends/amiga/gui_options.c
index 2b1b7c9..a890a91 100755
--- a/frontends/amiga/gui_options.c
+++ b/frontends/amiga/gui_options.c
@@ -73,7 +73,7 @@
#include "amiga/gui_options.h"
#include "amiga/help.h"
#include "amiga/libs.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/nsoption.h"
#include "amiga/object.h"
#include "amiga/selectmenu.h"
diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c
index c87b563..fa5c249 100755
--- a/frontends/amiga/history_local.c
+++ b/frontends/amiga/history_local.c
@@ -51,6 +51,7 @@
#include "graphics/rpattr.h"
#include "amiga/libs.h"
+#include "amiga/memory.h"
#include "amiga/misc.h"
#include "amiga/object.h"
#include "amiga/plotters.h"
diff --git a/frontends/amiga/icon.c b/frontends/amiga/icon.c
index 7b73360..bd79a55 100644
--- a/frontends/amiga/icon.c
+++ b/frontends/amiga/icon.c
@@ -49,7 +49,7 @@
#include "amiga/os3support.h"
#include "amiga/bitmap.h"
#include "amiga/icon.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#define THUMBNAIL_WIDTH 100 /* Icon sizes for thumbnails, usually the same as */
#define THUMBNAIL_HEIGHT 86 /* WIDTH/HEIGHT in desktop/thumbnail.c */
diff --git a/frontends/amiga/iff_dr2d.c b/frontends/amiga/iff_dr2d.c
index aea7738..1c8d7db 100644
--- a/frontends/amiga/iff_dr2d.c
+++ b/frontends/amiga/iff_dr2d.c
@@ -30,7 +30,7 @@
#include "netsurf/content.h"
#include "amiga/os3support.h"
#include "amiga/iff_dr2d.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#else
#include "os3support.h"
#include "iff_dr2d.h"
diff --git a/frontends/amiga/login.c b/frontends/amiga/login.c
index 3b338bf..e1d2891 100755
--- a/frontends/amiga/login.c
+++ b/frontends/amiga/login.c
@@ -46,7 +46,7 @@
#include "amiga/gui.h"
#include "amiga/libs.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/object.h"
#include "amiga/login.h"
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c
index 0fd730e..2eda5ff 100644
--- a/frontends/amiga/menu.c
+++ b/frontends/amiga/menu.c
@@ -68,7 +68,7 @@
#include "amiga/hotlist.h"
#include "amiga/libs.h"
#include "amiga/menu.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/nsoption.h"
#include "amiga/print.h"
#include "amiga/search.h"
diff --git a/frontends/amiga/misc.c b/frontends/amiga/misc.c
index c09b283..5ca4f90 100755
--- a/frontends/amiga/misc.c
+++ b/frontends/amiga/misc.c
@@ -42,58 +42,6 @@
#include "amiga/misc.h"
#include "amiga/utf8.h"
-void *ami_misc_allocvec_clear(int size, UBYTE value)
-{
-#ifdef __amigaos4__
- return AllocVecTags(size, AVT_ClearWithValue, value, TAG_DONE);
-#else
- void *mem = AllocVec(size, MEMF_ANY);
- if (mem) memset(mem, value, size);
- return mem;
-#endif
-}
-
-APTR ami_misc_itempool_create(int size)
-{
-#ifdef __amigaos4__
- return AllocSysObjectTags(ASOT_ITEMPOOL,
- ASOITEM_MFlags, MEMF_PRIVATE,
- ASOITEM_ItemSize, size,
- ASOITEM_GCPolicy, ITEMGC_AFTERCOUNT,
- ASOITEM_GCParameter, 100,
- TAG_DONE);
-#else
- return CreatePool(MEMF_ANY, 20 * size, size);
-#endif
-}
-
-void ami_misc_itempool_delete(APTR pool)
-{
-#ifdef __amigaos4__
- FreeSysObject(ASOT_ITEMPOOL, pool);
-#else
- DeletePool(pool);
-#endif
-}
-
-APTR ami_misc_itempool_alloc(APTR pool, int size)
-{
-#ifdef __amigaos4__
- return ItemPoolAlloc(pool);
-#else
- return AllocPooled(pool, size);
-#endif
-}
-
-void ami_misc_itempool_free(APTR restrict pool, APTR restrict item, int size)
-{
-#ifdef __amigaos4__
- ItemPoolFree(pool, item);
-#else
- FreePooled(pool, item, size);
-#endif
-}
-
static LONG ami_misc_req(const char *message, uint32 type)
{
LONG ret = 0;
diff --git a/frontends/amiga/misc.h b/frontends/amiga/misc.h
index c7ae5af..a749794 100644
--- a/frontends/amiga/misc.h
+++ b/frontends/amiga/misc.h
@@ -35,15 +35,6 @@ struct Window;
* faliure displaying the message to the user.
*/
nserror amiga_warn_user(const char *warning, const char *detail);
-
-void *ami_misc_allocvec_clear(int size, UBYTE value);
-
-/* Itempool cross-compatibility */
-APTR ami_misc_itempool_create(int size);
-void ami_misc_itempool_delete(APTR pool);
-APTR ami_misc_itempool_alloc(APTR pool, int size);
-void ami_misc_itempool_free(APTR pool, APTR item, int size);
-
char *translate_escape_chars(const char *s);
void ami_misc_fatal_error(const char *message);
int32 amiga_warn_user_multi(const char *body,
diff --git a/frontends/amiga/object.c b/frontends/amiga/object.c
index 6459d63..074ad92 100755
--- a/frontends/amiga/object.c
+++ b/frontends/amiga/object.c
@@ -26,7 +26,7 @@
#include <exec/lists.h>
#include <exec/nodes.h>
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/object.h"
#ifdef __amigaos4__
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index 1917171..842e1bb 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -45,7 +45,7 @@
#include "amiga/bitmap.h"
#include "amiga/font.h"
#include "amiga/gui.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/rtg.h"
#include "amiga/utf8.h"
diff --git a/frontends/amiga/print.c b/frontends/amiga/print.c
index 6926647..7c0dfd9 100644
--- a/frontends/amiga/print.c
+++ b/frontends/amiga/print.c
@@ -62,6 +62,7 @@
#include "amiga/font.h"
#include "amiga/gui.h"
#include "amiga/libs.h"
+#include "amiga/memory.h"
#include "amiga/misc.h"
#include "amiga/print.h"
#include "amiga/utf8.h"
diff --git a/frontends/amiga/schedule.c b/frontends/amiga/schedule.c
index 707d7bb..bfafe9c 100644
--- a/frontends/amiga/schedule.c
+++ b/frontends/amiga/schedule.c
@@ -30,7 +30,7 @@
#include "utils/errors.h"
#include "utils/log.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/schedule.h"
struct nscallback
diff --git a/frontends/amiga/search.c b/frontends/amiga/search.c
index 429545e..7a49919 100755
--- a/frontends/amiga/search.c
+++ b/frontends/amiga/search.c
@@ -56,7 +56,7 @@
#include "amiga/libs.h"
#include "amiga/gui.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/search.h"
#include "amiga/object.h"
#include "amiga/theme.h"
diff --git a/frontends/amiga/theme.c b/frontends/amiga/theme.c
index 4042d1d..5f44a9b 100644
--- a/frontends/amiga/theme.c
+++ b/frontends/amiga/theme.c
@@ -49,7 +49,7 @@
#include "amiga/bitmap.h"
#include "amiga/schedule.h"
#include "amiga/theme.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
static struct BitMap *throbber = NULL;
static struct bitmap *throbber_nsbm = NULL;
diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c
index 8328194..460eb22 100644
--- a/frontends/amiga/tree.c
+++ b/frontends/amiga/tree.c
@@ -66,7 +66,7 @@
#include "amiga/tree.h"
#include "amiga/file.h"
#include "amiga/libs.h"
-#include "amiga/misc.h"
+#include "amiga/memory.h"
#include "amiga/utf8.h"
#include "amiga/sslcert.h"
#include "amiga/drag.h" /* drag icon stuff */