- Timestamp:
- 02/11/09 21:52:23 (4 years ago)
- Location:
- lang/c/AutoUpdater
- Files:
-
- 2 modified
-
AutoUpdater.c (modified) (1 diff)
-
AutoUpdater.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/c/AutoUpdater/AutoUpdater.c
r25995 r29922 9 9 #include <time.h> 10 10 11 #ifndef AU_WINDOWS 12 #define TCHAR char 13 #define _tcsdup strdup 14 #define _T(text) text 11 #if !defined(AU_WINDOWS) 12 13 #ifndef _TCHAR_DEFINED 14 typedef TCHAR char; 15 #define _tcsdup strdup 16 #endif 17 18 #ifndef _T 19 #define _T(x) x 20 #endif 21 22 #elif defined(__CYGWIN__) 23 24 #ifndef _TCHAR_DEFINED 25 #if defined(UNICODE) || defined(_UNICODE) 26 typedef TCHAR WCHAR; 27 #else 28 typedef TCHAR CHAR; 29 #endif 30 #endif 31 32 #if defined(UNICODE) || defined(_UNICODE) 33 #include <wchar.h> 34 static wchar_t *wcsdup(const wchar_t *s) { 35 size_t len; 36 len = wcslen(s) + 1; 37 wchar_t* buf = malloc(len * sizeof(wchar_t)); 38 memcpy(buf, s, len * sizeof(wchar_t)); 39 return buf; 40 } 41 #define _tcsdup wcsdup 42 #else 43 #define _tcsdup strdup 44 #endif 45 46 #ifndef _T 47 #define _T(text) TEXT(text) 48 #endif 15 49 #else 16 #ifdef __CYGWIN__ 17 #define _T(text) TEXT(text) 18 #if defined(UNICODE) || defined(_UNICODE) 19 #include <wchar.h> 20 static wchar_t *wcsdup(const wchar_t *s) { 21 size_t len; 22 len = wcslen(s) + 1; 23 wchar_t* buf = malloc(len * sizeof(wchar_t)); 24 memcpy(buf, s, len * sizeof(wchar_t)); 25 return buf; 26 } 27 #define _tcsdup wcsdup 28 #else 29 #define _tcsdup strdup 30 #endif 31 #else 32 #include <tchar.h> 33 #ifdef _MSC_VER 34 #pragma comment(lib, "wininet.lib") 35 #endif 36 static unsigned int sleep(unsigned int seconds) { 37 Sleep(1000 * seconds); 38 return 0; 39 } 50 51 #include <tchar.h> 52 #ifdef _MSC_VER 53 #pragma comment(lib, "wininet.lib") 40 54 #endif 55 static unsigned int sleep(unsigned int seconds) { 56 Sleep(1000 * seconds); 57 return 0; 58 } 59 41 60 #endif 42 61 -
lang/c/AutoUpdater/AutoUpdater.h
r25995 r29922 59 59 typedef struct { 60 60 char created_sign; 61 constAU_Option option;61 AU_Option option; 62 62 63 63 AU_CHAR_* description;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)