Re: obj_mail.diff

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 11/04/97

On Tue, 4 Nov 1997, Benjamin Draper wrote:

->I have recently started to 'modify', some of the patches I have
->on my MUD. One of which is Daniel Koepke's 'obj_mail.diff'. The MUDmail
->patch is indeed extremely useful without other modifications, however
->only the VNUM of the object is placed in the mail header.

Well, if you start adding too much, then you quickly come to a point
where BLOCK_SIZE - sizeof(long) - sizeof(header_data_type) - sizeof(char)
is non-positive (which is a bad thing).  If you add more to the
header, like the alias list/short/long (btw, you want to use static
arrays, no pointers!) etc. then you'll probably want to make the
BLOCK_SIZE bigger (otherwise, it won't work).  You will probably have
to increase the block size by over 200.  Given:

  struct header_data_type {
     long next_block;
     long from;
     long to;
     time_t mail_time;
     int obj_mail;
     char obj_name[64];
     char obj_short[64];
     char obj_long[128]; /* about 1.5 lines */

The HEADER_BLOCK_DATASIZE will equal -181 (estimate).  So you'd
probably be best off increasing it by a good 200 or 300 (so instead of
BLOCK_SIZE being 100, make it 300 or 400).  Note that increasing the
BLOCK_SIZE will also increase the amount of used disk space on small
messages (or messages that are HEADER_BLOCK_DATASIZE+BLOCK_SIZE+1
characters long, because the first HEADER_BLOCK_DATASIZE number of
characters will go into the header text block; the next will go into a
BLOCK_SIZE block...and then the remaining character will also be
shoved into a BLOCK_SIZE block, wasting 399 bytes. :\  At least, from
my surface examination of the mail system, that is roughly what will
happen.  Well, then again, the DATA_BLOCK_DATASIZE is
BLOCK_SIZE-sizeof(long)-sizeof(char), so that's not EXACTLY what will
happen (instead of just 1 character overlapping, it'll be
sizeof(long)+sizeof(char)+1 characters written out; 6, I think).

->   Please note! This is not a flame aimed at Mr. Koepke, as I am
->indebt to his many patches...

Hardly taken as a flame.  In fact, I think I have a more defined view
as to what is a flame than most of anyone else, and only outright
insults really fall into that area.  Hm, I hope my constant bickering
isn't starting to frighten people. :)

daniel koepke /

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST