Subj : Hatch
To   : Sean Dennis
From : Vincent Coen
Date : Tue Jan 18 2022 08:00 pm

Hello Sean!

Tuesday January 18 2022 13:02, you wrote to me:

> Hello Vincent,

> Tuesday January 18 2022 17:26, you wrote to All:

VC>> How can I get hatch to accept multiple lines of descriptions for
VC>> a specific file as one liners are not cutting it ?

> Add additional "DESC" lines to the "hatch" script.  What I'd do is
> read in the FILE_ID.DIZ and split it into the standard 10 45-char
> lines as per the FILE_ID.DIZ specification.

The hatch program as near as I can tell does NOT read the FILE_ID.DIZ but
accepts a line for the description.

The code could say :
x = 0
while until hatch.desc (1:4) = "    "   */ chars 1 thru 4  /*
       move spaces (1:4) to hatch.desc
       hatch.desc (x) = input from keyboard
       x + Length of input
end while

Routine to copy hatch to new tic file.

the content of hatch as in file mbselib.h

--
/*
* Hatch manager (hatch.data)
*/
struct  _hatchhdr {
   int     hdrsize;        /* Size of header      */
   int     recsize;        /* Size of records     */
   int     lastupd;        /* Last stats update       */
};

struct  _hatch {
   char        Spec[79];       /* File spec to hatch      */
   char        Name[21];       /* File Echo name      */
   char        Replace[15];        /* File to replace     */
   char        Magic[15];      /* Magic to update     */
   char        Desc[256];      /* Description for file    */
   unsigned    DupeCheck   : 1;    /* Check for dupes     */
   unsigned    Active      : 1;    /* Record active       */
   unsigned    Deleted     : 1;    /* Record is deleted       */
   unsigned short  Days[7];        /* Days in the week    */
   unsigned short  Month[32];      /* Days in the month       */
   statcnt     Hatched;        /* Hatched statistics      */
};
--

The original code looks like this :

--
           for (i = 0; i < strlen(hatch.Desc); i++) {
           if (hatch.Desc[i] != '%') {
               fprintf(Tf, "%c", hatch.Desc[i]);
           } else {
               i++;
               memset(&tmp, 0, sizeof(tmp));
               if (isdigit(hatch.Desc[i]))
               tmp[0] = hatch.Desc[i];
               if (isdigit(hatch.Desc[i+1])) {
               tmp[1] = hatch.Desc[i+1];
               i++;
               }
               fprintf(Tf, "%c", de->d_name[atoi(tmp) -1]);
           }
           }
--

And no I do not understand the C code but as the size of desc is 256 chars am
right in assuming the accept for that field will take a max length of 256 for
the description as in one line but if that is true there is no code to break
in
done into individual lines and the program does not ask for another line let
alone doing so wait for a blank line.



Vincent
--- Mageia Linux v8 X64/Mbse v1.0.7.24/GoldED+/LNX 1.1.5-b20180707
* Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)