summaryrefslogtreecommitdiff
path: root/tools/MakeDef/h_util.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-03-21 19:15:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-03-21 19:15:39 +0000
commitaebb257da0067c98c292bc62ad73200cc3a9dba7 (patch)
treebf3d47189a35bfc6c78ac4e6b7baf48a455650b8 /tools/MakeDef/h_util.h
parent2e286299cea4063e71845616138e92299af42744 (diff)
DEF-file automatic creator
git-svn-id: http://svn.miranda-ng.org/main/trunk@12473 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/MakeDef/h_util.h')
-rw-r--r--tools/MakeDef/h_util.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/MakeDef/h_util.h b/tools/MakeDef/h_util.h
new file mode 100644
index 0000000000..8f3862000c
--- /dev/null
+++ b/tools/MakeDef/h_util.h
@@ -0,0 +1,50 @@
+#if !defined( __UTIL_H )
+ #define __UTIL_H
+
+ #if !defined( __STDARG_H )
+ #include <stdarg.h>
+ #define __STDARG_H
+ #endif
+
+ #if !defined( __TTYPES_H )
+ #include "h_types.h"
+ #endif
+
+//-------------------------- Useful functions ----------------------------
+
+char* copyString( char* dest, char* src, size_t size );
+
+char* centerStr( char *dest, const char *src, size_t len );
+char* rightJust( char *string, size_t size );
+char* leftJust ( char *string, size_t size );
+
+char* strToUpper( char* );
+char* strToLower( char* );
+
+uchar charToUpper( uchar );
+uchar charToLower( uchar );
+
+char* ltrim(char*);
+char* rtrim(char*);
+char* strdel(char*, size_t);
+char* trim(char*);
+char* newStr(const char*);
+void placeString(char* pDest, char* pSrc, size_t pLen);
+
+bool fileExists(char* fileName);
+
+char* replaceExt(const char* fileName, char* ext, char* buffer);
+int shareFile(const char* fileName, bool ifRead, bool ifWrite);
+
+//----------------- Функции для работы с расширенными строками ----------------
+
+int cstrlen(const char *);
+size_t getStrNumber(char* sText);
+size_t getStrLength(char* sText);
+char* xstrncpy(char* dest, const char* src, size_t iLen);
+
+long CRC32(uchar*, size_t);
+
+#define FIELD_DELTA( CLS, FLD ) (( int )( (( char* )( &(( CLS* )1 )->FLD )) - (( char* )( CLS* )1 )))
+
+#endif // __UTIL_H