Subj : Re: Jam stuff... To : mark lewis From : Scott Adams Date : Mon Mar 17 2003 04:56 am -=> Quoting mark lewis to Scott Adams <=- ml>> i've mark's original stuff available and can also make my "flavor" ml>> available so you don't have to backtrack and fix things that are ml>> already fixed or enhanced... ml>> ie: one bug skips every other control line ml>> one "fix" adds seconds to the timestamp on message create ml>> one mod adds access to additional "settings" SA> All i need is to read the jam base and scan for text SA> and subjects and then report base on that. Then I SA> can write something that'd take over from there. I SA> might have to check into it... ml> subjects are in one file (*.jhr) and the message bodies are in another ml> (*.jdt)... then there's the index file and the lastread pointer ml> file... lastread contains only pointers for the users that read the ml> area... IIRC, the index file contains pointers to the message headers ml> in the header file and the header file contains the pointer to the ml> message body in the body file... Sounds simple enough. I actually won't need pointers or indexes for my purposes. ml> FWIW: here's the datafile structures released by the JAM creators... ml> this should help somewhat... watch the wordwrap! Excellent. I'll extract and work on a proggie later this week....no time tonight. Thanks. Will let you know. ml> (* ml> ** JAM(mbp) - The Joaquim-Andrew-Mats Message Base Proposal ml> ** ml> ** Turbo Pascal API ml> ** ml> ** Written by Joaquim Homrighausen. ml> ** ml> ** ml> ---------------------------------------------------------------------- ml> ** ** jam.pas (JAMmb) ml> ** ml> ** Prototypes and definitions for the JAM message base format ml> ** ml> ** Copyright 1993 Joaquim Homrighausen, Andrew Milner, Mats Birch, ml> and ** Mats Wallin. ALL RIGHTS RESERVED. ml> ** ml> ** 93-06-28 JoHo ml> ** Initial coding ml> *) ml> UNIT JAM; ml> {$IFNDEF VER55} ml> {$A-,B-,E-,D+,L+,F-,I-,N-,O-,R-,S-,V-,X+} ml> {$ELSE} ml> {$A-,B-,E-,D+,L+,F-,I-,N-,O-,R-,S-,V-} ml> {$ENDIF} ml> INTERFACE ml> {-Some generic types} ml> TYPE ml> JAMBUFPTR = ^JAMBUF; ml> JAMBUF = ARRAY [1..$fffe] OF CHAR; ml> FILENAMETYPE = STRING [200]; ml> ASCIIZ = ARRAY [1..255] OF CHAR; ml> ARRAY4 = ARRAY [1..4] OF CHAR; ml> {-File extensions} ml> CONST ml> EXT_HDRFILE = '.JHR'; ml> EXT_TXTFILE = '.JDT'; ml> EXT_IDXFILE = '.JDX'; ml> EXT_LRDFILE = '.JLR'; ml> HEADERSIG : ARRAY4 = ('J', 'A', 'M', #0); ml> {-Current revision level} ml> CurrentRevLev = 1; ml> {-Header file information block, stored first in all .JHR files} ml> TYPE ml> JAMHDRINFO = RECORD ml> Signature : ARRAY4; { followed ml> by } DateCreated : LONGINT; {Creation ml> date} ModCounter : LONGINT; {Last processed ml> counter} ActiveMsgs : LONGINT; {Number of ml> active (not deleted) messages} PasswordCRC : ml> LONGINT; {CRC-32 of password to access, or -1 if none} ml> BaseMsgNum : LONGINT; {Lowest message number in index ml> file} Reserved : ARRAY [1..1000] OF CHAR; ml> END;{JAMHDRINFO} ml> {-Message status bits} ml> CONST ml> MSG_LOCAL = $00000001; {Msg created locally} ml> MSG_INTRANSIT = $00000002; {Msg is in-transit} ml> MSG_PRIVATE = $00000004; {Private} ml> MSG_READ = $00000008; {Read by addressee} ml> MSG_SENT = $00000010; {Sent to remote} ml> MSG_KILLSENT = $00000020; {Kill when sent} ml> MSG_ARCHIVESENT = $00000040; {Archive when sent} ml> MSG_HOLD = $00000080; {Hold for pick-up} ml> MSG_CRASH = $00000100; {Crash} ml> MSG_IMMEDIATE = $00000200; {Send Msg now, ignore restrictions} ml> MSG_DIRECT = $00000400; {Send directly to destination} ml> MSG_GATE = $00000800; {Send via gateway} ml> MSG_FILEREQUEST = $00001000; {File request} ml> MSG_FILEATTACH = $00002000; {File(s) attached to Msg} ml> MSG_TRUNCFILE = $00004000; {Truncate file(s) when sent} ml> MSG_KILLFILE = $00008000; {Delete file(s) when sent} ml> MSG_RECEIPTREQ = $00010000; {Return receipt requested} ml> MSG_CONFIRMREQ = $00020000; {Confirmation receipt requested} ml> MSG_ORPHAN = $00040000; {Unknown destination} ml> MSG_ENCRYPT = $00080000; {Msg text is encrypted} ml> MSG_COMPRESS = $00100000; {Msg text is compressed} ml> MSG_ESCAPED = $00200000; {Msg text is seven bit ASCII} ml> MSG_FPU = $00400000; {Force pickup} ml> MSG_TYPELOCAL = $00800000; {Msg is for local use only (not for ml> export)} MSG_TYPEECHO = $01000000; {Msg is for conference ml> distribution} MSG_TYPENET = $02000000; {Msg is direct network ml> mail} MSG_NODISP = $20000000; {Msg may not be displayed to user} ml> MSG_LOCKED = $40000000; {Msg is locked, no editing possible} ml> MSG_DELETED = $80000000; {Msg is deleted} ml> {-Message header} ml> TYPE ml> JAMHDR = RECORD ml> Signature : ARRAY4; { followed by } Revision : WORD; {CurrentRevLev} ml> ReservedWord : WORD; {Reserved for future use} ml> SubfieldLen : LONGINT; {Length of subfields} ml> TimesRead : LONGINT; {Number of times message ml> read} MsgIdCRC : LONGINT; {CRC-32 of MSGID ml> line} ReplyCRC : LONGINT; {CRC-32 of REPLY ml> line} ReplyTo : LONGINT; {This msg is a reply ml> to..} Reply1st : LONGINT; {First reply to this ml> msg} ReplyNext : LONGINT; {Next msg in reply ml> chain} DateWritten : LONGINT; {When msg was ml> written} DateReceived : LONGINT; {When msg was ml> received/read} DateProcessed : LONGINT; {When msg ml> was processed by packer} MsgNum : LONGINT; ml> {Message number (1-based)} Attribute : LONGINT; ml> {Msg attribute, see "Status bits"} Attribute2 : ml> LONGINT; {Reserved for future use} TxtOffset : ml> LONGINT; {Offset of text in text file} TxtLen : ml> LONGINT; {Length of message text} PasswordCRC : ml> LONGINT; {CRC-32 of password to access msg} Cost ml> : LONGINT; {Cost of message} END;{JAMHDR} ml> {-Message header subfield types} ml> CONST ml> JAMSFLD_OADDRESS = 0; ml> JAMSFLD_DADDRESS = 1; ml> JAMSFLD_SENDERNAME = 2; ml> JAMSFLD_RECVRNAME = 3; ml> JAMSFLD_MSGID = 4; ml> JAMSFLD_REPLYID = 5; ml> JAMSFLD_SUBJECT = 6; ml> JAMSFLD_PID = 7; ml> JAMSFLD_TRACE = 8; ml> JAMSFLD_ENCLFILE = 9; ml> JAMSFLD_ENCLFWALIAS = 10; ml> JAMSFLD_ENCLFREQ = 11; ml> JAMSFLD_ENCLFILEWC = 12; ml> JAMSFLD_ENCLINDFILE = 13; ml> JAMSFLD_EMBINDAT = 1000; ml> JAMSFLD_FTSKLUDGE = 2000; ml> JAMSFLD_SEENBY2D = 2001; ml> JAMSFLD_PATH2D = 2002; ml> JAMSFLD_FLAGS = 2003; ml> JAMSFLD_TZUTCINFO = 2004; ml> JAMSFLD_UNKNOWN = $ffff; ml> {-Message header subfield} ml> TYPE ml> JAMSUBFIELDPTR = ^JAMSUBFIELD; ml> JAMSUBFIELD = RECORD ml> LoID : WORD; {Field ID, 0 - $ffff} ml> HiID : WORD; {Reserved for future ml> use} DatLen : LONGINT; {Length of buffer ml> that follows} Buffer : JAMBUFPTR; {Data ml> buffer} END;{JAMSUBFIELD} ml> JAMBINSUBFIELDPTR = ^JAMSUBFIELD; ml> JAMBINSUBFIELD = RECORD ml> LoID : WORD; {Field ID, 0 - $ffff} ml> HiID : WORD; {Reserved for future ml> use} DatLen : LONGINT; {Length of buffer ml> that follows} END;{JAMSUBFIELD} ml> {-Message index record} ml> JAMIDXREC = RECORD ml> UserCRC : LONGINT; {CRC-32 of ml> destination username (lowercase)} HdrOffset ml> : LONGINT; {Offset of header in .JHR file} ml> END;{JAMIDXREC} ml> {-Lastread structure, one per user} ml> JAMLREAD = RECORD ml> UserCRC : LONGINT; {CRC-32 of ml> username (lowercase)} UserID : ml> LONGINT; {Unique UserID} LastReadMsg : ml> LONGINT; {Last read message number} ml> HighReadMsg : LONGINT; {Highest read message number} ml> END;{JAMLREAD} ml> IMPLEMENTATION ml> END. ml> (* end of file "jam.pas" *) ml> )\/(ark ml> ! Origin: (1:3634/12) .... "Oh, what a circus!" - Garibaldi --- Fringe BBS * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91) .