Category : Recently Uploaded Files
Archive   : PPRD100.ZIP
Filename : PPRD.H

 
Output of file : PPRD.H contained in archive : PPRD100.ZIP
#define LPDPORT 515 /* TCP */

#define LOGPORT 514 /* UDP */

#define LOG_TAG "<54>" /* LOG_LPR + LOG_INFO */

#define JDPORT 9100 /* direct to printer */

enum connstate
{
INIT,
WAITING,
QUEUENAME,
RECVJOB,
CONTROLINFO,
CONTROL,
DATAINFO,
DATA,
PRINTING,
NAKANDCLOSE,
CLOSING,
ABORT
};

struct conn_info
{
enum connstate state; /* of a connection */
int controlfirst; /* control data first? */
int printer; /* 0 to 2 */
tcp_Socket sock; /* connection */
long bytelen; /* of current file */
char buffer[2048]; /* for data */
char *bufip; /* input point */
char *bufop; /* output point */
char jobname[32];
char username[32];
char hostname[32];
time_t starttime;
long joblen;
};

#define reset_ptrs(c) (c)->bufip = (c)->bufop = (c)->buffer
#define data_unseen(c) ((c)->bufip > (c)->buffer)
#define data_remaining(c) ((c)->bufip != (c)->bufop)
#define buffer_room(c) ((c)->buffer + sizeof((c)->buffer) - (c)->bufip)

enum pstate
{
NONESUCH = 0,
DISABLED,
FREE,
BUSY,
};

struct lpt_info
{
enum pstate avail; /* active? */
int status; /* from last biosprint */
int hwaddr; /* port address, != 0 == use */
};

#define bios_printer_init(i) biosprint(1,0,i)
#define bios_printer_status(i) biosprint(2,0,i)
#define bios_printer_outch(i,c) biosprint(0,c,i)

/* printer status bits */
#define P_TIMEOUT 0x01
#define P_IOERROR 0x08
#define P_SELECTED 0x10
#define P_NOPAPER 0x20
#define P_ACK 0x40
#define P_IDLE 0x80

#define P_CHANGES (P_TIMEOUT|P_IOERROR|P_SELECTED|P_NOPAPER)
#define P_READY (P_SELECTED|P_IDLE)

/* key definitions */
#define CF1 0x5e /* CTRL-F1 */
#define CF2 0x5f
#define CF3 0x60


  3 Responses to “Category : Recently Uploaded Files
Archive   : PPRD100.ZIP
Filename : PPRD.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/