A
download bink.h
Language: C++
Copyright: Copyright 1991 Wynn Wagner III */ (C) 1986 Stephen Satchell. Copyright 1987-96, Bit Bucket Software Co.
LOC: 980
Project Info
BinkleyTerm XE(btxe)
Server: SourceForge
Type: cvs
...e\b\btxe\btxe\btnt\sources\
   Addr.cpp
   Addr.h
   aglcrc.cpp
   aglcrc.h
   asyn_lnx.cpp
   asyn_os2.cpp
   asyn_w32.cpp
   async.h
   asyos2v1.h
   b_banner.cpp
   b_bbs.cpp
   b_faxrcv.cpp
   b_flofil.cpp
   b_frproc.cpp
   b_help.cpp
   b_initva.cpp
   b_logs.cpp
   b_passwo.cpp
   b_proto.cpp
   b_rspfil.cpp
   b_sbinit.cpp
   b_script.cpp
   b_search.cpp
   b_sessio.cpp
   b_spawn.cpp
   b_term.cpp
   b_termov.cpp
   b_today.cpp
   b_wazoo.cpp
   b_whack.cpp
   b_wzsend.cpp
   banner.cpp
   banner.h
   BasicString.h
   bbs_ctra.cpp
   bbs_data.cpp
   bbs_incl.h
   bbs_io.cpp
   bink.h
   bink_asm.cpp
   binkdlg.cpp
   binkpipe.h
   box.h
   brec.cpp
   bsend.cpp
   bt.cpp
   btconfig.cpp
   btutil.cpp
   buffer.h
   cache.cpp
   cache.h
   callback.cpp
   callerid.cpp
   callwin.cpp
   callwin.h
   capi.cpp
   cfosline.cpp
   chat.cpp
   com.h
   com_dos.h
   com_lnx.h
   com_os2.h
   com_w32.h
   common.cpp
   cpuload.cpp
   css.cpp
   css.h
   data.cpp
   debug.cpp
   debug.h
   defines.h
   dosfuncs.cpp
   emsi.cpp
   emxmxcom.cpp
   evtparse.cpp
   evtsetup.cpp
   exceptio.cpp
   exceptio.h
   Exceptions.cpp
   Exceptions.h
   externs.h
   faxproto.h
   fcfgread.cpp
   fidomail.h
   file_all.cpp
   file_dos.cpp
   file_io.h
   file_lnx.cpp
   file_os2.cpp
   file_w32.cpp
   foffsets.h
   fossil.cpp
   freepoll.cpp
   ftsc.cpp
   gethcomm.h
   heap.cpp
   history.cpp
   history.h
   hydra.cpp
   hydra.h
   includes.cpp
   includes.h
   janus.cpp
   janus.h
   keybd.h
   keyfncs.h
   keymap.cpp
   langload.cpp
   language.h
   lngmagic.h
   m7rec.cpp
   m7send.cpp
   mailer.cpp
   mailovly.cpp
   mailroot.cpp
   maxcomm.h
   maxmcp.cpp
   maxmcp.h
   maxprm.cpp
   mdm_proc.cpp
   misc.cpp
   msgs.h
   Node.cpp
   Node.h
   NodeList.cpp
   NodeList.h
   nodeproc.cpp
   os2_pm.cpp
   outbound.cpp
   pipe.cpp
   pktmsgs.cpp
   pktmsgs.h
   protcomm.cpp
   prototyp.h
   recvbark.cpp
   recvsync.cpp
   sbuf.cpp
   sbuf.h
   sched.cpp
   sched.h
   script2.cpp
   SelfTest.cpp
   SelfTest.h
   sendbark.cpp
   sendsync.cpp
   squish.cpp
   squish.h
   srif.cpp
   statetbl.cpp
   stats.cpp
   stdafx.cpp
   stdafx.h
   timer.cpp
   timer.h
   times.cpp
   types.h
   v7debug.cpp
   version.cpp
   version7.cpp
   version7.h
   vfos_dos.cpp
   vfos_lnx.cpp
   vfos_os2.cpp
   vfos_qnx.cpp
   vfos_w32.cpp
   vfossil.h
   video.h
   vt100.cpp
   vt100.h
   xfer.h
   xmrec.cpp
   xmsend.cpp
   xstring.h
   yoohoo.cpp
   zmodem.cpp
   zmodem.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
/*---------------------------------------------------------------------------*
 *
 *                               BinkleyTerm
 *
 *              (C) Copyright 1987-96, Bit Bucket Software Co.
 *     For license and contact information see /doc/orig_260/license.260.
 *
 *           This version was modified by the BinkleyTerm XE Team.
 *        For contact information see /doc/team.lst and /doc/join.us.
 *  For a complete list of changes see /doc/xe_user.doc and /doc/xe_hist.doc.
 *
 * Filename    : $Source: /cvsroot/btxe/btnt/sources/bink.h,v $
 * Revision    : $Revision: 1.2 $
 * Tagname     : $Name:  $
 * Last updated: $Date: 2005/01/03 03:27:00 $
 * State       : $State: Exp $
 *
 * Description : Major definitions used in BinkleyTerm
 *
 *---------------------------------------------------------------------------*/

/* ------------------------------------------------------------------------ */
/* LEGIBLE SECTION.  Definitions to make "C" look like a real language.     */
/* ------------------------------------------------------------------------ */

#ifndef BINK_DEFINED
#define BINK_DEFINED

#ifndef max
	#define max(a,b)     ((a)>(b)?(a):(b))
#endif

#ifndef min
	#define min(a,b)     ((a)<=(b)?(a):(b))
#endif

/* updcrc macro derived from article Copyright (C) 1986 Stephen Satchell.
 *  NOTE: First argument must be in range 0 to 255.
 *        Second argument is referenced twice.
 *
 * Programmers may incorporate any or all code into their programs,
 * giving proper credit within the source. Publication of the
 * source routines is permitted so long as proper credit is given
 * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
 * Omen Technology. */

