Index: lib700/bitrev.c
===================================================================
--- lib700/bitrev.c	(revision ace9ee7c600154a28118ffa2254657dbb38791ef)
+++ lib700/bitrev.c	(revision 99cac8608770916f6368b2cb7e41876121107061)
@@ -8,5 +8,5 @@
 #include "ram.h"
 
-static int16_t bitmask[] = {
+static uint16_t bitmask[] = {
 
 	0x0001, 0x0002, 0x0004, 0x0008,
@@ -24,7 +24,8 @@
 */
 
-int16_t bitrev(int16_t bitsin, int16_t nbits)
+uint16_t bitrev(uint16_t bitsin, int16_t nbits)
 {
-	int16_t	m, n;
+	uint16_t n;
+	int16_t	m;
 
 	n = 0;
Index: lib700/bitrev.x
===================================================================
--- lib700/bitrev.x	(revision ace9ee7c600154a28118ffa2254657dbb38791ef)
+++ lib700/bitrev.x	(revision 99cac8608770916f6368b2cb7e41876121107061)
@@ -15,3 +15,3 @@
 */
 
-extern	int16_t		bitrev(int16_t bitsin, int16_t nbits);
+extern	uint16_t	bitrev(uint16_t bitsin, int16_t nbits);
Index: lib700/ctype.c
===================================================================
--- lib700/ctype.c	(revision ace9ee7c600154a28118ffa2254657dbb38791ef)
+++ lib700/ctype.c	(revision 99cac8608770916f6368b2cb7e41876121107061)
@@ -12,6 +12,4 @@
 */
 
-#define	_CTYPE_C
-
 #include "ram.h"
 
@@ -22,5 +20,5 @@
 #define	_LX	_L|_X
 
-int8_t __atab[] = {	/* EOF won't work properly with this table */
+uint8_t __atab[] = {	/* EOF won't work properly with this table */
 
 	/* Octal */						/* Hex */
Index: lib700/ctype.x
===================================================================
--- lib700/ctype.x	(revision ace9ee7c600154a28118ffa2254657dbb38791ef)
+++ lib700/ctype.x	(revision 99cac8608770916f6368b2cb7e41876121107061)
@@ -15,3 +15,3 @@
 */
 
-extern	int8_t		__atab[];
+extern	uint8_t		__atab[];
Index: lib700/micons.c
===================================================================
--- lib700/micons.c	(revision ace9ee7c600154a28118ffa2254657dbb38791ef)
+++ lib700/micons.c	(revision 99cac8608770916f6368b2cb7e41876121107061)
@@ -4,19 +4,9 @@
 	Version 3 -- 1987-06-11 -- D.N. Lynx Crowe
 
-	short
-	micons(wi)
-	short wi;
+	micon16(wi)
 
 		Convert between motorola and intel format for a short.
 
-	int
-	miconi(wi)
-	int wi;
-
-		Convert between motorola and intel format for an int.
-
-	long
-	miconl(wi)
-	long wi;
+	micon32(wi)
 
 		Convert between motorola and intel format for a long.
@@ -30,34 +20,23 @@
 /*
    =============================================================================
-	micons(wi) -- Convert between motorola and intel format for a short.
+	micon16(wi) -- Convert between motorola and intel format for a short.
    =============================================================================
 */
 
-int16_t micons(int16_t wi)
+uint16_t micon16(uint16_t wi)
 {
-	return((int16_t)( ((wi << 8) & 0xFF00) | ((wi >> 8) & 0x00FF) ) );
+	return(((wi << 8) & 0xFF00u) | ((wi >> 8) & 0x00FFu));
 }
 
 /*
    =============================================================================
-	miconi(wi) -- Convert between motorola and intel format for an int.
+	micon32(wi) -- Convert between motorola and intel format for a long.
    =============================================================================
 */
 
-int16_t miconi(int16_t wi)
+uint32_t micon32(uint32_t wi)
 {
-	return(((wi << 8) & 0xFF00) | ((wi >> 8) & 0x00FF));
-}
-
-/*
-   =============================================================================
-	miconl(wi) -- Convert between motorola and intel format for a long.
-   =============================================================================
-*/
-
-int32_t miconl(int32_t wi)
-{
-	return( ((wi << 24) & 0xFF000000L) | ((wi << 8) & 0x00FF0000L) |
-		((wi >> 8) & 0x0000FF00L) | ((wi >> 24) & 0x000000FFL) );
+	return(((wi << 24) & 0xFF000000ul) | ((wi << 8) & 0x00FF0000ul) |
+		((wi >> 8) & 0x0000FF00ul) | ((wi >> 24) & 0x000000FFul));
 }
 
Index: lib700/micons.x
===================================================================
--- lib700/micons.x	(revision ace9ee7c600154a28118ffa2254657dbb38791ef)
+++ lib700/micons.x	(revision 99cac8608770916f6368b2cb7e41876121107061)
@@ -15,5 +15,4 @@
 */
 
-extern	int16_t		miconi(int16_t wi);
-extern	int32_t		miconl(int32_t wi);
-extern	int16_t		micons(int16_t wi);
+extern	uint16_t	micon16(uint16_t wi);
+extern	uint32_t	micon32(uint32_t wi);
