2010-12-30 03:53:11 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2010 John-Mark Bell <jmb@netsurf-browser.org>
|
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
* Minimal compatibility header for AmigaOS 3
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AMIGA_OS3SUPPORT_H_
|
|
|
|
#define AMIGA_OS3SUPPORT_H_
|
|
|
|
|
|
|
|
#ifndef __amigaos4__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2014-12-20 15:42:55 +03:00
|
|
|
#include <proto/exec.h>
|
|
|
|
#include <proto/dos.h>
|
2010-12-30 03:53:11 +03:00
|
|
|
|
|
|
|
/* Include prototypes for amigalib */
|
|
|
|
#include <clib/alib_protos.h>
|
|
|
|
|
|
|
|
#ifndef EXEC_MEMORY_H
|
|
|
|
#include <exec/memory.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Define extra memory type flags */
|
|
|
|
#define MEMF_PRIVATE MEMF_ANY
|
|
|
|
#define MEMF_SHARED MEMF_ANY
|
|
|
|
|
2015-01-09 03:10:02 +03:00
|
|
|
/* Ignore tags that aren't supported */
|
|
|
|
#define PDTA_PromoteMask TAG_IGNORE
|
|
|
|
|
2014-12-20 15:42:55 +03:00
|
|
|
/* Easy wrapper for AllocVecTagList with no tags */
|
|
|
|
#define AllocVecTagList(SZ,TAG) AllocVec(SZ,MEMF_ANY);
|
|
|
|
|
2015-01-09 03:10:02 +03:00
|
|
|
#define Notify(...) (void)0;
|
|
|
|
|
|
|
|
#define FOpen(A,B,C) Open(A,B);
|
|
|
|
#define FClose(A) Close(A);
|
|
|
|
|
2010-12-30 03:53:11 +03:00
|
|
|
/* Integral type definitions */
|
|
|
|
typedef int8_t int8;
|
|
|
|
typedef uint8_t uint8;
|
|
|
|
typedef int16_t int16;
|
|
|
|
typedef uint16_t uint16;
|
|
|
|
typedef int32_t int32;
|
|
|
|
typedef uint32_t uint32;
|
2014-12-20 15:42:55 +03:00
|
|
|
typedef int64_t int64;
|
|
|
|
typedef uint64_t uint64;
|
2010-12-30 03:53:11 +03:00
|
|
|
|
|
|
|
/* TimeVal */
|
|
|
|
struct TimeVal {
|
|
|
|
uint32 Seconds;
|
|
|
|
uint32 Microseconds;
|
|
|
|
};
|
|
|
|
|
2011-01-07 02:34:56 +03:00
|
|
|
/* Compositing */
|
|
|
|
#define COMPFLAG_IgnoreDestAlpha 0
|
|
|
|
#define COMPFLAG_SrcAlphaOverride 0
|
|
|
|
#define COMPFLAG_SrcFilter 0
|
|
|
|
|
|
|
|
#define COMPOSITE_Src 0
|
|
|
|
|
|
|
|
#define COMPTAG_ScaleX 0
|
|
|
|
#define COMPTAG_ScaleY 0
|
|
|
|
#define COMPTAG_DestX 0
|
|
|
|
#define COMPTAG_DestY 0
|
|
|
|
#define COMPTAG_DestWidth 0
|
|
|
|
#define COMPTAG_DestHeight 0
|
|
|
|
#define COMPTAG_OffsetX 0
|
|
|
|
#define COMPTAG_OffsetY 0
|
|
|
|
|
|
|
|
#define CompositeTags(a, ...) ((void) (a))
|
|
|
|
#define COMP_FLOAT_TO_FIX(f) (f)
|
|
|
|
|
2011-01-08 02:45:17 +03:00
|
|
|
/* icon.library v51 (ie. AfA_OS version) */
|
|
|
|
#define ICONCTRLA_SetImageDataFormat (ICONA_Dummy + 0x67) /*103*/
|
|
|
|
#define ICONCTRLA_GetImageDataFormat (ICONA_Dummy + 0x68) /*104*/
|
|
|
|
|
|
|
|
#define IDFMT_BITMAPPED (0) /* Bitmapped icon (planar, legacy) */
|
|
|
|
#define IDFMT_PALETTEMAPPED (1) /* Palette mapped icon (chunky, V44+) */
|
|
|
|
#define IDFMT_DIRECTMAPPED (2) /* Direct mapped icon (truecolor 0xAARRGGBB, V51+) */
|
|
|
|
|
2014-12-20 15:42:55 +03:00
|
|
|
/* Functions */
|
2015-01-09 03:10:02 +03:00
|
|
|
/* DOS */
|
2014-12-20 15:42:55 +03:00
|
|
|
int64 GetFileSize(BPTR fh);
|
2015-01-09 03:10:02 +03:00
|
|
|
|
|
|
|
/* Exec */
|
|
|
|
struct Node *GetHead(struct List *list);
|
|
|
|
|
|
|
|
/* Utility */
|
|
|
|
char *ASPrintf(const char *fmt, ...);
|
2010-12-30 03:53:11 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|