ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src prefs.c,1.31.2.3,1.31.2.4


From: Andy Maloney <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src prefs.c,1.31.2.3,1.31.2.4
Date: Wed, 26 Mar 2003 13:47:34 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv6906/src

Modified Files:
      Tag: new_prefs
        prefs.c 
Log Message:
Add some MINGW32 stuff

Index: prefs.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/prefs.c,v
retrieving revision 1.31.2.3
retrieving revision 1.31.2.4
diff -u -r1.31.2.3 -r1.31.2.4
--- prefs.c     24 Mar 2003 09:00:18 -0000      1.31.2.3
+++ prefs.c     26 Mar 2003 18:47:31 -0000      1.31.2.4
@@ -35,6 +35,10 @@
 #include "libproxy/libproxy.h"
 #include "prefs_window.h"
 
+#ifdef __MINGW32__
+#define        snprintf        _snprintf
+#endif
+
 
 enum {
        CORE_PREF,
@@ -152,8 +156,18 @@
        cSetLocalPref( "accel_next_tab", "<Control>Right" );
 
        /* modules */
+#ifdef __MINGW32__
+       {
+               const int       buff_size = 1024;
+               char            buff[buff_size];
+               
+               snprintf( buff, buff_size, "%s%s", config_dir, MODULE_DIR );
+               cSetLocalPref( "modules_path", buff );
+       }
+#else
        cSetLocalPref( "modules_path", MODULE_DIR );
-       
+#endif
+
        /* sound */
        iSetLocalPref( "do_no_sound_when_away", 0 );
        iSetLocalPref( "do_no_sound_for_ignore", 1 );
@@ -162,12 +176,37 @@
        iSetLocalPref( "do_play_first", 1 );
        iSetLocalPref( "do_play_receive", 1 );
        
+#ifdef __MINGW32__
+       {
+               const int       buff_size = 1024;
+               char            buff[buff_size];
+               
+               snprintf( buff, buff_size, "%s%s", config_dir, 
BuddyArriveDefault );
+               cSetLocalPref( "BuddyArriveFilename", buff );
+               
+               snprintf( buff, buff_size, "%s%s", config_dir, 
BuddyLeaveDefault );
+               cSetLocalPref( "BuddyAwayFilename", buff );
+               
+               snprintf( buff, buff_size, "%s%s", config_dir, 
BuddyLeaveDefault );
+               cSetLocalPref( "BuddyLeaveFilename", buff );
+               
+               snprintf( buff, buff_size, "%s%s", config_dir, SendDefault );
+               cSetLocalPref( "SendFilename", buff );
+               
+               snprintf( buff, buff_size, "%s%s", config_dir, ReceiveDefault );
+               cSetLocalPref( "ReceiveFilename", buff );
+               
+               snprintf( buff, buff_size, "%s%s", config_dir, ReceiveDefault );
+               cSetLocalPref( "FirstMsgFilename", buff );
+       }
+#else
        cSetLocalPref( "BuddyArriveFilename", BuddyArriveDefault );
        cSetLocalPref( "BuddyAwayFilename", BuddyLeaveDefault );
        cSetLocalPref( "BuddyLeaveFilename", BuddyLeaveDefault );
        cSetLocalPref( "SendFilename", SendDefault );
        cSetLocalPref( "ReceiveFilename", ReceiveDefault );
        cSetLocalPref( "FirstMsgFilename", ReceiveDefault );
+#endif
 
        fSetLocalPref( "SoundVolume", 0.0 );
 
@@ -427,6 +466,10 @@
        fprintf( fp, "end\n" );
        
        fclose( fp );
+
+#ifdef __MINGW32__
+       unlink( file );
+#endif
 
        rename( buff, file );
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]