diff -ur ari/Makefile ari-eota/Makefile
--- ari/Makefile	Sat Apr 11 06:43:12 1992
+++ ari-eota/Makefile	Tue Feb 19 01:00:37 2002
@@ -29,7 +29,7 @@
 #TERMIO = -DTERMIO
 #
 # assert when get merged ari. Never assert to get separated ari and skksrch.
-#MERGE = -DMERGE
+MERGE = -DMERGE
 #
 # assert when rename() is unavailable.
 #  NOTICE: rename() on MINIX 1.5 for IBM/PC, etc seems wrong to use.
@@ -39,14 +39,14 @@
 # select
 #
 # MINIX for IBM-PC, NEC PC-98 with ACK C.
-C2OBJ = -S
-OBJ2E = -o $@
-COPT = -F
-CC = cc
-LDFLAGS = -i
-O = s
-TTYIO = mnxio
-DEPENDENCY = -DSMALL_REG
+#C2OBJ = -S
+#OBJ2E = -o $@
+#COPT = -F
+#CC = cc
+#LDFLAGS = -i
+#O = s
+#TTYIO = mnxio
+#DEPENDENCY = -DSMALL_REG
 #------------------
 #
 # Other systems; MacMINIX, MINIX-ST, BSD, sysV, etc.
@@ -58,10 +58,24 @@
 #TTYIO = mnxio
 #DEPENDENCY = 
 #----------------------------------------------------------------------------#
+# MINIX for IBM-PC, NEC PC-98 with ACK C.
+C2OBJ = -c
+OBJ2E = -Bstatic -o $@  -e ${ENTRY} -Ttext=$(STARTADDR)
+#COPT = -g
+CC = gcc
+O = o
+TTYIO = mnxio
+DEPENDENCY = -DSMALL_REG
 
+ROOT=../../EOTA-CUR/kernel
+NEWLIB=../../libc/newlib-1.8.1-eota/eota/newlib
+LIBS=$(NEWLIB)/crt0.o $(NEWLIB)/libc.a
+KERNLIBS=$(ROOT)/POSIX/libc/libgt.a $(ROOT)/POSIX/libc/libnative.a #$(ROOT)/ITRON/kernlib/libkernel.a 
+STARTADDR=0x00001000
+ENTRY=_start
 
 CFLAGS = $(COPT) -I. -DARI $(TERMIO) $(NO_STDLIB) $(NO_STRING) \
- $(MERGE) $(NO_RENAME) $(DEPENDENCY)
+ $(MERGE) $(NO_RENAME) $(DEPENDENCY) -I$(NEWLIB)/targ-include  -I$(NEWLIB)/libc/include -DEOTA
 
 CMN_OBJ = ae.$O lazy.$O kanakan.$O
 TTYIO_OBJ = $(TTYIO).$O
@@ -75,7 +89,8 @@
 	$(CC) $(LDFLAGS) $(OBJ2E) $(ARI_OBJ)
 
 m_ari$E: $(MERGED_OBJ)
-	$(CC) $(LDFLAGS) $(OBJ2E) $(MERGED_OBJ)
+	$(LD) $(OBJ2E) $(MERGED_OBJ) $(LIBS) $(KERNLIBS)
+	strip $@
 
 $(CMN_OBJ): lazy.h config.h
 $(SKK_OBJ): config.h
diff -ur ari/ae.c ari-eota/ae.c
--- ari/ae.c	Mon Apr 13 19:06:10 1992
+++ ari-eota/ae.c	Sun Feb 11 13:46:11 2001
@@ -70,9 +70,15 @@
 # include <curses.h>
 #endif
 
+#ifndef EOTA
 int done;
 int row, col;
 int index, page, epage;
+#else
+int done = 0;
+int row = 0, col = 0;
+int index = 0, page = 0, epage = 0;
+#endif
 #ifdef ARI
 ic_t buf[BUF];
 ic_t *ebuf;
@@ -194,6 +200,7 @@
 #endif
 
 #ifdef ARI
+#ifndef EOTA
 char key[] = {
 	'h', 'j', 'k', 'l',
 	'b', '\06','\02', 'w',
@@ -204,6 +211,18 @@
 	'Y', '\07', '^', 'X', 'y',
 	'\0'
 };