#define updcrc(cp, crc) ( crctab[((crc >> 8) & 255) ^ cp] ^ (crc << 8))

/* We need it the other way around for BinkleyTerm */
#define xcrc(crc,cp) ( crctab[((crc >> 8) & 255) ^ cp] ^ (crc << 8))

typedef unsigned bit;

#ifndef word
	typedef unsigned short word;
#endif

typedef unsigned char byte;

#define fallthrough

#define LOCAL        static
#define empty_str    ""

/* The following changes by Greylock Software, to facilitate the MEWEL
 * version of Bink. */

#define PRDCT_NM(m)     PrdctTbl[m]
#define POLL_POPUP

struct _lang_hdr
{
  short ElemCnt;
  short PoolSize;
};

struct _key_fnc
{
  short FncIdx;
  short ScanCode;
};

struct _key_fnc_hdr
{
  short KeyFncCnt;
  short *KeyFncAry;
  struct _key_fnc *KeyFncTbl;
};

typedef struct pnums
{
  char num[20];
  char pre[20];
  char suf[20];
  short len;
  struct pnums *next;
}
PN_TRNS;

typedef struct anums
{
  char *num;
  char *alt;
  struct anums *next;
}
ANUMS, *P_ANUMS;

typedef struct mnums
{
  byte mdm;
  char pre[50];
  char suf[50];
  char ascii[32];
  struct mnums *next;
}
MDM_TRNS;

/* Used to parse result codes. Filled in by user in BTCONFIG or
 * by default in B_INITVA. */

struct resp_str
{
  char *resp;
  unsigned disp;
};

/* structure of our config statements */
/*
   THIS STRUC IS OBSOLETE AND REMOVED! R.Hoerner jan 1997
   struct parse_list
   {
   char p_length;
   char *p_string;
   };

 */

/* Values for try_?_connect, definition in resp_str.disp. */

#define USER_BREAK     -9       /* user pressed ESC                    */
#define WAS_BUSY       -2       /* return "BUSY"                       */
#define WAS_INCOMING   -1       /* either "incoming call" or "cables"  */

/* modem results */

#define FAILURE     0           /* nothing happened, break             */
#define IGNORE      1           /* nothing important happend, continue */
#define CONNECTED   2           /* CONNECT seen                        */
#define INCOMING    3           /* NO DIALTONE seen when dialing: incoming call */
#define DIALRETRY   4           /* BUSY seen, try alternate number     */
#define RINGING     5           /* RING seen                           */
#define RING        6           /* RINGING seen,                       */
#define COSTRESET   7           /* A string that resets the cost       */
#define FAX        16           /* Fax starts at 16                    */
#define ZYXFAX     17           /* Fax or'ed with 1.                   */
#define FAX_RES1   18
#define FAX_RES2   20
#define FAX_RES3   24           /* last fax response!                  */


/*** VRP 20000615 start ***/

/*
 * AfterCall struct
 *
 */
 
struct modem_after_call
{
  struct modem_after_call *pnext;
  char                    *command;
  char                    *filter;
  int                      lines;
};

/*** VRP 20000615 end ***/


struct modem_commands           /* MR 970325 */
{
  int no_okcheck;               /* MR 970720 disable OK check       */
  char *init_setup;
  char *init[5];                /* Used to init modem (mailer)      */
  int init_cnt;                 /* MR 970310 multiple init commands */
  char *terminit[5];            /* Used to init modem (terminal)    */
  int terminit_cnt;             /* MR 970310 multiple init commands */
  char *answer_setup[5];        /* Send before answer is send       */
  int answer_setup_cnt;         /* MR 970503                        */
  char *answer;                 /* Answer a call                    */
  char *reject;                 /* reject incomming call            */
  char *busy;                   /* Take modem offhook               */
  char *hangup;                 /* Hang Up, do not reset modem!     */
  struct modem_after_call *paftercall; /*** VRP 20000615 ***/
  char *aftercallout;           /* Sent to modem after reject ???   */
  char *afterconnect;           /* Sent to modem after connect      */
  char *dial_setup;
  char *predial;                /* Pre-dial setup                   */
  char *postdial;               /* Post-dial cleanup                */
  char *normprefix;
  char *normsuffix;
};


struct prototable
{
  char first_char;
  short entry;
};

typedef struct j_types
{
  char j_match[30];
  struct j_types *next;
}
J_TYPES, *J_TYPESP;

/* mailtypes bit field definitions */

#define MAIL_CRASH     0x0001
#define MAIL_HOLD      0x0002
#define MAIL_DIRECT    0x0004
#define MAIL_NORMAL    0x0008
#define MAIL_REQUEST   0x0010
#define MAIL_WILLGO    0x0020
#define MAIL_TRIED     0x0040
#define MAIL_TOOBAD    0x0080
#define MAIL_UNKNOWN   0x0100
#define MAIL_COST      0x0200
#define MAIL_QSMALL    0x0400
#define MAIL_CANTDIAL  0x0800
#define MAIL_RES1000   0x1000
#define MAIL_RES2000   0x2000
#define MAIL_RES4000   0x4000
#define MAIL_RES8000   0x8000

typedef struct finfo
{
  int			info_size;
  char			curr_fossil;
  char			curr_rev;
  char *		id_string;
  unsigned int	ibufr;           /* TJW 961231 int -> unsigned int */
  unsigned int	ifree;           /* ""    I hope this is correct!  */
  unsigned int	obufr;           /* ""                             */
  unsigned int	ofree;           /* ""                             */
  byte			swidth;
  byte			sheight;
  char			baud;
}
FOSINFO;

typedef short (*PFI3) (short, short, short, short);

typedef struct
{
  unsigned short background;
  unsigned short settings;
  unsigned short history;
  unsigned short hold;
  unsigned short call;
  unsigned short file;
  unsigned short calling;
  unsigned short popup;
  unsigned short headers;       /* TJW 960428 2 more colors - like EE ! */
  unsigned short frames;        /* TJW 960428 2 more colors - like EE ! */
  unsigned short mw_sent;       /* MR 970310 again 2 more colors for modem win */
  unsigned short mw_rcvd;       /* MR 970310 again 2 more colors for modem win */
}
SB_COLORS;

