diff options
author | berkeviktor@aol.com <berkeviktor@aol.com> | 2010-08-30 12:20:50 +0200 |
---|---|---|
committer | berkeviktor@aol.com <berkeviktor@aol.com> | 2010-08-30 12:20:50 +0200 |
commit | cc6e18411c7b9082f7cff525f5b3a78d8333874a (patch) | |
tree | 93a026a79886330f8c61963661c596fa2ec42571 /src/fe-gtk/check-version.c | |
parent | 9138d7e28124bdd52e1d324c9b68dbab6cfcd163 (diff) |
update checker reworked
Diffstat (limited to 'src/fe-gtk/check-version.c')
-rw-r--r-- | src/fe-gtk/check-version.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/fe-gtk/check-version.c b/src/fe-gtk/check-version.c deleted file mode 100644 index 675ef3fb..00000000 --- a/src/fe-gtk/check-version.c +++ /dev/null @@ -1,36 +0,0 @@ -#include <windows.h> -#include <wininet.h> - -char* check_version () -{ - HINTERNET hINet, hFile; - hINet = InternetOpen("XChat-WDK Update Checker", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 ); - - if (!hINet) - { - return "unavailable"; - } - - hFile = InternetOpenUrl (hINet, "http://xchat-wdk.googlecode.com/hg/version.txt", NULL, 0, 0, 0); - - if (hFile) - { - static char buffer[1024]; - DWORD dwRead; - while (InternetReadFile(hFile, buffer, 1023, &dwRead)) - { - if (dwRead == 0) - { - break; - } - buffer[dwRead] = 0; - } - - return buffer; - InternetCloseHandle (hFile); - } - - InternetCloseHandle (hINet); - - return "unavailable"; -} |