/[mailutils]/mailutils/libsieve/load.c
ViewVC logotype

Diff of /mailutils/libsieve/load.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by gobry, Wed Nov 27 08:44:13 2002 UTC revision 1.4 by gray, Tue Dec 10 07:30:38 2002 UTC
# Line 23  Line 23 
23  #include <stdio.h>  #include <stdio.h>
24  #include <stdlib.h>  #include <stdlib.h>
25  #include <unistd.h>    #include <unistd.h>  
26  #include <string.h>    #include <string.h>
27  #include <sieve.h>  #include <sieve.h>
28  #include <ltdl.h>  #include <ltdl.h>
29    
# Line 96  sieve_load_ext (sieve_machine_t mach, co Line 96  sieve_load_ext (sieve_machine_t mach, co
96    return handle == NULL;    return handle == NULL;
97  }  }
98    
99    static int
100    _load_dir (void *item, void *unused)
101    {
102      return lt_dladdsearchdir (item);
103    }
104    
105    int
106    sieve_load_add_path (list_t path)
107    {
108      if (lt_dlinit ())
109        return 1;
110      return list_do (path, _load_dir, NULL);
111    }
112    
113    int
114    sieve_load_add_dir (sieve_machine_t mach, const char *name)
115    {
116      if (lt_dlinit ())
117        return 1;
118      sieve_machine_add_destructor (mach, (sieve_destructor_t) lt_dlexit, NULL);
119      return lt_dladdsearchdir (name);
120    }
121    
122  #else  #else
123  #include <sieve.h>  #include <sieve.h>
124    
# Line 104  sieve_load_ext (sieve_machine_t mach, co Line 127  sieve_load_ext (sieve_machine_t mach, co
127  {  {
128    return 1;    return 1;
129  }  }
130    
131    int
132    sieve_load_add_path (list_t path)
133    {
134      return 1;
135    }
136    
137    int
138    sieve_load_add_dir (sieve_machine_t mach, const char *name)
139    {
140      return 1;
141    }
142    
143  #endif /* HAVE_LIBLTDL */  #endif /* HAVE_LIBLTDL */

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26