/* ------------------------------------------------------------------------ */
/* Sealink and Telink header structure                                      */
/* ------------------------------------------------------------------------ */

#define HEADER_NAMESIZE  17

struct zero_block
{
  long size;                    /* file length                    */
  long time;                    /* file date/time stamp           */
  char name[HEADER_NAMESIZE];   /* original file name             */
  char moi[15];                 /* sending program name           */
  char noacks;                  /* for SLO                        */
};

/* ------------------------------------------------------------------------ */
/* NodeList.Sys                                                             */
/*                                                                          */
/*    NET > 0 and NODE > 0    Normal node                                   */
/*                                                                          */
/*    NET > 0 and NODE <= 0   Host node                                     */
/*                               Net host........node== 0                   */
/*                               Regional host...node==-1                   */
/*                               Country host....node==-2                   */
/*                                                                          */
/*    NET == -1      Nodelist.Sys revision                                  */
/*                                                                          */
/*    NET == -2      Nodelist statement                                     */
/*                                                                          */
/* ------------------------------------------------------------------------ */

/* ------------------------------------------------------------------------ */
/* NODE                                                                     */
/* Please note the NewStyle structure (below).  Time is running out for the */
/* existing `_node' structure!  Opus currently uses the old style node      */
/* structure, but not for long.                                             */
/* ------------------------------------------------------------------------ */

struct _node
{
  short number;                 /* node number                              */
  short net;                    /* net number                               */
  short cost;                   /* cost of a message to this node           */
  short rate;                   /* baud rate                                */
  char name[20];                /* node name                                */
  char phone[40];               /* phone number                             */
  char city[40];                /* city and state                           */
};

/* ------------------------------------------------------------------------ */
/* THE NEWSTYLE NODE LIST IS NOW BEING USED BY OPUS 1.10                    */
/* ------------------------------------------------------------------------ */

class SNode
{
public:
	word	NetNumber;
	word	NodeNumber;
	word	Cost;                    /* cost to user for a message */
	char	SystemName[34];          /* node name */
	char	PhoneNumber[40];         /* phone number */
	char	MiscInfo[30];            /* city and state */
	char	Password[8];             /* WARNING: not necessarily null-terminated */
	word	RealCost;                /* phone company's charge */
	word	HubNode;                 /* this node's hub, or point number if a point */
	byte	BaudRate;                /* baud rate divided by 300 */
	byte	ModemType;               /* RESERVED for modem type */
	word	NodeFlags;               /* set of flags (see below) */
	short	online_start;           /* online start hour AW990321 */
	short	online_end;             /* online end hour AW990321 */

	void Clear()
	{
		memset(this, 0, sizeof(*this));
	}

	void SetSystemName(LPCSTR str)
	{
		memcpy(SystemName, str, strlen(str));
	}

	void SetPhoneNumber(LPCSTR str)
	{
		memcpy(PhoneNumber, str, strlen(str));
	}

	void SetPassword(LPCSTR str)
	{
		memcpy(Password, str, strlen(str));
	}

};

/* ------------------------------------------------------------------------ */
/* nodex.ndx                                                                */
/*                                                                          */
/* Version 7 Nodelist Index structure.  This is a 512-byte record, which    */
/* is defined by three structures:  Record 0 is the Control Record, then    */
/* some number of Leaf Node (LNode) Records, then the Index Node (INode)    */
/* Records.  This defines an unbalanced binary tree.                        */
/*                                                                          */
/* This description is based on Scott Samet's CBTREE.PAS program.           */
/*                                                                          */
/* ------------------------------------------------------------------------ */

struct _ndx
{
  union
  {
    struct _CtlBlk
    {
      word CtlBlkSize;          /* Blocksize of Index Blocks   */
      long CtlRoot;             /* Block number of Root        */
      long CtlHiBlk;            /* Block number of last block  */
      long CtlLoLeaf;           /* Block number of first leaf  */
      long CtlHiLeaf;           /* Block number of last leaf   */
      long CtlFree;             /* Head of freelist            */
      word CtlLvls;             /* Number of index levels      */
      word CtlParity;           /* XOR of above fields         */
    }
    CtlBlk;

    struct _INodeBlk
    {
      long IndxFirst;           /* Pointer to next lower level */
      long IndxBLink;           /* Pointer to previous link    */
      long IndxFLink;           /* Pointer to next link        */
      short IndxCnt;            /* Count of Items in block     */
      word IndxStr;             /* Offset in block of 1st str  */

      /* If IndxFirst is NOT -1, this is INode:          */
      struct _IndxRef
      {
        word IndxOfs;           /* Offset of string into block */
        word IndxLen;           /* Length of string            */
        long IndxData;          /* Record number of string     */
        long IndxPtr;           /* Block number of lower index */
      }
#ifndef PORTABLEBINFILES
      IndxRef[20];
#else
      IndxRef[42];              /* make sure there is enough space */
#endif
    }
    INodeBlk;

    struct _LNodeBlk
    {
      /* IndxFirst is -1 in LNodes   */
      long IndxFirst;           /* Pointer to next lower level */
      long IndxBLink;           /* Pointer to previous link    */
      long IndxFLink;           /* Pointer to next link        */
      short IndxCnt;            /* Count of Items in block     */
      word IndxStr;             /* Offset in block of 1st str  */
      struct _LeafRef
      {
        word KeyOfs;            /* Offset of string into block */
        word KeyLen;            /* Length of string            */
        long KeyVal;            /* Pointer to data block       */
      }
#ifndef PORTABLEBINFILES
      LeafRef[30];
#else
      LeafRef[62];              /* make sure there is enough space */
#endif
    }
    LNodeBlk;

    char RawNdx[512];

  }
  ndx;
};

