| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | RA Message base with C |
> I would appreciate any help... Obviously code would be nice but an
> easy explanation or even the ported structs from Pascal to C would be
> great :-)
/* hudson.h
* C/C++ header file for Hudson message base (HMB) format
*/
# if !defined(_HUDSON_H)
# define _HUDSON_H
# if defined(__cplusplus)
extern "C" {
# endif
# pragma pack(1) /* Packed structures */
# define Q_MAXAREAS 200
# define Q_LASTREAD "LASTREAD.BBS"
# define Q_MSGINFO "MSGINFO.BBS"
# define Q_MSGIDX "MSGIDX.BBS"
# define Q_MSGTOIDX "MSGTOIDX.BBS"
# define Q_MSGHDR "MSGHDR.BBS"
# define Q_MSGTXT "MSGTXT.BBS"
# define b2a(b) (b-1) /* Board number to area index */
# define a2b(a) (a+1) /* Area index to board number */
typedef long RECPOS;
typedef unsigned char uchar;
typedef unsigned short ushort;
# define recofs(o) (RECPOS)((RECPOS)o*256L) /* Cvt record to file offset */
# define MA_DELETED 0x01 /* Message deleted */
# define MA_OUTNET 0x02 /* Unmoved Outgoing Net Message */
# define MA_NETMAIL 0x04 /* Is a Net Mail Message */
# define MA_PRIVATE 0x08 /* Private */
# define MA_RECEIVED 0x10 /* Received */
# define MA_OUTECHO 0x20 /* Unmoved Outgoing Echo Message */
# define MA_LOCAL 0x40 /* Local Bit, was written here */
# define MA_READONLY 0x80 /* Reserved */
# define NA_KILLSENT 0x01 /* Kill Message after it's been sent */
# define NA_SENTOK 0x02 /* Sent OK */
# define NA_FATTACH 0x04 /* File(s) Attached */
# define NA_CRASH 0x08 /* Crash Priority */
# define NA_REQREC 0x10 /* Request Receipt */
# define NA_AUDREQ 0x20 /* Audit Request */
# define NA_RETREC 0x40 /* Is a Return Receipt */
# define NA_DIRECT 0x80 /* Direct */
typedef struct _lastread /* LASTREAD.BBS record */
{
word last[Q_MAXAREAS]; /* User lastread computers */
} LASTREAD;
# define SZ_Hlr sizeof(LASTREAD)
typedef struct _msginfo /* MSGINFO.BBS */
{
ushort lowmsg;
ushort highmsg;
ushort totalactive;
ushort active[Q_MAXAREAS];
} MSGINFO;
# define SZ_Hmi sizeof(MSGINFO)
typedef struct _msgidx /* MSGIDX.BBS record: 1 per msg */
{ /* Record corresponds to MSGHDR.BBS */
ushort msgno;
byte board;
} MSGIDX;
# define SZ_Hidx sizeof(MSGIDX)
typedef struct _msghdr /* MSGHDR.BBS record: 1 per msg */
{
ushort msgno;
ushort replyto;
ushort seealso;
ushort timesread;
ushort start;
ushort numrecs;
ushort destnet;
ushort destnode;
ushort orignet;
ushort orignode;
uchar destzone;
uchar origzone;
ushort cost;
uchar msgattr;
uchar netattr;
uchar board;
uchar msgtime[6];
uchar msgdate[9];
uchar msgto[36];
uchar msgfrom[36];
uchar subject[73];
} MSGHDR;
# define SZ_hdr sizeof(MSGHDR)
typedef struct _msgtoidx /* MSGTOIDX.BBS record: 1 per msg */
{ /* Record corresponds to MSGHDR.BBS */
uchar msgto[36];
} MSGTOIDX;
# define SZ_toidx 36
typedef struct _msgtxt /* MSGTXT.BBS, text divided into 256b chunks */
{ /* byte 0=length, 1-255 text */
uchar text[256];
} MSGTXT;
# define SZ_txt 256
# pragma pack()
# if defined(__cplusplus)
}
# endif
# endif
If you have any questions as to how it all works, just ask.
regards,
david
---
SD®¯^–-
* Origin: Unique Computing Pty Ltd (3:632/348)SEEN-BY: 50/99 54/54 620/243 623/625 630 624/102 632/103 301 348 365 386 998 SEEN-BY: 633/371 379 634/384 635/210 502 503 541 544 636/100 670/206 711/409 SEEN-BY: 711/430 807 808 809 932 934 942 712/623 713/888 714/906 800/1 @PATH: 632/348 635/503 50/99 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.