// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
-// http://www.artsoft.org/
+// https://www.artsoft.org/
// ----------------------------------------------------------------------------
// misc.h
// ============================================================================
#include "system.h"
-/* values for InitCounter() and Counter() */
+// values for InitCounter() and Counter()
#define INIT_COUNTER 0
#define READ_COUNTER 1
-/* values for InitRND() */
+// values for InitRND()
#define NEW_RANDOMIZE 0
#define RANDOM_ENGINE 0
#define GetEngineRandom(max) get_random_number(RANDOM_ENGINE, max)
#define GetSimpleRandom(max) get_random_number(RANDOM_SIMPLE, max)
-/* values for Error() */
-#define ERR_UNKNOWN 0
-#define ERR_DEBUG (1 << 0)
-#define ERR_INFO (1 << 1)
-#define ERR_INFO_LINE (1 << 2)
-#define ERR_WARN (1 << 3)
-#define ERR_EXIT (1 << 4)
-#define ERR_HELP (1 << 5)
-#define ERR_SOUND_SERVER (1 << 6)
-#define ERR_NETWORK_SERVER (1 << 7)
-#define ERR_NETWORK_CLIENT (1 << 8)
-#define ERR_FROM_SERVER (ERR_SOUND_SERVER | ERR_NETWORK_SERVER)
-#define ERR_EXIT_HELP (ERR_EXIT | ERR_HELP)
-#define ERR_EXIT_SOUND_SERVER (ERR_EXIT | ERR_SOUND_SERVER)
-#define ERR_EXIT_NETWORK_SERVER (ERR_EXIT | ERR_NETWORK_SERVER)
-#define ERR_EXIT_NETWORK_CLIENT (ERR_EXIT | ERR_NETWORK_CLIENT)
-
-/* values for getFile...() and putFile...() */
+// values for getFile...() and putFile...()
#define BYTE_ORDER_BIG_ENDIAN 0
#define BYTE_ORDER_LITTLE_ENDIAN 1
-/* values for cursor bitmap creation */
+// values for cursor bitmap creation
#define BIT_ORDER_MSB 0
#define BIT_ORDER_LSB 1
-/* values for createDirectory() */
+// values for createDirectory()
#define PERMS_PRIVATE 0
#define PERMS_PUBLIC 1
-/* values for general file handling stuff */
+// values for general file handling stuff
#define MAX_FILENAME_LEN 256
#define MAX_LINE_LEN 1024
-/* values for general username handling stuff */
+// values for general username handling stuff
#define MAX_USERNAME_LEN 1024
#if defined(PLATFORM_ANDROID)
-/* values for Android asset handling */
+// values for Android asset handling
#define ASSET_TOC_BASENAME ".toc"
#endif
-/* structure definitions */
+// structure definitions
typedef struct
{
} Directory;
-/* function definitions */
+// function definitions
void fprintf_line(FILE *, char *, int);
void fprintf_line_with_prefix(FILE *, char *, char *, int);
void PrintLine(char *, int);
void PrintLineWithPrefix(char *, char *, int);
+void DebugContinued(char *, char *, ...);
+void Debug(char *, char *, ...);
+void Info(char *, ...);
+void Warn(char *, ...);
+void Error(char *, ...);
+void Fail(char *, ...);
+void FailWithHelp(char *, ...);
+
char *int2str(int, int);
char *i_to_a(unsigned int);
int log_2(unsigned int);
void (*print_usage_function)(void),
void (*print_version_function)(void));
-void SetError(char *, ...);
-char *GetError(void);
-void Error(int, char *, ...);
-
void *checked_malloc(unsigned int);
void *checked_calloc(unsigned int);
void *checked_realloc(void *, unsigned int);
char *get_mapped_token(char *);
-int get_parameter_value(char *, char *, int);
-
struct FileInfo *getFileListFromConfigList(struct ConfigInfo *,
struct ConfigTypeInfo *,
char **, int);
void FreeCustomArtworkLists(struct ArtworkListInfo *);
char *getLogFilename(char *);
-void OpenLogFiles();
-void CloseLogFiles();
+void OpenLogFiles(void);
+void CloseLogFiles(void);
void DumpLogFile(int);
-void NotifyUserAboutErrorFile();
+void NotifyUserAboutErrorFile(void);
#if DEBUG
void debug_print_timestamp(int, char *);
void print_timestamp_done(char *);
-#endif /* MISC_H */
+#endif // MISC_H