/* ------------------------------------------------------------------------ */
/*                                                                          */
/* OPUS 1.20 Version 7 Nodelist structure. Copyright 1991 Wynn Wagner III   */
/* and Doug Boone. Used by permission.                                      */
/*                                                                          */
/* ------------------------------------------------------------------------ */

struct _vers7
{
  short Zone;
  short Net;
  short Node;
  short HubNode;                /* If a point, this is point number. */
  word CallCost;                /* phone company's charge */
  word MsgFee;                  /* Amount charged to user for a message */
  word NodeFlags;               /* set of flags (see below) */
  byte ModemType;               /* RESERVED for modem type */
  byte Phone_len;
  byte Password_len;
  byte Bname_len;
  byte Sname_len;
  byte Cname_len;
  byte pack_len;
  byte BaudRate;                /* baud rate divided by 300 */
};

/* ------------------------------------------------------------------------ */
/* Values for the `NodeFlags' field                                         */
/* ------------------------------------------------------------------------ */

#define B_hub    0x0001         /* node is a net hub      0000 0000 0000 0001 */
#define B_host   0x0002         /* node is a net host     0000 0000 0000 0010 */
#define B_region 0x0004         /* node is region coord   0000 0000 0000 0100 */
#define B_zone   0x0008         /* is a zone gateway      0000 0000 0000 1000 */
#define B_CM     0x0010         /* runs continuous mail   0000 0000 0001 0000 */
#define B_res1   0x0020         /* reserved by Opus       0000 0000 0010 0000 */
#define B_res2   0x0040         /* reserved by Opus       0000 0000 0100 0000 */
#define B_res3   0x0080         /* reserved by Opus       0000 0000 1000 0000 */
#define B_res4   0x0100         /* reserved by Opus       0000 0001 0000 0000 */
#define B_res5   0x0200         /* reserved for non-Opus  0000 0010 0000 0000 */
#define B_res6   0x0400         /* reserved for non-Opus  0000 0100 0000 0000 */
#define B_res7   0x0800         /* reserved for non-Opus  0000 1000 0000 0000 */
#define B_point  0x1000         /* node is a point        0001 0000 0000 0000 */
#define B_res9   0x2000         /* reserved for non-Opus  0010 0000 0000 0000 */
#define B_resa   0x4000         /* reserved for non-Opus  0100 0000 0000 0000 */
#define B_resb   0x8000         /* reserved for non-Opus  1000 0000 0000 0000 */


/* nodex.dtp (v7+) */

#ifndef dword
typedef unsigned long dword;
#endif

#define DWORD_DEFINED

typedef struct _DTPCtl
{
  word size;                    /* Size of this control structure */
  byte version;                 /* Version of DTP file */
  byte AllFixSize;              /* sizeof(_DTPAllLnk) */
  byte AddFixSize;              /* sizeof(_DTPNodeLnk) */
} DTPCTL;

typedef struct _DTPAllLnk
{
  word Region;                  /* Region, 0 if none */
  word Hub;                     /* Hub, 0 if none */
  dword SOfs;                   /* DAT offset of next Same Sysop entry, 0xffffffff if none */
  dword POfs;                   /* DAT offset of next Same Phone entry, 0xffffffff if none */
  dword FeOfs;                  /* DAT offset of next "Equal Fido Level" entry, 0xffffffff if none */
  byte Sn;                      /* Number (0 based) of Sysop entry (ADR order) */
  byte Pn;                      /* Number (0 based) of Phone entry (ADR order) */
} DTPALLLNK;

typedef struct _DTPNodeLnk
{
  word ndowns;                  /* number of system in lower level ("downlinks") */
  dword FlOfs;                  /* DAT offset of "Lower Fido Level" - first "downlink" */
} DTPNODELNK;

typedef struct
{
	DTPCTL		control;
	DTPNODELNK	TopLink;
} DTPHEADER;

/* ------------------------------------------------------------------------ */
/* Nodelist.Idx                                                             */
/* (File is terminated by EOF)                                              */
/* ------------------------------------------------------------------------ */

struct _ndi
{
  short node;                   /* node number  */
  short net;                    /* net number   */
};

/* ------------------------------------------------------------------------ */
/* QuickBBS 2.00 QNL_IDX.BBS                                                */
/* (File is terminated by EOF)                                              */
/* ------------------------------------------------------------------------ */

struct QuickNodeIdxRecord
{
  unsigned short QI_Zone;
  unsigned short QI_Net;
  unsigned short QI_Node;
  byte QI_NodeType;
};

/* ------------------------------------------------------------------------ */
/* QuickBBS 2.00 QNL_DAT.BBS                                                */
/* (File is terminated by EOF)                                              */
/* ------------------------------------------------------------------------ */

struct QuickNodeListRecord
{
  byte QL_NodeType;
  unsigned short QL_Zone;
  unsigned short QL_Net;
  unsigned short QL_Node;
  char QL_Name[21];             /* Pascal! 1 byte count, up to 20 chars */
  char QL_City[41];             /* 1 + 40 */
  char QL_Phone[41];            /* 1 + 40 */
  char QL_Password[9];          /* 1 + 8 */
  word QL_Flags;                /* Same as flags in new nodelist structure */
  word QL_BaudRate;
  word QL_Cost;
};

/* SEAdog NETLIST.DOG format */

struct netls
{
  short netnum;
  char netname[14];
  char netcity[40];
  short havehost;
  short nethost;
  short havegate;
  short netgate;
  long nodeptr;
  short numnodes;
};

/* SEAdog NODELIST.DOG format */

struct nodels
{
  short nodenum;
  char nodename[14];
  char nodecity[40];
  char nodephone[40];
  short havehub;
  short nodehub;
  short nodecost;
  short nodebaud;
};

/* Things most nodelists don't contain, but Binkley likes to have */

struct extrastuff
{
  char password[8];
  unsigned short flags1;
  byte modem;
  char extra[5];                /* for future expansion */
};

