summaryrefslogtreecommitdiffabout
path: root/src/main.c
authorSergey Poznyakoff <gray@gnu.org.ua>2007-05-11 14:29:37 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-05-11 14:29:37 (GMT)
commitd81952868fe4ff0c4660e6475c95747f6268eaf8 (patch) (side-by-side diff)
tree84728394cf1f3b368a6e4ced2b8bac9ebfe0fd96 /src/main.c
parent4ff8c9c350cbf95960db65d16d732d160443ce5c (diff)
downloadmailfromd-d81952868fe4ff0c4660e6475c95747f6268eaf8.tar.gz
mailfromd-d81952868fe4ff0c4660e6475c95747f6268eaf8.tar.bz2
Use new version output format. Prepare for 4.0
git-svn-id: file:///svnroot/mailfromd/trunk@1419 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'src/main.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/main.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/main.c b/src/main.c
index d5a2ff6..86d3038 100644
--- a/src/main.c
+++ b/src/main.c
@@ -40,6 +40,7 @@
#include <mailutils/argp.h>
#include "mailfromd.h"
+#include <version-etc.h>
/* Configurable options */
@@ -1299,7 +1300,6 @@ parse_opt (int key, char *arg, struct argp_state *state)
static const char *capa[] = {
"auth",
- "license",
"logging",
"mailer",
NULL
@@ -1433,24 +1433,6 @@ switch_to_privs(uid_t uid, gid_t gid)
return rc;
}
-static char *license =
- " This is mailfromd filter.\n"
- " Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff\n"
- "\n"
- " ls is free software; you can redistribute it and/or modify\n"
- " it under the terms of the GNU General Public License as published by\n"
- " the Free Software Foundation; either version 2 of the License, or\n"
- " (at your option) any later version.\n"
- "\n"
- " This program is distributed in the hope that it will be useful,\n"
- " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- " GNU General Public License for more details.\n"
- "\n"
- " You should have received a copy of the GNU General Public License along\n"
- " with this program; if not, write to the Free Software Foundation,\n"
- " Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n\n";
-
void
priv_setup()
{
@@ -1718,16 +1700,22 @@ stderr_closed_p()
return fd <= 2;
}
+static void
+version(FILE *stream, struct argp_state *state)
+{
+ mailfromd_version("mailfromd", stream, state);
+}
+
int
main(int argc, char **argv)
{
int index;
- mu_license_text = license;
MU_AUTH_REGISTER_ALL_MODULES();
mu_register_all_mailer_formats();
if (!program_invocation_short_name)
program_invocation_short_name = argv[0];
+ argp_program_version_hook = version;
/* Set default logging */
log_facility = DEFAULT_LOG_FACILITY;

Return to:

Send suggestions and report system problems to the System administrator.