1994-08-19 07:10:19 +00:00
|
|
|
#ifndef __UTILITY_H
|
|
|
|
#define __UTILITY_H
|
|
|
|
|
1998-02-24 10:37:28 +00:00
|
|
|
#ifndef __STDTYPES_H
|
|
|
|
#include <stdtypes.h>
|
1994-08-19 07:10:19 +00:00
|
|
|
#endif
|
|
|
|
|
1998-02-24 10:37:28 +00:00
|
|
|
class TString_array;
|
1998-05-04 08:17:15 +00:00
|
|
|
class TFilename;
|
1998-02-24 10:37:28 +00:00
|
|
|
|
1994-08-19 07:10:19 +00:00
|
|
|
char* format (const char* fmt, ...);
|
|
|
|
const char* cmd2name(const char* argv0, const char* argv1 = "");
|
|
|
|
int rtoi(const char * roman);
|
|
|
|
const char* itor(int i);
|
1995-02-02 11:56:16 +00:00
|
|
|
bool fcopy(const char* orig, const char* dest, bool append=FALSE);
|
1994-08-19 07:10:19 +00:00
|
|
|
bool fexist(const char* file);
|
1997-10-30 16:14:49 +00:00
|
|
|
long fsize(const char* file);
|
1995-03-22 09:07:04 +00:00
|
|
|
|
|
|
|
bool make_dir(const char* file);
|
1997-10-09 13:31:51 +00:00
|
|
|
int list_files(const char* mask, TString_array& result);
|
1998-03-13 10:44:43 +00:00
|
|
|
bool input_filename(TFilename& file);
|
1998-01-28 09:24:17 +00:00
|
|
|
|
|
|
|
const char* encode(const char* data);
|
|
|
|
const char* decode(const char* data);
|
1996-02-05 19:00:53 +00:00
|
|
|
|
|
|
|
// @doc EXTERNAL
|
|
|
|
|
1995-06-27 10:18:49 +00:00
|
|
|
// @func Controlla se il carattere passato e' il simbolo di slash ('\\' oppure '/')
|
|
|
|
//
|
|
|
|
// @rdesc Ritorna i seguneti valori:
|
|
|
|
//
|
1996-01-31 17:19:02 +00:00
|
|
|
// @flag TRUE | Se il carattere <p s> non e' uno slash
|
|
|
|
// @flag FALSE | Se il carattere <p s> e' uno slash
|
1995-06-27 10:18:49 +00:00
|
|
|
inline bool is_not_slash(
|
|
|
|
char s) // @parm Carattere da confrontare
|
|
|
|
{ return s != '\\' && s != '/'; }
|
1994-08-19 07:10:19 +00:00
|
|
|
|
|
|
|
const char* esc(const char*);
|
|
|
|
|
|
|
|
#define ODD(x) (x & 1)
|
|
|
|
#define EVEN(x) !(x & 1)
|
|
|
|
|
|
|
|
#ifdef __UTILITY_CPP
|
|
|
|
char __tmp_string[1024];
|
|
|
|
#else
|
|
|
|
extern char __tmp_string[1024];
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
1995-03-16 09:14:55 +00:00
|
|
|
#endif /* __UTILITY_H */
|