#include "bbscdef.h"
#include <sys/types.h>
#include <fcntl.h>
#ifdef linux
#include "nolock.h"
#else
#include <sys/locking.h>
#endif
#include <sys/stat.h>
#include <signal.h>
#include <fcntl.h>
#include <string.h>
#include <ctype.h>
#include <termio.h>
#include <time.h>
struct termio   ttys;
struct termio   ttyhold;
struct termio   ttysnew;
struct stat     statbuf;

#define LASTDATE  " 08/15/92 "

#define PGMNAME "XBBS    "
#define AUTHOR "Sanford J. Zelkovitz      Data: 714-821-9671 "
#define VERSION " 7.200 "
#define CONFIG ".config.bbs"
char           *ttyname();
char           *tty;
char           *this_ttyname;
static unsigned Xsec, Sec;
unsigned int Ztime, Zsec, Ytime;
int             hold_pipe;
int             if_kermit;
int		blocked_m;
int             last_msg_read;
int             user_priv;
int             maxpriv;
int             max_priv;
int             first_time_in;
int             first_msg_in;
int             old_priv;
int             cnt1;
int             end_msg;
int             reply_sw;
int             resp_flag;
int             sys_flag;
int             new_msg;
int             read_flag;
int             read_number;
int             no_cntrl_k;
int             fds;
int             newuzr;
int             scan;
int             hold_off;
int             listed_l, listed_r, listed_n;
int             toggle_hold;
int		sigreturn;
long            extra_time;
long            extra_size;
long            dload_total;
long            max_dload;
long            sum_lsec;
long            sum_size;
long            the_size;
unsigned        sec;
unsigned        xsec;
unsigned        old_sec;
long            delta_time;
char            bufx[30], bufy[10];
char            work_msg[(MAX_MSG_LINES * 74) + 74];
char            old_upath[99], old_fpath[99], old_mpath[99];
char            callers[99];
char            port_id[4];
char            mnd[10];
char		POSTN[99], READN[99];

void		timer();
void		hanged();
void            mon_toggle();
void            sys_toggle();
void            chat();
void            STOP();
long            atol();
int             atoi();
