debian/0000755000000000000000000000000011722445066007175 5ustar debian/dirs0000644000000000000000000000003711475550312010055 0ustar usr/bin etc usr/share/man/man1 debian/rules.old0000755000000000000000000000327311475553032011035 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatability version to use. export DH_COMPAT=1 build: build-stamp build-stamp: dh_testdir cd source ; $(MAKE) -f makefile.unx cal touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. cd source ; $(MAKE) -f makefile.unx clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/tmp. cd source ; $(MAKE) -f makefile.unx install MANDIR=`pwd`/../debian/tmp/usr/share/man BINDIR=`pwd`/../debian/tmp/usr/bin # To avoid conflicts with the bsdutils # maybe this should be done with update-alternatives mv debian/tmp/usr/bin/cal debian/tmp/usr/bin/ccal mv debian/tmp/usr/share/man/man1/cal.1 debian/tmp/usr/share/man/man1/ccal.1 cp calcol.unx debian/tmp/etc/calcol # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install # dh_testversion dh_testdir dh_testroot # dh_installdebconf dh_installdocs readme.cal readme.unix dh_installexamples cal.dat dh_installmenu # The package installs them # dh_installmanpages dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms # You may want to make some executables suid here. dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/patches/0000755000000000000000000000000011476542237010630 5ustar debian/patches/system_etc.diff0000644000000000000000000000403411475577660013651 0ustar --- a/src/cal.1 +++ b/src/cal.1 @@ -308,15 +308,14 @@ directory for a file called .I .cal.col. If still not found, it will look -for a global -.I cal.col -in a system wide directory. To find out where this location -is you can run +for a global system-wide +.I /etc/cal.col +You can confirm the location for the system-wide definition by running .I ccal --help -which will display the location. +which will display it. .LP Users may override the default colors used when displaying calendars. -This may be done by creating a color definition file. +This may be done by creating a color definition file in their home directory. .LP Example of a color definition file: @@ -370,10 +369,16 @@ Color definition file .TP .B $HOME/.cal.dat -UNIX local date file +User's local date file .TP .B $HOME/.cal.col -UNIX local color file +User's local color file +.TP +.B /etc/cal.dat +System wide definition for dates +.TP +.B /etc/cal.dat +System wide definition for colors .TP .B ~/.dates Date file used with UNIX reminder program and can be used with cal. --- a/src/cal.c +++ b/src/cal.c @@ -1708,7 +1708,7 @@ /* Note the unix style path; Under DOS/OS/2 you better * define PREFIX to prevent this from being used! */ - strcpy(str, "/ect/cal/"); + strcpy(str, "/etc/cal/"); #endif if (strlen(str) + strlen(file) <= CAL_MAXPATH) { strcat(str,file); --- a/src/makefile.unx +++ b/src/makefile.unx @@ -7,15 +7,16 @@ # To use, enter "make -f makefile.unx" # normal default -DEFAULT_DATA_DIR="\"/files/home/ftp/pub/unicorn/pub/cal35/\"" +#DEFAULT_DATA_DIR="\"/files/home/ftp/pub/unicorn/pub/cal35/\"" #DEFAULT_DATA_DIR="\"/usr/lib/\"" +DEFAULT_DATA_DIR="\"/etc/\"" RM=rm -f CC=gcc # Using -Wall will create some warnings on SunOS that can be ignored. # CFLAGS=-O2 -Wall -DUNIX -DUSE_REMINDER -DPREFIX=$(DEFAULT_DATA_DIR) -CFLAGS=-O2 -Wall -DUNIX -DUSE_REMINDER +CFLAGS=-O2 -Wall -DUNIX -DUSE_REMINDER -DPREFIX=$(DEFAULT_DATA_DIR) BINDIR=/usr/bin MANDIR=/usr/man debian/patches/enable_locale.diff0000644000000000000000000000337011476542237014232 0ustar --- a/src/makefile.unx +++ b/src/makefile.unx @@ -16,7 +16,7 @@ # Using -Wall will create some warnings on SunOS that can be ignored. # CFLAGS=-O2 -Wall -DUNIX -DUSE_REMINDER -DPREFIX=$(DEFAULT_DATA_DIR) -CFLAGS=-O2 -Wall -DUNIX -DUSE_REMINDER -DPREFIX=$(DEFAULT_DATA_DIR) +CFLAGS=-O2 -Wall -DUNIX -DUSE_REMINDER -DPREFIX=$(DEFAULT_DATA_DIR) -DHAVE_LOCALE_H -DHAVE_LANGINFO_H BINDIR=/usr/bin MANDIR=/usr/man --- a/src/cal.c +++ b/src/cal.c @@ -536,6 +536,18 @@ #ifdef HAVE_LOCALE_H setlocale(LC_ALL, ""); +#ifdef HAVE_LANGINFO_H + /* Note '1' is Sunday (default), '2' is Monday */ + europe = (int)(nl_langinfo(_NL_TIME_FIRST_WEEKDAY))[0]-1; + if ( europe == 1 ) { + dayline = Europedays; + } else { + /* Don't accept a value which is not 0 or 1 */ + /* We are not prepared to deal with it (because of the dayline) */ + /* NOTE: Some locales set up 7 for the first weekday */ + europe = 0; + } +#endif #endif clearfilenames(); --- a/src/cal.1 +++ b/src/cal.1 @@ -300,6 +300,21 @@ Blank lines are ignored. A line otherwise not in the above format is assume to specify a file name from which to read more events. The file is searched for in the usual places. +.SH LOCALISATION +.LP +.B ccal +will also use the user's locale definitions to determine which day +to use as the starting weekday. This is overriden if the -europe or the -american +command line switches are used. +.PP +If you do not set the -europe or -american switch, your locale is +properly defined, and you see a different start weekday different +from what you would expect, either +.B ccal +or your libc definitions are to blame. If you think this is +a bug in +.B ccal +please report it. .SH COLOR ATTRIBUTES .LP .B ccal debian/patches/check_month_year_integer.diff0000644000000000000000000001101511475572526016502 0ustar --- a/src/cal.c +++ b/src/cal.c @@ -161,6 +161,8 @@ #include #include +#include +#include #include #include #include @@ -304,6 +306,9 @@ short reminderdays(short, short); FILE *efopen(const char *, const char *); void usage(void); +int valid_integer (const char *, int *); +int valid_short_integer (const char *, short int *); +int valid_ushort_integer (const char *, unsigned short int *); /* commandline argument list */ static struct arglist { @@ -511,13 +516,56 @@ } } +/* Test if data provided is a valid integer. + * If it is, the put the resulting value in the result */ +int valid_integer (const char *src, int *result) +{ + long tmp; + char *s; + + tmp = strtol(src,&s,10); + if (s == src || *s != '\0' || errno == ERANGE || + tmp > INT_MAX || tmp < INT_MIN ) return 0; + if (result) *result = (int)tmp; + return 1; +} + +/* Test if data provided is a valid short integer. + * If it is, the put the resulting value in the result */ +int valid_short_integer (const char *src, short int *result) +{ + long tmp; + char *s; + + tmp = strtol(src,&s,10); + if (s == src || *s != '\0' || errno == ERANGE || + tmp > SHRT_MAX || tmp < SHRT_MIN ) return 0; + if (result) *result = (int)tmp; + return 1; +} + +/* Test if data provided is a valid unsigned short integer. + * If it is, the put the resulting value in the result */ +int valid_ushort_integer (const char *src, unsigned short int *result) +{ + long tmp; + char *s; + + tmp = strtol(src,&s,10); + if (s == src || *s != '\0' || errno == ERANGE || + tmp > USHRT_MAX || tmp < 0 ) return 0; + if (result) *result = (int)tmp; + return 1; +} + + /*=========================================================================== * MAIN * Process command line, allocate and initialize, etc. *=========================================================================*/ int main(int argc, char *argv[]) { - short bufsiz, i, m, y; + short bufsiz, i, m, y ; time_t t; struct tm *lt; int c; @@ -747,7 +795,13 @@ * It implies that appointments will not be displayed. */ columns = julian ? 2 : 3; - fixtab (y = atoi(argv[1])); + + if ( ! valid_short_integer (argv[1], &y) ) { + fputs("Invalid value in year parameter.\n", stderr); + usage(); + return (4); /* Let user know failed because invalid year */ + } + fixtab (y); memset(str, ' ', YEARWID); stryearcpy(str+(YEARWID/2)-(stryearlen(y)/2), y); fputs(str, stdout); @@ -758,8 +812,8 @@ /* drop through to next case */ case 3: - m = atoi(argv[1]); - if (strlen(argv[1]) >= 3) { + /* parse months in three letter format */ + if (strlen(argv[1]) >= 3 && ! isdigit(argv[1][0]) ) { for (i = 1; i <= 12; i++) { strcpy(str, months[i]); if (!strncasecmp(argv[1], str, 3)) { @@ -767,6 +821,12 @@ break; } } + } else { + if ( ! valid_short_integer (argv[1], &m) || m <= 0 || m >12 ) { + fputs("Invalid value in month parameter.\n", stderr); + usage(); + return (3); /* Let user know failed because invalid month */ + } } if (!m) { usage(); @@ -775,9 +835,13 @@ } if (argc == 3) { if (isdigit(argv[2][0]) || (isdigit(argv[1][1]) && - argv[2][0] == '-')) - y = atoi(argv[2]); - else { + argv[2][0] == '-')) { + if ( ! valid_short_integer (argv[2], &y) ) { + fputs("Invalid value in year parameter.\n", stderr); + usage(); + return (4); /* Let user know failed because invalid year */ + } + } else { usage(); status=4; /* failed because invalid number parameters */ break; @@ -1533,7 +1597,8 @@ short reminderdays(short m, short y) { FILE *fp; - short mo, dy, yr, n, wn, weeklyflag, filenum, j, hiappt = 1, + short mo, dy; + short yr, n, wn, weeklyflag, filenum, j, hiappt = 1, hilight = (m == thismonth && y == thisyear); char **lln = NULL, *ll; char *descrip; debian/patches/readme_added_content_cal_c.diff0000644000000000000000000000640111475561151016707 0ustar --- a/readme.cal +++ b/readme.cal @@ -103,8 +103,9 @@ Fixed a bug reported by Paul Beam. Date descriptions longer than 50 characters now do not blank out the next line in the calendar. -2.7 -Other contributors added improved commandline switches, allowing the +2.7 - 29 March 1993 +Darrel Hankerson hankedr@mail.auburn.edu and +other contributors added improved commandline switches, allowing the appointment file and color file to be specified on the commandline, and also the ability to display next month's appointments on the current month if there is room to do so. Processing of commandline arguments @@ -113,19 +114,29 @@ and DPATH for data files. A potentially serious bug pertaining to path concatenation was caught. + New command line options: + [-nodata] [-data-file=data-file] + and color options (if compiling with -DUSE_COLOR for OS/2 or MSDOS) + [-nocolor] [-color-file=color-file] + 2.8 Added --europe switch, so that the calendar display has Monday as the first day of the week, which is a more familiar format in Europe. -2.9 -A contributor sent code with several fine modifications, but it was useful -only for the Borland compiler. I have re-done it for ANSI compatibility. +2.9 - 05 June 1993 +Don Retzlaff (donr@gab.unt.edu, University of North Texas) +sent code with several fine modifications, but it was useful +only for the Borland compiler. Alex Matulich rewrote it for ANSI compatibility. The maximum number of appointments to be displayed now defaults to 24, and is adjustable on the commandline. Multiple data files may be specified. Cal no longer stops reading a data file when it has filled up its maximum number of descriptions; it now reads through the whole file so that it can sort out all dates to be displayed. + New command line option: [--maxappts=num] + Allow multiple --datafile= command line parameters + + 2.9a&b a: Fixed a bug in 2.8 and 2.9 that caused cal to attempt to read its color file before determining its home directory. Also added a contributor's @@ -157,19 +168,20 @@ for compatibility with previous versions). Next-month birthdays and anniversaries are no longer displayed a year older than they should be. -3.3 +3.3 Fixed a problem where the "next month" appointment descriptions displayed during December were those of January that same year, instead of next year. Fixed problem that sometimes caused weekly reminders to be duplicated. -3.4 +3.4 - 31 August 1995 Chris Bagwell modified the source extensively to use ANSI color control instead of hardware control, and made other unix-related changes. Added support for periodic reminders (e.g. payday every 14 days). Added -p flag. +Added -8bit option for enabling 8-bit characters under unix. -3.5 -Dan Fandrich added support for unix "reminder(1)" date file. Cleaned up -source code. Fixed a bug in periodic reminders that caused all periodic +3.5 - 11 January 1996 +Dan Fandrich dan@fch.wimsey.bc.ca added support for unix "reminder(1)" date file. +Cleaned up source code. Fixed a bug in periodic reminders that caused all periodic dates for that month to have todays date on the day of the event. Added support for reading an environment variable CALOPT. If this variable is set then it will be read in and any command line options will be used. debian/patches/default_color_yes.diff0000644000000000000000000000053011475561657015170 0ustar --- a/src/cal.c +++ b/src/cal.c @@ -259,12 +259,8 @@ char *mon_attr, *wk_attr, *day_attr, *spclday_attr, *line_attr[MAXAPPTS]; -/* By default we want colors under DOS and OS/2 but not UNIX */ -#ifndef UNIX +/* By default we want colors */ int crt = 1; -#else -int crt = 0; -#endif char *color_file = "cal.col"; #endif /* USE_COLOR */ debian/patches/series0000644000000000000000000000025611475576245012055 0ustar readme_added_content_cal_c.diff calcol-unx.diff ccal_rename.diff system_etc.diff american_option.diff enable_locale.diff default_color_yes.diff check_month_year_integer.diff debian/patches/ccal_rename.diff0000644000000000000000000001104611476542164013714 0ustar --- a/src/cal.1 +++ b/src/cal.1 @@ -1,10 +1,10 @@ .\" @(#)cal.1 4.0 01/01/2002 -.TH CAL 1 "01 January 2002" +.TH CAL 1 "28 January 2004" .SH NAME -.B cal +.B ccal \- displays a calendar .SH SYNOPSIS -.B cal +.B ccal [ .I options ] @@ -15,7 +15,7 @@ .I year ] .br -.B cal +.B ccal [ .I options ] @@ -26,12 +26,12 @@ .I year ] .SH DESCRIPTION -.IX cal "" "\fLcal\fP \(em display calendar" +.IX ccal "" "\fLcal\fP \(em display calendar" By default, -.B cal +.B ccal will display a calendar for the current month with the current day marked. By specifing certain arguments, -.B cal +.B ccal will display a calendar for a whole year or a specified month and year. .LP The transition from the Julian to Gregorian calendar is assumed to have @@ -40,9 +40,9 @@ unusual. .LP If displaying a calendar in the single-month format, -.B cal +.B ccal will look for a date file. If found, -.B cal +.B ccal will read the file, looking for special date descriptions for that month which will be displayed to the right of the calendar. By default, up to 24 appointments may be displayed per month. @@ -51,7 +51,7 @@ month may also be displayed with some limitations (currently, special dates such as the 3rd Thursday of will not be calculated for next month). .LP -.B cal +.B ccal can also optionally use colors when displaying the calendar. It will not display colors any time the calendar is not directly displaying on the console. This is generally the desired behavior when your redirecting @@ -128,38 +128,38 @@ Display a calendar for the current year. .LP There is an optional environment variable that can be used by -.B cal +.B ccal if found. If CALOPT is set then -.B cal +.B ccal will read it and use any valid command line options found. This allows any commonly used switches to be set in your environment and always used (e.g. --europe). -.B Cal +.B Ccal will produce its usage screen when run if any invalid options are set in this variable. .SH COMMAND EXAMPLES .LP .TP -.B cal \-\-f \-\-d=my_dates +.B ccal \-\-f \-\-d=my_dates display the current month and future appointments defined in file `my_dates' .TP -.B cal 1996 +.B ccal 1996 display the entire year of 1996 .TP -.B cal 9 1752 +.B ccal 9 1752 display the month of September 1752 .TP -.B cal sep 1752 +.B ccal sep 1752 same as above .TP -.B cal January +.B ccal January display January of the current year .TP -.B cal help +.B ccal help help message displayed for unrecognized arguments .SH DATE FILES .LP -.B cal +.B ccal will search for a date file called .I cal.dat in the directory it was executed from. If not found it will search @@ -172,7 +172,7 @@ .I cal.dat in a system wide directory. To find out where this location is you can run -.I cal --help +.I ccal --help which will display the location. .LP The special date descriptions specified @@ -225,7 +225,7 @@ "Alex's \\{1961\\} birthday" will be displayed as "Alex's {1961} birthday". .LP NOTE: If -.B cal +.B ccal is invoked with the --europe or --monday switch, then the W values 1-7 denote Monday(1) to Sunday(7) rather than Sunday(1) to Saturday(7). .LP @@ -235,9 +235,9 @@ appointment data file. .LP If -.B cal +.B ccal was compiled with the reminder support then -.B call +.B ccal will also search for the files .I dates and @@ -282,7 +282,7 @@ .B N is the number of days notice of the event to give the user (ignored by -.BR cal ) +.BR ccal ) .TP .B xxxxx the event description @@ -299,7 +299,7 @@ The file is searched for in the usual places. .SH COLOR ATTRIBUTES .LP -.B cal +.B ccal will search for a color definition file called .I cal.col in the directory it was executed from. If not found it will search @@ -312,7 +312,7 @@ .I cal.col in a system wide directory. To find out where this location is you can run -.I cal --help +.I ccal --help which will display the location. .LP Users may override the default colors used when displaying calendars. @@ -390,4 +390,4 @@ .SH "SEE ALSO" .BR date (1), .BR reminder (1), -.BR rs (1) \ No newline at end of file +.BR rs (1) --- a/src/makefile.unx +++ b/src/makefile.unx @@ -20,18 +20,18 @@ BINDIR=/usr/bin MANDIR=/usr/man -default: cal +default: ccal -cal : cal.c - $(CC) $(CFLAGS) -o cal cal.c +ccal : cal.c + $(CC) $(CFLAGS) -o ccal cal.c cal.man : cal.1 nroff -man cal.1 | col > cal.man -install: cal - install -c -m 755 cal $(BINDIR)/cal - install -c -m 644 cal.1 $(MANDIR)/man1/cal.1 +install: ccal + install -c -m 755 ccal $(BINDIR)/ccal + install -c -m 644 cal.1 $(MANDIR)/man1/ccal.1 clean: - $(RM) cal + $(RM) ccal debian/patches/american_option.diff0000644000000000000000000000352211476542207014630 0ustar --- a/src/cal.1 +++ b/src/cal.1 @@ -92,6 +92,9 @@ .B \-\-e[urope] Use European format (first weekday is Monday). .TP +.B \--a[merican] +Use North American format (first weekday is Sunday), this is the default. +.TP .B \-\-f[uture] If current month is displayed, then show only future appointments from the date file, not appointments that are past. This allows room --- a/src/cal.c +++ b/src/cal.c @@ -327,6 +327,7 @@ { "today", 0 }, { "year", 0 }, { "continue", 0 }, + { "american", 0 }, #ifdef USE_COLOR { "use-color", 0 }, { "nocolor", 0 }, @@ -388,7 +389,7 @@ addfilename(optarg); break; case 3: - europe = 1; break; + europe = 1; break; /* european format */ case 4: discard_old = 1; break; /* show future dates only */ case 5: @@ -409,12 +410,17 @@ continu = atoi(optarg); /* display successive months */ if (continu > 0) maxappts = 8; break; -#ifdef USE_COLOR case 13: - crt = 1; break; + /* It's important to setup the dayline or otherwise it will not + * reset the value if the Locale contradicts this */ + dayline = USdays; /* american format */ + europe = 0; break; +#ifdef USE_COLOR case 14: - crt = 0; break; + crt = 1; break; case 15: + crt = 0; break; + case 16: color_file = optarg; break; #endif /* USE_COLOR */ } @@ -1750,6 +1756,7 @@ fputs("\ --e[urope] European format (first day is Monday)\n\ + --a[merican] American format (first day is Sunday)\n\ --f[uture] Show only future appointments on current month\n\ --j[uian] Display Julian dates (days numbered from 1 January\n\ --m[onday] Display Monday as first day of week (same as --europe)\n\ debian/patches/calcol-unx.diff0000644000000000000000000000236311475560277013536 0ustar --- /dev/null +++ b/calcol.unx @@ -0,0 +1,40 @@ +00 02 video colors for month name +01 03 video colors for weekday header +07 01 video colors for normal calendar days +13 01 video colors for sundays +00 02 video colors for current day +07 06 background color for yearly calendar (the space between months) +00 15 video colors for special day descriptions +04 15 video colors for indicator that a special description is for today + +FG BG + +This file is optional. It doesn't have to exist. + +Color definitions must appear as above, as a two-character field for the +foreground color, followed by a space, folowed by a two-character field +for the background color. The color definitions must start on the first +line, and must not contain blank lines. + +Possible colors: + +black 00 +blue 01 +green 02 +cyan 03 +red 04 +violet 05 +orange 06 +light gray 07 + +dark gray 08 +bright blue 09 +bright green 10 +bright cyan 11 +bright red 12 +bright violet 13 +yellow 14 +white 15 + +Specifying a background color from 8 to 15 will result in a background +color of 0 to 7, with flashing text. debian/docs0000644000000000000000000000001311475575007010046 0ustar readme.cal debian/postinst0000644000000000000000000000103511722443222010772 0ustar #!/bin/sh -e # # Postinst file for ccal set -e case "$1" in configure) # Move a conffile without triggering a dpkg question if [ -e /etc/calcol ] && dpkg-maintscript-helper supports mv_conffile; then dpkg-maintscript-helper mv_conffile \ /etc/calcol /etc/cal.col 3.5-7 ccal -- "$@" fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 debian/source/0000755000000000000000000000000011475550254010476 5ustar debian/source/format0000644000000000000000000000001411475550254011704 0ustar 3.0 (quilt) debian/README.source0000644000000000000000000000054611475552736011371 0ustar cal for Debian -------------- This package uses quilt to manage all modifications to the upstream source. Changes are stored in the source package as diffs in debian/patches and applied during the build. Please see: /usr/share/doc/quilt/README.source for more information on how to apply the patches, modify patches, or remove a patch. debian/rules0000755000000000000000000000104611475574727010272 0ustar #!/usr/bin/make -f # -*- makefile -*- # debian/rules for cal that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh --with quilt $@ override_dh_auto_clean: $(MAKE) -C src -f makefile.unx clean override_dh_auto_build: $(MAKE) -C src -f makefile.unx override_dh_auto_install: $(MAKE) -C src -f makefile.unx install MANDIR=`pwd`/debian/ccal/usr/share/man BINDIR=`pwd`/debian/ccal/usr/bin install -m 644 calcol.unx debian/ccal/etc/cal.col debian/menu0000644000000000000000000000013411475576547010100 0ustar ?package(ccal):needs="text" section="Apps/Tools"\ title="ccal" command="/usr/bin/ccal -p" debian/copyright0000644000000000000000000000672411475552512011141 0ustar This package was debianized by Javier Fernandez-Sanguino Pena Sat, 2 Dec 2000 16:23:43 +0100. It was downloaded from Primary-site: sunsite.unc.edu /pub/Linux/utils/shell Original-site: sunsite.unc.edu /pub/Linux/utils/shell Alternate-site: tsx-11.mit.edu /pub/linux/sources/usr.bin As of this writting (December 2010) the upsteam page is http://unicorn.us.com/cal.html. Alternatively sources can also be downloaded from Chris Bagwell's site available at http://www.cnpbagwell.com/projects Upstream Author: Alex Matulich Chris Bagwell Copyright: (c) 1993-2002 Alex Matulich License: The cal.c file holds the following BSD-style license --------------------------------------------------------------------- * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * - Neither name of Unicorn Research nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS `AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- On the other hand, the cal sources license, as described in its readme file has been placed into the Public Domain. This is the note verbatim: --------------------------------------------------------------------- This archived collection of files is placed into the Public Domain. Feel free to redistribute the this archive, but PLEASE make sure the archive contains all the original files, namely: readme.cal - this file cal.exe - the MSDOS executable program cal.doc - documentation for cal.exe cal.dat - optional sample data file of appointment dates cal.col - optional sample file of color attributes source/*.os2 - files about compiling the source for OS/2 source/*.unx - unix-related information source/cal.1 - unix man page for cal with formatting codes source/cal.c - source code for cal source/makefile.* - makefiles --------------------------------------------------------------------- In Debian, all the above files are available in the source package. The binary package ships only the compiled version of the cal.c as well as the manpage. debian/README.Debian0000644000000000000000000000223711475561553011247 0ustar ccal for Debian ---------------------- Note that even though it is originally named cal, in Debian it's 'ccal' in order to avoid conflicting with bsdmaintuils package. There was once a package named color-cal in Debian that provided this program but I have been unable to find it (maitained, my dpkg --status at home tells me, by Patrick J. Edwards ) Since I really like this piece of software, and helps me avoid public embarassment when I forget birthdays I have been looking quite a lot until I traced it to the sources again. However, there is still work to be done to put this software up-to-date. It is not yet fully internationalised, and will only print the days/months in english. The only localisation that has been done is the use of locale to setup the start week day. Help in this area would be appreciated. Note: This package provide an alternative to the 'cal' program (it's provided by ncal in bsdutils) but since it's not fully compatible with it I do not intent to make it possible to be handled through /etc/alternatives (yet) -- Javier Fernandez-Sanguino Pen~a , Wed, 28 Jan 2004 14:33:53 +0100 debian/control0000644000000000000000000000101011476002617010565 0ustar Source: cal Section: utils Priority: optional Maintainer: Javier Fernandez-Sanguino Pen~a Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~) Standards-Version: 3.8.4 Homepage: http://unicorn.us.com/cal.html Package: ccal Architecture: any Depends: ${shlibs:Depends} Pre-Depends: dpkg (>= 1.15.7.2) Description: Colorised calendar utility CCAL is a drop in replacement for the standard unix calendar program. It includes support for color and daily, weekly, and yearly reminders/appointments. debian/ccal.examples0000644000000000000000000000002011475577006011634 0ustar cal.dat cal.col debian/changelog0000644000000000000000000001123211722445044011042 0ustar cal (4.0-3) unstable; urgency=low * Change the postinst script so that dpkg-maintscript-helper is only called when configuring the package, when the file scripts and when the 'mv_conffile' call is supported (Closes: 661264) -- Javier Fernandez-Sanguino Pen~a Sun, 26 Feb 2012 15:50:00 +0100 cal (4.0-2) unstable; urgency=low * Refresh the ccal_rename.diff patch to rename more 'cal's used in the manpage. * Refresh the american_option.diff patch to use -- instead of just - in the manpage. -- Javier Fernandez-Sanguino Pen~a Sat, 04 Dec 2010 23:50:59 +0100 cal (4.0-1) unstable; urgency=low [ After a long time of neglecting this package bring it back to life. Enjoy! ] * New upstream release (4.0) (Closes: #280799) - This new release renames the user and system-wide configuration file from 'calcol' to 'cal.col'. The package tries to handle this transparently for admins through its preinst/postinst. - Since this new release disables color usage for UNIX systems, change it to enable by default (this is 'ccal' after all, not 'cal') * Convert to new quilt format. Move patches from previous versions to debian/patches * Fix use of nl_langinfo to properly define the start day of the week. Thanks to Jakub Wilk for pointing out where the issue was (Closes: 414428) * New patch: check_month_year_integer.diff - introduces sanity checks to user input to ensure that the month and year values are 'sane' (e.g. they fit in a short int, amongst other checks). This ensures that there is no segment violation in some parts of the code (Closes: 354449) * Use the new PREFIX definition available in this release to define the system-wide configuration file as available in /etc/ instead of hardcoding the path in the sources. This prevents issues with users not being able to use their own calcol files (Closes: 230402) * debian/control: - Add Homepage - Remove remove to release-specific features - Add Pre-depends on dpkg as we use dpkg-maintscript-helper to move the configuration file to its new location * debian/copyright: - Point to the current homepage and download areas - Add the BSD license used by the cal.c sources * debian/menu: adapt to new menu format * debian/README.source: added and explain that the sources now use quilt for patches * debian/rules: simplify using debhelper's * debian/docs: remove readme.unix as it is no longer distributed -- Javier Fernandez-Sanguino Pen~a Thu, 02 Dec 2010 01:09:29 +0100 cal (3.5-7) unstable; urgency=low * "Proper" honoring of LC_TIME mixing it with command line options, also added an "american" command line option to set the weekday starting on "Sunday". Notice, however, that the code only accepts either "Monday" or "Sunday" as start weekdays, that limitation could be removed, but let's test this first. Note: please read the comments in util-linux's cal.c (Closes: #200874) * The build target now builds (huh!). * Added a note in README.Debian about diverting '/usr/bin/cal' * Added more information in the manpage (including the new option) * Modified the manpage to say 'ccal' instead of 'cal' -- Javier Fernandez-Sanguino Pen~a Wed, 28 Jan 2004 14:52:43 +0100 cal (3.5-6) unstable; urgency=low * Changed Standard-Version * Removed dh-make bolierplate * Recompiled so that postinst no longer includes the /usr/doc link * Removed dh_suidregister -- Javier Fernandez-Sanguino Pen~a Fri, 23 Jan 2004 18:09:31 +0100 cal (3.5-5) unstable; urgency=low * Changed section to utils -- Javier Fernandez-Sanguino Pen~a Sun, 9 Sep 2001 01:24:54 +0200 cal (3.5-4) unstable; urgency=low * Fixed lintian errors -- Javier Fernandez-Sanguino Pen~a Sat, 8 Sep 2001 19:04:55 +0200 cal (3.5-3) unstable; urgency=low * Changed __linux__ to __GLIBC__ (Closes: #106779) -- Javier Fernandez-Sanguino Pen~a Tue, 7 Aug 2001 02:06:07 +0200 cal (3.5-2) unstable; urgency=low * Added -p to menu file (Closes: #84326) -- Javier Fernandez-Sanguino Pen~a Sun, 4 Feb 2001 11:29:08 +0100 cal (3.5-1) unstable; urgency=low * New Release. This package was "lost" in Debian somehow. * Changed the source to compile without gcc warnings. * Changed the source in order to *not* core dump if the CALDOT environment variable is not set. * Binary renamed to ccal due to conflict with bsdmainutils -- Javier Fernandez-Sanguino Pen~a Sat, 2 Dec 2000 16:23:43 +0100 Local variables: mode: debian-changelog End: debian/preinst0000644000000000000000000000035511475600534010605 0ustar #!/bin/sh -e # # Preinst file for ccal # based on http://wiki.debian.org/DpkgConffileHandling # Move a conffile without triggering a dpkg question dpkg-maintscript-helper rm_conffile \ /etc/calcol 3.5-7 ccal -- "$@" #DEBHELPER# debian/compat0000644000000000000000000000000211475550337010376 0ustar 7