campo-sirio/include/utility.h
guy b17eae20c0 Patch level : 2.0 nopatch
Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Decretata la fine della stringa temporanea globale __tmp_string!
Decretata la fine della inutile classe TMemo_field
Allungata la linea tratteggiata di salto pagina in anteprima (per risoluzioni >= 1024)


git-svn-id: svn://10.65.10.50/trunk@11054 c028cbd2-c16b-5b4b-a496-9718f37d4682
2003-04-23 09:25:32 +00:00

45 lines
1.2 KiB
C++
Executable File

#ifndef __UTILITY_H
#define __UTILITY_H
#ifndef __STDTYPES_H
#include <stdtypes.h>
#endif
class TString_array;
class TFilename;
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* 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);
// @doc EXTERNAL
// @func Controlla se il carattere passato e' il simbolo di slash ('\\' oppure '/')
//
// @rdesc Ritorna i seguneti valori:
//
// @flag TRUE | Se il carattere <p s> non e' uno slash
// @flag FALSE | Se il carattere <p s> e' uno slash
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"
#define ODD(x) (x & 1)
#define EVEN(x) !(x & 1)
#endif /* __UTILITY_H */