diff --git a/.gitignore b/.gitignore index 6bbfac5e..5bb2511d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ www/Makefile gmon.out tests/once.timestamp src/xlat.c +cremind/Makefile.PL diff --git a/configure b/configure index ca374a23..d32043dd 100755 --- a/configure +++ b/configure @@ -4209,7 +4209,7 @@ printf "%s\n" "#define CONFIG_CMD \"$CONFIG_CMD\"" >>confdefs.h -ac_config_files="$ac_config_files src/Makefile www/Makefile src/version.h rem2html/Makefile rem2html/rem2html rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1 scripts/tkremind" +ac_config_files="$ac_config_files src/Makefile www/Makefile src/version.h rem2html/Makefile rem2html/rem2html rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1 scripts/tkremind cremind/Makefile.PL" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4911,6 +4911,7 @@ do "man/remind.1") CONFIG_FILES="$CONFIG_FILES man/remind.1" ;; "man/tkremind.1") CONFIG_FILES="$CONFIG_FILES man/tkremind.1" ;; "scripts/tkremind") CONFIG_FILES="$CONFIG_FILES scripts/tkremind" ;; + "cremind/Makefile.PL") CONFIG_FILES="$CONFIG_FILES cremind/Makefile.PL" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/configure.ac b/configure.ac index ea693c4b..d121a841 100644 --- a/configure.ac +++ b/configure.ac @@ -95,7 +95,7 @@ AC_SUBST(VERSION) AC_SUBST(PERL) AC_SUBST(PERLARTIFACTS) AC_SUBST(RELEASE_DATE) -AC_CONFIG_FILES([src/Makefile www/Makefile src/version.h rem2html/Makefile rem2html/rem2html rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1 scripts/tkremind]) +AC_CONFIG_FILES([src/Makefile www/Makefile src/version.h rem2html/Makefile rem2html/rem2html rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1 scripts/tkremind cremind/Makefile.PL]) AC_OUTPUT chmod a+x rem2pdf/bin/rem2pdf chmod a+x scripts/tkremind diff --git a/cremind/Makefile.PL.in b/cremind/Makefile.PL.in new file mode 100644 index 00000000..23f57533 --- /dev/null +++ b/cremind/Makefile.PL.in @@ -0,0 +1,21 @@ +use ExtUtils::MakeMaker; +{ + # Override pod2man options + package MY; + sub manifypods { + my ($self,%attribs) = @_; + my $result = $self->SUPER::manifypods(%attribs); + $result =~ s/^(POD2MAN_EXE\s*=\s*)(.+)$/$1$2 --center 'VERSION @VERSION@' --date '@RELEASE_DATE@'/m; + return $result; + } +} + +WriteMakefile( + NAME => 'cremind" + AUTHOR => q{Dianne Skoll }, + VERSION => '@VERSION@', + PREREQ_PM => { + 'Curses::UI' => 0, + }, + EXE_FILES => [ 'bin/cremind' ] + ); diff --git a/cremind/bin/cremind b/cremind/bin/cremind new file mode 100644 index 00000000..78632261 --- /dev/null +++ b/cremind/bin/cremind @@ -0,0 +1,43 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Curses::UI; + +my $panes; +my $cui = Curses::UI->new( + -clear_on_exit => 1, + -color_support => 1, + ); + +sub check_window_size { + if ($Curses::LINES < 24 || $Curses::COLS < 80) { + $cui->dialog("This program needs a terminal window at least 24 lines by 80 columns. This one is " . $Curses::LINES . " by " . $Curses::COLS); + exit(1); + } + +} + +sub create_panes { + $panes->{calendar} = $cui->add( + 'calendar', 'Window', + -x => 0, + -y => 0, + -bfg => 'green', + -width => 23, + -border => 1, + -height => 10); + $panes->{calendar}->add('cal', 'TextViewer', + -text => + " March 2025\n" . + "Su Mo Tu We Th Fr Sa\n" . + " 1 2 3 4 5 6 7\n" . + " 8 9 10 11 12 13 14\n" . + "15 16 17 18 19 20 21\n" . + "22 23 24 25 26 27 28\n" . + "29 30 31\n") +} +check_window_size(); +create_panes(); +alarm(3); +$cui->mainloop(); +