1 /***************************************************************************
3 codesets.library - Amiga shared library for handling different codesets
4 Copyright (C) 2001-2005 by Alfonso [alfie] Ranieri <alforan@tin.it>.
5 Copyright (C) 2005-2014 codesets.library Open Source Team
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 codesets.library project: http://sourceforge.net/projects/codesetslib/
21 ***************************************************************************/
26 /****************************************************************************/
31 #include "SDI_compiler.h"
33 #if defined(__amigaos4__)
34 #define GETINTERFACE(iface, base) (iface = (APTR)GetInterface((struct Library *)(base), "main", 1L, NULL))
35 #define DROPINTERFACE(iface) (DropInterface((struct Interface *)iface), iface = NULL)
37 #define GETINTERFACE(iface, base) TRUE
38 #define DROPINTERFACE(iface)
41 // special flagging macros
42 #define isFlagSet(v,f) (((v) & (f)) == (f)) // return TRUE if the flag is set
43 #define hasFlag(v,f) (((v) & (f)) != 0) // return TRUE if one of the flags in f is set in v
44 #define isFlagClear(v,f) (((v) & (f)) == 0) // return TRUE if flag f is not set in v
45 #define SET_FLAG(v,f) ((v) |= (f)) // set the flag f in v
46 #define CLEAR_FLAG(v,f) ((v) &= ~(f)) // clear the flag f in v
47 #define MASK_FLAG(v,f) ((v) &= (f)) // mask the variable v with flag f bitwise
49 // transforms a define into a string
50 #define STR(x) STR2(x)
53 /****************************************************************************/
55 #endif /* _MACROS_H */