diff -Nru a/Conquest/src/combat.c b/Conquest/src/combat.c
--- a/Conquest/src/combat.c	1994-12-20 00:08:48.000000000 +0200
+++ b/Conquest/src/combat.c	2011-04-05 14:21:48.051684803 +0300
@@ -8,7 +8,7 @@
 /* Player attack at star. Assumes warships and enemy planet present */
 void playerattack(int starnum)
 {
-  boolean battle;
+  boolean battle = TRUE;
   char command;
   struct stplanet *pplanet;
 
diff -Nru a/Conquest/src/commands.c b/Conquest/src/commands.c
--- a/Conquest/src/commands.c	1994-12-20 00:09:52.000000000 +0200
+++ b/Conquest/src/commands.c	2011-04-05 14:21:48.051684803 +0300
@@ -11,7 +11,7 @@
   tplanet *pplanet; 
   int factors,starnum; 
   char iline[81]; 
-  int ind = 1, amount; 
+  int amount; 
 
   printf("last");
   clear_left();
@@ -174,7 +174,7 @@
 
 void inputplayer()
 {
-  char key; 
+  int key; 
   boolean fin;
 
   point(33,20);
@@ -225,8 +225,7 @@
       ressum();
       break;
      case 'Q':
-      fin = true;
-      quit();
+      fin = quit();
       break;
      case '?':
       break;
@@ -415,15 +414,21 @@
   print_tf(tfnum);
 }
 
-void quit()
+boolean quit()
 {
   clear_screen();
   printf("Quit game....[verify]\n");
 
   if (get_char() != 'Y')
+  {
     printmap();
+    return false;
+  }
   else 
+  {
     game_over = true;
+    return true;
+  }
 }
 
 void send_tf()
@@ -473,7 +478,7 @@
   boolean printtf; 
   char iline[81]; 
   char key;
-  int cost,amount,ind = 1,new_tf,balance;
+  int cost,amount,new_tf,balance;
   int trash1, trash2;
   
   new_tf = get_tf(player,planet->pstar);
diff -Nru a/Conquest/src/config.c b/Conquest/src/config.c
--- a/Conquest/src/config.c	1994-02-22 13:41:10.000000000 +0200
+++ b/Conquest/src/config.c	2011-04-05 14:21:48.051684803 +0300
@@ -1,6 +1,10 @@
 /* Config.c - configuration file handler */
 
+#include <ctype.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
 #include "defs.h"
 #include "structs.h"
 
@@ -39,7 +43,7 @@
      case '\n':
      case 0: break;
      default: 
-      for (b=b; (*b = tolower(*b)); b++);
+      for (b=buf; (*b = tolower(*b)); b++);
       return(buf);
     }
   }
@@ -75,8 +79,9 @@
   FILE *cf;
   int i;
 
-  if (cf != fopen(filename,"r"))
+  if (!(cf = fopen(filename,"r")))
     return(FALSE);
+  printf("read %s\n", filename);
 
   for (;;)
   {
diff -Nru a/Conquest/src/display.c b/Conquest/src/display.c
--- a/Conquest/src/display.c	1994-09-03 11:40:50.000000000 +0300
+++ b/Conquest/src/display.c	2011-04-05 14:21:48.051684803 +0300
@@ -119,6 +119,10 @@
   bottom_field = 0;
   for (i1 = 19; i1<=24; i1++)
     left_line[i1] = false;
+
+  print_res('V');
+  print_res('R');
+  print_res('W');
 }
 
 void print_col()
@@ -326,9 +330,9 @@
 
       if (tf[player][i].eta != 0)
       {
-	printf("%c2m", 0x9b); /* FOO? */
+	/* printf("\e[1m"); */ /* FOO? */
 	printf("%c%d", tf[player][i].dest+'A'-1, tf[player][i].eta);
-	printf("%c0m", 0x9b);
+	/* printf("\e[0m"); */
       }
       point(x_cursor, y_cursor+1);
     }