+#else
+char key[] = {
+	'h', 'j', 'k', 'l',
+	'b', 'H','J', 'w',
+	'0', '$', 'T', 'B',
+	'i', 'x', 'R',
+	':', 'D', 'd', 'O', 'o',
+	'I', 'A', 'P', 'p',
+	'Y', '\07', '^', 'X', 'y',
+	'\0'
+};
+#endif
 void (*func[])() = {
 	left, down, up, right,
 	wleft, pgdown, pgup, wright,
@@ -533,6 +552,9 @@
 #ifdef ARI
 	int n;
 #endif
+#ifdef EOTA
+	if (fname == NULL) return 0;
+#endif
 	index = 0;
 	movegap();
 #ifdef ARI
@@ -638,8 +660,13 @@
 	fbuf = (char *)&buf[BUF/2];
 #endif
 	egap = ebuf = buf + BUF;
+#ifndef EOTA
 	if (argc < 2)
 		return (2);
+#else
+	for(i = 0; i < BUF; ++i) buf[i] = 0;
+	for(i = 0; i < SYSBUF; ++i) sysbuf[i] = 0;
+#endif
 #ifdef ARI
 	ctrlflag = 0;
 	initiocode();
@@ -654,6 +681,7 @@
 	noecho();
 	idlok(stdscr, 1);
 #endif
+#ifndef EOTA
 	if (0 < (i = open(filename = *++argv, 0))) {
 #ifdef ARI
 		n = read(i, fbuf, BUF);
@@ -666,6 +694,24 @@
 			gap = buf;
 		close(i);
 	}
+#else
+	if (argc >= 2) {
+	  if (0 < (i = open(filename = *++argv, 0))) {
+#ifdef ARI
+	    n = read(i, fbuf, BUF);
+	    n = (*ctoic)(fbuf, n, buf, BUF);
+	    gap += n;
+#else
+	    gap += read(i, buf, BUF);
+#endif
+	    if (gap < buf)
+	      gap = buf;
+	    close(i);
+	  }
+	}
+	else
+	  filename = NULL;
+#endif
 	top();
 	while (!done) {
 		display();
@@ -684,8 +730,10 @@
 	endwin();
 #ifdef ARI
 	printf("\n");
+#ifndef EOTA
 	closekkf();
 #endif
+#endif
 	return (0);
 }
 #ifdef ARI
@@ -741,7 +789,11 @@
 	p[0] = (ic_t)':';
 	p[1] = 0;
 	display();
+#ifndef EOTA
 	while ((n = getch()) != '\r') {
+#else
+	while (((n = getch()) != '\r') && (n != '\n')) {
+#endif
 		if (n == '\b') {
 			p[--pos] = 0;
 			if (pos < 1) break;
diff -ur ari/config.h ari-eota/config.h
--- ari/config.h	Mon Apr 13 19:12:09 1992
+++ ari-eota/config.h	Wed Aug 23 17:53:40 2000
@@ -27,6 +27,8 @@
  *----------------------------------------------------------------------------*
  * value
  */
+#define register
+
 #define MODE	0666	/* mode at creating file to write                     */
 
 #define BUF	16383	/*  maximum text size;                                *
diff -ur ari/kanakan.c ari-eota/kanakan.c
--- ari/kanakan.c	Sat Apr 11 06:39:26 1992
+++ ari-eota/kanakan.c	Sun Feb 11 13:46:12 2001
@@ -288,9 +288,15 @@
                 *cp++ = '^';
             mode = MODE_V;
         }
+#ifndef EOTA
         else if (c == '\012') {    /* ^J */
             mode = MODE_J;
         }
+#else
+        else if (c == 0x0F) {    /* ^O */
+            mode = MODE_J;
+        }
+#endif
         else {
             if (mode == MODE_L) c = l_ascii(c);
             if (cp < ep)
@@ -344,10 +350,17 @@
         else
             if (cp < ep) *cp++ = c;
     }
+#ifndef EOTA
     else if (c == '\012') {	/* ^J */
         kana_care();
         out_k();
     }
+#else
+    else if (c == 0x0F) {	/* ^O */
+        kana_care();
+        out_k();
+    }
+#endif
     else if (c == '\b') {
         if (bp < cp) {
             c2 = c1; c1 = c0; c0 = 0;
diff -ur ari/lazy.c ari-eota/lazy.c
--- ari/lazy.c	Sat Apr 11 06:39:48 1992
+++ ari-eota/lazy.c	Tue Feb 19 01:00:19 2002
@@ -44,7 +44,11 @@
 /*
  * OS or machine depended tty control functions
  */
+#ifndef EOTA
 extern void init_tty(), end_tty(), out_tty();
+#else
+extern void out_tty();
+#endif
 
 static int cur_x, cur_y;
 
@@ -61,7 +65,11 @@
 
 static char _wbuf[20];		/* work buffer */
 #define MOVE(y,x)	(sprintf(_wbuf, "\033[%d;%dH", (y)+1, (x)+1), _wbuf)
+#ifndef EOTA
 #define CLEAR		"\033[H\033[0J"
+#else
+#define CLEAR		"\033[H\033[2J"
+#endif
 #define CLRTOEOL	"\033[K"
 
 #ifdef SMALL_POOL
@@ -90,10 +98,22 @@
 initwin()
 {
 	char *s;
+	struct winsize {
+	  unsigned short int ws_row;
+	  unsigned short int ws_col;
+	  unsigned short int ws_xpixel;
+	  unsigned short int ws_ypixel;
+	} ws;
+	
+#ifdef EOTA
+#endif
 
+#ifndef EOTA
 	init_tty();
+#endif
 	LINES = DEFAULT_LINES;
 	COLS = DEFAULT_COLS;
+#ifndef EOTA
 	if ((s = getenv("LINES")) != NULL) {
 		LINES = atoi(s);
 		LINES = (LINES > MAX_LINES)? MAX_LINES:LINES;
@@ -102,6 +122,13 @@
 		COLS = atoi(s);
 		COLS = (COLS > MAX_COLS)? MAX_COLS:COLS;
 	}
+#else
+	get_winsz(1, &ws);
+	LINES = ws.ws_row;
+	LINES = (LINES > MAX_LINES)? MAX_LINES:LINES;
+	COLS = ws.ws_col;
+	COLS = (COLS > MAX_COLS)? MAX_COLS:COLS;
+#endif
 	ctrlflag &= ~F_TABEXPAND;
 	tabsz = 8; /* default tabsize */
 	clear();
@@ -111,7 +138,9 @@
 void
 endwin()
 {
+#ifndef EOTA
 	end_tty();
+#endif
 	outstr(MOVE(LINES, 0));
 	outflush();
 }
diff -ur ari/mnxio.c ari-eota/mnxio.c
--- ari/mnxio.c	Mon Apr 13 18:31:17 1992
+++ ari-eota/mnxio.c	Sun Feb 11 13:46:16 2001
@@ -24,6 +24,7 @@
  */
  
 #include "config.h"
+#ifndef EOTA
 #ifdef TERMIO
 # include <termio.h>
   static struct termio sav, cur;
@@ -74,6 +75,9 @@
 	ioctl(2, TIOCSETP, &sav);
 #endif
 }
+#else
+char *scrctl_conf = "dum";
+#endif
 
 void
 out_tty(s, n)
diff -ur ari/skksrch.c ari-eota/skksrch.c
--- ari/skksrch.c	Sat Apr 11 06:42:03 1992
+++ ari-eota/skksrch.c	Sun Feb 11 13:46:17 2001
@@ -111,6 +111,9 @@
 # define DIC_WRMODE	"wb"
 # define SAV_SUFFIX	".BAK"
 #else  /* minix, bsd, sysv, etc */
+#ifdef EOTA
+#define DEFAULT_GDIC    "/SKK-JISYO.M"
+#endif
 # define DEFAULT_LDIC	"/.skk-jisyo"
 # define DIC_RDMODE	"r"
 # define DIC_WRMODE	"w"
@@ -242,10 +245,14 @@
         exit (0);
     }
 #endif
-
+#ifndef EOTA
     if (gdic_name == NULL) {
         gdic_name = getenv("SKK_JISYO");
     }
+#else
+    gdic_name = DEFAULT_GDIC;
+    ldic_name = DEFAULT_LDIC;
+#endif
     Debug((stderr,"global jisyo : %s\n",gdic_name==NULL? "NONE": gdic_name));
     if (ldic_name == NULL) {
         if ((ldic_name = getenv("LOCAL_SKK_JISYO")) == NULL) {
@@ -424,7 +431,7 @@
     fseek(fp, 0L, 0);
     idx = 0;
     p->pos[idx] = 0L;
-    while ((c1 = fgetc(fp)) == ' ') {
+    while ((c1 = fgetc(fp)) == ';') {
         skip_entry(fp);
     }
     if (c1 == EOF) {
