Update of /cvsroot/mahogany/M/lib/dspam
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12952
Modified Files:
util.c
Log Message:
dspam_set_home() not needed any more; DSPAM_HOME doesn't exist any longer
Index: util.c
===================================================================
RCS file: /cvsroot/mahogany/M/lib/dspam/util.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -u -2 -r1.9 -r1.10
--- util.c 2 Oct 2004 13:32:46 -0000 1.9
+++ util.c 2 Oct 2004 14:51:24 -0000 1.10
@@ -334,5 +334,5 @@
#elif defined(DSPAM_HOME_NO_DATA)
snprintf (path, MAX_FILENAME_LENGTH, "%s/%s.%s",
- DSPAM_HOME, userpath, extension);
+ home, userpath, extension);
#else
if (extension == NULL)
@@ -608,58 +608,2 @@
}
-
-/*
- DSPAM_HOME
- */
-#ifdef DSPAM_HOME_DYNAMIC
-
-static char dspam_home[MAX_FILENAME_LENGTH];
-
-void dspam_set_home(const char *home)
-{
- strlcpy(dspam_home, home, sizeof(dspam_home));
-}
-
-const char *dspam_get_home(void)
-{
- /* check if we have a valid home */
- if ( !dspam_home[0] )
- {
- /*
- determine it ourselves if we don't: note that the proper way to do this
- would be by using SHGetFolderPath() but this function is not available on
- earlier Windows systems and so we'd have to load it dynamically from
- shell32.dll which is slightly painful, so let those who really want to do
- it call our dspam_set_home() themselves instead and use the easy way here
- */
- const char *home = getenv("DSPAM_HOME");
- if ( !home )
- home = getenv("HOME");
- if ( !home )
- {
-#ifdef _WIN32
- const char *homedrive = getenv("HOMEDRIVE");
- const char *homepath = getenv("HOMEPATH");
- if ( homedrive && homepath )
- {
- strlcpy(dspam_home, homedrive, sizeof(dspam_home));
- strlcat(dspam_home, homepath, sizeof(dspam_home));
- }
- else
- {
- /* what else can we do? */
- home = "C:\\dspam";
- }
-#else /* !_WIN32 */
- home = "/var/dspam";
-#endif /* _WIN32/!_WIN32 */
- }
-
- dspam_set_home(home);
- }
-
- return dspam_home;
-}
-
-#endif /* DSPAM_HOME_DYNAMIC */
-
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates