summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-11-19 21:12:31 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2016-11-19 21:12:31 (GMT)
commit4f0c9b6c610d1eb9a5bcccf6dbf3f53410df9432 (patch)
tree2b7be1c59b057b4c3dbc763291c5ad63ec7f3828
parent2c6f2f4ef5a50c36676308f6663c0d21edc6aa70 (diff)
parentfaf4c1fb6012941134046db14370f60748184b05 (diff)
downloadnetsurf-4f0c9b6c610d1eb9a5bcccf6dbf3f53410df9432.tar.gz
netsurf-4f0c9b6c610d1eb9a5bcccf6dbf3f53410df9432.tar.bz2
Merge branch 'master' of git://git.netsurf-browser.org/netsurf into chris/malloc
Conflicts: frontends/amiga/icon.c
-rw-r--r--content/fetchers/data.c2
-rw-r--r--frontends/amiga/bitmap.c9
-rwxr-xr-xfrontends/amiga/bitmap.h10
-rw-r--r--frontends/amiga/icon.c2
-rw-r--r--frontends/beos/fetch_rsrc.cpp1
5 files changed, 12 insertions, 12 deletions
diff --git a/content/fetchers/data.c b/content/fetchers/data.c
index d82832a..139d09a 100644
--- a/content/fetchers/data.c
+++ b/content/fetchers/data.c
@@ -25,6 +25,7 @@
#include <string.h>
#include <stdlib.h>
#include <libwapcaplet/libwapcaplet.h>
+#include <nsutils/base64.h>
#include "utils/url.h"
#include "utils/nsurl.h"
@@ -32,7 +33,6 @@
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/ring.h"
-#include "nsutils/base64.h"
#include "content/fetch.h"
#include "content/fetchers.h"
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index d612abf..bb4bfc6 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -730,14 +730,15 @@ void ami_bitmap_set_title(struct bitmap *bm, const char *title)
bm->title = strdup(title);
}
-ULONG *ami_bitmap_get_icondata(struct bitmap *bm)
+void ami_bitmap_set_icondata(struct bitmap *bm, ULONG *icondata)
{
- return bm->icondata;
+ bm->icondata = icondata;
}
-void ami_bitmap_set_icondata(struct bitmap *bm, ULONG *icondata)
+void ami_bitmap_free_icondata(struct bitmap *bm)
{
- bm->icondata = icondata;
+ if(bm->icondata) FreeVec(bm->icondata);
+ bm->icondata = NULL;
}
bool ami_bitmap_is_nativebm(struct bitmap *bm, struct BitMap *nbm)
diff --git a/frontends/amiga/bitmap.h b/frontends/amiga/bitmap.h
index 771ded4..a32d740 100755
--- a/frontends/amiga/bitmap.h
+++ b/frontends/amiga/bitmap.h
@@ -63,24 +63,24 @@ void ami_bitmap_set_url(struct bitmap *bm, struct nsurl *url);
void ami_bitmap_set_title(struct bitmap *bm, const char *title);
/**
- * Get an icondata pointer
+ * Set an icondata pointer
*
* \param bm a bitmap, as returned by bitmap_create()
- * \return pointer to the icondata area
+ * \param icondata a pointer to memory
*
* This function probably shouldn't be here!
*/
-ULONG *ami_bitmap_get_icondata(struct bitmap *bm);
+void ami_bitmap_set_icondata(struct bitmap *bm, ULONG *icondata);
/**
- * Set an icondata pointer
+ * Free an icondata pointer
*
* \param bm a bitmap, as returned by bitmap_create()
* \param icondata a pointer to memory
*
* This function probably shouldn't be here!
*/
-void ami_bitmap_set_icondata(struct bitmap *bm, ULONG *icondata);
+void ami_bitmap_free_icondata(struct bitmap *bm);
/**
* Test if a BitMap is owned by a bitmap.
diff --git a/frontends/amiga/icon.c b/frontends/amiga/icon.c
index c9fc6fd..3f597a1 100644
--- a/frontends/amiga/icon.c
+++ b/frontends/amiga/icon.c
@@ -542,6 +542,6 @@ void amiga_icon_free(struct DiskObject *dobj)
struct bitmap *bm = dobj->do_Gadget.UserData;
FreeDiskObject(dobj);
- if(bm) free(ami_bitmap_get_icondata(bm));
+ if(bm) ami_bitmap_free_icondata(bm);
}
diff --git a/frontends/beos/fetch_rsrc.cpp b/frontends/beos/fetch_rsrc.cpp
index 4df246f..e77f4c9 100644
--- a/frontends/beos/fetch_rsrc.cpp
+++ b/frontends/beos/fetch_rsrc.cpp
@@ -42,7 +42,6 @@ extern "C" {
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/ring.h"
-#include "utils/base64.h"
#include "content/fetch.h"
#include "content/fetchers.h"
}