home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / other / cal63.lzh / CAL63 / CAL63FMT.TXT < prev    next >
Text File  |  1993-07-30  |  4KB  |  84 lines

  1. Cal 6.3 Data File Format
  2. ------------------------
  3.  
  4. The Cal database format has changed slightly in v6.3 to allow for multiple
  5. weekdays in a single positional event and new holiday/skip holiday flags.
  6.  
  7.  
  8. A Cal 6.3 data file begins with a 16-byte header defined as follows:
  9.  
  10.  
  11.   1 long   Cal format identifier, always 'ca63' for Cal 6.3
  12.   1 long   size of message area in bytes, 20000 for Cal 6.3
  13.   1 word   maximum number of messages in index, 511 in Cal 6.3
  14.   1 word   actual number of messages currently in index
  15.   1 long   offset from start of 1st message to 1st unused byte in database
  16.  
  17.  
  18. Following this header is an exact copy of the embedded event data as it
  19. existed when the data file was written.  This area contains one entry for
  20. each event in the database.  Each entry will be an even number of bytes,
  21. from 24 to 120 bytes inclusive, in length, and is defined as follows:
  22.  
  23.  
  24.    SIZE  OFFSET  USAGE
  25.   ------ ------ -------
  26.   1 word   00   offset to start of next entry
  27.   1 byte   02   date (range 1..31, or 0 if positional or cyclic event)
  28.   1 byte   03   days notice for this event (0..99)
  29.   1 word   04   month bitflags, one bit set for each month scheduled
  30.                   bits 1..12 are used for Jan..Dec, NOT bits 0..11!
  31.                   if this is a cyclic event, bitflag is ZERO!!!
  32.   1 word        for a date event:
  33.            06     1 word   year for 1-time date event (0 for recurring)
  34.                 for a positional event:
  35.            06     1 byte   week position (0..4 = week 1-5, 5=last, 6=each)
  36.            07     1 byte   weekday bit flags:
  37.                            bit 6 CLEAR = Sunday
  38.                            bit 5 CLEAR = Monday
  39.                                   ...
  40.                            bit 0 CLEAR = Saturday
  41.                            bits SET = event DOESN'T occur that weekday
  42.                            multiple weekdays are accepted in one event
  43.                 for a cyclic event:
  44.            06     1 byte   bit 0 set = this is a holiday
  45.                            bit 1 set = skip this event on holidays
  46.            07     1 byte   reserved
  47.   1 byte   08   importance (0..9, 9 = most important)
  48.   1 byte   09   HotWire alarm slot (0..16)
  49.   1 word   10   HotWire alarm time - 0 if not an alarm
  50.            10     1 byte   hour (0..23)
  51.            11     1 byte   minute (0..59)
  52.   1 word        for a cyclic event:
  53.            12     1 word   cyclic event start year (1..9999)
  54.                 for a date or positional event:
  55.            12     1 byte   bit 0 set = this is a holiday
  56.                            bit 1 set = skip this event on holidays
  57.            13     1 byte   reserved
  58.   1 word   14   cyclic event end year (1..9999)
  59.   1 byte   16   cyclic event start month (1..12)
  60.   1 byte   17   cyclic event end month (1..12)
  61.   1 byte   18   cyclic event start date (1..31)
  62.   1 byte   19   cyclic event end date (1..31)
  63.   1 byte   20   cyclic event period (1..255)
  64.   1 byte   21   number of extended msgs (i.e., not counting the first)
  65.                   this will be zero if there is only one message
  66.   ? bytes  22   main msg - 35 bytes max (including terminating null)
  67.   ? bytes   ?   optional 2nd msg- 35 bytes max including terminating null
  68.   ? bytes   ?   optional 3rd msg- 35 bytes max including terminating null
  69.   ? byte    ?   optional extra zero byte to assure next event starts
  70.                     on an even word boundary
  71.  
  72.  
  73.  
  74.   This information is provided for those who wish to transfer Cal data
  75.   to or from another program or platform.  If you have any questions
  76.   regarding Cal data files, please contact me at one of the addresses
  77.   below.
  78.  
  79.             Bill Aycock
  80.             May 31, 1992
  81.  
  82.             Compuserve:  76703,4061
  83.             Internet:    76703.4061@compuserve.com
  84.