4 * Copyright (C) 1993-1999 by Jochen Wiedmann and Marcin Orlowski
5 * Copyright (C) 2002-2010 by the FlexCat Open Source Team
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 /* Amiga enviroment? */
28 #include "FlexCat_cat.h"
30 #include "FlexCat_cat_other.h"
44 #define VERS "FlexCat " EXE_REV_STRING
45 #define VSTRING VERS " [" SYSTEMSHORT "/" CPU "] (" EXE_DATE ") " EXE_COPYRIGHT
46 #define VERSTAG "\0$VER: " VSTRING
49 #include <exec/types.h>
50 #if defined(_DCC) || defined(__SASC) || defined(__GNUC__)
51 #include <proto/exec.h>
52 #include <proto/dos.h>
53 #include <proto/intuition.h>
54 #include <proto/utility.h>
56 #include <clib/exec_protos.h>
57 #include <clib/dos_protos.h>
58 #include <clib/utility_protos.h>
64 #define tolower ToLower
67 #if defined(__MORPHOS__) || defined(__AROS__) || defined(WIN32) || defined(unix)
69 int asprintf(char **ptr
, const char * format
, ...);
70 int vasprintf(char **ptr
, const char * format
, va_list ap
);
74 // VisualStudio has strdup() declared as being deprecated
76 #define strdup(s) _strdup(s)
88 #define MAXPATHLEN 512
94 #define FLEXCAT_SDDIR "FLEXCAT_SDDIR"
97 #if defined(__amigaos4__)
98 #include <dos/obsolete.h>
100 #define FILE_MASK FIBF_EXECUTE
101 #define DEFAULT_FLEXCAT_SDDIR "PROGDIR:lib"
104 #define DEFAULT_FLEXCAT_SDDIR "C:\\MinGW\\lib\\flexcat"
106 #define DEFAULT_FLEXCAT_SDDIR "/usr/lib/flexcat"
111 // we have to care about own basic datatype
112 // definitions as flexcat may also be compiled
113 // on 64bit environments (e.g. linux)
115 // in fact, these definitions are borrowed from
116 // the OS4 SDK and we bring them onto all the
117 // other OSs as well....
118 #if !defined(__amigaos4__)
120 typedef uint8_t uint8
;
123 typedef uint16_t uint16
;
124 typedef int16_t int16
;
126 typedef uint32_t uint32
;
127 typedef int32_t int32
;
129 #if !defined(__SASC) && ((__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) || defined(__VBCC__))
130 typedef uint64_t uint64
;
131 typedef int64_t int64
;
133 typedef struct { unsigned long hi
,lo
; } uint64
; /* Not exactly scalar data
134 * types, but the right size.
136 typedef struct { long hi
,lo
; } int64
;
142 typedef uint8 BYTEBITS
;
143 typedef uint16 UWORD
;
145 typedef uint16 WORDBITS
;
146 typedef uint32 ULONG
;
148 typedef uint32 LONGBITS
;
152 #endif /* !__amigaos4__ */
155 #define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
158 #define MAX_NEW_STR_LEN 25
169 struct CatString
*Next
;
173 int MinLen
, MaxLen
, ID
, Nr
, LenBytes
;
174 int NotInCT
; /* If a string is not present, we write NEW
175 while updating the CT file for easier work. */
176 int POformat
; /* Is this string a po-format string */
182 struct CatalogChunk
*Next
; /* struct CatalogChunk *Next */
187 int32
getft ( char *filename
);
189 #endif /* FLEXCAT_H */