comparison src/list.c @ 3717:988485669631

[gaim-migrate @ 3850] Warning fixes and WIN32 ifdef removals committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Wed, 16 Oct 2002 19:57:03 +0000
parents 9682c0e022c6
children a614423c648f
comparison
equal deleted inserted replaced
3716:d7e83b4db191 3717:988485669631
27 #include <sys/stat.h> 27 #include <sys/stat.h>
28 #ifndef _WIN32 28 #ifndef _WIN32
29 #include <unistd.h> 29 #include <unistd.h>
30 #else 30 #else
31 #include <direct.h> 31 #include <direct.h>
32 #include <io.h>
33 #endif 32 #endif
34 #include "gaim.h" 33 #include "gaim.h"
35 #include "prpl.h" 34 #include "prpl.h"
35
36 #ifdef _WIN32
37 #include "win32dep.h"
38 #endif
36 39
37 #define PATHSIZE 1024 40 #define PATHSIZE 1024
38 41
39 void remove_buddy(struct gaim_connection *gc, struct group *rem_g, struct buddy *rem_b) 42 void remove_buddy(struct gaim_connection *gc, struct group *rem_g, struct buddy *rem_b)
40 { 43 {
788 return; 791 return;
789 792
790 strcpy(buf, file); 793 strcpy(buf, file);
791 dir = fopen(buf, "r"); 794 dir = fopen(buf, "r");
792 if (!dir) 795 if (!dir)
793 #ifndef _WIN32
794 mkdir(buf, S_IRUSR | S_IWUSR | S_IXUSR); 796 mkdir(buf, S_IRUSR | S_IWUSR | S_IXUSR);
795 #else
796 _mkdir(buf);
797 #endif
798 else 797 else
799 fclose(dir); 798 fclose(dir);
800 799
801 g_screenname = get_screenname_filename(g->username); 800 g_screenname = get_screenname_filename(g->username);
802 801
804 if ((f = fopen(path, "w"))) { 803 if ((f = fopen(path, "w"))) {
805 debug_printf("writing %s\n", path); 804 debug_printf("writing %s\n", path);
806 toc_build_config(g, buf, 8192 - 1, TRUE); 805 toc_build_config(g, buf, 8192 - 1, TRUE);
807 fprintf(f, "%s\n", buf); 806 fprintf(f, "%s\n", buf);
808 fclose(f); 807 fclose(f);
809 #ifdef _WIN32
810 _chmod(buf, _S_IWRITE);
811 #else
812 chmod(path, S_IRUSR | S_IWUSR); 808 chmod(path, S_IRUSR | S_IWUSR);
813 #endif
814 } else { 809 } else {
815 debug_printf("unable to write %s\n", path); 810 debug_printf("unable to write %s\n", path);
816 } 811 }
817 812
818 g_free(g_screenname); 813 g_free(g_screenname);