Article View: comp.lang.postscript
Article #155Re: Pcal: postscript/c calendar printer
From: Andrew Rogers
Date: Mon, 11 Jun 1990 19:10
Date: Mon, 11 Jun 1990 19:10
30 lines
1152 bytes
1152 bytes
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
Technical Details
Message-ID:
<1421@sud509.ed.ray.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
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