Index: atom4-4.1/ncurses/textui.cc
===================================================================
--- atom4-4.1.orig/ncurses/textui.cc
+++ atom4-4.1/ncurses/textui.cc
@@ -103,7 +103,7 @@ void ncurses_ui::handlekey() {
   }
 }
 
-int ncurses_ui::formatstr(char *fmt, ...) {
+int ncurses_ui::formatstr(const char *fmt, ...) {
   va_list args;
   int rc;
 
@@ -114,7 +114,7 @@ int ncurses_ui::formatstr(char *fmt, ...
   return rc;
 }
 
-int ncurses_ui::message(char *fmt, ...) {
+int ncurses_ui::message(const char *fmt, ...) {
   va_list args;
   int rc;
 
@@ -129,7 +129,7 @@ int ncurses_ui::message(char *fmt, ...)
 }
 
 void ncurses_ui::draw_tile(WINDOW *w, celltype cell) {
-  char *glyph;
+  const char *glyph;
   int color, bold=0;
 
   if (cell>='a' && cell<='h') {
@@ -252,7 +252,7 @@ int ncurses_ui::wait_key() {
   return wgetch(iowin);
 }
 
-int ncurses_ui::ask_yn(char *question) {
+int ncurses_ui::ask_yn(const char *question) {
   int ch;
 
   message("%s (y/n) ", question);
Index: atom4-4.1/ncurses/textui.h
===================================================================
--- atom4-4.1.orig/ncurses/textui.h
+++ atom4-4.1/ncurses/textui.h
@@ -85,8 +85,8 @@ private:
   char strbuf[STRBUF_SIZE];		// temp buffer for formatting strings
 
   int use_color() { return options&ENABLE_COLOR; }
-  int formatstr(char *fmt, ...);
-  int message(char *fmt, ...);
+  int formatstr(const char *fmt, ...);
+  int message(const char *fmt, ...);
   void draw_tile(WINDOW *w, celltype cell);
   friend void render_cell(int x, int y, celltype cell, void *context);
   void render_board();
@@ -94,7 +94,7 @@ private:
   void render_iowin();
   void refresh();
   int wait_key();
-  int ask_yn(char *msg);
+  int ask_yn(const char *msg);
   int init_color();
 public:
   ncurses_ui(atom4 *game, eventloop *loop, int *exitflag, int options=0);
Index: atom4-4.1/x/xutil.cc
===================================================================
--- atom4-4.1.orig/x/xutil.cc
+++ atom4-4.1/x/xutil.cc
@@ -181,9 +181,9 @@ void xwindow::mouse_move(XMotionEvent ev
  */
 
 appwindow::appwindow(xconnection *connection,
-                     char *winstr, char *iconstr,
+                     const char *winstr, const char *iconstr,
                      int win_wd, int win_ht,
-                     char *resource_class, char *resource_name) :
+                     const char *resource_class, const char *resource_name) :
 	xwindow(connection, NULL, 0,0, win_wd, win_ht, 0,0,0),
         disp(connection->display()) {
   XWMHints *wmhints;
@@ -207,8 +207,8 @@ appwindow::appwindow(xconnection *connec
   classhints = XAllocClassHint();
   if (!classhints) throw exception("Cannot allocate class hints");
 
-  classhints->res_name = resource_class;
-  classhints->res_class = resource_name;
+  classhints->res_name = const_cast<char*>(resource_class);
+  classhints->res_class = const_cast<char*>(resource_name);
 
   sizehints = XAllocSizeHints();
   if (!sizehints) throw exception("Cannot allocate size hints");
@@ -217,9 +217,9 @@ appwindow::appwindow(xconnection *connec
   sizehints->min_width  = sizehints->max_width  = wd;
   sizehints->min_height = sizehints->max_height = ht;
 
-  if (!XStringListToTextProperty(&winstr, 1, &win_name))
+  if (!XStringListToTextProperty(const_cast<char**>(&winstr), 1, &win_name))
     throw exception("Error while creating TextProperty");
-  if (!XStringListToTextProperty(&iconstr, 1, &icon_name))
+  if (!XStringListToTextProperty(const_cast<char**>(&iconstr), 1, &icon_name))
     throw exception("Error while creating TextProperty");
 
   // Set these as our WM settings
@@ -252,7 +252,7 @@ appwindow::~appwindow() {}
 
 // FIXME: should use generic image loader
 tiled_bckgnd::tiled_bckgnd(xconnection *connection, Drawable drawable,
-                           char *xpmfile)
+                           const char *xpmfile)
 	: conn(connection), d(drawable) {
   Display *disp = conn->display();
   XpmAttributes attr;
Index: atom4-4.1/x/xutil.h
===================================================================
--- atom4-4.1.orig/x/xutil.h
+++ atom4-4.1/x/xutil.h
@@ -125,9 +125,9 @@ protected:
   Display *disp;			// [R] (for convenience only)
 public:
   appwindow(xconnection *conn,
-            char *win_name, char *icon_name,
+            const char *win_name, const char *icon_name,
             int width, int height,
-            char *resource_class, char *resource_name);
+            const char *resource_class, const char *resource_name);
   ~appwindow();
 };
 
@@ -141,7 +141,7 @@ class tiled_bckgnd {
   GC tilegc;
 public:
   // FIXME: should use generic image loader
-  tiled_bckgnd(xconnection *conn, Drawable d, char *xpmfile);
+  tiled_bckgnd(xconnection *conn, Drawable d, const char *xpmfile);
   ~tiled_bckgnd();
 
   void paint(int x, int y, int w, int h);
Index: atom4-4.1/x/xscoreboard.cc
===================================================================
--- atom4-4.1.orig/x/xscoreboard.cc
+++ atom4-4.1/x/xscoreboard.cc
@@ -39,7 +39,7 @@
 #define DATADIR		"."		// search current dir if undefined
 #endif
 
-static char *wheelnames[NUM_WHEELS] = {
+static const char *wheelnames[NUM_WHEELS] = {
   DATADIR "/wheel12-1.xpm",
   DATADIR "/wheel12-2.xpm",
   DATADIR "/wheel12-3.xpm",
@@ -108,7 +108,7 @@ xscoreboard::~xscoreboard() {
   XFreeFont(disp, titlefont);
 }
 
-void xscoreboard::draw_center(XFontStruct *font, GC gc, char *text, int y) {
+void xscoreboard::draw_center(XFontStruct *font, GC gc, const char *text, int y) {
   XCharStruct result;
   int dummy, x;
   int textlen = strlen(text);
Index: atom4-4.1/x/xsprite.cc
===================================================================
--- atom4-4.1.orig/x/xsprite.cc
+++ atom4-4.1/x/xsprite.cc
@@ -35,7 +35,7 @@ xsprite_engine::~xsprite_engine() {
   XFreeGC(disp, drawgc);
 }
 
-xflatsprite::xflatsprite(xsprite_engine *engine, char *xpmfile) : eng(engine) {
+xflatsprite::xflatsprite(xsprite_engine *engine, const char *xpmfile) : eng(engine) {
   Display *disp = eng->display();
   Drawable d = eng->get_drawable();
   XpmAttributes attr;
Index: atom4-4.1/x/xsprite.h
===================================================================
--- atom4-4.1.orig/x/xsprite.h
+++ atom4-4.1/x/xsprite.h
@@ -54,7 +54,7 @@ class xflatsprite {
   int wd, ht;				// width & height
   int ox, oy;				// image origin (==XPM hotspot)
 public:
-  xflatsprite(xsprite_engine *engine, char *xpmfile);
+  xflatsprite(xsprite_engine *engine, const char *xpmfile);
   ~xflatsprite();
 
   void draw(Drawable d, int x, int y);
Index: atom4-4.1/x/xtriboard.cc
===================================================================
--- atom4-4.1.orig/x/xtriboard.cc
+++ atom4-4.1/x/xtriboard.cc
@@ -19,7 +19,7 @@
 
 #define TILE_XPM	DATADIR "/tritile12.xpm"
 
-char *xtriboard::ballnames[NUM_BALLS]={
+const char *xtriboard::ballnames[NUM_BALLS]={
   DATADIR "/blackball12.xpm",
   DATADIR "/redball12.xpm",
   DATADIR "/greenball12.xpm",
Index: atom4-4.1/x/xtriboard.h
===================================================================
--- atom4-4.1.orig/x/xtriboard.h
+++ atom4-4.1/x/xtriboard.h
@@ -32,7 +32,7 @@ class xtriboard : public xwindow {
   tiled_bckgnd *tritile;		// tiled background
 
   // FIXME: this should be moved to class XAtom4
-  static char *ballnames[NUM_BALLS];
+  static const char *ballnames[NUM_BALLS];
   xflatsprite *balls[8];
 
   // Auto-positioning cursor
Index: atom4-4.1/x/xscoreboard.h
===================================================================
--- atom4-4.1.orig/x/xscoreboard.h
+++ atom4-4.1/x/xscoreboard.h
@@ -30,7 +30,7 @@ class xscoreboard : public xwindow {
   XFontStruct *scorefont;		// regular font
   GC textgc;
 
-  void draw_center(XFontStruct *font, GC gc, char *text, int y);
+  void draw_center(XFontStruct *font, GC gc, const char *text, int y);
   void render_score(int player, int y);
   void render_wheel(int wheel);
 public:
