dysize.c - for Ultrix users

George Ferguson ferguson at cs.rochester.edu
Fri Nov 16 09:29:52 AEST 1990


Sites running Ultrix, possibly among others, are lacking the function
dysize() required to compile xkal. It's such a simple function that I
cons'ed up a version and thought I'd post it.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  dysize.c
# Wrapped by ferguson at tangerine.cs.rochester.edu on Thu Nov 15 17:25:18 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'dysize.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'dysize.c'\"
else
echo shar: Extracting \"'dysize.c'\" \(264 characters\)
sed "s/^X//" >'dysize.c' <<'END_OF_FILE'
X/*
X *	dysize(year): Return the number of days in the given year.
X *
X *	George Ferguson, ferguson at cs.rochester.edu, 15 Nov 1990.
X */
X
Xint
Xdysize(year)
Xint year;
X{
X    if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))
X	return(366);
X    else
X	return(365);
X}
END_OF_FILE
if test 264 -ne `wc -c <'dysize.c'`; then
    echo shar: \"'dysize.c'\" unpacked with wrong size!
fi
# end of 'dysize.c'
fi
echo shar: End of shell archive.
exit 0

-- 
George Ferguson			ARPA: ferguson at cs.rochester.edu
University of Rochester		UUCP: {decvax,rutgers}!rochester!ferguson
Rochester  NY  14627		VOX:  (716) 275-2527



More information about the Alt.sources mailing list