From 94482626ff3d4047102ef69a28062ea020972ceb Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Sat, 21 Aug 2010 21:51:00 +0200
Subject: [PATCH] Renamed sieved tool to sieve-dump.

---
 .hgignore                                  |  2 +-
 NEWS                                       |  2 ++
 README                                     |  2 +-
 doc/man/Makefile.am                        |  2 +-
 doc/man/{sieved.1 => sieve-dump.1}         | 12 ++++++------
 doc/man/sieve-filter.1                     |  2 +-
 doc/man/sieve-test.1                       |  8 ++++----
 doc/man/sievec.1                           |  6 +++---
 src/sieve-tools/Makefile.am                | 12 ++++++------
 src/sieve-tools/{sieved.c => sieve-dump.c} |  6 +++---
 10 files changed, 28 insertions(+), 26 deletions(-)
 rename doc/man/{sieved.1 => sieve-dump.1} (86%)
 rename src/sieve-tools/{sieved.c => sieve-dump.c} (90%)

diff --git a/.hgignore b/.hgignore
index 681d58ac8..a091e78e4 100644
--- a/.hgignore
+++ b/.hgignore
@@ -56,7 +56,7 @@ m4/lt~obsolete.m4
 **/.deps
 
 src/sieve-tools/sievec
-src/sieve-tools/sieved
+src/sieve-tools/sieve-dump
 src/sieve-tools/sieve-test
 src/sieve-tools/sieve-filter
 
diff --git a/NEWS b/NEWS
index 2ba7d29bd..4ee2dcc44 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,8 @@ v0.2.0 [TO BE RELEASED] Stephan Bosch <stephan@rename-it.nl>
 	  most notable example is that when the LDA Sieve plugin is trying to store a
 	  binary for a global script, the resulting failure message also points the
 	  administrator towards pre-compiling the script with sievec.
+	* Renamed the sieved tool to sieve-dump. The original name was somewhat
+	  confusing.
 	- Multiscript: fixed duplicate implicit keep caused by erroneous execution
 	  state update.
 	- Prevented assertion failure due to currupt binary string representation. 
diff --git a/README b/README
index 399af5779..dd188b190 100644
--- a/README
+++ b/README
@@ -173,7 +173,7 @@ sieve-test - This is a universal Sieve test tool for testing the effect of a
              can be used to test the actual delivery of the message and show the
              messages that would normally be sent through SMTP.
 
-sieved     - Dumps the content of a Sieve binary file for (development) 
+sieve-dump - Dumps the content of a Sieve binary file for (development) 
              debugging purposes.
 
 When installed, man pages are also available for these commands. In this package
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 156e434e4..eeae3d099 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -11,7 +11,7 @@ EXTRA_DIST = \
 
 dist_man_MANS = \
 	sievec.1 \
-	sieved.1 \
+	sieve-dump.1 \
 	sieve-test.1 \
 	$(unfinished_mans)
 
diff --git a/doc/man/sieved.1 b/doc/man/sieve-dump.1
similarity index 86%
rename from doc/man/sieved.1
rename to doc/man/sieve-dump.1
index 724eea85d..30bde1647 100644
--- a/doc/man/sieved.1
+++ b/doc/man/sieve-dump.1
@@ -1,19 +1,19 @@
-.TH "SIEVED" "1" "11 July 2010"
+.TH "SIEVE-DUMP" "1" "11 July 2010"
 .SH NAME
-sieved \- Sieve script binary dump tool for the Dovecot secure IMAP server
+sieve\-dump \- Sieve script binary dump tool for the Dovecot secure IMAP server
 .SH SYNOPSIS
-sieved [\fB\-c\fR \fIconfig\-file\fR] [\fB\-x\fR "\fIextension extension ...\fR"] \fIsieve\-binary\fR [\fIout\-file\fR]
+sieve\-dump [\fB\-c\fR \fIconfig\-file\fR] [\fB\-x\fR "\fIextension extension ...\fR"] \fIsieve\-binary\fR [\fIout\-file\fR]
 .br
 .SH DESCRIPTION
 .PP
