home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3078 < prev    next >
Internet Message Format  |  1991-03-14  |  7KB

  1. From: jbr0@cbnews.att.com (joseph.a.brownlee)
  2. Newsgroups: alt.sources
  3. Subject: Re: Pcal v4.0, part 1 of 5
  4. Message-ID: <1991Mar14.175222.19201@cbnews.att.com>
  5. Date: 14 Mar 91 17:52:22 GMT
  6.  
  7. Oops, I messed up.  I inadvertently posted a slightly older version of the
  8. ReadMe file with pcal v4.0.  Here is the updated version.  Sorry for the
  9. inconvenience.
  10.  
  11. (continue now if you don't want to see it)
  12.  
  13. ------------------------------- 8< cut here >8 ---------------------------------
  14. "Pcal" Version 4.0
  15.  
  16. This is yet another version of "Pcal", the PostScript calendar program.  Since
  17. the changes to program structure and functionality were so extensive, it has
  18. been given a new release number.
  19.  
  20. Major changes:
  21.  
  22.     1) Of interest to Pcal hackers, porters, and installers:
  23.  
  24.       .    You will notice several new files.  Pcal.c was getting so large
  25.     that it was in imminent danger of breaking some mailers;
  26.     consequently it has been split into six .c files and three new
  27.     .h files:
  28.  
  29.         pcal.c        main, arg parsing, usage message
  30.         pcalutil.c    misc. utility routines
  31.         readfile.c    reading and parsing of date file
  32.         writefil.c    output of PostScript code
  33.         moonphas.c*    phase-of-moon calculations
  34.         exprpars.c*    parse Boolean expressions in "if{n}def"
  35.  
  36.         pcalglob.h    global variables
  37.         protos.h*    ANSI-style function prototypes
  38.         noprotos.h*    K&R-style function declarations
  39.  
  40.         * all-new for v4.0
  41.  
  42.     (Note that encapsulating all of the PostScript output routines into
  43.     a single file - writefil.c - facilitates porting Pcal to other
  44.     typesetting packages, e.g., troff.  Any takers?)
  45.  
  46.       . All of the routines now have ANSI function prototypes in addition
  47.     to the older K&R-style declarations, selected automagically by a
  48.     macro PROTOS which is defined whenever __STDC__ is present (or which
  49.     may be explicitly defined for compilers which accept prototypes but
  50.     are not fully ANSI-conformant).  Similarly, a macro STDLIB controls
  51.     inclusion of <stdlib.h>, an ANSI standard header which exists on
  52.     some (but not all) non-ANSI systems.
  53.  
  54.       .    Pcal now runs on the Commodore Amiga and under MS-DOS, thanks to the
  55.     respective efforts of Bill Hogsett and Floyd Miller.
  56.  
  57.       . All of the calendar calculations - starting day, length, etc. - have
  58.     been moved from the PostScript code to the C code; pcalinit.ps is
  59.     now concerned only with formatting and printing the output.
  60.  
  61.       .    The title inside the "notes" box has been moved from pcalinit.ps to
  62.     pcallang.h so it may be easily translated to languages other than
  63.     English.
  64.  
  65.       .    The month/year title and dates in the small calendars have been
  66.     enlarged (from 48 points to 60 and 54, respectively).  The font sizes
  67.     for the small, medium (new), and large calendars are now in arrays
  68.     to facilitate any future changes.
  69.  
  70.       .    Pcalinit strips trailing comments (and the spaces preceding them) and
  71.     allows <FF> in the input text.  The logic of pcalinit.c has been
  72.     revised for clarity, and the source has been documented.  An optional
  73.     parameter has been added to allow the user to specify the name of
  74.     the string array in the output file.
  75.  
  76.  
  77.     2) New command-line options:
  78.  
  79.       .    The "-w" option has been added to print calendars for a whole year
  80.     on a single page, printing 3 rows by 4 columns in landscape mode and
  81.     4 rows by 3 columns in portrait mode.  This option effectively disables
  82.     the -M|m (moons) and -J|j (Julian dates) flags, and also suppresses
  83.     the text in the calendar boxes.  The numeric parameters also work
  84.     slightly differently:
  85.  
  86.         yy        print Jan/yy .. Dec/yy
  87.         mm yy        print 12 months starting with mm/yy
  88.         mm yy n        print n months (rounded up to multiple of 12)
  89.                     starting with mm/yy
  90.         (default)    print Jan .. Dec of current year
  91.  
  92.     Note that "-w" in conjunction with "-p" overrides any Y-scale factor
  93.     (default or set with "-y") in order to use the full portrait page.
  94.  
  95.       .    The "-B" option has been added; this directs Pcal to leave unused
  96.     calendar boxes blank.
  97.  
  98.       .    The "-O" option has been added; this directs Pcal to print all "gray"
  99.     dates as outlined characters.
  100.  
  101.  
  102.     3) New date file functionality:
  103.  
  104.       .    The Pcal "preprocessor" now accepts Boolean expressions in "if{n}def"
  105.     directives.  These expressions consist of symbol names joined
  106.     by Boolean operators !, &, ^, and | (in order of precedence, high
  107.     to low).  Parentheses may be used to alter the precedence; && and
  108.     || are accepted as synonyms for & and |.  A symbol name evaluates
  109.     to TRUE if currently defined, FALSE if not; thus, "ifdef A | B | C"
  110.     is TRUE if any of the symbols A, B, and C is defined, and
  111.     "ifdef A & B & C" is true if they all are.
  112.  
  113.     "ifndef <expr>" is equivalent to "ifdef !( <expr> )".
  114.  
  115.       .    Pcal supports "odd" and "even" - meaning "alternate, starting with
  116.     first" and "alternate, starting with second" - as ordinals and "year"
  117.     to refer to the entire year as an entity (as opposed to "all", which
  118.     refers to each individual month).  Thus "odd Thursdays in year" expands
  119.     to 1/3/91, 1/17, 1/31, 2/14, 2/28... while "odd Thursdays in all"
  120.     expands to 1/3, 1/17, 1/31, 2/7, 2/21... .
  121.  
  122.       .    Pcal supports all ordinal numbers (e.g., "100th day of year"),
  123.     including negative ordinals ("-2nd" means "next to last", etc.).
  124.     As before, only "first" through "fifth" may be spelled out.
  125.  
  126.       .    Pcal now allows C-style escape sequences ('\' followed by a character,
  127.     1-3 octal digits, or 'x' followed by 1-2 hexadecimal digits) in the
  128.     date file.  Escaped whitespace (including <NL>) and the standard
  129.     ANSI character escapes ('\a', '\b', '\f', '\n', '\r', '\t', '\v')
  130.     are all replaced by a single blank.
  131.  
  132.       .    Pcal now reads phase-of-the-moon information from file .moonXX (where
  133.     XX is the last two digits in the current year) if such a file exists
  134.     in the same directory as the .calendar file.  If no such file exists,
  135.     Pcal calculates the approximate phase for each date (as before).  (The
  136.     file name may vary between systems.)
  137.  
  138.  
  139.     4) Other new functionality:
  140.  
  141.       . If Pcal cannot find the date file in the standard search places
  142.     (PCAL_DIR and HOME), it makes one last attempt to find it in the
  143.     directory where the Pcal executable resides.
  144.  
  145.       . Pcal now prints the name of the date and moon files (if used) as
  146.     a comment in the PostScript output.
  147.  
  148.  
  149.     5) Bug fixes:
  150.  
  151.       .    "1 << n" has been rewritten as "1L << n" throughout; this caused 
  152.     problems on some machines where "int" is 16 bits.
  153.  
  154.       .    Fixed loadwords() to correctly handle single- and double-quoted
  155.     strings, including those containing escaped quotes.
  156.  
  157.       .    In response to popular demand, revised enter_day_info() to silently 
  158.     ignore Feb 29 of common years (this may be disabled by setting
  159.     FEB_29_OK to 0 in pcaldefs.h).
  160.  
  161.       .    The -f flag works correctly in conjunction with PCAL_DIR.
  162.  
  163.       .    Pcalinit correctly escapes backslashes and double quotes.
  164.  
  165.  
  166.  
  167. Credit where credit is due:
  168.  
  169. Pcal 4.0 has been more of a collaborative effort than usual.  The following
  170. people contributed in some way to its final form:
  171.  
  172.     Overall coordinator, man page, useful ideas:    Joe Brownlee
  173.     VMS support:                    Richard Dyson
  174.     Amiga support, prototypes:            Bill Hogsett
  175.     DOS support, executable path search        Floyd Miller
  176.     Other C and PostScript code:            Andrew Rogers
  177.  
  178. Although they probably wouldn't recognize the current version, countless
  179. others worked on Pcal long before any of us ever heard of it; see the
  180. Orig.ReadMe file and topline comments in pcal.c.
  181.