#
# Patch to make estic 1.60 compile on recent gcc-3.3.4 based linux systems
# 2004 by Harald Welte <laforge@gnumonks.org>
#
# Please note that I'm a total C++ looser, so the modifications might actually
# introduce some bugs.  Specifically, I didn't look if I had introduced any
# new signedness bugs.  Use with caution.
#
# [legal disclaimer: changes are so trivial that this patch doesn't even
#  form a copyrighted work.  Distribution is thus unlimited.  Please note
#  the distribution terms of estic]
#
diff --exclude '*.o' --exclude .depend -Nru es160src/estic/estic.cc estic-1.60-linux/estic/estic.cc
--- es160src/estic/estic.cc	1997-03-05 21:20:42.000000000 +0100
+++ estic-1.60-linux/estic/estic.cc	2004-07-06 23:12:46.428260368 +0200
@@ -80,9 +80,9 @@
 
 
 // Diag mode update
-static const duOff              = 0;
-static const duOn               = 1;
-static const duAuto             = 2;    // Update if version <= 1.93
+static const int duOff              = 0;
+static const int duOn               = 1;
+static const int duAuto             = 2;    // Update if version <= 1.93
 
 static const char VersionStr [] = "1.50";
 static const char VersionID []  = "ESTIC-Version";
diff --exclude '*.o' --exclude .depend -Nru es160src/estic/icbaseed.cc estic-1.60-linux/estic/icbaseed.cc
--- es160src/estic/icbaseed.cc	1996-11-30 01:00:44.000000000 +0100
+++ estic-1.60-linux/estic/icbaseed.cc	2004-07-06 23:13:53.396079712 +0200
@@ -451,26 +451,26 @@
 // otherwise, Changed is left untouched.
 {
     // ID's of menue items for EditBaseConfig
-    const miIstecType           =  10;
-    const miProtocol            =  20;
-    const miExtLevel            =  30;
-    const miMusic               =  40;
-    const miConnection          =  50;
-    const miNumber1             =  60;
-    const miNumber2             =  70;
-    const miTFEAssignment       =  80;
-    const miQueryLoc            =  90;
-    const miMSN                 = 100;
-    const miMSNGroups           = 110;
-    const miEAZGroups           = 120;
-    const miExternalMusicPort   = 130;
-    const miCountryCode         = 140;
-    const miSignaling           = 150;
+    const int miIstecType           =  10;
+    const int miProtocol            =  20;
+    const int miExtLevel            =  30;
+    const int miMusic               =  40;
+    const int miConnection          =  50;
+    const int miNumber1             =  60;
+    const int miNumber2             =  70;
+    const int miTFEAssignment       =  80;
+    const int miQueryLoc            =  90;
+    const int miMSN                 = 100;
+    const int miMSNGroups           = 110;
+    const int miEAZGroups           = 120;
+    const int miExternalMusicPort   = 130;
+    const int miCountryCode         = 140;
+    const int miSignaling           = 150;
 
     // Values for the miMusic toggle item
-    const musOff                = 0;
-    const musInternal           = 1;
-    const musExternal           = 2;
+    const int musOff                = 0;
+    const int musInternal           = 1;
+    const int musExternal           = 2;
 
 
 
diff --exclude '*.o' --exclude .depend -Nru es160src/estic/icdevs.cc estic-1.60-linux/estic/icdevs.cc
--- es160src/estic/icdevs.cc	1997-03-05 21:48:44.000000000 +0100
+++ estic-1.60-linux/estic/icdevs.cc	2004-07-06 23:16:43.257255112 +0200
@@ -157,8 +157,8 @@
 String DevListBox::RerouteName (const String& Num)
 // Map the reroute capability to a string with fixed length
 {
-    const StringLength = 18;
-    const PadLength = 21;
+    const int StringLength = 18;
+    const int PadLength = 21;
     String Res (PadLength);
 
     if (Num.IsEmpty ()) {
@@ -269,9 +269,9 @@
 static void EditExtReroute (const Point& Pos, IstecDevConfig& Config)
 // Edit the extended reroute capabilities of FW 2.0 in a separate menu
 {
-    const miPhone       = 10;
-    const miCondition   = 20;
-    const miRingCount   = 30;
+    const int miPhone       = 10;
+    const int miCondition   = 20;
+    const int miRingCount   = 30;
 
     // Load the menu
     Menue* M = (Menue*) LoadResource ("@ICDEVS.RerouteMenue");
@@ -407,38 +407,38 @@
     static const String StgPosName = "EditDevConfig.ConfigMenue.Position";
 
     // Menue constants
-    const miDialCaps      = 10;
-    const miService       = 20;
-    const miReroute       = 30;         // Simple reroute, pre-2.00
-    const miChargePulse   = 40;
-    const miPIN           = 50;
-    const miTerminalMode  = 60;
-    const miKnockInt      = 70;
-    const miKnockExt      = 80;
-    const miKnockTFE      = 90;
-    const miExtReroute    = 100;        // Extended reroute, 2.00 and up
-    const miKnockInt21    = 1000;
-    const miKnockInt22    = 1010;
-    const miKnockInt23    = 1020;
-    const miKnockInt24    = 1030;
-    const miKnockInt25    = 1040;
-    const miKnockInt26    = 1050;
-    const miKnockInt27    = 1060;
-    const miKnockInt28    = 1070;
-    const miKnockMSN0     = 1100;
-    const miKnockMSN1     = 1110;
-    const miKnockMSN2     = 1120;
-    const miKnockMSN3     = 1130;
-    const miKnockMSN4     = 1140;
-    const miKnockMSN5     = 1150;
-    const miKnockMSN6     = 1160;
-    const miKnockMSN7     = 1170;
-    const miKnockMSN8     = 1180;
-    const miKnockMSN9     = 1190;
-    const miKnockTFE1     = 1200;
-    const miKnockTFE2     = 1210;
-    const miKnockTFE3     = 1220;
-    const miKnockTFE4     = 1230;
+    const int miDialCaps      = 10;
+    const int miService       = 20;
+    const int miReroute       = 30;         // Simple reroute, pre-2.00
+    const int miChargePulse   = 40;
+    const int miPIN           = 50;
+    const int miTerminalMode  = 60;
+    const int miKnockInt      = 70;
+    const int miKnockExt      = 80;
+    const int miKnockTFE      = 90;
+    const int miExtReroute    = 100;        // Extended reroute, 2.00 and up
+    const int miKnockInt21    = 1000;
+    const int miKnockInt22    = 1010;
+    const int miKnockInt23    = 1020;
+    const int miKnockInt24    = 1030;
+    const int miKnockInt25    = 1040;
+    const int miKnockInt26    = 1050;
+    const int miKnockInt27    = 1060;
+    const int miKnockInt28    = 1070;
+    const int miKnockMSN0     = 1100;
+    const int miKnockMSN1     = 1110;
+    const int miKnockMSN2     = 1120;
+    const int miKnockMSN3     = 1130;
+    const int miKnockMSN4     = 1140;
+    const int miKnockMSN5     = 1150;
+    const int miKnockMSN6     = 1160;
+    const int miKnockMSN7     = 1170;
+    const int miKnockMSN8     = 1180;
+    const int miKnockMSN9     = 1190;
+    const int miKnockTFE1     = 1200;
+    const int miKnockTFE2     = 1210;
+    const int miKnockTFE3     = 1220;
+    const int miKnockTFE4     = 1230;
 
 
     // Save the configuration into a memory stream, remember the CRC
diff --exclude '*.o' --exclude .depend -Nru es160src/estic/icshort.cc estic-1.60-linux/estic/icshort.cc
--- es160src/estic/icshort.cc	1997-01-31 04:29:12.000000000 +0100
+++ estic-1.60-linux/estic/icshort.cc	2004-07-06 23:17:59.260700832 +0200
@@ -574,17 +574,17 @@
 
 
 // Item numbers for the short number edit menu
-const miNumber      =  10;
-const miUsage       =  20;
-const miSignaling   =  30;
-const miDevice1     = 110;
-const miDevice2     = 120;
-const miDevice3     = 130;
-const miDevice4     = 140;
-const miDevice5     = 150;
-const miDevice6     = 160;
-const miDevice7     = 170;
-const miDevice8     = 180;
+const int miNumber      =  10;
+const int miUsage       =  20;
+const int miSignaling   =  30;
+const int miDevice1     = 110;
+const int miDevice2     = 120;
+const int miDevice3     = 130;
+const int miDevice4     = 140;
+const int miDevice5     = 150;
+const int miDevice6     = 160;
+const int miDevice7     = 170;
+const int miDevice8     = 180;
 
 
 
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/check.cc estic-1.60-linux/spunk/check.cc
--- es160src/spunk/check.cc	1996-11-07 18:06:46.000000000 +0100
+++ estic-1.60-linux/spunk/check.cc	2004-07-06 22:46:25.924533456 +0200
@@ -51,7 +51,7 @@
 
 // The fail vector
 #ifdef __GNUC__
-volatile
+//volatile
 #endif
 void (*CheckFailed) (const char*, const char* Cond,
                      int Code, const char* File, int Line) = _CheckFailed;
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/check.h estic-1.60-linux/spunk/check.h
--- es160src/spunk/check.h	1996-11-07 18:06:46.000000000 +0100
+++ estic-1.60-linux/spunk/check.h	2004-07-06 23:00:33.502681992 +0200
@@ -39,7 +39,7 @@
 
 extern
 #ifdef __GNUC__
-volatile
+//volatile
 #endif
 void (*CheckFailed) (const char* Msg, const char* Cond, int Code,
                             const char* File, int Line);
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/coll.cc estic-1.60-linux/spunk/coll.cc
--- es160src/spunk/coll.cc	1996-11-30 00:40:58.000000000 +0100
+++ estic-1.60-linux/spunk/coll.cc	2004-07-06 22:46:43.655837888 +0200
@@ -21,7 +21,7 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <iostream.h>
+#include <iostream>
 
 #include "machine.h"
 #include "check.h"
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/coll.h estic-1.60-linux/spunk/coll.h
--- es160src/spunk/coll.h	1996-12-18 23:42:14.000000000 +0100
+++ estic-1.60-linux/spunk/coll.h	2004-07-06 22:45:46.603511160 +0200
@@ -24,7 +24,7 @@
 
 
 #include <stdlib.h>
-#include <iostream.h>
+#include <iostream>
 
 #include "check.h"
 #include "object.h"
@@ -33,8 +33,8 @@
 
 
 
-static const coIndexError	= 1;		// Index out of range
-static const coOverflowError	= 2;		// Collection overflow
+static const int coIndexError	= 1;		// Index out of range
+static const int coOverflowError	= 2;		// Collection overflow
 
 
 
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/filepath.h estic-1.60-linux/spunk/filepath.h
--- es160src/spunk/filepath.h	1996-11-14 00:12:02.000000000 +0100
+++ estic-1.60-linux/spunk/filepath.h	2004-07-06 22:55:36.962762912 +0200
@@ -88,7 +88,7 @@
 // Return 1 if the given path contains one of the wildcard characters '*', '?'
 // or '[]', return zero otherwise.
 
-int FMatch (const String& Source, const String& Pattern);
+//int FMatch (const String& Source, const String& Pattern);
 // Match the string in Source against Pattern. Pattern may contain the
 // wildcards '*', '?', '[abcd]' '[ab-d]', '[!abcd]', '[!ab-d]'
 // The function returns a value of zero if Source does not match Pattern,
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/filesys.h estic-1.60-linux/spunk/filesys.h
--- es160src/spunk/filesys.h	1996-11-07 18:06:48.000000000 +0100
+++ estic-1.60-linux/spunk/filesys.h	2004-07-06 22:49:20.549986352 +0200
@@ -44,10 +44,10 @@
 
 extern const char FileSysPathSep;	// Path separator
 extern const char FileSysListSep;	// Path list separator
-extern const FileSysMaxPath;		// Maximum path length
-extern const FileSysMaxDir;		// Maximum directory length
-extern const FileSysMaxName;		// Maximum file name length
-extern const FileSysMaxExt;		// Maximum extension length (including the dot)
+extern const int FileSysMaxPath;		// Maximum path length
+extern const int FileSysMaxDir;		// Maximum directory length
+extern const int FileSysMaxName;		// Maximum file name length
+extern const int FileSysMaxExt;		// Maximum extension length (including the dot)
 
 
 
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/linuxsrc/filesys.cc estic-1.60-linux/spunk/linuxsrc/filesys.cc
--- es160src/spunk/linuxsrc/filesys.cc	1996-11-07 18:06:54.000000000 +0100
+++ estic-1.60-linux/spunk/linuxsrc/filesys.cc	2004-07-06 22:56:03.189775800 +0200
@@ -38,10 +38,10 @@
 
 extern const char FileSysPathSep	= '/';	// Path separator
 extern const char FileSysListSep	= ':';	// Path list separator
-extern const FileSysMaxPath		= 255;	// Maximum path length
-extern const FileSysMaxDir		= 255;	// Maximum directory length
-extern const FileSysMaxName		= 255;	// Maximum file name length
-extern const FileSysMaxExt		= 255;	// Maximum extension length (including the dot)
+extern const int FileSysMaxPath		= 255;	// Maximum path length
+extern const int FileSysMaxDir		= 255;	// Maximum directory length
+extern const int FileSysMaxName		= 255;	// Maximum file name length
+extern const int FileSysMaxExt		= 255;	// Maximum extension length (including the dot)
 
 
 
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/linuxsrc/kbd.cc estic-1.60-linux/spunk/linuxsrc/kbd.cc
--- es160src/spunk/linuxsrc/kbd.cc	1997-02-07 23:36:02.000000000 +0100
+++ estic-1.60-linux/spunk/linuxsrc/kbd.cc	2004-07-06 22:57:13.777044904 +0200
@@ -62,7 +62,7 @@
 
 
 // An array for mapping extended to virtual keys
-const VirtualMapSize = 50;
+const unsigned VirtualMapSize = 50;
 struct { Key EK; Key VK; } VirtualMap [VirtualMapSize];
 static unsigned VirtualMapCount = 0;
 
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/linuxsrc/screen.cc estic-1.60-linux/spunk/linuxsrc/screen.cc
--- es160src/spunk/linuxsrc/screen.cc	1996-11-07 18:06:54.000000000 +0100
+++ estic-1.60-linux/spunk/linuxsrc/screen.cc	2004-07-06 23:02:54.506246192 +0200
@@ -67,7 +67,7 @@
 // only.
 {
     // We have a new string if we are on the console and are using CP437
-    return (Console && CP437)? "\033(U\033>\033[4;20l" : IS;
+    return (Console && CP437)? (char *)"\033(U\033>\033[4;20l" : IS;
 }
 
 
@@ -77,7 +77,7 @@
 // only.
 {
     // We have a new string if we are on the console and are using CP437
-    return (Console && CP437)? "\033(B\033>\033[4;20l\033[?25h" : RS;
+    return (Console && CP437)? (char *)"\033(B\033>\033[4;20l\033[?25h" : RS;
 }
 
 
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/machine.h estic-1.60-linux/spunk/machine.h
--- es160src/spunk/machine.h	1997-02-18 14:41:50.000000000 +0100
+++ estic-1.60-linux/spunk/machine.h	2004-07-06 22:44:16.606192832 +0200
@@ -206,10 +206,10 @@
 // Endianess. The following code is not very clean as it accesses a reserved
 // implementation identifier, but there is no other way to determine byte
 // order under Linux (known to me).
-#include <bytesex.h>
+#include <endian.h>
 #if __BYTE_ORDER == 1234
 #    define CPU_LITTLE_ENDIAN
-#elif __BYTE_ORDER = 4321
+#elif __BYTE_ORDER == 4321
 #    define CPU_BIG_ENDIAN
 #elif
 #    error Byte order not defined!
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/menue.cc estic-1.60-linux/spunk/menue.cc
--- es160src/spunk/menue.cc	1997-01-26 18:17:32.000000000 +0100
+++ estic-1.60-linux/spunk/menue.cc	2004-07-06 22:58:11.190316760 +0200
@@ -495,8 +495,8 @@
 
 i16 GenericMenue::GetChoice ()
 {
-    const AltNextKeyCode = MaxUserID + 1;
-    const AltPrevKeyCode = MaxUserID + 2;
+    const int AltNextKeyCode = MaxUserID + 1;
+    const int AltPrevKeyCode = MaxUserID + 2;
 
 
     // Remember old window state
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/palette.h estic-1.60-linux/spunk/palette.h
--- es160src/spunk/palette.h	1996-11-07 18:06:48.000000000 +0100
+++ estic-1.60-linux/spunk/palette.h	2004-07-06 22:49:56.974448992 +0200
@@ -40,19 +40,19 @@
 
 
 // Indices into the palette arrays
-static const atFrameInactive    =   0;  // passive frame
-static const atFrameActive      =   1;  // active frame
-static const atFrameResizing    =   2;  // resizing frame
-static const atTextNormal       =   3;  // normal text
-static const atTextInvers       =   4;  // inverted text
-static const atTextSelected     =   5;  // selected static text
-static const atTextHigh         =   6;  // selected text (i.e. hotkeys)
-static const atTextHighInvers   =   7;  // inverted selected text
-static const atTextGrayed       =   8;  // grey (inactive) text
-static const atTextGrayedInvers =   9;  // dito inverted
-static const atEditNormal       =  10;  // normal text in an edit window
-static const atEditHigh         =  11;  // i.e. left/right arrows
-static const atEditBar          =  12;  // scroll bar (use atEditNormal for text)
+static const int atFrameInactive    =   0;  // passive frame
+static const int atFrameActive      =   1;  // active frame
+static const int atFrameResizing    =   2;  // resizing frame
+static const int atTextNormal       =   3;  // normal text
+static const int atTextInvers       =   4;  // inverted text
+static const int atTextSelected     =   5;  // selected static text
+static const int atTextHigh         =   6;  // selected text (i.e. hotkeys)
+static const int atTextHighInvers   =   7;  // inverted selected text
+static const int atTextGrayed       =   8;  // grey (inactive) text
+static const int atTextGrayedInvers =   9;  // dito inverted
+static const int atEditNormal       =  10;  // normal text in an edit window
+static const int atEditHigh         =  11;  // i.e. left/right arrows
+static const int atEditBar          =  12;  // scroll bar (use atEditNormal for text)
 
 
 // Palette numbers
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/password.cc estic-1.60-linux/spunk/password.cc
--- es160src/spunk/password.cc	1996-11-07 18:06:48.000000000 +0100
+++ estic-1.60-linux/spunk/password.cc	2004-07-06 22:59:51.183115544 +0200
@@ -525,14 +525,14 @@
 
 
 
-static void EntryEditor (PasswordEntry* E, int& Abort, int& Changed)
+void EntryEditor (PasswordEntry* E, int& Abort, int& Changed)
 // Allow editing of one password entry
 {
     // ID's of the menue items
-    const miUserID      = 1;
-    const miUserName    = 2;
-    const miPassword    = 3;
-    const miLevel       = 4;
+    const int miUserID      = 1;
+    const int miUserName    = 2;
+    const int miPassword    = 3;
+    const int miLevel       = 4;
 
      // Remember the crc of the entry
     u32 OldCRC = GetCRC (E);
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/resitem.cc estic-1.60-linux/spunk/resitem.cc
--- es160src/spunk/resitem.cc	1997-02-21 12:05:30.000000000 +0100
+++ estic-1.60-linux/spunk/resitem.cc	2004-07-06 23:10:21.747255224 +0200
@@ -1539,16 +1539,16 @@
 // Data edit menue
 {
     // Menue IDs
-    const miID          = 10;
-    const miText        = 20;
-    const miState       = 30;
-    const miAccelKey    = 40;
-    const miHelpKey     = 50;
-    const miCharset     = 60;
-    const miLimits      = 70;
-    const miSubMenue    = 80;
-    const miToggleText  = 90;
-    const miToggleCount = 100;
+    const int miID          = 10;
+    const int miText        = 20;
+    const int miState       = 30;
+    const int miAccelKey    = 40;
+    const int miHelpKey     = 50;
+    const int miCharset     = 60;
+    const int miLimits      = 70;
+    const int miSubMenue    = 80;
+    const int miToggleText  = 90;
+    const int miToggleCount = 100;
 
     // Load the menue from the resource
     Menue* M = (Menue*) LoadResource ("@RESITEM.ItemDataMenue");
@@ -1785,13 +1785,13 @@
 
 void ResEditApp::ChangeCharset (WindowItem* Item)
 {
-    const miReset       = 1;
-    const miAddDigits   = 2;
-    const miAddHex      = 3;
-    const miAddAlpha    = 4;
-    const miAddAll      = 5;
-    const miCustom      = 6;
-    const miAllowEmpty  = 7;
+    const int miReset       = 1;
+    const int miAddDigits   = 2;
+    const int miAddHex      = 3;
+    const int miAddAlpha    = 4;
+    const int miAddAll      = 5;
+    const int miCustom      = 6;
+    const int miAllowEmpty  = 7;
 
 
     // Only RStringItem and TextEdits are allowed to change the charset
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/sercom.h estic-1.60-linux/spunk/sercom.h
--- es160src/spunk/sercom.h	1996-11-07 18:06:52.000000000 +0100
+++ estic-1.60-linux/spunk/sercom.h	2004-07-06 23:04:02.714876904 +0200
@@ -43,29 +43,29 @@
 
 
 // Constants for accessing the array of error counters
-const ceRXOverflow              = 0;    // Receive buffer overflow
-const ceTXOverflow              = 1;    // Transmit buffer overflow
-const ceOverrun                 = 2;    // UART overrun
-const ceBreak                   = 3;    // Break received
-const ceFrame                   = 4;    // Framing error
-const ceParity                  = 5;    // Parity error
+const int ceRXOverflow              = 0;    // Receive buffer overflow
+const int ceTXOverflow              = 1;    // Transmit buffer overflow
+const int ceOverrun                 = 2;    // UART overrun
+const int ceBreak                   = 3;    // Break received
+const int ceFrame                   = 4;    // Framing error
+const int ceParity                  = 5;    // Parity error
 
 
 
 // Bitmask constants for evaluating the result of ModemStatus
-const csDeltaCTS                = 0x01; // Delta CTS
-const csDeltaDSR                = 0x02; // Delta DSR
-const csDeltaRI                 = 0x04; // Falling edge of RI
-const csDeltaCarrierDetect      = 0x08; // Delta CD
-const csClearToSend             = 0x10; // Clear To Send
-const csDataSetReady            = 0x20; // Data Set Ready
-const csRingIndicator           = 0x40; // Ring Indicator
-const csCarrierDetect           = 0x80; // Carrier Detect
-const csCTS                     = csClearToSend;
-const csDSR                     = csDataSetReady;
-const csRI                      = csRingIndicator;
-const csCD                      = csCarrierDetect;
-const csDeltaCD                 = csDeltaCarrierDetect;
+const int csDeltaCTS                = 0x01; // Delta CTS
+const int csDeltaDSR                = 0x02; // Delta DSR
+const int csDeltaRI                 = 0x04; // Falling edge of RI
+const int csDeltaCarrierDetect      = 0x08; // Delta CD
+const int csClearToSend             = 0x10; // Clear To Send
+const int csDataSetReady            = 0x20; // Data Set Ready
+const int csRingIndicator           = 0x40; // Ring Indicator
+const int csCarrierDetect           = 0x80; // Carrier Detect
+const int csCTS                     = csClearToSend;
+const int csDSR                     = csDataSetReady;
+const int csRI                      = csRingIndicator;
+const int csCD                      = csCarrierDetect;
+const int csDeltaCD                 = csDeltaCarrierDetect;
 
 
 
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/stream.cc estic-1.60-linux/spunk/stream.cc
--- es160src/spunk/stream.cc	1996-12-18 13:09:02.000000000 +0100
+++ estic-1.60-linux/spunk/stream.cc	2004-07-06 23:05:01.136995392 +0200
@@ -347,7 +347,7 @@
 
 void Stream::CopyFrom (Stream& S, size_t Count)
 {
-    static const BufSize = 4096;            // Size of copy buffer
+    static const int BufSize = 4096;            // Size of copy buffer
 
 
     // Check parameter
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/stream.h estic-1.60-linux/spunk/stream.h
--- es160src/spunk/stream.h	1996-11-07 18:06:52.000000000 +0100
+++ estic-1.60-linux/spunk/stream.h	2004-07-06 22:45:32.979582312 +0200
@@ -50,19 +50,19 @@
 
 
 
-static const stOk           =  0;   // things are allright
-static const stInitError    =  1;   // error initializing the stream
-static const stReadError    =  2;   // error reading from the stream
-static const stWriteError   =  3;   // error writing to the stream
-static const stGetError     =  4;   // get found not registered class
-static const stPutError     =  5;   // put found not registered class
-static const stMemoryError  =  6;   // not enough memory
-static const stStoreError   =  7;   // Keine Store-Methode angegeben
-static const stLoadError    =  8;   // Keine Load-Methode oder Fehler bei Load
-static const stCopyError    =  9;   // CopyFrom: error of source stream
-static const stSeekError    = 10;   // error using Seek, GetPos etc.
-static const stReadTimeout  = 11;   // Timeout on read (CharacterStream only)
-static const stWriteTimeout = 12;   // Timeout on write (CharcterStream only)
+static const int stOk           =  0;   // things are allright
+static const int stInitError    =  1;   // error initializing the stream
+static const int stReadError    =  2;   // error reading from the stream
+static const int stWriteError   =  3;   // error writing to the stream
+static const int stGetError     =  4;   // get found not registered class
+static const int stPutError     =  5;   // put found not registered class
+static const int stMemoryError  =  6;   // not enough memory
+static const int stStoreError   =  7;   // Keine Store-Methode angegeben
+static const int stLoadError    =  8;   // Keine Load-Methode oder Fehler bei Load
+static const int stCopyError    =  9;   // CopyFrom: error of source stream
+static const int stSeekError    = 10;   // error using Seek, GetPos etc.
+static const int stReadTimeout  = 11;   // Timeout on read (CharacterStream only)
+static const int stWriteTimeout = 12;   // Timeout on write (CharcterStream only)
 
 
 
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/textstrm.cc estic-1.60-linux/spunk/textstrm.cc
--- es160src/spunk/textstrm.cc	1996-11-07 18:06:52.000000000 +0100
+++ estic-1.60-linux/spunk/textstrm.cc	2004-07-06 23:06:29.205606928 +0200
@@ -66,8 +66,8 @@
 // LineLen is the estimated length of a line in the file used for
 // estimating the size of the buffer.
 {
-    static const Delta   = 100;
-    static const BufSize = 4096;
+    static const int Delta   = 100;
+    static const unsigned BufSize = 4096;
 
     // Estimate the count of lines
     if ((Limit = Size / LineLen) < 100) {
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/unixsrc/delay.cc estic-1.60-linux/spunk/unixsrc/delay.cc
--- es160src/spunk/unixsrc/delay.cc	1996-11-07 18:06:58.000000000 +0100
+++ estic-1.60-linux/spunk/unixsrc/delay.cc	2004-07-06 22:47:46.376302928 +0200
@@ -73,7 +73,7 @@
 //
 // The function returns the real time passed or just ms.
 {
-    const ChunkSize = 256;
+    const u32 ChunkSize = 256;
 
     // Check the argument...
     if (ms <= ChunkSize) {
diff --exclude '*.o' --exclude .depend -Nru es160src/spunk/window.cc estic-1.60-linux/spunk/window.cc
--- es160src/spunk/window.cc	1997-01-26 18:17:38.000000000 +0100
+++ estic-1.60-linux/spunk/window.cc	2004-07-06 23:08:00.333753344 +0200
@@ -1432,7 +1432,7 @@
 // Write a string to the inner window. Note: Attr is an index, not a real
 // attribute !
 {
-    const BufSize = 256;
+    const int BufSize = 256;
     u16 Buf [256];
 
     // Check if the given string is empty
@@ -1554,7 +1554,7 @@
 // Write a string to the inner window. Note: Attr is an index, not a real
 // attribute !
 {
-    const BufSize = 256;
+    const unsigned BufSize = 256;
     u16 Buf [BufSize];
 
     // If the Y coord is outside the inner window, there is nothing to do
