home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
source
/
telex1.sit
/
Telexƒ
/
TelexDef
< prev
next >
Wrap
Text File
|
1991-05-04
|
2KB
|
50 lines
/* ====================================== *\
** == AppleTalk Teletype == **
** == Common Definitions == **
** == Copyright ⌐ Gamma Software, 1990 == **
** == Think C version == **
\* ====================================== */
#include <AppleTalk.h>
#include <nAppleTalk.h>
/* standard #defines */
#define NIL 0
#define TRUE 1
#define FALSE 0
typedef unsigned char unchar;
#define RegTimeOut 10 /* time-out for AppleTalk Registration */
#define Nrepeat 3 /* number of repeats for -- " -- */
#define Nnotes 4 /* Number of Messages in Buffer */
#define MaxMessSize 250 /* Max size of Telex Message (bytes) */
#define MaxHeaderSize 30 /* -- " -- Msg header for output(sym) */
#define HeaderSTRID 200 /* ID of STR-type resource:Telex Header*/
#define OKiconID 128 /* ID of ICN#-type rsrc: startup ICON */
#define BadIconID 129 /* --- " --- if installation failed */
/* Str "Chooser Name": 'STR ' #0 from AppleTalk ('DRVR' #9) */
#define HomeID (0xC000 + 0*0x800 + 9*0x20 + 0)
typedef struct { /* structure of one Message element */
NMRec q; /* Notification Manager Queue element */
unchar mess[MaxMessSize]; /* Message text to output (with Header)*/
short busy; /* flag: this element filled with a msg*/
} NoteBuf;
typedef struct { /* Listener Global data */
ATPParamBlock ReqBlock; /* AppleTalk GetRequest parameter block*/
ATPParamBlock RespBlock; /* AppleTalk SendResponse -- " -- */
short ReqSocket; /* Listener's socket */
NamesTableEntry NbpEntry; /* NBP names table entry for the socket*/
short RespWord; /* code to send as a response (OK,full)*/
BDSType BDSArray; /* data for sending a response */
NoteBuf NoteBlocks[Nnotes]; /* buffer for received messages */
char ReqBuff[256]; /* buffer for GetRequest (i.e. new msg)*/
char MessHeader[MaxHeaderSize]; /* msg header used for output*/
} Storage;