File plp_1_7-gcc43.patch of Package psion_lp
diff -Naur plp_1_7.org/ncp/channel.cc plp_1_7/ncp/channel.cc
--- plp_1_7.org/ncp/channel.cc 2008-01-14 15:36:01.664941000 +0100
+++ plp_1_7/ncp/channel.cc 2008-01-14 16:03:05.713615000 +0100
@@ -20,7 +20,7 @@
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
+#include <iostream>
#include "bool.h"
#include "channel.h"
diff -Naur plp_1_7.org/ncp/link.cc plp_1_7/ncp/link.cc
--- plp_1_7.org/ncp/link.cc 2008-01-14 15:36:01.665945000 +0100
+++ plp_1_7/ncp/link.cc 2008-01-14 15:57:20.929399000 +0100
@@ -19,7 +19,7 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
+#include <iostream>
#include <stdlib.h>
#include <stdio.h>
@@ -30,6 +30,8 @@
#include "bufferstore.h"
#include "bufferarray.h"
+using namespace std;
+
linkk::linkk(const char *fname, int baud, IOWatch &iow, bool _s5, bool _verbose) :
s5(_s5)
{
diff -Naur plp_1_7.org/ncp/linkchan.cc plp_1_7/ncp/linkchan.cc
--- plp_1_7.org/ncp/linkchan.cc 2008-01-14 15:36:01.667941000 +0100
+++ plp_1_7/ncp/linkchan.cc 2008-01-14 16:06:26.394733000 +0100
@@ -19,11 +19,13 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
+#include <iostream>
#include "linkchan.h"
#include "bufferstore.h"
+using namespace std;
+
linkChan::linkChan(ncp *_ncpController) : channel(_ncpController) {
}
diff -Naur plp_1_7.org/ncp/main.cc plp_1_7/ncp/main.cc
--- plp_1_7.org/ncp/main.cc 2008-01-14 15:36:01.669938000 +0100
+++ plp_1_7/ncp/main.cc 2008-01-14 16:08:37.090904000 +0100
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <string.h>
-#include <stream.h>
+#include <iostream>
#include <stdlib.h>
#include "../defaults.h"
@@ -32,6 +32,8 @@
#include "iowatch.h"
#include "linkchan.h"
+using namespace std;
+
void checkForNewSocketConnection(ppsocket &skt, int &numScp, socketChan **scp, ncp *a, IOWatch &iow) {
char peer[201];
ppsocket *next = skt.accept(peer, 200);
diff -Naur plp_1_7.org/ncp/ncp.cc plp_1_7/ncp/ncp.cc
--- plp_1_7.org/ncp/ncp.cc 2008-01-14 15:36:01.671937000 +0100
+++ plp_1_7/ncp/ncp.cc 2008-01-14 16:10:13.638263000 +0100
@@ -19,7 +19,7 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
+#include <iostream>
#include <string.h>
#include "bool.h"
@@ -30,6 +30,8 @@
#include "link.h"
#include "bufferarray.h"
+using namespace std;
+
ncp::ncp(const char *fname, int baud, IOWatch &iow, bool _s5) :
s5(_s5)
{
diff -Naur plp_1_7.org/ncp/packet.cc plp_1_7/ncp/packet.cc
--- plp_1_7.org/ncp/packet.cc 2008-01-14 15:36:01.673933000 +0100
+++ plp_1_7/ncp/packet.cc 2008-01-14 16:28:20.179631000 +0100
@@ -26,8 +26,9 @@
#include <sys/time.h>
#include <sys/types.h>
#include <string.h>
-#include <fstream.h>
-#include <iomanip.h>
+#include <iostream>
+#include <fstream>
+#include <iomanip>
#include "bool.h"
#include "mp_serial.h"
@@ -36,6 +37,8 @@
#include "iowatch.h"
#include "psiemul.h"
+using namespace std;
+
#define BUFFERLEN 2000
packet::packet(const char *fname, int _baud, IOWatch &_iow, bool _verbose) :
@@ -169,7 +172,7 @@
escaped = true;
}
if (verbose) {
- cout << "packet: get ";
+ std::cout << "packet: get ";
for (int i = 0; i < inBufferPtr; i++)
cout << hex << setw(2) << setfill('0') << (int)inBuffer[i] << " ";
cout << endl;
diff -Naur plp_1_7.org/ncp/psiemul.cc plp_1_7/ncp/psiemul.cc
--- plp_1_7.org/ncp/psiemul.cc 2008-01-14 15:36:01.734872000 +0100
+++ plp_1_7/ncp/psiemul.cc 2008-01-14 16:13:30.815884000 +0100
@@ -23,7 +23,7 @@
// The following code does NOT emulate a psion, but it persists "conversations"
// with a psion. This is probably only useful for my debugging only.
-#include <iostream.h>
+#include <iostream>
#include <stdlib.h>
#include "psiemul.h"
diff -Naur plp_1_7.org/ncp/psiemul.h plp_1_7/ncp/psiemul.h
--- plp_1_7.org/ncp/psiemul.h 2008-01-14 15:36:01.732873000 +0100
+++ plp_1_7/ncp/psiemul.h 2008-01-14 16:18:06.334093000 +0100
@@ -8,7 +8,7 @@
class psiEmul {
public:
- psiEmul(iostream* io);
+ psiEmul(std::iostream* io);
void check(unsigned char a); // Is this an expected byte?
void op(unsigned char a); // Sent to psion
@@ -18,7 +18,7 @@
private:
void getNextByte();
- iostream* io;
+ std::iostream* io;
bool used;
unsigned char nextByte;
unsigned char direction;
diff -Naur plp_1_7.org/ncp/socketchan.cc plp_1_7/ncp/socketchan.cc
--- plp_1_7.org/ncp/socketchan.cc 2008-01-14 15:36:01.700912000 +0100
+++ plp_1_7/ncp/socketchan.cc 2008-01-14 16:23:59.602470000 +0100
@@ -19,7 +19,7 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
+#include <iostream>
#include "stdio.h"
#include "string.h"
#include "malloc.h"
@@ -30,6 +30,8 @@
#include "ppsocket.h"
#include "iowatch.h"
+using namespace std;
+
socketChan::socketChan(ppsocket *_skt, ncp *_ncpController, IOWatch &_iow) :
channel(_ncpController),
iow(_iow)
diff -Naur plp_1_7.org/rfsv/ftp.cc plp_1_7/rfsv/ftp.cc
--- plp_1_7.org/rfsv/ftp.cc 2008-01-14 15:36:01.781826000 +0100
+++ plp_1_7/rfsv/ftp.cc 2008-01-14 15:58:02.908379000 +0100
@@ -21,7 +21,7 @@
#include <sys/types.h>
#include <dirent.h>
-#include <stream.h>
+#include <iostream>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
@@ -33,6 +33,8 @@
#include "bufferarray.h"
#include "bufferstore.h"
+using namespace std;
+
void ftp::resetUnixPwd() {
getcwd(localDir, 500);
strcat(localDir, "/");
diff -Naur plp_1_7.org/rfsv/main.cc plp_1_7/rfsv/main.cc
--- plp_1_7.org/rfsv/main.cc 2008-01-14 15:36:01.773835000 +0100
+++ plp_1_7/rfsv/main.cc 2008-01-14 15:55:43.418011000 +0100
@@ -19,7 +19,7 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
+#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@@ -32,6 +32,8 @@
#include "ftp.h"
#include "bufferstore.h"
+using namespace std;
+
void usage() {
cout << "Version " << VERSION << endl;
cout << "Usage : rfsv -s <socket number> <command> <parameters>\n";
diff -Naur plp_1_7.org/rfsv/rfsv16.cc plp_1_7/rfsv/rfsv16.cc
--- plp_1_7.org/rfsv/rfsv16.cc 2008-01-14 15:36:01.784822000 +0100
+++ plp_1_7/rfsv/rfsv16.cc 2008-01-14 16:01:05.084364000 +0100
@@ -19,10 +19,10 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
+#include <iostream>
#include <stdlib.h>
-#include <fstream.h>
-#include <iomanip.h>
+#include <fstream>
+#include <iomanip>
#include <time.h>
#include <string.h>
@@ -34,6 +34,8 @@
#include "../defaults.h"
#include "bufferarray.h"
+using namespace std;
+
rfsv16::rfsv16(ppsocket *_skt) {
skt = _skt;
bufferStore a;
diff -Naur plp_1_7.org/rfsv/rfsv32.cc plp_1_7/rfsv/rfsv32.cc
--- plp_1_7.org/rfsv/rfsv32.cc 2008-01-14 15:36:01.789819000 +0100
+++ plp_1_7/rfsv/rfsv32.cc 2008-01-14 16:03:31.986317000 +0100
@@ -19,10 +19,10 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
+#include <iostream>
#include <stdlib.h>
-#include <fstream.h>
-#include <iomanip.h>
+#include <fstream>
+#include <iomanip>
#include <time.h>
#include <string.h>
@@ -34,6 +34,8 @@
#include "../defaults.h"
#include "bufferarray.h"
+using namespace std;
+
rfsv32::rfsv32(ppsocket *_skt) :
serNum(0)
{
diff -Naur plp_1_7.org/utils/bufferstore.cc plp_1_7/utils/bufferstore.cc
--- plp_1_7.org/utils/bufferstore.cc 2008-01-14 15:36:01.830775000 +0100
+++ plp_1_7/utils/bufferstore.cc 2008-01-14 15:53:50.703832000 +0100
@@ -19,10 +19,12 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
-#include <iomanip.h>
+#include <iostream>
+#include <iomanip>
#include <string.h>
+using namespace std;
+
#include "bufferstore.h"
bufferStore::bufferStore() {
diff -Naur plp_1_7.org/utils/iowatch.cc plp_1_7/utils/iowatch.cc
--- plp_1_7.org/utils/iowatch.cc 2008-01-14 15:36:01.842763000 +0100
+++ plp_1_7/utils/iowatch.cc 2008-01-14 15:41:11.902399000 +0100
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <stream.h>
+#include <iostream>
#include <memory.h>
#include "bool.h"
diff -Naur plp_1_7.org/utils/ppsocket.cc plp_1_7/utils/ppsocket.cc
--- plp_1_7.org/utils/ppsocket.cc 2008-01-14 15:36:01.838774000 +0100
+++ plp_1_7/utils/ppsocket.cc 2008-01-14 15:42:59.634552000 +0100
@@ -24,8 +24,8 @@
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
-#include <iostream.h>
-#include <iomanip.h>
+#include <iostream>
+#include <iomanip>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
@@ -37,6 +37,8 @@
#include "bufferstore.h"
#include "ppsocket.h"
+using namespace std;
+
//**********************************************************************
// For unix we need a few definitions
//**********************************************************************