mu: use new command-parser

This commit is contained in:
Dirk-Jan C. Binnema
2020-01-19 17:32:32 +02:00
parent c7680b78b9
commit c71f683e39
7 changed files with 1291 additions and 1680 deletions

View File

@ -53,7 +53,7 @@ mu_SOURCES= \
mu-cmd-extract.c \
mu-cmd-find.c \
mu-cmd-index.c \
mu-cmd-server.c \
mu-cmd-server.cc \
mu-cmd-script.c \
mu-cmd.c \
mu-cmd.h
@ -66,7 +66,9 @@ mu-help-strings.h: mu-help-strings.txt mu-help-strings.awk
mu_LDADD= \
${top_builddir}/lib/libmu.la \
${top_builddir}/lib/utils/libmu-utils.la \
$(GLIB_LIBS) \
$(READLINE_LIBS) \
$(CODE_COVERAGE_LIBS)
EXTRA_DIST= \

File diff suppressed because it is too large Load Diff

1280
mu/mu-cmd-server.cc Normal file

File diff suppressed because it is too large Load Diff

View File

@ -173,6 +173,7 @@ MuError mu_cmd_tickle (MuStore *store, MuConfig *opts, GError **err);
* some error code otherwise
*/
MuError mu_cmd_server (MuStore *store, MuConfig *opts, GError**/*unused*/);
MuError mu_cmd_server2 (MuStore *store, MuConfig *opts, GError**/*unused*/);
/**
* execute the verify command (to verify signatures)

View File

@ -441,6 +441,8 @@ config_options_group_server (void)
GOptionEntry entries[] = {
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &MU_CONFIG.maildir,
"top of the maildir", "<maildir>"},
{"list-commands", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.list_commands,
"overwrite existing files (false)", NULL},
{NULL, 0, 0, 0, NULL, NULL, NULL}
};

View File

@ -1,7 +1,5 @@
/* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/
/*
** Copyright (C) 2008-2017 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2008-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
@ -180,6 +178,10 @@ struct _MuConfig {
gboolean overwrite; /* should we overwrite same-named files */
gboolean play; /* after saving, try to 'play'
* (open) the attmnt using xdgopen */
/* for server */
gboolean list_commands; /* dump documentations for server
* commands */
/* options for mu-script */
gchar *script; /* script to run */
const char **script_params; /* parameters for scripts */