home *** CD-ROM | disk | FTP | other *** search
- From: rogers@sud509.ed.ray.com (Andrew Rogers)
- Newsgroups: comp.lang.postscript,alt.sources
- Subject: Re: Pcal: postscript/c calendar printer
- Message-ID: <1418@sud509.ed.ray.com>
- Date: 11 Jun 90 16:40:43 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, y)
- int m, y;
- {
- register int day;
- unsigned long holidays = 0;
-
- /* sort holidays by setting bits in flag word */
- for (day = getday(m, y, TRUE); day != 0; day = getday(m, y, 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
-