Various improvements to undo file code to make it more robust.
diff --git a/src/misc2.c b/src/misc2.c
index 470bc2f..f5bad9c 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -6134,7 +6134,7 @@
 get2c(fd)
     FILE	*fd;
 {
-    long	n;
+    int		n;
 
     n = getc(fd);
     n = (n << 8) + getc(fd);
@@ -6148,7 +6148,7 @@
 get3c(fd)
     FILE	*fd;
 {
-    long	n;
+    int		n;
 
     n = getc(fd);
     n = (n << 8) + getc(fd);
@@ -6163,7 +6163,7 @@
 get4c(fd)
     FILE	*fd;
 {
-    long	n;
+    int		n;
 
     n = getc(fd);
     n = (n << 8) + getc(fd);