-The \fBsieved\fP command is part of the Pigeonhole Sieve implementation for the Dovecot secure 
+The \fBsieve\-dump\fP command is part of the Pigeonhole Sieve implementation for the Dovecot secure 
 IMAP server. Sieve (RFC 5228) is a simple and highly extensible language for filtering 
 e\-mail messages. It can be implemented for any type of mail access protocol, mail 
 architecture and operating system. The language cannot execute external programs and in 
 its basic form it does not provide the means to cause infinite loops, making it suitable 
 for running securely on mail servers where mail users have no permission run arbitrary programs.
 .PP
-Using the \fBsieved\fP command, Sieve binaries, which are produced for instance by
+Using the \fBsieve\-dump\fP command, Sieve binaries, which are produced for instance by
 \fBsievec\fP(1), can be transformed into a human\-readable textual representation. This can 
 provide valuable insight in how the Sieve script is executed. This is also particularly useful 
 to view corrupt binaries that can result from bugs in the Sieve implementation. This tool is 
@@ -30,7 +30,7 @@ arbitrary data. For the base language implementation two blocks are used: the fi
 a specification of all required language extensions and the second containing the main Sieve
 program. Compiled Sieve programs are represented as flat byte code and therefore the dump of
 the main program is a disassembly listing of the interpreter operations. Extensions can define 
-new operations and use additional blocks. Therefore, the output of \fBsieved\fP depends greatly
+new operations and use additional blocks. Therefore, the output of \fBsieve\-dump\fP depends greatly
 on the language extensions used when compiling the binary. 
 .SH OPTIONS
 .TP
diff --git a/doc/man/sieve-filter.1 b/doc/man/sieve-filter.1
index 2cac97c46..5733eb9bf 100644
--- a/doc/man/sieve-filter.1
+++ b/doc/man/sieve-filter.1
@@ -149,7 +149,7 @@ Dovecot was written by Timo Sirainen <tss@iki.fi>.
 
 .SH "SEE ALSO"
 .BR sievec (1),
-.BR sieved (1),
+.BR sieve\-dump (1),
 .BR sieve\-test (1)
 .PP
 Dovecot website: http://www.dovecot.org
diff --git a/doc/man/sieve-test.1 b/doc/man/sieve-test.1
index c2dc20987..031fe1213 100644
--- a/doc/man/sieve-test.1
+++ b/doc/man/sieve-test.1
@@ -60,7 +60,7 @@ Enable Sieve debugging.
 .TP
 \fB\-d\fP \fIdump\-file\fP
 Causes a dump of the generated code to be written to the specified file. This is identical to the
-dump produced by \fBsieved\fR(1). Using '\-' as filename causes the dump to be written to \fBstdout\fP.
+dump produced by \fBsieve\-dump\fR(1). Using '\-' as filename causes the dump to be written to \fBstdout\fP.
 .TP
 \fB\-e\fP
 Turns on true execution of the set of actions that results from running the script. In combination
@@ -144,7 +144,7 @@ Print debug messages as well. This is usually only useful for developers and pro
 \fB\-Taddresses\fP
 Print byte code addresses for the current trace output. Normally, only the current Sieve source code 
 position is printed. The byte code addresses are equal to those listed in a binary dump produced
-using the \fB\-d\fP option or by the \fBsieved(1)\fP command.
+using the \fB\-d\fP option or by the \fBsieve\-dump(1)\fP command.
 
 .SH DEBUG SIEVE EXTENSION
 .PP
@@ -162,7 +162,7 @@ if header :contains "subject" "hello" {
 .PP
 }
 .PP
-Other tools like \fBsievec\fP and \fBsieved\fP also recognize the vnd.dovecot.debug extension. In contrast,
+Other tools like \fBsievec\fP and \fBsieve\-dump\fP also recognize the vnd.dovecot.debug extension. In contrast,
 the actual Sieve plugin for the Dovecot LDA does not allow the use of the debug extension. So, keep in mind that 
 scripts and compiled binaries that refer to de debug extension will fail to be run by the Sieve plugin itself.
 .PP
@@ -175,7 +175,7 @@ Pigeonhole for Dovecot was written by Stephan Bosch <stephan@rename\-it.nl>.
 Dovecot was written by Timo Sirainen <tss@iki.fi>.
 .SH "SEE ALSO"
 .BR sievec (1),
-.BR sieved (1)
+.BR sieve\-dump (1)
 .PP
 Dovecot website: http://www.dovecot.org
 .PP
