summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-11 00:07:11 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-11 00:07:11 +0000
commitae012398b0f0a7320ed1d80bf6c370971033b2b9 (patch)
treeb82c1c21aea28aa02890543f5c09bc9e03fe9b26 /amiga
parent81d024e3d856ccb2e5d8270d8f7168417ece81ac (diff)
downloadnetsurf-ae012398b0f0a7320ed1d80bf6c370971033b2b9.tar.gz
netsurf-ae012398b0f0a7320ed1d80bf6c370971033b2b9.tar.bz2
more easy os3 fixes
Diffstat (limited to 'amiga')
-rw-r--r--amiga/arexx.c4
-rw-r--r--amiga/filetype.c7
-rwxr-xr-xamiga/font_scan.h2
-rw-r--r--amiga/os3support.c12
-rw-r--r--amiga/os3support.h8
5 files changed, 28 insertions, 5 deletions
diff --git a/amiga/arexx.c b/amiga/arexx.c
index b138d4969..eb2a6c10a 100644
--- a/amiga/arexx.c
+++ b/amiga/arexx.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "amiga/os3support.h"
+
#include <stdlib.h>
#include <string.h>
#include <math.h>
@@ -32,11 +34,11 @@
#include "desktop/gui_window.h"
#include "desktop/version.h"
-#include "amiga/os3support.h"
#include "amiga/arexx.h"
#include "amiga/download.h"
#include "amiga/gui.h"
#include "amiga/hotlist.h"
+#include "amiga/misc.h"
#include "amiga/theme.h"
extern const char * const verarexx;
diff --git a/amiga/filetype.c b/amiga/filetype.c
index 67b60ab07..b37ebe58d 100644
--- a/amiga/filetype.c
+++ b/amiga/filetype.c
@@ -16,9 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "amiga/os3support.h"
+
#include <stdlib.h>
#include <string.h>
#include "amiga/filetype.h"
+#include "amiga/misc.h"
#include "amiga/object.h"
#include "content/fetch.h"
#include "content/content.h"
@@ -201,7 +204,7 @@ nserror ami_mime_init(const char *mimefile)
if(ReadArgs(template, rarray, rargs))
{
node = AddObject(ami_mime_list, AMINS_MIME);
- mimeentry = AllocVecTags(sizeof(struct ami_mime_entry), AVT_ClearWithValue, 0, TAG_DONE);
+ mimeentry = ami_misc_allocvec_clear(sizeof(struct ami_mime_entry), 0);
node->objstruct = mimeentry;
if(rarray[AMI_MIME_MIMETYPE])
@@ -351,7 +354,7 @@ static APTR ami_mime_guess_add_datatype(struct DataType *dt, lwc_string **lwc_mi
char *p;
node = AddObject(ami_mime_list, AMINS_MIME);
- mimeentry = AllocVecTags(sizeof(struct ami_mime_entry), AVT_ClearWithValue, 0, TAG_DONE);
+ mimeentry = ami_misc_allocvec_clear(sizeof(struct ami_mime_entry), 0);
node->objstruct = mimeentry;
lerror = lwc_intern_string(dth->dth_Name, strlen(dth->dth_Name), &mimeentry->datatype);
diff --git a/amiga/font_scan.h b/amiga/font_scan.h
index d29469742..69361557f 100755
--- a/amiga/font_scan.h
+++ b/amiga/font_scan.h
@@ -18,7 +18,7 @@
#ifndef AMIGA_FONT_SCAN_H
#define AMIGA_FONT_SCAN_H
-
+#include "amiga/os3support.h"
#include <libwapcaplet/libwapcaplet.h>
void ami_font_scan_init(const char *filename, bool force_scan, bool save,
diff --git a/amiga/os3support.c b/amiga/os3support.c
index e020d0420..613701cc5 100644
--- a/amiga/os3support.c
+++ b/amiga/os3support.c
@@ -160,4 +160,16 @@ char *ASPrintf(const char *fmt, ...)
return rbuf;
}
+/* C */
+char *strlwr(char *str)
+{
+ size_t i;
+ size_t len = strlen(str);
+
+ for(i=0; i<len; i++)
+ str[i] = tolower((unsigned char)str[i]);
+
+ return str;
+}
#endif
+
diff --git a/amiga/os3support.h b/amiga/os3support.h
index 9eb195913..9a25197e9 100644
--- a/amiga/os3support.h
+++ b/amiga/os3support.h
@@ -70,6 +70,9 @@
#define IDoMethod DoMethod
#define IDoMethodA DoMethodA
#define IDoSuperMethodA DoSuperMethodA
+#define RefreshSetGadgetAttrs SetGadgetAttrs /*\todo This isn't quite right */
+/* Utility */
+#define SetMem memset
/* Integral type definitions */
typedef int8_t int8;
@@ -123,6 +126,9 @@ struct Node *GetHead(struct List *list);
/* Utility */
char *ASPrintf(const char *fmt, ...);
-#endif
+/* C */
+char *strlwr(char *str);
#endif
+#endif
+