more easy os3 fixes

This commit is contained in:
Chris Young 2015-01-11 00:07:11 +00:00
parent 81d024e3d8
commit ae012398b0
5 changed files with 28 additions and 5 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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,

View File

@ -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

View File

@ -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, ...);
/* C */
char *strlwr(char *str);
#endif
#endif
#endif