diff --git a/doc/man/sievec.1 b/doc/man/sievec.1
index bce1dc245..dffd0f640 100644
--- a/doc/man/sievec.1
+++ b/doc/man/sievec.1
@@ -38,7 +38,7 @@ is a directory.
 .PP
 The \fBsievec\fP command is also useful to verify Sieve scripts before using. Additionally, with 
 the \fB\-d\fP option it can output a textual (and thus human\-readable) dump of the generated Sieve
-code to the specified file. The output is then identical to what the \fBsieved\fP(1) command produces
+code to the specified file. The output is then identical to what the \fBsieve\-dump\fP(1) command produces
 for a stored binary file. This output is mainly useful to find bugs in the compiler that yield corrupt 
 binaries.
 .SH OPTIONS
@@ -50,7 +50,7 @@ Alternative Dovecot configuration file path.
 Don't write the binary to \fIout\-file\fP, but write a textual dump of the binary in 
 stead. In this context, the \fIout\-file\fP value '\-' has special meaning: it causes the the textual 
 dump to be written to \fBstdout\fP. The \fIout\-file\fP argument may also be omitted, which has 
-the same effect as '\-'. The output is identical to what the \fBsieved\fP(1) command produces for 
+the same effect as '\-'. The output is identical to what the \fBsieve\-dump\fP(1) command produces for 
 a compiled Sieve binary file. Note that this option is not allowed when the \fIout\-file\fP argument
 is a directory.
 .TP
@@ -70,7 +70,7 @@ Pigeonhole for Dovecot was written by Stephan Bosch <stephan@rename\-it.nl>.
 .PP
 Dovecot was written by Timo Sirainen <tss@iki.fi>.
 .SH "SEE ALSO"
-.BR sieved (1),
+.BR sieve\-dump (1),
 .BR sieve\-test (1)
 .PP
 Dovecot website: http://www.dovecot.org
diff --git a/src/sieve-tools/Makefile.am b/src/sieve-tools/Makefile.am
index 7f409bd22..48e8d687a 100644
--- a/src/sieve-tools/Makefile.am
+++ b/src/sieve-tools/Makefile.am
@@ -1,6 +1,6 @@
 SUBDIRS = debug
 
-bin_PROGRAMS = sievec sieved sieve-test
+bin_PROGRAMS = sievec sieve-dump sieve-test
 
 if BUILD_UNFINISHED
 bin_PROGRAMS += sieve-filter
@@ -32,12 +32,12 @@ sievec_SOURCES = \
 
 # Sieve Dump Tool
 
-sieved_LDFLAGS = -export-dynamic
-sieved_LDADD = $(libs_ldadd)
-sieved_DEPENDENCIES = $(libs_deps)
+sieve_dump_LDFLAGS = -export-dynamic
+sieve_dump_LDADD = $(libs_ldadd)
+sieve_dump_DEPENDENCIES = $(libs_deps)
 
-sieved_SOURCES = \
-	sieved.c 
+sieve_dump_SOURCES = \
+	sieve-dump.c 
 
 # Sieve Test Tool
 
diff --git a/src/sieve-tools/sieved.c b/src/sieve-tools/sieve-dump.c
similarity index 90%
rename from src/sieve-tools/sieved.c
rename to src/sieve-tools/sieve-dump.c
index 495faaf64..1e9d8a004 100644
--- a/src/sieve-tools/sieved.c
+++ b/src/sieve-tools/sieve-dump.c
@@ -30,8 +30,8 @@
 static void print_help(void)
 {
 	printf(
-"Usage: sieved [-P <plugin>] [-x <extensions>]\n"
-"              <sieve-binary> [<out-file>]\n"
+"Usage: sieve-dump [-P <plugin>] [-x <extensions>]\n"
+"                  <sieve-binary> [<out-file>]\n"
 	);
 }
 
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
 	int exit_status = EXIT_SUCCESS;
 	int c;
 
-	sieve_tool = sieve_tool_init("sieved", &argc, &argv, "P:x:", FALSE);
+	sieve_tool = sieve_tool_init("sieve-dump", &argc, &argv, "P:x:", FALSE);
 		
 	binfile = outfile = NULL;
 
-- 
GitLab