comparison src/util.c @ 278:29e1669b006b

[gaim-migrate @ 288] check versions works (?) committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 29 May 2000 00:56:37 +0000
parents fa67d29b53d5
children b402a23f35df
comparison
equal deleted inserted replaced
277:bba300ed4fab 278:29e1669b006b
725 void check_gaim_versions() 725 void check_gaim_versions()
726 { 726 {
727 char *cur_ver; 727 char *cur_ver;
728 char *tmp; 728 char *tmp;
729 729
730 cur_ver = (char *)malloc(BUF_LONG);
731 tmp = (char *)malloc(BUF_LONG); 730 tmp = (char *)malloc(BUF_LONG);
732 731
733 cur_ver = (char *)grab_url("http://www.marko.net/gaim/latest-gaim"); 732 cur_ver = (char *)grab_url("http://www.marko.net/gaim/latest-gaim");
734 733
735 if (!strncasecmp(cur_ver, "g00", 3)) 734 if (!strncasecmp(cur_ver, "g00", 3))
736 { 735 {
737 free(cur_ver); 736 g_free(cur_ver);
738 free(tmp); 737 g_free(tmp);
739 return; 738 return;
740 } 739 }
741 740
742 g_snprintf(tmp, BUF_LONG, "%s", strstr(cur_ver, "plain")+9); 741 g_snprintf(tmp, BUF_LONG, "%s", strstr(cur_ver, "plain")+9);
743 g_strchomp(tmp); 742 g_strchomp(tmp);
744 743
745 if (strcasecmp(tmp, latest_ver)) 744 if (strcmp(tmp, latest_ver))
746 { 745 {
747 g_snprintf(cur_ver, BUF_LONG, "GAIM v%s is now available.\n\nDownload it at http://www.marko.net/gaim\n", tmp); 746 g_snprintf(cur_ver, BUF_LONG, "GAIM v%s is now available.\n\nDownload it at http://www.marko.net/gaim\n", tmp);
748 747
749 do_error_dialog(cur_ver, "GAIM - New Version!"); 748 do_error_dialog(cur_ver, "GAIM - New Version!");
750 strcpy(latest_ver, tmp); 749 strcpy(latest_ver, tmp);