aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore12
-rw-r--r--COPYING2
-rwxr-xr-xautogen.sh2
-rwxr-xr-xcontrib/caldav/calcurse-caldav.py2
-rw-r--r--doc/calcurse.1.txt4
-rw-r--r--doc/credits.txt2
-rw-r--r--doc/de/credits.txt2
-rw-r--r--doc/es/credits.txt2
-rw-r--r--doc/fr/credits.txt2
-rw-r--r--doc/manual.txt2
-rw-r--r--doc/nl/credits.txt2
-rw-r--r--doc/pt_BR/credits.txt2
-rw-r--r--doc/ru/credits.txt2
-rw-r--r--doc/submitting-patches.txt2
-rw-r--r--po/calcurse.pot11
-rw-r--r--scripts/calcurse-upgrade.sh.in2
-rw-r--r--src/apoint.c2
-rw-r--r--src/args.c4
-rw-r--r--src/calcurse.c2
-rw-r--r--src/calcurse.h10
-rw-r--r--src/config.c2
-rw-r--r--src/custom.c2
-rw-r--r--src/day.c2
-rw-r--r--src/dmon.c2
-rw-r--r--src/event.c2
-rw-r--r--src/getstring.c2
-rw-r--r--src/help.c2
-rw-r--r--src/hooks.c2
-rw-r--r--src/htable.h2
-rw-r--r--src/ical.c2
-rw-r--r--src/io.c2
-rw-r--r--src/keys.c4
-rw-r--r--src/listbox.c2
-rw-r--r--src/llist.c2
-rw-r--r--src/llist.h2
-rw-r--r--src/llist_ts.h2
-rw-r--r--src/mem.c2
-rw-r--r--src/note.c2
-rw-r--r--src/notify.c2
-rw-r--r--src/pcal.c2
-rw-r--r--src/queue.c2
-rw-r--r--src/recur.c2
-rw-r--r--src/sha1.c2
-rw-r--r--src/sha1.h2
-rw-r--r--src/sigs.c2
-rw-r--r--src/strings.c2
-rw-r--r--src/todo.c2
-rw-r--r--src/ui-calendar.c2
-rw-r--r--src/ui-day.c31
-rw-r--r--src/ui-todo.c2
-rw-r--r--src/utf8.c2
-rw-r--r--src/utils.c4
-rw-r--r--src/vars.c2
-rw-r--r--src/vector.c2
-rw-r--r--src/vector.h2
-rw-r--r--src/wins.c2
-rw-r--r--test/run-test.c2
57 files changed, 100 insertions, 78 deletions
diff --git a/.gitignore b/.gitignore
index 09a2eac..fa059ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,15 +5,20 @@ Makefile.in
Makefile.in.in
aclocal.m4
configure
+compile
depcomp
install-sh
missing
+mkinstalldirs
stamp-h1
.version
autom4te.cache/
m4/
-./config.*
+/config.*
+
+/contrib/caldav/calcurse-caldav
+/contrib/vdir/calcurse-vdir
doc/*.1
doc/*.html
@@ -24,15 +29,20 @@ po/*.gmo
po/*.header
po/*.sin
po/*.sed
+po/Makevars.template
po/POTFILES
po/Rules-quot
po/stamp-po
+/scripts/calcurse-upgrade
+
src/*.o
src/.deps/
src/calcurse
+test-driver
test/*.o
test/*.log
test/*.trs
test/run-test
+test/.deps/
diff --git a/COPYING b/COPYING
index 333597b..d3ebf1b 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/autogen.sh b/autogen.sh
index f737ace..55c7768 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+# Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py
index ec8f8fb..beea376 100755
--- a/contrib/caldav/calcurse-caldav.py
+++ b/contrib/caldav/calcurse-caldav.py
@@ -527,7 +527,7 @@ if os.path.isdir(os.path.expanduser("~/.calcurse")):
oauth_file = os.path.expanduser("~/.calcurse/caldav/oauth2_cred")
else:
calcurse_data = os.getenv("XDG_DATA_HOME", os.path.expanduser("~/.local/share")) + "/calcurse"
- calcurse_config = os.getenv("XDG_CONFIG_HOME", os.path.expanduser("~/.local/share")) + "/calcurse"
+ calcurse_config = os.getenv("XDG_CONFIG_HOME", os.path.expanduser("~/.config")) + "/calcurse"
configfn = os.path.expanduser(calcurse_config + "/caldav/config")
lockfn = os.path.expanduser(calcurse_data + "/caldav/lock")
diff --git a/doc/calcurse.1.txt b/doc/calcurse.1.txt
index ff31be2..d8275d6 100644
--- a/doc/calcurse.1.txt
+++ b/doc/calcurse.1.txt
@@ -1,6 +1,6 @@
////
/*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -764,5 +764,5 @@ AUTHORS
COPYRIGHT
---------
-Copyright (c) 2004-2018 calcurse Development Team.
+Copyright (c) 2004-2020 calcurse Development Team.
This software is released under the BSD License.
diff --git a/doc/credits.txt b/doc/credits.txt
index b9ce181..ac7c1ab 100644
--- a/doc/credits.txt
+++ b/doc/credits.txt
@@ -1,7 +1,7 @@
Calcurse - text-based organizer
===============================
-Copyright (c) 2004-2017 calcurse Development Team
+Copyright (c) 2004-2020 calcurse Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/doc/de/credits.txt b/doc/de/credits.txt
index b9ce181..ac7c1ab 100644
--- a/doc/de/credits.txt
+++ b/doc/de/credits.txt
@@ -1,7 +1,7 @@
Calcurse - text-based organizer
===============================
-Copyright (c) 2004-2017 calcurse Development Team
+Copyright (c) 2004-2020 calcurse Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/doc/es/credits.txt b/doc/es/credits.txt
index b9ce181..ac7c1ab 100644
--- a/doc/es/credits.txt
+++ b/doc/es/credits.txt
@@ -1,7 +1,7 @@
Calcurse - text-based organizer
===============================
-Copyright (c) 2004-2017 calcurse Development Team
+Copyright (c) 2004-2020 calcurse Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/doc/fr/credits.txt b/doc/fr/credits.txt
index b9ce181..ac7c1ab 100644
--- a/doc/fr/credits.txt
+++ b/doc/fr/credits.txt
@@ -1,7 +1,7 @@
Calcurse - text-based organizer
===============================
-Copyright (c) 2004-2017 calcurse Development Team
+Copyright (c) 2004-2020 calcurse Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/doc/manual.txt b/doc/manual.txt
index de74a32..cb59e8d 100644
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -1,6 +1,6 @@
////
/*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/doc/nl/credits.txt b/doc/nl/credits.txt
index b9ce181..ac7c1ab 100644
--- a/doc/nl/credits.txt
+++ b/doc/nl/credits.txt
@@ -1,7 +1,7 @@
Calcurse - text-based organizer
===============================
-Copyright (c) 2004-2017 calcurse Development Team
+Copyright (c) 2004-2020 calcurse Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/doc/pt_BR/credits.txt b/doc/pt_BR/credits.txt
index d5a4231..5cddabc 100644
--- a/doc/pt_BR/credits.txt
+++ b/doc/pt_BR/credits.txt
@@ -1,7 +1,7 @@
Calcurse - organizador baseado em texto
=======================================
-Copyright (c) 2004-2017 Equipe de Desenvolvimento do Calcurse
+Copyright (c) 2004-2020 Equipe de Desenvolvimento do Calcurse
Todos os direitos reservados.
A redistribuição e uso na forma de código-fonte e binário, com ou
diff --git a/doc/ru/credits.txt b/doc/ru/credits.txt
index b9ce181..ac7c1ab 100644
--- a/doc/ru/credits.txt
+++ b/doc/ru/credits.txt
@@ -1,7 +1,7 @@
Calcurse - text-based organizer
===============================
-Copyright (c) 2004-2017 calcurse Development Team
+Copyright (c) 2004-2020 calcurse Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/doc/submitting-patches.txt b/doc/submitting-patches.txt
index cec82ae..056bfb5 100644
--- a/doc/submitting-patches.txt
+++ b/doc/submitting-patches.txt
@@ -1,6 +1,6 @@
////
/*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/po/calcurse.pot b/po/calcurse.pot
index b0914ef..c2e892b 100644
--- a/po/calcurse.pot
+++ b/po/calcurse.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: bugs@calcurse.org\n"
-"POT-Creation-Date: 2019-06-16 15:27-0400\n"
+"POT-Creation-Date: 2020-01-30 19:14+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -377,6 +377,9 @@ msgstr ""
msgid "(insert an empty line after each appointment)"
msgstr ""
+msgid "(text for a day without events and appointments)"
+msgstr ""
+
msgid "(display more than one day in the appointments panel)"
msgstr ""
@@ -431,6 +434,9 @@ msgstr ""
msgid "(Format of the date displayed in the appointments panel)"
msgstr ""
+msgid "Enter a text string (an empty string for the default text)"
+msgstr ""
+
msgid "Enter the date format (see 'man 3 strftime' for possible formats) "
msgstr ""
@@ -474,9 +480,6 @@ msgstr ""
msgid "unknown item type"
msgstr ""
-msgid "(none)"
-msgstr ""
-
msgid "Event:"
msgstr ""
diff --git a/scripts/calcurse-upgrade.sh.in b/scripts/calcurse-upgrade.sh.in
index 1df1547..c9c9c78 100644
--- a/scripts/calcurse-upgrade.sh.in
+++ b/scripts/calcurse-upgrade.sh.in
@@ -15,7 +15,7 @@ if [ "$#" -gt 0 ]; then
elif [ "$1" = "-v" -o "$1" = "--version" ]; then
echo "calcurse-upgrade @PACKAGE_VERSION@"
echo "$(gettext "
-Copyright (c) 2004-2017 calcurse Development Team.
+Copyright (c) 2004-2020 calcurse Development Team.
This is free software; see the source for copying conditions.
")"
else
diff --git a/src/apoint.c b/src/apoint.c
index 5a9802a..77ff8a0 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/args.c b/src/args.c
index e6444e4..bd58960 100644
--- a/src/args.c
+++ b/src/args.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -112,7 +112,7 @@ static void version_arg(void)
{
printf(_("calcurse %s -- text-based organizer\n"), VERSION);
putchar('\n');
- printf("%s\n", _("Copyright (c) 2004-2017 calcurse Development Team."));
+ printf("%s\n", _("Copyright (c) 2004-2020 calcurse Development Team."));
printf("%s\n", _("This is free software; see the source for copying conditions."));
}
diff --git a/src/calcurse.c b/src/calcurse.c
index 7eb6b12..296616c 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/calcurse.h b/src/calcurse.h
index e41bc32..419915e 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -161,8 +161,11 @@
#define KEYS_LABELEN 8 /* length of command description */
#define KEYS_CMDS_PER_LINE 6 /* max number of commands per line */
-/* Register definitions. */
-#define REG_BLACK_HOLE 37
+/*
+ * Register definitions, see ui_day.c.
+ * Index 0-35 is used for '0'-'9' and 'a'-'z', see keys_get().
+ */
+#define REG_BLACK_HOLE 36
/* Size of the hash table the note garbage collector uses. */
#define NOTE_GC_HSIZE 1024
@@ -1115,6 +1118,7 @@ void ui_day_item_delete(unsigned);
void ui_day_item_edit(void);
void ui_day_item_pipe(void);
void ui_day_item_repeat(void);
+void ui_day_item_cut(unsigned);
void ui_day_item_cut_free(unsigned);
void ui_day_item_copy(unsigned);
void ui_day_item_paste(unsigned);
diff --git a/src/config.c b/src/config.c
index c6914f5..27324e1 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/custom.c b/src/custom.c
index dafb801..575960a 100644
--- a/src/custom.c
+++ b/src/custom.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/day.c b/src/day.c
index a8ee736..29184d9 100644
--- a/src/day.c
+++ b/src/day.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/dmon.c b/src/dmon.c
index 0772394..f9bbfd2 100644
--- a/src/dmon.c
+++ b/src/dmon.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/event.c b/src/event.c
index c16ca4e..375dd66 100644
--- a/src/event.c
+++ b/src/event.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/getstring.c b/src/getstring.c
index 526e9ba..7cdb84e 100644
--- a/src/getstring.c
+++ b/src/getstring.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/help.c b/src/help.c
index 1d6c366..398fb6d 100644
--- a/src/help.c
+++ b/src/help.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/hooks.c b/src/hooks.c
index b34313c..20aed69 100644
--- a/src/hooks.c
+++ b/src/hooks.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/htable.h b/src/htable.h
index 93f65b3..5266213 100644
--- a/src/htable.h
+++ b/src/htable.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/ical.c b/src/ical.c
index 95489a0..79b15de 100644
--- a/src/ical.c
+++ b/src/ical.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/io.c b/src/io.c
index 76d4490..49892c5 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/keys.c b/src/keys.c
index b48aade..3a25a0b 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -297,8 +297,6 @@ enum key keys_get(WINDOW *win, int *count, int *reg)
*reg = ch - '1' + 1;
} else if (ch >= 'a' && ch <= 'z') {
*reg = ch - 'a' + 10;
- } else if (ch == '_') {
- *reg = REG_BLACK_HOLE;
}
ch = keys_wgetch(win);
}
diff --git a/src/listbox.c b/src/listbox.c
index 12c45cc..2b39aa8 100644
--- a/src/listbox.c
+++ b/src/listbox.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/llist.c b/src/llist.c
index 2248dc7..aca0a9d 100644
--- a/src/llist.c
+++ b/src/llist.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/llist.h b/src/llist.h
index c9a6bc6..9533819 100644
--- a/src/llist.h
+++ b/src/llist.h
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/llist_ts.h b/src/llist_ts.h
index 4ca33df..6597cde 100644
--- a/src/llist_ts.h
+++ b/src/llist_ts.h
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/mem.c b/src/mem.c
index 043dfde..8b8a5d5 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/note.c b/src/note.c
index 8d5d09a..92c1ecf 100644
--- a/src/note.c
+++ b/src/note.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/notify.c b/src/notify.c
index 549a2be..3d19511 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/pcal.c b/src/pcal.c
index 27d1616..36fdd8e 100644
--- a/src/pcal.c
+++ b/src/pcal.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/queue.c b/src/queue.c
index f68e969..a00ebad 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2018 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/recur.c b/src/recur.c
index 7376536..54c43ba 100644
--- a/src/recur.c
+++ b/src/recur.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/sha1.c b/src/sha1.c
index 109dacc..3826c76 100644
--- a/src/sha1.c
+++ b/src/sha1.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/sha1.h b/src/sha1.h
index cb3953c..bdba4e8 100644
--- a/src/sha1.h
+++ b/src/sha1.h
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/sigs.c b/src/sigs.c
index af1766e..02457ae 100644
--- a/src/sigs.c
+++ b/src/sigs.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/strings.c b/src/strings.c
index a84f836..b3dc1c4 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/todo.c b/src/todo.c
index ede3b50..aa77b15 100644
--- a/src/todo.c
+++ b/src/todo.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/ui-calendar.c b/src/ui-calendar.c
index 6d301e6..4a8ef44 100644
--- a/src/ui-calendar.c
+++ b/src/ui-calendar.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/ui-day.c b/src/ui-day.c
index e0e306b..7d571fc 100644
--- a/src/ui-day.c
+++ b/src/ui-day.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,8 @@
#include "calcurse.h"
-struct day_item day_cut[38] = { {0, 0, 0, {NULL}} };
+/* Cut & paste registers. */
+static struct day_item day_cut[REG_BLACK_HOLE + 1];
/*
* Set the selected day in the calendar from the selected item in the APP panel.
@@ -834,11 +835,7 @@ void ui_day_item_delete(unsigned reg)
return;
}
}
-
- ui_day_item_cut_free(reg);
- p = day_cut_item(listbox_get_sel(&lb_apt));
- day_cut[reg].type = p->type;
- day_cut[reg].item = p->item;
+ ui_day_item_cut(reg);
/* Keep the selection on the same day. */
day_set_sel_data(day_get_item(listbox_get_sel(&lb_apt) - 1));
io_set_modified();
@@ -995,11 +992,7 @@ void ui_day_item_repeat(void)
/* NOTREACHED */
}
day_set_sel_data(&d);
-
- ui_day_item_cut_free(REG_BLACK_HOLE);
- p = day_cut_item(item_nb);
- day_cut[REG_BLACK_HOLE].type = p->type;
- day_cut[REG_BLACK_HOLE].item = p->item;
+ ui_day_item_cut(REG_BLACK_HOLE);
io_set_modified();
ui_calendar_monthly_view_cache_set_invalid();
@@ -1008,9 +1001,23 @@ cleanup:
mem_free(msg_asktype);
}
+/* Delete an item and save it in a register. */
+void ui_day_item_cut(unsigned reg)
+{
+ struct day_item *p;
+
+ ui_day_item_cut_free(reg);
+
+ p = day_cut_item(listbox_get_sel(&lb_apt));
+ day_cut[reg].type = p->type;
+ day_cut[reg].item = p->item;
+}
+
/* Free the current cut item, if any. */
void ui_day_item_cut_free(unsigned reg)
{
+ EXIT_IF(reg > REG_BLACK_HOLE, "illegal register");
+
if (!day_cut[reg].type) {
/* No previously cut item, don't free anything. */
return;
diff --git a/src/ui-todo.c b/src/ui-todo.c
index 8834e39..b546720 100644
--- a/src/ui-todo.c
+++ b/src/ui-todo.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/utf8.c b/src/utf8.c
index b1976af..1fd4c3b 100644
--- a/src/utf8.c
+++ b/src/utf8.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/utils.c b/src/utils.c
index a9a9e68..c19c800 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -112,7 +112,7 @@ void free_user_data(void)
apoint_llist_free();
recur_apoint_llist_free();
recur_event_llist_free();
- for (i = 0; i <= 37; i++)
+ for (i = 0; i <= REG_BLACK_HOLE; i++)
ui_day_item_cut_free(i);
todo_free_list();
notify_free_app();
diff --git a/src/vars.c b/src/vars.c
index ae690d1..8c1a042 100644
--- a/src/vars.c
+++ b/src/vars.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/vector.c b/src/vector.c
index 5ea893a..fd468ab 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/vector.h b/src/vector.h
index 0013545..86cb3b8 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/wins.c b/src/wins.c
index 51d8072..485c59b 100644
--- a/src/wins.c
+++ b/src/wins.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/test/run-test.c b/test/run-test.c
index 69cde23..d1db112 100644
--- a/test/run-test.c
+++ b/test/run-test.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
+ * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without