/* Format of a XMODEM block */

typedef struct
{
  unsigned char header;
  unsigned char block_num;
  unsigned char block_num_comp;
  unsigned char data_bytes[128];
  unsigned char data_check[2];
}
XMDATA, *XMDATAP;

/* Format of Telink block 0 */

typedef struct
{
  unsigned char header;
  unsigned char block_num;
  unsigned char block_num_comp;
  long filelength;

  union
  {
    struct
    {
      unsigned short time;
      unsigned short date;
    }
    twowords;

    struct
    {
      unsigned long timedate;
    }
    oneword;
  }
  filetime;

  char filename[16];
  char nullbyte;
  char sendingprog[15];
  char noacks;
  unsigned char crcmode;
  char fill[86];
  unsigned char data_check[2];
}
TLDATA, *TLDATAP;

/* Format of SEAlink block 0 */

typedef struct
{
  unsigned char header;
  unsigned char block_num;
  unsigned char block_num_comp;
  long filelength;
  unsigned long timedate;
  char filename[17];
  char sendingprog[15];
  char SLO;
  char Resync;
  char MACFLOW;
  char fill[85];
  unsigned char data_check[2];
}
SEADATA, *SEADATAP;

typedef struct
{
  unsigned int SEAlink:1;       /* Can do SEAlink */
  unsigned int SLO:1;           /* Can do SEAlink with Overdrive */
  unsigned int Resync:1;        /* Can do SEAlink with Resync */
  unsigned int MacFlow:1;       /* Can do SEAlink with Macintosh flow control */
  unsigned int do_CRC:1;        /* Should do CRC instead of checksum */
  unsigned int TeLink:1;        /* We saw a TeLink header */
}
TRANS, *TRANSP;

typedef struct
{
  char *state_name;
  short (*state_func) (void *);
}
STATES, *STATEP;

typedef struct
{
  long control;                 /* We will always have a long on top */
  long filler;                  /* Just to be sure. Min size, 8 bytes */
}
STATEBASE, *STATEBASEP;

typedef struct
{
  long control;                 /* These must always start with a long! */
  TRANS options;                /* Transfer options */
  short result;                 /* Result from last operation */
  short sub_results;            /* Extra result codes */
  long T1;                      /* General purpose timer */
  long T2;                      /* General purpose timer */
  short Window;                 /* SEAlink window size */
  long SendBLK;                 /* Current block to be sent */
  long NextBLK;                 /* Next block we will try to send */
  long ACKBLK;                  /* Block that was last ACK'd */
  long LastBlk;                 /* Last block in file */
  long ARBLK;                   /* Used in ACK Check calculations */
  long WriteBLK;                /* Block number to write to file */
  long filelen;                 /* Length of file being sent */
  long curr_byte;               /* Current byte offset of sending or receiving */
  long prev_bytes;              /* Bytes that we are resyncing over */
  long total_blocks;            /* Total number of blocks in file to be received */
  long resync_block;            /* Block number we received to resync to */
  short NumNAK;                 /* Number of NAK's received this block */
  short ACKsRcvd;               /* Number of ACK's received since file start */
  short ACKST;                  /* Current state of the ack/nak state variable */
  short tries;                  /* Number of tries thus far */
  short goodfile;               /* 0 if file was bad, 1 if file was good */
  short datalen;                /* Length of data in this block */
  short recblock;               /* Block number received */
  short sent_ACK;               /* Whether or not we sent an ACK already */
  short tot_errs;               /* Total number of errors */
  unsigned char ARBLK8;         /* 8 bit value of ARBLK */
  unsigned char blocknum;       /* 8 bit value of SendBLK */
  unsigned char check;          /* checksum value */
  unsigned char save_header;    /* Received header from first block */
  short CHR;                    /* General purpose receive character */

  union                         /* File date and time in Telink or SEAlink format */
  {
    struct
    {
      unsigned short time;
      unsigned short date;
    } twowords;

    struct
    {
      unsigned long timedate;
    } oneword;
  }
  save_filetime;

  char received_name[20];       /* Received filename from Telink or SEAlink */
  char m7name[12];              /* Filename in Modem7 format */
  char sending_program[16];     /* Sending program name */
  char *filename;               /* The filename to be sent or received */
  char *path;                   /* Just the path to the file to be sent/received */
  char *fptr;                   /* Pointer into character fields */
  char *temp_name;              /* Temporary name for receiving */
  FILE *file_pointer;           /* The pointer for read/write/seek operations */

  unsigned char header;
  unsigned char block_num;
  unsigned char block_num_comp;
  unsigned char data[128];
  unsigned char data_check[2];
}
XMARGS, *XMARGSP;

#define DID_RESYNC 1

typedef struct
{
	long control;                 /* These must always start with a long! */
	short tries;
	short barklen;
	short barkok;
	long T1;
	short nfiles;
	char *inbound;
	char *filename;
	char barkpacket[128];
	char *barkpw;
	char *barktime;
} BARKARGS, *BARKARGSP;

/* ------------------------------------------------------------------------ */
/* FIDONET ADDRESS STRUCTURE                                                */
/* ------------------------------------------------------------------------ */

struct ADDR
{
	word	Zone;
	word	Net;
	word	Node;
	word	Point;
	char	*Domain;
};

typedef struct _DOMAINKLUDGE
{
	word zone;
	word domain;
} DOMAINKLUDGE;

typedef struct mail
{
  ADDR mail_addr;               /* Addressee */
  unsigned short numfiles;      /* Total number of packets and files      */
  unsigned short mailtypes;     /* Bitmask of types we have for addressee */
  unsigned long mailsize;       /* Total amount of mail for addressee     */
  unsigned long req_size;       /* Amount of mail that is requests        */
  unsigned long callsize;       /* Amount of mail that isn't on hold      */
  unsigned long oldest;         /* time_t of oldest mail                  */

  union
  {
    struct
    {
      struct mail *next;
      struct mail *prev;
    }
    ptrnp;

    struct
    {                           /* these values are stored in btrescan.dmp */
      byte listed;              /* if ever the struct of btrescan.dmp      */
      byte ModemType;           /* changes, move these values into         */
      word NodeFlags;           /* struct dumpmail!                        */
      word RealCost;
      byte online_start6;
      byte online_end6;
    }
    value;
  }
  ptrval;
} MAIL, *MAILP;

