X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fmisc.h;h=9793cb733f54b697dc884747d15074e6cfccca5e;hp=99c867a0a7f83b14da7384daf491ebc206bf33fc;hb=3ae3dff29ac1a6022b1e5af414ba2c99391148c8;hpb=823bddb0d9cc63ddda17a2cd20266aa3b82bde38 diff --git a/src/misc.h b/src/misc.h index 99c867a0..9793cb73 100644 --- a/src/misc.h +++ b/src/misc.h @@ -21,17 +21,51 @@ #define NEW_RANDOMIZE -1 +#define ERR_RETURN 0 +#define ERR_WARN (1 << 0) +#define ERR_EXIT (1 << 1) +#define ERR_HELP (1 << 2) +#define ERR_SOUND_SERVER (1 << 3) +#define ERR_NETWORK_SERVER (1 << 4) +#define ERR_NETWORK_CLIENT (1 << 5) +#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) + void InitCounter(void); unsigned long Counter(void); void Delay(unsigned long); -BOOL FrameReached(unsigned long *, unsigned long); -BOOL DelayReached(unsigned long *, unsigned long); +boolean FrameReached(unsigned long *, unsigned long); +boolean DelayReached(unsigned long *, unsigned long); void WaitUntilDelayReached(unsigned long *, unsigned long); char *int2str(int, int); unsigned int SimpleRND(unsigned int); unsigned int RND(unsigned int); unsigned int InitRND(long); -char *GetLoginName(void); +char *getLoginName(void); +char *getRealName(void); +char *getHomeDir(void); +char *getPath2(char *, char *); +char *getPath3(char *, char *, char*); +char *getStringCopy(char *); +char *getStringToLower(char *); void MarkTileDirty(int, int); +void SetBorderElement(); +void GetOptions(char **); +void Error(int, char *, ...); +void *checked_malloc(unsigned long); +void *checked_calloc(unsigned long); +char *getKeyNameFromKeySym(KeySym); +char *getX11KeyNameFromKeySym(KeySym); +KeySym getKeySymFromX11KeyName(char *); +char getCharFromKeySym(KeySym); +char *getJoyNameFromJoySymbol(int); +int getJoySymbolFromJoyName(char *); +int getJoystickNrFromDeviceName(char *); + +void debug_print_timestamp(int, char *); +void print_debug(char *); -#endif +#endif /* MISC_H */