diff -Naur mpg123-0.59q/Makefile mpg123_liveice/Makefile
--- mpg123-0.59q/Makefile	Tue Jan 26 14:35:18 1999
+++ mpg123_liveice/Makefile	Sat Apr 10 17:30:45 1999
@@ -419,11 +419,11 @@
 mpg123: mpg123.o common.o $(OBJECTS) decode_2to1.o decode_4to1.o \
 		tabinit.o audio.o layer1.o layer2.o layer3.o buffer.o \
 		getlopt.o httpget.o xfermem.o equalizer.o \
-		decode_ntom.o Makefile wav.o readers.o
+		decode_ntom.o Makefile wav.o readers.o liveice.o
 	$(CC) $(CFLAGS) $(LDFLAGS)  mpg123.o tabinit.o common.o layer1.o \
 		layer2.o layer3.o audio.o buffer.o decode_2to1.o equalizer.o \
 		decode_4to1.o getlopt.o httpget.o xfermem.o decode_ntom.o \
-		wav.o readers.o \
+		wav.o readers.o liveice.o \
 		$(OBJECTS) -o $(BINNAME) -lm $(AUDIO_LIB)
 
 mpg123.exe: mpg123.o common.o $(OBJECTS) decode_2to1.o decode_4to1.o \
@@ -471,6 +471,7 @@
 control_sajber.o:	jukebox/controldata.h mpg123.h
 wav.o:		mpg123.h
 readers.o:	mpg123.h
+liveice.o:      mpg123.h
 
 ###########################################################################
 ###########################################################################
diff -Naur mpg123-0.59q/liveice.c mpg123_liveice/liveice.c
--- mpg123-0.59q/liveice.c	Thu Jan  1 00:00:00 1970
+++ mpg123_liveice/liveice.c	Sat Apr 10 17:37:57 1999
@@ -0,0 +1,88 @@
+
+
+#include <unistd.h>
+#include <fcntl.h>
+
+#include "mpg123.h"
+
+extern int back_frame(struct reader *rds,struct frame *fr,int num);
+
+
+
+/* initialze terminal */
+/*void term_init(void)
+  {
+  struct termios tbuf;
+  term_enable = 0;
+  
+  if(tcgetattr(0,&tbuf) < 0) {
+  fprintf(stderr,"Can't get terminal attributes\n");
+  return;
+  }
+  tsave=tbuf;
+  tbuf.c_lflag &= ~(ICANON | ECHO );
+  tbuf.c_cc[VMIN] = 0;
+  tbuf.c_cc[VTIME] = 0;
+  
+  if(tcsetattr(0,TCSANOW,&tbuf) < 0) {
+  fprintf(stderr,"Can't set terminal attributes\n");
+  return;
+  }
+  
+  term_enable = 1;
+  
+  }
+*/
+
+void liveice_input_init(void)
+{
+	int flags;
+	flags=fcntl(0,F_GETFL);
+	flags=flags | O_NONBLOCK;
+	fcntl(0,F_SETFL,flags);
+}
+
+
+void liveice_control(struct frame *fr)
+{
+  int framecnt,n = 1;
+  char inp;
+  int ok;
+  /*
+  if(!term_enable)
+    return;
+  */
+  inp=getchar();
+    
+  switch(inp) {
+  case 'B':
+  case 'b':
+    rd->rewind(rd);
+          break;
+  case 'f':
+    ok=1;
+    for (framecnt = 0; ok && (framecnt < 100); framecnt++) {
+      ok = read_frame(fr);
+      if (fr->lay == 3)
+	set_pointer(512);
+    }
+    break;
+  case 'F':
+    ok=1;
+    for (framecnt = 0; ok && (framecnt < 1000); framecnt++) {
+      ok = read_frame(fr);
+      if (fr->lay == 3)
+	set_pointer(512);
+    }
+    break;
+  case 'c':
+      ok= back_frame(rd,fr,100);
+    break;
+  case 'C':
+      ok= back_frame(rd,fr,1000);
+    break;
+  }
+}
+ 
+
+
diff -Naur mpg123-0.59q/mpg123.c mpg123_liveice/mpg123.c
--- mpg123-0.59q/mpg123.c	Tue Jan 26 12:47:05 1999
+++ mpg123_liveice/mpg123.c	Sat Apr 10 17:33:32 1999
@@ -863,6 +863,12 @@
 
 		init = 1;
 		newFrame = startFrame;
+
+
+		/* initialise stdin to non-blocking mode */
+		liveice_input_init();
+
+
 #ifdef TERM_CONTROL
 		term_init();
 #endif
@@ -889,6 +895,7 @@
 					print_stat(&fr,frameNum,0,&ai);
 #endif
 			}
+			liveice_control(&fr);
 #ifdef TERM_CONTROL
 			term_control();
 #endif
diff -Naur mpg123-0.59q/mpg123.h mpg123_liveice/mpg123.h
--- mpg123-0.59q/mpg123.h	Tue Jan 26 12:47:05 1999
+++ mpg123_liveice/mpg123.h	Sat Apr 10 17:32:57 1999
@@ -320,6 +320,10 @@
 
 extern struct parameter param;
 
+extern void liveice_input_init(void);
+extern void liveice_control(struct frame *fr);
+
+
 /* 486 optimizations */
 #define FIR_BUFFER_SIZE  128
 extern void dct64_486(int *a,int *b,real *c);
