home *** CD-ROM | disk | FTP | other *** search
- /* peeker.h file*/
-
- #include "mem.h"
- #include "errno.h"
- #include "io.h"
- #include "fcntl.h"
- #include "dos.h"
- #include "dir.h"
- #include "stdio.h"
- #include "string.h"
- #include "stdlib.h"
- #include "ctype.h"
- #include "time.h"
- #include "stddef.h"
- #include "process.h"
- #include "share.h"
- #include "alloc.h"
- #include "stdarg.h"
- #include <sys/types.h>
- #include <sys/stat.h>
-
- #ifdef __TURBOC__
- #define _fastcall pascal
- #endif
-
- #define BACKSPACE "\b \b"
- #define MAXCOLORS 26
-
- typedef unsigned bit;
- typedef unsigned int word;
- typedef unsigned char byte;
- typedef unsigned long ulong;
-
- #define CSendByte(x) if(baud) while(!fossil(TRANSMIT,(x))) carrchk()
- #define PurgeOut() if(baud) fossil(PURGEOUT,0)
- #define PurgeIn() if(baud) fossil(PURGEIN,0)
- #define FlushOut() if(baud) fossil(FLUSHOUT,0)
- #define DTROn() fossil(DTR,UP)
- #define DTROff() fossil(DTR,DOWN)
-
- /*-------------------------------------------------------------------------*/
- /* FBoard flags */
- /*-------------------------------------------------------------------------*/
- #define COUNTDLS 0x0001 /* Use timestamp as #dls 0000 0000 0000 0001 */
- #define FREEFILES 0x0002 /* Don't inc downloads 0000 0000 0000 0010 */
- #define FILEASSOC 0x0004 /* File area allows assoc 0000 0000 0000 0100 */
- #define FREEUP 0x0008 /* Don't inc uploads 0000 0000 0000 1000 */
-
- /*--------------------------------------------------------------------------*/
- /* File area record */
- /*--------------------------------------------------------------------------*/
-
- struct _fboard {
- char name[47];
- char flags;
- char dpath[79];
- char upath[79];
- signed char age;
- word userflags;
- char leechpercent;
- };
-
- /*--------------------------------------------------------------------------*/
- /* Protocol record */
- /*--------------------------------------------------------------------------*/
-
- struct protocol {
- char name[25];
- char key;
- int adj;
- char spawndn[119];
- char spawnup[119];
- char abort[48];
- unsigned wild: 1;
- unsigned multi: 1;
- unsigned simul: 1;
- unsigned list: 1;
- unsigned opus: 1;
- unsigned noname: 1;
- unsigned reserved: 2;
- char pad1;
- char pad2;
- };
-
-
- /*=====================================================================*/
- /* FOSSIL definitions */
- /*=====================================================================*/
-
- #define SETBAUD 0
- #define TRANSWAIT 1
- #define RECVWAIT 2
- #define GETSTAT 3
- #define INIT 4
- #define DEINIT 5
- #define DTR 6
- #define UP 1
- #define DOWN 0
- #define FLUSHOUT 8
- #define PURGEOUT 9
- #define PURGEIN 10
- #define TRANSMIT 11
- #define PEEK 12
- #define KEYNOWAIT 13
- #define KEYWAIT 14
- #define FLOW 15
- #define ONOFF 16
- #define ON 0
- #define OFF 2
- #define SETCRSR 17
- #define READCRSR 18
- #define ONEANSI 19
- #define CARRIER 128
- #define INITOK 0x1954
- #define WATCHDOG 20
- #define REBOOT 23
- #define COLD 0
- #define WARM 1
- #define BLOCKREAD 24
- #define BLOCKWRITE 25
-
-
- /* Symbols for SPAWNIT */
-
- #define SPAWN 0;
- #define EXEC 1;
- #define BATCH 2;
- #define DOS 3;
- #define EXIT 4;
- #define PRINT 5;
-
- /* Symbols for GENIN */
-
- #define ALLL 1
- #define ALPHA 2
- #define NUM 3
- #define ALPHANUM 4
- #define YESNO 5
- #define FLE 6
- #define FLEP 7
- #define FLEW 8
- #define FLEPW 9
- #define NAME 10
- #define NEAT 11
- #define PHONE 12
- #define DATE 13
- #define SUBJECT 14
- #define YESNOM 15
- #define FLEX 16
- #define ARROWS 17
- #define ANSIIN 18
- #define ANSISET 19
- #define FBATCH 20
- #define FBATCHW 21
- #define FBATCHWP 22
- #define FBATCHP 23
- #define TRUEANSI 24
- #define WORD 25
- #define WORDNUM 26
- #define BITS 27
- #define ANY 28
- #define ANYNOECHO 29
- #define HYPER 30
- #define THRU 31
- #define FLENX 64
- #define YESNOQ 65
-
- /***********************************/
- /* functions in ansi.c (low-level) */
- /***********************************/
-
- /* NOTE: all screen output except for status line should go (ultimately)
- * through ansi_out().
- */
- int _fastcall ansi_out (char *buf);
- void _fastcall set_screensize (int reservedlines);
- void _fastcall put_char (char c,char attr,int x,int y);
- void _fastcall pos_hardcursor (int x,int y);
- void _fastcall hardcursor_off (void);
- void _fastcall hardcursor_on (int x,int y);
- void _fastcall scroll_up (int tx,int ty,int bx,int by,char attr);
- void _fastcall clearwindow (int tx,int ty,int bx,int by,char attr);
- void _fastcall cleartoeol (int x,int y,int ex,char attr);
- void _fastcall validate_cursor(void);
-
- extern int maxx,maxy;
- extern int realmaxx,realmaxy;
- #ifndef OS2
- extern int usebios;
- #endif
- extern int useansi;
- extern int tabspaces;
-
- /* END OF FILE: peeker.h */
-