File plp_1_7-link.dif of Package psion_lp
--- ncp/link.cc
+++ ncp/link.cc
@@ -30,7 +30,7 @@
#include "bufferstore.h"
#include "bufferarray.h"
-link::link(const char *fname, int baud, IOWatch &iow, bool _s5, bool _verbose) :
+linkk::linkk(const char *fname, int baud, IOWatch &iow, bool _s5, bool _verbose) :
s5(_s5)
{
p = new packet(fname, baud, iow, PACKET_LAYER_DIAGNOSTICS);
@@ -43,16 +43,16 @@
failed = false;
}
-link::~link() {
+linkk::~linkk() {
delete p;
}
-void link::send(const bufferStore &buff) {
+void linkk::send(const bufferStore &buff) {
if (buff.getLen() > 300) abort();
sendQueue.pushBuffer(buff);
}
-bufferArray link::poll() {
+bufferArray linkk::poll() {
bufferArray ret;
bufferStore buff;
unsigned char type;
@@ -145,10 +145,10 @@
return ret;
}
-bool link::stuffToSend() {
+bool linkk::stuffToSend() {
return (somethingToSend || !sendQueue.empty());
}
-bool link::hasFailed() {
+bool linkk::hasFailed() {
return failed;
}
--- ncp/link.h
+++ ncp/link.h
@@ -7,10 +7,10 @@
class packet;
class IOWatch;
-class link {
+class linkk {
public:
- link(const char *fname, int baud, IOWatch &iow, bool s5, bool _verbose = false);
- ~link();
+ linkk(const char *fname, int baud, IOWatch &iow, bool s5, bool _verbose = false);
+ ~linkk();
void send(const bufferStore &buff);
bufferArray poll();
bool stuffToSend();
--- ncp/ncp.cc
+++ ncp/ncp.cc
@@ -33,7 +33,7 @@
ncp::ncp(const char *fname, int baud, IOWatch &iow, bool _s5) :
s5(_s5)
{
- l = new link(fname, baud, iow, s5, LINK_LAYER_DIAGNOSTICS);
+ l = new linkk(fname, baud, iow, s5, LINK_LAYER_DIAGNOSTICS);
gotLinkChan = false;
failed = false;
--- ncp/ncp.h
+++ ncp/ncp.h
@@ -3,7 +3,7 @@
#include "bool.h"
#include "bufferstore.h"
-class link;
+class linkk;
class channel;
class IOWatch;
@@ -37,7 +37,7 @@
void decodeControlMessage(bufferStore &buff);
void controlChannel(int chan, enum interControllerMessageType t, bufferStore &command);
- link *l;
+ linkk *l;
channel *channelPtr[8];
bufferStore messageList[8];
int remoteChanList[8];