[dovecot-cvs] dovecot-lda/src/libsieve Makefile.am, 1.8, 1.9 sievec.c, 1.1.1.1, 1.2

cras at dovecot.org cras at dovecot.org
Fri May 12 21:41:29 EEST 2006


Update of /var/lib/cvs/dovecot-lda/src/libsieve
In directory talvi:/tmp/cvs-serv22586/libsieve

Modified Files:
	Makefile.am sievec.c 
Log Message:
Compile sievec binary.



Index: Makefile.am
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/libsieve/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.am	17 Oct 2005 13:59:10 -0000	1.8
+++ Makefile.am	12 May 2006 18:41:26 -0000	1.9
@@ -1,3 +1,7 @@
+pkglibexecdir = $(libexecdir)/dovecot
+
+pkglibexec_PROGRAMS = sievec
+
 noinst_LIBRARIES = libsieve.a
 
 AM_YFLAGS = -d -p $*
@@ -13,6 +17,15 @@
 sieve-lex.c: sieve-lex.l
 	$(LEX) -t sieve-lex.l > sieve-lex.c
 
+sievec_SOURCES = \
+	sievec.c \
+	../map.c \
+	../imparse.c
+
+sievec_LDADD = \
+	libsieve.a \
+	$(dovecotdir)/src/lib/liblib.a
+
 libsieve_a_SOURCES = \
 	addr.y \
 	sieve.y \

Index: sievec.c
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/libsieve/sievec.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- sievec.c	29 Mar 2005 18:37:59 -0000	1.1.1.1
+++ sievec.c	12 May 2006 18:41:26 -0000	1.2
@@ -63,8 +63,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-/* config.c stuff */
-const int config_need_data = 0;
+struct et_list *_et_list = NULL;
 
 int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret);
 
@@ -78,20 +77,16 @@
     sieve_script_t *s;
     bytecode_info_t *bc;
     int c, fd, usage_error = 0;
-    char *alt_config = NULL;
 
     while ((c = getopt(argc, argv, "C:")) != EOF)
 	switch (c) {
-	case 'C': /* alt config file */
-	    alt_config = optarg;
-	    break;
 	default:
 	    usage_error = 1;
 	    break;
 	}
 
     if (usage_error || (argc - optind) < 2) {
-	printf("Syntax: %s [-C <altconfig>] <filename> <outputfile>\n",
+	printf("Syntax: %s <filename> <outputfile>\n",
 	       argv[0]);
 	exit(1);
     }
@@ -102,9 +97,6 @@
 	exit(1);
     }
     
-    /* Load configuration file. */
-    config_read(alt_config);
-
     if(is_script_parsable(instream, &err, &s) == TIMSIEVE_FAIL) {
 	if(err) {
 	    printf("Unable to parse script: %s\n", err);
@@ -140,9 +132,9 @@
 }
 
 /* to make larry's stupid functions happy :) */ 
-void foo(void)
+static void foo(void)
 {
-    fatal("stub function called", 0);
+    i_fatal("stub function called");
 }
 sieve_vacation_t vacation = {
     0,				/* min response */
@@ -157,12 +149,12 @@
 			void *message_context __attribute__((unused)),
 			const char **errmsg __attribute__((unused)))
 {
-    fatal("stub function called", 0);
+    i_fatal("stub function called");
     return SIEVE_FAIL;
 }
 
-int mysieve_error(int lineno, const char *msg,
-		  void *i __attribute__((unused)), void *s)
+static int mysieve_error(int lineno, const char *msg,
+			 void *i __attribute__((unused)), void *s)
 {
     char buf[1024];
     char **errstr = (char **) s;
@@ -175,12 +167,6 @@
     return SIEVE_OK;
 }
 
-void fatal(const char *s, int code)
-{  
-    printf("Fatal error: %s (%d)\r\n", s, code);
-                           
-    exit(1);
-}
 /* end the boilerplate */
 
 /* returns TRUE or FALSE */



More information about the dovecot-cvs mailing list