README for win32 port of mdate 1.2.2
------------------------------------

Mdate is  1998,1999,2000 Sean Dwyer <ewe2@cvis.com.au> and the Mdate
Development Team under the terms of the GPL.

This is a quick port of Mdate, the Mayan date utility, to win95/98/NT.
Source and a batchfile for use with (hopefully) most versions of
Borland C++ Builder is included. It compiles fine with BCB 3.0 standard
and the latest BCB5.5 command-line tools. You will also need Tasm if
you wish to compile drem.asm, but libmdate.lib is included in case you dont
have tasm 5 or an earlier version. 

Mkmdate.bat compiles EVERYTHING, but you may not have a tasm available -
simply compile mdate by running mdfromlib.bat. It will build mdate using
the precompiled libmdate.lib in the objfiles directory.

Note that for this version, config.h can be
modified if you want to change my default <i586-pc-win32-microsoft> version
information.

A port of the necessary drem() function had to be made to tasm. I'm
pleased to say it performs as well as the original AT&T syntax version
coded for the old Linux C library v5 by Hongjiu Lu back in 1993. It is
a flat memory model function, which is why Tasm 5 or later is required.

It was necessary to alter some functionality in libmdate.c because of
a strftime() quirk with negative years. I've contacted Borland about
this. Also there were one or two GNU C-specific quirks that had to be
avoided.

This version of mdate allows you to use either standard command-line
output or program-parseable output by the -p parameter.

A quick explaination of help:

Mdate 1.2.1 (i586-pc-win32-microsoft)

  usage: mdate [flags] [input]

    -h                 this help message.
    -v                 prints version and exits.
    -p                 program-parseable output (default=no).
    -d DD MM [-]YYYY   day month year (AD or BC Gregorian).
    -j NNNNNNNNN       julian day number [up to 9 digits].
    -l NN NN NN NN NN  long count.

Report bugs to ewe2@users.sourceforge.net

examples:

Standard output:

mdate -j 584285


Gregorian Date          : 13-August--3113 (13/8/-3113)
Julian Day Number       : 584285.0
Long Count              : 00.00.00.00.00
Tzolkin Date            : 4 Ahau
Haab Date               : 8 Cumku

Parseable output:

mdate -p -j 584285
JDN:  584285.0 date:  13  08 -3113 00.00.00.00.00  04 Ahau    08 Cumku


Any comments or questions are appreciated, just email me at:
ewe2@cvis.com.au.
or 
ewe2@users.sourceforge.net
