Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 patch 766 git-svn-id: svn://10.65.10.50/trunk@14628 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| #ifndef __UTILITY_H
 | |
| #define __UTILITY_H
 | |
| 
 | |
| #ifndef __STRINGS_H
 | |
| #include <strings.h>
 | |
| #endif
 | |
| 
 | |
| #ifndef __INCSTR_H
 | |
| #include <../xvaga/incstr.h>
 | |
| #endif
 | |
| 
 | |
| class TPerformance_profiler : public TObject
 | |
| {
 | |
|   TString _desc;
 | |
|   long _start;
 | |
|   bool _trc;
 | |
| 
 | |
| public:
 | |
|   void show() const;
 | |
|   
 | |
|   TPerformance_profiler(const char* desc = "", bool trc = false);
 | |
|   ~TPerformance_profiler();
 | |
| };
 | |
| 
 | |
| char* format (const char* fmt, ...);
 | |
| const char* cmd2name(const char* argv0, const char* argv1 = "");
 | |
| int rtoi(const char * roman);
 | |
| const char* itor(int i);
 | |
| bool fcopy(const char* orig, const char* dest, bool append=FALSE);
 | |
| bool fexist(const char* file);
 | |
| long fsize(const char* file);
 | |
| 
 | |
| bool make_dir(const char* dir);
 | |
| bool remove_file(const char* file);
 | |
| int list_files(const char* mask, TString_array& result);
 | |
| bool input_filename(TFilename& file);
 | |
| 
 | |
| const char* encode(const char* data);
 | |
| const char* decode(const char* data);
 | |
| 
 | |
| inline bool is_slash(char s)  // @parm Carattere da confrontare
 | |
| { return s == '\\' || s == '/'; }
 | |
| 
 | |
| inline bool is_not_slash(char s)  // @parm Carattere da confrontare
 | |
| { return s != '\\' && s != '/'; }
 | |
| 
 | |
| const char* esc(const char* str);   // Trasforma le sequenze "\n" nel carattere '\n'
 | |
| const char* unesc(const char* str); // Trasforma i caratteri '\n' nella sequenza "\n"
 | |
| 
 | |
| istream& eatwhite (istream& i);
 | |
| 
 | |
| const TString & get_hostname();
 | |
| bool is_power_station();
 | |
| 
 | |
| long daytime();
 | |
| 
 | |
| #define ODD(x)   (x & 1)
 | |
| #define EVEN(x) !(x & 1) 
 | |
| 
 | |
| #endif /* __UTILITY_H */ |