Path: utzoo!utgpu!cs.utexas.edu!wuarchive!udel!rochester!ferguson From: ferguson@cs.rochester.edu (George Ferguson) Newsgroups: alt.sources Subject: dysize.c - for Ultrix users Message-ID: <1990Nov15.222952.24320@cs.rochester.edu> Date: 15 Nov 90 22:29:52 GMT Reply-To: ferguson@cs.rochester.edu (George Ferguson) Distribution: alt Organization: University of Rochester Computer Science Dept. Lines: 47 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 'dysize.c' <<'END_OF_FILE' X/* X * dysize(year): Return the number of days in the given year. X * X * George Ferguson, ferguson@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@cs.rochester.edu University of Rochester UUCP: {decvax,rutgers}!rochester!ferguson Rochester NY 14627 VOX: (716) 275-2527