typedef struct dumpmail         /* TJW 960721 struct dumped to btrescan.dmp */
{
  MAIL mail;
  char Domain[8];
}
DUMPMAIL, *DUMPMAILP;

typedef int (*nfunc) (ADDR *, int);
typedef void (*ufunc) (char *, ADDR *);

#define MAX_EXTERN  8

#define ALIAS_CNT   100         /* CE 960413 (was 25) */
#define DOMAINS     50          /* r. hoerner 1/6/97 */

/* ------------------------------------------------------------------------ */
/* Matrix mask                                                              */
/* Undefined bits are reserved by Opus                                      */
/* ------------------------------------------------------------------------ */

#define NO_TRAFFIC  0x0001
#define LOCAL_ONLY  0x0002
#define OPUS_ONLY   0x0004

#define NO_EXITS    0x2000
#define MAIL_ONLY   0x4000
#define TAKE_REQ    0x8000

/* ------------------------------------------------------------------------ */
/* Message packet header                                                    */
/* ------------------------------------------------------------------------ */

#define PKTVER  2

/* ------------------------------------------ */
/* POSSIBLE VALUES FOR `product' (below)      */
/*                                            */
/* NOTE: These product codes are assigned by  */
/* the FidoNet<tm> Technical Standards Com-   */
/* mittee.  If you are writing a program that */
/* builds packets, you will need a product    */
/* code.  Please use ZERO until you get your  */
/* own.  For more information on codes, write */
/* to FTSC at 115/333.                        */
/* ------------------------------------------ */

#define isFIDO      0
#define isANXCLO    4
#define isOPUS      5
#define isIGOR      65
#define isTIMS      66
#define isBITBRAIN  0x1b
#define isDBRIDGE   0x1d
#define isMILQUE    0xac

#ifndef PRDCT_CODE
#define PRDCT_CODE      isBITBRAIN
#endif

#ifndef PRDCT_MAJOR
#define PRDCT_MAJOR     2
#endif

#ifndef PRDCT_MINOR
#define PRDCT_MINOR     60
#endif

#ifndef PRDCT_PRFX
#define PRDCT_PRFX      "BINKLEY"
#endif

#ifndef PRDCT_PRFXlower
#define PRDCT_PRFXlower "binkley"
#endif

#ifndef PRDCT_PRTY
#define PRDCT_PRTY      "BinkleyTerm"
#endif

#ifndef PRD_SH_PRTY
# if defined(OS_2)
#   define PRD_SH_PRTY  "BT/2"
# elif defined(_WIN32)
#   define PRD_SH_PRTY  "BT/Win32"
# elif defined(__linux__)
#   define PRD_SH_PRTY  "BT/Linux"
# elif defined(__QNXNTO__)
#   define PRD_SH_PRTY  "BT/QNX6"
# elif defined(__unix__)
#   define PRD_SH_PRTY  "BT/Unix"
# else
#   define PRD_SH_PRTY  "BT"
# endif
#endif

#ifndef PRDCT_SHRT
# define PRDCT_SHRT     "Bink"
#endif

#ifndef PRDCT_VRSN
# define PRDCT_VRSN     "2.60XE"  /* TJW 960413 */
#endif

struct _pkthdr
{
  short orig_node;              /* originating node               */
  short dest_node;              /* destination node               */
  short year;                   /* 0..99  when packet was created */
  short month;                  /* 0..11  when packet was created */
  short day;                    /* 1..31  when packet was created */
  short hour;                   /* 0..23  when packet was created */
  short minute;                 /* 0..59  when packet was created */
  short second;                 /* 0..59  when packet was created */
  short rate;                   /* destination's baud rate        */
  short ver;                    /* packet version, must be 2      */
  short orig_net;               /* originating network number     */
  short dest_net;               /* destination network number     */
  char product;                 /* product type                   */
  char serial;                  /* serial number (some systems)   */

  byte password[8];             /* session/pickup password        */
  short orig_zone;              /* originating zone               */
  short dest_zone;              /* Destination zone               */
  byte B_fill2[16];
  long B_fill3;
};

struct _pkthdr45                /* FSC-0045 (2.2) packet type     */
{
  short orig_node;              /* originating node               */
  short dest_node;              /* destination node               */
  short orig_point;             /* originating point              */
  short dest_point;             /* destination point              */
  byte b_fill1[8];              /* Unused, must be zero           */
  short subver;                 /* packet subversion, must be 2   */
  short ver;                    /* packet version, must be 2      */
  short orig_net;               /* originating network number     */
  short dest_net;               /* destination network number     */
  char product;                 /* product type                   */
  char serial;                  /* serial number (some systems)   */

  byte password[8];             /* session/pickup password        */
  short orig_zone;              /* originating zone               */
  short dest_zone;              /* Destination zone               */
  byte orig_domain[8];          /* originating domain             */
  byte dest_domain[8];          /* destination domain             */
  long B_fill3;
};

struct _pkthdr39                /* FSC-0039 packet type           */
{
  short orig_node;              /* originating node               */
  short dest_node;              /* destination node               */
  short year;                   /* 0..99  when packet was created */
  short month;                  /* 0..11  when packet was created */
  short day;                    /* 1..31  when packet was created */
  short hour;                   /* 0..23  when packet was created */
  short minute;                 /* 0..59  when packet was created */
  short second;                 /* 0..59  when packet was created */
  short rate;                   /* destination's baud rate        */
  short ver;                    /* packet version, must be 2      */
  short orig_net;               /* originating network number     */
  short dest_net;               /* destination network number     */
  byte product_low;             /* FTSC product type (low byte)   */
  byte prod_rev_low;            /* product rev (low byte)         */

