4 * Copyright (C) 1993-1999 by Jochen Wiedmann and Marcin Orlowski
5 * Copyright (C) 2002-2015 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.
23 #ifndef FLEXCAT_UTILS_H
24 #define FLEXCAT_UTILS_H
27 void MyExit ( int Code
);
28 char *AllocString ( const char *str
);
29 char *AddString ( char *str
, const char *addedstr
);
30 char *ConvertString ( char *str
, const char *from_charset
, const char *to_charset
);
31 char *AddCatalogChunk ( char *ID
, const char *string
);
33 int getoctal ( int c
);
34 char *ReadLine ( FILE * fp
, int AllowComment
);
35 void OverSpace ( char **strptr
);
36 void Expunge ( void );
37 int ReadChar ( char **strptr
, char *dest
);
38 char *AllocFileName ( char *filename
, int howto
);
39 char *AddFileName ( char *pathname
, char *filename
);
43 int Stricmp ( const char *str1
, const char *str2
);
44 int Strnicmp ( const char *str1
, const char *str2
, int len
);
47 size_t utf8_strlen(const char *str
);
49 #if defined(__amigaos3__) || defined(__MORPHOS__)
50 char *strptime(const char *string
, const char *fmt
, struct tm
*res
);
53 #if defined(__amigaos4__)
54 #define GETINTERFACE(iface, base) (iface = (APTR)GetInterface((struct Library *)(base), "main", 1L, NULL))
55 #define DROPINTERFACE(iface) (DropInterface((struct Interface *)iface), iface = NULL)
57 #define GETINTERFACE(iface, base) TRUE
58 #define DROPINTERFACE(iface) ((void)0)
59 #endif // __amigaos4__
61 #endif /* FLEXCAT_UTILS_H */