diff -Nru a/Conquest/src/enemy.c b/Conquest/src/enemy.c
--- a/Conquest/src/enemy.c	1994-09-03 19:09:06.000000000 +0300
+++ b/Conquest/src/enemy.c	2011-04-05 14:21:48.051684803 +0300
@@ -446,7 +446,7 @@
   while ((pplanet != NULL) && (!result))
   {
     if ((pplanet->team==ENEMY) && (pplanet->iu > 10) &&
-	((6*pplanet->amb+pplanet->mb) < round(pplanet->iu/15.0)))
+	((6*pplanet->amb+pplanet->mb) < c_round(pplanet->iu/15.0)))
       return(TRUE);
     pplanet = pplanet->next;
   }
diff -Nru a/Conquest/src/init.c b/Conquest/src/init.c
--- a/Conquest/src/init.c	1994-12-20 00:10:18.000000000 +0200
+++ b/Conquest/src/init.c	2011-04-05 14:21:48.051684803 +0300
@@ -2,6 +2,9 @@
 #include <stdio.h>
 #include <sgtty.h>
 #include <stdlib.h>
+#include <string.h>
+#include <termio.h>
+#include <time.h>
 
 #include "defs.h"
 #include "structs.h"
@@ -13,20 +16,21 @@
 void setup_term()
 {
   char *termname;
-  struct sgttyb ttyinfo;
+  struct termio term;
   
   if ((termname = getenv("TERM")) != NULL) /* Some kind of TERM set */
   {
     printf("Terminal type is %s.\n", termname);
-    if (termname == "xterm") terminal_type = xterm;
-    if (termname == "vt100") terminal_type = vt100;
-    if (termname == "vt52") terminal_type = vt52;
-    if (termname == "adm3") terminal_type = adm3;
-    if (termname == "vis400") terminal_type = vis400;
-    if (termname == "hpterm") terminal_type = hpterm;
-    if (termname == "vi") terminal_type = vi; /* WHY??? */
-    if (termname == "concept") terminal_type = concept;
-    if (termname == "hardcopy") terminal_type = hardcopy;
+    if (strcmp(termname, "xterm") == 0) terminal_type = xterm;
+    if (strcmp(termname, "rxvt") == 0) terminal_type = xterm;
+    if (strcmp(termname, "vt100") == 0) terminal_type = vt100;
+    if (strcmp(termname, "vt52") == 0) terminal_type = vt52;
+    if (strcmp(termname, "adm3") == 0) terminal_type = adm3;
+    if (strcmp(termname, "vis400") == 0) terminal_type = vis400;
+    if (strcmp(termname, "hpterm") == 0) terminal_type = hpterm;
+    if (strcmp(termname, "vi") == 0) terminal_type = vi; /* WHY??? */
+    if (strcmp(termname, "concept") == 0) terminal_type = concept;
+    if (strcmp(termname, "hardcopy") == 0) terminal_type = hardcopy;
     if (terminal_type == unknown)
     {
       printf("Unknown terminal type %s - using vt100.\n", termname);
@@ -37,9 +41,10 @@
     terminal_type = vt100; /* For systems without $TERM */
 
   raw_fd = stdin;
-  ioctl(fileno(raw_fd), TIOCGETP, &ttyinfo);
-  ttyinfo.sg_flags |= RAW;
-  ioctl(fileno(raw_fd), TIOCSETP, &ttyinfo);
+  ioctl(fileno(raw_fd), TCGETA, &term);
+  term.c_lflag &= ~ICANON;
+  term.c_lflag &= ~ECHO;
+  ioctl(fileno(raw_fd), TCSETA, &term);
   setbuf(raw_fd, NULL);
 }
 
@@ -51,7 +56,7 @@
   setup_term();
   
   printf("\n* Welcome to CONQUEST! *\n\n");
-  printf("Amiga version 1.2.1\n");
+  printf("Amiga version 1.2.1 backported to UNIX\n");
   printf("Hit return to continue\n");
   get_char();
   
diff -Nru a/Conquest/src/input.c b/Conquest/src/input.c
--- a/Conquest/src/input.c	1994-09-03 13:57:10.000000000 +0300
+++ b/Conquest/src/input.c	2011-04-05 14:21:48.051684803 +0300
@@ -1,5 +1,9 @@
 /* Input.c: Inputting routines */
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
 #include "defs.h"
 #include "structs.h"
 #include "vars.h"
@@ -9,9 +13,11 @@
 {
   char result;
 
-  fread(&result, 1, 1, raw_fd);
+  result = getchar();
   if (result == 0x0d)
     result = '\n';
+  else if (result == 127)
+    return result;
 
   printf("%c", toupper(result));
 
@@ -27,19 +33,15 @@
   do
   {
     ch = get_char();
-    if (ch == '\b') 
+    if (ch == 127) 
     { /*backspace*/
       if (ind > 0)
       {
+        move(-1, 0);
 	putchar(' ');
-	putchar('\b');
-	/* Erase old char */
-	putchar(' ');
-	putchar('\b');
+        move(-1, 0);
 	ind = ind - 1;
       }
-      else
-	move(1,0);
     } 
     else if (ch != '\n') 
     {
@@ -102,12 +104,13 @@
       }
     }
     token = line[index];
-    index++;
+    if (token != '\0')
+      index++;
   }
 
   while (isspace(line[index])) index++;
   if (line[index]) /* Still something left */
-    strcpy(line, &line[index]);
+    c_strcpy(line, &line[index]);
   else
     line[0] = 0;
 
diff -Nru a/Conquest/src/main.c b/Conquest/src/main.c
--- a/Conquest/src/main.c	1994-09-03 15:07:04.000000000 +0300
+++ b/Conquest/src/main.c	2011-04-05 14:21:48.051684803 +0300
@@ -1,6 +1,8 @@
 /* Main.c: main() and *all* global variables */
 
 #include <stdio.h>
+#include <stdlib.h>
+
 #include "defs.h"
 #include "structs.h"
 #include "vars.h"
diff -Nru a/Conquest/src/Makefile b/Conquest/src/Makefile
--- a/Conquest/src/Makefile	1994-12-20 01:22:24.000000000 +0200
+++ b/Conquest/src/Makefile	2011-04-05 14:21:51.427661252 +0300
@@ -1,6 +1,6 @@
-CC =		cc
-LN =            ln
-CFLAGS =	-mcd -wl -qq
+CC =		gcc
+LN =            gcc
+CFLAGS =	-g -Wall
 LDFLAGS =	
 LIBS =          -lm -lc
 
@@ -52,4 +52,4 @@
 		$(CC) -c $(CFLAGS) config.c
 
 clean:
-	rm *.o conq *.dbg *.sym
\ No newline at end of file
+	rm -f *.o conq *.dbg *.sym
diff -Nru a/Conquest/src/movement.c b/Conquest/src/movement.c
--- a/Conquest/src/movement.c	1994-09-07 15:15:24.000000000 +0300
+++ b/Conquest/src/movement.c	2011-04-05 14:21:48.051684803 +0300
@@ -108,8 +108,8 @@
 	  dx = stars[tf[tm][i].dest].x;
 	  dy = stars[tf[tm][i].dest].y;
 	  ratio = 1.0 - ((float)tf[tm][i].eta / tf[tm][i].origeta);
-	  tf[tm][i].x = tf[tm][i].xf + round(ratio*(dx-tf[tm][i].xf));
-	  tf[tm][i].y = tf[tm][i].yf + round(ratio*(dy-tf[tm][i].yf));
+	  tf[tm][i].x = tf[tm][i].xf + c_round(ratio*(dx-tf[tm][i].xf));
+	  tf[tm][i].y = tf[tm][i].yf + c_round(ratio*(dy-tf[tm][i].yf));
 	  
 	  if (tf[tm][i].eta == 0) /* Update for arrival */
 	  {
diff -Nru a/Conquest/src/protos.h b/Conquest/src/protos.h
--- a/Conquest/src/protos.h	1994-09-03 13:58:18.000000000 +0300
+++ b/Conquest/src/protos.h	2011-04-05 14:21:48.051684803 +0300
@@ -13,7 +13,7 @@
 void blast_planet(); /* -> Combat */
 void inputplayer();
 void land();
-void quit();
+boolean quit();
 void send_tf();
 void inv_player(int x, int y, struct stplanet *planet);
 
@@ -94,6 +94,9 @@
 int get_tf(tteam tm, int starnum);
 void joinsilent(tteam team, struct sttf *parent, struct sttf *child);
 
+/* Init.c */
+void startup();
+
 /* Update.c */
 void update_board(int x, int y, toption option);
 void up_year();
@@ -105,14 +108,16 @@
 /* Utils.c */
 double fmin(double a, double b);
 void point(int col, int row);
+void move(int cols, int rows);
 int rnd(int i);
-int round(float x);
+int c_round(float x);
 int min(int x1, int x2);
 int max(int x1, int x2);
 boolean any_bc(tteam team, int starnum);
 double fact(int k);
 void swap(int *a, int *b);
 int conv_bcd(int nibble, char byte);
+char *c_strcpy(char *dest, const char *src);
 
 /* Some other functions that we need */
 double exp();
diff -Nru a/Conquest/src/update.c b/Conquest/src/update.c
--- a/Conquest/src/update.c	1994-09-04 13:28:04.000000000 +0300
+++ b/Conquest/src/update.c	2011-04-05 14:21:48.051684803 +0300
@@ -196,7 +196,7 @@
 
       if ((pplan->team) != none) 
       {
-	newborn = round((pplan->inhabitants) * growth_rate[pplan->team] *
+	newborn = c_round((pplan->inhabitants) * growth_rate[pplan->team] *
 			(1-((pplan->inhabitants)/(pplan->capacity))));
 	if (pplan->conquered)
 	  newborn = newborn / 2;
diff -Nru a/Conquest/src/utils.c b/Conquest/src/utils.c
--- a/Conquest/src/utils.c	1994-09-02 19:57:44.000000000 +0300
+++ b/Conquest/src/utils.c	2011-04-05 14:21:48.051684803 +0300
@@ -1,6 +1,8 @@
 /* Utils.c: Diverse small utility funcitons that shouldn't lie all over */
 
 #include <stdio.h>
+#include <stdlib.h>
+
 #include "defs.h"
 #include "structs.h"
 #include "vars.h"
@@ -54,7 +56,7 @@
   return(rand()%i+1);
 }
 
-int round(float x)
+int c_round(float x)
 {
   return(x<0.0?(int)(x-0.5):(int)(x+.5));
 }
@@ -111,3 +113,14 @@
   if (nibble == 1) return (byte & 0x0f);
   return((byte >> 4) & 0x0f);
 }
+
+char *c_strcpy(char *dest, const char *src)
+{
+  char *o_dest = dest;
+  while (*src)
+  {
+    *dest++ = *src++;
+  }
+  *dest = '\0';
+  return o_dest;
+}
diff -Nru a/Conquest/src/vars.h b/Conquest/src/vars.h
--- a/Conquest/src/vars.h	1994-09-01 11:35:44.000000000 +0300
+++ b/Conquest/src/vars.h	2011-04-05 14:21:48.051684803 +0300
@@ -1,6 +1,6 @@
 extern struct config conf;
 
-extern tf_stars[MAX_NUM_STARS+1][2],
+extern int tf_stars[MAX_NUM_STARS+1][2],
   col_stars[MAX_NUM_STARS+1][2];
 
 extern char en_research;

