Skip to content

Commit 32e8f22

Browse files
committed
exm2eml: temporarily add -Y option for oxcical_allday_ymd parameter
1 parent f0cf28b commit 32e8f22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/exm2eml.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ decltype(system_services_get_user_ids) system_services_get_user_ids;
3838
std::shared_ptr<CONFIG_FILE> g_config_file;
3939
static char *g_username;
4040
static unsigned int g_export_mode = EXPORT_MAIL;
41+
static int g_allday_mode = -1;
4142
static constexpr HXoption g_options_table[] = {
43+
{nullptr, 'Y', HXTYPE_INT, &g_allday_mode, nullptr, nullptr, 0, "Allday emission mode (default=-1, YMDHMS=0, YMD=1)"},
4244
{nullptr, 'u', HXTYPE_STRING, &g_username, nullptr, nullptr, 0, "Username of store to import to", "EMAILADDR"},
4345
{"ical", 0, HXTYPE_VAL, &g_export_mode, nullptr, nullptr, EXPORT_ICAL, "Export as calendar object"},
4446
{"mail", 0, HXTYPE_VAL, &g_export_mode, nullptr, nullptr, EXPORT_MAIL, "Export as RFC5322 mail"},
@@ -100,7 +102,8 @@ int main(int argc, const char **argv) try
100102
terse_help();
101103
return EXIT_FAILURE;
102104
}
103-
105+
if (g_allday_mode >= 0)
106+
g_oxcical_allday_ymd = g_allday_mode;
104107
g_config_file = config_file_prg(nullptr, "midb.cfg",
105108
exm2eml_cfg_defaults);
106109
if (g_config_file == nullptr) {

0 commit comments

Comments
 (0)