diff -uNr a/tinyscheme/scheme-knobs.h b/tinyscheme/scheme-knobs.h
--- a/tinyscheme/scheme-knobs.h false
+++ b/tinyscheme/scheme-knobs.h c9e5508d4522aebf20480f5d58bfbbdf3118155cdca7aad2d2837d33aa5305cfa8a318dd2c8443ff5300c2bb8903466514d6051e070da34b3f93b95ebaeadb06
@@ -0,0 +1,9 @@
+#ifndef SCHEME_KNOBS_H
+#define SCHEME_KNOBS_H
+
+#define STANDALONE       0
+#define USE_INTERFACE    1
+#define USE_MATH         1
+#define prompt        "#>"
+
+#endif
diff -uNr a/tinyscheme/scheme.c b/tinyscheme/scheme.c
--- a/tinyscheme/scheme.c 6fd96891d2f0c28183f034b595636c7d53fa0867354702c6d9b72117c6203ddd205ac1b3a9572976f4e451345ad3eb2df538be8391280276879294c9e42145e1
+++ b/tinyscheme/scheme.c b9f2c8885474fd6b4f7d36955799716e68161be8f8cfce3640ade942fe0064a00d64c7dabc3ec36b24797760b99ea6c79d74a8f984dcc3aeac2eef183b3ed70b
@@ -1,3 +1,8 @@
+/*
+    This version de-crudded for therealbitcoin.org.
+    Applied interactive REPL fixups for port redirect mode.
+ */
+
 /* T I N Y S C H E M E    1 . 4 1
  *   Dimitrios Souflis (dsouflis@acm.org)
  *   Based on MiniScheme (original credits follow)
@@ -13,8 +18,9 @@
  */
 
 #define _SCHEME_SOURCE
-
+#include "scheme-knobs.h"
 #include "scheme-private.h"
+
 #include <unistd.h>
 #include <sys/types.h>
 
@@ -28,9 +34,7 @@
 
 #if USE_STRCASECMP
 #include <strings.h>
-# ifndef __APPLE__
-#  define stricmp strcasecmp
-# endif
+#define stricmp strcasecmp
 #endif
 
 const char* tiny_scheme_version = PACKAGE_VERSION;
@@ -65,23 +69,6 @@
 #include <string.h>
 #include <stdlib.h>
 
-#ifdef __APPLE__
-static int stricmp(const char *s1, const char *s2)
-{
-  unsigned char c1, c2;
-  do {
-    c1 = tolower(*s1);
-    c2 = tolower(*s2);
-    if (c1 < c2)
-      return -1;
-    else if (c1 > c2)
-      return 1;
-    s1++, s2++;
-  } while (c1 != 0);
-  return 0;
-}
-#endif /* __APPLE__ */
-
 #if USE_STRLWR
 static const char *strlwr(char *s) {
   const char *p=s;
@@ -4950,19 +4937,7 @@
 
 #if STANDALONE
 
-#if defined(__APPLE__) && !defined (OSX)
-int main()
-{
-     extern MacTS_main(int argc, char **argv);
-     char**    argv;
-     int argc = ccommand(&argv);
-     MacTS_main(argc,argv);
-     return 0;
-}
-int MacTS_main(int argc, char **argv) {
-#else
 int main(int argc, char **argv) {
-#endif
   scheme sc;
   FILE *fin;
   char *file_name=InitFile;
@@ -5046,9 +5021,3 @@
 }
 
 #endif
-
-/*
-Local variables:
-c-file-style: "k&r"
-End:
-*/
diff -uNr a/tinyscheme/scheme.h b/tinyscheme/scheme.h
--- a/tinyscheme/scheme.h b0b63ff8b7ccf6a181c6e5ac8941801661ac03f57ddf743b11afb3f9f53108428cb3c85e5d8876508d4d412a671f49e3518b1d7847a03592516f23b679d61fd3
+++ b/tinyscheme/scheme.h ff0b30c650a38189be4bb174a60143d1ea61061bc56838b49cbe63190ca0fcc15409e7ce7540b2a433ede6bb1dfe97baa901fdea86d480224a36b69519e94171
@@ -3,6 +3,10 @@
 #ifndef _SCHEME_H
 #define _SCHEME_H
 
+#include "scheme-knobs.h"
+
+#define PACKAGE_VERSION "TRB"
+
 #include <stdio.h>
 
 #ifdef __cplusplus