  byte password[8];             /* session/pickup password        */
  short zone_ignore[2];         /* Zone info from other software  */
  byte B_fill1[2];
  short CapValid;               /* CapWord with bytes swapped.    */
  byte product_hi;              /* FTSC product type (high byte)  */
  byte prod_rev_hi;             /* product rev (hi byte)          */
  short CapWord;                /* Capability word                */
  short orig_zone;              /* originating zone               */
  short dest_zone;              /* Destination zone               */
  short orig_point;             /* originating point              */
  short dest_point;             /* destination point              */
  long ProdData;                /* Product-specific data          */
};

/* ------------------------------------------------------------------------ */
/* WaZOO                                                                    */
/* ------------------------------------------------------------------------ */

#ifndef ACK
#define ACK    0x06
#endif

#ifndef NAK
#define NAK    0x15
#endif

#ifndef ENQ
#define ENQ    0x05
#endif

#ifndef YOOHOO
#define YOOHOO 0x00f1
#endif

#ifndef TSYNC
#define TSYNC  0x00ae
#endif

struct _Hello
{
  word signal;                  /* always 'o'     (0x6f)                   */
  word hello_version;           /* currently 1    (0x01)                   */
  word product;                 /* product code                            */
  word product_maj;             /* major revision of the product           */
  word product_min;             /* minor revision of the product           */
  char my_name[60];             /* Other end's name                        */
  char sysop[20];               /* sysop's name                            */
  word my_zone;                 /* 0== not supported                       */
  word my_net;                  /* out primary net number                  */
  word my_node;                 /* our primary node number                 */
  word my_point;                /* 0== not supported                       */
  byte my_password[8];          /* ALL 8 CHARACTERS ARE SIGNIFICANT !!!!!  */
  byte reserved2[8];            /* reserved by Opus                        */
  word capabilities;            /* see below                               */
  byte reserved3[12];           /* available to non-Opus                   */
  /* systems by prior "approval" of 124/108. */
};                              /* size 128 bytes */

/* ------------------------------------------------------------------------ */
/* YOOHOO<tm> CAPABILITY VALUES                                             */
/* ------------------------------------------------------------------------ */

#define Y_DIETIFNA  0x0001
#define FTB_USER    0x0002
#define ZED_ZIPPER  0x0004
#define ZED_ZAPPER  0x0008
#define DOES_IANUS  0x0010
#define DOES_HYDRA  0x0020
#define Bit_6       0x0040
#define DIR_ZAPPER  0x0080      /* TJW970714 only used internally! */
#define Bit_8       0x0100
#define Bit_9       0x0200
#define Bit_a       0x0400
#define Bit_b       0x0800
#define Bit_c       0x1000
#define Bit_d       0x2000
#define DO_DOMAIN   0x4000
#define WZ_FREQ     0x8000

/* ------------------------------------------------------------------------ */
/* EMSI                                                                     */
/* ------------------------------------------------------------------------ */

/* Indexes into the emsistr array for use by EMSI parsing */

#define EMSI_REQ   0
#define EMSI_DAT   1
#define EMSI_HBT   2
#define EMSI_NAK   3
#define EMSI_ACK   4
#define EMSI_INQ   5
#define EMSI_CLI   6

#define EMSI_LEN   14           /* longest emsi string */
#define EMSI_MAX   6            /* highest emsi string */

/* ------------------------------------------------------------------------ */
/* TJW 960505 PRIORITY CONSTANTS for set_prior(priority)                    */
/* ------------------------------------------------------------------------ */

#define PRIO_NORMAL  1          /* used for non critical actions and when spawning external programs */
#define PRIO_REGULAR 2          /* used when waiting for call */
#define PRIO_JANUS   3          /* used when transfering data with janus */
#define PRIO_MODEM   4          /* used when communicating with the modem */
#define PRIO_HYDRA   5          /* used when transfering data with hydra */

/* ------------------------------------ */
/* TE 960518 TYPE OF FILE REQUEST INDEX */
/* ------------------------------------ */

#define FRI_MAXIMUS  0
#define FRI_PROBOARD 1

#define E_INPUT_LEN 512         /* TJW 960708 size of array e_input[] */

/* ----------------------------- */
/* CFS 961020 STRING REPLACEMENT */
/* ----------------------------- */

struct SStringRep
{
  char *change;
  char *replacement;
  int frommodem;
};

#ifdef _WIN32                   /* AS: 970624, avoid compiler warning. (CALLBACK is defined as __stdcall in windef.h) */
#undef CALLBACK
#endif

/* R. Hoerner, possible flags for NODESTRUC */

#define NOEMSI   0x00001UL      /* "NoEMSI <nodenumber>"     OUTBOUND CALLS    */
#define NOWAZOO  0x00002UL      /* "NoWazoo <nodenumber>"    OUTBOUND CALLS    */
#define NOHYDRA  0x00004UL      /* "NoHydra <nodenumber>"    IN/OUTBOUND CALLS */
#define NOJANUS  0x00008UL      /* "NoJanus <nodenumber>"    IN/OUTBOUND CALLS */
#define NOREQ    0x00010UL      /* "NoReqests <nodenumber>"  INBOUND     CALLS */
#define NODIET   0x00020UL      /* "NoDietIFNA <nodenumber>" OUTBOUND CALLS    */
#define FREEREQ  0x00040UL      /* "ReqOnUs <nodenumber>"    IN/OUTBOUND CALLS */
#define NOZED    0x00080UL      /* "NoZedZap <nodenumber>"   IN/OUTBOUND CALLS */
#define NOSEA    0x00100UL      /* "NoSeaLink <nodenumber>"  IN/OUTBOUND CALLS */
#define NOPICK   0x00200UL      /* "NoPickup <nodenumber>"   IN/OUTBOUND CALLS */
#define NOHYCHAT 0x00400UL      /* "NoHydraChat <nodenumber>"IN/OUTBOUND CALLS */
#define DO_BELL  0x00800UL      /* "Gong <nodenumber>"        node x calls: bimmeling */
#define NOJOKERS 0x01000UL      /* "NoWildCards <nodenumber>" node may not freq "*.*" */
#define FREEPOLL 0x02000UL      /* "FreePoll <nodenumber>"   IN/OUTBOUND CALLS */
#define CALLBACK 0x04000UL      /* "CallBack <nodenumber>"   INBOUND CALLS */
#define TIMESYNC 0x08000UL      /* "TimeSync <nodenumber>"   IN/OUTBOUND CALLS */
#define NOZIP    0x10000UL      /* "NoZedZip <nodenumber>"   IN/OUTBOUND CALLS */

