mirror of https://github.com/djcb/mu.git
mu: use new command-parser
This commit is contained in:
parent
c7680b78b9
commit
c71f683e39
36
Makefile.am
36
Makefile.am
|
@ -42,42 +42,6 @@ cleanupnote:
|
||||||
tags:
|
tags:
|
||||||
gtags
|
gtags
|
||||||
|
|
||||||
# this warns about function that have a cyclomatic complexity of > 10,
|
|
||||||
# which is a sign that it needs some refactoring. requires the pmccabe
|
|
||||||
# tool. If all is fine, it outputs nothing
|
|
||||||
cc10:
|
|
||||||
@$(PMCCABE) `find . -name '*.c' -o -name '*.cc'` \
|
|
||||||
| grep -v mu-str-normalize.c \
|
|
||||||
| grep -v mu_str_subject_normalize \
|
|
||||||
| grep -v tests \
|
|
||||||
| sort -nr | awk '($$1 > 10)'
|
|
||||||
|
|
||||||
# this warns about functions that are over 35 non-comment lines long, which is a
|
|
||||||
# sign that they need some refactoring. requires the pmccabe tool. if
|
|
||||||
# all is fine, it outputs nothing
|
|
||||||
# note, some functions are exempted from this rule.
|
|
||||||
line35:
|
|
||||||
@$(PMCCABE) -c `find . -name '*.c' -o -name '*.cc'` \
|
|
||||||
| grep -v mu-str-normalize.c \
|
|
||||||
| grep -v mu_str_subject_normalize \
|
|
||||||
| grep -v config_options_group_find \
|
|
||||||
| grep -v SCM_DEFINE \
|
|
||||||
| grep -v tests \
|
|
||||||
| awk '($$5 > 35)'
|
|
||||||
|
|
||||||
# get all todo/fixme messages
|
|
||||||
fixme:
|
|
||||||
@grep -i 'FIXME\|TODO' `find src -type f`
|
|
||||||
|
|
||||||
# check whether we can run make distcheck from the repo version
|
|
||||||
gitcheck:
|
|
||||||
cd `mktemp -d`; \
|
|
||||||
git clone git://github.com/djcb/mu.git ; \
|
|
||||||
cd mu; \
|
|
||||||
autoreconf -i ; \
|
|
||||||
./configure ; \
|
|
||||||
make distcheck
|
|
||||||
|
|
||||||
EXTRA_DIST= \
|
EXTRA_DIST= \
|
||||||
TODO \
|
TODO \
|
||||||
HACKING \
|
HACKING \
|
||||||
|
|
|
@ -53,7 +53,7 @@ mu_SOURCES= \
|
||||||
mu-cmd-extract.c \
|
mu-cmd-extract.c \
|
||||||
mu-cmd-find.c \
|
mu-cmd-find.c \
|
||||||
mu-cmd-index.c \
|
mu-cmd-index.c \
|
||||||
mu-cmd-server.c \
|
mu-cmd-server.cc \
|
||||||
mu-cmd-script.c \
|
mu-cmd-script.c \
|
||||||
mu-cmd.c \
|
mu-cmd.c \
|
||||||
mu-cmd.h
|
mu-cmd.h
|
||||||
|
@ -66,7 +66,9 @@ mu-help-strings.h: mu-help-strings.txt mu-help-strings.awk
|
||||||
|
|
||||||
mu_LDADD= \
|
mu_LDADD= \
|
||||||
${top_builddir}/lib/libmu.la \
|
${top_builddir}/lib/libmu.la \
|
||||||
|
${top_builddir}/lib/utils/libmu-utils.la \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
|
$(READLINE_LIBS) \
|
||||||
$(CODE_COVERAGE_LIBS)
|
$(CODE_COVERAGE_LIBS)
|
||||||
|
|
||||||
EXTRA_DIST= \
|
EXTRA_DIST= \
|
||||||
|
|
1640
mu/mu-cmd-server.c
1640
mu/mu-cmd-server.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -173,6 +173,7 @@ MuError mu_cmd_tickle (MuStore *store, MuConfig *opts, GError **err);
|
||||||
* some error code otherwise
|
* some error code otherwise
|
||||||
*/
|
*/
|
||||||
MuError mu_cmd_server (MuStore *store, MuConfig *opts, GError**/*unused*/);
|
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)
|
* execute the verify command (to verify signatures)
|
||||||
|
|
|
@ -441,6 +441,8 @@ config_options_group_server (void)
|
||||||
GOptionEntry entries[] = {
|
GOptionEntry entries[] = {
|
||||||
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &MU_CONFIG.maildir,
|
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &MU_CONFIG.maildir,
|
||||||
"top of the maildir", "<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}
|
{NULL, 0, 0, 0, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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
|
** 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
|
** 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 overwrite; /* should we overwrite same-named files */
|
||||||
gboolean play; /* after saving, try to 'play'
|
gboolean play; /* after saving, try to 'play'
|
||||||
* (open) the attmnt using xdgopen */
|
* (open) the attmnt using xdgopen */
|
||||||
|
/* for server */
|
||||||
|
gboolean list_commands; /* dump documentations for server
|
||||||
|
* commands */
|
||||||
|
|
||||||
/* options for mu-script */
|
/* options for mu-script */
|
||||||
gchar *script; /* script to run */
|
gchar *script; /* script to run */
|
||||||
const char **script_params; /* parameters for scripts */
|
const char **script_params; /* parameters for scripts */
|
||||||
|
|
Loading…
Reference in New Issue