TCKJ*.PRG - TUBS Cookie Jar

The cookie jar is a collection of values which are mainly initialised by the 
operating system (TOS 1.06 and later) and resident programs. Those values can 
then be used by other programs. Starting with TOS 1.06 the operating system 
creates a cookie jar. Though, a cookie jar may be created also for older 
operating systems. Because many programs use or need a cookie jar nowadays 
creating a cookie jar is certainly a good idea.

'Normal' operating systems from TOS 1.06 on create a cookie jar with 16 
entries (this is often not enough nowadays). MultiTOS creates a cookie jar 
with 1024 entries.

TCKJ*.PRG serves two purposes. Firstly it creates a cookie jar or extends an 
existing cookie jar if it is too small (and then copies of course all 
existing entries). The desired size (more precise: the number of desired 
entries) is appended as a number to TCKJ, e. g. TCKJ30.PRG for a cookie jar 
with 30 entries (to be exact: for a cookie jar with 29 entries because the 
last cookie always contains the size of the cookie jar).

Secondly this program records whether a cold or a warm boot was performed and 
sets the TUBS-cookie accordingly (bit 0; if this bit is set TUBS assumes a 
warm boot). TUBS then can examine this information. TCKJ*.PRG sets the 
TUBS-cookie also if the existing cookie jar is bigger than the desired 
(derrived from the number appended to TCKJ) cookie jar (in this case 
TCKJ*.PRG does not create a new cookie jar).

In order to TUBS being able to examine the cookie TCKJ*.PRG has to lie 
physically before TUBS in the AUTO folder of course.



TCKJ_MAG is a special version of TCKJ*.PRG which is probably only useful for 
Manfred. But maybe sombody else finds it useful, too. This version examines 
additionally wheter a 'MagX'-Cookie exists. If so then bits 1 and 2 in the 
TUBS-cookie will be set, too. Bit 1 tells TUBS not to examine the time 
intervals in any case, bit 2 not to use the default configuration in any 
case. The purpose of this is to tell TUBS that it should not examine time 
intervals nor choose the default configuration if MagiC is active. Please 
decide yourself if this useful. At least there is one person who thinks it 
is.

If you want to use TCKJ_MAG.PRG you have to rename it to TCKJ*.PRG where '*' 
stands for a number (see above).