#define AT_NETMAIL   1
#define AT_ECHOMAIL  2
#define AT_OTHER     4

/* MR 970311 moved some parts to NODESTRUC, access via NODESTRUC */

typedef struct _FP              /* CE 15.04.96 Configline for FreePoll */
{
  long			Size;                    /* limit in KB */
  time_t		Delta_T;               /* max delta time for freepoll override */
  time_t		MinDelta_T;            /* MR 970810 min delta time for override */
  short			AttachType;             /* Bit-mapped struct - CFS 970504 */
  int			and_op;                   /* =1 -> AND op, =0 -> OR op */
  struct _FP *	next;
}
FP, *FPP;

typedef struct _CIDLST
{
  char *CallerID;
  struct _CIDLST *next;
}
CIDLST, *CIDLSTP;

/* ---------------------------------------------------------------------- */
/* Address structure for linked list of remote nodes (unlimited!)         */
/* ---------------------------------------------------------------------- */

typedef struct _NODESTRUC
{
  ADDR addr;                    /* MR 970314 */
  CIDLSTP CallerIDList;         /* caller ID list */
  long Flags;
  FPP FPoll;
  char *ExtraDir;               /* *MUST* be backslash-terminated */
  char *ExtraDirIn;             /* *MUST* be backslash-terminated */
  int ExtraDirHold;
  int ExtraDirNotify;
  int SyncHydraSessions;
  long tzutc;                   /* AW 980208 diff in seconds from UTC */
  struct _NODESTRUC *next;
}
NODESTRUC, *PNODESTRUC;

/* ---------------------------------------------------------------------- */
/* Address structure for linked list of AKAS (unlimited AKAs!)            */
/* ---------------------------------------------------------------------- */

typedef struct _AKA
{
	word			Zone;
	word			Net;
	word			Node;
	word			Point;
	char			*Domain;
	_AKA			*next;
} AKA, *PAKA;

/* ---------------------------------------------------------------------- */
/* Structure for linked list of regions                                   */
/* ---------------------------------------------------------------------- */

typedef struct _AKREGION
{
  word Zone;
  char *Region;
  struct _AKREGION *next;
}
AKREGION, *AKPREGION;

/* ---------------------------------------------------------------------- */
/* structure for linked list of overrides                                 */
/* ---------------------------------------------------------------------- */

typedef struct _phones
{
  word Zone;
  word Net;
  word Node;
  word Point;
  char *Domain;
  char *num;
  word modem;
  word fido;
  struct _phones *next;
}
PHONE, *PPHONE;

/* ---------------------------------------------------------------------- */
/* structure for linked list of online times - VRP 990820                 */
/* ---------------------------------------------------------------------- */

typedef struct _online_time
{
  word Zone;
  word Net;
  word Node;
  word Point;
  char *Domain;
  short start;
  short end;
  short days;
  struct _online_time *next;
}
ONLINE_TIME, *PONLINE_TIME;

/* ---------------------------------------------------------------------- */
/* structure for linked list of hidden lines - VRP 990820                 */
/* ---------------------------------------------------------------------- */

typedef struct _hidden_line
{
  char *num;
  word modem;
  word fido;
  short start;
  short end;
  short days;
  struct _hidden_line *next;
} HIDDEN_LINE, *PHIDDEN_LINE;

typedef struct _hidden
{
  word Zone;
  word Net;
  word Node;
  word Point;
  char *Domain;
  struct _hidden_line *current;
  struct _hidden_line *hidden_line1;
  struct _hidden *next;
} HIDDEN, *PHIDDEN;

/* ---------------------------------------------------------------------- */
/* structure for reports to PKT - CFS 970209                              */
/* ---------------------------------------------------------------------- */

typedef struct _pktrep
{
  ADDR from, to;
  int toecho;
  char echo[65];
  char password[9];
}
PKTREP, *PPKTREP;

/* ---------------------------------------------------------------------- */
/* structure for long stats reports                                       */
/* ---------------------------------------------------------------------- */

typedef struct _lstats
{
  char *name;
  PKTREP pktr;
  int alllines;                 /* 0=only this task, other=all tasks */
  int coverage;                 /* This week, this year, etc */
  long days;                    /* Number of days to cover, if coverage==DAYS_FIXED; */
  struct _lstats *next;
}
LSTATS, *PLSTATS;

/* error values for config / event file parsers */

typedef enum _keyword_errors
{
  kwd_ok,
  kwd_bad,
  kwd_unknown,
  kwd_nomem,
  kwd_other_err
}
KWD_ERR;

/* error values for mailer sessions */

typedef enum _mailsession_errors
{
  mission_ok,
  mission_error,
  mission_aborted,
  mission_timeout
}
MISSION_ERR;

typedef struct
{
  char id[40];
  char **sysop;
  word sysopcount;
  char **system;
  word systemcount;
  char **location;
  word locationcount;
}
RANDOM_SYSTEM;


/* AW980220 array struct of priv<->classname relations for */
/* Maximus 2.x/3.x file request index                      */

struct _max_classname
{
  word priv;
  char *classname;
};

#endif /* BINK_DEFINED */

/* $Id: bink.h,v 1.2 2005/01/03 03:27:00 vildanov Exp $ */

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us