00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FUNCTIONS_H
00023 #define FUNCTIONS_H
00024
00025 #ifndef DOXYGEN
00026 #include "SDL/SDL.h"
00027 #include "SDL/SDL_net.h"
00028 #include <string>
00029 #endif
00030
00059 DECLSPEC const char *intToStr( int i, int base = 10 );
00060
00070 DECLSPEC char *intToStr( int i, char *buf, int base = 10 );
00075 DECLSPEC char *uintToStr( unsigned int i, char *buf, unsigned int base = 10 );
00076
00093 DECLSPEC Uint32 xStrToUL( const char *str, bool *err = NULL );
00094
00102 DECLSPEC SDL_Rect strToRect( const char *str );
00103
00109 DECLSPEC bool strToBool( const char *s );
00110
00117 DECLSPEC Uint32 strToIP( const char *str );
00118
00125 DECLSPEC IPaddress strToIPaddress( const char *str );
00126
00132 DECLSPEC SDLKey strToKey( const char *str );
00133
00139 DECLSPEC SDLMod strToMod( const char *str );
00140
00147 DECLSPEC int byteToStr( Uint8 b, char *buf );
00148
00156 DECLSPEC const char * IPToStr( Uint32 ip, char *buf );
00164 DECLSPEC const char * IPToStr( const IPaddress &ip, char *buf );
00165
00172 DECLSPEC SDL_Color ULToColor( Uint32 v );
00173
00177 DECLSPEC const char * getUserDirectory();
00178
00185 DECLSPEC std::string makeEnvStr(const char *str);
00186
00195 DECLSPEC std::string makeEnvPath(const char *str);
00196
00204 DECLSPEC bool patMatch (const char* pattern, const char* string);
00212 DECLSPEC bool patiMatch (const char* pattern, const char* string);
00213
00214 #ifndef __windows__
00215
00225 char *getLocalIP( bool bIPv4 = true );
00226 #endif
00227
00228 #endif