grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / codesets / src / base.h
blob69512b135bb2f8f0719a8dd4268a35c961365ec5
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/
19 $Id$
21 ***************************************************************************/
23 #ifndef BASE_H
24 #define BASE_H 1
26 #ifndef EXEC_LIBRARIES_H
27 #include <exec/libraries.h>
28 #endif
30 #ifndef EXEC_SEMAPHORES_H
31 #include <exec/semaphores.h>
32 #endif
34 #ifndef DOS_DOS_H
35 #include <dos/dos.h>
36 #endif
38 /***************************************************************************/
40 struct LibraryHeader
42 struct Library libBase;
43 struct Library *sysBase;
44 BPTR segList;
45 struct SignalSemaphore libSem;
46 APTR pool;
47 struct SignalSemaphore poolSem;
48 ULONG flags;
49 struct codesetList codesets; // list with all internal codesets.
50 struct codeset *systemCodeset; // ptr to the system's default codeset
51 struct codeset *utf8Codeset; // ptr to the fake utf8 codeset
52 struct codeset *utf16Codeset; // ptr to the fake utf16 codeset
53 struct codeset *utf32Codeset;
56 #define __NOLIBBASE__
57 #include <proto/codesets.h>
59 /***************************************************************************/
61 extern struct LibraryHeader *CodesetsBase;
63 #if defined(__amigaos4__)
64 #define __BASE_OR_IFACE_TYPE struct CodesetsIFace *
65 #define __BASE_OR_IFACE_VAR ICodesets
66 #else
67 #define __BASE_OR_IFACE_TYPE struct LibraryHeader *
68 #define __BASE_OR_IFACE_VAR CodesetsBase
69 #endif
70 #define __BASE_OR_IFACE __BASE_OR_IFACE_TYPE __BASE_OR_IFACE_VAR
72 /***************************************************************************/
74 #endif /* BASE_H */