home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
1
/
1452
< prev
next >
Wrap
Internet Message Format
|
1990-12-28
|
1KB
From: rogers@sud509.ed.ray.com (Andrew Rogers)
Newsgroups: comp.lang.postscript,alt.sources
Subject: Re: Pcal: postscript/c calendar printer
Message-ID: <1421@sud509.ed.ray.com>
Date: 11 Jun 90 19:10:08 GMT
Some follow-up observations about the version(s) of Pcal I posted recently:
1) In order for the "holidays in gray" feature to work correctly, the
holidays must appear in order in the 'calendar' file. The following
version of find_holidays() removes that restriction:
find_holidays(m)
int m;
{
register int day;
unsigned long holidays = 0;
/* sort holidays by setting bits in flag word */
for (day = getday(m, TRUE); day != 0; day = getday(m, FALSE))
if (day & HOLIDAY)
holidays |= 1 << (day & ~HOLIDAY);
PRT("/holidays ["); /* start definition of list */
for (day = 1; day <= 31; day++)
if (holidays & (1 << day))
PRT(" %d", day);
PRT(" 99 ] def\n"); /* terminate with dummy entry */
}
2) The VMS patch I posted is unnecessarily complex; the function
trnlog() is not necessary. The VMS file system will succesfully
translate "SYS$LOGIN:" for you.
Andrew W. Rogers