This patch-collection provides for reasonably warning-free compile of
xcoral. const-poison sprinkled throughout.

The result even seems to work... Use at your own risk.

TODO:	figure out the best way to use actual paths to various
executables (like cpp), which are currently hard-coded (to, for example,
"/lib/cpp").

	-mi

--- BR_Global.h	1997-09-16 04:18:38.000000000 -0400
+++ BR_Global.h	2014-12-27 23:35:12.000000000 -0500
@@ -55,14 +55,36 @@ typedef BR_UChar         BR_Boolean;
    /*-----------------------------------------------------------------------*/
 
-#define BR_WARNING(msg, arg)      \
-  fprintf(stderr, msg, arg);
+#define BR_WARNING(msg, ...)      \
+  fprintf(stderr, msg, __VA_ARGS__);
 
 
-#define BR_FATAL_ERROR(msg, arg)  \
+#define BR_FATAL_ERROR(msg, ...)  \
 {                                 \
-  fprintf(stderr, msg, arg);      \
+  fprintf(stderr, msg, __VA_ARGS__);      \
   exit(1);                        \
 }
 
+int browser_dump(const char *file_name);
+int browser_restore(const char *file_name);
+int browser_yyparse(const char *file_name);
+void browser_set_pp(const char *modename, const char *path);
+void browser_set_pp_options(const char *modename, const char *options);
+void browser_add(const char *s, int rec);
+const char *browser_class_file(const char *class_name, int *pline);
+int browser_select_class(const char *prefix);
+const char *browser_class_flags(const char *class_name);
+int browser_select_method(const char *prefix);
+int browser_select_attribute(const char *prefix);
+int browser_select_proc(const char *prefix);
+int browser_select_global(const char *prefix);
+int browser_class_entry(const char *prefix);
+int browser_function_entry(const char *prefix);
+int browser_global_entry(const char *prefix);
+int browser_file_entry(const char *prefix);
+const char *browser_class(int n);
+const char *browser_function(int n);
+const char *browser_global(int n);
+const char *browser_file(int n);
+const char *MyStrerror(int err);
 
-#endif  /* BR_GLOBAL_H */
+#endif  /* BR_GLOBAL_H */
\ No newline at end of file
--- BR_Interface.h	2002-12-17 08:51:12.000000000 -0500
+++ BR_Interface.h	2014-12-26 23:56:07.000000000 -0500
@@ -75,8 +75,8 @@
    /*-----------------------------------------------------------------------*/
 
-typedef FCT(void, (*BR_InfoHandler), (BR_Str*  prefix,
-				      BR_Str*  syntax_unit,
-				      BR_ULong infos,
-				      BR_ULong line_num) );
+typedef FCT(void, (*BR_InfoHandler), (const BR_Str*  prefix,
+				      const BR_Str*  syntax_unit,
+				      BR_ULong       infos,
+				      BR_ULong       line_num) );
 
 
@@ -99,8 +99,7 @@ typedef FCT(void, (*BR_InfoHandler), (BR
 
 extern
-FCT(BR_Boolean, BR_parse_file, (BR_Str*        file_name,
+FCT(BR_Boolean, BR_parse_file, (const BR_Str*  file_name,
 				BR_InfoHandler info_handler,
 				BR_Str**       filter_cmd) );
 
-
-#endif  /* BR_INTERFACE_H */
+#endif  /* BR_INTERFACE_H */
\ No newline at end of file
--- BR_Lexer.h	1997-05-15 04:36:08.000000000 -0400
+++ BR_Lexer.h	2014-12-27 02:34:08.000000000 -0500
@@ -34,5 +34,5 @@ struct BR_TokenRec
   BR_Int              _code;
   struct BR_TokenRec *_prefix;
-  BR_Str             *_val;
+  const BR_Str       *_val;
   BR_ULong            _val_len;
   BR_ULong            _bits;
@@ -54,5 +54,5 @@ extern YYSTYPE      BR_yylval;
 
 #define yylex       BR_yylex
-extern BR_Int       BR_yylex();
+extern BR_Int       BR_yylex(void);
 
 
@@ -60,9 +60,9 @@ extern BR_Int       BR_yylex();
 
 extern
-FCT (void, BR_lex_init, (FILE* main_file, BR_Str* main_name) );
+FCT (void, BR_lex_init, (FILE* main_file, const BR_Str* main_name) );
 
 
 extern
-FCT (void, BR_lex_empty_frame, () );
+FCT (void, BR_lex_empty_frame, (void));
 
 extern
@@ -70,5 +70,5 @@ FCT (BR_TokenPt, BR_lex_stack_frame, (BR
 
 extern
-FCT (BR_TokenPt, BR_lex_unstack_frame, () );
+FCT (BR_TokenPt, BR_lex_unstack_frame, (void));
 
 
@@ -77,5 +77,5 @@ FCT (BR_TokenPt, BR_lex_alloc_token, (BR
 
 extern
-FCT (BR_Int, BR_lex_get_line_num, ());
+FCT (BR_Int, BR_lex_get_line_num, (void));
 
 
@@ -83,11 +83,11 @@ FCT (BR_Int, BR_lex_get_line_num, ());
 
 extern
-FCT (void, BR_lex_ignore_proc_tail, () );
+FCT (void, BR_lex_ignore_proc_tail, (void));
 
 extern
-FCT (void, BR_lex_jump_bracket, () );
+FCT (void, BR_lex_jump_bracket, (void));
 
 extern
-FCT (void, BR_lex_jump_colon, () );
+FCT (void, BR_lex_jump_colon, (void));
 
 
@@ -95,9 +95,8 @@ FCT (void, BR_lex_jump_colon, () );
 
 extern
-FCT (void, BR_lex_save_state, () );
+FCT (void, BR_lex_save_state, (void));
 
 extern
-FCT (void, BR_lex_synchronize, () );
+FCT (void, BR_lex_synchronize, (void));
 
-
-#endif  /* BR_LEXER_H */
+#endif  /* BR_LEXER_H */
\ No newline at end of file
--- BR_Lexer.l	2002-12-18 02:17:45.000000000 -0500
+++ BR_Lexer.l	2014-12-27 02:36:54.000000000 -0500
@@ -90,5 +90,5 @@ static BR_Int          str_error_cnt  = 
 
 static BR_Str       val_buf[MAX_TOKEN_COUNT * MAX_VAL_LEN];
-static BR_Str*      val_next = val_buf;
+static BR_Str*      val_next = val_buf, *val_current;
 static BR_Str*      val_max  = &(val_buf[VAL_BUF_SIZE - 2]);
 
@@ -193,5 +193,5 @@ static BR_Int top_state = 0;
 
 #define GET_FREE_STR(val, len)      \
-  val       = val_next;                                       \
+  val = val_current = val_next;                               \
   val_next += len;                                            \
   if (val_next > val_max)                                     \
@@ -239,5 +239,5 @@ static BR_Int top_state = 0;
   GET_FREE_TOKEN(yylval);                      \
   GET_FREE_STR(yylval->_val, yyleng);          \
-  strncpy(yylval->_val, yytext, yyleng);       \
+  strncpy(val_current, yytext, yyleng);       \
   yylval->_code     = key;                     \
   yylval->_val_len  = yyleng;                  \
@@ -248,6 +248,5 @@ static BR_Int top_state = 0;
   yylval->_bits     = BR_INFO_EMPTY;           \
   return(key);                                 \
-}  
-
+}
 
    /*-----------------------------------------------------------------------*/
@@ -880,5 +879,5 @@ void
 BR_lex_init(main_file, main_name)
     FILE* main_file;
-    char* main_name;
+    const char* main_name;
 {
   if (yyin == 0)
@@ -912,5 +911,5 @@ BR_lex_empty_frame()
 {
   token_next         = token_frame + 1;
-  val_next           = token_frame->_val;
+  val_next           = (void *)token_frame->_val;
   token_frame->_bits = token_frame->_val_len;
   token_const        = BR_Null;
@@ -953,5 +952,5 @@ BR_TokenPt
 BR_lex_unstack_frame()
 {
-  val_next    = token_frame->_val;
+  val_next    = (void *)token_frame->_val;
   token_next  = token_frame->_last;
   token_frame = token_frame->_next;
--- BR_Parser.y	2002-12-18 02:21:52.000000000 -0500
+++ BR_Parser.y	2014-12-27 23:36:54.000000000 -0500
@@ -29,7 +29,9 @@
 #include <fcntl.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <setjmp.h>
 #include <signal.h>
+#include <errno.h>
 
 #if HAVE_STRING_H
@@ -85,5 +87,5 @@
    /*-----------------------------------------------------------------------*/
 
-FCT (int, yyerror, (char*) );
+FCT (int, yyerror, (const char*) );
 
 
@@ -92,8 +94,5 @@ FCT (int, yyerror, (char*) );
 #define YYPRINT(f, t, v)        BR_yyprint(f, t, v)
 static
-FCT (int, BR_yyprint, (FILE*, int, YYSTYPE) );
-
-static
-FCT (void, BR_dump_tree, (BR_Str*, BR_TokenPt) );
+FCT (int, BR_yyprint, (FILE*, int token, YYSTYPE));
 
 #endif
@@ -102,5 +101,5 @@ FCT (void, BR_dump_tree, (BR_Str*, BR_To
    /*-----------------------------------------------------------------------*/
 
-static char* basic_value[] =
+static const char* basic_value[] =
 {
   /*   0  (signed)? int         */      "int ",
@@ -142,9 +141,16 @@ static int basic_length[] =
 };
 
+#if 1
 #define CONVERT_BASIC(x)        \
    (x->_val     = basic_value[x->_bits],   \
     x->_val_len = basic_length[x->_bits],  \
     x)
-
+#else
+#define CONVERT_BASIC(x)        \
+   (GET_FREE_STR(x->_val, basic_length[x->_bits]), \
+    strncpy(x->_val, basic_value[x->_bits], basic_length[x->_bits]), \
+    x->_val_len = basic_length[x->_bits], \
+    x)
+#endif
 
    /*-----------------------------------------------------------------------*/
@@ -1280,17 +1286,15 @@ Access
 #if YYDEBUG != 0
 
-static char val[1024];
-
 static int
-BR_yyprint(f, t, v)
+BR_yyprint(f, token, v)
      FILE*   f;
-     int     t;
+     int     token;
      YYSTYPE v;
 {
   if ((v != BR_Null) && (v->_val != BR_Null))
   {
-    strncpy(val, yylval->_val, (BR_Int) yylval->_val_len + 1);      
-    *(val + yylval->_val_len + 1) = '\0';
-    fprintf(f, "   [(l=%05ld) \"%s\"]", yylval->_line_num, val);
+    fprintf(f, "   [(l=%05ld) %s\t\"%.*s\"]", yylval->_line_num,
+            yytname[yytoknum[token]],
+            (int)yylval->_val_len + 1, yylval->_val);
   }
   return(0);
@@ -1304,11 +1308,11 @@ BR_yyprint(f, t, v)
 int
 yyerror(msg)
-     char* msg;
+     const char* msg;
 {
   if (BR_info_handler != BR_Null)
     BR_info_handler("", "", BR_INFO_ERROR, BR_lex_get_line_num());
   else
-    BR_WARNING(">>>>>  Hum, Hum !!! Strange construction at line : %d\n",
-	       BR_lex_get_line_num());
+    fprintf(stderr, ">>>>>  Hum, Hum !!! Strange construction at line : %d: %s\n",
+	       BR_lex_get_line_num(), msg);
 
   return(0);
@@ -1376,36 +1380,4 @@ BR_replace_template_args(token)
    /*-----------------------------------------------------------------------*/
 
-#if YYDEBUG != 0
-
-static BR_Str dump_buff[1024];
-
-static void
-BR_dump_tree(msg, tree)
-     BR_Str*    msg;
-     BR_TokenPt tree;
-{
-  BR_TokenPt curr_tok;
-
-  fprintf(stderr, "%s\n", msg);
-  curr_tok = tree;
-  while (curr_tok != BR_Null)
-  {
-    strncpy(dump_buff, curr_tok->_val, curr_tok->_val_len);
-    dump_buff[curr_tok->_val_len] = '\0';
-    fprintf(stderr, "   (p=0x%08lx, n=0x%08lx, l=0x%08lx, b=0x%08lx) %s\n",
-	            (BR_ULong) curr_tok,
-	            (BR_ULong) curr_tok->_next,
-	            (BR_ULong) curr_tok->_last,
-	            (BR_ULong) curr_tok->_bits,
-	            dump_buff);
-    curr_tok = curr_tok->_next;
-  }
-}
-
-#endif
-
-  
-   /*-----------------------------------------------------------------------*/
-
 static void
 BR_format_SU(SU_tree, default_infos)
@@ -1416,5 +1388,5 @@ BR_format_SU(SU_tree, default_infos)
   BR_TokenPt  curr_tok;
   BR_Str*     curr_buf;
-  BR_Str*     curr_val;
+  const BR_Str* curr_val;
   BR_ULong    infos;
   BR_TokenPt  prefix;
@@ -1647,5 +1619,5 @@ BR_signal_handler()
 BR_Boolean
 BR_parse_file(file_name, info_handler, filter_cmd)
-     BR_Str          *file_name;
+     const BR_Str    *file_name;
      BR_InfoHandler   info_handler;
      BR_Str         **filter_cmd;
@@ -1691,5 +1663,5 @@ BR_parse_file(file_name, info_handler, f
 	  close(p_array[0]);
 	  execv(filter_cmd[0], filter_cmd);
-	  BR_FATAL_ERROR(">>>>>  Execv failure (\"%s\")\n", filter_cmd[0]);
+	  BR_FATAL_ERROR(">>>>>  Execv failure (\"%s\"): %s\n", filter_cmd[0], MyStrerror(errno));
 	}
 	else
@@ -1697,5 +1669,5 @@ BR_parse_file(file_name, info_handler, f
 	  close(p_array[1]);
 	  close(p_array[0]);
-	  BR_WARNING(">>>>>  Filter fork failure (\"%s\")\n", filter_cmd[0]);
+	  BR_WARNING(">>>>>  Filter fork failure (\"%s\"): %s\n", filter_cmd[0], MyStrerror(errno));
 	  parse_ok = BR_FALSE;
 	}
--- BR_main.c	2003-01-06 03:42:43.000000000 -0500
+++ BR_main.c	2014-12-27 23:35:57.000000000 -0500
@@ -1,3 +1,4 @@
 #include <stdio.h>
+#include <unistd.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -34,4 +35,5 @@
 #include "browser_eve.h"
 #include "page.h"
+#include "warn_box.h"
 
 #include "BR_Global.h"
@@ -41,5 +43,5 @@ extern Browser br;
 
 #if !HAVE_STRDUP
-extern FCT (char*, strdup, (char*) );
+extern FCT (char*, strdup, (const char*) );
 #endif
 
@@ -57,22 +59,22 @@ static ScopeType compute_scope(infos)
 
 static int yaerror;
-static char * filename;
+static const char * filename;
 
-void
+static void
 browser_handler(str_prefix, str_syntax_unit, infos, line_num)
-    BR_Str*  str_prefix;
-    BR_Str*  str_syntax_unit;
+    const BR_Str*  str_prefix;
+    const BR_Str*  str_syntax_unit;
     BR_ULong infos;
     BR_ULong line_num;
 {
-  static BR_Str* erroned_prefix = 0;
+  static BR_Str* erroned_prefix;
   
   if (infos & BR_INFO_ERROR) {
     if (OpVerbose()) {
       if (! yaerror)
-	fprintf(stderr, "Browser : parse error in %s line(s) %d",
-		filename, line_num);
+	fprintf(stderr, "Browser : parse error in %s line(s) %lu",
+		filename, (unsigned long)line_num);
       else
-	fprintf(stderr, " %d", line_num);
+	fprintf(stderr, " %lu", (unsigned long)line_num);
     }
     yaerror = 1;
@@ -83,6 +85,6 @@ browser_handler(str_prefix, str_syntax_u
       return;
     if (erroned_prefix) {
-      BR_Str * s1, *s2;
-      
+      const BR_Str * s1, *s2;
+ 
       for (s1 = str_prefix, s2 = erroned_prefix; (*s1)&&(*s2); s1 += 1, s2 += 1)
 	if (*s1 != *s2)
@@ -95,5 +97,5 @@ browser_handler(str_prefix, str_syntax_u
 	/* out of redefined class */
 	free(erroned_prefix);
-	erroned_prefix = 0;
+	erroned_prefix = NULL;
       }
       else if (! *s2) {
@@ -103,10 +105,10 @@ browser_handler(str_prefix, str_syntax_u
 	/* out of redefined class */
 	free(erroned_prefix);
-	erroned_prefix = 0;
+	erroned_prefix = NULL;
       }
     }
     if (((infos & BR_INFO_CLASS) && (infos & BR_INFO_DEF)) ||
 	(infos & (BR_INFO_STRUCT | BR_INFO_UNION | BR_INFO_TYPEDEF))) {
-      char * n = (char *)
+      char * n =
 	malloc(strlen(str_prefix) + strlen(str_syntax_unit) + 3);
       
@@ -129,5 +131,5 @@ browser_handler(str_prefix, str_syntax_u
 	  
 	  sprintf(n, "%s::%s", str_prefix, str_syntax_unit);
-	  add_proc_impl(n, C_PROC, line_num,
+	  add_proc_impl(n, line_num,
 			((infos & BR_INFO_STATIC) ? STATIC_PROC : 0) +
 			((infos & BR_INFO_TEMPLATE) ? TEMPLATE_PROC : 0),
@@ -154,6 +156,5 @@ browser_handler(str_prefix, str_syntax_u
       if (infos & BR_INFO_NAMESPACE_ELEMENT) {
 	if (infos & BR_INFO_DEF) {
-	  /*int decl = (infos >> 10) & 8;	/* static */
-	  char * n = (char *)
+	  char * n =
 	    malloc(strlen(str_prefix) + strlen(str_syntax_unit) + 3);
 	  
@@ -179,5 +180,5 @@ browser_handler(str_prefix, str_syntax_u
   else if (infos & BR_INFO_PROC) {
     if (infos & BR_INFO_DEF)
-      add_proc_impl(str_syntax_unit, C_PROC, line_num,
+      add_proc_impl(str_syntax_unit, line_num,
 		    ((infos & BR_INFO_STATIC) ? STATIC_PROC : 0) +
 		    ((infos & BR_INFO_INLINE) ? INLINE_PROC : 0) +
@@ -210,5 +211,5 @@ browser_handler(str_prefix, str_syntax_u
 
 int browser_yyparse(fn)
-    char * fn;
+    const char * fn;
 {
   yaerror = 0;
@@ -222,6 +223,7 @@ int browser_yyparse(fn)
 
     filter_cmd[0] = br.mode->pp_path;
-    filter_cmd[1] = fn;
+    filter_cmd[1] = strdup(fn);
     BR_parse_file(fn, browser_handler, filter_cmd);
+    free(filter_cmd[1]);
   }
   else {
@@ -230,5 +232,5 @@ int browser_yyparse(fn)
     char * p;
     unsigned nentry = 3;
-    
+ 
     options = strdup(br.mode->pp_options);
     p = strtok(options, " \t");
@@ -238,5 +240,5 @@ int browser_yyparse(fn)
     }
     
-    filter_cmd = (char **) malloc(nentry * sizeof(char *));
+    filter_cmd = malloc(nentry * sizeof(char *));
     filter_cmd[0] = br.mode->pp_path;
     
@@ -250,12 +252,12 @@ int browser_yyparse(fn)
       nentry += 1;
     }
-    filter_cmd[nentry] = fn;
+    filter_cmd[nentry] = strdup(fn);
     filter_cmd[nentry + 1] = BR_Null;
   
     BR_parse_file(fn, browser_handler, filter_cmd);
     
-    while (--nentry) {
+    do {
       free(filter_cmd[nentry]);
-    }
+    } while (nentry--);
     free(filter_cmd);
     free(options);
@@ -268,6 +270,4 @@ int browser_yyparse(fn)
 }
 
-int yywrap() { return 1; }
-
 /*-------------------------------------------------------------------------
    fonctions Smac
@@ -275,6 +275,6 @@ int yywrap() { return 1; }
 
 void browser_set_pp(modename, path)
-    char * modename;
-    char * path;
+    const char * modename;
+    const char * path;
 {
   Mode * mode = GetMode(modename);
@@ -290,6 +290,6 @@ void browser_set_pp(modename, path)
 
 void browser_set_pp_options(modename, options)
-    char * modename;
-    char * options;
+    const char * modename;
+    const char * options;
 {
   Mode * mode = GetMode(modename);
@@ -317,5 +317,5 @@ void browser_set_pp_options(modename, op
 
 void browser_add(s, rec)
-    char * s;
+    const char * s;
     int rec;
 {
@@ -384,6 +384,6 @@ void browser_add(s, rec)
 }
 
-char * browser_class_file(class_name, pline)
-    char * class_name;
+const char * browser_class_file(class_name, pline)
+    const char * class_name;
     int * pline;
 {
@@ -398,7 +398,6 @@ char * browser_class_file(class_name, pl
 }
 
-
-char * browser_class_flags(class_name)
-    char * class_name;
+const char * browser_class_flags(class_name)
+    const char * class_name;
 {
   ClassRec* class = find_class(class_name);
@@ -411,6 +410,6 @@ char * browser_class_flags(class_name)
 }
 
-static char * browser_select_x(prefix, t, w_x, x_plength)
-    char * prefix;
+static const char * browser_select_x(prefix, t, w_x, x_plength)
+    const char * prefix;
     char **t;
     unsigned w_x;
@@ -452,7 +451,7 @@ static char * browser_select_x(prefix, t
 
 int browser_select_class(prefix)
-    char * prefix;
+    const char * prefix;
 {
-  char * s = 
+  const char * s = 
     browser_select_x(prefix, br.class_save, W_CLASS, CLASS_PLENGTH);
   
@@ -461,7 +460,7 @@ int browser_select_class(prefix)
 
 int browser_select_method(prefix)
-    char * prefix;
+    const char * prefix;
 {
-  char * s = 
+  const char * s = 
     browser_select_x(prefix, br.methods_save, W_METHOD, METHOD_PLENGTH);
   
@@ -470,7 +469,7 @@ int browser_select_method(prefix)
 
 int browser_select_attribute(prefix)
-    char * prefix;
+    const char * prefix;
 {
-  char * s = 
+  const char * s = 
     browser_select_x(prefix, br.attributes_save,
 		     W_ATTRIBUTES, ATTRIBUTE_PLENGTH);
@@ -480,7 +479,7 @@ int browser_select_attribute(prefix)
 
 int browser_select_proc(prefix)
-    char * prefix;
+    const char * prefix;
 {
-  char * s = 
+  const char * s = 
     browser_select_x(prefix, br.procs_save, W_PROC, PROC_PLENGTH);
   
@@ -489,7 +488,7 @@ int browser_select_proc(prefix)
 
 int browser_select_global(prefix)
-    char * prefix;
+    const char * prefix;
 {
-  char * s = 
+  const char * s = 
     browser_select_x(prefix, br.globals_save, W_GLOBALS, GLOBAL_PLENGTH);
   
@@ -498,10 +497,10 @@ int browser_select_global(prefix)
 
 static int browser_x_entry(prefix, save)
-    char * prefix;
-    char ** save;
+    const char * prefix;
+    char * const * save;
 {
   if (save) {
     unsigned plen = strlen(prefix);
-    char ** p;
+    char * const * p;
  
     for (p = save; *p; p += 1) {
@@ -519,5 +518,5 @@ static int browser_x_entry(prefix, save)
 
 int browser_class_entry(prefix)
-    char * prefix;
+    const char * prefix;
 {
   return browser_x_entry(prefix, br.class_save);
@@ -525,5 +524,5 @@ int browser_class_entry(prefix)
 
 int browser_function_entry(prefix)
-    char * prefix;
+    const char * prefix;
 {
   return browser_x_entry(prefix, br.procs_save);
@@ -531,5 +530,5 @@ int browser_function_entry(prefix)
 
 int browser_global_entry(prefix)
-    char * prefix;
+    const char * prefix;
 {
   return browser_x_entry(prefix, br.globals_save);
@@ -537,12 +536,12 @@ int browser_global_entry(prefix)
 
 int browser_file_entry(prefix)
-    char * prefix;
+    const char * prefix;
 {
   return browser_x_entry(prefix, br.files_save);
 }
 
-static char * browser_x(rang, save)
+static const char * browser_x(rang, save)
     int rang;
-    char ** save;
+    char * const * save;
 {
   if (save)
@@ -551,8 +550,8 @@ static char * browser_x(rang, save)
 	return *save;
   
-  return 0;
+  return NULL;
 }
 
-char * browser_class(n)
+const char * browser_class(n)
     int n;
 {
@@ -560,5 +559,5 @@ char * browser_class(n)
 }
 
-char * browser_function(n)
+const char * browser_function(n)
     int n;
 {
@@ -566,5 +565,5 @@ char * browser_function(n)
 }
 
-char * browser_global(n)
+const char * browser_global(n)
     int n;
 {
@@ -572,5 +571,5 @@ char * browser_global(n)
 }
 
-char * browser_file(n)
+const char * browser_file(n)
     int n;
 {
@@ -594,6 +593,4 @@ char * browser_file(n)
 #define TYPE_INFO_DATA		7
 
-extern FCT(void, DisplayWMessage ,(char *, char *, int));
-
 /* to memorize data defined in a file */
 
@@ -626,5 +623,5 @@ typedef struct FileData {
 
 /* link each file and its functions */
-void proc_memo_file()
+static void proc_memo_file()
 {
   ProcRec ** pdict;
@@ -651,5 +648,5 @@ void proc_memo_file()
 
 /* link each file and its globals */
-void global_memo_file()
+static void global_memo_file()
 {
   GlobalRec ** pdict;
@@ -676,5 +673,5 @@ void global_memo_file()
 
 /* link each file and its classes and methods */
-void class_memo_file()
+static void class_memo_file()
 {
   ClassRec ** pdict;
@@ -733,5 +730,5 @@ static void dump_nbr(nbr, fp)
 /* saves a string */
 static void dump_str(str, fp)
-    char * str;
+    const char * str;
     FILE * fp;
 {
@@ -877,5 +874,5 @@ static void save_globals(lglobal, fp)
 
 int browser_dump(fn)
-    char * fn;
+    const char * fn;
 {
   FILE * fp = fopen(fn, "w");
@@ -965,5 +962,5 @@ static char * restore_str(fp)
 {
   int len = restore_nbr(fp);
-  char * str = (char *) malloc(len);
+  char * str = malloc(len);
   
   if (str)
@@ -1046,5 +1043,5 @@ static int browser_restore_file(fp, vers
 	    if (! name)
 	      return 0;
-	    add_proc_impl(name, C_PROC, impl_line, decl, restore_nbr(fp));
+	    add_proc_impl(name, impl_line, decl, restore_nbr(fp));
 	    free(name);
 	  }
@@ -1160,5 +1157,5 @@ static int browser_restore_file(fp, vers
 
 int browser_restore(fn)
-    char * fn;
+    const char * fn;
 {
   FILE * fp = fopen(fn, "r");
@@ -1195,2 +1192,31 @@ int browser_restore(fn)
 }
 
+/*---------------------------------------------------------------------
+*/
+const char*
+MyStrerror ( err )
+    int err;
+{
+#if HAVE_STRERROR
+   return strerror ( err );
+#elif HAVE_SYSERR || HAVE_STDIO_SYSERR
+#  if !HAVE_STDIO_SYSERR
+   extern char *sys_errlist[];
+   extern int sys_nerr;
+#  endif
+   static char buffer[32];
+   if (!err)
+     return "";
+ 
+   if ((err > 0) && (err < sys_nerr))
+     return (char*) sys_errlist[err];
+ 
+   sprintf (buffer, "Unknown error : %d", err);
+   return buffer;
+#else
+#if HAVE_PERROR
+   perror("System error in xcoral execution");
+#endif
+   return("<<< Error message unavailble >>>");
+#endif
+}
\ No newline at end of file
--- Makefile.in	2008-01-08 12:43:29.000000000 -0500
+++ Makefile.in	2014-12-27 22:43:26.000000000 -0500
@@ -21,4 +21,5 @@
 
 CFLAGS       = @CFLAGS@ @DEFS@ $(X_INCLUDE) -DXCORAL_LIB_DIR=$(XCORALLIBDIR)
+CFLAGS      += -DRUNTIMECHECK
 LDLIBS       = @XC_X_LDPATH@ @x_libs@ @LIBS@
 
@@ -74,7 +76,12 @@
 all: $(PROGRAM)
 
-$(PROGRAM): $(OBJS)
-	@cd Smac;rm -f word.h;$(MAKE) CC='$(CC)' XCORALLIBDIR='$(XCORALLIBDIR)'
-	$(CC) -g -o $(PROGRAM) $(OBJS) $(SMACOBJS) $(LDOPTIONS) $(LDLIBS)
+Smac/word.h:
+	cd Smac;$(MAKE) CC='$(CC)' XCORALLIBDIR='$(XCORALLIBDIR)' word.h
+
+smacobjs: Smac/word.h
+	cd Smac;$(MAKE) CC='$(CC)' XCORALLIBDIR='$(XCORALLIBDIR)'
+
+$(PROGRAM): $(OBJS) smacobjs
+	$(CC) -o $(PROGRAM) $(OBJS) $(SMACOBJS) $(LDOPTIONS) $(LDLIBS)
 
 install: $(PROGRAM) $(MISCFILES)
--- Smac/Array_.c	2006-10-16 16:24:55.000000000 -0400
+++ Smac/Array_.c	2014-12-27 22:08:32.000000000 -0500
@@ -58,6 +58,6 @@
 /* Les fonctions d'acces aux elements en fonction de leur type */
 
-Object array_char_access(p, index)
-     char * p;
+static Object array_char_access(p, index)
+     const char * p;
      int index;
 {
@@ -76,6 +76,6 @@ Object array_char_access(p, index)
 }
 
-Object array_int_access(p, index)
-     int * p;
+static Object array_int_access(p, index)
+     const int * p;
      int index;
 {
@@ -98,6 +98,6 @@ Object array_int_access(p, index)
 }
 
-Object array_pointer_access(p, index)
-     Object * p;
+static Object array_pointer_access(p, index)
+     const Object * p;
      int index;
 {
@@ -121,6 +121,6 @@ Object array_pointer_access(p, index)
 }
 
-Object sub_array_access(p, index, subsize)
-     char * p;
+static Object sub_array_access(p, index, subsize)
+     const char * p;
      int index;
      int subsize;
@@ -189,5 +189,5 @@ static Object ArrayAccess__Eval(this)
 /* Les fonctions d'affectation des elements en fonction de leur type */
 
-Object array_char_affect(p, index, value)
+static Object array_char_affect(p, index, value)
      char * p;
      int index;
@@ -197,5 +197,5 @@ Object array_char_affect(p, index, value
 }
 
-Object array_int_affect(p, index, value)
+static Object array_int_affect(p, index, value)
      int * p;
      int index;
@@ -205,5 +205,5 @@ Object array_int_affect(p, index, value)
 }
 
-Object array_pointer_affect(p, index, value)
+static Object array_pointer_affect(p, index, value)
      Object * p;
      int index;
@@ -218,5 +218,5 @@ Object array_pointer_affect(p, index, va
    car le test d'adresse est realise lors de l'acces */
 
-Object check_array_char_affect(p, index, value)
+static Object check_array_char_affect(p, index, value)
      char * p;
      int index;
@@ -229,5 +229,5 @@ Object check_array_char_affect(p, index,
 }
 
-Object check_array_int_affect(p, index, value)
+static Object check_array_int_affect(p, index, value)
      int * p;
      int index;
@@ -245,5 +245,5 @@ Object check_array_int_affect(p, index, 
 }
 
-Object check_array_pointer_affect(p, index, value)
+static Object check_array_pointer_affect(p, index, value)
      Object * p;
      int index;
@@ -275,5 +275,5 @@ ArrayAssignment * ArrayAssignment__Array
      FCT( Object,(* convert),(Object));
 {
-  ArrayAssignment * this = (ArrayAssignment *) Malloc(sizeof(ArrayAssignment));
+  ArrayAssignment * this = Malloc(sizeof(ArrayAssignment));
 
   Instruction_Constructor
--- Smac/Array_.h	2006-10-16 16:22:39.000000000 -0400
+++ Smac/Array_.h	2014-12-27 22:08:49.000000000 -0500
@@ -125,5 +125,5 @@ extern FCT( ArrayPostIncrDecr *,ArrayPos
 /**/
 
-extern void Init_Array();
+extern void Init_Array(void);
 
 #endif
--- Smac/Block_.h	2006-10-16 16:22:13.000000000 -0400
+++ Smac/Block_.h	2014-12-27 17:05:51.000000000 -0500
@@ -55,5 +55,5 @@ typedef struct Block Block;
 extern FCT( Block *,  Block__Block,(int nexpr, Instruction ** instrs) );
      
-extern void Init_Block();
+extern void Init_Block(void);
      
 #endif
--- Smac/Builtin_.c	2006-10-16 16:25:29.000000000 -0400
+++ Smac/Builtin_.c	2014-12-27 22:04:13.000000000 -0500
@@ -65,4 +65,5 @@
 #include "error.h"
 #include "smac.h"
+#include "mylex.h"
 
 /*******************
@@ -451,11 +452,11 @@ HashTable * builtin_fct_nbre_arg_min;
 #ifdef RUNTIMECHECK
 
-char * CHECK(pt)
-     char * pt;
+static char * CHECK(pt)
+     const char * pt;
 {
   if ((pt < Address_Min) || (pt > Address_Char_Max))
     Error("string access out of your memory area", 0);
 
-  return pt;
+  return (char *)pt;
 }
 
@@ -466,5 +467,5 @@ char * CHECK(pt)
 #endif
   
-static int builtin_printf(a)
+static Object builtin_printf(a)
      Instruction ** a;
 {
@@ -751,7 +752,7 @@ static Object builtin_strlen(a)
 
 int check_strlen(s)
-     char *s;
+     const char *s;
 {
-  char * begin = s;
+  const char * begin = s;
 
   while (*CHECK(s++));
@@ -1092,12 +1093,8 @@ static Object builtin_load_file(a)
      Instruction ** a;
 {
-  extern FILE * yyin;
-  extern void load_file(int);
-  extern void smac_read_new_file();
-  
   FILE * previous_yyin = yyin;
   int previous_yyinflag = yyinflag;
   int previous_numlig = numlig;
-  char * previous_yyinfilename = yyinfilename;
+  const char * previous_yyinfilename = yyinfilename;
 #ifdef XCORAL_LIB_DIR
   char *smaclib = 0;
@@ -1111,6 +1108,4 @@ static Object builtin_load_file(a)
 
   if (*yyinfilename == '~') {
-    FCT(char *, ExpandTildeName,(char *));
-
     yyinfilename = ExpandTildeName(yyinfilename);
   }
@@ -1229,6 +1224,6 @@ static int profile_count;
 static int profiling;
 
-void profile_tic(ignore)
-     int ignore;
+static void profile_tic(ignore)
+     int ignore __attribute__((unused));
 {
   if (Last_Function_Called) {
@@ -1240,5 +1235,5 @@ void profile_tic(ignore)
 
 static Object builtin_start_profile(ignore)
-     Instruction ** ignore;
+     Instruction ** ignore __attribute__((unused));
 {
   static struct itimerval prof;
@@ -1271,5 +1266,5 @@ static Object builtin_start_profile(igno
 
 static Object builtin_stop_profile(ignore)
-     Instruction ** ignore;
+     Instruction ** ignore __attribute__((unused));
 {
   signal(SIGVTALRM, SIG_IGN);
@@ -1280,6 +1275,6 @@ static Object builtin_stop_profile(ignor
 
 static void err_pas_fonc(a, f)
-     Instruction ** a;
-     char * f;
+     Instruction * const * a;
+     const char * f;
 {
   sprintf(err_msg, "%s argument type is ", f);
@@ -1327,5 +1322,5 @@ static Object builtin_function(a)
      Instruction ** a;
 {
-  char * name = (char *) Eval(*a);
+  const char * name = (char *) Eval(*a);
   Identifier * id;
   
@@ -1344,6 +1339,6 @@ static Object builtin_function_name(a)
 
   if (IsaFunction((Instruction *) func)) {
-    char * func_name = Function__Name(func);
-    char * result = (char *) RTCMalloc(strlen(func_name) + 1);
+    const char * func_name = Function__Name(func);
+    char * result = RTCMalloc(strlen(func_name) + 1);
     
     if (result) {
@@ -1414,5 +1409,5 @@ static int fi_end = 1;
 
 static Object builtin_init_function_list(ignore)
-     Instruction ** ignore;
+     Instruction ** ignore __attribute__((unused));
 {
   fi_item = 0;
@@ -1424,5 +1419,5 @@ static Object builtin_init_function_list
 
 static Object builtin_function_list(ignore)
-     Instruction ** ignore;
+     Instruction ** ignore __attribute__((unused));
 {
   if (! fi_end)
--- Smac/Builtin_.h	2006-10-16 16:23:42.000000000 -0400
+++ Smac/Builtin_.h	2014-12-27 22:01:43.000000000 -0500
@@ -64,14 +64,14 @@ extern HashTable * builtin_fct_nbre_arg_
 extern HashTable * binary_modifoper_hashtable;
 
-extern FCT(int, check_strlen,(char *)	);
-extern FCT(Object, new_builtin,(char *, Type *, int, Type **,
+extern FCT(int, check_strlen, (const char *)	);
+extern FCT(Object, new_builtin, (char *, Type *, int, Type **,
 				FCT (Object, (*fct),(Instruction **))) );
 
-extern void Init_Builtin();
+extern void Init_Builtin(void);
 
 #ifdef XCORAL
-extern FCT(void, stop_profile,()	);
-extern FCT(void, rerun_profile,()	);
+extern FCT(void, stop_profile, (void)	);
+extern FCT(void, rerun_profile, (void)	);
 #endif
 
-#endif
+#endif
\ No newline at end of file
--- Smac/Cast_.h	2006-10-16 16:23:13.000000000 -0400
+++ Smac/Cast_.h	2014-12-27 22:05:44.000000000 -0500
@@ -56,5 +56,5 @@ typedef struct Cast Cast;
 extern FCT( Cast *,Cast__Cast,(Instruction *, Type *, ConvFct)	);
 
-extern FCT( void, Init_Cast,()			       		);
+extern FCT( void, Init_Cast, (void)		       		);
      
 #endif
--- Smac/Comma_.h	2006-10-16 16:22:35.000000000 -0400
+++ Smac/Comma_.h	2014-12-27 17:07:05.000000000 -0500
@@ -57,5 +57,5 @@ extern FCT(CommaExpression *, CommaExpre
 	   (Instruction ** discarded, Instruction * last, int ndisc)	);
 
-extern void Init_CommaExpression();
+extern void Init_CommaExpression(void);
 
 #endif
--- Smac/Const_.c	2006-10-16 16:24:17.000000000 -0400
+++ Smac/Const_.c	2014-12-27 16:59:39.000000000 -0500
@@ -137,5 +137,5 @@ static Object String__Eval(this)
 
 static void String__Delete(this)
-     String * this;
+     String * this __attribute__((unused));
 {
   /* does nothing : the string may be memorized else where */
--- Smac/Const_.h	2006-10-16 16:22:09.000000000 -0400
+++ Smac/Const_.h	2014-12-27 16:58:54.000000000 -0500
@@ -68,5 +68,5 @@ typedef struct Int Int;
 extern FCT( Int *, Int__Int,(int) );
      
-void Init_Int();
+void Init_Int(void);
 
 
@@ -82,5 +82,5 @@ typedef struct Char Char;
 extern FCT( Char *, Char__Char,(int) );
      
-void Init_Char();
+void Init_Char(void);
 
      
@@ -96,6 +96,5 @@ typedef struct String String;
 extern FCT( String *, String__String,(char *) );
      
-void Init_String();
-
-#endif
+void Init_String(void);
 
+#endif
\ No newline at end of file
--- Smac/Control_.h	2006-10-16 16:23:37.000000000 -0400
+++ Smac/Control_.h	2014-12-27 22:05:09.000000000 -0500
@@ -55,5 +55,5 @@ typedef struct Control Control;
 extern FCT( Control *, Control__Control,(JMP_TYPE)	);
 
-extern void Init_Control();
+extern void Init_Control(void);
 
 #endif
--- Smac/Declaration_.h	2006-10-16 16:23:05.000000000 -0400
+++ Smac/Declaration_.h	2014-12-27 22:04:32.000000000 -0500
@@ -56,5 +56,5 @@ extern FCT( Declaration *, Declaration__
 	   (Instruction *, FCT2( Object,(*),(Object)), int)	);
 
-extern void Init_Declaration();
+extern void Init_Declaration(void);
 
 #endif
--- Smac/For_.h	2006-10-16 16:22:30.000000000 -0400
+++ Smac/For_.h	2014-12-27 22:05:24.000000000 -0500
@@ -59,5 +59,5 @@ extern FCT( For *, For__For,(Instruction
 			     Instruction *, Instruction *, int));
 
-extern void Init_For();
+extern void Init_For(void);
 
 #endif
--- Smac/FunctionCall_.h	2006-10-16 16:22:03.000000000 -0400
+++ Smac/FunctionCall_.h	2014-12-27 17:10:21.000000000 -0500
@@ -109,5 +109,5 @@ extern FCT( void, call_builtin_function_
 #endif
      
-void Init_FunctionCall();
+void Init_FunctionCall(void);
 
 #endif
--- Smac/Function_.c	2006-10-16 16:24:11.000000000 -0400
+++ Smac/Function_.c	2014-12-27 22:01:11.000000000 -0500
@@ -57,6 +57,6 @@ Function * Function__Function(nom, valty
      int mayfree;
 {
-  Function * this = (Function *) Malloc(sizeof(Function));
-  TypeFunction * typefunction = (TypeFunction *) Malloc(sizeof(TypeFunction));
+  Function * this = Malloc(sizeof(Function));
+  TypeFunction * typefunction = Malloc(sizeof(TypeFunction));
   Type * thetype;
   
@@ -102,5 +102,5 @@ Function * Function__Function(nom, valty
 
 static void Function__Delete(this)
-     Function * this;
+     Function * this __attribute__((unused));
 {
   // does nothing !
@@ -229,5 +229,5 @@ static void UndefinedFunctionCall__Delet
 
 int Function__IsUndefined(f)
-     Function * f;
+     const Function * f;
 {
  return (f->_def._user_def->instruction_functions ==
@@ -245,5 +245,5 @@ void Init_UndefinedFunctionCall()
 
 int IsaFunction(i)
-     Instruction * i;
+     const Instruction * i;
 {
   return ((i->instruction_functions ==
@@ -257,7 +257,7 @@ int IsaFunction(i)
 
 int IsaPointerToFunction(f)
-     void * f;
+     const void * f;
 {
-  return((f != 0) &&
+  return((f != NULL) &&
 #ifdef RUNTIMECHECK
 	 (((char *) f < Address_Min) ||
@@ -267,5 +267,5 @@ int IsaPointerToFunction(f)
 	 (! ((Object) f & CHECK_POINTER_POINTER)) 	&&
 #endif
-	 IsaFunction((Instruction *) f)
+	 IsaFunction(f)
 	 );
 }
--- Smac/Function_.h	2006-10-16 16:23:32.000000000 -0400
+++ Smac/Function_.h	2014-12-27 22:00:54.000000000 -0500
@@ -84,5 +84,5 @@ extern FCT(void, Function__UpdateDef,(Fu
 extern FCT(int, Function__VerifyNotActive,(Function * this, int nojmp));
 
-void Init_Function();
+void Init_Function(void);
 
 /**/
@@ -99,9 +99,9 @@ extern FCT( UndefinedFunctionCall *,
 	   (Function * func));
 
-extern FCT ( int, IsaFunction,(Instruction *)		);
-extern FCT ( int, Function__IsUndefined,(Function *)	);
-extern FCT ( int, IsaPointerToFunction,(void *)		);
+extern FCT ( int, IsaFunction, (const Instruction *)		);
+extern FCT ( int, Function__IsUndefined, (const Function *)	);
+extern FCT ( int, IsaPointerToFunction, (const void *)		);
      
-void Init_UndefinedFunctionCall();
+void Init_UndefinedFunctionCall(void);
   
 #endif
--- Smac/Identifier_.h	2006-10-16 16:23:01.000000000 -0400
+++ Smac/Identifier_.h	2014-12-27 21:48:02.000000000 -0500
@@ -60,5 +60,5 @@ typedef struct Identifier Identifier;
 
 extern FCT( Identifier *, Identifier__Identifier,
-	   	(char *, Function *, GlobalVar *));
+   	(char *, Function *, GlobalVar *));
 
 extern FCT ( Identifier *, Get_Identifier,(char * name)	);
@@ -69,5 +69,5 @@ extern FCT ( Identifier *, Get_Identifie
 extern HashTable * IdentifierHashTable;
 
-extern void Init_Identifier();
+extern void Init_Identifier(void);
 
-#endif
+#endif
\ No newline at end of file
--- Smac/If_.h	2006-10-16 16:22:26.000000000 -0400
+++ Smac/If_.h	2014-12-27 17:06:30.000000000 -0500
@@ -71,5 +71,5 @@ extern FCT( ArithIf *, ArithIf__ArithIf,
 
 
-extern void Init_If();
+extern void Init_If(void);
 
-#endif
+#endif
\ No newline at end of file
--- Smac/RefDeref_.c	2006-10-16 16:39:09.000000000 -0400
+++ Smac/RefDeref_.c	2014-12-27 22:31:05.000000000 -0500
@@ -59,6 +59,6 @@
 /* Les fonctions d'indirection en fonction de leur type */
 
-Object char_indirection(p)
-     char * p;
+static Object char_indirection(p)
+     const char * p;
 {
 #ifdef RUNTIMECHECK
@@ -70,9 +70,9 @@ Object char_indirection(p)
 }
 
-Object int_indirection(p)
-     int * p;
+static Object int_indirection(p)
+     const int * p;
 {
 #ifdef RUNTIMECHECK
-  if (((char *) p < Address_Min) || ((char *) p > Address_Int_Max))
+  if (((const char *) p < Address_Min) || ((const char *) p > Address_Int_Max))
     Error("int access through pointer out of your memory area", 0);
 
@@ -86,9 +86,9 @@ Object int_indirection(p)
 }
 
-Object pointer_indirection(p)
-     Object * p;
+static Object pointer_indirection(p)
+     const Object * p;
 {
 #ifdef RUNTIMECHECK
-  if (((char *) p < Address_Min) || ((char *) p > Address_Pointer_Max))
+  if (((const char *) p < Address_Min) || ((const char *) p > Address_Pointer_Max))
     Error("pointer access through pointer out of your memory area", 0);
 
@@ -102,6 +102,6 @@ Object pointer_indirection(p)
 }
 
-Object sub_array_indirection(p)
-     char * p;
+static Object sub_array_indirection(p)
+     const char * p;
 {
   return (Object) (p);
@@ -155,5 +155,5 @@ static Object Indirection__Eval(this)
 /* Les fonctions d'affectation en fonction de leur type */
 
-Object char_indirection_assignment(p, value)
+static Object char_indirection_assignment(p, value)
      char * p;
      Object value;
@@ -162,5 +162,5 @@ Object char_indirection_assignment(p, va
 }
 
-Object int_indirection_assignment(p, value)
+static Object int_indirection_assignment(p, value)
      int * p;
      Object value;
@@ -169,5 +169,5 @@ Object int_indirection_assignment(p, val
 }
 
-Object pointer_indirection_assignment(p, value)
+static Object pointer_indirection_assignment(p, value)
      Object * p;
      Object value;
@@ -181,5 +181,5 @@ Object pointer_indirection_assignment(p,
    car le test d'adresse est realise lors de l'acces */
 
-Object check_char_indirection_assignment(p, value)
+static Object check_char_indirection_assignment(p, value)
      char * p;
      Object value;
@@ -206,5 +206,5 @@ Object check_int_indirection_assignment(
 }
 
-Object check_pointer_indirection_assignment(p, value)
+static Object check_pointer_indirection_assignment(p, value)
      Object * p;
      Object value;
--- Smac/RefDeref_.h	2006-10-16 16:22:53.000000000 -0400
+++ Smac/RefDeref_.h	2014-12-27 22:31:52.000000000 -0500
@@ -105,5 +105,7 @@ extern FCT(IndirectionPostIncrDecr  *,
 	    Type *, FCT2(Object,(*),(Object) )));
 
-extern void Init_RefDeref();
+extern void Init_RefDeref(void);
 
-#endif
+extern FCT(Object, check_int_indirection_assignment, (int *p, Object value));
+
+#endif
\ No newline at end of file
--- Smac/Return_.h	2006-10-16 16:22:22.000000000 -0400
+++ Smac/Return_.h	2014-12-27 17:06:47.000000000 -0500
@@ -55,5 +55,5 @@ typedef struct Return Return;
 extern FCT( Return *,Return__Return,(Instruction * value, int term)	);
 
-extern void Init_Return();
+extern void Init_Return(void);
 
 #endif
--- Smac/Switch_.h	2006-10-16 16:23:19.000000000 -0400
+++ Smac/Switch_.h	2014-12-27 22:13:23.000000000 -0500
@@ -61,5 +61,5 @@ extern FCT( Switch *,Switch__Switch,(Ins
 				     int *, int, int, int)		);
 
-extern void Init_Switch();
+extern void Init_Switch(void);
 
 #endif
--- Smac/Type_.c	2006-10-16 16:24:01.000000000 -0400
+++ Smac/Type_.c	2014-12-27 16:57:36.000000000 -0500
@@ -145,6 +145,6 @@ void Type__Delete(this)
 
 int Type__Equal(t1, t2)
-     Type * t1;
-     Type * t2;
+     const Type * t1;
+     const Type * t2;
 {
   int firstdim = 1;
@@ -190,6 +190,6 @@ int Type__Equal(t1, t2)
 
 int Type__Eq(t1, t2)
-     Type * t1;
-     Type * t2;
+     const Type * t1;
+     const Type * t2;
 {
   for (;;) {
@@ -222,6 +222,6 @@ int Type__Eq(t1, t2)
     }
     
-    t1 = (Type *) t1->_name_or_pointed;
-    t2 = (Type *) t2->_name_or_pointed;
+    t1 = t1->_name_or_pointed;
+    t2 = t2->_name_or_pointed;
   }
 }
@@ -231,5 +231,5 @@ int Type__Eq(t1, t2)
 
 void Type__Print(t, str)
-    Type * t;
+    const Type * t;
     char * str;
 {
@@ -269,6 +269,6 @@ HashTable * convert_hash_table;
 
 ConvFct Type__Convertible(t1, t2)
-     Type * t1;
-     Type * t2;
+     const Type * t1;
+     const Type * t2;
 {
   if (Type__Equal(t1, t2))
@@ -278,6 +278,6 @@ ConvFct Type__Convertible(t1, t2)
     /* type * convertible en void * */
     
-    Type * st1 = t1;
-    Type * st2 = t2;
+    const Type * st1 = t1;
+    const Type * st2 = t2;
 
     while (((st1->_type ==  T_Array) || (st1->_type == T_Pointer)) &&
@@ -297,9 +297,8 @@ ConvFct Type__Convertible(t1, t2)
   {
     /* Regarde s'il y a une conversion possible */
-    
-    char encoded[24];
-    
-    sprintf(encoded, "%s2", encode_type(t1));
-    strcat(encoded, encode_type(t2));
+ 
+    char encoded[48];
+ 
+    snprintf(encoded, sizeof(encoded), "%s2%s", encode_type(t1), encode_type(t2));
 
     return (ConvFct) HashTable__Search(convert_hash_table, (Object) encoded);
@@ -313,5 +312,5 @@ ConvFct Type__Convertible(t1, t2)
 ConvFct ExprType__Convertible(i, t)
      Instruction * i;
-     Type * t;
+     const Type * t;
 {
   Type * ti = GetExprType(i);
@@ -344,7 +343,7 @@ int char2int(c)
 
 void error_incompatible_types(t1, t2, msg)
-    Type * t1;
-    Type * t2;
-    char * msg;
+    const Type * t1;
+    const Type * t2;
+    const char * msg;
 {
   strcpy(err_msg, msg);
--- Smac/Type_.h	2006-10-16 16:22:49.000000000 -0400
+++ Smac/Type_.h	2014-12-27 16:57:16.000000000 -0500
@@ -71,9 +71,9 @@ extern FCT( Type *, Type__Type,(void * s
 
 extern FCT( void, Type__Delete,(Type *)			);
-extern FCT( int, Type__Equal,(Type *, Type *)		);
-extern FCT( int, Type__Eq,(Type *, Type *)		);
-extern FCT( void, Type__Print,(Type *, char *)		);
-extern FCT( ConvFct, Type__Convertible,(Type *, Type *)	);
-extern FCT( ConvFct, ExprType__Convertible,(Instruction *, Type *)	);
+extern FCT( int, Type__Equal, (const Type *, const Type *));
+extern FCT( int, Type__Eq, (const Type *, const Type *)	);
+extern FCT( void, Type__Print, (const Type *, char *)	);
+extern FCT( ConvFct, Type__Convertible, (const Type *, const Type *));
+extern FCT( ConvFct, ExprType__Convertible, (Instruction *, const Type *));
 
 #define AlreadyConvertible	((ConvFct) Type__Convertible)
@@ -111,5 +111,5 @@ extern Type * Type_PInt;
 extern Type * Type_PVoid;
 
-extern FCT( void, error_incompatible_types,(Type * t1, Type * t2, char * msg)	);
+extern FCT( void, error_incompatible_types, (const Type * t1, const Type * t2, char const * msg)	);
 
 /**/
@@ -127,5 +127,5 @@ extern FCT( Instruction *, Conv__Conv,(I
 /**/
 
-void Init_type();
+void Init_type(void);
      
 #endif
--- Smac/Var_.c	2006-10-16 16:25:03.000000000 -0400
+++ Smac/Var_.c	2014-12-27 21:47:07.000000000 -0500
@@ -60,5 +60,5 @@ LocalVar * LocalVar__LocalVar(nom, posit
      Type * t;
 {
-  LocalVar * this = (LocalVar *) Malloc(sizeof(LocalVar));
+  LocalVar * this = Malloc(sizeof(LocalVar));
   
   Instruction_Constructor
@@ -72,5 +72,5 @@ LocalVar * LocalVar__LocalVar(nom, posit
 
 static void LocalVar__Delete(this)
-     LocalVar * this;
+     LocalVar * this __attribute__((unused));
 {
   /* does nothing */
@@ -85,5 +85,5 @@ void LocalVar__free(this)
 }
 
-Object LocalVar__Eval(this)
+static Object LocalVar__Eval(this)
      LocalVar * this;
 {
@@ -130,5 +130,5 @@ static void LocalVarAssignment__Delete(t
 }
 
-Object LocalVarAssignment__Eval(this)
+static Object LocalVarAssignment__Eval(this)
      LocalVarAssignment * this;
 {
@@ -176,5 +176,5 @@ static void LocalVarPostIncrDecr__Delete
 }
 
-Object LocalVarPostIncrDecr__Eval(this)
+static Object LocalVarPostIncrDecr__Eval(this)
      LocalVarPostIncrDecr * this;
 {
@@ -196,5 +196,5 @@ Object LocalVarPostIncrDecr__Eval(this)
 /* Reference a une variable locale (&) */
 
-int correction_adresses(type)
+static int correction_adresses(type)
      Type * type;
 {
@@ -238,5 +238,5 @@ LocalVarRef * LocalVarRef__LocalVarRef(v
 }
 
-Object LocalVarRef__Eval(this)
+static Object LocalVarRef__Eval(this)
      LocalVarRef * this;
 {
@@ -245,5 +245,5 @@ Object LocalVarRef__Eval(this)
 
 int IsaLocalVar(i)
-     Instruction * i;
+     const Instruction * i;
 {
   return (i->instruction_functions ==
@@ -282,9 +282,9 @@ inherit_instruction_function_vector
 
 GlobalVar * GlobalVar__GlobalVar(nom, type, value)
-     char * nom;
+     const char * nom;
      Type * type;
      Object value;
 {
-  GlobalVar * this = (GlobalVar *) Malloc(sizeof(GlobalVar));
+  GlobalVar * this = Malloc(sizeof(GlobalVar));
   
   Instruction_Constructor
@@ -294,5 +294,5 @@ GlobalVar * GlobalVar__GlobalVar(nom, ty
 #ifdef RUNTIMECHECK
   {
-    Object * pvalue = (Object *) RTCMalloc(sizeof(Object));
+    Object * pvalue = RTCMalloc(sizeof(Object));
 
     forbit_RTCfree(pvalue);
@@ -308,5 +308,5 @@ GlobalVar * GlobalVar__GlobalVar(nom, ty
 
 static void GlobalVar__Delete(this)
-     GlobalVar * this;
+     GlobalVar * this __attribute__((unused));
 {
   /* does nothing ! */
@@ -324,5 +324,5 @@ void GlobalVar__Update(this, value)
 }
 
-Object GlobalVar__Eval(this)
+static Object GlobalVar__Eval(this)
      GlobalVar * this;
 {
@@ -335,5 +335,5 @@ Object GlobalVar__Eval(this)
 
 int IsaGlobalVar(i)
-     Instruction * i;
+     const Instruction * i;
 {
   return (i->instruction_functions ==
@@ -385,6 +385,6 @@ static void GlobalVarAssignment__Delete(
 }
 
-Object GlobalVarAssignment__Eval(this)
-     GlobalVarAssignment * this;
+static Object GlobalVarAssignment__Eval(this)
+     const GlobalVarAssignment * this;
 {
   return *(this->_pvalue) = Eval(this->_value);
@@ -416,5 +416,5 @@ GlobalVarRef * GlobalVarRef__GlobalVarRe
 }
 
-Object GlobalVarRef__Eval(this)
+static Object GlobalVarRef__Eval(this)
      GlobalVarRef * this;
 {
@@ -466,6 +466,6 @@ static void GlobalVarPostIncrDecr__Delet
 }
 
-Object GlobalVarPostIncrDecr__Eval(this)
-     GlobalVarPostIncrDecr * this;
+static Object GlobalVarPostIncrDecr__Eval(this)
+     const GlobalVarPostIncrDecr * this;
 {
   Object value;
--- Smac/Var_.h	2006-10-16 16:22:18.000000000 -0400
+++ Smac/Var_.h	2014-12-27 21:46:51.000000000 -0500
@@ -93,8 +93,8 @@ typedef struct LocalVarRef LocalVarRef;
 extern FCT (LocalVarRef *, LocalVarRef__LocalVarRef, (LocalVar * var));
 
-extern FCT (int, IsaLocalVar,(Instruction *)				);
+extern FCT (int, IsaLocalVar, (const Instruction *)			);
 
 
-void Init_LocalVar();
+void Init_LocalVar(void);
 
 	    
@@ -104,10 +104,10 @@ struct GlobalVar {
   Inherit_Instruction;
 
-  char * _name;
+  const char * _name;
   Object _value;
 };
 typedef struct GlobalVar GlobalVar;
 
-extern FCT (GlobalVar *, GlobalVar__GlobalVar, (char *, Type *, Object)	);
+extern FCT (GlobalVar *, GlobalVar__GlobalVar, (const char *, Type *, Object)	);
 extern FCT (void, GlobalVar__Update, (GlobalVar *, Object)	);
 
@@ -134,5 +134,5 @@ extern FCT (GlobalVarRef *, GlobalVarRef
 struct GlobalVarPostIncrDecr {
   Inherit_Instruction;
-  
+
   Object * _pvalue;
   Instruction * _value;
@@ -145,7 +145,7 @@ extern FCT (GlobalVarPostIncrDecr *,
 	    (GlobalVar *, Instruction *, Type *)	);
 
-extern FCT (int, IsaGlobalVar,(Instruction *)				);
+extern FCT (int, IsaGlobalVar, (const Instruction *)	);
 
-void Init_GlobalVar();
+void Init_GlobalVar(void);
 
 #ifdef RUNTIMECHECK
@@ -155,3 +155,3 @@ void Init_GlobalVar();
 #endif
     
-#endif
+#endif
\ No newline at end of file
--- Smac/While_.h	2006-10-16 16:20:57.000000000 -0400
+++ Smac/While_.h	2014-12-27 22:04:54.000000000 -0500
@@ -58,5 +58,5 @@ extern FCT( While *, While__While,(Instr
 extern FCT( While *, DoWhile__DoWhile, (Instruction *, Instruction *, int));
 
-extern void Init_While();
+extern void Init_While(void);
 
 #endif
--- Smac/assignment.c	2006-10-16 16:31:37.000000000 -0400
+++ Smac/assignment.c	2014-12-27 16:41:13.000000000 -0500
@@ -68,5 +68,5 @@
 /* Modification d'une (supposee) variable */
 
-Instruction * var_assignment(mkident, lvalue, opername, cast, del)
+static Instruction * var_assignment(mkident, lvalue, opername, cast, del)
      List * mkident;
      List * lvalue;
@@ -203,7 +203,7 @@ Instruction * make_assignment(l, del)
 /* Modification d'une (supposee) variable */
 
-Instruction * var_post_incrdecr(mkident, ivalue, cast, del)
+static Instruction * var_post_incrdecr(mkident, ivalue, cast, del)
      List * mkident;
-     int    ivalue;
+     intptr_t  ivalue;
      Type * cast;
      int del;
@@ -235,12 +235,12 @@ Instruction * var_post_incrdecr(mkident,
   /* fabrique l'affectation */
 
-  m = (List **) Malloc(3 * sizeof(List *));
+  m = Malloc(3 * sizeof(List *));
   ((char **) m)[0] = Strdup("+");
   if (cast) {
-    void ** cm = (void **) Malloc(2 * sizeof(void *));
+    void ** cm = Malloc(2 * sizeof(void *));
 
-    cm[0] = (void *) cast;
-    cm[1] = (void *) mkident;
-    m[1] = List__List(make_cast, (void *) cm);
+    cm[0] = cast;
+    cm[1] = mkident;
+    m[1] = List__List(make_cast, cm);
   }
   else
--- Smac/c5.y	2002-07-19 09:00:18.000000000 -0400
+++ Smac/c5.y	2014-12-27 15:14:02.000000000 -0500
@@ -87,5 +87,6 @@ colleagues include: Bruce Blodgett, and 
 
 #include "rename.h"
-  
+#include "mylex.h"
+
 %}
 
@@ -770,9 +771,9 @@ postfix_abstract_declarator:
 
 int numlig;
-char * yyinfilename = 0;
+const char * yyinfilename = 0;
 extern char err_msg[];
 
 void yyerror(string)
-     char *string;
+     const char *string;
 {
   /* Attention, la forme du message est connue dans smacXcoral,c */
@@ -786,4 +787,3 @@ void yyerror(string)
       sprintf(err_msg, "parser error line %d : %s", numlig, string);
   }
-}
-
+}
\ No newline at end of file
--- Smac/comma.c	2006-10-16 16:32:03.000000000 -0400
+++ Smac/comma.c	2014-12-27 16:35:35.000000000 -0500
@@ -44,4 +44,5 @@
 #include "error.h"
 
+#include "comma.h"
 #include "decl.h" /**/
 
@@ -58,6 +59,6 @@ Instruction * no_comma_expression(l, del
 
   return (del)
-    ? (Instruction *) 0
-    : (Instruction *) CommaExpression__CommaExpression(0, 0, 0);
+    ? NULL
+    : (Instruction *)CommaExpression__CommaExpression(NULL, NULL, 0);
 }
 
--- Smac/const.c	2006-10-16 16:31:30.000000000 -0400
+++ Smac/const.c	2014-12-27 15:30:32.000000000 -0500
@@ -69,5 +69,5 @@ Instruction * make_integer(l, del)
 
 char lire_char(s)
-     char * s;
+     const char * s;
 {
   if (*++s == '\\')
@@ -130,13 +130,13 @@ Instruction * make_char(l, del)
 
 char * lire_string(str)
-     char * str;
+     const char * str;
 {
 #ifdef RUNTIMECHECK
-  char * decoded = (char *) RTCMalloc(strlen(str) - 1);
+  char * decoded = RTCMalloc(strlen(str) - 1);
   char * pdecoded = decoded;
 
   forbit_RTCfree(decoded);
 #else
-  char * decoded = (char *) Malloc(strlen(str) - 1);
+  char * decoded = Malloc(strlen(str) - 1);
   char * pdecoded = decoded;
 #endif
--- Smac/const.h	2006-10-16 16:30:13.000000000 -0400
+++ Smac/const.h	2014-12-27 14:21:00.000000000 -0500
@@ -49,7 +49,7 @@
 extern FCT( Instruction *, make_integer,(List *, int)	);
 extern FCT( Instruction *, make_char,(List *, int)	);
-extern FCT( char, lire_char,(char *)			);
+extern FCT( char, lire_char,(const char *)		);
 extern FCT( Instruction *, make_string,(List *, int)	);
-extern FCT( char *, lire_string,(char *)		);
+extern FCT( char *, lire_string,(const char *)		);
 
 #endif
--- Smac/control.h	2006-10-16 16:29:49.000000000 -0400
+++ Smac/control.h	2014-12-27 15:37:04.000000000 -0500
@@ -59,5 +59,5 @@ extern int in_switch;
 extern FCT(Instruction *, make_control,(List *, int)	);
      
-extern void Reinit_Control();
+extern void Reinit_Control(void);
 
 #endif
--- Smac/decl.h	2006-10-16 16:30:37.000000000 -0400
+++ Smac/decl.h	2014-12-27 16:28:31.000000000 -0500
@@ -41,7 +41,9 @@
 
 #include <string.h>
+#include <stdint.h>
 
 /* Pour aider la construction des instructions */
 
+#include "const.h"
 #include "list.h"
 #include "Instruction_.h"
@@ -50,18 +52,13 @@ extern int Is_Terminal;
 extern int Has_Unterminal_Return;
 
-extern FCT( Instruction *, make_integer,(List *, int) );
 #define memo_integer(str)		\
-	AddLast(Memo, List__List(make_integer, (void *) atoi(str)))
+	AddLast(Memo, List__List(make_integer, (void *)(intptr_t)atoi(str)))
 
 #define memo_negate_integer(str)		\
-	AddLast(Memo, List__List(make_integer, (void *) -atoi(str)))
+	AddLast(Memo, List__List(make_integer, (void *)(intptr_t)-atoi(str)))
 
-extern FCT( Instruction *, make_char,(List *, int) );
-extern FCT( char, lire_char,(char *) );
 #define memo_char(str)		\
-	AddLast(Memo, List__List(make_char, (void *) (int) lire_char(str)))
+	AddLast(Memo, List__List(make_char, (void *)(intptr_t)lire_char(str)))
 
-extern FCT( Instruction *, make_string,(List *, int) );
-extern FCT( char *, lire_string,(char *)	);
 #define memo_string(str)		\
 	AddLast(Memo, List__List(make_string, lire_string(str)))
@@ -70,6 +67,6 @@ extern FCT( char *, lire_string,(char *)
 
 extern FCT( Instruction *, just_a_mark,(List *, int) );
-extern FCT( void, memo_empty_block,() );
-extern FCT( void, memo_block,() );
+extern FCT( void, memo_empty_block, (void) );
+extern FCT( void, memo_block, (void) );
 extern char * begin_block;
 
@@ -195,5 +192,5 @@ extern FCT( Instruction *, make_case,(Li
 	AddLast(Memo, List__List(make_case, 0))
 
-extern FCT( void, memo_switch,() );
+extern FCT( void, memo_switch, (void) );
 
 extern FCT( Instruction *, make_if,(List *, int) );
@@ -237,5 +234,5 @@ extern FCT( Instruction *, make_for,(Lis
 /**/
 
-extern FCT( void, memo_comma,() );
+extern FCT( void, memo_comma, (void) );
      
 extern FCT( Instruction *, no_comma_expression,(List *, int) );
@@ -266,5 +263,5 @@ extern FCT( Instruction *, make_funcall,
 	AddLast(Memo, List__List(make_funcall, (char*) m))
 
-extern FCT( void, memo_funcall_nargs,() );
+extern FCT( void, memo_funcall_nargs, (void) );
 
 /**/
@@ -320,5 +317,5 @@ extern char * begin_initializer_list;
   	AddLast(Memo, List__List(just_a_mark, begin_initializer_list))
 
-extern FCT ( void, memo_initializer_list,()	);
+extern FCT ( void, memo_initializer_list, (void)	);
 
 /**/
@@ -328,7 +325,7 @@ extern char * begin_of_list;
   	AddLast(Memo, List__List(just_a_mark, begin_of_list))
 
-extern FCT( void, end_of_list, () );
-extern FCT( void, forget_list, () );
-extern FCT( void, forget_list_if_possible, () );
+extern FCT( void, end_of_list, (void) );
+extern FCT( void, forget_list, (void) );
+extern FCT( void, forget_list_if_possible, (void) );
 
 
@@ -339,6 +336,6 @@ extern char * begin_function_parameter_t
   	AddLast(Memo, List__List(just_a_mark, begin_function_parameter_type_list))
 
-extern FCT( void, end_function_parameter_type_list,() );
-extern FCT( void, end_identifier_list,() );
+extern FCT( void, end_function_parameter_type_list,(void) );
+extern FCT( void, end_identifier_list,(void) );
 
 extern char * begin_identifier_list;
@@ -350,6 +347,6 @@ FCT( Instruction *, function_parameter_t
 	AddLast(Memo, List__List(function_parameter_type_list, 0))
 
-extern FCT(int, ignored_param, () );
-extern FCT(int, typed_param, () );
+extern FCT(int, ignored_param, (void) );
+extern FCT(int, typed_param, (void) );
 
 extern char * ellipsis;
@@ -360,6 +357,6 @@ extern char * ellipsis;
 /**/
 
-extern FCT( int, partial_declaration,() );
-extern FCT( int, declaration,() );
+extern FCT( int, partial_declaration, (void) );
+extern FCT( int, declaration, (void) );
 
 /**/
@@ -376,8 +373,10 @@ extern FCT( Instruction *, array_decl_wi
 	AddLast(Memo, List__List(array_dim, 0))
 
-extern FCT( void, array_abstract_declarator,() );
+extern FCT( void, array_abstract_declarator, (void) );
 
 /**/
 
+FCT( Instruction *, make_block,(List *, int));
+
 FCT( Instruction *, make_function_def,(List *, int)	);
 #define memo_make_function_def()		\
@@ -402,3 +401,3 @@ FCT( Instruction *, make_typedef_oldfunc
 FCT( Instruction *, make_oldfunction_def,(List *, int)	);
 #define memo_make_oldfunction_def()		\
-  	AddLast(Memo, List__List(make_oldfunction_def, 0))
+  	AddLast(Memo, List__List(make_oldfunction_def, 0))
\ No newline at end of file
--- Smac/declaration.c	2006-10-16 16:33:34.000000000 -0400
+++ Smac/declaration.c	2014-12-27 21:45:31.000000000 -0500
@@ -53,4 +53,10 @@
 #include "error.h"
 #include "Declaration_.h"
+#ifdef XCORAL
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include "../main_text.h"
+#include "../warn_box.h"
+#endif
 
 #include "decl.h" /**/
@@ -61,8 +67,7 @@
   */
 
-static Instruction * global_initialized_array(type, init, varname)
-     Type * type;
+static Instruction * global_initialized_array(init, varname)
      List * init;
-     char * varname;
+     const char * varname;
 {
   if (init->fct != make_initializer_list) {
@@ -82,5 +87,5 @@ Instruction * make_declaration(l, del)
     int del;
 {
-  char * varname = ((char **) l->info)[0];
+  char * varname;
   Type * type = ((Type **) l->info)[1];
   Instruction * initval = 0;
@@ -90,9 +95,10 @@ Instruction * make_declaration(l, del)
     if (((List **) l->info)[2])
       DELETE(((List **) l->info)[2]);
-    free(varname);
+    free(((char **)l->info)[0]);
     free(l->info);
     free(l);
     return 0;
   }
+  varname = ((char **) l->info)[0];
   
   /* manage the optional init value */
@@ -101,5 +107,5 @@ Instruction * make_declaration(l, del)
     if (Type__IsaArray(type) && (! Function_Name))
       initval =
-	global_initialized_array(type, ((List **) l->info)[2], varname);
+	global_initialized_array(((List **) l->info)[2], varname);
     else {
       initval = MAKE(((List **) l->info)[2]);
@@ -165,6 +171,4 @@ Instruction * make_declaration(l, del)
 	else if (Debug_Mode > 1) {
 #ifdef XCORAL
-	  extern FCT(void, DisplayWMessage ,(char *, char *, int));
-	  
 	  DisplayWMessage("Warning : ", "", 1);
 	  DisplayWMessage(varname, "", 0);
@@ -243,5 +247,5 @@ Instruction * make_declaration(l, del)
     HashTable__Add(DynamicVarsHashTable, (Object) varname, (Object) var);
     
-    VarLocList = AddLast(VarLocList, List__List(0, var));
+    AddLast(VarLocList, List__List(0, var));
     
     if (Type__IsaArray(type)) {
@@ -268,5 +272,5 @@ Instruction * make_declaration(l, del)
 
 Instruction * make_initializer_list(ignore, del)
-    List * ignore;
+    List * ignore __attribute__((unused));
     int del;
 {
--- Smac/error.c	2006-10-16 16:31:59.000000000 -0400
+++ Smac/error.c	2014-12-27 17:15:22.000000000 -0500
@@ -46,8 +46,14 @@
 #include "FunctionCall_.h"
 #include "smac.h"
+#ifdef XCORAL
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include "../main_text.h"
+#include "../warn_box.h"
+#endif
 
 /* Le nom de la fonction en cours de `digestion' */
 
-char * Function_Name = 0;
+const char * Function_Name = NULL;
 
 /* L'adresse de la derniere structure de memorisation
@@ -81,8 +87,4 @@ int Showed_Stack_Size = 10;
 /* Affiche les appels de fonction imbriques */
 
-#ifdef XCORAL
-  extern FCT(void, DisplayWMessage ,(char *, char *, int));
-#endif
-
 void printf_function_called()
 {
@@ -133,5 +135,5 @@ void printf_function_called()
 /* indique dans quel contexte on est */
 
-static char * context()
+static const char * context()
 {
   return (Function_Name)
@@ -164,5 +166,5 @@ static char mess[MSG_SIZE];
 
 void Internal_Error(msg, nojmp)
-    char * msg;
+    const char * msg;
     int nojmp;
 {
@@ -181,5 +183,5 @@ void Internal_Error(msg, nojmp)
 
 void Error(msg, nojmp)
-    char * msg;
+    const char * msg;
     int nojmp;
 {
@@ -198,5 +200,5 @@ void Error(msg, nojmp)
 
 void Fatal_Error(msg)
-     char * msg;
+     const char * msg;
 {
   fprintf(stderr, "Fatal Error in %s : %s\n", context(), msg);
@@ -208,5 +210,5 @@ void Fatal_Error(msg)
 #ifndef XCORAL
 void Warning(msg)
-     char * msg;
+     const char * msg;
 {
   fprintf(stderr, "Warning in %s : %s\n", context(), msg);
@@ -228,5 +230,5 @@ void clear_ctrl_c()
 
 RETSIGTYPE error_ctrl_c(ignore)
-     int ignore;
+     int ignore __attribute__((unused));
 {
   /* May be a warning (prototype is not always the same), not important */
--- Smac/error.h	2002-07-14 17:02:14.000000000 -0400
+++ Smac/error.h	2014-12-27 15:42:58.000000000 -0500
@@ -49,5 +49,5 @@
 #include "word.h"
 
-extern char * Function_Name;
+extern const char * Function_Name;
 extern char err_msg[];
 extern int Debug_Mode;
@@ -65,11 +65,11 @@ extern int Is_Terminal;
 extern int Has_Unterminal_Return;
 
-extern FCT( void, Error_Full_Stack,()		);
-extern FCT( void, Internal_Error,(char *, int)	);
-extern FCT( void, Fatal_Error,(char *)		);
-extern FCT( void, Error,(char *, int)		);
-extern FCT( void, Warning,(char *)		);
+extern FCT( void, Error_Full_Stack, (void)		);
+extern FCT( void, Internal_Error, (const char *, int)	);
+extern FCT( void, Fatal_Error, (const char *)		);
+extern FCT( void, Error, (const char *, int)		);
+extern FCT( void, Warning, (const char *)		);
 
-extern FCT( void, printf_function_called,()	);
+extern FCT( void, printf_function_called, (void)	);
 
 extern int Showed_Stack_Size;
@@ -89,10 +89,10 @@ typedef enum { NO_JMP,
 
 extern int During_Evaluation;
-extern FCT( void, accept_ctrl_c,()	);
+extern FCT( void, accept_ctrl_c, (void)		);
 extern FCT( RETSIGTYPE, error_ctrl_c,(int)	);
-extern FCT( void, clear_ctrl_c,()	);
+extern FCT( void, clear_ctrl_c, (void)		);
 
 #define ignore_ctrl_c() 		During_Evaluation = 0
 
 
-#endif
+#endif
\ No newline at end of file
--- Smac/function.c	2006-10-16 16:33:28.000000000 -0400
+++ Smac/function.c	2014-12-27 21:44:24.000000000 -0500
@@ -57,4 +57,10 @@
 #include "decl.h" /**/
 
+#ifdef XCORAL
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include "../main_text.h"
+#include "../warn_box.h"
+#endif
 
 /* Le type retourne par la fonction en cours de definition */
@@ -167,5 +173,5 @@ int function_declaration(identifier, par
   *************************/
 
-void function_definition(valtype, funcname, params, body)
+static void function_definition(valtype, funcname, params, body)
      Type * valtype;
      char * funcname;
@@ -184,5 +190,5 @@ void function_definition(valtype, funcna
 
   /* L'Identifier */
-  
+ 
   identifier = Get_Identifier(funcname);
   funcname = 
@@ -212,6 +218,4 @@ void function_definition(valtype, funcna
       if (Debug_Mode > 1) {
 #ifdef XCORAL
-	extern FCT(void, DisplayWMessage ,(char *, char *, int));
-	
 	DisplayWMessage("Warning : ", "", 1);
 	DisplayWMessage(funcname, "", 0);
@@ -281,6 +285,6 @@ void function_definition(valtype, funcna
       }
 
-      Return_Value_Type = 0;
-      Function_Name = 0;
+      Return_Value_Type = NULL;
+      Function_Name = NULL;
       Is_Terminal = 0;
       
@@ -292,6 +296,6 @@ void function_definition(valtype, funcna
   }
 
-  Return_Value_Type = 0;
-  Function_Name = 0;
+  Return_Value_Type = NULL;
+  Function_Name = NULL;
   Is_Terminal = 0;
   VarLocList = 0;
--- Smac/function.h	2006-10-16 16:30:32.000000000 -0400
+++ Smac/function.h	2014-12-27 15:38:40.000000000 -0500
@@ -55,5 +55,5 @@ extern int DynamicVar_FramePosition;
 extern List * VarLocList;
 
-extern void Init_function();
+extern void Init_function(void);
 
 #endif
--- Smac/main.c	2002-07-19 08:45:29.000000000 -0400
+++ Smac/main.c	2014-12-27 14:56:52.000000000 -0500
@@ -39,5 +39,4 @@
 
 
-
 #include <stdio.h>
 #include <stdlib.h>
@@ -51,34 +50,33 @@
 extern FILE * yyin;
 
-char *ExpandTildeName ( name )
-    char *name;
+const char *ExpandTildeName ( name )
+    const char *name;
 {
     struct passwd *pwd;
     char *home;
-    char *p = name + 1;
-    static char  buf [256];
+    static char  buf_dir_tmp [MAXPATHLEN];
     
-    if ( name [1] == '/' ) {        /* c'est moi */
-	if ( (home = (char *) getenv ( "HOME" )) == 0 )
+    if ( name [1] == '/' || name [1] == '\0') {   /* c'est moi */
+	if ((home = getenv ("HOME")) == NULL)
 	  return name;
-	(void) strcpy ( buf, home );
-	(void) strcat ( buf, name + 1 );
+	(void) strcpy ( buf_dir_tmp, home );
+	(void) strcat ( buf_dir_tmp, name + 1 );
     }
     else { /* c'est un autre */
-	int save;
+	const char *p;
+	char *pb;
 	
-	while ( *p && *p != '/' ) p++;
-	save = *p;
-	*p = 0;
-	pwd = getpwnam ( name + 1 );
-	*p = save;
+	for (p = name + 1, pb = buf_dir_tmp; *p && *p != '/'; p++)
+	  *pb++ = *p;
+	*pb = 0;
+	pwd = getpwnam (buf_dir_tmp);
 	if (  pwd ) {
-	    (void) strcpy ( buf, pwd ->  pw_dir);
-	    (void) strcat ( buf, p );
+	    (void) strcpy ( buf_dir_tmp, pwd ->  pw_dir);
+	    (void) strcat ( buf_dir_tmp, p );
 	}
 	else
 	  return name;
     }
-    return buf;
+    return buf_dir_tmp;
 }
 
@@ -86,5 +84,5 @@ int main()
 {
 #ifdef RUNTIMECHECK
-  char * m = init_smac(1024, 15);	/* taille pile = 1024,
+  const char * m = init_smac(1024, 15);	/* taille pile = 1024,
 					   tas = 2^15 octets */
   if (m) {
@@ -118,3 +116,3 @@ int main()
     Stack_Empty(Var_Stack);
   }
-}
+}
\ No newline at end of file
--- Smac/mem.c	2002-07-14 16:55:09.000000000 -0400
+++ Smac/mem.c	2014-12-27 22:39:17.000000000 -0500
@@ -385,5 +385,5 @@ void forbit_RTCfree(p)
 /* Initialisation des allocations, le tas fait 2^log2size */
 
-char * init_rtcmalloc(log2size)
+void * init_rtcmalloc(log2size)
      int log2size;
 {
--- Smac/mem.h	1995-02-22 08:05:55.000000000 -0500
+++ Smac/mem.h	2014-12-27 22:38:32.000000000 -0500
@@ -71,5 +71,5 @@ extern FCT ( void *, RTCCalloc,(int, int
 extern FCT ( void, forbit_RTCfree,(void *)	);
      
-extern FCT ( char *, init_rtcmalloc,(int)	);
+extern FCT ( void *, init_rtcmalloc,(int)	);
 
 /* strdup is not defined on all system (!!) */
--- Smac/memo.c	2006-10-16 16:33:16.000000000 -0400
+++ Smac/memo.c	2014-12-27 16:27:47.000000000 -0500
@@ -93,6 +93,4 @@ Instruction * just_a_mark(l, del)
 char * begin_block = (char *) "begin_block";
 
-FCT(    Instruction *, make_block,(List *, int));
-
 /* Un bloc non vide */
 
@@ -141,6 +139,6 @@ void memo_comma()
       /* ((c1, ..., cn), e2 = (sc1, ..,. scm)) -> (c1, ..., cn, sc1, ..,. scm)
 	 ou (c1, c2, e2 = (sc1, ..,. scm)) -> (c1, c2, cn, sc1, ..,. scm) */
-      int n1 = (int) *((char **) (e1->info));
-      int n2 = (int) *((char **) (e2->info));
+      intptr_t n1 = (intptr_t) *((char **) (e1->info));
+      intptr_t n2 = (intptr_t) *((char **) (e2->info));
 
       m = (char **) Malloc((n1 + n2 + 1) * sizeof(void *));
@@ -163,7 +161,7 @@ void memo_comma()
     if (e2->fct == make_comma) {
       /* (c1, e2 = (sc1, ..,. scn)) -> (c1, sc1, ..., scn) */
-      int n2 = (int) *((char **) (e2->info));
+      intptr_t n2 = (intptr_t) *((char **) (e2->info));
 
-      m = (char **) Malloc((n2 + 2) * sizeof(void *));
+      m = Malloc((n2 + 2) * sizeof(void *));
       m[0] = (char *) (n2 + 1);
       m[1] = (char *) e1;
@@ -232,5 +230,5 @@ void memo_funcall_nargs()
   if ((Memo->fct == just_a_mark) && 
       (Memo->info == some_args)) {
-    int narg = 1;
+    intptr_t narg = 1;
     List * l = Memo->previous;
     List ** p;
@@ -244,5 +242,5 @@ void memo_funcall_nargs()
     } while ((l->fct != just_a_mark) || (l->info != first_arg));
 
-    p = (m = (List **) Malloc((narg + 2) * sizeof(List *))) + narg + 1;
+    p = (m = Malloc((narg + 2) * sizeof(List *))) + narg + 1;
 
     do {
@@ -333,6 +331,6 @@ char * begin_of_list = (char *) "begin_o
 
 Instruction * preserve_list(ignore1, ignore2)
-    List * ignore1;
-    int ignore2;
+    List * ignore1 __attribute__((unused));
+    int ignore2 __attribute__((unused));
 { 
   /* sert juste de marque */
@@ -394,6 +392,6 @@ void end_of_list()
 
 Instruction * array_dims(ignore1, ignore2)
-    List * ignore1;
-    int ignore2;
+    List * ignore1 __attribute__((unused));
+    int ignore2 __attribute__((unused));
 {
   /* sert juste de marque */
--- Smac/memo.h	2002-07-14 06:21:46.000000000 -0400
+++ Smac/memo.h	2014-12-27 15:28:50.000000000 -0500
@@ -46,5 +46,5 @@
 #include "fctdecl.h"
 
-extern Type * the_abstract_type();
+extern Type * the_abstract_type(void);
 
 extern FCT(Type *, the_typed_var,(char ** var)	);
--- Smac/mylex.c	2002-07-19 08:51:38.000000000 -0400
+++ Smac/mylex.c	2014-12-27 22:36:00.000000000 -0500
@@ -44,7 +44,9 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include "y.tab.h"
 #include "fctdecl.h"
 #include "smac.h"
+#include "mylex.h"
 
 char yytext[8196];
@@ -56,5 +58,5 @@ char previous_tchar[256];
 static int pt_file = 0;
 
-FCT(int, ie_getc,());
+FCT(static int, ie_getc, (void));
 
 void smac_read_new_file()
@@ -67,6 +69,10 @@ void smac_read_new_file()
 
 #ifdef XCORAL
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include "../main_text.h"
+#include "../ie_func.h"
 #include "smacXcoral.h"
-extern char err_msg[];
+extern const char err_msg[];
 
 int ie_getc()
@@ -82,6 +88,4 @@ int ie_getc()
   
   {
-    extern FCT(int, ie_the_char,(char *, int)	);
-    
     return (i_curseur == i_curseur_sup)
       ? 0
@@ -106,12 +110,10 @@ int ie_getc()
 #endif
 
-extern FCT(int, yyerror, (char *)	);
-
-int key_err(k)
-     char * k;
+static int key_err(k)
+     const char * k;
 {
   char msg[64];
   
-  sprintf(msg, "sorry %s refused", k);
+  snprintf(msg, sizeof msg, "sorry %s refused", k);
   yyerror(msg);
   
@@ -121,5 +123,5 @@ int key_err(k)
 #define error() previous_char = previous_tchar[--pt_file]
 
-int eof_error()
+static int eof_error()
 {
   error();
@@ -134,5 +136,5 @@ static int lex_error(c)
   
   msg[0] = c;
-  msg[1] = 0;
+  msg[1] = '\0';
   error();
   yyerror(msg);
--- Smac/mylex.h	1969-12-31 19:00:00.000000000 -0500
+++ Smac/mylex.h	2014-12-27 15:15:12.000000000 -0500
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+extern void yyerror(const char *msg);
+extern int yylex(void);
+extern void mylex_init(void);
+
+extern FILE *yyin;
\ No newline at end of file
--- Smac/operator.c	2006-10-16 16:31:08.000000000 -0400
+++ Smac/operator.c	2014-12-27 16:32:06.000000000 -0500
@@ -75,5 +75,5 @@
   *****************/
 
-Instruction * var_reference(mkident)
+static Instruction * var_reference(mkident)
      List * mkident;
 {
@@ -91,6 +91,4 @@ Instruction * var_reference(mkident)
 }
 
-FCT ( Instruction *, make_oper_asterisk,(List *, int)	);
-
 Instruction * make_oper_ampersand(l, del)
     List * l;
--- Smac/rename.h	2002-07-19 08:55:08.000000000 -0400
+++ Smac/rename.h	2014-12-27 14:32:29.000000000 -0500
@@ -78,5 +78,4 @@
 #define yyvs i_yyvs
 #define yyvsp i_yyvsp
-#define key_err i_key_err
 #define ncform_sccsid i_ncform_sccsid
 #define yyback i_yyback
--- Smac/smac.c	2006-10-16 16:37:56.000000000 -0400
+++ Smac/smac.c	2014-12-27 16:44:18.000000000 -0500
@@ -40,4 +40,7 @@
 
 #ifdef XCORAL
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include "../main_text.h"
 #include "smacXcoral.h"
 #else
@@ -70,4 +73,5 @@
 #include "Switch_.h"
 #include "smac.h"
+#include "mylex.h"
 
 extern int yyparse();
@@ -76,5 +80,4 @@ int yyinflag = 0;
 void load_file(int nl)
 {
-  extern void smac_read_new_file();
   int save_numlig = numlig;
 #ifndef mylex
@@ -216,6 +219,4 @@ char * init_smac(stacksize)
 #ifdef mylex
   {
-    extern void mylex_init();
-    
     mylex_init();
   }
@@ -262,4 +263,3 @@ char * init_smac(stacksize)
     return 0;
   }
-}
-
+}
\ No newline at end of file
--- Smac/smac.h	2002-07-19 08:48:23.000000000 -0400
+++ Smac/smac.h	2014-12-27 21:50:42.000000000 -0500
@@ -50,9 +50,11 @@ FCT(	char *, init_smac,(int, int)	); 
 #else
 FCT(	char *, init_smac,(int)		); 
-#endif     
+#endif
 
 extern int yyinflag;
-extern char * yyinfilename;
+extern const char * yyinfilename;
 extern int numlig;
+FCT(const char *, ExpandTildeName, (const char *)); 
+FCT(void, smac_read_new_file, (void)); 
 
-#endif
+#endif
\ No newline at end of file
--- Smac/smacXcoral.c	2006-10-16 16:25:44.000000000 -0400
+++ Smac/smacXcoral.c	2014-12-27 22:32:15.000000000 -0500
@@ -5,5 +5,5 @@
    File: smacXcoral.c
    Path: /home/fournigault/c/X11/xcoral-2.33/Smac/smacXcoral.c
-   Description: 
+   Description:
    Created: Tue Feb 21 13:01:08 MET 1995
    Author: Bruno Pages
@@ -12,9 +12,9 @@
 
    RCS $Revision$ $State$
-   
+
 
    ########################################################################
 
-   Note: 
+   Note:
 
    ########################################################################
@@ -48,4 +48,15 @@
 #endif
 
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include "../selection.h"
+#include "../main_text.h"
+#include "../warn_box.h"
+#include "../ie_func.h"
+#include "../list_box.h"
+#include "../dial_box.h"
+#include "../BR_Global.h"
+#include "RefDeref_.h"
+
 /*#include "error.h"*/
 #include "FunctionCall_.h"
@@ -56,8 +67,9 @@
 #include "control.h"
 #include "stack.h"
+#include "smacXcoral.h"
 
 /* Le buffer courant */
 
-char * i_buffer_courant;
+Text * i_buffer_courant;
 
 
@@ -77,5 +89,5 @@ extern FILE * yyin;
 
 /* ---------------------------------
-   
+
    Les fonctions appelees par Xcoral
 
@@ -87,12 +99,9 @@ extern FILE * yyin;
    --------------------------------- */
 
-extern FCT(void, ClearSelectionIfNeeded,(char *));
-
-static char * check_parser_error()
+static const char * check_parser_error()
 {
   if (*err_msg) {
     if (! strncmp(err_msg, "parser error", 12)) {
-      extern FCT(void, DisplayWMessage ,(char *, char *, int));
-      
+
       /* Le message n'a pas encore ete affiche */
       DisplayWMessage(err_msg, "Smac error", 1);
@@ -107,25 +116,25 @@ static char * check_parser_error()
    courant est buff (qui n'est pas un vrai char *) */
 
-char * ie_load_file(buff, filename)
-     char * buff;
-     char * filename;
+const char * ie_load_file(buff, filename)
+     Text * buff;
+     const char * filename;
 {
   /* Chargement / evaluation d'un fichier */
-  char * xcoral_lib = 0;
-  char * smaclib = 0;
-  
+  char * xcoral_lib = NULL;
+  char * smaclib = NULL;
+
   ClearSelectionIfNeeded(buff);
-  
+
   i_buffer_courant = buff;
 
   if ((yyin = fopen(filename, "r")) == 0) {
-    char * justname = strrchr(filename, '/');
-    
+    const char * justname = strrchr(filename, '/');
+
     if (justname)
       justname += 1;
     else
       justname = filename;
-    
-    smaclib = (char *) getenv ("XCORAL_SMACLIB");
+
+    smaclib = getenv ("XCORAL_SMACLIB");
     if (!smaclib) {
 	xcoral_lib = malloc(strlen(XCORAL_LIB_DIR) + strlen(justname) + 2);
@@ -136,5 +145,5 @@ char * ie_load_file(buff, filename)
 	sprintf(xcoral_lib, "%s/%s", smaclib, justname);
     }
-    
+
     if ((yyin = fopen(xcoral_lib, "r")) == 0) {
       free(xcoral_lib);
@@ -149,10 +158,10 @@ char * ie_load_file(buff, filename)
   else
     yyinfilename = filename;
-  
+
   yyinflag = 1;
   *err_msg = 0;
   clear_ctrl_c();
   rerun_profile();
-  
+
   {
     jmp_buf come_back;
@@ -160,5 +169,5 @@ char * ie_load_file(buff, filename)
     Object * save_stack_pointer = Stack_Pointer;
     Object * save_frame_pointer = Frame_Pointer;
-    
+
     if (! setjmp(come_back)) {
       pCome_Back = &come_back;
@@ -187,15 +196,10 @@ char * ie_load_file(buff, filename)
 /* Evaluation de la region du buffer buff */
 
-char * ie_eval_region(buff)
-     char * buff;
+const char * ie_eval_region(buff)
+     Text * buff;
 {
-  extern FCT(int, ie_mark_position,(char *));
-  extern FCT(int, ie_current_position,(char *));
-  extern FCT(int, ie_current_line,(char *));
-  extern FCT(void, ie_goto_char,(char *, int));
-  extern FCT(char *, ie_filename,(char *));
-  
+
   ClearSelectionIfNeeded(buff);
-  
+
   i_buffer_courant = buff;
   yyin = 0;
@@ -213,5 +217,5 @@ char * ie_eval_region(buff)
   clear_ctrl_c();
   rerun_profile();
-  
+
   {
     jmp_buf come_back;
@@ -219,5 +223,5 @@ char * ie_eval_region(buff)
     Object * save_stack_pointer = Stack_Pointer;
     Object * save_frame_pointer = Frame_Pointer;
-    
+
     if (! setjmp(come_back)) {
       pCome_Back = &come_back;
@@ -236,5 +240,5 @@ char * ie_eval_region(buff)
   i_buffer_courant = 0;
   i_curseur = i_curseur_sup = 0;
-  
+
   return check_parser_error();
 }
@@ -243,7 +247,7 @@ char * ie_eval_region(buff)
 /* Evaluation du minibuffer */
 
-char * ie_eval_expression(buff, expr)
-     char * buff;
-     char * expr;
+const char * ie_eval_expression(buff, expr)
+     Text * buff;
+     const char * expr;
 {
   int lg = strlen(expr);
@@ -253,10 +257,10 @@ char * ie_eval_expression(buff, expr)
 
   ClearSelectionIfNeeded(buff);
-  
+
   lexpr[0] = '{';
   strcpy(lexpr + 1, expr);
   lexpr[lg + 1] = '}';
   lexpr[lg + 2] = 0;
-  
+
   yyinfilename = 0;
   i_buffer_courant = buff;
@@ -268,5 +272,5 @@ char * ie_eval_expression(buff, expr)
   clear_ctrl_c();
   rerun_profile();
-  
+
   {
     jmp_buf come_back;
@@ -274,5 +278,5 @@ char * ie_eval_expression(buff, expr)
     Object * save_stack_pointer = Stack_Pointer;
     Object * save_frame_pointer = Frame_Pointer;
-    
+
     if (! setjmp(come_back)) {
       pCome_Back = &come_back;
@@ -286,9 +290,10 @@ char * ie_eval_expression(buff, expr)
 
   stop_profile();
-  i_buffer_courant = i_minibuffer = 0;
+  i_buffer_courant = NULL;
+  i_minibuffer = NULL;
   i_curseur = i_curseur_sup = 0;
   numlig = -1;
   free(lexpr);
-  
+
   return check_parser_error();
 }
@@ -297,5 +302,5 @@ char * ie_eval_expression(buff, expr)
 /* appel d'une fonction ou non builtin, par exemple indent_line, s'il
    y a des arguments, ceux-ci ne peuvent etre que des int ou char.
-   
+
    Attention on peut avoir xcoral appelle smac qui appelle xcoral qui
    appelle smac !
@@ -303,7 +308,7 @@ char * ie_eval_expression(buff, expr)
 */
 
-char * ie_call_function(buff, fctname, narg, args)
-     char * buff;
-     char * fctname;
+const char * ie_call_function(buff, fctname, narg, args)
+     Text * buff;
+     const char * fctname;
      int narg;
      int * args;
@@ -315,5 +320,5 @@ char * ie_call_function(buff, fctname, n
 
   ClearSelectionIfNeeded(buff);
-  
+
   i_buffer_courant = buff;
   i_minibuffer = 0;
@@ -329,5 +334,5 @@ char * ie_call_function(buff, fctname, n
     return err_msg;
   }
-  
+
   accept_ctrl_c();
   rerun_profile();
@@ -335,5 +340,5 @@ char * ie_call_function(buff, fctname, n
   case NO_JMP:
     pCome_Back = &come_back;
-    
+
     if (Function__IsBuiltin(fdef))
       call_builtin_function_of_xcoral(fdef, narg);
@@ -346,13 +351,13 @@ char * ie_call_function(buff, fctname, n
   }
   pCome_Back = spcome_back;
-  
+
   stop_profile();
   ignore_ctrl_c();
-  
+
   i_buffer_courant = 0;
   i_curseur = i_curseur_sup = 0;
-  
+
   Reinit_Control();
-  
+
   return (*err_msg) ? err_msg : 0;
 }
@@ -362,9 +367,9 @@ char * ie_call_function(buff, fctname, n
 
 char * ExpandSmacName(s, n, common)
-     char * s;
+     const char * s;
      int * n;
      int * common;
 {
-  char * result = 0;
+  char * result = NULL;
   int rlength = 0;
   static HashItem * item = 0;
@@ -373,15 +378,15 @@ char * ExpandSmacName(s, n, common)
   *n = 0;
   *common = strlen(s);
-  
+
   while (HashTable_Iter(IdentifierHashTable, &item, &entry), item) {
     char * name = (char *) HashItem__Key(item);
-    
+
     if (strstr(name, s) == name) {
       char * nresult =
-	  (char *) malloc((unsigned int) rlength + strlen(name) + 3);
-		 
+	  malloc(rlength + strlen(name) + 3);
+
       if (! nresult)
 	return result;
-	
+
       if (result) bcopy(result, nresult, rlength);
       strcpy(nresult + rlength, name);
@@ -400,71 +405,18 @@ char * ExpandSmacName(s, n, common)
   if ((*n == 1) && (*(result + strlen(result) - 1) == ')'))
     *(result + strlen(result) - 1) = 0;
-  
-  return result;
-}
-
-/* Retourne la liste des fonctions definies, builtin ou non.
-
-   Pour initialiser le processus init doit etre non nul,
-   Les appels retourne un char * qui est le nom d'une fonction
-   a chaque appel, 0 en fin de liste. Il ne doit pas y avoir
-   de chargement/evaluation de code pendant le parcours */
-   
-char * ie_function_list(init)
-     int init;
-{
-  static HashItem * item;
-  static HashItem ** entry;
-  
-  if (init) {
-    item = 0;
-    entry = 0;
-  }
 
-  for (;;) {
-    HashTable_Iter(IdentifierHashTable, &item, &entry);
-
-    if (! item)
-      return 0;
-    else if (Identifier__FunctionDef((Identifier *) HashItem__Data(item)))
-      return (char *) HashItem__Key(item);
-  }
+  return result;
 }
 
 
-/* La meme chose pour les donnees (variables globales) */
-   
-char * ie_data_list(init)
-     int init;
-{
-  static HashItem * item;
-  static HashItem ** entry;
-  
-  if (init) {
-    item = 0;
-    entry = 0;
-  }
-
-  for (;;) {
-    HashTable_Iter(IdentifierHashTable, &item, &entry);
-
-    if (! item)
-      return 0;
-    else if (! Identifier__FunctionDef((Identifier *) HashItem__Data(item)))
-      return (char *) HashItem__Key(item);
-  }
-}
-
-     
 /* ------------------------------------------------
-   
+
    Les fonctions d'Xcoral appelees par l'interprete
-   
+
    ------------------------------------------------ */
 
-Object builtin_current_position(a)		/* la position courante */
-     Instruction ** a;
+static Object builtin_current_position(a)	/* la position courante */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(int, ie_current_position,(char *));
   Object result;
 
@@ -472,12 +424,11 @@ Object builtin_current_position(a)		/* l
   result = ie_current_position(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_current_char(a)			/* le caractere courant */
-     Instruction ** a;				/* 0 en fin de fichier  */
+static Object builtin_current_char(a)		/* le caractere courant */
+     Instruction **a __attribute__((unused));			/* 0 en fin de fichier  */
 {
-  extern FCT(char, ie_current_char,(char *));
   Object result;
 
@@ -485,12 +436,11 @@ Object builtin_current_char(a)			/* le c
   result = ie_current_char(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_previous_char(a)			/* le caractere precedant */
-     Instruction ** a;				/* 0 en debut de fichier  */
+static Object builtin_previous_char(a)		/* le caractere precedant */
+     Instruction **a __attribute__((unused));			/* 0 en debut de fichier  */
 {
-  extern FCT(char, ie_previous_char,(char *));
   Object result;
 
@@ -498,12 +448,11 @@ Object builtin_previous_char(a)			/* le 
   result = ie_previous_char(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_next_char(a)			/* le caractere suivant */
-     Instruction ** a;				/* 0 en debut de fichier  */
+static Object builtin_next_char(a)		/* le caractere suivant */
+     Instruction **a __attribute__((unused));			/* 0 en debut de fichier  */
 {
-  extern FCT(char, ie_next_char,(char *));
   Object result;
 
@@ -511,12 +460,11 @@ Object builtin_next_char(a)			/* le cara
   result = ie_next_char(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_the_char(a)	/* le caractere correspondant a la position */
-     Instruction ** a;		/* 0 en cas d'erreur  */
+static Object builtin_the_char(a)	/* le caractere correspondant a la position */
+     Instruction ** a;			/* 0 en cas d'erreur  */
 {
-  extern FCT(char, ie_the_char,(char *, int));
   Object result = Eval(*a);
 
@@ -524,11 +472,11 @@ Object builtin_the_char(a)	/* le caracte
   result = ie_the_char(i_buffer_courant, result);
   accept_ctrl_c();
-  
+
   return result;
 }
-Object builtin_goto_previous_char(a)		/* recule d'un caractere */
-     Instruction ** a;				/* si possible */
+
+static Object builtin_goto_previous_char(a)	/* recule d'un caractere */
+     Instruction **a __attribute__((unused));			/* si possible */
 {
-  extern FCT(void, ie_goto_previous_char,(char *));
 
   ignore_ctrl_c();
@@ -538,8 +486,7 @@ Object builtin_goto_previous_char(a)		/*
 }
 
-Object builtin_goto_next_char(a)		/* avance d'un caractere */
-     Instruction ** a;				/* si possible */
+static Object builtin_goto_next_char(a)		/* avance d'un caractere */
+     Instruction **a __attribute__((unused));			/* si possible */
 {
-  extern FCT(void, ie_goto_next_char,(char *));
 
   ignore_ctrl_c();
@@ -549,10 +496,9 @@ Object builtin_goto_next_char(a)		/* ava
 }
 
-Object builtin_goto_char(a)			/* change de position */
+static Object builtin_goto_char(a)		/* change de position */
      Instruction ** a;				/* si possible */
 {
-  extern FCT(void, ie_goto_char,(char *, int));
   Object arg = Eval(*a);
-  
+
   ignore_ctrl_c();
   ie_goto_char(i_buffer_courant, arg);
@@ -561,8 +507,7 @@ Object builtin_goto_char(a)			/* change 
 }
 
-Object builtin_beginning_of_line(a)	/* la position du debut de ligne */
-     Instruction ** a;
+static Object builtin_beginning_of_line(a)	/* la position du debut de ligne */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(int, ie_beginning_of_line,(char *));
   Object result;
 
@@ -570,12 +515,11 @@ Object builtin_beginning_of_line(a)	/* l
   result = ie_beginning_of_line(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_goto_beginning_of_line(a)	/* va en debut de ligne */
-     Instruction ** a;
+static Object builtin_goto_beginning_of_line(a)	/* va en debut de ligne */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(void, ie_goto_beginning_of_line,(char *));
 
   ignore_ctrl_c();
@@ -585,8 +529,7 @@ Object builtin_goto_beginning_of_line(a)
 }
 
-Object builtin_end_of_line(a)		/* la position de la fin de ligne */
-     Instruction ** a;
+static Object builtin_end_of_line(a)		/* la position de la fin de ligne */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(int, ie_end_of_line,(char *));
   Object result;
 
@@ -594,12 +537,11 @@ Object builtin_end_of_line(a)		/* la pos
   result = ie_end_of_line(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_goto_end_of_line(a)		/* va enfin de ligne */
-     Instruction ** a;
+static Object builtin_goto_end_of_line(a)	/* va enfin de ligne */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(void, ie_goto_end_of_line,(char *));
 
   ignore_ctrl_c();
@@ -609,8 +551,7 @@ Object builtin_goto_end_of_line(a)		/* v
 }
 
-Object builtin_at_end_of_file(a)			/* fin de fichier ? */
-     Instruction ** a;
+static Object builtin_at_end_of_file(a)		/* fin de fichier ? */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(int, ie_at_end_of_file,(char *));
   Object result;
 
@@ -618,12 +559,11 @@ Object builtin_at_end_of_file(a)			/* fi
   result = ie_at_end_of_file(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_end_of_file(a)		/* la position de la fin de fichier */
-     Instruction ** a;
+static Object builtin_end_of_file(a)		/* la position de la fin de fichier */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(int, ie_end_of_file,(char *));
   Object result;
 
@@ -631,12 +571,11 @@ Object builtin_end_of_file(a)		/* la pos
   result = ie_end_of_file(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_goto_end_of_file(a)		/* va a la fin du fichier */
-     Instruction ** a;
+static Object builtin_goto_end_of_file(a)	/* va a la fin du fichier */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(void, ie_goto_end_of_file,(char *));
 
   ignore_ctrl_c();
@@ -646,14 +585,9 @@ Object builtin_goto_end_of_file(a)		/* v
 }
 
-Object builtin_goto_previous_line(a)		/* remonte d'une ligne */
-    Instruction ** a;
+static Object builtin_goto_previous_line(a)	/* remonte d'une ligne */
+    Instruction **a __attribute__((unused));
 {
-  extern FCT(void, ie_goto_beginning_of_line,(char *));
-  extern FCT(void, ie_goto_next_char,(char *));
-  extern FCT(void, ie_goto_previous_char,(char *));
-  extern FCT(int, ie_current_position,(char *));
-  extern FCT(char, ie_current_char,(char *));
   int col = ie_current_position(i_buffer_courant);
-  
+
   ignore_ctrl_c();
   ie_goto_beginning_of_line(i_buffer_courant);
@@ -669,15 +603,9 @@ Object builtin_goto_previous_line(a)		/*
 }
 
-Object builtin_goto_next_line(a)		/* descend d'une ligne */
-    Instruction ** a;
+static Object builtin_goto_next_line(a)		/* descend d'une ligne */
+    Instruction **a __attribute__((unused));
 {
-  extern FCT(void, ie_goto_beginning_of_line,(char *));
-  extern FCT(void, ie_goto_end_of_line,(char *));
-  extern FCT(void, ie_goto_next_char,(char *));
-  extern FCT(void, ie_goto_previous_char,(char *));
-  extern FCT(int, ie_current_position,(char *));
-  extern FCT(char, ie_current_char,(char *));
   int col = ie_current_position(i_buffer_courant);
-  
+
   ignore_ctrl_c();
   ie_goto_beginning_of_line(i_buffer_courant);
@@ -691,28 +619,18 @@ Object builtin_goto_next_line(a)		/* des
 }
 
-Object builtin_goto_line(a)			/* change de ligne */
+static Object builtin_goto_line(a)		/* change de ligne */
     Instruction ** a;
 {
-  extern FCT(void, ie_goto_beginning_of_line,(char *));
-  extern FCT(void, ie_goto_end_of_line,(char *));
-  extern FCT(void, ie_goto_end_of_file,(char *));
-  extern FCT(void, ie_goto_next_char,(char *));
-  extern FCT(void, ie_goto_previous_char,(char *));
-  extern FCT(void, ie_goto_char,(char *, int));
-  extern FCT(int, ie_current_position,(char *));
-  extern FCT(char, ie_current_char,(char *));
-  extern FCT(int, ie_line_count,(char *));
-  extern FCT(int, ie_current_line,(char *));
   int nline = Eval(*a);
-  
-  if ((nline >= 0) && 
+
+  if ((nline >= 0) &&
       (nline < ie_line_count(i_buffer_courant)) &&
       (nline != ie_current_line(i_buffer_courant))) {
     int col = ie_current_position(i_buffer_courant);
-  
+
     ignore_ctrl_c();
     ie_goto_beginning_of_line(i_buffer_courant);
     col -= ie_current_position(i_buffer_courant);
-    
+
     if (nline < ie_current_line(i_buffer_courant))
       if (nline < (ie_current_line(i_buffer_courant) / 2)) {
@@ -748,12 +666,11 @@ Object builtin_goto_line(a)			/* change 
     accept_ctrl_c();
   }
-  
+
   return 0;
 }
 
-Object builtin_current_line_to_top(a)
-    Instruction ** a;
+static Object builtin_current_line_to_top(a)
+    Instruction **a __attribute__((unused));
 {
-  extern FCT(void, ie_current_line_to_top,(char *));
 
   ignore_ctrl_c();
@@ -763,34 +680,31 @@ Object builtin_current_line_to_top(a)
 }
 
-Object builtin_current_line(a)
-    Instruction ** a;
+static Object builtin_current_line(a)
+    Instruction **a __attribute__((unused));
 {
-  extern FCT(int, ie_current_line,(char *));
   Object result;
-  
+
   ignore_ctrl_c();
   result = ie_current_line(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_line_count(a)
-    Instruction ** a;
+static Object builtin_line_count(a)
+    Instruction **a __attribute__((unused));
 {
-  extern FCT(int, ie_line_count,(char *));
   Object result;
-  
+
   ignore_ctrl_c();
   result = ie_line_count(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_insert_char(a)			/* insere et avance */
+static Object builtin_insert_char(a)		/* insere et avance */
      Instruction ** a;
 {
-  extern FCT(void, ie_insert_char,(char *, int));
   Object arg = Eval(*a);
 
@@ -801,9 +715,8 @@ Object builtin_insert_char(a)			/* inser
 }
 
-Object builtin_insert_string(a)			/* insere et avance */
+static Object builtin_insert_string(a)		/* insere et avance */
      Instruction ** a;
 {
-  extern FCT(void, ie_insert_char,(char *, int));
-  char * str = (char *) Eval(*a);
+  const char * str = (char *) Eval(*a);
 
   ignore_ctrl_c();
@@ -817,8 +730,7 @@ Object builtin_insert_string(a)			/* ins
 }
 
-Object builtin_delete_char(a)			/* detruit caract */
-     Instruction ** a;
+static Object builtin_delete_char(a)		/* detruit caract */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(void, ie_delete_char,(char *));
 
   ignore_ctrl_c();
@@ -828,8 +740,7 @@ Object builtin_delete_char(a)			/* detru
 }
 
-Object builtin_replace_char(a)		/* remplace sans avancer */
+static Object builtin_replace_char(a)		/* remplace sans avancer */
      Instruction ** a;
 {
-  extern FCT(void, ie_replace_char,(char *, int));
   Object arg = Eval(*a);
 
@@ -840,10 +751,9 @@ Object builtin_replace_char(a)		/* rempl
 }
 
-Object builtin_global_replace(a)
+static Object builtin_global_replace(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_global_replace,(char *, char *, char *));
-  char * before = (char *) Eval(a[0]);
-  char * after = (char *) Eval(a[1]);
+  const char * before = (char *) Eval(a[0]);
+  const char * after = (char *) Eval(a[1]);
   Object result;
 
@@ -859,8 +769,7 @@ Object builtin_global_replace(a)
 }
 
-Object builtin_redisplay(a)			/* reaffiche buff */
-     Instruction ** a;
+static Object builtin_redisplay(a)		/* reaffiche buff */
+     Instruction **a __attribute__((unused));
 {
-  extern FCT(void, ie_redisplay,(char *));
 
   ignore_ctrl_c();
@@ -870,8 +779,7 @@ Object builtin_redisplay(a)			/* reaffic
 }
 
-Object builtin_blink(a)				/* blink le caractere sous */
+static Object builtin_blink(a)			/* blink le caractere sous */
      Instruction ** a;				/* la position donnee */
 {						/* en argument */
-  extern FCT(void, ie_blink,(char *, int));
   Object arg = Eval(*a);
 
@@ -882,9 +790,8 @@ Object builtin_blink(a)				/* blink le c
 }
 
-Object builtin_cmd_shell(a)			/* system */
+static Object builtin_cmd_shell(a)			/* system */
      Instruction ** a;
 {
-  extern FCT(int, ie_cmd_shell,(char *, char *));
-  char * expr = (char *) Eval(*a);
+  const char * expr = (char *) Eval(*a);
   Object result;
 
@@ -900,20 +807,19 @@ Object builtin_cmd_shell(a)			/* system 
 
 static Object strdup_end(s)
-    char * s;
+    const char * s;
 {
   Object result = (Object) ((s) ? RTCMalloc(strlen(s) + 1) : 0);
-  
+
   if (result)
     strcpy((char *) result, s);
-  
+
   accept_ctrl_c();
   return result;
 }
 
-Object builtin_cmd_shell_to_string(a)			/* system */
+static Object builtin_cmd_shell_to_string(a)			/* system */
      Instruction ** a;
 {
-  extern FCT(char *, ie_shell_to_string,(char *, char *));
-  char * expr = (char *) Eval(*a);
+  const char * expr = (char *) Eval(*a);
   char * s1;
   Object s2;
@@ -923,17 +829,16 @@ Object builtin_cmd_shell_to_string(a)			
 #endif
   ignore_ctrl_c();
-  s1 = ie_shell_to_string(i_buffer_courant, expr);
+  s1 = ie_shell_to_string(expr);
   s2 = strdup_end(s1);
-  
+
   free(s1);
   return s2;
 }
 
-Object builtin_msearch(a)			/* msearch(str, fin, sens)   */
+static Object builtin_msearch(a)		/* msearch(str, fin, sens)   */
 						/* va sur le premier caract  */
      Instruction ** a;				/* appartenant a str qui est */
 {						/* avant/apres fin           */
-  extern FCT(int, ie_msearch,(char *, char *, int, int));
-  char * expr = (char *) Eval(*a);
+  const char * expr = (char *) Eval(*a);
   int end = (int) Eval(a[1]);
   int sens = (int) Eval(a[2]);
@@ -951,9 +856,8 @@ Object builtin_msearch(a)			/* msearch(s
 
 
-Object builtin_backward_search(a)
+static Object builtin_backward_search(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_backward_search,(char *, char *));
-  char * str = (char *) Eval(*a);
+  const char * str = (char *) Eval(*a);
   Object result;
 
@@ -968,9 +872,8 @@ Object builtin_backward_search(a)
 }
 
-Object builtin_forward_search(a)
+static Object builtin_forward_search(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_forward_search,(char *, char *));
-  char * str = (char *) Eval(*a);
+  const char * str = (char *) Eval(*a);
   Object result;
 
@@ -986,19 +889,15 @@ Object builtin_forward_search(a)
 
 
-
-Object builtin_create_mode(a)
+static Object builtin_create_mode(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_create_mode,(char *, char *));
-  extern FCT(void, ie_set_mode_suffixes,(char *, char *, char *));
-  extern FCT(void, ie_set_mode_font,(char *, char *, char *));
-  char * nom_mode = (char *) Eval(a[0]);
-  char * suffixes;
-  char * police;
+  const char * nom_mode = (char *) Eval(a[0]);
+  const char * suffixes;
+  const char * police;
 
 #ifdef RUNTIMECHECK
   check_strlen(nom_mode);
 #endif
-  
+
   if (IsaNotEnoughArg(a[1]))
     suffixes = police = 0;
@@ -1010,5 +909,5 @@ Object builtin_create_mode(a)
 
     if (IsaNotEnoughArg(a[2]))
-      police = 0;
+      police = NULL;
     else {
       police = (char *) Eval(a[2]);
@@ -1020,18 +919,17 @@ Object builtin_create_mode(a)
 
   ignore_ctrl_c();
-  ie_create_mode(i_buffer_courant, nom_mode);
-  if (suffixes) ie_set_mode_suffixes(i_buffer_courant, nom_mode, suffixes);
-  if (police) ie_set_mode_font(i_buffer_courant, nom_mode, police);
+  ie_create_mode(nom_mode);
+  if (suffixes) ie_set_mode_suffixes(nom_mode, suffixes);
+  if (police) ie_set_mode_font(nom_mode, police);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_set_mode_suffixes(a)
+static Object builtin_set_mode_suffixes(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_set_mode_suffixes,(char *, char *, char *));
-  char * nom_mode = (char *) Eval(a[0]);
-  char * suffixes = (char *) Eval(a[1]);
+  const char * nom_mode = (char *) Eval(a[0]);
+  const char * suffixes = (char *) Eval(a[1]);
 
 #ifdef RUNTIMECHECK
@@ -1041,16 +939,15 @@ Object builtin_set_mode_suffixes(a)
 
   ignore_ctrl_c();
-  ie_set_mode_suffixes(i_buffer_courant, nom_mode, suffixes);
+  ie_set_mode_suffixes(nom_mode, suffixes);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_set_mode_font(a)
+static Object builtin_set_mode_font(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_set_mode_font,(char *, char *, char *));
-  char * nom_mode = (char *) Eval(a[0]);
-  char * font = (char *) Eval(a[1]);
+  const char * nom_mode = (char *) Eval(a[0]);
+  const char * font = (char *) Eval(a[1]);
 
 #ifdef RUNTIMECHECK
@@ -1060,15 +957,14 @@ Object builtin_set_mode_font(a)
 
   ignore_ctrl_c();
-  ie_set_mode_font(i_buffer_courant, nom_mode, font);
+  ie_set_mode_font(nom_mode, font);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_set_mode(a)
+static Object builtin_set_mode(a)
     Instruction ** a;
 {
-  extern FCT(void, ie_set_mode,(char *, char *));
-  char * nom_mode = (char *) Eval(a[0]);
+  const char * nom_mode = (char *) Eval(a[0]);
 
 #ifdef RUNTIMECHECK
@@ -1079,16 +975,15 @@ Object builtin_set_mode(a)
   ie_set_mode(i_buffer_courant, nom_mode);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
 
-Object builtin_key_def(a)
+static Object builtin_key_def(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_key_def,(char *, char *, char *, char *));
-  char * nom_mode = (char *) Eval(a[0]);
-  char * touches = (char *) Eval(a[1]);
-  char * nom_fonc = (char *) Eval(a[2]);
+  const char * nom_mode = (char *) Eval(a[0]);
+  const char * touches = (char *) Eval(a[1]);
+  const char * nom_fonc = (char *) Eval(a[2]);
 
 #ifdef RUNTIMECHECK
@@ -1099,17 +994,16 @@ Object builtin_key_def(a)
 
   ignore_ctrl_c();
-  ie_key_def(i_buffer_courant, nom_mode, touches, nom_fonc);
+  ie_key_def(nom_mode, touches, nom_fonc);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
 
-Object builtin_last_key(a)			/* retourne le dernier */
-     Instruction ** a;				/* caractere tape */
+static Object builtin_last_key(a)		/* retourne le dernier */
+     Instruction **a __attribute__((unused));			/* caractere tape */
 {
-  extern FCT(int, ie_last_key,(char *));
   Object result;
-  
+
   ignore_ctrl_c();
   result = ie_last_key(i_buffer_courant);
@@ -1119,9 +1013,8 @@ Object builtin_last_key(a)			/* retourne
 }
 
-Object builtin_set_font(a)
+static Object builtin_set_font(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_set_font,(char *, char *));
-  char * nom_font = (char *) Eval(*a);
+  const char * nom_font = (char *) Eval(*a);
 
 #ifdef RUNTIMECHECK
@@ -1132,15 +1025,14 @@ Object builtin_set_font(a)
   ie_set_font(i_buffer_courant, nom_font);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_read_file(a)
+static Object builtin_read_file(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_read_file,(char *, char *));
-  char * filename = (char *) Eval(*a);
+  const char * filename = (char *) Eval(*a);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(filename);
@@ -1153,9 +1045,8 @@ Object builtin_read_file(a)
 }
 
-Object builtin_save_file(a)
-    Instruction ** a;
+static Object builtin_save_file(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ie_save_file,(char *));
-  
+
   ignore_ctrl_c();
   ie_save_file(i_buffer_courant);
@@ -1165,10 +1056,9 @@ Object builtin_save_file(a)
 }
 
-Object builtin_write_file(a)
+static Object builtin_write_file(a)
     Instruction ** a;
 {
-  extern FCT(void, ie_write_file,(char *, char *));
-  char * filename = (char *) Eval(*a);
-  
+  const char *filename = (const char *)Eval(*a);
+
 #ifdef RUNTIMECHECK
   check_strlen(filename);
@@ -1181,10 +1071,9 @@ Object builtin_write_file(a)
 }
 
-Object builtin_current_buffer_is_modified(a)
-    Instruction ** a;
+static Object builtin_current_buffer_is_modified(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_current_buffer_is_modified,(char *));
   int result;
-  
+
   ignore_ctrl_c();
   result = ie_current_buffer_is_modified(i_buffer_courant);
@@ -1194,11 +1083,10 @@ Object builtin_current_buffer_is_modifie
 }
 
-Object builtin_insert_file(a)
+static Object builtin_insert_file(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_insert_file,(char *, char *));
-  char * filename = (char *) Eval(*a);
+  const char *filename = (const char *)Eval(*a);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(filename);
@@ -1211,28 +1099,25 @@ Object builtin_insert_file(a)
 }
 
-Object builtin_filename(a)
-    Instruction ** a;
+static Object builtin_filename(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(char *, ie_filename,(char *));
-  
+
   ignore_ctrl_c();
   return strdup_end(ie_filename(i_buffer_courant));
 }
 
-Object builtin_current_mode(a)
-    Instruction ** a;
+static Object builtin_current_mode(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(char *, ie_current_mode,(char *));
-  
+
   ignore_ctrl_c();
   return strdup_end(ie_current_mode(i_buffer_courant));
 }
 
-Object builtin_window_height(a)
-    Instruction ** a;
+static Object builtin_window_height(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_window_height,(char *));
   int result;
-  
+
   ignore_ctrl_c();
   result = ie_window_height(i_buffer_courant);
@@ -1242,11 +1127,10 @@ Object builtin_window_height(a)
 }
 
-Object builtin_window_width(a)
+static Object builtin_window_width(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_window_width,(char *, char));
   char c = Eval(*a);
   int result;
-  
+
   ignore_ctrl_c();
   result = ie_window_width(i_buffer_courant, c);
@@ -1256,19 +1140,17 @@ Object builtin_window_width(a)
 }
 
-Object builtin_file_select(a)
-    Instruction ** a;
+static Object builtin_file_select(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(char *, ie_file_select,(char *));
-  
+
   ignore_ctrl_c();
   return strdup_end(ie_file_select(i_buffer_courant));
 }
 
-Object builtin_current_window(a)
-    Instruction ** a;
+static Object builtin_current_window(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_current_window,(char *));
   int result;
-  
+
   ignore_ctrl_c();
   result = ie_current_window(i_buffer_courant);
@@ -1278,14 +1160,13 @@ Object builtin_current_window(a)
 }
 
-Object builtin_select_window(a)
+static Object builtin_select_window(a)
     Instruction ** a;
 {
-  extern FCT(char *, ie_select_window,(char *, int));
   int win = Eval(*a);
-  char * selectedwindow;
+  Text * selectedwindow;
   int result;
-  
+
   ignore_ctrl_c();
-  selectedwindow = ie_select_window(i_buffer_courant, win);
+  selectedwindow = ie_select_window(win);
   if (selectedwindow) {
     i_buffer_courant = selectedwindow;
@@ -1299,10 +1180,9 @@ Object builtin_select_window(a)
 }
 
-Object builtin_new_window(a)
-    Instruction ** a;
+static Object builtin_new_window(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_new_window,(char *));
   int result;
-  
+
   ignore_ctrl_c();
   result = ie_new_window(i_buffer_courant);
@@ -1312,10 +1192,9 @@ Object builtin_new_window(a)
 }
 
-Object builtin_kill_window(a)
+static Object builtin_kill_window(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_kill_window,(char *, int));
   int win = Eval(*a);
-  
+
   ignore_ctrl_c();
   ie_kill_window(i_buffer_courant, win);
@@ -1325,9 +1204,8 @@ Object builtin_kill_window(a)
 }
 
-Object builtin_kill_current_buffer(a)
-    Instruction ** a;
+static Object builtin_kill_current_buffer(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_kill_current_buffer,(char *));
-  
+
   ignore_ctrl_c();
   ie_kill_current_buffer(i_buffer_courant);
@@ -1337,9 +1215,8 @@ Object builtin_kill_current_buffer(a)
 }
 
-Object builtin_lower_window(a)
-    Instruction ** a;
+static Object builtin_lower_window(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_lower_window,(char *));
-  
+
   ignore_ctrl_c();
   ie_lower_window(i_buffer_courant);
@@ -1349,9 +1226,8 @@ Object builtin_lower_window(a)
 }
 
-Object builtin_raise_window(a)
-    Instruction ** a;
+static Object builtin_raise_window(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_raise_window,(char *));
-  
+
   ignore_ctrl_c();
   ie_raise_window(i_buffer_courant);
@@ -1364,12 +1240,11 @@ static Object builtin_wprintf(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_insert_char,(char *, int));
   int result = 0;
-  char * fmt = (char *) Eval(*a);
+  char *fmt = (char *)Eval(*a);
 
 #ifdef RUNTIMECHECK
   check_strlen(fmt);
 #endif
-  
+
   a += 1;
 
@@ -1379,13 +1254,13 @@ static Object builtin_wprintf(a)
       case 0 :
 	return result;
-	
+
       case '%' :
 	ie_insert_char(i_buffer_courant, '%');
 	fmt += 1;
 	break;
-	
+
       default :
 	{
-	  char * begin = fmt - 1;
+	  const char * begin = fmt - 1;
 	  char save;
 
@@ -1419,5 +1294,5 @@ static Object builtin_wprintf(a)
 	    char str[128];
 	    char * s = str;
-	    
+
 	    sprintf(s, begin, Eval(*a));
 	    while (*s) ie_insert_char(i_buffer_courant, *s++);
@@ -1431,14 +1306,13 @@ static Object builtin_wprintf(a)
       ie_insert_char(i_buffer_courant, *fmt++);
   }
-  
+
   return result;
 }
 
-Object builtin_display_message(a)
+static Object builtin_display_message(a)
     Instruction ** a;
 {
-  extern FCT(void, DisplayWMessage ,(char *, char *, int));
-  
-  char * msg = (char *) Eval(a[0]);
+
+  const char *msg = (const char *)Eval(a[0]);
   char * from = "";
   int flag = 0;
@@ -1447,5 +1321,5 @@ Object builtin_display_message(a)
     check_strlen(msg);
 #endif
-  
+
   if (! IsaNotEnoughArg(a[1])) {
     from = (char *) Eval(a[1]);
@@ -1457,5 +1331,5 @@ Object builtin_display_message(a)
       flag = (int) Eval(a[2]);
   }
-  
+
   DisplayWMessage(msg, from, flag);
   return 0;
@@ -1465,35 +1339,28 @@ Object builtin_display_message(a)
 
 static char ** item_list;
-static item_list_size;
+static int item_list_size;
 static int n_item;
 
-Object builtin_select_from_list(a)
-    Instruction ** a;
+static Object builtin_select_from_list(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ClearListBox ,());
-  extern FCT(char *, FillList ,(char *));
-  extern FCT(char *, SelectFromListBox ,(char *));
-  char * str = (char *) Eval(*a);
+  const char *str;
 
-#ifdef RUNTIMECHECK
-  check_strlen(str);
-#endif
-  
   if (! n_item) return 0;
-  
+
   ClearListBox();
   {
     int i;
-    
+
     for (i = 0; i != n_item; i += 1)
       FillList(item_list[i]);
   }
-  
-  if (! (str = SelectFromListBox(str)))
+
+  if (! (str = SelectFromListBox()))
     return 0;
-  
+
   {
     char ** p = item_list;
-    
+
     while (
 #ifdef RUNTIMECHECK
@@ -1506,27 +1373,26 @@ Object builtin_select_from_list(a)
 }
 
-Object builtin_add_list_item(a)
+static Object builtin_add_list_item(a)
     Instruction ** a;
 {
-  extern FCT(char *, FillList ,(char *));
-  char * item = (char *) Eval(*a);
+  char *item = (char *)Eval(*a);
 
 #ifdef RUNTIMECHECK
   check_strlen(item);
 #endif
-  
+
   FillList(item);
   if (n_item == item_list_size) {
     if (! item_list_size) {
-      if (! (item_list = (char **) calloc(10, sizeof(char *))))
+      if (! (item_list = calloc(10, sizeof(char *))))
 	Error("No more place", 0);
       item_list_size = 10;
     }
     else {
-      char ** nl = (char **) calloc(2 * item_list_size, sizeof(char *));
-    
+      char ** nl = calloc(2 * item_list_size, sizeof(char *));
+
       if (! nl)
 	Error("No more place", 0);
-      memcpy((char *) nl, (char *) item_list, item_list_size * sizeof(char *));
+      memcpy(nl, item_list, item_list_size * sizeof(char *));
       free(item_list);
       item_list = nl;
@@ -1534,15 +1400,14 @@ Object builtin_add_list_item(a)
     }
   }
-  
+
   item_list[n_item++] = item;
-  
+
   return 0;
 }
 
-Object builtin_clear_list(a)
-    Instruction ** a;
+static Object builtin_clear_list(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ClearListBox ,());
-  
+
   ClearListBox();
   if (item_list) {
@@ -1556,42 +1421,40 @@ Object builtin_clear_list(a)
 /* */
 
-Object builtin_getchar(a)
+static Object builtin_getchar(a)
     Instruction ** a;
 {
-  char * prompt;
-    
-  extern FCT(char *, GetStringFromDB, (char * prompt, int one));
-  char * str;
-    
+  const char * prompt;
+
+  const char * str;
+
   if (IsaNotEnoughArg(*a))
     prompt = "getchar ? ";
   else {
     prompt = (char *) Eval(*a);
-    
+
 #ifdef RUNTIMECHECK
     check_strlen(prompt);
 #endif
   }
-  
+
   str = GetStringFromDB(prompt, 1);
   return (str) ? (Object) *str : (Object) 0;
 }
 
-Object builtin_gets(a)
+static Object builtin_gets(a)
     Instruction ** a;
 {
   char * prompt;
-  extern FCT(char *, GetStringFromDB, (char * prompt, int one));
-    
+
   if (IsaNotEnoughArg(*a))
     prompt = "gets ? ";
   else {
     prompt = (char *) Eval(*a);
-    
+
 #ifdef RUNTIMECHECK
     check_strlen(prompt);
 #endif
   }
-  
+
   return strdup_end(GetStringFromDB(prompt, 0));
 }
@@ -1601,31 +1464,28 @@ Object builtin_gets(a)
 /* coloriage */
 
-Object builtin_monochrome(a)
-     Instruction ** a;
+static Object builtin_monochrome(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_monochrome,(char *));
 
-  return ie_monochrome(i_buffer_courant);
+  return ie_monochrome();
 }
 
-Object builtin_remove_colors(a)
-     Instruction ** a;
+static Object builtin_remove_colors(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ie_remove_colors,(char *));
 
   ignore_ctrl_c();
   ie_remove_colors(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_color_area(a)
+static Object builtin_color_area(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_color_area,(char *, int, int, char *));
   int start = (int) Eval(a[0]);
   int end = (int) Eval(a[1]);
-  char * color = (char *) Eval(a[2]);
+  const char *color = (const char *)Eval(a[2]);
 
 #ifdef RUNTIMECHECK
@@ -1636,12 +1496,11 @@ Object builtin_color_area(a)
   ie_color_area(i_buffer_courant, start, end, color);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_uncolor_area(a)
+static Object builtin_uncolor_area(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_uncolor_area,(char *, int, int));
   int start = (int) Eval(a[0]);
   int end = (int) Eval(a[1]);
@@ -1650,12 +1509,11 @@ Object builtin_uncolor_area(a)
   ie_uncolor_area(i_buffer_courant, start, end);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_current_buffer_is_colored(a)
-     Instruction ** a;
+static Object builtin_current_buffer_is_colored(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_current_buffer_is_colored,(char *));
   Object result;
 
@@ -1663,5 +1521,5 @@ Object builtin_current_buffer_is_colored
   result = ie_current_buffer_is_colored(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
@@ -1670,8 +1528,7 @@ Object builtin_current_buffer_is_colored
 /* region */
 
-Object builtin_mark_position(a)
-     Instruction ** a;
+static Object builtin_mark_position(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_mark_position,(char *));
   Object result;
 
@@ -1679,78 +1536,72 @@ Object builtin_mark_position(a)
   result = ie_mark_position(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_set_mark(a)
+static Object builtin_set_mark(a)
      Instruction ** a;
 {
-  extern FCT(void, ie_set_mark,(char *, int));
   int pos = (int) Eval(*a);
-  
+
   ignore_ctrl_c();
   ie_set_mark(i_buffer_courant, pos);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_goto_mark(a)
-     Instruction ** a;
+static Object builtin_goto_mark(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ie_goto_mark,(char *));
 
   ignore_ctrl_c();
   ie_goto_mark(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_reset_mark(a)
-     Instruction ** a;
+static Object builtin_reset_mark(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ie_reset_mark,(char *));
 
   ignore_ctrl_c();
   ie_reset_mark(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_cut_region(a)
-     Instruction ** a;
+static Object builtin_cut_region(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ie_cut_region,(char *));
 
   ignore_ctrl_c();
   ie_cut_region(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_copy_region(a)
-     Instruction ** a;
+static Object builtin_copy_region(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ie_copy_region,(char *));
 
   ignore_ctrl_c();
   ie_copy_region(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_paste_region(a)
-     Instruction ** a;
+static Object builtin_paste_region(a)
+     Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ie_paste_region,(char *));
 
   ignore_ctrl_c();
   ie_paste_region(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return 0;
 }
@@ -1759,9 +1610,8 @@ Object builtin_paste_region(a)
 /* expression regulieres */
 
-Object builtin_re_search_forward(a)
+static Object builtin_re_search_forward(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_re_search_forward,(char*, char *regex ));
-  char * regex = (char *) Eval(*a);
+  const char *regex = (const char *)Eval(*a);
   int result;
 
@@ -1772,13 +1622,12 @@ Object builtin_re_search_forward(a)
   result = ie_re_search_forward(i_buffer_courant, regex);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_re_search_backward(a)
+static Object builtin_re_search_backward(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_re_search_backward,(char*, char * ));
-  char * regex = (char *) Eval(*a);
+  const char *regex = (const char *)Eval(*a);
   int result;
 
@@ -1789,27 +1638,25 @@ Object builtin_re_search_backward(a)
   result = ie_re_search_backward(i_buffer_courant, regex);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_re_replace(a)
+static Object builtin_re_replace(a)
     Instruction ** a;
 {
-  char * newstring = (char *) Eval(a[0]);
+  const char *newstring = (const char *)Eval(a[0]);
   int result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(newstring);
 #endif
   if (IsaNotEnoughArg(a[1])) {
-    extern FCT(int, ie_re_replace_match, (char *, char *));
-    
+
     ignore_ctrl_c();
     result = ie_re_replace_match(i_buffer_courant, newstring);
   }
   else {
-    extern FCT(int, ie_re_replace, (char *, char *, char*));
-    char * regex = (char *) Eval(a[1]);
-    
+    const char *regex = (const char *)Eval(a[1]);
+
 #ifdef RUNTIMECHECK
     check_strlen(regex);
@@ -1819,33 +1666,31 @@ Object builtin_re_replace(a)
   }
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_re_match_beginning(a)
+static Object builtin_re_match_beginning(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_re_match_beginning,(char *, int));
   int n = (int) Eval(*a);
   int result;
-  
+
   ignore_ctrl_c();
-  result = ie_re_match_beginning(i_buffer_courant, n);
+  result = ie_re_match_beginning(n);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_re_match_end(a)
+static Object builtin_re_match_end(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_re_match_end,(char *, int));
   int n = (int) Eval(*a);
   int result;
-  
+
   ignore_ctrl_c();
-  result = ie_re_match_end(i_buffer_courant, n);
+  result = ie_re_match_end(n);
   accept_ctrl_c();
-  
+
   return result;
 }
@@ -1853,39 +1698,36 @@ Object builtin_re_match_end(a)
 /* la montre*/
 
-Object builtin_watch_on(a)
-    Instruction ** a;
+static Object builtin_watch_on(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_watch_on,(char *));
-  
+
   ignore_ctrl_c();
   ie_watch_on(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_watch_off(a)
-    Instruction ** a;
+static Object builtin_watch_off(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(int, ie_watch_off,(char *));
-  
+
   ignore_ctrl_c();
   ie_watch_off(i_buffer_courant);
   accept_ctrl_c();
-  
+
   return 0;
 }
 
 /* La fonction usleep */
-Object builtin_usleep(a)
+static Object builtin_usleep(a)
     Instruction ** a;
 {
-  extern FCT(int, ie_usleep,(char *, int));
   int t = (int) Eval(*a);
-  
+
   ignore_ctrl_c();
-  ie_usleep(i_buffer_courant, t);
+  ie_usleep(t);
   accept_ctrl_c();
-  
+
   return 0;
 }
@@ -1896,13 +1738,14 @@ Object builtin_usleep(a)
 #include "../proc_dict.h"
 #include "../global_dict.h"
+#include "../browser_init.h"
+#include "../browser_eve.h"
 
 /* le browser */
 
-Object builtin_browser_set_pp(a)
+static Object builtin_browser_set_pp(a)
     Instruction ** a;
 {
-  extern FCT(void, browser_set_pp,(char *, char *));
-  char * mode = (char *) Eval(a[0]);
-  char * path = (char *) Eval(a[1]);
+  const char *mode = (const char *)Eval(a[0]);
+  const char *path = (const char *)Eval(a[1]);
 #ifdef RUNTIMECHECK
   check_strlen(mode);
@@ -1914,10 +1757,9 @@ Object builtin_browser_set_pp(a)
 }
 
-Object builtin_browser_set_pp_options(a)
+static Object builtin_browser_set_pp_options(a)
     Instruction ** a;
 {
-  extern FCT(void, browser_set_pp_options,(char *, char *));
-  char * mode = (char *) Eval(a[0]);
-  char * opt = (char *) Eval(a[1]);
+  const char *mode = (const char *)Eval(a[0]);
+  const char *opt = (const char *)Eval(a[1]);
 #ifdef RUNTIMECHECK
   check_strlen(mode);
@@ -1929,9 +1771,8 @@ Object builtin_browser_set_pp_options(a)
 }
 
-Object builtin_browser_add(a)
+static Object builtin_browser_add(a)
     Instruction ** a;
 {
-  extern FCT(void, browser_add,(char *, int));
-  char * file = (char *) Eval(a[0]);
+  const char *file = (const char *)Eval(a[0]);
 #ifdef RUNTIMECHECK
   check_strlen(file);
@@ -1943,8 +1784,7 @@ Object builtin_browser_add(a)
 }
 
-Object builtin_browser_del(a)
+static Object builtin_browser_del(a)
     Instruction ** a;
 {
-  extern FCT(void, RemoveFiles,(char *));
   char * file = (char *) ((IsaNotEnoughArg(a[1])) ? 0 : (char *) Eval(a[0]));
 #ifdef RUNTIMECHECK
@@ -1959,22 +1799,18 @@ Object builtin_browser_del(a)
 }
 
-Object builtin_browser_class_file(a)
+static Object builtin_browser_class_file(a)
     Instruction ** a;
 {
-  extern FCT(char *, browser_class_file,(char *, int *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   int * p = (int *) ((IsaNotEnoughArg(a[1])) ? 0 : (int *) Eval(a[1]));
-  char * file;
+  const char * file;
   int line;
-  extern FCT(char *, browser_class_file,(char *, int *));
 #ifdef RUNTIMECHECK
-  extern FCT(Object, check_int_indirection_assignment,(int *, Object));
-  
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   file = browser_class_file(name, &line);
- 
+
   if (file) {
     if (p) {
@@ -1987,17 +1823,16 @@ Object builtin_browser_class_file(a)
     return strdup_end(file);
   }
-  
+
   accept_ctrl_c();
   return 0;
 }
 
-Object builtin_browser_class_parents(a)
+static Object builtin_browser_class_parents(a)
     Instruction ** a;
 {
-  FCT(extern ParentRec **, get_parents_list,(char *, int));
-  char * class_name = (char *) Eval(a[0]);
+  const char *class_name = (const char *)Eval(a[0]);
   ParentRec ** list;
-  char ** result = 0;
-  
+  char ** result = NULL;
+
 #ifdef RUNTIMECHECK
   check_strlen(class_name);
@@ -2005,19 +1840,19 @@ Object builtin_browser_class_parents(a)
 
   ignore_ctrl_c();
-  if ((list = get_parents_list(class_name, 1)) != 0) {
+  if ((list = get_parents_recs(class_name)) != 0) {
     unsigned nentry;
     unsigned names_size = 0;
-    
+
     for (nentry = 0; list[nentry]; nentry += 1)
       names_size += strlen(list[nentry]->_name) + 1;
-  
-    result = (char **) RTCMalloc(sizeof(char*) * (nentry * 2 + 1) + names_size);
-    
+
+    result = RTCMalloc(sizeof(char*) * (nentry * 2 + 1) + names_size);
+
     if (result) {
       char * p = (char *) &result[2 * nentry + 1];
       ParentRec ** l = list;
-      
+
       for (nentry = 0; *l; nentry += 2, l += 1) {
-	static scope_to_bits[] = {
+	static int scope_to_bits[] = {
 	  0,	/* UNKNOWN_SCOPE */
 	  4,	/* PUBLIC_SCOPE */
@@ -2033,5 +1868,5 @@ Object builtin_browser_class_parents(a)
     }
   }
-  
+
   free(list);
   accept_ctrl_c();
@@ -2039,29 +1874,28 @@ Object builtin_browser_class_parents(a)
 }
 
-Object builtin_browser_class_children(a)
+static Object builtin_browser_class_children(a)
     Instruction ** a;
 {
-  extern FCT(char **, get_sons_list,(char *));
-  char * class_name = (char *) Eval(a[0]);
+  const char *class_name = (const char *)Eval(a[0]);
   char ** list;
   char ** result = 0;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(class_name);
 #endif
-  
+
   ignore_ctrl_c();
   if ((list = get_sons_list(class_name)) != 0) {
     unsigned nentry;
     unsigned names_size = 0;
-    
+
     for (nentry = 0; list[nentry]; nentry += 1)
       names_size += strlen(list[nentry]) + 1;
-  
+
     result = (char **) RTCMalloc(sizeof(char*) * (nentry + 1) + names_size);
-    
+
     if (result) {
       char * p = (char *) &result[nentry + 1];
-      
+
       for (nentry = 0; list[nentry]; nentry += 1) {
 	result[nentry] = p;
@@ -2072,5 +1906,5 @@ Object builtin_browser_class_children(a)
     }
   }
-  
+
   free(list);
   accept_ctrl_c();
@@ -2078,20 +1912,19 @@ Object builtin_browser_class_children(a)
 }
 
-Object builtin_browser_class_methods(a)
+static Object builtin_browser_class_methods(a)
     Instruction ** a;
 {
-  FCT(extern StringTable*, get_methods_list,(char *, int));
   extern MethodRec* marked_list;
   extern int marked_count;
-  char * result = (char *) Eval(a[0]);
-  
+  const char *result = (const char *)Eval(a[0]);
+
 #ifdef RUNTIMECHECK
   check_strlen(result);
 #endif
-  
+
   ignore_ctrl_c();
   {
-    StringTable* x = get_methods_list(result, 0);
-    
+    StringTable x = get_methods_list(result, 0);
+
     if (x) {
       char * declfile = marked_list->_decl_file->_name;
@@ -2102,5 +1935,5 @@ Object builtin_browser_class_methods(a)
 
       free(x);
-      
+
       lastfile = declfile;
       i = marked_count;
@@ -2108,5 +1941,5 @@ Object builtin_browser_class_methods(a)
       while (i--) {
 	char * ifile;
-	
+
 	strsize += strlen(list->_name) + METHOD_PLENGTH + 1;
 	if (list->_impl_file &&
@@ -2118,5 +1951,5 @@ Object builtin_browser_class_methods(a)
 	list = list->_next_marked;
       }
-      if ((result = RTCMalloc((marked_count * 5 + 2) * sizeof(char *) + 
+      if ((result = RTCMalloc((marked_count * 5 + 2) * sizeof(char *) +
 			      strsize))
 	  != 0) {
@@ -2125,5 +1958,5 @@ Object builtin_browser_class_methods(a)
 	char * p;
 	unsigned index = 1;
-	
+
 	lastfile = declfile;
 	i = marked_count;
@@ -2134,5 +1967,5 @@ Object builtin_browser_class_methods(a)
 	while (i--) {
 	  char * ifile;
-	
+
 	  ((char **) result)[index] = p;
 	  strcpy(p, list->_name - METHOD_PLENGTH);
@@ -2159,5 +1992,5 @@ Object builtin_browser_class_methods(a)
 	  {
 	    MethodRec* next = list->_next_marked;
-	    
+
 	    list->_next_marked = 0;
 	    list = next;
@@ -2170,25 +2003,24 @@ Object builtin_browser_class_methods(a)
       result = 0;
   }
-  
+
   accept_ctrl_c();
   return (Object) result;
 }
 
-Object builtin_browser_class_attributes(a)
+static Object builtin_browser_class_attributes(a)
     Instruction ** a;
 {
-  FCT(extern StringTable*, get_attributes_list,(char *, int));
   extern AttributeRec* marked_attr_list;
   extern int marked_attr_count;
-  char * result = (char *) Eval(a[0]);
-  
+  const char *result = (const char *)Eval(a[0]);
+
 #ifdef RUNTIMECHECK
   check_strlen(result);
 #endif
-  
+
   ignore_ctrl_c();
   {
-    StringTable* x = get_attributes_list(result, 0);
-    
+    StringTable x = get_attributes_list(result, 0);
+
     if (x) {
       char * declfile = marked_attr_list->_decl_file->_name;
@@ -2198,5 +2030,5 @@ Object builtin_browser_class_attributes(
 
       free(x);
-      
+
       i = marked_attr_count;
       list = marked_attr_list;
@@ -2205,11 +2037,11 @@ Object builtin_browser_class_attributes(
 	list = list->_next_marked;
       }
-      
-      if ((result = RTCMalloc((marked_attr_count * 3 + 2) * sizeof(char *) + 
+
+      if ((result = RTCMalloc((marked_attr_count * 3 + 2) * sizeof(char *) +
 			      strsize))
 	  != 0) {
 	char * p = (char *) &((char **) result)[marked_attr_count * 3 + 2];
 	unsigned index = 1;
-	
+
 	i = marked_attr_count;
 	list = marked_attr_list;
@@ -2226,5 +2058,5 @@ Object builtin_browser_class_attributes(
 	  {
 	    AttributeRec* next = list->_next_marked;
-	    
+
 	    list->_next_marked = 0;
 	    list = next;
@@ -2237,15 +2069,14 @@ Object builtin_browser_class_attributes(
       result = 0;
   }
-  
+
   accept_ctrl_c();
   return (Object) result;
 }
 
-Object builtin_browser_class_flags(a)
+static Object builtin_browser_class_flags(a)
     Instruction ** a;
 {
-  extern FCT(char *, browser_class_flags,(char *));
-  char * class_name = (char *) Eval(a[0]);
-  
+  const char *class_name = (const char *)Eval(a[0]);
+
 #ifdef RUNTIMECHECK
   check_strlen(class_name);
@@ -2256,12 +2087,11 @@ Object builtin_browser_class_flags(a)
 }
 
-Object builtin_browser_functions(a)
+static Object builtin_browser_functions(a)
     Instruction ** a;
 {
-  extern FCT(ProcRec **, get_procs_list,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   ProcRec ** list;
   char ** result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2269,14 +2099,14 @@ Object builtin_browser_functions(a)
 
   ignore_ctrl_c();
-  if ((list = get_procs_list(prefix)) != 0) {
+  if ((list = get_procs_recs(prefix)) != 0) {
     ProcRec ** l;
     unsigned n;
     unsigned strsize = 0;
-    
+
     for (n = 0, l = list; *l; l += 1, n += 1) {
       strsize += strlen((*l)->_name) + PROC_PLENGTH + 1;
       if ((*l)->_impl_file) {
 	ProcRec ** sl;
-	
+
 	for (sl = list; sl != l; sl += 1)
 	  if ((*sl)->_impl_file &&
@@ -2290,5 +2120,5 @@ Object builtin_browser_functions(a)
 	!= 0) {
       char * p = (char *) &result[n * 3 + 1];
-      
+
       for (n = 0, l = list; *l; l += 1, n += 3) {
 	result[n] = p;
@@ -2297,5 +2127,5 @@ Object builtin_browser_functions(a)
 	if ((*l)->_impl_file) {
 	  unsigned i;
-	
+
 	  for (i = 0; i != n; i += 3)
 	    if (result[i + 1] &&
@@ -2319,17 +2149,16 @@ Object builtin_browser_functions(a)
   else
     result = 0;
-  
+
   accept_ctrl_c();
   return (Object) result;
 }
 
-Object builtin_browser_globals(a)
+static Object builtin_browser_globals(a)
     Instruction ** a;
 {
-  extern FCT(GlobalRec **, get_globals_list,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   GlobalRec ** list;
   char ** result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2337,14 +2166,14 @@ Object builtin_browser_globals(a)
 
   ignore_ctrl_c();
-  if ((list = get_globals_list(prefix)) != 0) {
+  if ((list = get_globals_recs(prefix)) != 0) {
     GlobalRec ** l;
     unsigned n;
     unsigned strsize = 0;
-    
+
     for (n = 0, l = list; *l; l += 1, n += 1) {
       strsize += strlen((*l)->_name) + GLOBAL_PLENGTH + 1;
       if ((*l)->_impl_file) {
 	GlobalRec ** sl;
-	
+
 	for (sl = list; sl != l; sl += 1)
 	  if ((*sl)->_impl_file &&
@@ -2358,5 +2187,5 @@ Object builtin_browser_globals(a)
 	!= 0) {
       char * p = (char *) &result[n * 3 + 1];
-      
+
       for (n = 0, l = list; *l; l += 1, n += 3) {
 	result[n] = p;
@@ -2365,5 +2194,5 @@ Object builtin_browser_globals(a)
 	if ((*l)->_impl_file) {
 	  unsigned i;
-	
+
 	  for (i = 0; i != n; i += 3)
 	    if (result[i + 1] &&
@@ -2387,16 +2216,15 @@ Object builtin_browser_globals(a)
   else
     result = 0;
-  
+
   accept_ctrl_c();
   return (Object) result;
 }
 
-Object builtin_browser_select_class(a)
+static Object builtin_browser_select_class(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_select_class,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2409,11 +2237,10 @@ Object builtin_browser_select_class(a)
 }
 
-Object builtin_browser_select_method(a)
+static Object builtin_browser_select_method(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_select_method,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2426,11 +2253,10 @@ Object builtin_browser_select_method(a)
 }
 
-Object builtin_browser_select_attribute(a)
+static Object builtin_browser_select_attribute(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_select_attribute,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2443,11 +2269,10 @@ Object builtin_browser_select_attribute(
 }
 
-Object builtin_browser_select_function(a)
+static Object builtin_browser_select_function(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_select_proc,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2460,11 +2285,10 @@ Object builtin_browser_select_function(a
 }
 
-Object builtin_browser_select_global(a)
+static Object builtin_browser_select_global(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_select_global,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2477,10 +2301,8 @@ Object builtin_browser_select_global(a)
 }
 
-Object builtin_browser_edit(a)
-    Instruction ** a;
+static Object builtin_browser_edit(a)
+    Instruction ** a __attribute__((unused));
 {
-  extern FCT(void, ButtonEdit,());
-  extern FCT(void, DisplayBrowserIfNeverMap,());
-  
+
   ignore_ctrl_c();
   DisplayBrowserIfNeverMap();
@@ -2490,11 +2312,10 @@ Object builtin_browser_edit(a)
 }
 
-Object builtin_browser_class_entry(a)
+static Object builtin_browser_class_entry(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_class_entry,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2507,11 +2328,10 @@ Object builtin_browser_class_entry(a)
 }
 
-Object builtin_browser_function_entry(a)
+static Object builtin_browser_function_entry(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_function_entry,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2524,11 +2344,10 @@ Object builtin_browser_function_entry(a)
 }
 
-Object builtin_browser_global_entry(a)
+static Object builtin_browser_global_entry(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_global_entry,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2541,11 +2360,10 @@ Object builtin_browser_global_entry(a)
 }
 
-Object builtin_browser_file_entry(a)
+static Object builtin_browser_file_entry(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_file_entry,(char *));
-  char * prefix = (char *) Eval(a[0]);
+  const char *prefix = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(prefix);
@@ -2558,51 +2376,46 @@ Object builtin_browser_file_entry(a)
 }
 
-Object builtin_browser_class(a)
+static Object builtin_browser_class(a)
     Instruction ** a;
 {
-  extern FCT(char *, browser_class,(int));
   int n = (int) Eval(a[0]);
-  
+
   ignore_ctrl_c();
   return strdup_end(browser_class(n));
 }
 
-Object builtin_browser_function(a)
+static Object builtin_browser_function(a)
     Instruction ** a;
 {
-  extern FCT(char *, browser_function,(int));
   int n = (int) Eval(a[0]);
-  
+
   ignore_ctrl_c();
   return strdup_end(browser_function(n));
 }
 
-Object builtin_browser_global(a)
+static Object builtin_browser_global(a)
     Instruction ** a;
 {
-  extern FCT(char *, browser_global,(int));
   int n = (int) Eval(a[0]);
-  
+
   ignore_ctrl_c();
   return strdup_end(browser_global(n));
 }
 
-Object builtin_browser_file(a)
+static Object builtin_browser_file(a)
     Instruction ** a;
 {
-  extern FCT(char *, browser_file,(int));
   int n = (int) Eval(a[0]);
-  
+
   ignore_ctrl_c();
   return strdup_end(browser_file(n));
 }
 
-Object builtin_browser_dump(a)
+static Object builtin_browser_dump(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_dump,(char *));
-  char * fn = (char *) Eval(a[0]);
+  const char *fn = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(fn);
@@ -2612,15 +2425,14 @@ Object builtin_browser_dump(a)
   result = (Object) browser_dump(fn);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_browser_restore(a)
+static Object builtin_browser_restore(a)
     Instruction ** a;
 {
-  extern FCT(int, browser_restore,(char *));
-  char * fn = (char *) Eval(a[0]);
+  const char *fn = (const char *)Eval(a[0]);
   Object result;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(fn);
@@ -2630,19 +2442,17 @@ Object builtin_browser_restore(a)
   result = (Object) browser_restore(fn);
   accept_ctrl_c();
-  
+
   return result;
 }
 
-Object builtin_browser_show_all(a)
-    Instruction ** a;
+static Object builtin_browser_show_all(a)
+    Instruction **a __attribute__((unused));
 {
-  extern FCT(void, browser_show_all,());
-  extern FCT(void, RefreshBrowserInfos,());
-  
+
   ignore_ctrl_c();
   browser_show_all();
   RefreshBrowserInfos();
   accept_ctrl_c();
-  
+
   return 0;
 }
@@ -2651,6 +2461,5 @@ static Object builtin_browser_hide_x(x)
     unsigned x;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  
+
   ignore_ctrl_c();
   if (! (Hide_Bits & x)) {
@@ -2659,5 +2468,5 @@ static Object builtin_browser_hide_x(x)
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
@@ -2666,6 +2475,5 @@ static Object builtin_browser_show_x(x)
     unsigned x;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  
+
   ignore_ctrl_c();
   if (Hide_Bits & x) {
@@ -2674,19 +2482,18 @@ static Object builtin_browser_show_x(x)
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_hide_private_members(a)
-    Instruction ** a;
+static Object builtin_browser_hide_private_members(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_hide_x(HidePrivate);
 }
 
-Object builtin_browser_hide_protected_and_private_members(a)
-    Instruction ** a;
+static Object builtin_browser_hide_protected_and_private_members(a)
+    Instruction **a __attribute__((unused));
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  
+
   ignore_ctrl_c();
   if ((Hide_Bits & (HidePrivate | HideProtected)) !=
@@ -2696,74 +2503,72 @@ Object builtin_browser_hide_protected_an
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_show_protected_and_private_members(a)
-    Instruction ** a;
+static Object builtin_browser_show_protected_and_private_members(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_show_x(HidePrivate | HideProtected);
 }
 
-Object builtin_browser_hide_inherited_members(a)
-    Instruction ** a;
+static Object builtin_browser_hide_inherited_members(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_hide_x(HideInherited);
 }
 
-Object builtin_browser_show_inherited_members(a)
-    Instruction ** a;
+static Object builtin_browser_show_inherited_members(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_show_x(HideInherited);
 }
 
-Object builtin_browser_hide_internal_types(a)
-    Instruction ** a;
+static Object builtin_browser_hide_internal_types(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_hide_x(HideInternalTypes);
 }
 
-Object builtin_browser_show_internal_types(a)
-    Instruction ** a;
+static Object builtin_browser_show_internal_types(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_show_x(HideInternalTypes);
 }
 
-Object builtin_browser_hide_static_functions(a)
-    Instruction ** a;
+static Object builtin_browser_hide_static_functions(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_hide_x(HideStaticFunctions);
 }
 
-Object builtin_browser_show_static_functions(a)
-    Instruction ** a;
+static Object builtin_browser_show_static_functions(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_show_x(HideStaticFunctions);
 }
 
-Object builtin_browser_hide_static_globals(a)
-    Instruction ** a;
+static Object builtin_browser_hide_static_globals(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_hide_x(HideStaticGlobals);
 }
 
-Object builtin_browser_show_static_globals(a)
-    Instruction ** a;
+static Object builtin_browser_show_static_globals(a)
+    Instruction **a __attribute__((unused));
 {
   return builtin_browser_show_x(HideStaticGlobals);
 }
 
-Object builtin_browser_hide_children_of(a)
+static Object builtin_browser_hide_children_of(a)
     Instruction ** a;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  extern FCT(ClassRec *, find_class,(char *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   ClassRec * obj;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   if (((obj = find_class(name)) != 0) && (! (obj->_hide & HideChildrenOf))) {
@@ -2772,20 +2577,18 @@ Object builtin_browser_hide_children_of(
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_show_children_of(a)
+static Object builtin_browser_show_children_of(a)
     Instruction ** a;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  extern FCT(ClassRec *, find_class,(char *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   ClassRec * obj;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   if (((obj = find_class(name)) != 0) && (obj->_hide & HideChildrenOf)) {
@@ -2794,20 +2597,18 @@ Object builtin_browser_show_children_of(
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_hide_class(a)
+static Object builtin_browser_hide_class(a)
     Instruction ** a;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  extern FCT(ClassRec *, find_class,(char *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   ClassRec * obj;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   if (((obj = find_class(name)) != 0) && (! (obj->_hide & UserHide))) {
@@ -2816,20 +2617,18 @@ Object builtin_browser_hide_class(a)
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_show_class(a)
+static Object builtin_browser_show_class(a)
     Instruction ** a;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  extern FCT(ClassRec *, find_class,(char *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   ClassRec * obj;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   if (((obj = find_class(name)) != 0) && (obj->_hide & UserHide)) {
@@ -2838,20 +2637,18 @@ Object builtin_browser_show_class(a)
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_show_global(a)
+static Object builtin_browser_show_global(a)
     Instruction ** a;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  extern FCT(GlobalRec *, find_global,(char *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   GlobalRec * obj;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   if (((obj = find_global(name)) != 0) && (obj->_hide & UserHide)) {
@@ -2860,20 +2657,18 @@ Object builtin_browser_show_global(a)
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_hide_global(a)
+static Object builtin_browser_hide_global(a)
     Instruction ** a;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  extern FCT(GlobalRec *, find_global,(char *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   GlobalRec * obj;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   if (((obj = find_global(name)) != 0) && (! (obj->_hide & UserHide))) {
@@ -2882,20 +2677,18 @@ Object builtin_browser_hide_global(a)
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_show_function(a)
+static Object builtin_browser_show_function(a)
     Instruction ** a;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  extern FCT(ProcRec *, find_proc,(char *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   ProcRec * obj;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   if (((obj = find_proc(name)) != 0) && (obj->_hide & UserHide)) {
@@ -2904,20 +2697,18 @@ Object builtin_browser_show_function(a)
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_browser_hide_function(a)
+static Object builtin_browser_hide_function(a)
     Instruction ** a;
 {
-  extern FCT(void, RefreshBrowserInfos,());
-  extern FCT(ProcRec *, find_proc,(char *));
-  char * name = (char *) Eval(a[0]);
+  const char *name = (const char *)Eval(a[0]);
   ProcRec * obj;
-  
+
 #ifdef RUNTIMECHECK
   check_strlen(name);
 #endif
-  
+
   ignore_ctrl_c();
   if (((obj = find_proc(name)) != 0) && (! (obj->_hide & UserHide))) {
@@ -2926,10 +2717,10 @@ Object builtin_browser_hide_function(a)
   }
   accept_ctrl_c();
-  
+
   return 0;
 }
 
-Object builtin_smaclib_dir(a)
-    Instruction ** a;
+static Object builtin_smaclib_dir(a)
+    Instruction **a __attribute__((unused));
 {
   ignore_ctrl_c();
@@ -2937,11 +2728,10 @@ Object builtin_smaclib_dir(a)
 }
 
-Object builtin_set_tab_width(a)
+static Object builtin_set_tab_width(a)
      Instruction ** a;
 {
-  extern FCT(int, ie_set_tab_width,(int));
   Object arg = Eval(*a);
   Object result;
-  
+
   ignore_ctrl_c();
   result = ie_set_tab_width(arg);
@@ -2962,22 +2752,22 @@ void Init_Smac_Xcoral()
   static Type * pString;
   static Type * string_pint[2];
-    
+
   string_string_int[0] = string_string_int[1] = Type_String;
   string_string_int[2] = Type_Int;
-  
+
   string_string_string[0] =
       string_string_string[1] =
 	  string_string_string[2] = Type_String;
-    
+
   string_int_int[0] = Type_String;
   string_int_int[1] = string_int_int[2] = Type_Int;
-  
+
   int_int_string[0] = int_int_string[1] = Type_Int;
   int_int_string[2] = Type_String;
-    
+
   pString = Type__Type(Type_String, T_Pointer, sizeof(char **));
   string_pint[0] = Type_String;
   string_pint[1] = Type_PInt;
-    
+
   new_builtin("current_position", Type_Int, 0, 0, builtin_current_position);
   new_builtin("current_char", Type_Char, 0, 0, builtin_current_char);
@@ -3007,5 +2797,5 @@ void Init_Smac_Xcoral()
   new_builtin("redisplay", Type_Void, 0, 0, builtin_redisplay);
   new_builtin("blink", Type_Void, 1, &Type_Int, builtin_blink);
-  
+
   new_builtin("cmd_shell", Type_Int, 1, &Type_String, builtin_cmd_shell);
   new_builtin("cmd_shell_to_string", Type_String, 1, &Type_String,
@@ -3037,5 +2827,5 @@ void Init_Smac_Xcoral()
 
   new_builtin("set_font", Type_Void, 1, &Type_String, builtin_set_font);
-  
+
   new_builtin("read_file", Type_Int, 1, &Type_String, builtin_read_file);
   new_builtin("save_file", Type_Void, 0, 0, builtin_save_file);
@@ -3087,5 +2877,5 @@ void Init_Smac_Xcoral()
   new_builtin("current_buffer_is_colored", Type_Int, 0, 0,
 	      builtin_current_buffer_is_colored);
-  
+
   new_builtin("mark_position", Type_Int, 0, 0, builtin_mark_position);
   new_builtin("cut_region", Type_Void, 0, 0, builtin_cut_region);
@@ -3095,5 +2885,5 @@ void Init_Smac_Xcoral()
   new_builtin("goto_mark", Type_Void, 0, 0, builtin_goto_mark);
   new_builtin("reset_mark", Type_Void, 0, 0, builtin_reset_mark);
-  
+
   new_builtin("re_forward_search", Type_Int, 1, &Type_String,
 	      builtin_re_search_forward);
@@ -3107,10 +2897,10 @@ void Init_Smac_Xcoral()
 	      builtin_re_match_beginning);
   new_builtin("re_match_end", Type_Int, 1, &Type_Int, builtin_re_match_end);
-  
+
   new_builtin("watch_on", Type_Void, 0, 0, builtin_watch_on);
   new_builtin("watch_off", Type_Void, 0, 0, builtin_watch_off);
   new_builtin("usleep", Type_Void, 1, &Type_Int, builtin_usleep);
   new_builtin("current_mode", Type_String, 0, 0, builtin_current_mode);
-  
+
   new_builtin("browser_set_pp", Type_Void, 2, string_string_string,
 	      builtin_browser_set_pp);
@@ -3118,13 +2908,13 @@ void Init_Smac_Xcoral()
 	      builtin_browser_set_pp_options);
   HashTable__Add(builtin_fct_nbre_arg_min,
-		 new_builtin("browser_add", Type_Void, 2, 
+		 new_builtin("browser_add", Type_Void, 2,
 			     &string_string_int[1], builtin_browser_add),
 		 1 + 1);
   HashTable__Add(builtin_fct_nbre_arg_min,
-		 new_builtin("browser_del", Type_Void, 1, 
+		 new_builtin("browser_del", Type_Void, 1,
 			     &Type_String, builtin_browser_del),
 		 0 + 1);
   HashTable__Add(builtin_fct_nbre_arg_min,
-		 new_builtin("browser_class_file", Type_String, 2, 
+		 new_builtin("browser_class_file", Type_String, 2,
 			     string_pint, builtin_browser_class_file),
 		 1 + 1);
@@ -3138,5 +2928,5 @@ void Init_Smac_Xcoral()
 	      builtin_browser_class_attributes);
   new_builtin("browser_class_flags", Type_String, 1, &Type_String,
-	      builtin_browser_class_flags); 
+	      builtin_browser_class_flags);
   new_builtin("browser_functions", pString, 1, &Type_String,
 	      builtin_browser_functions);
@@ -3144,75 +2934,75 @@ void Init_Smac_Xcoral()
 	      builtin_browser_globals);
   new_builtin("browser_select_class", Type_Int, 1, &Type_String,
-	      builtin_browser_select_class); 
+	      builtin_browser_select_class);
   new_builtin("browser_select_method", Type_Int, 1, &Type_String,
-	      builtin_browser_select_method); 
+	      builtin_browser_select_method);
   new_builtin("browser_select_attribute", Type_Int, 1, &Type_String,
-	      builtin_browser_select_attribute); 
+	      builtin_browser_select_attribute);
   new_builtin("browser_select_function", Type_Int, 1, &Type_String,
-	      builtin_browser_select_function); 
+	      builtin_browser_select_function);
   new_builtin("browser_select_global", Type_Int, 1, &Type_String,
-	      builtin_browser_select_global); 
-  new_builtin("browser_edit", Type_Void, 0, 0, builtin_browser_edit); 
+	      builtin_browser_select_global);
+  new_builtin("browser_edit", Type_Void, 0, 0, builtin_browser_edit);
   new_builtin("browser_class_entry", Type_Int, 1, &Type_String,
-	      builtin_browser_class_entry); 
+	      builtin_browser_class_entry);
   new_builtin("browser_function_entry", Type_Int, 1, &Type_String,
-	      builtin_browser_function_entry); 
+	      builtin_browser_function_entry);
   new_builtin("browser_global_entry", Type_Int, 1, &Type_String,
-	      builtin_browser_global_entry); 
+	      builtin_browser_global_entry);
   new_builtin("browser_file_entry", Type_Int, 1, &Type_String,
-	      builtin_browser_file_entry); 
+	      builtin_browser_file_entry);
   new_builtin("browser_class", Type_String, 1, &Type_Int,
-	      builtin_browser_class); 
+	      builtin_browser_class);
   new_builtin("browser_function", Type_String, 1, &Type_Int,
-	      builtin_browser_function); 
+	      builtin_browser_function);
   new_builtin("browser_global", Type_String, 1, &Type_Int,
-	      builtin_browser_global); 
+	      builtin_browser_global);
   new_builtin("browser_file", Type_String, 1, &Type_Int,
-	      builtin_browser_file); 
+	      builtin_browser_file);
   new_builtin("browser_dump", Type_Int, 1, &Type_String,
-	      builtin_browser_dump); 
+	      builtin_browser_dump);
   new_builtin("browser_restore", Type_Int, 1, &Type_String,
-	      builtin_browser_restore); 
+	      builtin_browser_restore);
   new_builtin("browser_show_all", Type_Void, 0, 0,
-	      builtin_browser_show_all); 
+	      builtin_browser_show_all);
   new_builtin("browser_hide_private_members", Type_Void, 0, 0,
-	      builtin_browser_hide_private_members); 
+	      builtin_browser_hide_private_members);
   new_builtin("browser_hide_protected_and_private_members", Type_Void, 0, 0,
-	      builtin_browser_hide_protected_and_private_members); 
+	      builtin_browser_hide_protected_and_private_members);
   new_builtin("browser_show_protected_and_private_members", Type_Void, 0, 0,
-	      builtin_browser_show_protected_and_private_members); 
+	      builtin_browser_show_protected_and_private_members);
   new_builtin("browser_hide_inherited_members", Type_Void, 0, 0,
-	      builtin_browser_hide_inherited_members); 
+	      builtin_browser_hide_inherited_members);
   new_builtin("browser_show_inherited_members", Type_Void, 0, 0,
-	      builtin_browser_show_inherited_members); 
+	      builtin_browser_show_inherited_members);
   new_builtin("browser_hide_internal_types", Type_Void, 0, 0,
-	      builtin_browser_hide_internal_types); 
+	      builtin_browser_hide_internal_types);
   new_builtin("browser_show_internal_types", Type_Void, 0, 0,
-	      builtin_browser_show_internal_types); 
+	      builtin_browser_show_internal_types);
   new_builtin("browser_hide_static_functions", Type_Void, 0, 0,
-	      builtin_browser_hide_static_functions); 
+	      builtin_browser_hide_static_functions);
   new_builtin("browser_show_static_functions", Type_Void, 0, 0,
-	      builtin_browser_show_static_functions); 
+	      builtin_browser_show_static_functions);
   new_builtin("browser_hide_static_globals", Type_Void, 0, 0,
-	      builtin_browser_hide_static_globals); 
+	      builtin_browser_hide_static_globals);
   new_builtin("browser_show_static_globals", Type_Void, 0, 0,
-	      builtin_browser_show_static_globals); 
+	      builtin_browser_show_static_globals);
   new_builtin("browser_hide_children_of", Type_Void, 1, &Type_String,
-	      builtin_browser_hide_children_of); 
+	      builtin_browser_hide_children_of);
   new_builtin("browser_show_children_of", Type_Void, 1, &Type_String,
-	      builtin_browser_show_children_of); 
+	      builtin_browser_show_children_of);
   new_builtin("browser_hide_class", Type_Void, 1, &Type_String,
-	      builtin_browser_hide_class); 
+	      builtin_browser_hide_class);
   new_builtin("browser_show_class", Type_Void, 1, &Type_String,
-	      builtin_browser_show_class); 
+	      builtin_browser_show_class);
   new_builtin("browser_hide_global", Type_Void, 1, &Type_String,
-	      builtin_browser_hide_global); 
+	      builtin_browser_hide_global);
   new_builtin("browser_show_global", Type_Void, 1, &Type_String,
-	      builtin_browser_show_global); 
+	      builtin_browser_show_global);
   new_builtin("browser_hide_function", Type_Void, 1, &Type_String,
-	      builtin_browser_hide_function); 
+	      builtin_browser_hide_function);
   new_builtin("browser_show_function", Type_Void, 1, &Type_String,
-	      builtin_browser_show_function); 
-  
+	      builtin_browser_show_function);
+
   new_builtin("smaclib_dir", Type_String, 0, 0, builtin_smaclib_dir);
   new_builtin("set_tab_width", Type_Int, 1, &Type_Int, builtin_set_tab_width);
--- Smac/smacXcoral.h	1995-02-22 08:05:57.000000000 -0500
+++ Smac/smacXcoral.h	2014-12-27 22:17:33.000000000 -0500
@@ -45,17 +45,18 @@
 #include "fctdecl.h"
 
-extern char * i_buffer_courant;
+extern Text * i_buffer_courant;
 extern char * i_minibuffer;
 extern int i_curseur, i_curseur_sup;
 
-extern FCT(	char *, ie_load_file,(char * buff, char * filename)	);
-extern FCT(	char *, ie_eval_region,(char * buff)			);
-extern FCT(	char *, ie_eval_expression,(char * buff, char * expr)	);
-extern FCT(	char *, ie_call_function,(char *, char *, int, int *)	);
+extern FCT(const char *, ie_load_file, (Text * buff, const char * filename));
+extern FCT(const char *, ie_eval_region, (Text * buff)			);
+extern FCT(const char *, ie_eval_expression, (Text * buff, const char * expr));
+extern FCT(const char *, ie_call_function, (Text *, const char *, int, int *));
 
-extern FCT(	char *, ie_data_list,(int)				);
-extern FCT(	char *, ie_function_list,(int)				);
+extern FCT(const char *, ie_data_list, (int)				);
+extern FCT(const char *, ie_function_list, (int)			);
 
-extern FCT(	void, Init_Smac_Xcoral,()				);
+extern FCT(	   void, Init_Smac_Xcoral, (void)			);
+extern FCT(      char *, ExpandSmacName, (const char *s, int *n, int *common));
 
-#endif
+#endif
\ No newline at end of file
--- Smac/stack.h	2006-10-16 16:29:18.000000000 -0400
+++ Smac/stack.h	2014-12-27 15:31:01.000000000 -0500
@@ -75,5 +75,5 @@ extern Object * Frame_Pointer;
 extern unsigned Stack_Size;
 
-extern void Init_Stack();
+extern void Init_Stack(void);
      
 #endif
--- Smac/switch.c	2006-10-16 16:32:17.000000000 -0400
+++ Smac/switch.c	2014-12-27 16:41:53.000000000 -0500
@@ -48,5 +48,5 @@
 #include "decl.h" /**/
 
-void switch_free(List * lexprs, Instruction ** exprs, int sup)
+static void switch_free(List * lexprs, Instruction ** exprs, int sup)
 {
   while (lexprs) {
--- Smac/type.c	2006-10-16 16:32:45.000000000 -0400
+++ Smac/type.c	2014-12-27 16:54:04.000000000 -0500
@@ -277,6 +277,6 @@ static Type * pointeur_ou_tableau_de_tab
    type pour s'en servir de clef d'une hash table */
 
-char * encode_type(t)
-     Type * t;
+const char * encode_type(t)
+     const Type * t;
 {
   if (Type__IsBuiltin(t))
--- Smac/type.h	2006-10-16 16:29:58.000000000 -0400
+++ Smac/type.h	2014-12-27 16:53:30.000000000 -0500
@@ -50,5 +50,5 @@ extern FCT( Type *, abstract_type,(List 
 
 extern FCT( Instruction *, make_typedef,(List *, int)	);
-extern FCT( char *, encode_type,(Type *)	);
+extern FCT( const char *, encode_type, (const Type *)	);
      
 #endif
--- Smac/word.c	1998-09-20 10:15:37.000000000 -0400
+++ Smac/word.c	2014-12-27 14:19:13.000000000 -0500
@@ -40,8 +40,11 @@
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
 
 #define THEFILE "wordisgood"
 
-int goodp()
+static int goodp()
 {
   FILE * fp = fopen(THEFILE, "r");
@@ -55,5 +58,5 @@ int goodp()
 }
 
-void itisgood()
+static void itisgood()
 {
   FILE * fp = fopen(THEFILE, "w");
@@ -131,9 +134,11 @@ main()
       
       if (fork()) {
-	wait(0);
+	int status;
+	wait(&status);
 	
 	if (! goodp()) {
 	  /* erreur */
 	  unlink("core");
+	  unlink("word.core");
 	  mask |= ajout_add;
 	}
--- bm_search.c	1998-09-20 12:49:08.000000000 -0400
+++ bm_search.c	2014-12-27 01:29:41.000000000 -0500
@@ -58,5 +58,5 @@
 #include <sys/types.h>
 #define const
-#include "regex.h"
+#include <gnu/regex.h>
 
 #include "main_text.h"
@@ -71,7 +71,7 @@
 #include "selection.h"
 
-static char *str_save = 0;
-static char *str_old = 0;
-static char *str_new = 0;
+static const char *str_save = NULL;
+static const char *str_old = NULL;
+static const char *str_new = NULL;
 static int abort_debug = False;
 
@@ -100,6 +100,6 @@ void ForwardSearch ( text )
 {
     char *str;
-    
-    if ( (str = (char *) SetString ( text, "Forward search : ", S_KBD )) == 0 )  {
+
+    if ( (str = SetString ( text, "Forward search : ", S_KBD )) == 0 )  {
 	DisplayMessage ( text -> mwin, "Abort" );
 	return;
@@ -107,10 +107,10 @@ void ForwardSearch ( text )
     else
       DisplayMessage ( text -> mwin, "Search..." );
-    
+
     if ( HandleForward ( str, text ) == 0 ) {
 	DisplayMessage ( text -> mwin, "Search failed" );
 	klaxon ();
     }
-    
+
 }
 
@@ -124,14 +124,14 @@ void ForwardSearch ( text )
 **	Ouput :
 */
-int HandleForward ( str, text )	
+int HandleForward ( str, text )
     char *str;
     Text *text;
-{	
+{
     int newpos;
     char *start,  *end;
-    
-    start = (char *) RightBuf ( text -> buf ); 
+
+    start = (char *) RightBuf ( text -> buf );
     end = (char *) BottomBuf ( text -> buf );
-    
+
     if ( (newpos=BmSearch( start, str,  end -start, FORWARD )) != -1 ) {
 	if ( newpos == 0 ) { 	/* On est pile dessus */
@@ -162,5 +162,5 @@ void BackwardSearch ( text )
 {
     char *str;
-    
+
     if ( (str = (char *) SetString ( text, "Backward search : ", S_KBD )) == 0 ) {
 	DisplayMessage ( text -> mwin, "Abort" );
@@ -168,6 +168,6 @@ void BackwardSearch ( text )
     }
     else
-      DisplayMessage ( text -> mwin, "Search..." );	
-    
+      DisplayMessage ( text -> mwin, "Search..." );
+
     if ( HandleBackward ( str, text ) == 0 ) {
 	DisplayMessage ( text -> mwin, "Search failed" );
@@ -192,9 +192,9 @@ int HandleBackward ( str, text )
     char *start,  *end;
     int len;
-    
+
     oldpos = GetNcFromRight ( text -> buf );
     start = (char *) GetCurrentLine ( text -> buf, &len );
     end = (char *) TopBuf ( text -> buf );
-    
+
     start += ( len -1);	/* On part de la fin de la ligne */
     if ( (newpos=BmSearch( start, str, len-1, BACKWARD )) != -1 ) {
@@ -232,10 +232,10 @@ void GlobalReplace ( text )
 **	Function name : SetPatterns
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 void SetPatterns ( old, new )
-    char *old, *new;
+    const char *old, *new;
 {
     str_old = old;
@@ -246,12 +246,12 @@ void SetPatterns ( old, new )
 **	Function name : ResetPatterns
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 void ResetPatterns ()
 {
-    str_old = 0;
-    str_new = 0;
+    str_old = NULL;
+    str_new = NULL;
 }
 
@@ -270,5 +270,5 @@ int HandleGlobal ( text )
     char *start,  *end;
     int f_query = False;
-    
+
     if (text -> selection -> select == True) {
       SetCurrentLine (text);
@@ -278,11 +278,11 @@ int HandleGlobal ( text )
     line = text -> no_current_line;
     old_pos = GetNcFromLeft ( text -> buf );
-    
+
     start = (char *) RightBuf ( text -> buf );
     end = (char *) BottomBuf ( text -> buf );
-    
+
     i = 0;
     StorePosition(text);
-    
+
     if ( (newpos=BmSearch( start, str_new,  end - start, FORWARD )) != -1 ) {
 	/*
@@ -292,5 +292,5 @@ int HandleGlobal ( text )
 	DisplayMessage ( text -> mwin, "done, but warning : query ..." );
 	while ( (newpos=BmSearch( start, str_old,  end -start, FORWARD )) != -1 ) {
-	    GotoPos ( text, start, newpos, FORWARD ); 
+	    GotoPos ( text, start, newpos, FORWARD );
 	    (void) MoveHole ( text -> buf, strlen (str_old)); /* On se place a la fin du mot */
 	    StoreInUndo ( text, str_old, str_new, 1 ,0 , U_REP );
@@ -303,5 +303,5 @@ int HandleGlobal ( text )
 	    InsertNchar ( text -> buf, str_new, strlen ( str_new));
 	    modif = True;
-	    start = (char *) RightBuf ( text -> buf ); 
+	    start = (char *) RightBuf ( text -> buf );
 	    end = (char *) BottomBuf ( text -> buf );
 	    i++;
@@ -324,5 +324,5 @@ int HandleGlobal ( text )
 	}
     }
-    ResetMark ( text );	
+    ResetMark ( text );
     HoleToLeft ( text -> buf );
     text -> no_current_line = 1;
@@ -331,5 +331,5 @@ int HandleGlobal ( text )
     SetPosition(text);
     UpdatePage(text);
-    
+
     if ( modif == True )
       SetTextModif ( text );
@@ -354,5 +354,5 @@ void QueryReplace ( text )
     int abort, modif;
     char c = '\007'; /* ^G */
-    
+
     if (text -> selection -> select == True){
       SetCurrentLine (text);
@@ -361,17 +361,17 @@ void QueryReplace ( text )
 
     if ( SetReplaceString ( text, QUERY, S_KBD ) == -1 ) return;
-    
-    start = (char *) RightBuf ( text -> buf ); 
+
+    start = (char *) RightBuf ( text -> buf );
     end = (char *) BottomBuf ( text -> buf );
-    
+
     modif = abort = False;
-    
+
     while ( (newpos=BmSearch( start, str_old,  end -start, FORWARD )) != -1 ) {
-	GotoPos ( text, start, newpos, FORWARD ); 
+	GotoPos ( text, start, newpos, FORWARD );
 	SetAndDisplayPage ( text );
 	TextCursorOn ( text );
 	(void) MoveHole ( text -> buf, strlen (str_old)); /* On se place a la fin du mot */
 	reply = (char * ) GetString ( text, "Replace [y,n,q] : ", 1 );
-	
+
 	if ( (reply == 0) || (strncmp(reply, &c, 1)) == 0 || (strncmp(reply, "q", 1) == 0 )) {
 	    abort = True;
@@ -391,15 +391,15 @@ void QueryReplace ( text )
 	    modif = True;
 	}
-	start = (char *) RightBuf ( text -> buf ); 
+	start = (char *) RightBuf ( text -> buf );
 	end = (char *) BottomBuf ( text -> buf );
     }
-    
+
     if ( abort == True )
       DisplayMessage ( text -> mwin, "Abort" );
     else
       DisplayMessage ( text -> mwin, "Done" );
-    
+
     /* On revient au debut du mot */
-    
+
     SetAndDisplayPage ( text );
     if ( modif == True )
@@ -421,5 +421,5 @@ void MenuForwardSearch ( text )
 {
     char *str;
-    
+
     (void) ResetSearchString ();
     if ( (str = (char *) SetString ( text, "Forward search : ", S_MENU )) == 0 )  {
@@ -448,5 +448,5 @@ void MenuBackwardSearch ( text )
 {
     char *str;
-    
+
     (void) ResetSearchString ();
     if ( (str = (char *) SetString ( text, "Backward search : ", S_MENU )) == 0 )  {
@@ -508,6 +508,6 @@ void MenuGlobalReplace ( text )
 */
 int BmSearch ( buf, str, buf_len, dir )
-    char *buf;	/* Le buffer */
-    char *str;	/* La string */
+    const char *buf;	/* Le buffer */
+    const char *str;	/* La string */
     int buf_len;	/* Longueur du buffer */
     int dir;	/* Forward (1), Backward (-1)*/
@@ -517,25 +517,25 @@ int BmSearch ( buf, str, buf_len, dir )
     int i, j, k, t;
     int index [256];
- 
+
     if((buf_len +1)< s_len) {
       return -1;
     }
-    for ( i = 0 ; i < 256 ; i++ )  index [i] = s_len;	
-    
+    for ( i = 0 ; i < 256 ; i++ )  index [i] = s_len;
+
     for ( i = 0; i < s_len; i++ ) {
 	k = ( dir == FORWARD ) ? len - i : i;
-	if ( index [(int) str [k]] == s_len ) 
+	if ( index [(int) str [k]] == s_len )
 	  index [(int) str [k]] = i;
     }
 #ifdef DEBUG
-    for ( i = 0 ; i < 256 ; i++ ) 
+    for ( i = 0 ; i < 256 ; i++ )
       if ( index[i] != s_len )
 	fprintf ( stderr, "index %c %d = %d\n", i, index [i],  (char) i);
 #endif
-    for ( i = ( dir == FORWARD) ? len : 0, 
+    for ( i = ( dir == FORWARD) ? len : 0,
 	 j = ( dir == FORWARD) ? len : 0;
 	 (( dir == FORWARD) ? ( j>= 0) : (j <= len));
 	 i -= ( dir == FORWARD) ? FORWARD : BACKWARD,
-	 j -= ( dir == FORWARD) ? FORWARD : BACKWARD ) { 
+	 j -= ( dir == FORWARD) ? FORWARD : BACKWARD ) {
 #ifdef DEBUG
 	(void) fprintf ( stderr, "i = %d, j = %d\n", i, j );
@@ -545,5 +545,5 @@ int BmSearch ( buf, str, buf_len, dir )
 	    t = index [(unsigned char) buf [i] ];
 	    if ( dir == FORWARD ) {
-#ifdef DEBUG 
+#ifdef DEBUG
 		(void) fprintf ( stderr, "buf[%d] = %d str[%d] = %c t = %d\n",
 				i, (unsigned char) buf[i], j, str[j], t );
@@ -554,11 +554,11 @@ int BmSearch ( buf, str, buf_len, dir )
 	    }
 	    else {
-#ifdef DEBUG 
+#ifdef DEBUG
 		(void) fprintf ( stderr, "buf[%d] = %c str[%d] = %c t = %d\n", i, buf[i], j, str[j], t );
 #endif
-		i -= ( j > t) ? s_len : t; 
-		
+		i -= ( j > t) ? s_len : t;
+
 		if ( (buf_len +1 +i) < 0 ) return -1;
-		j = 0; 
+		j = 0;
 	    }
 	}
@@ -584,5 +584,5 @@ static char *SetString ( text, prompt, f
     char c = '\007'; /* ^G */
     int len;
-    
+
     if (text -> selection -> select == True) {
       SetCurrentLine (text);
@@ -593,7 +593,7 @@ static char *SetString ( text, prompt, f
 	if ( from == S_KBD )
 	  str = (char *) GetString ( text, prompt, False );
-	else 
+	else
 	  str = ( char *) GetStringFromDB ( prompt, False );
-	
+
 	if ( str == 0 )
 	  return 0;
@@ -629,9 +629,9 @@ static int SetReplaceString ( text, type
     char buf [64], tmp[64];
     int len;
-    
+
     if ( type == GLOBAL )
       (void) strcpy ( tmp, "Global replace," );
     else
-      (void) strcpy ( tmp, "Query replace," );	
+      (void) strcpy ( tmp, "Query replace," );
     (void) ResetSearchString ();
     (void) strcpy ( buf, tmp );
@@ -647,11 +647,11 @@ static int SetReplaceString ( text, type
     (void) strncpy ( str_old, str, len );
     *(str_old + len) = '\0';
-    
+
     (void) ResetSearchString ();
-    
+
     buf [0] = '\0';
     (void) strcpy ( buf, tmp );
     (void) strcat ( buf, " New String : " );
-    
+
     if ( (str = (char *) SetString ( text, buf, from )) == 0 ) {
 	if ( abort_debug == True ) {
@@ -665,5 +665,5 @@ static int SetReplaceString ( text, type
 	}
     }
-    
+
     len = strlen (str);
     if ( str_new != 0 )
@@ -699,6 +699,6 @@ static void GotoPos ( text, start, newpo
     line = GetNewLine ( start, x );
     text -> no_current_line += (dir == FORWARD ) ? line : -line;
-    
-    (void) MoveHole ( text -> buf, x );	
+
+    (void) MoveHole ( text -> buf, x );
     if ( line != 0 ) {
 	if ( (line > (( dir == FORWARD) ? text -> n2 : text -> n1 )))
@@ -706,5 +706,5 @@ static void GotoPos ( text, start, newpo
 	else {
 	    text -> n1 += (dir == FORWARD) ? line : -line;
-	    text -> n2 -= (dir == FORWARD) ? line : -line;				
+	    text -> n2 -= (dir == FORWARD) ? line : -line;
 	    SetAndDisplayPage ( text );
 	}
@@ -716,6 +716,6 @@ static void GotoPos ( text, start, newpo
 **	Function name : DeleteStrings
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
@@ -724,5 +724,5 @@ void DeleteStrings ()
     if ( str_save != 0 )
       (void) free ( str_save );
-    if ( str_old != 0 )   
+    if ( str_old != 0 )
       (void) free ( str_old );
     if ( str_new != 0 )
@@ -734,6 +734,6 @@ void DeleteStrings ()
 **	Function name : ResetSearchString
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
@@ -748,6 +748,6 @@ void ResetSearchString ()
 **	Function name : SearchInMan
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
@@ -756,5 +756,5 @@ void SearchInMan ( text )
 {
     char *str;
-    
+
     (void) ResetSearchString ();
     if ( (str = (char *) SetString ( text, "Manual Search : ", S_MENU )) == 0 )  {
@@ -762,5 +762,5 @@ void SearchInMan ( text )
 	return;
     }
-    
+
     if ( HandleForward ( str, text ) != 0 )
       return;
@@ -773,5 +773,5 @@ void SearchInMan ( text )
 /*===============
    REGEX SEARCH
-================*/   
+================*/
 /*
 **	Function name : UpddateRegs
@@ -781,5 +781,5 @@ void SearchInMan ( text )
 **         forward_search.
 **         Ceci pour avoir des positions SMAC correctes
-**         pour les re_sub_expressions.  
+**         pour les re_sub_expressions.
 **	Input : La position courante a ajouter.
 **	Output :
@@ -787,7 +787,7 @@ void SearchInMan ( text )
 void UpdateRegs (n)
 {
-    
+
     int i = RE_registers.num_regs;
-    
+
     for (i=0;i<RE_registers.num_regs;i++) {
 	RE_registers.start [i] += n;
@@ -801,10 +801,10 @@ void UpdateRegs (n)
 **	Function name : RE_Match
 **
-**	Description : 
+**	Description :
 **	Input : le numeron du registre (0 et 1 correspondent
 **         la premiere re_subexp. Un flag boleen pour le debut
 **         ou la fin de la re_subexp courante.
 **	Output : La position du debut ou de la fin de la re_subexp
-**         courante.  
+**         courante.
 */
 int RE_Match (n, beginning )
@@ -816,5 +816,5 @@ int RE_Match (n, beginning )
     return -1;
 
-  if (beginning) 
+  if (beginning)
     return (RE_registers.start[n]);
   else
@@ -834,5 +834,5 @@ void RE_MenuForwardSearch ( text )
     int newpos, orig;
     char *str;
-    
+
     (void) ResetSearchString ();
     if ( (str = (char *) SetString ( text, "Regex forward search : ", S_MENU )) == 0 )  {
@@ -847,5 +847,5 @@ void RE_MenuForwardSearch ( text )
 
     if ((newpos == -1) || (newpos == -2) ){
-      klaxon (); 
+      klaxon ();
       return;
     }
@@ -857,9 +857,9 @@ void RE_MenuForwardSearch ( text )
 	    if ((newpos == -1) || (newpos == -2) ){
 		(void) MoveHole ( text -> buf, -1 );
-		klaxon (); 
+		klaxon ();
 		return;
 	    }
 	}
-	(void) ie_goto_char (text, newpos);	
+	(void) ie_goto_char (text, newpos);
 	ie_redisplay (text);
     }
@@ -871,5 +871,5 @@ void RE_MenuForwardSearch ( text )
 **	Description : Recherche en arriere d'une regex.
 **         Si on est deja a l'interieur de la regex recherchee,
-**         celle-ci n'esp pas vue.  
+**         celle-ci n'esp pas vue.
 **	Input :
 **	Output :
@@ -880,5 +880,5 @@ void RE_MenuBackwardSearch ( text )
     int newpos;
     char *str;
-    
+
     (void) ResetSearchString ();
     if ( (str = (char *) SetString ( text, "Regex backward search : ", S_MENU )) == 0 )  {
@@ -892,5 +892,5 @@ void RE_MenuBackwardSearch ( text )
 
     if ((newpos == -1) || (newpos == -2) ){
-	klaxon (); 
+	klaxon ();
 	return;
     }
@@ -906,11 +906,11 @@ void RE_MenuBackwardSearch ( text )
 **	Description : Recherche d'une expression reguliere dans un buffer.
 **         On considere que les frontieres sont valides (buffer + ou - size)
-**	Input : L'expression reguliere, le buffer, la frontiere dans le 
+**	Input : L'expression reguliere, le buffer, la frontiere dans le
 **         buffer et la direction de recherche.
 **	Output : la position dans le buffer, -1 sinon et -2 si error (compile).
 */
 int RE_Search ( regex, buffer, size, direction)
-    char *regex;
-    char *buffer;
+    const char *regex;
+    const char *buffer;
     int size;
     int direction;
@@ -919,5 +919,5 @@ int RE_Search ( regex, buffer, size, dir
     static char *old_regex = 0;
     int search_result;
-    
+
     int start = (direction == FORWARD) ? 0 : size-1;
     int range = (direction == FORWARD) ? size-1 : -size+1;
@@ -925,5 +925,5 @@ int RE_Search ( regex, buffer, size, dir
     int start = (direction == FORWARD) ? 0 : size;
     int range = (direction == FORWARD) ? size : -size;
-*/    
+*/
     if ((old_regex == 0) || (strcmp (old_regex, regex) != 0)) {
 	/*
@@ -932,20 +932,19 @@ int RE_Search ( regex, buffer, size, dir
 	RE_pattern_buffer.fastmap = RE_fastmap;
 	compile_result = re_compile_pattern (regex, strlen (regex), &RE_pattern_buffer);
-	if (compile_result != (char *) 0)
+	if (compile_result != NULL)
 	  return (-2);
 
 	if (old_regex)
-	  (void) free(old_regex);
-	old_regex = (char*) malloc ((unsigned) strlen(regex) + 1);
-	strcpy (old_regex, regex);
+	  free(old_regex);
+	old_regex = strdup(regex);
     }
-   
+
 #ifdef DEBUG
     (void) fprintf ( stderr, "size = %d range = %d\n reg = %s len = %d\n",
 		    size, range, regex, strlen(regex));
 #endif /* DEBUG */
- 
+
     search_result = re_search ( &RE_pattern_buffer,
-			       buffer, size, start, range, &RE_registers ); 
+			       buffer, size, start, range, &RE_registers );
 
     return (search_result);
@@ -963,5 +962,5 @@ void RE_MenuReplace ( text )
 {
     if ( SetReplaceString ( text, QUERY, S_MENU ) == -1 ) return;
-    
+
     ie_re_replace ( text, str_old, str_new );
     ie_redisplay (text);
@@ -978,9 +977,9 @@ void RE_MenuReplace ( text )
 int RE_ReplaceMatch ( text, newstring )
     Text *text;
-    char *newstring;
+    const char *newstring;
 {
     int i,j,re_len, new_len = strlen(newstring);
     int nth_c, c;
-    
+
     char *buffer;
 
@@ -990,10 +989,10 @@ int RE_ReplaceMatch ( text, newstring )
     re_len = RE_registers.end[0] - RE_registers.start[0];
     */
-    
+
     /* newstring peut contenir \& ou \n avec 0<n<10.
        \& : substitution par la regex.
        \n : substitution par la substring n de la regex.
     */
-    
+
     /* MA:
     ** Since RE_registers.start/end measure from the top of the buffer
@@ -1003,5 +1002,5 @@ int RE_ReplaceMatch ( text, newstring )
     */
     ie_goto_char(text, RE_registers.start[0]);
-    
+
     buffer = RightBuf(text->buf); /* On est sur la regex */
     for (i=0;i<new_len;i++) {
@@ -1067,5 +1066,5 @@ int RE_ReplaceMatch ( text, newstring )
 	ie_delete_char (text);
     }
-    
+
     return (1);
 }
--- bm_search.h	1995-02-22 08:03:25.000000000 -0500
+++ bm_search.h	2014-12-26 01:27:26.000000000 -0500
@@ -52,10 +52,10 @@
 
 FCT (void, BackwardSearch, (Text *text) );
-FCT (int, BmSearch, (char *buf, char *str, int buf_len, int dir ) );
-FCT (void, DeleteStrings, () );
+FCT (int, BmSearch, (const char *buf, const char *str, int buf_len, int dir ) );
+FCT (void, DeleteStrings, (void) );
 FCT (void, ForwardSearch, (Text *text) );
 FCT (void, GlobalReplace, (Text *text) );
-FCT (int, HandleBackward, (char *str, Text *text) );
-FCT (int, HandleForward, (char *str, Text *text) );
+FCT (int, HandleBackward, (const char *str, Text *text) );
+FCT (int, HandleForward, (const char *str, Text *text) );
 FCT (int, HandleGlobal, (Text *text) );
 FCT (void, MenuBackwardSearch, (Text *text) );
@@ -64,13 +64,14 @@ FCT (void, MenuGlobalReplace, (Text *tex
 FCT (void, MenuQueryReplace, (Text *text) );
 FCT (void, QueryReplace, (Text *text) );
-FCT (void, ResetPatterns, () );
-FCT (void, ResetSearchString, () );
+FCT (void, ResetPatterns, (void) );
+FCT (void, ResetSearchString, (void) );
 FCT (void, SearchInMan, (Text *text) );
-FCT (void, SetPatterns, (char *old, char *new) );
+FCT (void, SetPatterns, (const char *old, const char *new) );
 FCT (void, RE_MenuForwardSearch, (Text *text) );
 FCT (void, RE_MenuBackwardSearch, (Text *text) );
 FCT (void, RE_MenuReplace, (Text *text) );
-FCT (int, RE_Search, (char* regex, char *buffer, int size, int direction) );
+FCT (int, RE_Search, (const char* regex, const char *buffer, int size, int direction) );
 FCT (int, RE_Match, (int n, int beginning ) );
+FCT (int, RE_ReplaceMatch, (Text *, const char *newstring) );
 FCT (void, UpdateRegs, (int n) );
 
--- browser_eng.c	2002-11-24 08:09:07.000000000 -0500
+++ browser_eng.c	2014-12-27 23:05:03.000000000 -0500
@@ -44,4 +44,7 @@
 #endif
 #include <stdio.h>
+#include <stdlib.h>
+
+#include <X11/Xlib.h>
 
 #include "proto_decl.h"
@@ -55,12 +58,18 @@
 #include "browser_pars.h"
 #include "browser_util.h"
-
+#include "browser_init.h"
+#include "browser_eve.h"
+#include "list_box.h"
+#include "main_text.h"
+#include "result_types.h"
+#include "BR_Global.h"
+#include "Smac/smacXcoral.h"
 
 
 /*------------------------------------------------------------------------------
 */
-StringTable* get_files_list () {
+StringTable get_files_list () {
   FileRec*     current_file;
-  StringTable* result;
+  StringTable  result;
   char**       current_entry;
   int          index;
@@ -68,7 +77,7 @@ StringTable* get_files_list () {
 
   x_size = sizeof(char*) * (file_count + 1);
-  result = (StringTable*) xmalloc(x_size);
+  result = xmalloc(x_size);
   if (result != Null) {
-    current_entry = (char**) result;
+    current_entry = result;
     for (index = 0; index < FILE_DICT_SIZE; index++) {
       current_file = file_dict[index];
@@ -108,8 +117,8 @@ static int hiden_because_child(current_c
 }
 
-StringTable* get_classes_list ()
+StringTable get_classes_list ()
 {
   ClassRec*    current_class;
-  StringTable* result;
+  StringTable  result;
   char**       current_entry;
   int          index;
@@ -118,7 +127,7 @@ StringTable* get_classes_list ()
   
   x_size = sizeof(char*) * (class_count + 1);
-  result = (StringTable*) xmalloc(x_size);
+  result = xmalloc(x_size);
   if (result != Null) {
-    current_entry = (char**) result;
+    current_entry = result;
     for (index = 0; index < CLASS_DICT_SIZE; index++) {
       current_class = class_dict[index];
@@ -160,9 +169,47 @@ StringTable* get_classes_list ()
 /*------------------------------------------------------------------------------
 */
-StringTable* get_parents_list (class_name, obj)
-    char* class_name;
-    int obj;
+ParentRec **get_parents_recs (class_name)
+    const char* class_name;
 {
-  StringTable* result;
+  ParentRec ** result;
+  ParentRec ** current_entry;
+  ClassRec*    current_class;
+  ClassRec*    parent_class;
+  ParentRec*   current_parent;
+  int          x_size;
+  char*        infos;
+
+  current_class = find_class(class_name);
+  if (current_class == Null)
+    return Null;
+  x_size = sizeof(ParentRec *) * (current_class->_parents_count + 1);
+  result = xmalloc(x_size);
+  if (result == Null)
+    return Null;
+
+  current_entry  = result;
+  current_parent = current_class->_parents_list;
+  while (current_parent != Null) {
+    (*current_entry) = current_parent;
+    infos = current_parent->_name - CLASS_PLENGTH + 1;
+    parent_class = find_class(current_parent->_name);
+    if ((parent_class != Null) && (parent_class->_decl_file != Null))
+      *infos = 'd';
+    else
+      *infos = '?';
+    infos = current_parent->_name - CLASS_PLENGTH + 1;
+    current_entry++;
+    current_parent = current_parent->_next;
+  }
+  (*current_entry) = Null;
+  return(result);
+}
+
+/*------------------------------------------------------------------------------
+*/
+StringTable get_parents_list (class_name)
+    const char* class_name;
+{
+  StringTable  result;
   char**       current_entry;
   ClassRec*    current_class;
@@ -172,31 +219,27 @@ StringTable* get_parents_list (class_nam
   char*        infos;
 
-  result = Null; 
   current_class = find_class(class_name);
-  if (current_class != Null) {
-    x_size = sizeof(char*) * (current_class->_parents_count + 1);
-    result = (StringTable*) xmalloc(x_size);
-    if (result != Null) {
-      current_entry  = (char**) result;
-      current_parent = current_class->_parents_list;
-      while (current_parent != Null) {
-	if (obj)
-	  (*current_entry) = (char *) current_parent;
-	else
-	  (*current_entry) = current_parent->_name;
-	infos = current_parent->_name - CLASS_PLENGTH + 1;
-	parent_class = find_class(*current_entry);
-	if ((parent_class != Null) && (parent_class->_decl_file != Null))
-	  *infos = 'd';
-	else
-	  *infos = '?';
-	current_entry++;
-	current_parent = current_parent->_next;
-      }
-      (*current_entry) = Null;
-      if (!obj)
-	qsort(result, current_class->_parents_count, sizeof(char*), sort_util);
-    }
+  if (current_class == Null)
+    return Null;
+  x_size = sizeof(char *) * (current_class->_parents_count + 1);
+  result = xmalloc(x_size);
+  if (result == Null)
+    return Null;
+
+  current_entry  = result;
+  current_parent = current_class->_parents_list;
+  while (current_parent != Null) {
+    (*current_entry) = current_parent->_name;
+    infos = current_parent->_name - CLASS_PLENGTH + 1;
+    parent_class = find_class(current_parent->_name);
+    if ((parent_class != Null) && (parent_class->_decl_file != Null))
+      *infos = 'd';
+    else
+      *infos = '?';
+    current_entry++;
+    current_parent = current_parent->_next;
   }
+  (*current_entry) = Null;
+  qsort(result, current_class->_parents_count, sizeof(char*), sort_util);
   return(result);
 }
@@ -205,6 +248,6 @@ StringTable* get_parents_list (class_nam
 /*------------------------------------------------------------------------------
 */
-StringTable* get_sons_list(class_name)
-    char* class_name;
+StringTable get_sons_list(class_name)
+    const char* class_name;
 {
   int          index;
@@ -213,5 +256,5 @@ StringTable* get_sons_list(class_name)
   ClassRec*    current_class;
   ParentRec*   current_parent;
-  StringTable* result;
+  StringTable  result;
   char**       current_entry;
   int          x_size;
@@ -236,7 +279,7 @@ StringTable* get_sons_list(class_name)
   }
   x_size = sizeof(char*) * (marked_count + 1);
-  result = (StringTable*) xmalloc(x_size);
+  result = xmalloc(x_size);
   if (result != Null) {
-    current_entry = (char**) result;
+    current_entry = result;
     while (marked_list != Null) {
       (*current_entry) = marked_list->_name;
@@ -264,11 +307,11 @@ int        marked_count;
 
 
-int sort_method(i,j)
-  char** i;
-  char** j;
-{
-  char* ti = *i;
-  char* tj = *j;
-  char* par_posit;
+static int sort_method(i,j)
+  const char** i;
+  const char** j;
+{
+  const char* ti = *i;
+  const char* tj = *j;
+  const char* par_posit;
   int   result;
 
@@ -296,6 +339,6 @@ int sort_method(i,j)
 
 
-void post_compute(result)
-    StringTable* result;
+static void post_compute(result)
+    StringTable result;
 {
   char**  current_entry;
@@ -337,6 +380,6 @@ void post_compute(result)
 
 
-void get_inherit_list(current_class, max_scope, depth)
-     ClassRec* current_class;
+static void get_inherit_list(current_class, max_scope, depth)
+     const ClassRec* current_class;
      ScopeType max_scope;
      int       depth;
@@ -370,11 +413,11 @@ void get_inherit_list(current_class, max
 
 
-StringTable* get_methods_list(class_name, cut)
-    char* class_name;
+StringTable get_methods_list(class_name, cut)
+    const char* class_name;
     int cut;
 {
   ClassRec*    current_class;
   MethodRec*   current_method;
-  StringTable* result;
+  StringTable  result;
   char**       current_entry;
   int          x_size;
@@ -389,7 +432,7 @@ StringTable* get_methods_list(class_name
     if (marked_list != END_MARKED_LIST)  {
       x_size = sizeof(char*) * (marked_count + 1);
-      result = (StringTable*) xmalloc(x_size);
+      result = xmalloc(x_size);
       if (result != Null) {
-        current_entry  = (char**) result;
+        current_entry  = result;
         current_method = marked_list;
         while(current_method != END_MARKED_LIST) {
@@ -461,6 +504,6 @@ int marked_attr_count;
 #define END_MARKED_LIST ((AttributeRec*) 0x00000001)
 
-void get_inherit_attr_list(current_class, max_scope, depth)
-     ClassRec* current_class;
+static void get_inherit_attr_list(current_class, max_scope, depth)
+     const ClassRec* current_class;
      ScopeType max_scope;
      int       depth;
@@ -493,7 +536,7 @@ void get_inherit_attr_list(current_class
 }
 
-int sort_attribute(i,j)
-  char** i;
-  char** j;
+static int sort_attribute(i,j)
+  const char** i;
+  const char** j;
 {
   int result = strcmp(*i, *j);
@@ -512,11 +555,11 @@ int sort_attribute(i,j)
 }
 
-StringTable* get_attributes_list(class_name, cut)
-    char* class_name;
+StringTable get_attributes_list(class_name, cut)
+    const char* class_name;
     int cut;
 {
   ClassRec*    current_class;
   AttributeRec*   current_attr;
-  StringTable* result;
+  StringTable  result;
   char**       current_entry;
   int          x_size;
@@ -531,7 +574,7 @@ StringTable* get_attributes_list(class_n
     if (marked_attr_list != END_MARKED_LIST)  {
       x_size = sizeof(char*) * (marked_attr_count + 1);
-      result = (StringTable*) xmalloc(x_size);
+      result = xmalloc(x_size);
       if (result != Null) {
-        current_entry  = (char**) result;
+        current_entry  = result;
         current_attr = marked_attr_list;
         while(current_attr != END_MARKED_LIST) {
@@ -587,5 +630,5 @@ StringTable* get_attributes_list(class_n
 */
 Position* get_class_decl (class_name)
-    char* class_name;
+    const char* class_name;
 {
   Position*     result;
@@ -598,5 +641,5 @@ Position* get_class_decl (class_name)
   if (   (current_class != Null)
       && (current_class->_decl_file != Null)
-      && ((result = (Position*) xmalloc(x_size)) != Null)) {
+      && ((result = xmalloc(x_size)) != Null)) {
     result->file_name   = current_class->_decl_file->_name;
     result->line_number = current_class->_decl_line;
@@ -608,6 +651,6 @@ Position* get_class_decl (class_name)
 /*------------------------------------------------------------------------------
 */
-char* get_method_class(method_name)
-    char* method_name;
+const char* get_method_class(method_name)
+    const char* method_name;
 {
   MethodRec* current_method;
@@ -623,6 +666,6 @@ char* get_method_class(method_name)
 */
 Position* get_method_decl (class_name, method_name)
-    char* class_name;
-    char* method_name;
+    const char* class_name;
+    const char* method_name;
 {
   Position*     result;
@@ -643,5 +686,5 @@ Position* get_method_decl (class_name, m
     if (   (current_method != Null)
         && (current_method->_decl_file != Null)
-        && ((result = (Position*) xmalloc(x_size)) != Null)) {
+        && ((result = xmalloc(x_size)) != Null)) {
       result->file_name   = current_method->_decl_file->_name;
       result->line_number = current_method->_decl_line;
@@ -655,6 +698,6 @@ Position* get_method_decl (class_name, m
 */
 Position* get_method_impl (class_name, method_name)
-     char* class_name;
-     char* method_name;
+     const char* class_name;
+     const char* method_name;
 {
   Position*     result;
@@ -675,5 +718,5 @@ Position* get_method_impl (class_name, m
     if (   (current_method != Null)
         && (current_method->_impl_file != Null)
-        && ((result = (Position*) xmalloc(x_size)) != Null)) {
+        && ((result = xmalloc(x_size)) != Null)) {
       result->file_name   = current_method->_impl_file->_name;
       result->line_number = current_method->_impl_line;
@@ -686,6 +729,6 @@ Position* get_method_impl (class_name, m
 /*------------------------------------------------------------------------------
 */
-char* get_attribute_class(attr_name)
-    char* attr_name;
+const char* get_attribute_class(attr_name)
+    const char* attr_name;
 {
   AttributeRec* current_attr;
@@ -701,6 +744,6 @@ char* get_attribute_class(attr_name)
 */
 Position* get_attribute_decl (class_name, attr_name)
-    char* class_name;
-    char* attr_name;
+    const char* class_name;
+    const char* attr_name;
 {
   Position*     result;
@@ -721,5 +764,5 @@ Position* get_attribute_decl (class_name
     if (   (current_attr != Null)
         && (current_attr->_decl_file != Null)
-        && ((result = (Position*) xmalloc(x_size)) != Null)) {
+        && ((result = xmalloc(x_size)) != Null)) {
       result->file_name   = current_attr->_decl_file->_name;
       result->line_number = current_attr->_decl_line;
@@ -732,65 +775,104 @@ Position* get_attribute_decl (class_name
 /*------------------------------------------------------------------------------
 */
-StringTable* get_procs_list (prefix)
-    char * prefix;
+ProcRec ** get_procs_recs (prefix)
+    const char * prefix;
 {
   ProcRec*     current_proc;
-  StringTable* result;
-  char**       current_entry;
+  ProcRec**    result;
+  ProcRec**    current_entry;
   int          index;
   int          x_size;
   char*        infos;
   unsigned pfxlen;
-  x_size = sizeof(char*) * (proc_count + 1);
-  result = (StringTable*) xmalloc(x_size);
-  if (result != Null) {
-    if (prefix)
-      pfxlen = strlen(prefix);
-    current_entry = (char**) result;
-    for (index = 0; index < PROC_DICT_SIZE; index++) {
-      current_proc = proc_dict[index];
-      while(current_proc != Null) {
-	if (prefix) {
-	  if (strncmp(current_proc->_name, prefix, pfxlen)) {
-	    current_proc = current_proc->_next;
-	    continue;
-	  }
-	  (*current_entry) = (char *) current_proc;
-	}
-	else
-	  (*current_entry) = current_proc->_name;
-	infos = current_proc->_name - PROC_PLENGTH + 1;
-	if (current_proc->_decl & STATIC_PROC)
-	  infos[0] = 's';
-	if (current_proc->_decl & INLINE_PROC)
+
+  x_size = sizeof(ProcRec *) * (proc_count + 1);
+  result = xmalloc(x_size);
+  if (result == Null)
+    return NULL;
+
+  pfxlen = strlen(prefix);
+  current_entry = result;
+  for (index = 0; index < PROC_DICT_SIZE; index++) {
+    for (current_proc = proc_dict[index]; current_proc != Null;
+         current_proc = current_proc->_next) {
+      if (strncmp(current_proc->_name, prefix, pfxlen))
+	continue;
+      (*current_entry) = current_proc;
+      infos = current_proc->_name - PROC_PLENGTH + 1;
+      if (current_proc->_decl & STATIC_PROC)
+	infos[0] = 's';
+      if (current_proc->_decl & INLINE_PROC)
 	  infos[1] = 'I';
-	if (current_proc->_decl & TEMPLATE_PROC)
+      if (current_proc->_decl & TEMPLATE_PROC)
 	  infos[2] = 'T';
-	if ((current_proc->_decl & STATIC_PROC) &&
+      if ((current_proc->_decl & STATIC_PROC) &&
 	    (Hide_Bits & HideStaticFunctions)) {
 	  current_proc->_hide |= HideStaticFunctions;
 	  HIDE(current_proc->_name);
-	}
-	else
-	  current_proc->_hide &= ~HideStaticFunctions;
-	if (current_proc->_hide & UserHide)
-	  HIDE(current_proc->_name);
-	else if (! current_proc->_hide)
-	  SHOW(current_proc->_name);
-
-	current_entry++;
-	current_proc = current_proc->_next;
       }
+      else
+	current_proc->_hide &= ~HideStaticFunctions;
+      if (current_proc->_hide & UserHide)
+	HIDE(current_proc->_name);
+      else if (! current_proc->_hide)
+	SHOW(current_proc->_name);
+
+      current_entry++;
     }
-    (*current_entry) = Null;
-    if (prefix) {
-      if (! *result) {
-	free(result);
-	return 0;
+  }
+  if (current_entry == result) {
+    free(result);
+    return NULL;
+  }
+  (*current_entry) = Null;
+  return(result);
+}
+
+
+/*------------------------------------------------------------------------------
+*/
+StringTable get_procs_list ()
+{
+  ProcRec*     current_proc;
+  StringTable  result;
+  char**       current_entry;
+  int          index;
+  int          x_size;
+  char*        infos;
+
+  x_size = sizeof(char*) * (proc_count + 1);
+  result = xmalloc(x_size);
+  if (result == Null)
+    return NULL;
+
+  current_entry = result;
+  for (index = 0; index < PROC_DICT_SIZE; index++) {
+    for (current_proc = proc_dict[index]; current_proc != Null;
+         current_proc = current_proc->_next) {
+      (*current_entry) = current_proc->_name;
+      infos = current_proc->_name - PROC_PLENGTH + 1;
+      if (current_proc->_decl & STATIC_PROC)
+	infos[0] = 's';
+      if (current_proc->_decl & INLINE_PROC)
+	  infos[1] = 'I';
+      if (current_proc->_decl & TEMPLATE_PROC)
+	  infos[2] = 'T';
+      if ((current_proc->_decl & STATIC_PROC) &&
+	    (Hide_Bits & HideStaticFunctions)) {
+	  current_proc->_hide |= HideStaticFunctions;
+	  HIDE(current_proc->_name);
       }
+      else
+	current_proc->_hide &= ~HideStaticFunctions;
+      if (current_proc->_hide & UserHide)
+	HIDE(current_proc->_name);
+      else if (! current_proc->_hide)
+	SHOW(current_proc->_name);
+
+      current_entry++;
     }
-    else
-      qsort(result, proc_count, sizeof(char*), sort_util);
   }
+  (*current_entry) = Null;
+  qsort(result, proc_count, sizeof(char*), sort_util);
   return(result);
 }
@@ -800,5 +882,5 @@ StringTable* get_procs_list (prefix)
 */
 Position* get_proc_impl (proc_name)
-    char* proc_name;
+    const char* proc_name;
 {
   Position*     result;
@@ -811,5 +893,5 @@ Position* get_proc_impl (proc_name)
   if (   (current_proc != Null)
       && (current_proc->_impl_file != Null)
-      && ((result = (Position*) xmalloc(x_size)) != Null)) {
+      && ((result = xmalloc(x_size)) != Null)) {
     result->file_name   = current_proc->_impl_file->_name;
     result->line_number = current_proc->_impl_line;
@@ -819,67 +901,101 @@ Position* get_proc_impl (proc_name)
 
 
+/*------------------------------------------------------------------------------
+*/
+GlobalRec** get_globals_recs(prefix)
+    const char * prefix;
+{
+  GlobalRec*   current_global;
+  GlobalRec**  result;
+  GlobalRec**  current_entry;
+  int          index;
+  int          x_size;
+  char*        infos;
+  unsigned pfxlen;
+
+  x_size = sizeof(GlobalRec*) * (global_count + 1);
+  result = xmalloc(x_size);
+  if (result == Null)
+    return NULL;
+  if (prefix)
+    pfxlen = strlen(prefix);
+  current_entry = result;
+  for (index = 0; index < GLOBAL_DICT_SIZE; index++) {
+    for (current_global = global_dict[index]; current_global != Null;
+         current_global = current_global->_next) {
+      if (strncmp(current_global->_name, prefix, pfxlen))
+	continue;
+      (*current_entry) = current_global;
+      infos = current_global->_name - GLOBAL_PLENGTH + 1;
+      if (current_global->_static) {
+        *(infos) = 's';
+        if (Hide_Bits & HideStaticGlobals)
+          current_global->_hide |= HideStaticGlobals;
+        else
+          current_global->_hide &= ~HideStaticGlobals;
+        HIDE(current_global->_name);
+      }
+      else {
+        current_global->_hide &= ~HideStaticGlobals;
+        *(infos) = ' ';
+      }
+      if (current_global->_hide & UserHide)
+        HIDE(current_global->_name);
+      else if (! current_global->_hide)
+        SHOW(current_global->_name);
+      current_entry++;
+    }
+  }
+  if (result == current_entry) {
+    free(result);
+    return NULL;
+  }
+  (*current_entry) = Null;
+  return(result);
+}
+
 
 /*------------------------------------------------------------------------------
 */
-StringTable* get_globals_list(prefix)
-    char * prefix;
+StringTable get_globals_list()
 {
   GlobalRec*   current_global;
-  StringTable* result;
+  StringTable  result;
   char**       current_entry;
   int          index;
   int          x_size;
   char*        infos;
-  unsigned pfxlen;
 
   x_size = sizeof(char*) * (global_count + 1);
-  result = (StringTable*) xmalloc(x_size);
-  if (result != Null) {
-    if (prefix)
-      pfxlen = strlen(prefix);
-    current_entry = (char**) result;
-    for (index = 0; index < GLOBAL_DICT_SIZE; index++) {
-      current_global = global_dict[index];
-      while(current_global != Null) {
-	if (prefix) {
-	  if (strncmp(current_global->_name, prefix, pfxlen)) {
-	    current_global = current_global->_next;
-	    continue;
-	  }
-	  (*current_entry) = (char *) current_global;
-	}
-	else
-	  (*current_entry) = current_global->_name;
-	infos = (*current_entry) - GLOBAL_PLENGTH + 1;
-	if (current_global->_static) {
-	  *(infos) = 's';
-	  if (Hide_Bits & HideStaticGlobals)
-	    current_global->_hide |= HideStaticGlobals;
-	  else
-	    current_global->_hide &= ~HideStaticGlobals;
-	  HIDE(current_global->_name);
-	}
-	else {
-	  current_global->_hide &= ~HideStaticGlobals;
-	  *(infos) = ' ';
-	}
-	if (current_global->_hide & UserHide)
-	  HIDE(current_global->_name);
-	else if (! current_global->_hide)
-	  SHOW(current_global->_name);
-	current_entry++;
-	current_global = current_global->_next;
+  result = xmalloc(x_size);
+  if (result == Null)
+    return NULL;
+  current_entry = result;
+  for (index = 0; index < GLOBAL_DICT_SIZE; index++) {
+    for (current_global = global_dict[index]; current_global != Null;
+         current_global = current_global->_next) {
+      (*current_entry) = current_global->_name;
+      infos = current_global->_name - GLOBAL_PLENGTH + 1;
+      if (current_global->_static) {
+        *(infos) = 's';
+        if (Hide_Bits & HideStaticGlobals)
+          current_global->_hide |= HideStaticGlobals;
+        else
+          current_global->_hide &= ~HideStaticGlobals;
+        HIDE(current_global->_name);
       }
-    }
-    (*current_entry) = Null;
-    if (prefix) {
-      if (! *result) {
-	free(result);
-	return 0;
+      else {
+        current_global->_hide &= ~HideStaticGlobals;
+        *(infos) = ' ';
       }
+      if (current_global->_hide & UserHide)
+        HIDE(current_global->_name);
+      else if (! current_global->_hide)
+        SHOW(current_global->_name);
+      current_entry++;
     }
-    else
-      qsort(result, global_count, sizeof(char*), sort_util);
   }
+  (*current_entry) = Null;
+  qsort(result, global_count, sizeof(char*), sort_util);
   return(result);
 }
@@ -889,5 +1005,5 @@ StringTable* get_globals_list(prefix)
 */
 Position* get_global_impl (global_name)
-    char* global_name;
+    const char* global_name;
 {
   Position*     result;
@@ -900,5 +1016,5 @@ Position* get_global_impl (global_name)
   if (   (current_global != Null)
       && (current_global->_impl_file != Null)
-      && ((result = (Position*) xmalloc(x_size)) != Null)) {
+      && ((result = xmalloc(x_size)) != Null)) {
     result->file_name   = current_global->_impl_file->_name;
     result->line_number = current_global->_impl_line;
@@ -911,5 +1027,5 @@ Position* get_global_impl (global_name)
 */
 void parse_file(file_name)
-     char* file_name;
+     const char* file_name;
 {
   parsed_file = find_file(file_name);
@@ -932,5 +1048,5 @@ void parse_file(file_name)
 */
 void delete_file(file_name)
-     char* file_name;
+     const char* file_name;
 {
   if ((file_name == Null) || (find_file(file_name) != Null)) {
@@ -1009,11 +1125,7 @@ void browser_show_all()
 */
 void BrowserHide(selected_class_name)
-    char * selected_class_name;
+    const char * selected_class_name;
 {
-  FCT (void, ClearListBox, () );
-  FCT (void, FillList, (char *str) );
-  FCT (char *, SelectFromListBox, (char *msg) );
-
-  static char *msgs[] = {
+  static const char *msgs[] = {
     "show all",
     "show protected and private members",
@@ -1031,5 +1143,5 @@ void BrowserHide(selected_class_name)
     "hide children of selected class"
   };
-  char * str;
+  const char * str;
   ClassRec* parent =
     (selected_class_name) ? find_class(selected_class_name + CLASS_PLENGTH) : 0;
@@ -1053,5 +1165,5 @@ void BrowserHide(selected_class_name)
     FillList((parent->_hide & HideChildrenOf) ? msgs[12] : msgs[13]);
   
-  if (! (str = SelectFromListBox("Browser objects visibility")))
+  if ((str = SelectFromListBox()) == NULL)
     return;
   if (! strcmp(str, msgs[0]))
--- browser_eng.h	2002-11-24 08:09:17.000000000 -0500
+++ browser_eng.h	2014-12-27 03:07:55.000000000 -0500
@@ -42,4 +42,8 @@
 #define BROWSERENGINE_H
 
+#include "file_dict.h"
+#include "class_dict.h"
+#include "global_dict.h"
+#include "proc_dict.h"
 
 /*------------------------------------------------------------------------------
@@ -49,40 +53,42 @@
 //     structure de donnees alloue'e dynamiquement. Ce pointeur (et 
 //     uniquement lui) doit e^tre de'salloue' par un appel explicite
-//     a la fonction free().
+//     a la fonction free(void).
 //------------------------------------------------------------------------------
 */
 
-extern StringTable* get_files_list    ();
+extern StringTable get_files_list    (void);
 
 
-extern StringTable* get_classes_list  ();
+extern StringTable get_classes_list  (void);
 
-extern StringTable* get_parents_list  (/* char* class_name, int obj */);
+extern StringTable get_parents_list  (const char* class_name);
+extern ParentRec** get_parents_recs  (const char* class_name);
 
-extern StringTable* get_sons_list     (/* char* class_name */);
+extern StringTable get_sons_list     (const char* class_name);
 
-extern StringTable* get_methods_list  (/* char* class_name, int cut */);
+extern StringTable get_methods_list  (const char* class_name, int cut);
 
-extern StringTable* get_attributes_list  (/* char* class_name, int cut */);
+extern StringTable get_attributes_list(const char* class_name, int cut);
 
-extern Position*    get_class_decl    (/* char* class_name */);
+extern Position*    get_class_decl    (const char* class_name);
 
-extern Position*    get_method_decl   (/* char* class_name,
-				                          char* method_name */);
+extern Position*    get_method_decl   (const char* class_name,
+				       const char* method_name);
 
-extern Position*    get_method_impl   (/* char* class_name,
-				                          char* method_name */);
+extern Position*    get_method_impl   (const char* class_name,
+				       const char* method_name);
 
+extern StringTable get_procs_list    (void);
+extern ProcRec**   get_procs_recs    (const char * prefix);
 
-extern StringTable* get_procs_list    (/* char * prefix */);
+extern Position*   get_proc_impl     (const char* proc_name);
 
-extern Position*    get_proc_impl     (/* char* proc_name */);
+extern Position*   get_attribute_decl(const char* class_name,
+				      const char* method_name);
 
-extern Position*    get_attribute_decl   (/* char* class_name,
-				                          char* method_name */);
+extern StringTable get_globals_list  (void);
+extern GlobalRec** get_globals_recs  (const char * prefix);
 
-extern StringTable* get_globals_list    (/* char * prefix */);
-
-extern Position*    get_global_impl     (/* char* global_name */);
+extern Position*   get_global_impl   (const char* global_name);
 
 
@@ -92,9 +98,10 @@ extern Position*    get_global_impl     
 */
 
-extern void parse_file   (/* char* file_name */);
+extern void parse_file   (const char* file_name);
 
-extern void delete_file  (/* char* file_name */);
+extern void delete_file  (const char* file_name);
+extern void browser_show_all(void);
 
-extern void BrowserHide (/* char * selected_class_name */);
+extern void BrowserHide (const char * selected_class_name);
 
 #endif  /*  BROWSERENGINE_H  */
--- browser_eve.c	2006-11-16 03:56:00.000000000 -0500
+++ browser_eve.c	2014-12-27 01:26:08.000000000 -0500
@@ -58,4 +58,6 @@
 #endif
 
+#include <unistd.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -80,17 +82,19 @@
 #include "selection.h"
 #include "warn_box.h"
+#include "list_box.h"
+#include "mark_reg.h"
+#include "Smac/smacXcoral.h"
 
 #define S_DELAY 15000	  
 
 extern Browser br;
-extern char *b_name[];
+extern const char *b_name[];
 int flag_visit = False;
 
-FCT (static void, AddFiles, () );
-FCT (static void, SmacLibFiles, () );
-FCT (void, ButtonEdit, () );
+FCT (static void, AddFiles, (void) );
+FCT (static void, SmacLibFiles, (void) );
 FCT (static void, ButtonInVisitWindow, (BWin *bwin, XButtonEvent *ev) );
-FCT (static int, ClassSelect, (BWin *bwin) );
-FCT (static void, EditFile, (BWin *bwin, char *name) );
+FCT (static int, ClassSelect, (void) );
+FCT (static void, EditFile, (BWin *bwin, const char *name) );
 FCT (static int, FileSelect, (BWin *bwin) );
 FCT (static void, ManageFiles, (int op) );
@@ -101,13 +105,9 @@ FCT (static int, AttributeSelect, (BWin 
 FCT (static int, GlobalSelect, (BWin *bwin) );
 FCT (static void, RefreshBrowserWindow, (BWin *bwin) );
-FCT (void, RemoveFiles, (char *name) );
-FCT (void, SelectItem, (BWin *bwin, int x, int y, int i) );
-FCT (void, UpdateTitle, (char *name) );
-FCT (void, RefreshPpButton,() );
-FCT (static void, TitleVisit, (char *name) );
-FCT (static void, SmacLibFiles, () );
+FCT (static void, TitleVisit, (const char *name) );
+FCT (static void, SmacLibFiles, (void) );
 
 #if !HAVE_STRDUP
-extern FCT (char*, strdup, (char*) );
+extern FCT (char*, strdup, (const char*) );
 #endif
 
@@ -412,10 +412,9 @@ int ButtonBrowser ( ev )
 	    Display3D ( dpy, w, br.ts, br.bs, 1, 0 );
 	    if (br.mode->pp_flag) {
-	      FCT (extern char *, GetStringFromDB, (char *, int) );
-	      char * opt;
+	      const char * opt;
 	      
 	      if (br.mode->pp_options) {
 		InputStrSave(br.mode->pp_options, strlen(br.mode->pp_options));
-		InputStrPrevious(0);
+		InputStrPrevious();
 	      }
 	      if ((opt = GetStringFromDB("preproc. options ? ", 0)) == 0) {
@@ -440,5 +439,5 @@ int ButtonBrowser ( ev )
 	    char * class_name;
 	    
-	    class_name = (char *) GetCurrentLine ( br.tbw[W_CLASS].buf, &len);
+	    class_name = GetCurrentLine ( br.tbw[W_CLASS].buf, &len);
 	    class_name [len] = '\0';
 	    
@@ -571,5 +570,6 @@ static void ManageFiles ( op )
     
     if ( op == B_DEL ) {
-	char *del_filename, *tmp, *buf;
+	char *del_filename;
+	const char *tmp;
 	if ( br.tbw[W_FILES].select != 0 )  {
 	    HoleToLeft ( br.filebuf );
@@ -577,23 +577,18 @@ static void ManageFiles ( op )
 	      (void) MoveToLine ( br.filebuf, br.tbw[W_FILES].select - 1 );
 	    tmp = GetCurrentLine ( br.filebuf, &len  );
-	    *(tmp + len ) = '\0'; /* On vire le newline */
-	    del_filename =  (char *) malloc ( (unsigned) len + 2 );
-	    (void) strcpy ( del_filename, tmp );
-	    buf = (char *) malloc ( (unsigned) len + 64 );
-	    (void) sprintf ( buf, "Remove browser data for the selected file  [y/n] : "  );
-	    tmp = (char *) GetStringFromDB ( buf, False );
-	    if ( (tmp == 0) || (strncmp(tmp, "y", 1) == 0 )) 
+	    del_filename = malloc (len + 1);
+	    bcopy(tmp, del_filename, len);
+	    del_filename[len] = '\0'; /* On vire le newline */
+	    tmp = GetStringFromDB ("Remove browser data for the selected file  [y/n] : ", False);
+	    if (tmp == NULL || tmp[0] == 'y')
 	      RemoveFiles ( del_filename );
-	    else if ( strncmp ( tmp, "all",3) == 0 ) 
-	      RemoveFiles ( (char *) 0 );
-	    if ( del_filename != 0 )
-	      (void) free ( del_filename );
-	    if ( buf != 0 )
-	      (void) free ( buf );
+	    else if ( strncmp (tmp, "all",3) == 0 ) 
+	      RemoveFiles (NULL);
+	    (void) free ( del_filename );
 	}
 	else {
-	    tmp = (char *) GetStringFromDB ( "Remove all browser data [y/n] : ", True );
-	    if ( (tmp==0) || (strncmp(tmp, "y", 1)==0) || (strncmp(tmp, "all", 3)==0))
-	      RemoveFiles ((char *)0);
+	    tmp = GetStringFromDB ("Remove all browser data [y/n] : ", True );
+	    if (tmp == NULL || tmp[0] == 'y' || (strncmp(tmp, "all", 3) == 0))
+	      RemoveFiles (NULL);
 	}
     }
@@ -611,10 +606,10 @@ static void ManageFiles ( op )
 static void AddFiles ()
 {
-    char *s;
+    const char *s;
     struct stat st;
     
     (void) chdir ( br.dir );
     
-    s = (char *) SelectFileFromBox ( "Browser : Add Files" );
+    s = SelectFileFromBox ( "Browser : Add Files" );
     
     if ( (s != 0) && (strlen (s) != 0 ) && (*s != '\007') ) {
@@ -683,10 +678,7 @@ static void SmacLibFiles()
 */
 void RemoveFiles ( name )
-    char *name;
+    const char *name;
 {
-  char *tmp, *p;
-  int i, nbfiles;
-  int len;
-  
+
   if ( name != 0 ) {
     delete_file ( name );
@@ -722,9 +714,9 @@ void RemoveFiles ( name )
 */
 int GoodSuffix ( s )
-    char *s;
+    const char *s;
 {
-    char *end_name;
+    const char *end_name;
     
-    end_name = (char * ) strrchr ( (char *) s, '.' );
+    end_name = strrchr (s, '.');
     if ( end_name == 0 )
       return False;
@@ -819,5 +811,5 @@ void ButtonEdit ()
 {
     EdWin *ew;
-    char *filename;
+    const char *filename;
     extern EdWin *CreateWindow ();
     extern int _startup;
@@ -896,5 +888,5 @@ void SelectItem ( bwin, x, y, i )
     switch ( i ) {
     case W_CLASS:
-      if (ClassSelect(bwin)==True)
+      if (ClassSelect()==True)
 	object_flag = True;
       break;
@@ -939,13 +931,12 @@ void SelectItem ( bwin, x, y, i )
 **	Ouput :
 */
-static int ClassSelect ( bwin )
-    BWin *bwin;
+static int ClassSelect ()
 {
-    char  *class_name;
+    char *class_name;
     int len;
     Position *infos;
-    char **tmp;
+    StringTable tmp;
     
-    class_name = (char *) GetCurrentLine ( br.tbw[W_CLASS].buf, &len);
+    class_name = GetCurrentLine ( br.tbw[W_CLASS].buf, &len);
     class_name [len] = '\0';
     UpdateTitle ( class_name + CLASS_PLENGTH);
@@ -989,5 +980,5 @@ static int ClassSelect ( bwin )
     FirstPage ( br.tbw[W_ATTRIBUTES].text ); 
 
-    tmp = ( char **)  get_parents_list ( class_name, 0);
+    tmp = get_parents_list (class_name);
     KillText(dpy, br.tbw[W_PARENT].text);
     ExtractInfos ( tmp, W_PARENT );
@@ -1023,5 +1014,5 @@ static int ClassSelect ( bwin )
 */
 void UpdateTitle ( name )
-    char *name;
+    const char *name;
 {
 #ifdef WITH_BR_TITLE
@@ -1314,5 +1305,5 @@ static int ParentChildSelect ( bwin )
 static void EditFile ( bwin, name )
     BWin *bwin;
-    char *name;
+    const char *name;
 {
     TextCursorOff ( bwin -> text );
@@ -1345,5 +1336,5 @@ static void EditFile ( bwin, name )
 */
 static void TitleVisit ( name )
-    char *name;
+    const char *name;
 {
     if ( (name != 0) && strlen (name) != 0 ) {
@@ -1398,5 +1389,5 @@ static void ButtonInVisitWindow ( bwin, 
     }
     TextCursorOn ( bwin -> text );
-    selection_time = HandleSelection (bwin -> text, ev);
+    selection_time = HandleSelection (bwin -> text);
     if (bwin -> text -> selection -> select == True) {
       /* Il faut effacer la derniere selection si elle existe */
@@ -1700,3 +1691,2 @@ void BrowserClearSelection()
   }
 }
-
--- browser_eve.h	1997-03-18 08:32:58.000000000 -0500
+++ browser_eve.h	2014-12-27 01:22:00.000000000 -0500
@@ -48,11 +48,12 @@
 FCT (int , ExposeBrowser, (XEvent *ev) );
 FCT (int , ButtonBrowser, (XButtonEvent *ev) );
-FCT (int , ButtonBrowser, (XButtonEvent *ev) );
-FCT (int , GoodSuffix, (char *s) );
+FCT (void, ButtonEdit, (void) );
+FCT (int , GoodSuffix, (const char *s) );
 FCT (int , KeyPressInBrowser, (XKeyEvent *ev) );
-FCT (void , RefreshBrowserInfos, () );
-FCT (void, UpdateTitle, (char *name) );
+FCT (void, RefreshBrowserInfos, (void));
+FCT (void, UpdateTitle, (const char *name) );
 FCT (void, SelectItem, (BWin *bwin, int x, int y, int i) );
-FCT (void, RefreshPpButton,() );
+FCT (void, RefreshPpButton, (void));
+FCT (void, RemoveFiles, (const char *name) );
 
 #endif /* _BROWSER_EVE_H_ */
--- browser_init.c	2002-11-24 08:09:14.000000000 -0500
+++ browser_init.c	2014-12-27 03:08:31.000000000 -0500
@@ -99,5 +99,5 @@ extern Display  	*dpy;
 Browser		br;
 
-char *b_name[] = {
+const char *b_name[] = {
 	"Classes/Types",
  	"Parents",	"Children", "Methods",
@@ -106,5 +106,5 @@ char *b_name[] = {
 };
 
-FCT (static void, ParseDir, (char *path, char *currentdir) );
+FCT (static void, ParseDir, (const char *path, const char *currentdir) );
 FCT (static void, BrowserButtons, () );
 FCT (static void, BrowserTextWindows, () );
@@ -263,5 +263,5 @@ void InitBrowser ()
 **	Ouput :
 */
-char *GetBrowserModeName ()
+const char *GetBrowserModeName ()
 {
     return ( br.mode -> name );
@@ -276,5 +276,5 @@ char *GetBrowserModeName ()
 */
 static void ParseDir (path, currentdir )
-    char *path, *currentdir;
+    const char *path, *currentdir;
 {
     char *p, *dirlist, *buffer;
@@ -316,44 +316,4 @@ static void ParseDir (path, currentdir )
 }
 
-static void ParseDirold (path, currentdir )
-    char *path, *currentdir;
-{
-    char *p, *dirlist;
-    
-    dirlist  = (char *) malloc ( (unsigned) strlen (path) + 2 );
-    (void) strcpy ( dirlist, path );
-    p = dirlist;
-    
-    for (;;) {
-	while (*p && *p != ':') ++p;
-	if ((p - dirlist) == 0 ) {
-	    if ( *p == 0 ) /* liste vide */
-	      break;
-	}
-	else {
-	    if ( *p == 0 ) {
-		/* Une seule directorie ou derniere directorie a parser */
-		if ( strcmp ( dirlist, "." ) == 0 ) {
-		  LoadDir ( currentdir );
-		}
-		else 
-		  LoadDir ( dirlist );
-		break;
-	    } 
-	    else {
-		*p = 0;
-		if ( strcmp ( dirlist, "." ) == 0 )
-		  LoadDir ( currentdir );
-		else 
-		  LoadDir ( dirlist );
-	    }
-	}
-	p++;
-	if  (*p == 0 )
-	  break;
-	dirlist = p;      
-    }
-    (void) free ( p );
-}
 
 /*
@@ -366,5 +326,5 @@ static void ParseDirold (path, currentdi
 */
 void SetBrowserDir ( dirname )
-    char *dirname;
+    const char *dirname;
 {
     (void) strcpy ( br.dir, dirname );	
@@ -428,5 +388,5 @@ static void BrowserButtons ()
 */
 void LoadDir ( dir )
-    char *dir;
+    const char *dir;
 {
     DIR *dirp;
@@ -578,23 +538,22 @@ void SetInfos ()
 {
     if ( br.class_save != 0 )
-      (void) free ( (char *) br.class_save );
-    br.class_save = ( char **)  get_classes_list ();
+      free (br.class_save );
+    br.class_save = get_classes_list ();
     ExtractInfos ( br.class_save, W_CLASS );
     if (br.procs_save)
-      (void) free ((char *) br.procs_save);
-    br.procs_save = ( char **)  get_procs_list (0);
+      free (br.procs_save);
+    br.procs_save = get_procs_list();
     ExtractInfos (br.procs_save, W_PROC ); 
     
     if (br.globals_save)
-      (void) free ((char *) br.globals_save);
-    br.globals_save = ( char **)  get_globals_list (0);
+      free (br.globals_save);
+    br.globals_save = get_globals_list();
     ExtractInfos ( br.globals_save, W_GLOBALS ); 
     if ( br.files_save != 0 )
-      (void) free ( (char *) br.files_save );
-    br.files_save = (char **)  get_files_list ();
+      free (br.files_save);
+    br.files_save = get_files_list ();
     ExtractInfos ( br.files_save, W_FILES );
 }
 
-
 /*
 **	Function name : ExtractInfos
@@ -608,14 +567,14 @@ void SetInfos ()
 */
 void ExtractInfos ( names, type )
-    char **names;
+    char * const *names;
     int type;
 {
     int n;
-    char *infos_name;
+    const char *infos_name;
     BWin *bwin = &br.tbw[type];
     
-    if ( names != (char **) Null )  {
+    if (names != NULL)  {
 	ClearBuffer ( bwin -> buf );
-	while ( *names != (char *) Null ) {
+	while (*names != NULL) {
 	  if ((type == W_FILES) || (! HIDED(*names))) {
 	    switch ( type ) {
@@ -1027,5 +986,5 @@ static void ConfigMethod ()
     bwin -> x = B_INTER;
     bwin -> y = GetBWy(W_CLASS) + GetBWheight(W_CLASS) + B_INTER;
-      + br.button_height + ( 2 * B_INTER );
+    /* + br.button_height + ( 2 * B_INTER ); */
     bwin -> f_width = br.width - (3 * B_INTER) - GetBWwidth(W_FILES);
     bwin -> f_height = GetBWheight(W_FILES);
@@ -1335,3 +1294,3 @@ void RefreshBrowserControl ()
 	ConfigBrowser ( br.width, br.height );
     }
-}
+}
\ No newline at end of file
--- browser_init.h	2001-06-17 06:18:56.000000000 -0400
+++ browser_init.h	2014-12-27 01:02:55.000000000 -0500
@@ -134,22 +134,22 @@ typedef struct _Browser {
 
 
-FCT (void, InitBrowser, () );
-FCT (char *, GetBrowserModeName, () );
-FCT (void, SetBrowserDir, (char *) );
-
-FCT (void, LoadDir, (char *dir) );
-FCT (void, SetInfos, () );
-FCT (void, ExtractInfos, (char **names, int type) );
+FCT (void, InitBrowser, (void) );
+FCT (const char *, GetBrowserModeName, (void) );
+FCT (void, SetBrowserDir, (const char *) );
+
+FCT (void, LoadDir, (const char *dir) );
+FCT (void, SetInfos, (void) );
+FCT (void, ExtractInfos, (char * const *names, int type) );
 FCT (void, ConfigScroll, (BWin *bw) );
 
 FCT (void, ConfigBrowser, (int width, int height) );
 FCT (void, ConfigVisitWindow, (int width, int height) );
-FCT (void, DisplayBrowser, () );
-FCT (void, DisplayBrowserIfNeverMap,());
+FCT (void, DisplayBrowser, (void) );
+FCT (void, DisplayBrowserIfNeverMap, (void));
 
-FCT (void, UnmapBrowser, () );
+FCT (void, UnmapBrowser, (void) );
 FCT (void, SetBrowserMode, (Mode *mode) );
-FCT (void, RefreshBrowserControl, () );
-FCT (void, BrowserClearSelection, () );
+FCT (void, RefreshBrowserControl, (void) );
+FCT (void, BrowserClearSelection, (void) );
 
 #define GetBrowserFrame()	( br.frame )
--- browser_pars.c	2001-06-17 06:19:08.000000000 -0400
+++ browser_pars.c	2014-12-27 03:18:56.000000000 -0500
@@ -45,6 +45,9 @@
 #include <stdio.h>
 
+#include <X11/Xlib.h>
+
 #include "result_types.h"
 #include "file_dict.h"
+#include "parse.h"
 #include "proc_dict.h"
 #include "global_dict.h"
@@ -60,7 +63,6 @@ ClassRec* class_cache = Null;
 /*------------------------------------------------------------------------------
 */
-BrowserError add_proc_impl(proc_name, proc_type, impl_line,decl,hide)
-    char*      proc_name;
-    ProcType   proc_type;
+BrowserError add_proc_impl(proc_name, impl_line, decl, hide)
+    const char* proc_name;
     LineNumber impl_line;
     unsigned   decl;
@@ -69,5 +71,5 @@ BrowserError add_proc_impl(proc_name, pr
   ProcRec* current_proc;
   
-  current_proc = create_proc(proc_name, decl & STATIC_PROC, parsed_file);
+  current_proc = create_proc(proc_name, decl & STATIC_PROC, parsed_file->_name);
   if (current_proc != Null) {
     if (current_proc->_impl_file == Null) {
@@ -80,5 +82,5 @@ BrowserError add_proc_impl(proc_name, pr
     }
     else {
-      if ( OpVerbose () == True ) {
+      if (OpVerbose()) {
 	fprintf(stderr, "Browser :warning in %s line %d\n",
 		parsed_file->_name, impl_line);
@@ -97,5 +99,5 @@ BrowserError add_proc_impl(proc_name, pr
 */
 BrowserError add_global_impl(global_name, staticp, impl_line, hide)
-    char*      global_name;
+    const char*      global_name;
     int        staticp;
     LineNumber impl_line;
@@ -133,5 +135,5 @@ BrowserError add_global_impl(global_name
 */
 BrowserError add_class_decl(class_name, decl_line, decl, hide)
-    char*      class_name;
+    const char*      class_name;
     LineNumber decl_line;
     unsigned   decl;
@@ -203,6 +205,6 @@ static int inherits_itself(current_class
 
 BrowserError add_parent(class_name, parent_name, decl_line, scope)
-    char*      class_name;
-    char*      parent_name;
+    const char*      class_name;
+    const char*      parent_name;
     int        decl_line;
     ScopeType  scope; 
@@ -275,6 +277,6 @@ BrowserError add_parent(class_name, pare
 BrowserError add_method_decl(class_name, method_name, scope, decl, decl_line,
 			     hide)
-    char*      class_name; 
-    char*      method_name;
+    const char*      class_name; 
+    const char*      method_name;
     ScopeType  scope;
     int decl;
@@ -347,6 +349,6 @@ BrowserError add_method_decl(class_name,
 BrowserError add_method_impl(class_name, method_name, impl_line,
 			     hide)
-    char*      class_name;
-    char*      method_name;
+    const char*      class_name;
+    const char*      method_name;
     LineNumber impl_line;
     unsigned    hide;
@@ -410,6 +412,6 @@ BrowserError add_method_impl(class_name,
 BrowserError add_attribute_decl(class_name, attr_name, scope, decl, decl_line,
 				hide)
-    char*      class_name; 
-    char*      attr_name;
+    const char*      class_name; 
+    const char*      attr_name;
     ScopeType  scope;
     int	       decl;
--- browser_pars.h	1997-03-18 08:27:19.000000000 -0500
+++ browser_pars.h	2014-12-27 03:15:47.000000000 -0500
@@ -65,5 +65,5 @@ extern ClassRec* class_cache;
 */
 
-extern BrowserError add_file        (/* char*      file_name */);
+extern BrowserError add_file        (const char*   file_name);
 
 
@@ -73,42 +73,51 @@ extern BrowserError add_file        (/* 
 */
 
-extern BrowserError add_proc        (/* char*      proc_name,
+extern BrowserError add_proc        (const char*   proc_name,
                                         ProcType   proc_type,
                                         LineNumber impl_line,
-					unsigned   hide */);
+					unsigned   hide);
 
-extern BrowserError add_class       (/* char*      class_name,
+extern BrowserError add_class       (const char*   class_name,
                                         LineNumber decl_line,
-					unsigned   hide */);
+					unsigned   hide);
 
-extern BrowserError add_parent      (/* char*      class_name,
-                                        char*      parent_name,
+extern BrowserError add_parent      (const char*   class_name,
+                                        const char* parent_name,
                                         LineNumber decl_line,
-                                        ScopeType  scope */);
+                                        ScopeType  scope);
 
-extern BrowserError add_method_decl (/* char*      class_name, 
-                                        char*      method_name,
+extern BrowserError add_method_decl (const char*   class_name, 
+                                        const char* method_name,
                                         ScopeType  scope,
 					int decl,
                                         LineNumber decl_line,
-					unsigned   hide */);
+					unsigned   hide);
 
-extern BrowserError add_method_impl (/* char*      class_name,
-                                        char*      method_name,
+extern BrowserError add_method_impl (const char*   class_name,
+                                        const char* method_name,
                                         LineNumber impl_line,
-					unsigned   hide */);
+					unsigned   hide);
 
-extern BrowserError add_attribute_decl (/* char*      class_name, 
-                                        char*      attr_name,
+extern BrowserError add_attribute_decl (const char* class_name, 
+                                        const char* attr_name,
                                         ScopeType  scope,
 					int        decl,
                                         LineNumber decl_line,
-					unsigned   hide */);
+					unsigned   hide);
 
-extern BrowserError add_global_impl (/* char*	   global_name,
+extern BrowserError add_global_impl (const char*   global_name,
 				        int	   staticp,
 				        LineNumber impl_line,
-					unsigned   hide */);
+					unsigned   hide);
 
+extern BrowserError add_class_decl (const char*    global_name,
+					LineNumber decl_line,
+					unsigned   decl,
+					unsigned   hide);
+
+extern BrowserError add_proc_impl(const char *proc_name,
+					LineNumber impl_line,
+					unsigned   decl,
+					unsigned   hide);
 
 #endif    /*  BROWSERPARSE_H  */
--- browser_util.c	2001-06-17 06:19:08.000000000 -0400
+++ browser_util.c	2014-12-27 03:26:06.000000000 -0500
@@ -59,13 +59,11 @@
 /*------------------------------------------------------------------------------
 */
-char* xmalloc(size)
+void* xmalloc(size)
   int size;
 {
-  char* result;
+  void* result;
    
-  size = (size + 15) & 0xfffffff0;
-
-  result = (char *) malloc(size);
-  if (result == Null) {
+  result = malloc(size);
+  if (result == NULL) {
     fprintf(stderr, ">>>>>>  Browser Error\n");
     fprintf(stderr, "    >>  Memory exhausted\n");
@@ -78,8 +76,8 @@ char* xmalloc(size)
 */
 int sort_util(i,j)
-  char** i;
-  char** j;
+  const void *i;
+  const void *j;
 {
-  return(strcmp(*i, *j));
+  return(strcmp(*(const char **)i, *(const char **)j));
 }
 
--- browser_util.h	2002-11-24 14:01:02.000000000 -0500
+++ browser_util.h	2014-12-27 03:27:52.000000000 -0500
@@ -48,10 +48,10 @@
 */
 #define get_head_Rec(name, dict, dict_size, head)  {                   \
-  char*     current_char;                                              \
+  const char*     current_char;                                        \
   unsigned  g, h = 0;                                                  \
                                                                        \
   for (current_char = name; *current_char != '\0'; current_char++) {   \
     h = (h << 4) + (*current_char);                                    \
-    if (g = h & 0xf0000000) {                                          \
+    if ((g = h & 0xf0000000)) {                                          \
       h = h ^ (g >> 24);                                               \
       h = h ^ g;                                                       \
@@ -69,5 +69,5 @@
    char* cpy_name;                                                     \
                                                                        \
-   cpy_name       = ((char*) current) + sizeof(TypeRec) ;              \
+   cpy_name       = (char *)(current) + sizeof(TypeRec);               \
    strcpy(cpy_name, PREFIX);                                           \
    cpy_name      += PLENGTH;                                           \
@@ -138,19 +138,10 @@
 
 /*------------------------------------------------------------------------------
-//                    Quelques types d'usage divers
-//------------------------------------------------------------------------------
-*/
-#define False   ((0))
-#define True    ((!False))
-
-
-/*------------------------------------------------------------------------------
 //                    Quelques procedures d'usage divers
 //------------------------------------------------------------------------------
 */
-extern char* xmalloc     (/* int size  */);
+extern void* xmalloc     (int size);
 
-extern int sort_util     (/* char** i,
-                             char** j  */);
+extern int sort_util     (const void *, const void *);
 
 #endif    /*  BROWSERUTIL_H  */
--- buttons_bits.c	2008-01-08 12:27:21.000000000 -0500
+++ buttons_bits.c	2014-12-26 00:22:57.000000000 -0500
@@ -41,5 +41,7 @@
 	Les bitmaps pour les deplacements dans le buffer.
 */
-char head_bits[] = {
+#include "buttons_bits.h"
+
+const char head_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x04, 0x00, 0x20,
    0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0xc4, 0x06, 0x22,
@@ -49,5 +51,5 @@ char head_bits[] = {
    0x04, 0x00, 0x20, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char q_bits[] = {
+const char q_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x04, 0x00, 0x20,
    0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x44, 0x60, 0x23,
@@ -57,5 +59,5 @@ char q_bits[] = {
    0x04, 0x00, 0x20, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char np_bits[] = {
+const char np_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x04, 0x00, 0x20,
    0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x84, 0xc0, 0x20,
@@ -65,5 +67,5 @@ char np_bits[] = {
    0x04, 0x00, 0x20, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char down_bits[] = {
+const char down_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x04, 0x00, 0x20,
    0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x24, 0x10, 0x20,
@@ -73,5 +75,5 @@ char down_bits[] = {
    0x04, 0x00, 0x20, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char pp_bits[] = {
+const char pp_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x04, 0x00, 0x20,
    0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x84, 0x81, 0x20,
@@ -81,5 +83,5 @@ char pp_bits[] = {
    0x04, 0x00, 0x20, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char up_bits[] = {
+const char up_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x04, 0x00, 0x20,
    0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x04, 0x00, 0x20, 0x04, 0x08, 0x24,
@@ -93,5 +95,5 @@ char up_bits[] = {
 */
 
-char sb_up_bits[] = {
+const char sb_up_bits[] = {
    0x00, 0x00,
    0x60, 0x00,
@@ -109,5 +111,5 @@ char sb_up_bits[] = {
 };
 
-char sb_down_bits[] = {
+const char sb_down_bits[] = {
    0xff, 0x0f,
    0xff, 0x0f,
@@ -125,5 +127,5 @@ char sb_down_bits[] = {
 };
 
-char sb_up_bits_run[] = {
+const char sb_up_bits_run[] = {
    0x00, 0x00,
    0x60, 0x00,
@@ -141,5 +143,5 @@ char sb_up_bits_run[] = {
 };
 
-char sb_down_bits_run[] = {
+const char sb_down_bits_run[] = {
    0xff, 0x0f,
    0xff, 0x0f,
@@ -160,5 +162,5 @@ char sb_down_bits_run[] = {
 	Les bitmaps pour le toolbar
 */
-char logo_bits[] = {
+const char logo_bits[] = {
  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfe,0xff,0xff,0x1f,
@@ -171,5 +173,5 @@ char logo_bits[] = {
  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff };
 
-char bwlogo_bits[] = {
+const char bwlogo_bits[] = {
  0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x40,
@@ -182,5 +184,5 @@ char bwlogo_bits[] = {
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
 
-char xlogo32_bits[] = {
+const char xlogo32_bits[] = {
    0xff, 0x00, 0x00, 0xc0, 0xfe, 0x01, 0x00, 0xc0, 0xfc, 0x03, 0x00, 0x60,
    0xf8, 0x07, 0x00, 0x30, 0xf8, 0x07, 0x00, 0x18, 0xf0, 0x0f, 0x00, 0x0c,
@@ -195,5 +197,5 @@ char xlogo32_bits[] = {
    0x0c, 0x00, 0x80, 0x7f, 0x06, 0x00, 0x00, 0xff};
 
-char slogo_bits[] = {
+const char slogo_bits[] = {
  0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x30,0xb3,0xcf,0xb3,0xf3,0x30,
  0xde,0x6c,0xe6,0x82,0x31,0xcc,0x60,0x66,0xf0,0x31,0xcc,0x60,0x66,0x98,0x31,
@@ -202,5 +204,5 @@ char slogo_bits[] = {
  0x00,0x00,0x00,0x06 };
 
-char dired_bits[] = {
+const char dired_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -215,5 +217,5 @@ char dired_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char new_window_bits[] = {
+const char new_window_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -228,5 +230,5 @@ char new_window_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char save_bits[] = {
+const char save_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -241,5 +243,5 @@ char save_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char man_bits[] = {
+const char man_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x80, 0x00, 0x10,
@@ -254,5 +256,5 @@ char man_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char cut_bits[] = {
+const char cut_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -267,5 +269,5 @@ char cut_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char paste_bits[] = {
+const char paste_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x80, 0x01, 0x10,
@@ -280,5 +282,5 @@ char paste_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char c_bits[] = {
+const char c_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -293,5 +295,5 @@ char c_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char cplus_bits[] = {
+const char cplus_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -306,5 +308,5 @@ char cplus_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char java_bits[] = {
+const char java_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -319,5 +321,5 @@ char java_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char dlt_bits[] = {
+const char dlt_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -332,5 +334,5 @@ char dlt_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char latex_bits[] = {
+const char latex_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xfc, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
@@ -345,5 +347,5 @@ char latex_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char browser_bits[] = {
+const char browser_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0x40,
    0xfa, 0xf7, 0xdf, 0x5f, 0x0a, 0x14, 0x50, 0x50, 0xea, 0xd4, 0x51, 0x53,
@@ -358,5 +360,5 @@ char browser_bits[] = {
    0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
 
-char color_bits[] = {
+const char color_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10,
@@ -371,5 +373,5 @@ char color_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char top_bits[] = {
+const char top_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x0c, 0x00, 0x10,
@@ -384,5 +386,5 @@ char top_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char latex_util_bits[] = {
+const char latex_util_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10,
@@ -397,5 +399,5 @@ char latex_util_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char html_bits[] = {
+const char html_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10,
@@ -410,5 +412,5 @@ char html_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char rcs_bits[] = {
+const char rcs_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10,
@@ -423,5 +425,5 @@ char rcs_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char cmds_bits[] = {
+const char cmds_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10,
@@ -436,5 +438,5 @@ char cmds_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char cc_util_bits[] = {
+const char cc_util_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10,
@@ -449,5 +451,5 @@ char cc_util_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
-char undo_bits[] = {
+const char undo_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10,
@@ -465,5 +467,5 @@ char undo_bits[] = {
 	Le logo 32x32 de Xcoral
 */
-char icon_bits[] = {
+const char icon_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10,
@@ -480,5 +482,5 @@ char icon_bits[] = {
 	Le logo 64x64 de Xcoral
 */
-char icon_bits_old[] = {
+const char icon_bits_old[] = {
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0x03, 0x08, 0x40, 0x80, 0x00, 0x40, 0x00, 0xc0,
@@ -526,5 +528,5 @@ char icon_bits_old[] = {
 
 /* Les xpm */
-char *xpm_logo [] = {
+const char *xpm_logo [] = {
 "32 32 8 2",
 "_# c #008080",
@@ -569,5 +571,5 @@ char *xpm_logo [] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_dired_bits [] = {
+const char *xpm_dired_bits [] = {
 "32 32 113 2",
 ".a c #000000",
@@ -717,5 +719,5 @@ char *xpm_dired_bits [] = {
 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};
 
-char *xpm_new_window_bits [] = {
+const char *xpm_new_window_bits [] = {
 "32 32 10 2",
 "_a c #000000",
@@ -762,5 +764,5 @@ char *xpm_new_window_bits [] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_save_bits [] = {
+const char *xpm_save_bits [] = {
 "32 32 82 2",
 ".# c #000080",
@@ -879,5 +881,5 @@ char *xpm_save_bits [] = {
 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};
 
-char *xpm_cut_bits[] = {
+const char *xpm_cut_bits[] = {
 "32 32 7 2",
 "_a c #000000",
@@ -921,5 +923,5 @@ char *xpm_cut_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_paste_bits[] = {
+const char *xpm_paste_bits[] = {
 "32 32 184 2",
 "a1 c #000000",
@@ -1140,5 +1142,5 @@ char *xpm_paste_bits[] = {
 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};
 
-char *xpm_undo_bits[] = {
+const char *xpm_undo_bits[] = {
 "32 32 6 2",
 "_# c #000000",
@@ -1181,5 +1183,5 @@ char *xpm_undo_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_dlt_bits[] = {
+const char *xpm_dlt_bits[] = {
 "32 32 6 2",
 "_# c #000000",
@@ -1222,5 +1224,5 @@ char *xpm_dlt_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_c_bits[] = {
+const char *xpm_c_bits[] = {
 "32 32 2 2",
 "_. c #808080",
@@ -1259,5 +1261,5 @@ char *xpm_c_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_cplus_bits[] = {
+const char *xpm_cplus_bits[] = {
 "32 32 3 2",
 "_a c #00ff00",
@@ -1297,5 +1299,5 @@ char *xpm_cplus_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_java_bits[] = {
+const char *xpm_java_bits[] = {
 "32 32 15 2",
 "_d c #000000",
@@ -1347,5 +1349,5 @@ char *xpm_java_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_java_bitsOLD[] = {
+const char *xpm_java_bitsOLD[] = {
 "32 32 53 2",
 "_K c #424229",
@@ -1435,5 +1437,5 @@ char *xpm_java_bitsOLD[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_latex_bits[] = {
+const char *xpm_latex_bits[] = {
 "32 32 3 2",
 "_a c #000000",
@@ -1473,5 +1475,5 @@ char *xpm_latex_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_browser_bits[] = {
+const char *xpm_browser_bits[] = {
 "32 32 52 2",
 "_W c #000080",
@@ -1560,5 +1562,5 @@ char *xpm_browser_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_color_bits[] = {
+const char *xpm_color_bits[] = {
 "32 32 8 2",
 "_e c #00ff00",
@@ -1603,5 +1605,5 @@ char *xpm_color_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_top_bits[] = {
+const char *xpm_top_bits[] = {
 "32 32 360 2",
 "## c #000000",
@@ -1998,5 +2000,5 @@ char *xpm_top_bits[] = {
 "ce#6aC#P#Q.O.N.E.E.n.r.j.h.J.xdL.t.v.u.v.e.R.w.f.P.Yaa#F#QaDcRdh"};
 
-char *xpm_man_bits[] = {
+const char *xpm_man_bits[] = {
 "32 32 90 2",
 ".b c #21a510",
@@ -2123,5 +2125,5 @@ char *xpm_man_bits[] = {
 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};
 
-char *xpm_cc_util_bits[] = {
+const char *xpm_cc_util_bits[] = {
 "32 32 68 2",
 ".1 c #0000ff",
@@ -2226,5 +2228,5 @@ char *xpm_cc_util_bits[] = {
 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};
 
-char *xpm_latex_util_bits[] = {
+const char *xpm_latex_util_bits[] = {
 "32 32 201 2",
 ".Y c #141604",
@@ -2462,5 +2464,5 @@ char *xpm_latex_util_bits[] = {
 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};
 
-char *xpm_html_bits[] = {
+const char *xpm_html_bits[] = {
 "32 32 61 2",
 "_# c #000000",
@@ -2558,5 +2560,5 @@ char *xpm_html_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.."};
 
-char *xpm_rcs_bits[] = {
+const char *xpm_rcs_bits[] = {
 "32 32 50 2",
 "_a c #004000",
@@ -2643,5 +2645,5 @@ char *xpm_rcs_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_cmds_bits[] = {
+const char *xpm_cmds_bits[] = {
 "32 32 360 2",
 "## c #000000",
@@ -3039,5 +3041,5 @@ char *xpm_cmds_bits[] = {
 
 /* Les pixmap de deplacement dans le buffer */
-char *xpm_head_bits[] = {
+const char *xpm_head_bits[] = {
 "24 24 49 2",
 "_# c #000000",
@@ -3115,5 +3117,5 @@ char *xpm_head_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_q_bits[] = {
+const char *xpm_q_bits[] = {
 "24 24 31 2",
 "_a c #000000",
@@ -3173,5 +3175,5 @@ char *xpm_q_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_np_bits[] = {
+const char *xpm_np_bits[] = {
 "24 24 30 2",
 "_w c #003a00",
@@ -3230,5 +3232,5 @@ char *xpm_np_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_pp_bits[] = {
+const char *xpm_pp_bits[] = {
 "24 24 48 2",
 "_T c #003200",
@@ -3305,5 +3307,5 @@ char *xpm_pp_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_down_bits[] = {
+const char *xpm_down_bits[] = {
 "24 24 30 2",
 "_w c #003a00",
@@ -3362,5 +3364,5 @@ char *xpm_down_bits[] = {
 "_._._._._._._._._._._._._._._._._._._._._._._._."};
 
-char *xpm_up_bits[] = {
+const char *xpm_up_bits[] = {
 "24 24 48 2",
 "_T c #003200",
@@ -3440,5 +3442,5 @@ char *xpm_up_bits[] = {
 /* Les pixmap des boutons des scrollbar */
 
-char *xpm_sb_up_bits[] = {
+const char *xpm_sb_up_bits[] = {
 "16 12 5 0",
 "_. c #a0a0a0",
@@ -3460,5 +3462,5 @@ char *xpm_sb_up_bits[] = {
 "_c_f_f_f_f_f_f_f_f_f_f_f"};
 
-char *xpm_sb_down_bits[] = {
+const char *xpm_sb_down_bits[] = {
 "16 12 5 0",
 "_. c #a0a0a0",
@@ -3480,5 +3482,5 @@ char *xpm_sb_down_bits[] = {
 "_._._._._._c_f_._._._._."};
 
-char *xpm_sb_up_bits_run[] = {
+const char *xpm_sb_up_bits_run[] = {
 "16 12 5 0",
 "_. c #a0a0a0",
@@ -3500,5 +3502,5 @@ char *xpm_sb_up_bits_run[] = {
 "_c_f_f_f_f_f_f_f_f_f_f_f"};
 
-char *xpm_sb_down_bits_run[] = {
+const char *xpm_sb_down_bits_run[] = {
 "16 12 5 0",
 "_. c #a0a0a0",
--- buttons_bits.h	2003-02-05 02:55:10.000000000 -0500
+++ buttons_bits.h	2014-12-26 00:22:29.000000000 -0500
@@ -1,33 +1,33 @@
 #define logo_width 32
 #define logo_height 32
-extern unsigned char logo_bits[];
+extern const char logo_bits[];
 
 #define bwlogo_width 32
 #define bwlogo_height 32
-extern unsigned char bwlogo_bits[];
+extern const char bwlogo_bits[];
   
 #define head_width 24
 #define head_height 24
-extern unsigned char head_bits[];
+extern const char head_bits[];
 
 #define q_width 24
 #define q_height 24
-extern unsigned char q_bits[];
+extern const char q_bits[];
 
 #define np_width 24
 #define np_height 24
-extern unsigned char np_bits[];
+extern const char np_bits[];
 
 #define down_width 24
 #define down_height 24
-extern unsigned char down_bits[];
+extern const char down_bits[];
 
 #define pp_width 24
 #define pp_height 24
-extern unsigned char pp_bits[];
+extern const char pp_bits[];
 
 #define up_width 24
 #define up_height 24
-extern unsigned char up_bits[];
+extern const char up_bits[];
 
 extern char * bg_bpanel[];
@@ -35,131 +35,131 @@ extern char * bg_bpanel[];
 #define xlogo32_width 32
 #define xlogo32_height 32
-extern unsigned char xlogo32_bits[];
+extern const char xlogo32_bits[];
 
 #define slogo_width 40
 #define slogo_height 8
-extern unsigned char slogo_bits[];
+extern const char slogo_bits[];
 
 #define dired_width 32
 #define dired_height 32
-extern unsigned char dired_bits[];
+extern const char dired_bits[];
 
 #define new_window_width 32
 #define new_window_height 32
-extern unsigned char new_window_bits[];
+extern const char new_window_bits[];
 
 #define save_width 32
 #define save_height 32
-extern unsigned char save_bits[];
+extern const char save_bits[];
 
 #define man_width 32
 #define man_height 32
-extern unsigned char man_bits[];
+extern const char man_bits[];
 
 #define cut_width 32
 #define cut_height 32
-extern unsigned char cut_bits[];
+extern const char cut_bits[];
 
 #define paste_width 32
 #define paste_height 32
-extern unsigned char paste_bits[];
+extern const char paste_bits[];
 
 #define c_width 32
 #define c_height 32
-extern unsigned char c_bits[];
+extern const char c_bits[];
 
 #define cplus_width 32
 #define cplus_height 32
-extern unsigned char cplus_bits[];
+extern const char cplus_bits[];
 
 #define java_width 32
 #define java_height 32
-extern unsigned char java_bits[];
+extern const char java_bits[];
 
 #define dlt_width 32
 #define dlt_height 32
-extern unsigned char dlt_bits[];
+extern const char dlt_bits[];
 
 #define latex_width 32
 #define latex_height 32
-extern unsigned char latex_bits[];
+extern const char latex_bits[];
 
 #define latex_width 32
 #define latex_height 32
-extern unsigned char browser_bits[];
+extern const char browser_bits[];
 
 #define color_width 32
 #define color_height 32
-extern unsigned char color_bits[];
+extern const char color_bits[];
 
 #define top_width 32
 #define top_height 32
-extern unsigned char top_bits[];
+extern const char top_bits[];
 
 #define latex_util_width 32
 #define latex_util_height 32
-extern unsigned char latex_util_bits[];
+extern const char latex_util_bits[];
 
 #define html_width 32
 #define html_height 32
-extern unsigned char html_bits[];
+extern const char html_bits[];
 
 #define rcs_width 32
 #define rcs_height 32
-extern unsigned char rcs_bits[];
+extern const char rcs_bits[];
 
 #define cmds_width 32
 #define cmds_height 32
-extern unsigned char cmds_bits[];
+extern const char cmds_bits[];
 
 #define cc_util_width 32
 #define cc_util_height 32
-extern unsigned char cc_util_bits[];
+extern const char cc_util_bits[];
 
 #define undo_width 32
 #define undo_height 32
-extern unsigned char undo_bits[];
+extern const char undo_bits[];
 
 #define icon_width 32
 #define icon_height 32
-extern unsigned char icon_bits[];
+extern const char icon_bits[];
 
-extern unsigned char sb_up_bits[];
-extern unsigned char sb_down_bits[];
-extern unsigned char sb_up_bits_run[];
-extern unsigned char sb_down_bits_run[];
-
-extern unsigned char *xpm_logo[];
-
-extern unsigned char *xpm_dired_bits[];
-extern unsigned char *xpm_new_window_bits[];
-extern unsigned char *xpm_save_bits[];
-extern unsigned char *xpm_cut_bits[];
-extern unsigned char *xpm_paste_bits[];
-extern unsigned char *xpm_undo_bits[];
-extern unsigned char *xpm_dlt_bits[];
-extern unsigned char *xpm_c_bits[];
-extern unsigned char *xpm_cplus_bits[];
-extern unsigned char *xpm_java_bits[];
-extern unsigned char *xpm_latex_bits[];
-extern unsigned char *xpm_browser_bits[];
-extern unsigned char *xpm_color_bits[];
-extern unsigned char *xpm_top_bits[];
-extern unsigned char *xpm_man_bits[];
-extern unsigned char *xpm_cc_util_bits[];
-extern unsigned char *xpm_latex_util_bits[];
-extern unsigned char *xpm_html_bits[];
-extern unsigned char *xpm_rcs_bits[];
-extern unsigned char *xpm_cmds_bits[];
-
-extern unsigned char *xpm_head_bits[];
-extern unsigned char *xpm_q_bits[];
-extern unsigned char *xpm_np_bits[];
-extern unsigned char *xpm_down_bits[];
-extern unsigned char *xpm_pp_bits[];
-extern unsigned char *xpm_up_bits[];
-
-extern unsigned char *xpm_sb_up_bits[];
-extern unsigned char *xpm_sb_down_bits[];
-extern unsigned char *xpm_sb_up_bits_run[];
-extern unsigned char *xpm_sb_down_bits_run[];
+extern const char sb_up_bits[];
+extern const char sb_down_bits[];
+extern const char sb_up_bits_run[];
+extern const char sb_down_bits_run[];
+
+extern const char *xpm_logo[];
+
+extern const char *xpm_dired_bits[];
+extern const char *xpm_new_window_bits[];
+extern const char *xpm_save_bits[];
+extern const char *xpm_cut_bits[];
+extern const char *xpm_paste_bits[];
+extern const char *xpm_undo_bits[];
+extern const char *xpm_dlt_bits[];
+extern const char *xpm_c_bits[];
+extern const char *xpm_cplus_bits[];
+extern const char *xpm_java_bits[];
+extern const char *xpm_latex_bits[];
+extern const char *xpm_browser_bits[];
+extern const char *xpm_color_bits[];
+extern const char *xpm_top_bits[];
+extern const char *xpm_man_bits[];
+extern const char *xpm_cc_util_bits[];
+extern const char *xpm_latex_util_bits[];
+extern const char *xpm_html_bits[];
+extern const char *xpm_rcs_bits[];
+extern const char *xpm_cmds_bits[];
+
+extern const char *xpm_head_bits[];
+extern const char *xpm_q_bits[];
+extern const char *xpm_np_bits[];
+extern const char *xpm_down_bits[];
+extern const char *xpm_pp_bits[];
+extern const char *xpm_up_bits[];
+
+extern const char *xpm_sb_up_bits[];
+extern const char *xpm_sb_down_bits[];
+extern const char *xpm_sb_up_bits_run[];
+extern const char *xpm_sb_down_bits_run[];
--- class_dict.c	2002-11-24 08:34:48.000000000 -0500
+++ class_dict.c	2014-12-27 03:28:35.000000000 -0500
@@ -39,4 +39,6 @@
 
 
+#include <stdlib.h>
+
 #if HAVE_STRING_H
 #include <string.h>
@@ -66,5 +68,5 @@ int        class_count = 0;
 */
 ClassRec* create_class (class_name, decl)
-  char* class_name;
+  const char* class_name;
   unsigned decl;
 {
@@ -99,5 +101,5 @@ ClassRec* create_class (class_name, decl
 */
 ClassRec* find_class(class_name)
-  char* class_name;
+  const char* class_name;
 {
 	ClassRec**  head;
@@ -113,5 +115,5 @@ ClassRec* find_class(class_name)
 */
 void class_eraze_file(file_name)
-    char* file_name;
+    const char* file_name;
 {
   FileRec*   current_file;
@@ -214,5 +216,4 @@ void class_eraze_file(file_name)
 void class_eraze_marked_files()
 {
-  FileRec*   current_file;
   ClassRec ** pdict;
   
--- class_dict.h	2002-11-24 06:35:11.000000000 -0500
+++ class_dict.h	2014-12-22 02:21:59.000000000 -0500
@@ -144,7 +144,9 @@ extern int        class_count;
 */
 
-extern ClassRec*    create_class  (/* char* file_name */);
+extern ClassRec*    create_class  (const char* file_name, unsigned decl);
 
-extern ClassRec*    find_class    (/* char* file_name */);
+extern ClassRec*    find_class    (const char* file_name);
+extern void         class_eraze_marked_files(void);
+extern void         class_eraze_file(const char *file_name);
 
 #endif  /*  CLASSDICT_H  */
--- color_area.c	2002-09-03 02:54:33.000000000 -0400
+++ color_area.c	2014-12-27 05:31:58.000000000 -0500
@@ -60,4 +60,5 @@
 #include "color_area.h"
 #include "ie_func.h"
+#include "Smac/smacXcoral.h"
 
 extern Display *dpy;
@@ -70,7 +71,9 @@ extern Display *dpy;
 
 FCT (static void, InsertInsideElement, (Text *text, ColorElement *new_ce, ColorElement *ce) );
-FCT (static void, InsertWithRightElement, (Text *text, ColorElement *new_ce, ColorElement *ce) );
+FCT (static void, InsertWithRightElement, (ColorElement *new_ce, ColorElement *ce) );
 FCT (static void, InsertWithLeftElement, (Text *text, ColorElement *new_ce, ColorElement *ce) );
+#ifdef DEBUG
 FCT (static void, DisplayColorList, (Text *text) );
+#endif
 FCT (static void, CheckColorList, (Text *text, ColorElement *new_ce) );
 FCT (static ColorElement *, CreateColorElement, (int start, int end, unsigned long color ) );
@@ -81,4 +84,5 @@ FCT (static void, DecrColorList, (Text *
 static PrivateCmap pcmap[32];
 
+void
 InitPcmap ()
 {
@@ -101,5 +105,5 @@ void SetColorArea ( text, start, end, co
     Text *text;
     int start, end;
-    char *colorname;
+    const char *colorname;
 {
     ColorElement *new_ce, *tmp, *tmp1;
@@ -152,5 +156,5 @@ void SetColorArea ( text, start, end, co
 	text -> last_ce = new_ce;
 	text -> current_ce = new_ce;
-#ifdef DEBUG    
+#ifdef DEBUG
 	DisplayColorList (text);
 #endif /* DEBUG */    
@@ -181,5 +185,5 @@ void SetColorArea ( text, start, end, co
 	    if ( ((tmp = tmp -> previous) == 0)
 		|| (start > (tmp -> pos + tmp -> len -1))) {
-		InsertWithRightElement ( text, new_ce, tmp1);
+		InsertWithRightElement (new_ce, tmp1);
 		break;
 	    }
@@ -267,6 +271,5 @@ static void InsertWithLeftElement ( text
 **	Output :
 */
-static void InsertWithRightElement ( text, new_ce, ce)
-    Text *text;
+static void InsertWithRightElement (new_ce, ce)
     ColorElement *new_ce, *ce;
 {
@@ -310,5 +313,5 @@ static void InsertInsideElement (text, n
 	    (void) fprintf (stderr,"  InsertInsideElement 1 \n");
 #endif /* DEBUG */    
-	    InsertWithRightElement (text, new_ce, ce);
+	    InsertWithRightElement (new_ce, ce);
 	}
 	else {
@@ -321,5 +324,5 @@ static void InsertInsideElement (text, n
 	    ce -> pos += new_ce -> len;
 	    ce -> len -= new_ce -> len;
-	    InsertWithRightElement ( text, new_ce, ce );
+	    InsertWithRightElement (new_ce, ce);
 	}
     }
@@ -434,4 +437,5 @@ static void DeleteColorElement ( text, c
 
 
+#ifdef DEBUG
 /*
 **	Function name : DisplayColorList
@@ -459,11 +463,11 @@ static void DisplayColorList (text)
     /* On est bien sur le premier element de la liste */
     do {
-      (void) fprintf ( stderr, "DisplayColorList======tmp %d pos = %d len = %d\n",
+      (void) fprintf (stderr, "DisplayColorList======tmp %p pos = %d len = %d\n",
 		      tmp, tmp -> pos, tmp -> len );
       tmp = tmp -> next;
     } while (tmp != 0);
     (void) fprintf ( stderr, "\n");
-
 }
+#endif
 
 
@@ -770,5 +774,5 @@ void ColorLineInPage ( text, x, y, line,
     Text *text;
     int x, y, line;
-    char *s;
+    const char *s;
     int n;
 {
@@ -777,5 +781,5 @@ void ColorLineInPage ( text, x, y, line,
   ColorElement *tmp = 0;
   int nce, fnext, fprevious;
-  char *p;
+  const char *p;
   /* #define DEBUG */
   /* DEBUG */
--- color_area.h	2001-10-16 03:04:25.000000000 -0400
+++ color_area.h	2014-12-25 23:58:36.000000000 -0500
@@ -60,3 +60,5 @@ typedef struct _pcmap {
 } PrivateCmap;
 
+void InitPcmap(void);
+
 #endif /* _COLOR_AREA_H_ */
--- ctr_panel.c	2001-10-28 03:12:17.000000000 -0500
+++ ctr_panel.c	2014-12-26 01:47:54.000000000 -0500
@@ -64,9 +64,9 @@
 #include "page.h"
 #include "buttons_bits.h"
+#include "tbox.h"
 
 ButtonWindow bw [NB_BUTTONS];
 static ResourcesButton rs;
 extern Display *dpy;
-static Pixmap pix_panel [8];
 static XImage *im_panel [8];
 
@@ -116,25 +116,25 @@ void InitControlRes ( fg, bg, ts, bs )
     }
     if ((depth == 16)||(depth == 24)) {
-      im_panel [1] = (XImage *)LoadImage256 ((char **) xpm_up_bits);
+      im_panel [1] = LoadImage256 (xpm_up_bits);
       rs.up_pix = XCreatePixmap (dpy, DefaultRootWindow (dpy), 24, 24, depth);
       XPutImage (dpy, rs.up_pix, rs.mess_gc, im_panel [1], 0, 0, 0, 0, 24, 24);
       
-      im_panel [2] = (XImage *)LoadImage256 ((char **) xpm_down_bits);
+      im_panel [2] = LoadImage256 (xpm_down_bits);
       rs.down_pix = XCreatePixmap (dpy, DefaultRootWindow (dpy), 24, 24, depth);
       XPutImage (dpy, rs.down_pix, rs.mess_gc, im_panel [2], 0, 0, 0, 0, 24, 24);
 
-      im_panel [3] = (XImage *)LoadImage256 ((char **) xpm_np_bits);
+      im_panel [3] = LoadImage256 (xpm_np_bits);
       rs.np_pix = XCreatePixmap (dpy, DefaultRootWindow (dpy), 24, 24, depth);
       XPutImage (dpy, rs.np_pix, rs.mess_gc, im_panel [3], 0, 0, 0, 0, 24, 24);
 
-      im_panel [4] = (XImage *)LoadImage256 ((char **) xpm_pp_bits);
+      im_panel [4] = LoadImage256 (xpm_pp_bits);
       rs.pp_pix = XCreatePixmap (dpy, DefaultRootWindow (dpy), 24, 24, depth);
       XPutImage (dpy, rs.pp_pix, rs.mess_gc, im_panel [4], 0, 0, 0, 0, 24, 24);
 
-      im_panel [5] = (XImage *)LoadImage256 ((char **) xpm_q_bits);
+      im_panel [5] = LoadImage256 (xpm_q_bits);
       rs.queue_pix = XCreatePixmap (dpy, DefaultRootWindow (dpy), 24, 24, depth);
       XPutImage (dpy, rs.queue_pix, rs.mess_gc, im_panel [5], 0, 0, 0, 0, 24, 24);
 
-      im_panel [6] = (XImage *)LoadImage256 ((char **) xpm_head_bits);
+      im_panel [6] = LoadImage256 (xpm_head_bits);
       rs.head_pix = XCreatePixmap (dpy, DefaultRootWindow (dpy), 24, 24, depth);
       XPutImage (dpy, rs.head_pix, rs.mess_gc, im_panel [6], 0, 0, 0, 0, 24, 24);
@@ -457,5 +457,5 @@ void ShowControlPanel ( mwin, width, hei
 void DisplayMessage ( mwin, s ) 
     MWin *mwin;
-    char *s;
+    const char *s;
 {
     if ( (s == 0) || (mwin == 0) )
--- ctr_panel.h	1998-09-20 12:33:15.000000000 -0400
+++ ctr_panel.h	2014-12-26 00:27:25.000000000 -0500
@@ -92,5 +92,5 @@ typedef struct _MWin {
 FCT (void, ClearMessageWindow, (MWin *mwin) );
 FCT (void, DeleteControlPanel, (MWin *mwin) );
-FCT (void, DisplayMessage, (MWin *mwin, char *) );
+FCT (void, DisplayMessage, (MWin *mwin, const char *) );
 FCT (int, ExposeInControlePanel, (Window w, MWin *mwin) );
 FCT (void, InitControlRes, (unsigned long fg, unsigned long bg, unsigned long ts, unsigned long bs) );
--- ctr_version.c	1997-03-19 11:51:20.000000000 -0500
+++ ctr_version.c	2014-12-27 05:26:33.000000000 -0500
@@ -43,4 +43,6 @@
 #include <X11/Xutil.h>
 #include "main_text.h"
+#include "ctr_version.h"
+#include "Smac/smacXcoral.h"
 
 /*
@@ -54,7 +56,7 @@ void CV_CheckIn ( text )
     Text *text;
 {
-  char *msg;
-  msg = (char *) ie_call_function ( text, "cv_check_in", 0, 0);
-  if ( msg != 0 )
+  const char *msg;
+  msg = ie_call_function (text, "cv_check_in", 0, 0);
+  if (msg != NULL)
     DisplayMessage ( text -> mwin, msg );
 }
--- dial_box.c	2001-10-22 14:22:06.000000000 -0400
+++ dial_box.c	2014-12-27 05:04:35.000000000 -0500
@@ -246,17 +246,15 @@ int ExposeDialogBox ( ev )
 **	Ouput :
 */
-char *GetStringFromDB ( prompt, one_char  )
-    char *prompt;
+const char *GetStringFromDB ( prompt, one_char  )
+    const char *prompt;
     int one_char;
 {
-    char *s;
+    const char *s;
     
     if ( one_char == True )
       display_ok = False;
 
-    if ( strlen (prompt) > 64 )
-      prompt [64] = '\0';
     (void) DisplayDialogBox ();
-    s = (char *) InputString ( dial_box.w_mb, dial_box.frame,
+    s = InputString ( dial_box.w_mb, dial_box.frame,
 	      dial_box.gc, dial_box.font, prompt , one_char );
     (void) UnmapDialogBox ();
--- dial_box.h	1997-01-24 09:55:13.000000000 -0500
+++ dial_box.h	2014-12-26 01:48:58.000000000 -0500
@@ -69,8 +69,8 @@ typedef struct _DBox {
 #define GetDialBoxFrame() (dial_box.frame)
 
-FCT (void, InitDialogBox, () );
+FCT (void, InitDialogBox, (void) );
 FCT (void, ConfigDialogBox, (int width, int height) );
 FCT (int, ExposeDialogBox, (XEvent *ev) );
-FCT (char *, GetStringFromDB, (char *prompt, int one_char) );
+FCT (const char *, GetStringFromDB, (const char *prompt, int one_char) );
 FCT (int, ButtonDialogBox, (XButtonEvent *ev) );
 
--- file_dict.c	2002-11-24 14:03:50.000000000 -0500
+++ file_dict.c	2014-12-27 03:31:18.000000000 -0500
@@ -45,4 +45,5 @@
 #endif
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "result_types.h"
@@ -65,5 +66,5 @@ char 	 Mark = 0;
 */
 FileRec* create_file (file_name)
-    char* file_name;
+    const char* file_name;
 {
   FileRec**  head;
@@ -88,5 +89,5 @@ FileRec* create_file (file_name)
 */
 FileRec* find_file(file_name)
-    char* file_name;
+    const char* file_name;
 {
   FileRec**  head;
@@ -102,5 +103,5 @@ FileRec* find_file(file_name)
 */
 void remove_file(file_name)
-    char* file_name;
+    const char* file_name;
 {
   FileRec **  head;
@@ -127,5 +128,5 @@ void remove_file(file_name)
 */
 void mark_remove_file(file_name)
-    char* file_name;
+    const char* file_name;
 {
   FileRec**  head;
--- file_dict.h	2002-11-24 09:40:51.000000000 -0500
+++ file_dict.h	2014-12-27 03:30:16.000000000 -0500
@@ -72,13 +72,13 @@ extern  int      file_count;
 */
 
-extern FileRec* create_file   (/* char* file_name */);
+extern FileRec* create_file   (const char* file_name);
 
-extern FileRec* find_file     (/* char* file_name */);
+extern FileRec* find_file     (const char* file_name);
 
-extern void     remove_file   (/* char* file_name */);
+extern void     remove_file   (const char* file_name);
 
-extern void 	mark_remove_file(/* char* file_name */);
+extern void 	mark_remove_file(const char* file_name);
 
-extern void     remove_marked_files();
+extern void     remove_marked_files(void);
 
 #endif  /*  FILEDICT_H  */
--- fs_box.c	2006-11-16 03:51:03.000000000 -0500
+++ fs_box.c	2014-12-27 15:01:32.000000000 -0500
@@ -40,4 +40,5 @@
 
 #include <stdio.h>
+#include <unistd.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -90,4 +91,7 @@
 #include "list_box.h"
 #include "warn_box.h"
+#include "text_cursor.h"
+#include "chars_cmds.h"
+#include "Smac/smac.h"
 
 #define S_DELAY 15000
@@ -96,15 +100,14 @@ extern Display *dpy;
 FBox fs_box;
 static  Atom fs_del;
-extern char  *getcwd();
 
 FCT (static int, LoadFilesAndDirs, (char * dir) );
 FCT (static void, MapFsBox, () );
 FCT (static int, NewCompare, (char ** s1, char ** s2) );
-FCT (static void, RefreshDirTitle, (char *dirname) );
+FCT (static void, RefreshDirTitle, (const char *dirname) );
 FCT (static void, RefreshDirsAndFiles, () );
 FCT (static void, RefreshFSTitleBox, () );
 FCT (static void, UnmapFsBox, () );
 
-static char *internal_dirname = 0;
+static char *internal_dirname = NULL;
 
 /*
@@ -292,8 +295,8 @@ static void UnmapFsBox ()
 **	Ouput :
 */
-char *SelectFileFromBox ( msg )
-    char *msg;
+const char *SelectFileFromBox ( msg )
+    const char *msg;
 {
-    char *s = 0;
+    const char *s = NULL;
     static char full_path_select [MAXPATHLEN];
 
@@ -302,5 +305,5 @@ char *SelectFileFromBox ( msg )
 	if ( strlen ( msg ) > (TITLE_SIZE - 2) ) {
 	    (void) strncpy ( fs_box.title_text, msg, TITLE_SIZE -1 );
-	    fs_box.title_text [TITLE_SIZE] = '\0';
+	    fs_box.title_text [TITLE_SIZE-1] = '\0';
 	}
 	else
@@ -318,5 +321,5 @@ char *SelectFileFromBox ( msg )
       XMapRaised ( dpy, fs_box.frame );
     
-    s = (char *) InputString ( fs_box.mb_frame, fs_box.frame, 
+    s = InputString ( fs_box.mb_frame, fs_box.frame, 
 			      fs_box.gc, fs_box.font, "File name : " , 0 );
     if ( (s != 0) && (*s == '~') )
@@ -324,5 +327,5 @@ char *SelectFileFromBox ( msg )
     (void) UnmapFsBox ();
 
-    if ( (s != 0) && (*s != '\007') && (*s != '/') ) {
+    if ( (s != NULL) && (*s != '\007') && (*s != '/') ) {
 	if ( (*s == '.') && (strlen(s) == 1) )
 	  (void) sprintf ( full_path_select, "%s", fs_box.dirname );
@@ -757,5 +760,5 @@ int ButtonFsBox ( ev )
 **	Output :
 */
-char *GetFsBoxInternalDir()
+const char *GetFsBoxInternalDir()
 {
     return (internal_dirname);
@@ -771,13 +774,13 @@ char *GetFsBoxInternalDir()
 */
 static void RefreshDirTitle ( dirname )
-    char *dirname;
+    const char *dirname;
 {
   int start, width;
-  char *old = dirname;
+  const char *old = dirname;
   
-  if(dirname) {
+  if (dirname) {
       if (internal_dirname)
 	free(internal_dirname);
-      internal_dirname = (char *) malloc(strlen(dirname) + 3);
+      internal_dirname = malloc(strlen(dirname) + 3);
       strcpy(internal_dirname, dirname);
 	if ( *internal_dirname == '/'  && strlen(internal_dirname) != 1) { /*pas la racine */
--- fs_box.h	2001-06-17 06:51:14.000000000 -0400
+++ fs_box.h	2014-12-26 01:19:07.000000000 -0500
@@ -89,7 +89,7 @@ FCT (int, ButtonFsBox, ( XButtonEvent * 
 FCT (void, ConfigFsBox, (int width, int height) );
 FCT (int, ExposeFsBox, (XEvent *ev) );
-FCT (void, InitFsBox, () );
-FCT (char *, GetFsBoxInternalDir, () );
-FCT (char *, SelectFileFromBox, (char *msg) );
+FCT (void, InitFsBox, (void) );
+FCT (const char *, GetFsBoxInternalDir, (void) );
+FCT (const char *, SelectFileFromBox, (const char *msg) );
 
 #endif /* _FS_BOX_H_ */
--- get_file.c	2000-04-12 15:37:22.000000000 -0400
+++ get_file.c	2014-12-27 23:35:37.000000000 -0500
@@ -85,9 +85,10 @@
 #include "ie_func.h"
 #include "selection.h"
+#include "BR_Global.h"
+#include "Smac/smac.h"
+#include "Smac/smacXcoral.h"
 
-FCT (static int, CheckFile, (char *path, int *len, Text *text) );
-FCT (static int, IsBinary, (FILE *fd, Text *text, int len) );
+FCT (static int, CheckFile, (const char *path, int *len, const Text *text) );
 FCT (static void, KillCurrentBuffer, (Text *text, int from) );
-FCT (static char*, MyStrerror,  ( int err ) );
 
 extern 	Display	*dpy;
@@ -106,5 +107,5 @@ void KbdReadFile ( text )
     Text *text;
 {
-    char *str, *color; 
+    const char *str; 
     Text *result;
     char c = '\007'; /* ^G */
@@ -161,5 +162,5 @@ void KbdInsertFile ( text )
     Text *text;
 {
-    char *str;
+    const char *str;
     char c = '\007'; /* ^G */
     int nbl, olen;
@@ -170,10 +171,10 @@ void KbdInsertFile ( text )
     str = GetString ( text, "Insert File : ", 0 );
     
-    if ( (str == 0) || (strncmp(str, &c, 1)) == 0 ) {
+    if ((str == NULL) || (strncmp(str, &c, 1)) == 0 ) {
 	DisplayMessage ( text -> mwin, "Abort" );
 	return;
     }
     if ( *str == '~' )
-      str = ExpandTildeName ( str );
+      str = ExpandTildeName (str);
     
     if (text -> selection -> select == True) {
@@ -228,5 +229,5 @@ void KbdInsertFile ( text )
 int LoadFile ( text, s, type )
     Text *text;
-    char *s;
+    const char *s;
     int type;
 {
@@ -235,5 +236,5 @@ int LoadFile ( text, s, type )
     Mode *mode;
     FILE *fd;
-    extern flag_visit;
+    extern int flag_visit;
     
 #ifdef DEBUG
@@ -246,8 +247,4 @@ int LoadFile ( text, s, type )
 	    return -1;
 	}
-	if ( IsBinary ( fd, text, len ) == True ) {
-	    (void) fclose ( fd );
-	    return -1;
-	}
 	rewind ( fd );
 	switch ( type ) {
@@ -300,11 +297,10 @@ int LoadFile ( text, s, type )
 void SetDirAndFilename ( text, name )
     Text *text;
-    char *name;
+    const char *name;
 {
     char *p;
     char *old_dir;
     char pathname [ MAXPATHLEN + 2];
-    extern char  *getcwd();
-    
+ 
     /*
      * Ici, name est un pathname valide. On doit utiliser le pathname
@@ -389,5 +385,5 @@ void KbdSaveFile ( text )
     Text *text;
 {
-    char   *name;
+    const char *name;
     char c = '\007';
     
@@ -498,5 +494,5 @@ void KbdWriteFile ( text )
     Text *text;
 {
-    char *s;
+    const char *s;
     char buf [256];
     char c = '\007';
@@ -521,8 +517,8 @@ void KbdWriteFile ( text )
     s = GetString ( text, buf, 0 );
 
-    if ( (s == 0) || ((strncmp(s,"y",1) == 0) &&(strlen(s)==1)) ) {
+    if (s == NULL || (s[0] == 'y' && s[1] == '\0')) {
 	WriteFile ( text );
     }
-    else if ( ((strncmp(s,"n",1 ) == 0)&&(strlen(s)==1)) || (strncmp(s,&c,1)==0) ) {
+    else if ((s[0] == 'n' && s[1] == '\0') || s[0] == c) {
 	DisplayMessage ( text -> mwin, "Abort" );
     }
@@ -556,7 +552,7 @@ void KbdWriteFile ( text )
 */
 static int CheckFile ( path, len, text )
-    char *path;
+    const char *path;
     int *len;	/* RETURN */
-    Text *text;
+    const Text *text;
 {
     struct stat st;
@@ -584,21 +580,4 @@ static int CheckFile ( path, len, text )
 
 /*
-**	Function name : IsBinary
-**
-**	Description : On verifie que le fichier n'est pas
-**		un binaire ou une archive.
-**	Input : Le stream associe, le text courant, la longueur du fichier.
-**	Ouput : Vrai si binaire Faux sinon.
-*/
-static int IsBinary ( fd, text, len )
-    FILE *fd;
-    Text *text;
-    int len;
-{
-  return False;
-}
-
-
-/*
 **	Function name : MenuReadFile
 **
@@ -610,6 +589,5 @@ void MenuReadFile ( text )
     Text *text;
 {
-    char *str = 0;
-    char *color;
+    const char *str;
     Text *result;
     char c = '\007'; /* ^G */
@@ -621,5 +599,5 @@ void MenuReadFile ( text )
     ClearMessageWindow ( text -> mwin );
 
-    str = (char *) SelectFileFromBox ( "Read File" );
+    str = SelectFileFromBox ("Read File");
     
     if ( (str == 0) || (strncmp(str, &c, 1)) == 0 ) {
@@ -726,5 +704,5 @@ void MenuSaveFile ( text )
     Text *text;
 {
-    char   *name;
+    const char *name;
     char c = '\007';
     
@@ -735,7 +713,7 @@ void MenuSaveFile ( text )
 
     if ( strcmp (text -> filename, "NoName") == 0 ) {
-	name = (char *) GetStringFromDB ( "Write file : ", False );
+	name = GetStringFromDB ("Write file : ", False);
 	
-	if ( (name == 0) || strncmp(name, &c,1) == 0 ) {
+	if (name == NULL || name[0] == c) {
 	    DisplayMessage ( text -> mwin, "Abort" );
 	    return;
@@ -782,5 +760,5 @@ void MenuWriteFile ( text )
     Text *text;
 {
-    char *s;
+    const char *s;
     char buf [256];
     char c = '\007';
@@ -1018,6 +996,6 @@ void LoadAndEvalFile ( text )
     Text *text;
 {
-    char *msg = 0;
-    char *s = 0;
+    const char *msg = NULL;
+    const char *s;
     char c = '\007';
 
@@ -1038,6 +1016,6 @@ void LoadAndEvalFile ( text )
       if ( *s == '~' )
 	s = ExpandTildeName ( s );
-	
-      msg = (char * ) ie_load_file ( text, s );
+
+      msg = ie_load_file ( text, s );
       update_cwd(nw);
     }
@@ -1090,7 +1068,4 @@ Text * update_cwd(win_id)
 }
 
-FCT (extern int, browser_dump,(char *));
-FCT (extern int, browser_restore,(char *));
-
 void MenuBrowserDump ( text )
     Text *text;
@@ -1129,5 +1104,5 @@ void MenuBrowserRestore ( text )
     Text *text;
 {
-    char *str;
+    const char *str;
     
     if (text) {
@@ -1139,7 +1114,7 @@ void MenuBrowserRestore ( text )
     }
 
-    str = (char *) SelectFileFromBox ( "Browser restore file" );
+    str = SelectFileFromBox ( "Browser restore file" );
     
-    if ((str == 0) || (*str == 7)) {
+    if (str == NULL || *str == 7) {
 	if (text)
 	  DisplayMessage ( text -> mwin, "Abort" );
@@ -1162,5 +1137,5 @@ void KbdBrowserDump ( text )
     Text *text;
 {
-    char *str;
+    const char *str;
     
     ClearMessageWindow ( text -> mwin );
@@ -1168,5 +1143,5 @@ void KbdBrowserDump ( text )
     str = GetString ( text, "Browser dump File : ", 0 );
     
-    if ((str == 0) || (*str == 7)) {
+    if (str == NULL || *str == 7) {
 	DisplayMessage ( text -> mwin, "Abort" );
 	return;
@@ -1187,5 +1162,5 @@ void KbdBrowserRestore ( text )
     Text *text;
 {
-    char *str;
+    const char *str;
     
     ClearMessageWindow ( text -> mwin );
@@ -1193,5 +1168,5 @@ void KbdBrowserRestore ( text )
     str = GetString ( text, "Restore File : ", 0 );
     
-    if ((str == 0) || (*str == 7)) {
+    if (str == NULL || *str == 7) {
 	DisplayMessage ( text -> mwin, "Abort" );
 	return;
@@ -1207,34 +1182,3 @@ void KbdBrowserRestore ( text )
     }
     TextCursorOn ( text );
-}
-
-
-/*---------------------------------------------------------------------
-*/
-static char*
-MyStrerror ( err )
-    int err;
-{
-#if HAVE_STRERROR
-   return strerror ( err );
-#elif HAVE_SYSERR || HAVE_STDIO_SYSERR
-#  if !HAVE_STDIO_SYSERR
-   extern char *sys_errlist[];
-   extern int sys_nerr;
-#  endif
-   static char buffer[32];
-   if (!err)
-     return "";
- 
-   if ((err > 0) && (err < sys_nerr))
-     return (char*) sys_errlist[err];
- 
-   sprintf (buffer, "Unknown error : %d", err);
-   return buffer;
-#else
-#if HAVE_PERROR
-   perror("System error in xcoral excution");
-#endif
-   return("<<< Error message unavailble >>>");
-#endif
-}
+}
\ No newline at end of file
--- get_file.h	1997-03-18 07:14:34.000000000 -0500
+++ get_file.h	2014-12-27 23:35:34.000000000 -0500
@@ -50,5 +50,5 @@ FCT (void, KbdWriteFile, (Text *text) );
 FCT (void, KillBuffer, (Text *text) );
 FCT (void, LoadAndEvalFile, (Text *text) );
-FCT (int, LoadFile, (Text *text, char *s, int type) );
+FCT (int, LoadFile, (Text *text, const char *s, int type) );
 FCT (void, MenuGotoLine, (Text *text) );
 FCT (void, MenuInsertFile, (Text *text) );
@@ -58,5 +58,5 @@ FCT (void, MenuSaveFile, (Text *text) );
 FCT (void, MenuWriteFile, (Text *text) );
 FCT (int, SaveCurrentBuffer, (Text *text, int from) );
-FCT (void, SetDirAndFilename, (Text *text, char *name) );
+FCT (void, SetDirAndFilename, (Text *text, const char *name) );
 FCT (void, WriteFile, (Text *text) );
 FCT (void, SetWindowName, (Text *text) );
--- global_dict.c	2002-11-24 14:03:30.000000000 -0500
+++ global_dict.c	2014-12-27 03:29:02.000000000 -0500
@@ -45,4 +45,5 @@
 #endif
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "result_types.h"
@@ -66,7 +67,7 @@ int global_count = 0;
 */
 GlobalRec* create_global(global_name, staticp, parsed_file)
-    char* global_name;
+    const char* global_name;
     int staticp;
-    char * parsed_file;
+    const char * parsed_file;
 {
   GlobalRec**  head;
@@ -99,5 +100,5 @@ GlobalRec* create_global(global_name, st
 */
 GlobalRec* find_global(global_name)
-  char* global_name;
+  const char* global_name;
 {
   GlobalRec**  head;
@@ -114,5 +115,5 @@ GlobalRec* find_global(global_name)
 */
 void global_eraze_file(file_name)
-    char * file_name;
+    const char * file_name;
 {
   FileRec * current_file;
--- global_dict.h	2002-11-24 05:32:35.000000000 -0500
+++ global_dict.h	2014-12-27 03:29:26.000000000 -0500
@@ -73,14 +73,11 @@ extern  int global_count;
 */
 
-extern GlobalRec*     create_global   (/* char* global */);
+extern GlobalRec*     create_global   (const char* global, int staticp, const char *filename);
 
-extern GlobalRec*     find_global     (/* char* global */);
+extern GlobalRec*     find_global     (const char* global);
 
-extern void           global_eraze_marked_files();
+extern void           global_eraze_marked_files(void);
+extern void           global_eraze_file(const char *file_name);
 
 
 #endif  /*  GLOBALDICT_H  */
-
-
-
-
--- handle_key.c	2005-12-20 03:58:50.000000000 -0500
+++ handle_key.c	2014-12-26 01:59:52.000000000 -0500
@@ -40,4 +40,5 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/Xlib.h>
 #include <X11/cursorfont.h>
@@ -256,5 +257,5 @@ Trans st_repeat [] = {
 
 int 	repeat_num = 0;	/* Pour les repetitions		*/
-static deletewindow = False;
+static int deletewindow = False;
 
 static KeySym	ksym;
@@ -491,5 +492,5 @@ static void f_ascii ( text, infos )
 	  (func) ( text );
 	  if ( InsideMacro ( text ) == True )
-	    LoadMacro ( text, func, (void *)infos->ch, repeat );
+	    LoadMacro (text, func, (void *)(intptr_t)infos->ch, repeat);
 	}
 	else if ( (type == EXTERN_FUNC) && (func != 0 )) {
@@ -516,5 +517,5 @@ static void f_ascii ( text, infos )
 	  f_impc ( text, (int) infos -> ch );
 	  if ( InsideMacro ( text ) == True )
-	    LoadMacro ( text, (void(*)()) f_impc, (void *) infos -> ch, repeat );
+	    LoadMacro ( text, (void(*)()) f_impc, (void *)(intptr_t)infos -> ch, repeat );
 	  SetTextModif ( text );	
 	}
@@ -558,6 +559,6 @@ static void f_ctrx ( text, infos )
       
       (func) ( text );
-      if ( (InsideMacro ( text ) == True) &&  ((int) func != (int) StartMacro) )
-	LoadMacro ( text, (void(*)()) func, (void *) infos -> ch, repeat );
+      if ( (InsideMacro ( text ) == True) &&  (func != StartMacro) )
+	LoadMacro ( text, (void(*)()) func, (void *)(intptr_t)infos -> ch, repeat );
     }
     else {
@@ -663,5 +664,5 @@ static void f_escape ( text, infos )
     (func) ( text );
     if ( InsideMacro ( text ) == True )
-      LoadMacro ( text, (void(*)()) func, (void *) infos -> ch, repeat );
+      LoadMacro ( text, (void(*)()) func, (void *)(intptr_t)infos -> ch, repeat );
   }	  
   else {
@@ -776,10 +777,10 @@ void GotoLine ( text )
     Text *text;
 {
-    char *str;
+    const char *str;
     char c = '\007';
     int n;
     
     TextCursorOff ( text );
-    str = (char *) GetString ( text, "Goto Line : ", 0 );
+    str = GetString ( text, "Goto Line : ", 0 );
     if ( (str == 0) || (strncmp (str, &c, 1 ) == 0) || ((n = atoi ( str )) == 0) )
       DisplayMessage ( text -> mwin, "Abort" );
@@ -843,6 +844,6 @@ void PlayMacro ( text )
 
 static void f_nothing ( text, infos )
-    Text *text;
-    InfosKey *infos;    
+    Text *text __attribute__((unused));
+    InfosKey *infos __attribute__((unused));
 {
 /*    (void) fprintf ( stderr, "Nothing\n" ); */
@@ -850,6 +851,6 @@ static void f_nothing ( text, infos )
 
 static void f_special ( text, infos )
-    Text *text;
-    InfosKey *infos;
+    Text *text __attribute__((unused));
+    InfosKey *infos __attribute__((unused));
 {
 /*    (void) fprintf ( stderr, "Special\n" ); */
@@ -870,5 +871,5 @@ void DisplayLineNumber( text )
     char tmp [64];
     int len, count, nc = GetNcFromLeft(text -> buf);
-    char *cl = GetCurrentLine(text->buf, &len);
+    const char *cl = GetCurrentLine(text->buf, &len);
     int i;
 
@@ -897,10 +898,10 @@ void DisplayLineNumber( text )
 */
 unsigned Xk_Code( name )
-    unsigned char * name;
+    const char * name;
 {
   unsigned i;
   
   for (i = 0; XKInfos[i].name; i += 1)
-    if (! strcasecmp(XKInfos[i].name, (char *) name))
+    if (! strcasecmp(XKInfos[i].name, name))
       /* appelle XK_ksym_to_code pour gerer les ksym egaux */
       return XK_ksym_to_code(XKInfos[i].xk_code);
--- handle_key.h	1997-05-12 09:03:33.000000000 -0400
+++ handle_key.h	2014-12-26 01:35:46.000000000 -0500
@@ -52,5 +52,5 @@ typedef struct _InfosKey {
 
 typedef struct _XKKey{
-  char * name;
+  const char * name;
   KeySym xk_code;
 } XKKey;
@@ -76,5 +76,5 @@ FCT (void, PlayMacro, (Text *text) );
 FCT (ST *, automate, (Text *text, XKeyEvent *event, ST *current_st) );
 
-FCT (unsigned, Xk_Code,(unsigned char *));
+FCT (unsigned, Xk_Code,(const char *));
 FCT (unsigned, XK_ksym_to_code,(KeySym ksym));
 
--- handle_menus.c	2001-02-03 15:10:36.000000000 -0500
+++ handle_menus.c	2014-12-26 01:59:21.000000000 -0500
@@ -39,4 +39,5 @@
 
 #include <stdio.h>
+#include <string.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -45,4 +46,6 @@
 #include "handle_menus.h"
 #include "shadow.h"
+#include "main_text.h"
+#include "main_events.h"
 
 extern XContext	SwContext;
@@ -208,7 +211,6 @@ static void HandleExposeMenu ( display, 
 {
   extern XEvent event;
-  char **str;
+  const char **str;
   int i;
-  XRectangle rec [2];
 #ifdef DEBUG
   ( void ) fprintf ( stderr, "HandleExpose w = %d\n",
@@ -433,6 +435,6 @@ static void show_item ( display, menu, i
 	       DEPTH_DOWN );
   
-  if ( menu -> w_last_item != 0 )
-  if ( menus_color == False ) 
+  if ( menu -> w_last_item != 0 ) {
+    if ( menus_color == False ) 
       XFillRectangle ( display,
 		      menu -> w_last_item,
@@ -442,9 +444,10 @@ static void show_item ( display, menu, i
 		      menu -> vmenu [n] -> width - ( 2 * menu -> width_relief ) - 6,
 		      menu -> h_item - ( 2 * menu -> width_relief ));
-  else
-    Display3D ( display, menu -> w_last_item,
+    else
+      Display3D ( display, menu -> w_last_item,
 	       menu -> top_sh, menu -> bot_sh,
 	       menu -> width_relief,
 	       DEPTH_UP );
+  }
   
   menu -> w_last_item = menu -> vmenu [n] -> w_item [i];
--- ie_func.c	2002-02-15 02:13:14.000000000 -0500
+++ ie_func.c	2014-12-27 03:48:01.000000000 -0500
@@ -42,4 +42,5 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #if HAVE_STRING_H
@@ -75,10 +76,10 @@ FCT (static void, MatchedAt, (Text *text
 **	Function name : ie_current_position
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput : Le numero de la position courante (debut = 0)
 */
-int  ie_current_position ( text ) 
-    Text *text;
+int  ie_current_position ( text )
+    const Text *text;
 {
     return ( text -> buf -> l_cur - text -> buf -> top );
@@ -88,10 +89,10 @@ int  ie_current_position ( text ) 
 **	Function name : ie_current_char
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput : Le caractere courant ou 0 si fin de fichier
 */
 char ie_current_char ( text )
-    Text *text;
+    const Text *text;
 {
     return ( ( (text -> buf -> r_cur) == text -> buf -> bottom ) ?
@@ -102,10 +103,10 @@ char ie_current_char ( text )
 **	Function name : ie_previous_char
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput : Le caractere precedent, 0 si debut de buffer.
 */
 char ie_previous_char ( text )
-    Text *text;
+    const Text *text;
 {
     return ( ( text -> buf -> l_cur <= text -> buf -> top ) ?
@@ -116,10 +117,10 @@ char ie_previous_char ( text )
 **	Function name : ie_next_char
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput : le caractere suivant, 0 en fin de fichier
 */
 char ie_next_char ( text )
-    Text *text;
+    const Text *text;
 {
     return ( ( text -> buf -> r_cur + 1) == text -> buf -> bottom ) ?
@@ -130,10 +131,10 @@ char ie_next_char ( text )
 **	Function name : ie_the_char
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput : le caractere correspondant a la position, 0 si erreur
 */
 char ie_the_char (text, p)
-    Text *text;
+    const Text *text;
     int p;
 {
@@ -160,21 +161,21 @@ char ie_the_char (text, p)
 **	Function name : ie_beginning_of_line
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput : la position du debut de ligne
 */
 int ie_beginning_of_line( text )
-    Text *text;
+    const Text *text;
 {
     int pos = ie_current_position ( text );
-    
+
     if (pos)
       pos -= GetNcFromLeft ( text -> buf );
-    
+
     return (pos);
-/*    
+/*
     return ( (ie_current_position ( text ) == 0) ? 0 :
 	    ie_current_position ( text ) - GetNcFromLeft ( text -> buf ));
-*/	    
+*/
 }
 
@@ -182,16 +183,16 @@ int ie_beginning_of_line( text )
 **	Function name : ie_end_of_line
 **
-**	Description : 
-**	Input :  
+**	Description :
+**	Input :
 **	Ouput : la position de la fin de ligne
 **         Position du return ou fin de fichier.
 */
 int ie_end_of_line ( text )
-    Text *text;
+    const Text *text;
 {
     if ( ie_current_char ( text ) == '\n' )
       return ( ie_current_position ( text ));
     else {
-	return ( ie_current_position ( text ) 
+	return ( ie_current_position ( text )
 		+ GetNcFromRight ( text -> buf ));
     }
@@ -201,12 +202,12 @@ int ie_end_of_line ( text )
 **	Function name : ie_at_end_of_file
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :  True si fin de fichier.
 */
 int ie_at_end_of_file ( text )
-    Text *text;
+    const Text *text;
 {
-    if ( ie_current_char ( text ) == 0 )
+    if ( ie_current_char ( text ) == '\0' )
       return True;
     else
@@ -217,10 +218,10 @@ int ie_at_end_of_file ( text )
 **	Function name : ie_end_of_file
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :  la position de la fin de fichier
 */
 int ie_end_of_file ( text )
-    Text *text;
+    const Text *text;
 {
     return ( ( text -> buf -> l_cur - text -> buf -> top ) +
@@ -489,10 +490,10 @@ void ie_replace_char ( text, c )
 **      Function name : ie_end_of_region
 **
-**      Description : 
-**      Input : 
+**      Description :
+**      Input :
 **      Ouput :
 */
 int ie_end_of_region ( text )
-    Text *text;
+    const Text *text;
 {
     return ( ie_current_position (text) -1);
@@ -655,19 +656,19 @@ void ie_blink ( text, pos )
 **	Function name : ie_cmd_shell
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_cmd_shell ( text, str )
     Text *text;
-    char *str;
+    const char *str;
 {
 #define BIG_LINE 2048
-    
+
     FILE *fd;
     char tmp[BIG_LINE];
     int len;
     int modif_flag = False;
-    
+
     if ( (fd = popen ( str,  "r")) == NULL ) {
 	(void) fprintf ( stderr, "popen error\n" );
@@ -716,11 +717,11 @@ static void MatchedAt ( text, c, lines, 
 **	Function name : ie_msearch
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_msearch (text, chars, end, direction)
     Text * text;
-    char * chars;
+    const char * chars;
     int end;
     int direction;
@@ -751,11 +752,10 @@ int ie_msearch (text, chars, end, direct
 **	Function name : ie_create_mode
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput : Le nouveau mode sinon 0.
 */
-Mode *ie_create_mode ( text, mode_name )
-    Text *text;
-    char *mode_name;
+Mode *ie_create_mode ( mode_name )
+    const char *mode_name;
 {
     if ( mode_name == 0 )
@@ -769,21 +769,20 @@ Mode *ie_create_mode ( text, mode_name )
 **	Function name : ie_set_mode_suffixes
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
-void ie_set_mode_suffixes ( text, mode_name, suf )
-    Text *text;
-    char *mode_name;
-    char *suf;
+void ie_set_mode_suffixes (mode_name, suf)
+    const char *mode_name;
+    const char *suf;
 {
     Mode *mode;
-    
+
     if ( (mode_name == 0) || (suf == 0))
       return;
-    
+
     if ( (mode = (Mode*) GetMode ( mode_name )) == 0 )
       return;
-    
+
     SetModeSuffixe ( mode, suf );
 }
@@ -793,12 +792,11 @@ void ie_set_mode_suffixes ( text, mode_n
 **	Function name : ie_set_mode_font
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
-void ie_set_mode_font ( text, mode_name, font_name )
-    Text *text;
-    char *mode_name;
-    char *font_name;
+void ie_set_mode_font (mode_name, font_name)
+    const char *mode_name;
+    const char *font_name;
 {
     Mode *mode;
@@ -806,13 +804,13 @@ void ie_set_mode_font ( text, mode_name,
     if ( (mode_name == 0) || (font_name == 0) )
       return;
-    
-    if ( (mode = (Mode*) GetMode ( mode_name )) == 0 )
+
+    if ( (mode = GetMode ( mode_name )) == 0 )
       return;
-     
+
     SetModeFont ( mode, font_name );
 }
 
-unsigned key_code( keys )
-    unsigned char *keys;
+static unsigned key_code( keys )
+    const char *keys;
 {
   if (keys[0] == '^')
@@ -848,9 +846,8 @@ unsigned key_code( keys )
 **	Ouput :
 */
-void ie_key_def ( text, mode_name, keys, func_name )
-	Text *text;
-	char *mode_name;
-	unsigned char *keys;
-	char *func_name;
+void ie_key_def (mode_name, keys, func_name)
+	const char *mode_name;
+	const char *keys;
+	const char *func_name;
 {
     Mode *mode;
@@ -978,11 +975,11 @@ void ie_key_def ( text, mode_name, keys,
     }
 }
-    
+
 int ie_last_key (text)
-    Text *text;
+    const Text *text;
 {
     extern int last_key;
- 
-    if ( text != 0 )
+
+    if (text != NULL)
       return (last_key);
     else
@@ -1009,10 +1006,10 @@ void ie_current_line_to_top ( text )
 **	Function name : ie_line_count
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_line_count ( text )
-    Text *text;
+    const Text *text;
 {
     return ( text -> lines_in_buf );
@@ -1023,10 +1020,10 @@ int ie_line_count ( text )
 **	Function name : ie_current_line
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_current_line ( text )
-    Text *text;
+    const Text *text;
 {
     return ( text -> no_current_line - 1 );
@@ -1036,20 +1033,20 @@ int ie_current_line ( text )
 **	Function name : ie_backward_search
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_backward_search ( text, str )
     Text *text;
-    char *str;
+    const char *str;
 {
     int newpos, oldpos;
     char *start,  *end;
     int len;
-    
+
     oldpos = GetNcFromRight ( text -> buf );
-    start = (char *) GetCurrentLine ( text -> buf, &len );
-    end = (char *) TopBuf ( text -> buf );
-    
+    start = GetCurrentLine ( text -> buf, &len );
+    end = TopBuf ( text -> buf );
+
     start += ( len -1);	/* On part de la fin de la ligne */
 
@@ -1061,9 +1058,9 @@ int ie_backward_search ( text, str )
 	}
     }
-    start = (char *) LeftBuf ( text -> buf ); /* Allons voir plus loin */
-    
+    start = LeftBuf ( text -> buf ); /* Allons voir plus loin */
+
     if ( (newpos=BmSearch ( start, str,  start - end, BACKWARD )) == -1 )
       return False;
-    
+
     ie_goto_char ( text, ie_current_position ( text ) - newpos );
 
@@ -1075,17 +1072,17 @@ int ie_backward_search ( text, str )
 **	Function name : ie_forward_search
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_forward_search ( text, str )
     Text *text;
-    char *str;
+    const char *str;
 {
     int newpos;
     char *start, *end;
-    
-    start = (char *) RightBuf ( text -> buf ); 
-    end = (char *) BottomBuf ( text -> buf );
+
+    start = RightBuf ( text -> buf );
+    end = BottomBuf ( text -> buf );
 
     if ( (newpos=BmSearch( start, str,  end -start, FORWARD )) != -1 ) {
@@ -1112,14 +1109,14 @@ int ie_forward_search ( text, str )
 **	Function name : ie_global_replace
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput : Le nombre de subtitutions.
 */
 int ie_global_replace ( text, old, new )
     Text *text;
-    char *old, *new;
+    const char *old, *new;
 {
     int i = 0;
-    
+
     if ( (old != 0) && (new != 0) && (strlen(old) != 0)) {
       if (strchr(old, '\n') || strchr(new, '\n')) {
@@ -1127,9 +1124,9 @@ int ie_global_replace ( text, old, new )
 	int pos = ie_current_position(text);
 	int lgo = strlen(old);
-	
+
 	while (ie_forward_search(text, old)) {
 	  int i;
-	  char * n;
-	  
+	  const char * n;
+
 	  for (i = 0; i != lgo; i += 1)
 	    ie_delete_char(text);
@@ -1137,5 +1134,5 @@ int ie_global_replace ( text, old, new )
 	    ie_insert_char(text, *n);
 	}
-	
+
 	ie_goto_char(text, pos);
       }
@@ -1154,11 +1151,11 @@ int ie_global_replace ( text, old, new )
 **	Function name : ie_read_file
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_read_file ( text, filename )
     Text *text;
-    char *filename;
+    const char *filename;
 {
     extern Display *dpy;
@@ -1193,11 +1190,11 @@ int ie_read_file ( text, filename )
 **	Function name : ie_insert_file
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_insert_file ( text, filename )
     Text *text;
-    char *filename;
+    const char *filename;
 {
     int nbl, olen;
@@ -1207,23 +1204,23 @@ int ie_insert_file ( text, filename )
     if (text -> selection -> select == True)
       ClearSelection(text, True);
-    
+
     TextCursorOff ( text );
     nbl = text -> lines_in_buf;
     olen = BottomBuf (text -> buf) - RightBuf (text -> buf);
-    
+
     if ( LoadFile ( text, filename,  INSERT ) != -1 ) {
-	SetTextModif ( text );		
-	SetAndDisplayPage ( text ); 
+	SetTextModif ( text );
+	SetAndDisplayPage ( text );
 	ShowScrollFrame ( dpy, text -> swin );
-	(void) MoveScrollBar ( dpy, text -> swin, 
+	(void) MoveScrollBar ( dpy, text -> swin,
 			      CURRENT, text -> no_current_line - text -> n1 - 1 );
 	x_len = (BottomBuf (text -> buf) - RightBuf (text -> buf)) - olen;
 	StoreInUndo ( text, RightBuf (text -> buf) , (char *) 0, x_len,
 		     text -> lines_in_buf - nbl, U_INSERT );
-    
+
 	/* Pour la couleur */
 	if ( text -> current_ce != 0 )
 	  (void) UpdateColorList ( text, x_len );
-	
+
 	TextCursorOn ( text );
 	text -> ie_mark = True;
@@ -1240,14 +1237,14 @@ int ie_insert_file ( text, filename )
 **	Function name : ie_file_select
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
-char *ie_file_select ( text )
+const char *ie_file_select ( text )
     Text *text;
 {
-    char *str;
+    const char *str;
     char c = '\007'; /* ^G */
-    
+
     if (text -> selection -> select == True){
       SetCurrentLine (text);
@@ -1255,6 +1252,6 @@ char *ie_file_select ( text )
     }
 
-    str = (char *) SelectFileFromBox ( "Select file from Smac." );
-    if ( (str == 0) || (strncmp(str, &c, 1)) == 0 ) {
+    str = SelectFileFromBox ( "Select file from Smac." );
+    if ( (str == NULL) || (strncmp(str, &c, 1)) == 0 ) {
 /*	if ( str != 0 )
 	  (void) free ( str ); */
@@ -1271,11 +1268,11 @@ char *ie_file_select ( text )
 **	Function name : ie_write_file
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 void ie_write_file ( text, filename )
     Text *text;
-    char *filename;
+    const char *filename;
 {
     extern int write_flag;
@@ -1309,15 +1306,9 @@ void ie_save_file ( text )
     Text *text;
 {
-    char *tmp;
-    
-    if (text -> filename) {
-      tmp = (char *) malloc(MAXPATHLEN+2);
-      (void) strcpy(tmp, text -> filename);
-    }
-    else
+
+    if (text->filename == NULL)
       return;
-    
-    (void) ie_write_file ( text, tmp );
-    (void) free(tmp);
+
+    (void) ie_write_file (text, text->filename);
 }
 
@@ -1325,10 +1316,10 @@ void ie_save_file ( text )
 **	Function name : ie_current_buffer_is_modified
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_current_buffer_is_modified ( text )
-    Text *text;
+    const Text *text;
 {
   return GetModif( text );
@@ -1339,13 +1330,13 @@ int ie_current_buffer_is_modified ( text
 **	Function name : ie_filename
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
-char *ie_filename ( text )
-    Text *text;
+const char *ie_filename ( text )
+    const Text *text;
 {
     if ( strcmp ( text -> filename, "NoName" ) == 0 )
-      return 0;
+      return NULL;
     else
       return ( text -> filename );
@@ -1356,10 +1347,10 @@ char *ie_filename ( text )
 **	Function name : ie_window_height
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_window_height ( text )
-    Text *text;
+    const Text *text;
 {
     return ( text -> lines_in_page );
@@ -1370,19 +1361,19 @@ int ie_window_height ( text )
 **	Function name : ie_window_width
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_window_width ( text, ch )
-    Text *text;
+    const Text *text;
     int ch;
 {
     char c = (char) ch;
-    
+
     int width = XTextWidth ( text -> font, &c, 1 );
-    
+
     if (width)
       return ( (text -> width - (2 * text -> x_or)) / width);
-    
+
     return (- ((text -> width - (2 * text -> x_or))));
 }
@@ -1391,10 +1382,10 @@ int ie_window_width ( text, ch )
 **	Function name : ie_current_window
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_current_window ( text )
-    Text *text;
+    const Text *text;
 {
     return ( text -> win_id );
@@ -1404,15 +1395,15 @@ int ie_current_window ( text )
 **	Function name : ie_new_window
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 int ie_new_window ( text )
-    Text *text;
+    const Text *text;
 {
     EdWin *tmp;
-    
+
     tmp = (EdWin *) CreateWindow ();
-    
+
     if ( tmp != 0 ) {
 	tmp -> text -> current_mode = (Mode *) GetMode ("default");
@@ -1421,8 +1412,8 @@ int ie_new_window ( text )
 	tmp -> text -> ie_mark = True;
 	(void) strcpy ( tmp -> text -> current_dir, text -> current_dir );
-	
+
 	WaitForMapped ( tmp -> text -> window, True );
-	StorePosition ( tmp -> text );   
-	
+	StorePosition ( tmp -> text );
+
 	return ( tmp -> text -> win_id );
     }
@@ -1436,14 +1427,13 @@ int ie_new_window ( text )
 **	Function name : ie_select_window
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
-Text *ie_select_window ( text, win_id )
-    Text *text;
+Text *ie_select_window (win_id)
     int win_id;
 {
     extern EdWin *TWin[];
-    
+
     if ( (win_id <0) || (win_id > (MAXWIN - 1)))
       return 0;
@@ -1523,15 +1513,15 @@ void ie_lower_window ( text )
 **	Function name : ie_raise_window
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 void ie_raise_window (text)
-    Text *text;
+    const Text *text;
 {
     extern Display *dpy;
-    
+
     int win_id = ie_current_window ( text );
-    
+
     if ( TWin [win_id] != 0 )
       XMapRaised ( dpy, text -> w_parent );
@@ -1542,35 +1532,35 @@ void ie_raise_window (text)
 **	Function name : ie_set_mode
 **
-**	Description : 
-**	Input : 
+**	Description :
+**	Input :
 **	Ouput :
 */
 void ie_set_mode ( text, name )
     Text *text;
-    char *name;
+    const char *name;
 {
     char *buf;
     Mode *new_mode = (Mode *) GetMode (name);
-    
+
     if ( new_mode == 0 ) {
-	buf = (char *) malloc ( (unsigned int) strlen (name) + 64 );
+	buf = malloc ( (unsigned int) strlen (name) + 64 );
 	(void) sprintf ( buf, "Warning : %s mode does not exist", name );
 	DisplayMessage ( text -> mwin, buf );
-	(void) free (buf);
+	free (buf);
 	return;
     }
-    
+
     if ( strcmp(text -> current_mode -> name, name) == 0 )
       return;
-    
+
     if ( strcmp ( name, "Shell" ) == 0 ) {
 	SetShellMode ( text );
 	return;
     }
-    
+
     if ( text -> shell_id != 0 )
       KillShell ( text );
     text -> current_mode = new_mode;
-    
+
     SetCtrMode ( text -> mwin, text -> current_mode );
     RefreshWindowMode ( text -> mwin );
@@ -1588,8 +1578,8 @@ void ie_set_mode ( text, name )
 void ie_set_font ( text, font_name )
     Text *text;
-    char *font_name;
+    const char *font_name;
 {
     XFontStruct *font;
-    
+
     if ((font = (XFontStruct *) XLoadQueryFont ( dpy, font_name )) == 0 ) {
       (void) DisplayWMessage ( "fontname unknown", "Change current font", True );
@@ -1612,8 +1602,8 @@ void ie_set_font ( text, font_name )
 int ie_re_search_forward ( text, regex )
     Text *text;
-    char *regex;
+    const char *regex;
 {
     int current_pos = ie_current_position(text);
-    
+
     int result = RE_Search ( regex, RightBuf(text->buf),
 			BottomBuf(text->buf) - RightBuf(text->buf) + 1, FORWARD);
@@ -1640,9 +1630,9 @@ int ie_re_search_forward ( text, regex )
 int ie_re_search_backward ( text, regex )
     Text *text;
-    char *regex;
+    const char *regex;
 {
     int result = RE_Search ( regex, TopBuf(text->buf),
 			    LeftBuf(text->buf) - TopBuf(text->buf) + 1, BACKWARD);
-  
+
     if ( result < 0 )
       return result;
@@ -1665,5 +1655,5 @@ int ie_re_search_backward ( text, regex 
 int ie_re_replace ( text, regex, newstring )
     Text *text;
-    char *regex, *newstring;
+    const char *regex, *newstring;
 {
     int result;
@@ -1685,5 +1675,5 @@ int ie_re_replace ( text, regex, newstri
 int ie_re_replace_match ( text, newstring )
     Text *text;
-    char *newstring;
+    const char *newstring;
 {
     int result = RE_ReplaceMatch ( text, newstring );
@@ -1699,6 +1689,5 @@ int ie_re_replace_match ( text, newstrin
 **	Output :
 */
-int ie_re_match_beginning ( text, n)
-    Text *text;
+int ie_re_match_beginning (n)
     int n;
 {
@@ -1713,6 +1702,5 @@ int ie_re_match_beginning ( text, n)
 **	Output :
 */
-int ie_re_match_end ( text, n)
-    Text *text;
+int ie_re_match_end (n)
     int n;
 {
@@ -1726,9 +1714,8 @@ int ie_re_match_end ( text, n)
 **	Input : La commande shell.
 **	Ouput : La resultat de la commande (sans le '\n') ou 0 si erreur.
-**        le resultat doit etre libere par le client.  
+**        le resultat doit etre libere par le client.
 */
-char *ie_shell_to_string ( text, str )
-    Text *text;
-    char *str;
+char *ie_shell_to_string (str)
+    const char *str;
 {
     FILE *fd;
@@ -1737,5 +1724,5 @@ char *ie_shell_to_string ( text, str )
     int len, t_len = 0;
     char *pp, *ptr = 0;
-    
+
     if ( (fd = popen ( str,  "r")) == NULL ) {
       (void) DisplayWMessage ( "Shell command", "Popen error", True );
@@ -1746,5 +1733,5 @@ char *ie_shell_to_string ( text, str )
 	while (fgets ( tmp,MAX_LINE, fd ) != 0 ) {
 	    len = strlen(tmp);
-	    pp = (char *) malloc ((unsigned) len+t_len+1);
+	    pp = malloc ((unsigned) len+t_len+1);
 	    bzero(pp, len+t_len+1);
 	    if(ptr && t_len)
@@ -1753,5 +1740,5 @@ char *ie_shell_to_string ( text, str )
 	    t_len += len;
 	    if (ptr)
-	      (void) free(ptr);
+	      free(ptr);
 	    ptr = pp;
 	}
@@ -1761,5 +1748,5 @@ char *ie_shell_to_string ( text, str )
     if ((ptr != 0) && ptr[strlen(ptr)-1] == '\n')
       ptr[strlen(ptr)-1] = 0;
-    
+
     return (ptr);
 }
@@ -1777,10 +1764,10 @@ void ie_set_mark ( text, pos )
 {
     int current;
-    
+
     if (pos <0)
       return;
 
     current = ie_current_position (text);
-    
+
     (void) ie_goto_char(text,pos);
     text -> markline = text -> no_current_line;
@@ -1840,8 +1827,8 @@ void ie_color_area ( text, start, end, c
     Text *text;
     int start, end;
-    char *colorname;
+    const char *colorname;
 {
     extern Display *dpy;
-    
+
     if ( DefaultDepth ( dpy, DefaultScreen ( dpy )) == 1 )
       return;
@@ -1928,5 +1915,5 @@ void ie_remove_colors ( text )
 */
 int ie_current_buffer_is_colored ( text )
-    Text *text;
+    const Text *text;
 {
   return (text->current_ce != 0);
@@ -1941,5 +1928,5 @@ int ie_current_buffer_is_colored ( text 
 */
 void ie_watch_on(text)
-    Text *text;
+    const Text *text;
 {
   WatchOn (text -> window);
@@ -1954,5 +1941,5 @@ void ie_watch_on(text)
 */
 void ie_watch_off(text)
-    Text *text;
+    const Text *text;
 {
   WatchOff (text -> window);
@@ -1966,6 +1953,5 @@ void ie_watch_off(text)
 **	Output :
 */
-void ie_usleep(text, t)
-    Text *text;
+void ie_usleep(t)
     int t;
 {
@@ -1984,9 +1970,9 @@ void ie_usleep(text, t)
 **	Output : le nom du mode courrant. (doit etre libere)
 */
-char *ie_current_mode(text)
+const char *ie_current_mode(text)
     Text *text;
 {
   if (text -> current_mode -> name)
-    return ((char *) text -> current_mode -> name);
+    return (text -> current_mode -> name);
   else
     return 0;
@@ -2000,6 +1986,5 @@ char *ie_current_mode(text)
 **	Output :
 */
-int ie_monochrome(text)
-	Text *text;
+int ie_monochrome()
 {
         extern Display *dpy;
@@ -2023,7 +2008,7 @@ int ie_set_tab_width (new_width)
   int old;
   EdWin **t;
-  extern int tab_width;  
+  extern int tab_width;
   extern Display *dpy;
-  
+
   old=tab_width;
   if (new_width <= 0)
--- ie_func.h	2002-02-15 02:07:29.000000000 -0500
+++ ie_func.h	2014-12-27 03:47:35.000000000 -0500
@@ -44,23 +44,23 @@
 #include "proto_decl.h"
 
-FCT (int, ie_at_end_of_file, (Text *text) );
-FCT (int, ie_backward_search, (Text *text, char *str) );
-FCT (int, ie_beginning_of_line, (Text *text) );
+FCT (int, ie_at_end_of_file, (const Text *text) );
+FCT (int, ie_backward_search, (Text *text, const char *str) );
+FCT (int, ie_beginning_of_line, (const Text *text) );
 FCT (void, ie_blink, (Text *text, int pos) );
-FCT (int, ie_cmd_shell, (Text *text, char *str) );
-FCT (Mode *, ie_create_mode, (Text *text, char *mode_name) );
-FCT (char, ie_current_char, (Text *text) );
-FCT (int, ie_current_line, (Text *text) );
+FCT (int, ie_cmd_shell, (Text *text, const char *str) );
+FCT (Mode *, ie_create_mode, (const char *mode_name) );
+FCT (char, ie_current_char, (const Text *text) );
+FCT (int, ie_current_line, (const Text *text) );
 FCT (void, ie_current_line_to_top, (Text *text) );
-FCT (int, ie_current_position, (Text *text) );
-FCT (int, ie_current_window, (Text *text) );
+FCT (int, ie_current_position, (const Text *text) );
+FCT (int, ie_current_window, (const Text *text) );
 FCT (void, ie_delete_char, (Text *text) );
-FCT (int, ie_end_of_file, (Text *text) );
-FCT (int, ie_end_of_line, (Text *text) );
-FCT (int, ie_end_of_region, (Text *text) );
-FCT (char *, ie_file_select, (Text *text) );
-FCT (char *, ie_filename, (Text *text) );
-FCT (int, ie_forward_search, (Text *text, char *str) );
-FCT (int, ie_global_replace, (Text *text, char *old, char *new) );
+FCT (int, ie_end_of_file, (const Text *text) );
+FCT (int, ie_end_of_line, (const Text *text) );
+FCT (int, ie_end_of_region, (const Text *text) );
+FCT (const char *, ie_file_select, (Text *text) );
+FCT (const char *, ie_filename, (const Text *text) );
+FCT (int, ie_forward_search, (Text *text, const char *str) );
+FCT (int, ie_global_replace, (Text *text, const char *old, const char *new) );
 FCT (void, ie_goto_beginning_of_line, (Text *text) );
 FCT (void, ie_goto_char, (Text *text, int p) );
@@ -70,49 +70,55 @@ FCT (void, ie_goto_next_char, (Text *tex
 FCT (void, ie_goto_previous_char, (Text *text) );
 FCT (void, ie_insert_char, (Text *text, int c) );
-FCT (int, ie_insert_file, (Text *text, char *filename) );
-FCT (void, ie_key_def, (Text *text, char *mode_name, unsigned char *keys, char *func_name) );
+FCT (int, ie_insert_file, (Text *text, const char *filename) );
+FCT (void, ie_key_def, (const char *mode_name, const char *keys, const char *func_name) );
 FCT (void, ie_kill_current_buffer, (Text *text) );
 FCT (int, ie_kill_window, (Text *text, int num) );
-FCT (int, ie_last_key, (Text *text) );
-FCT (int, ie_line_count, (Text *text) );
+FCT (int, ie_last_key, (const Text *text) );
+FCT (int, ie_line_count, (const Text *text) );
 FCT (void, ie_lower_window, (Text *text) );
 FCT (int, ie_mark_position, (Text *text) );
-FCT (int, ie_msearch, (Text *text, char *chars, int end, int direction) );
-FCT (int, ie_new_window, (Text *text) );
-FCT (char, ie_next_char, (Text *text) );
-FCT (char, ie_previous_char, (Text *text) );
-FCT (int, ie_read_file, (Text *text, char *filename) );
+FCT (int, ie_msearch, (Text *text, const char *chars, int end, int direction) );
+FCT (int, ie_new_window, (const Text *) );
+FCT (char, ie_next_char, (const Text *text) );
+FCT (char, ie_previous_char, (const Text *text) );
+FCT (int, ie_read_file, (Text *text, const char *filename) );
 FCT (void, ie_redisplay, (Text *text) );
 FCT (void, ie_replace_char, (Text *text, int c) );
 FCT (void, ie_save_file, (Text *text) );
-FCT (Text *, ie_select_window, (Text *text, int win_id) );
-FCT (void, ie_set_mode, (Text *text, char *name) );
-FCT (void, ie_set_mode_font, (Text *text, char *mode_name, char *font_name) );
-FCT (void, ie_set_mode_suffixes, (Text *text, char *mode_name, char *suf) );
-FCT (char, ie_the_char, (Text *text, int p) );
+FCT (Text *, ie_select_window, (int win_id) );
+FCT (void, ie_set_mode, (Text *text, const char *name) );
+FCT (void, ie_set_mode_font, (const char *mode_name, const char *font_name) );
+FCT (void, ie_set_mode_suffixes, (const char *mode_name, const char *suf) );
+FCT (char, ie_the_char, (const Text *text, int p) );
 FCT (void, ie_upper_window, (Text *text) );
-FCT (int, ie_window_height, (Text *text) );
-FCT (int, ie_window_width, (Text *text, int c) );
-FCT (void, ie_set_font, (Text *text, char *font) );
-FCT (int, ie_re_search_forward, (Text *text, char *regex ) );
-FCT (int, ie_re_search_backward, (Text *text, char *regex ) );
-FCT (int, ie_re_replace, (Text *text, char *regex, char* newstring ) );
-FCT (int, ie_re_replace_match, (Text *text, char *newstring ) );
-FCT (int, ie_re_match_beginning, (Text *text, int n) );
-FCT (int, ie_re_match_end, (Text *text, int n) );
-FCT (char *, ie_shell_to_string, (Text *text, char *str ) );
+FCT (int, ie_window_height, (const Text *text) );
+FCT (int, ie_window_width, (const Text *text, int c) );
+FCT (void, ie_set_font, (Text *text, const char *font) );
+FCT (int, ie_re_search_forward, (Text *text, const char *regex ) );
+FCT (int, ie_re_search_backward, (Text *text, const char *regex ) );
+FCT (int, ie_re_replace, (Text *text, const char *regex, const char* newstring ) );
+FCT (int, ie_re_replace_match, (Text *text, const char *newstring ) );
+FCT (int, ie_re_match_beginning, (int n) );
+FCT (int, ie_re_match_end, (int n) );
+FCT (char *, ie_shell_to_string, (const char *str) );
 FCT (void, ie_set_mark, (Text *text, int pos ) );
 FCT (void, ie_goto_mark, (Text *text ) );
 FCT (void, ie_reset_mark, (Text *text ) );
-FCT (void, ie_color_area, (Text *text, int start, int end, char *colorname ) );
+FCT (void, ie_color_area, (Text *text, int start, int end, const char *colorname ) );
 FCT (void, ie_uncolor_area, (Text *text, int start, int end) );
 FCT (void, ie_paste_region, (Text *text ) );
 FCT (void, ie_copy_region, (Text *text ) );
 FCT (void, ie_cut_region, (Text *text ) );
-FCT (void, ie_watch_on, (Text *text ) );
-FCT (void, ie_watch_off, (Text *text ) );
-FCT (void, ie_usleep, (Text *text, int t ) );
-FCT (char *, ie_current_mode, (Text *text ) );
+FCT (void, ie_watch_on, (const Text *text ) );
+FCT (void, ie_watch_off, (const Text *text ) );
+FCT (void, ie_usleep, (int t ) );
+FCT (const char *, ie_current_mode, (Text *text ) );
 FCT (int, ie_set_tab_width, ( int w ) );
+FCT (int, ie_monochrome, (void) );
+FCT (void, ie_write_file, (Text *, const char *filename) );
+FCT (int, ie_current_buffer_is_modified, (const Text *) );
+FCT (void, ie_raise_window, (const Text *) );
+FCT (void, ie_remove_colors, (Text *) );
+FCT (int, ie_current_buffer_is_colored, (const Text *) );
 
 #endif /* _IE_FUNC_H_ */
--- init_menus.c	2001-02-03 15:19:40.000000000 -0500
+++ init_menus.c	2014-12-26 01:58:48.000000000 -0500
@@ -40,5 +40,7 @@
 
 #include <stdio.h>
+#include <string.h>
 #include <X11/Xlib.h>
+#include <X11/Xresource.h>
 #include <X11/Xutil.h>
 
@@ -60,8 +62,8 @@ int menus_color = True;
 static ResourcesMenu	rm;
 
-FCT (static int, getnbstr, (char **tstr) );
-FCT (static char *, getmaxstr, (char **tstr) );
+FCT (static int, getnbstr, (const char **tstr) );
+FCT (static const char *, getmaxstr, (const char **tstr) );
 FCT (static void, show_bar, (Display *display, Window w, XYMenu *menu) );
-FCT (static VMenu *, Vmenu, (Display *display, Window window,XYMenu *menu, char **item, int x_title, void (**fnt) (), unsigned long bg) );
+FCT (static VMenu *, Vmenu, (Display *display, Window window,XYMenu *menu, const char **item, int x_title, void (**fnt) (), unsigned long bg) );
 
 /*
@@ -150,6 +152,6 @@ XYMenu *MakeMenus ( display, w, title, i
     Display		*display;
     Window		w;
-    char		**title;
-    char		***item;
+    const char		**title;
+    const char		***item;
     void		(**fnt []) ();
 {
@@ -158,10 +160,10 @@ XYMenu *MakeMenus ( display, w, title, i
   XWindowAttributes att;
   int i = 0;
-  int x, width;
-  VMenu	*Vmenu ();
-  
+  int x;
+  intptr_t width;
+
   XGetWindowAttributes ( display, w, &att );
-  menu = ( XYMenu * ) malloc ( sizeof ( XYMenu ));
-  bzero ( (char *) menu, sizeof ( XYMenu ));
+  menu = malloc (sizeof (XYMenu));
+  bzero (menu, sizeof(XYMenu));
   
   menu -> width_relief = DEPTH_WIDTH;
@@ -200,5 +202,5 @@ XYMenu *MakeMenus ( display, w, title, i
   while ( *title != 0 ) {
     width = XTextWidth ( rm.font, *title, strlen ( *title )) + 20;
-    *title++;	
+    title++;	
     menu->w_title [i] =
       XCreateSimpleWindow ( display, menu->w_bar, x, 2,
@@ -228,6 +230,6 @@ XYMenu *MakeMenus ( display, w, title, i
     x += width;
     i++;
-    *item++;
-    *fnt++;
+    item++;
+    fnt++;
     if ( i > 10 )
       break;
@@ -264,42 +266,4 @@ int MouseInMenuBar ( display, w )
 
 /*
-**	Function name : SetMenuPixmap
-**
-**	Description : Fabrication d'un pixmap pour sauvegarder
-**		les parties cachees.
-**	Input : Le display, le menu, largeur de la fenetre parent.
-**	Ouput :
-*/
-void SetMenuPixmap ( display, menu, width )
-    Display *display;
-    XYMenu *menu;
-    int width;
-{
-/*  
-  if ( menu -> save != 0 ) {
-#ifdef DEBUG
-    fprintf ( stderr, "Pixmap ms = %d\n", menu -> save );
-#endif
-    XFreePixmap ( display, menu -> save );
-  }
-  
-#ifdef SHADOW
-  menu -> save = XCreatePixmap ( display,
-				menu -> w_under, width,
-				menu -> hmax_menu + SHAD + 10,
-				DefaultDepth ( display, DefaultScreen ( display )));
-#else
-  menu -> save = XCreatePixmap ( display,
-				menu -> w_under , width,
-				menu -> hmax_menu + 10,
-				DefaultDepth ( display, DefaultScreen ( display )));
-#endif
-  menu -> save_ok = 0;
-  menu -> pix_width = width;
-*/
-}
-
-
-/*
 **	Function name : Vmenu
 **
@@ -315,5 +279,5 @@ static VMenu *Vmenu ( display, window, m
     Window	window;
     XYMenu	*menu;
-    char **item;
+    const char **item;
     int x_title;
     void (**fnt) ();
@@ -322,12 +286,11 @@ static VMenu *Vmenu ( display, window, m
   VMenu	*vm;
   SWindow	*sw;
-  char	*getmaxstr ();
   XSetWindowAttributes att, att_io;
   int x_menu, n;
-  char *maxstr;
+  const char *maxstr;
   int nb_item;
   
-  vm = ( VMenu * ) malloc ( sizeof ( VMenu ));
-  bzero ( (char *) vm, sizeof ( VMenu ));
+  vm = malloc(sizeof(VMenu));
+  bzero (vm, sizeof (VMenu));
   maxstr = getmaxstr ( item );
   nb_item = getnbstr ( item );
@@ -391,6 +354,6 @@ static VMenu *Vmenu ( display, window, m
     vm -> func [n] = *fnt;
     n++;
-    *item++;
-    *fnt++;
+    item++;
+    fnt++;
   }
 #ifdef SHADOW
@@ -432,10 +395,10 @@ void SetHiddenWindow ( menu, w, gc )
 */
 static int getnbstr ( tstr )
-    char **tstr;
+    const char **tstr;
 {
   int i = 0;
   while ( *tstr != 0 ) {
     i++;
-    *tstr++;
+    tstr++;
     if ( i > 100 ) return ( 0 );
   }
@@ -453,8 +416,8 @@ static int getnbstr ( tstr )
 **	Ouput : La plus grande chaine.
 */
-static char *getmaxstr ( tstr )
-    char **tstr;
+static const char *getmaxstr ( tstr )
+    const char **tstr;
 {
-  char *s;
+  const char *s;
   int i, j;
   
@@ -485,5 +448,5 @@ void RefreshMenuBar ( display, menu )
 {
   int i;
-  char 	**str = menu->titlename;
+  const char 	**str = menu->titlename;
   
   XResizeWindow ( display, menu -> w_bar, menu -> bar_width,
--- init_menus.h	1995-02-22 08:03:33.000000000 -0500
+++ init_menus.h	2014-12-26 01:58:36.000000000 -0500
@@ -92,5 +92,5 @@ typedef struct _VMenu {
 	void (*func [MAX_ITEMS])();		/* Les callbacks */
 	int nb_items;			/* Le nombre d'items */
-	char **iname;	/* Les chaines de caracteres associes */
+	const char **iname;	/* Les chaines de caracteres associes */
 	int x;		/* Position horizontale des menus */
 	int width, height;	/* Largeur et hauteur */
@@ -129,6 +129,6 @@ typedef struct _XYMenu {
 	int nb_menus;	/* Le nombre de menus */
 	VMenu *vmenu [MAX_MENUS];	/* Les menus verticaux */
-	char **titlename;	/* Les noms des menus */
-	char ***itemname;	/* Les noms des items */
+	const char **titlename;	/* Les noms des menus */
+	const char ***itemname;	/* Les noms des items */
 	int (***f_item) ();	/* Les callbacks associees */
 	unsigned int y_menu;	/* Position par rapport au parent */
@@ -154,9 +154,8 @@ FCT (int, ButtonPressInMenu, (Window w, 
 FCT (void, DeleteMenu, (Display *display, XYMenu *menu) );
 FCT (void, InitMenusRes, (Display *display, XFontStruct	*font,unsigned long fg, unsigned long bg, unsigned long ts, unsigned long bs) );
-FCT (XYMenu *, MakeMenus, (Display *display, Window w, char **title, char ***item, void	(**fnt []) ()) );
+FCT (XYMenu *, MakeMenus, (Display *display, Window w, const char **title, const char ***item, void	(**fnt []) ()) );
 FCT (int, MouseInMenuBar, (Display *display, Window w) );
 FCT (void, RefreshMenuBar, (Display *display, XYMenu *menu) );
 FCT (void, SetHiddenWindow, (XYMenu *menu, Window w, GC gc) );
-FCT (void, SetMenuPixmap, (Display *display, XYMenu *menu, int width) );
 
 #define SetMenuBarWidth(m, x)	(m -> bar_width = x)
--- input_str.h	1997-03-18 07:14:47.000000000 -0500
+++ input_str.h	2014-12-27 22:33:51.000000000 -0500
@@ -44,18 +44,18 @@
 #include "proto_decl.h"
 
-FCT (char *, GetString, (Text *text, char *prompt, int reply) );
-FCT (void, FillMiniBuffer, (char *str) );
-FCT (void, EmptyMiniBuffer, () );
-FCT (void, InitInputString, () );
-FCT (void, InputStrAbort, () );
-FCT (void, InputStrPrevious, (Text *text) );
-FCT (void, InputStrReturn, (Text *text) );
-FCT (void, InputStrTab, (Text *text) );
-FCT (char *, ExpandTildeName, (char *name) );
-FCT (char *, InputString, (Window parent, Window raise, GC gc, XFontStruct *font, char *prompt, int reply) );
-FCT (void, SetCancelButton, () );
-FCT (void, SetOkButton, () );
+FCT (const char *, GetString, (Text *text, const char *prompt, int reply) );
+FCT (void, FillMiniBuffer, (const char *str) );
+FCT (void, EmptyMiniBuffer, (void) );
+FCT (void, InitInputString, (void) );
+FCT (void, InputStrAbort, (void) );
+FCT (void, InputStrPrevious, (void) );
+FCT (void, InputStrReturn, (void) );
+FCT (void, InputStrTab, (void) );
+FCT (const char *, ExpandTildeName, (const char *name) );
+FCT (const char *, InputString, (Window parent, Window raise, GC gc, XFontStruct *font, const char *prompt, int reply) );
+FCT (void, SetCancelButton, (void) );
+FCT (void, SetOkButton, (void) );
 FCT (void, SetMBcontext, (int cont) );
-FCT (void, InputStrSave, (char *, int) );
+FCT (void, InputStrSave, (const char *, int) );
 extern Text *input_str;
 
--- justify.c	1998-10-12 14:25:23.000000000 -0400
+++ justify.c	2014-12-27 05:23:26.000000000 -0500
@@ -21,4 +21,5 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <limits.h>
 
@@ -942,8 +943,8 @@ int FillManText(font, width, textbuf, in
   
   {
-    char * smaclib = (char *) getenv ("XCORAL_SMACLIB");
+    char * smaclib = getenv ("XCORAL_SMACLIB");
     
     if (smaclib) {
-      char * filename = (char *) malloc(strlen(smaclib) + 10);
+      char * filename = malloc(strlen(smaclib) + 10);
 
       sprintf(filename, "%s/man.dtex", smaclib);
@@ -954,5 +955,5 @@ int FillManText(font, width, textbuf, in
   
   if (! fpdtex) {
-    char * filename = (char *) malloc(strlen(XCORAL_LIB_DIR) + 10);
+    char * filename = malloc(strlen(XCORAL_LIB_DIR) + 10);
 
     sprintf(filename, "%s/man.dtex", XCORAL_LIB_DIR);
--- kill_buf.c	1998-09-20 13:00:19.000000000 -0400
+++ kill_buf.c	2014-12-26 23:51:09.000000000 -0500
@@ -92,5 +92,5 @@ static kb *AllocKillBuf ()
 */
 void StoreInKillBuf ( s, len, n )
-    char *s;
+    const char *s;
     int len;
     int n;
@@ -147,5 +147,5 @@ void StoreInKillBuf ( s, len, n )
 **	Ouput : La chaine.
 */
-char *RestoreKillBuf ( i, len, dn )
+const char *RestoreKillBuf ( i, len, dn )
     int i;
     int *len; /* Return */
@@ -164,5 +164,5 @@ char *RestoreKillBuf ( i, len, dn )
     *len = tmp -> s_len;
     *dn =  tmp -> s_lines;
-    return ( (char *) tmp -> p );
+    return (tmp->p);
 }
 
--- kill_buf.h	1995-02-22 08:03:35.000000000 -0500
+++ kill_buf.h	2014-12-26 23:49:30.000000000 -0500
@@ -60,6 +60,6 @@ typedef struct _kb {
 
 FCT (void, LoadKillBuffer, (Buf *buf) );
-FCT (char *, RestoreKillBuf, (int i, int *len, int *dn) );
-FCT (void, StoreInKillBuf, (char *s, int len, int n) );
+FCT (const char *, RestoreKillBuf, (int i, int *len, int *dn) );
+FCT (void, StoreInKillBuf, (const char *s, int len, int n) );
 
 #endif /* _KILL_BUF_H_ */
--- list_box.c	2006-11-16 03:56:42.000000000 -0500
+++ list_box.c	2014-12-27 05:16:57.000000000 -0500
@@ -40,4 +40,5 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -60,4 +61,5 @@
 #include "shadow.h"
 #include "kill_buf.h"
+#include "chars_cmds.h"
 
 extern Display *dpy;
@@ -65,9 +67,7 @@ LBox l_box;
 static  Atom list_del;
 
-FCT (static void, DisplayList, (char *msg) );
-FCT (static void, MapListBox, () );
-FCT (static void, UnmapListBox, () );
-FCT (static void, UpdateSelect, () );
-FCT (static void, UpdateListTitle, () );
+FCT (static void, UnmapListBox, (void) );
+FCT (static void, UpdateSelect, (void) );
+FCT (static void, UpdateListTitle, (void) );
 
 /*
@@ -165,18 +165,4 @@ void InitListBox ()
 
 /*
-**	Function name : MapListBox
-**
-**	Description : 
-**	Input : 
-**	Ouput :
-*/
-static void MapListBox ()
-{
-    XMapSubwindows ( dpy, l_box.frame );
-    XMapSubwindows ( dpy, l_box.ctr );
-    XMapRaised ( dpy, l_box.frame );
-}
-
-/*
 **	Function name : UnmapListBox
 **
@@ -347,6 +333,5 @@ static void UpdateSelect ()
 #define S_DELAY 15000	
 
-char *SelectFromListBox ( msg )
-    char *msg;
+char *SelectFromListBox ()
 {
   XEvent ev;
@@ -354,6 +339,5 @@ char *SelectFromListBox ( msg )
   int result, new_select;
   char *str;
-  
-  (void) DisplayList ( msg );
+
   for (;;) {
     XNextEvent ( dpy, &ev );
@@ -393,5 +377,5 @@ char *SelectFromListBox ( msg )
 	      l_box.select = 0;
 	      (void) UnmapListBox ();
-	      return ( (char *) CurrentTextItem ( l_box.text ) );
+	      return (CurrentTextItem ( l_box.text ) );
 	    }
 	  }
@@ -401,5 +385,5 @@ char *SelectFromListBox ( msg )
 	    if ( new_select ) {
 	      l_box.select = new_select;
-	      str = (char *) CurrentTextItem ( l_box.text );
+	      str = CurrentTextItem ( l_box.text );
 	      if ( str ) {
 		(void) sprintf ( l_box.select_text, "Select : %s", str );
@@ -436,5 +420,5 @@ char *SelectFromListBox ( msg )
 	    l_box.select = 0;
 	    (void) UnmapListBox ();
-	    return ( (char *) CurrentTextItem ( l_box.text ) );
+	    return (CurrentTextItem (l_box.text));
 	  }
 	}
@@ -509,36 +493,4 @@ int DoubleClick ( current_t, p_old_t )
 }
 
-/*
-**	Function name : DisplayList
-**
-**	Description : 
-**	Input : 
-**	Ouput :
-*/
-static void DisplayList ( msg )
-    char *msg;
-{
-    
-    if ( l_box.stat != LB_MAP ) {
-	MapListBox ();
-	WaitForMapped ( l_box.frame, False );
-	l_box.stat = LB_MAP;	
-    }
-    else
-          XMapRaised ( dpy, l_box.frame );
-
-    if ( msg != 0 ) {
-	if ( strlen ( msg ) > (TITLE_SIZE - 2) ) {
-	  (void) strncpy ( l_box.title_text, msg, TITLE_SIZE -1 );
-	  l_box.title_text [TITLE_SIZE] = '\0';
-	}
-	else
-	  (void) strcpy ( l_box.title_text, msg );
-    }
-    (void) UpdateListTitle ();
-    (void) UpdateSelect ();
-    TextCursorOff ( l_box.text );
-    FirstPageAndUpdateScroll ( l_box.text );
-}
 
 /*
@@ -550,5 +502,5 @@ static void DisplayList ( msg )
 */
 void FillList ( str )
-    char *str;
+    const char *str;
 {
     if ( str == 0 )
--- list_box.h	1997-01-24 09:56:33.000000000 -0500
+++ list_box.h	2014-12-27 05:13:21.000000000 -0500
@@ -77,13 +77,13 @@ typedef struct _LBox {
 } LBox;
 
-FCT (void, ClearListBox, () );
+FCT (void, ClearListBox, (void) );
 FCT (void, ConfigListBox, (int width, int height) );
 FCT (int, DoubleClick, (Time current_t, Time * old_t) );
 FCT (int, ExposeListBox, (XEvent *ev) );
-FCT (void, FillList, (char *str) );
-FCT (void, InitListBox, () );
-FCT (void, KillBufferInList, () );
-FCT (void, OpenFilesInListBox, () );
-FCT (char *, SelectFromListBox, (char *msg) );
+FCT (void, FillList, (const char *str) );
+FCT (void, InitListBox, (void) );
+FCT (void, KillBufferInList, (void) );
+FCT (void, OpenFilesInListBox, (void) );
+FCT (char *, SelectFromListBox, (void) );
 
 #endif /* _LIST_BOX_H_ */
--- macros.c	1998-09-20 12:16:05.000000000 -0400
+++ macros.c	2014-12-27 05:24:41.000000000 -0500
@@ -40,4 +40,5 @@
 
 #include <stdio.h>
+#include <string.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -180,5 +181,5 @@ void LoadMacro ( text, func, arg, repeat
 	  tmp -> f = (void(*)()) f_impc;
 	  /* previous char */
-	  arg = (void *) ((int) *(text -> buf -> l_cur -1));
+	  arg = (void *) ((intptr_t) *(text -> buf -> l_cur -1));
 	}
 	else
--- macros.h	1995-02-22 08:03:36.000000000 -0500
+++ macros.h	2014-12-27 05:24:57.000000000 -0500
@@ -56,5 +56,5 @@ FCT (void, EndMacro, (Text *text) );
 FCT (int, InsideMacro, (Text *text) );
 FCT (void, LoadMacro, (Text *text, FCT(void, (* func), ()), void * arg, int repeat) );
-FCT (void, ResetMacro, () );
+FCT (void, ResetMacro, (void) );
 FCT (void, RunMacro, (Text *text, int n) );
 FCT (void, DeleteMacro, (Text *text) );
--- main_events.h	1997-03-18 12:12:07.000000000 -0500
+++ main_events.h	2014-12-26 00:03:16.000000000 -0500
@@ -45,22 +45,22 @@
 
 FCT (void, FreezeButtons, (Text *text) );
-FCT (void, FreezeMenus, () );
-FCT (int, IsFreezeMenus, () );
-FCT (void, UnFreezeButtons, () );
-FCT (void, UnFreezeMenus, () );
-FCT (void, HandleButtonPress, () );
-FCT (void, HandleConfigure, () );
-FCT (void, HandleEnter, () );
-FCT (void, HandleExpose, () );
-FCT (void, HandleLeave, () );
-FCT (void, InitEvent, () );
+FCT (void, FreezeMenus, (void) );
+FCT (int, IsFreezeMenus, (void) );
+FCT (void, UnFreezeButtons, (void) );
+FCT (void, UnFreezeMenus, (void) );
+FCT (void, HandleButtonPress, (void) );
+FCT (void, HandleConfigure, (void) );
+FCT (void, HandleEnter, (void) );
+FCT (void, HandleExpose, (void) );
+FCT (void, HandleLeave, (void) );
+FCT (void, InitEvent, (void) );
 FCT (void, ResetFd, (int fd) );
 FCT (void, SetFd, (int fd) );
 FCT (void, WaitButtonRelease, (unsigned int button) );
-FCT (void, WaitForXserver, () );
-FCT (void, WaitForEvent, () );
+FCT (void, WaitForXserver, (void) );
+FCT (void, WaitForEvent, (void) );
 FCT (void, WaitForMapped, (Window win, int istext) );
 FCT (void, WaitForUnMapped, (Window win) );
-FCT (void, HandleSelectionClear, () );
+FCT (void, HandleSelectionClear, (void) );
 FCT (void, PasteSelection, (Text *text) );
 
--- main_text.c	2003-04-22 07:34:08.000000000 -0400
+++ main_text.c	2014-12-27 05:18:53.000000000 -0500
@@ -44,5 +44,5 @@
 #include <sys/types.h>
 #include <sys/time.h>
-#include <signal.h>
+#include <unistd.h>
 
 #if HAVE_STRING_H
@@ -62,4 +62,5 @@
 #include "xcoral.h"
 #include "main_text.h"
+#include "mark_reg.h"
 #include "chars_cmds.h"
 #include "dial_box.h"
@@ -78,5 +79,5 @@ int tab_width = TAB_WIDTH;
 
 FCT (static int, GetNbLinesInPage, (Text *text, XFontStruct *font) );
-FCT (static void, Set_mode_internal, (Text *text, char *mode_name) );
+FCT (static void, Set_mode_internal, (Text *text, const char *mode_name) );
 
 void ie_WR_delete ( text ) Text *text; { f_delete ( text ); }
@@ -280,5 +281,5 @@ void LoadMode ( text )
 	mode = mode -> next;
     }    
-    str = (char *) SelectFromListBox ( "Modes" );
+    str = SelectFromListBox ();
 /*    str = (char *) GetStringFromDB ( "Mode name : ", False ); */
     
@@ -319,5 +320,5 @@ void NewMode ( text )
 {
     Mode *new_mode;
-    char *str;    
+    const char *str;    
     char c = '\007'; /* ^G */
     
@@ -327,5 +328,5 @@ void NewMode ( text )
     }
 
-    str = (char *) GetStringFromDB ( "New mode name : ", False );
+    str = GetStringFromDB ( "New mode name : ", False );
     if ( (str == 0) || (strncmp(str, &c, 1)) == 0 ) {
 	DisplayMessage ( text -> mwin, "Abort" );
@@ -462,5 +463,5 @@ void SetFontText ( display, text, font )
 XFontStruct *LoadFont ( dpy, str )
     Display *dpy;
-    char    *str;
+    const char    *str;
 {
     XFontStruct     *font;
@@ -490,5 +491,5 @@ void ChangeFont ( dpy, text, f )
     Display *dpy;
     Text *text;
-    char *f;
+    const char *f;
 {
     XFontStruct *font;
@@ -689,5 +690,5 @@ void SetTextModif ( text) 
 static void Set_mode_internal(text, mode_name)
     Text *text;
-    char *mode_name;
+    const char *mode_name;
 {
     if ( strcmp(text -> current_mode -> name, mode_name) != 0 ) {
--- main_text.h	2002-02-14 09:56:25.000000000 -0500
+++ main_text.h	2014-12-27 05:01:34.000000000 -0500
@@ -43,4 +43,5 @@
 
 #include <sys/param.h>
+#include <sys/types.h>
 
 #include "main_buffer.h"
@@ -70,5 +71,5 @@ typedef struct _TextResources {
  *	Toutes les infos sur le texte.
  */
-typedef struct _Text {
+struct _Text {
 	Window window;		/* La fenetre de texte */
 	Window w_parent;	/* La fenetre parent */
@@ -129,5 +130,5 @@ typedef struct _Text {
 	int ie_mark;
 	
-	int shell_id; /* Pour la connection eventuelle a un shell */
+	pid_t shell_id; /* Pour la connection eventuelle a un shell */
 	int p_shell [2]; /* Le pipes */
 	int p_xc [2];
@@ -137,9 +138,11 @@ typedef struct _Text {
 	ColorElement *last_ce;
 	Selection *selection;
-} Text;
+};
+
+typedef struct _Text Text;
 
 
 FCT (void, ChangeDir, (Text *text) );
-FCT (void, ChangeFont, (Display *dpy, Text *text, char *f) );
+FCT (void, ChangeFont, (Display *dpy, Text *text, const char *f) );
 FCT (void, ConfigTextAndScroll, (Text *text, int width, int height, int space) );
 FCT (void, DeleteText, (Display *dpy, Text *text) );
@@ -147,5 +150,5 @@ FCT (void, ExposeTextWindow, (Display *d
 FCT (void, InitTextRes, (Display *dpy, XFontStruct *font, unsigned long fg, unsigned long bg, unsigned long ts, unsigned long bs) );
 FCT (void, KillText, (Display *dpy, Text *text) );
-FCT (XFontStruct *, LoadFont, (Display *dpy, char *str) );
+FCT (XFontStruct *, LoadFont, (Display *dpy, const char *str) );
 FCT (void, LoadMode, (Text *text) );
 FCT (Text *, MakeTextWindow, (Display *dpy, Window parent, int x, int y) );
@@ -170,5 +173,5 @@ FCT (void, DoUndo, (Text *text) );
 FCT (void, DoUndoUndo, (Text *text) );
 FCT (void, ResetUndo, (Text *text) );
-FCT (void, StoreInUndo, (Text *text, char *s, char *sr, int len, int n, int type) );
+FCT (void, StoreInUndo, (Text *text, const char *s, const char *sr, int len, int n, int type) );
 FCT (void, SetLatexMode, (Text *text) );
 FCT (void, SetHtmlMode, (Text *text) );
@@ -179,9 +182,9 @@ FCT (void, SetEdirMode, (Text *text) );
 FCT (void, SetshellMode, (Text *text) );
 
-FCT (void, SetColorArea, (Text *text, int start, int end, char *colorname) );
+FCT (void, SetColorArea, (Text *text, int start, int end, const char *colorname) );
 FCT (void, UnColorArea, (Text *text, int start, int end) );
 FCT (void, DeleteColorList, (Text *text) );
 FCT (void, UpdateColorList, (Text *text, int nbytes) );
-FCT (void, ColorLineInPage, (Text *text,  int x, int y, int li, char *s, int n) );
+FCT (void, ColorLineInPage, (Text *text,  int x, int y, int li, const char *s, int n) );
 FCT (unsigned long, GetCursorColor, (Text *text) );
 
@@ -224,8 +227,3 @@ FCT (unsigned long, GetCursorColor, (Tex
 #define OPENFILES	2
 
-#endif /* _MAIN_TEXT_H_ */
-
-
-
-
-
+#endif /* _MAIN_TEXT_H_ */
\ No newline at end of file
--- man_box.c	2006-11-16 03:54:46.000000000 -0500
+++ man_box.c	2014-12-27 05:22:24.000000000 -0500
@@ -61,13 +61,14 @@
 #include "shadow.h"
 #include "bm_search.h"
+#include "chars_cmds.h"
 
 extern Display *dpy;
 MBox man_box;
 static  Atom man_del;
-static  fill_man = True;
+static  int fill_man = True;
 
-FCT (static void, LoadManText, () );
-FCT (static void, RefreshManTitleBox, () );
-FCT (static void, UnmapManBox, () );
+FCT (static void, LoadManText, (void) );
+FCT (static void, RefreshManTitleBox, (void) );
+FCT (static void, UnmapManBox, (void) );
 
 
@@ -239,5 +240,5 @@ void InitManBox ()
 void DisplayManBox ()
 {
-  static first_display = True;
+  static int first_display = True;
   
   XMapSubwindows ( dpy, man_box.ctr );
@@ -634,5 +635,4 @@ int ButtonManBox ( ev )
   }
   if ( ev -> window == man_box.man_text -> window) {
-    Time selection_time;
     int selection, ccontext=1;
     if (ccontext)
--- man_box.h	2001-07-08 11:40:16.000000000 -0400
+++ man_box.h	2014-12-27 05:21:12.000000000 -0500
@@ -89,7 +89,7 @@ typedef struct _MBox {
 FCT (int, ButtonManBox, ( XButtonEvent * ev ));
 FCT (void, ConfigManBox, (int width, int height) );
-FCT (void, DisplayManBox, () );
+FCT (void, DisplayManBox, (void) );
 FCT (int, ExposeManBox, (XEvent *ev) );
-FCT (void, InitManBox, () );
+FCT (void, InitManBox, (void) );
 FCT (int, KeyPressInManual, (XKeyEvent * ev ));
     
--- mode.c	2000-03-29 11:30:32.000000000 -0500
+++ mode.c	2014-12-27 04:47:10.000000000 -0500
@@ -80,8 +80,8 @@ Mode *m_default; 
 FCT (void, ie_WR_delete, (Text *text) ); 
 
-FCT (static Mode *, AllocMode, () );
+FCT (static Mode *, AllocMode, (void) );
 FCT (static void, ResetMode, (Mode *mode) );
 FCT (static void, SetDefaultModeValues, (Mode *mode) );
-FCT (static void, SetModeName, (Mode *mode, char *mode_name) );
+FCT (static void, SetModeName, (Mode *mode, const char *mode_name) );
 
 FCT (static void, ie_WR_setmark, (Text *text) );
@@ -127,8 +127,8 @@ FCT (static void, ie_WR_goto_line, (Text
 FCT (static void, ie_WR_eval_expression, (Text *text) );
 FCT (static void, ie_WR_list_open_file, (Text *text) );
-FCT (static void, ie_WR_str_return, (Text *text) );
-FCT (static void, ie_WR_str_tab, (Text *text) );
-FCT (static void, ie_WR_str_abort, (Text *text) );
-FCT (static void, ie_WR_str_previous, (Text *text) );
+FCT (static void, ie_WR_str_return, (void) );
+FCT (static void, ie_WR_str_tab, (void) );
+FCT (static void, ie_WR_str_abort, (void) );
+FCT (static void, ie_WR_str_previous, (void) );
 FCT (static void, ie_WR_shell_return, (Text *text) );
 FCT (static void, ie_WR_shell_CtrC, (Text *text) );
@@ -138,5 +138,5 @@ FCT (static void, ie_WR_yank, (Text *tex
 
 #if !HAVE_STRDUP
-extern FCT (char*, strdup, (char*) );
+extern FCT (char*, strdup, (const char*) );
 #endif
 
@@ -150,5 +150,5 @@ extern FCT (char*, strdup, (char*) );
 static Mode *AllocMode ()
 {
-  return (Mode *) malloc ((unsigned) sizeof (Mode));
+  return malloc (sizeof (Mode));
 }
 
@@ -254,5 +254,5 @@ static void ResetMode ( mode )
 */
 Mode *GetMode ( name )
-    char *name;
+    const char *name;
 {
     Mode *tmp = m_default;
@@ -281,5 +281,5 @@ Mode *GetMode ( name )
 */
 Mode *CreateNewMode ( mode_name )
-    char *mode_name;
+    const char *mode_name;
 {
     Mode *new_mode, *tmp = m_default;
@@ -323,14 +323,12 @@ Mode *CreateNewMode ( mode_name )
 static void SetModeName ( mode , mode_name )
     Mode *mode;
-    char *mode_name;
+    const char *mode_name;
 {
-    mode -> name = (char *) malloc ((unsigned) (strlen(mode_name) + 2));
+    mode->name = strdup(mode_name);
 
-    if ( mode -> name == 0 ) {
+    if (mode -> name == NULL) {
 	(void) fprintf ( stderr, "Malloc error\n" );
 	exit (1);
     }
-
-    (void) strcpy ( mode -> name, mode_name );
 }
 
@@ -345,5 +343,5 @@ static void SetModeName ( mode , mode_na
 void SetModeSuffixe ( mode, suffixes )
     Mode *mode;
-    char *suffixes;
+    const char *suffixes;
 {
     if ( suffixes == 0 ) {
@@ -370,5 +368,5 @@ void SetModeSuffixe ( mode, suffixes )
 void SetModeFont ( mode, font_name )
     Mode *mode;
-    char *font_name;
+    const char *font_name;
 {
     extern Display *dpy;
@@ -393,11 +391,11 @@ void SetModeFont ( mode, font_name )
 */
 Mode *SearchMode ( filename )
-    char *filename;
+    const char *filename;
 {
-    char *end_name;
+    const char *end_name;
     Mode *tmp = m_default;
     int trouve = False;
 
-    end_name = (char * ) strrchr ( filename, '.' );
+    end_name = strrchr ( filename, '.' );
     if ( end_name == 0 )
       return m_default;
@@ -485,8 +483,8 @@ static void ie_WR_list_open_file ( text 
 
 /* Les fonctions speciales pour le mini-buffer. */
-static void ie_WR_str_return ( text ) Text *text; { InputStrReturn (text);}
-static void ie_WR_str_tab ( text ) Text *text; { InputStrTab (text);}
-static void ie_WR_str_abort ( text ) Text *text; { InputStrAbort (text);}
-static void ie_WR_str_previous ( text ) Text *text; { InputStrPrevious (text);}
+static void ie_WR_str_return (void) { InputStrReturn ();}
+static void ie_WR_str_tab (void) { InputStrTab ();}
+static void ie_WR_str_abort (void) { InputStrAbort ();}
+static void ie_WR_str_previous (void) { InputStrPrevious ();}
 
 /* Les fonctions speciales pour le Shell */
@@ -499,5 +497,5 @@ static void ie_WR_shell_key ( text ) Tex
 typedef struct {
     void (* f) ();
-    char *s;
+    const char *s;
 } f2s;
 
@@ -564,5 +562,5 @@ f2s func_string [NB_BUILTIN_FUNC] = {
 */
 long GetFuncNameFromString ( s )
-    char *s;
+    const char *s;
 {
     int i = 0;
@@ -671,5 +669,5 @@ static void SetDefaultModeValues ( mode 
 
     {
-      unsigned code = Xk_Code((unsigned char *)"Right");
+      unsigned code = Xk_Code("Right");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -677,5 +675,5 @@ static void SetDefaultModeValues ( mode 
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"R12");
+      unsigned code = Xk_Code("R12");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -683,5 +681,5 @@ static void SetDefaultModeValues ( mode 
     }    
     {
-      unsigned code = Xk_Code((unsigned char *)"Left");
+      unsigned code = Xk_Code("Left");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -689,5 +687,5 @@ static void SetDefaultModeValues ( mode 
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"R10");
+      unsigned code = Xk_Code("R10");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -695,11 +693,11 @@ static void SetDefaultModeValues ( mode 
     }    
     {
-      unsigned code = Xk_Code((unsigned char *)"Up");
-      
+      unsigned code = Xk_Code("Up");
+ 
       mode -> key [code].type = BUILTIN_FUNC;
       mode -> key [code].func = ie_WR_cursor_up;
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"R8");
+      unsigned code = Xk_Code("R8");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -707,5 +705,5 @@ static void SetDefaultModeValues ( mode 
     }    
     {
-      unsigned code = Xk_Code((unsigned char *)"Down");
+      unsigned code = Xk_Code("Down");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -713,5 +711,5 @@ static void SetDefaultModeValues ( mode 
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"R14");
+      unsigned code = Xk_Code("R14");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -719,5 +717,5 @@ static void SetDefaultModeValues ( mode 
     }    
     {
-      unsigned code = Xk_Code((unsigned char *)"Home");
+      unsigned code = Xk_Code("Home");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -725,5 +723,5 @@ static void SetDefaultModeValues ( mode 
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"R7");
+      unsigned code = Xk_Code("R7");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -731,5 +729,5 @@ static void SetDefaultModeValues ( mode 
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"Next");
+      unsigned code = Xk_Code("Next");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -737,5 +735,5 @@ static void SetDefaultModeValues ( mode 
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"R15");
+      unsigned code = Xk_Code("R15");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -743,5 +741,5 @@ static void SetDefaultModeValues ( mode 
     }    
     {
-      unsigned code = Xk_Code((unsigned char *)"Prior");
+      unsigned code = Xk_Code("Prior");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -749,5 +747,5 @@ static void SetDefaultModeValues ( mode 
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"R9");
+      unsigned code = Xk_Code("R9");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -755,5 +753,5 @@ static void SetDefaultModeValues ( mode 
     }    
     {
-      unsigned code = Xk_Code((unsigned char *)"End");
+      unsigned code = Xk_Code("End");
       
       mode -> key [code].type = BUILTIN_FUNC;
@@ -761,5 +759,5 @@ static void SetDefaultModeValues ( mode 
     }
     {
-      unsigned code = Xk_Code((unsigned char *)"R13");
+      unsigned code = Xk_Code("R13");
       
       mode -> key [code].type = BUILTIN_FUNC;
--- mode.h	1998-10-11 08:33:51.000000000 -0400
+++ mode.h	2014-12-26 00:28:14.000000000 -0500
@@ -65,13 +65,13 @@ typedef struct _mode {
 } Mode;
 
-FCT (Mode *, CreateNewMode, (char *mode_name) );
+FCT (Mode *, CreateNewMode, (const char *mode_name) );
 
-FCT (long, GetFuncNameFromString, (char *s) );
+FCT (long, GetFuncNameFromString, (const char *s) );
 
-FCT (Mode *, GetMode, (char *name) );
-FCT (void, InitMode, () );
-FCT (Mode *, SearchMode, (char *filename) );
-FCT (void, SetModeFont, (Mode *mode, char *font_name) );
-FCT (void, SetModeSuffixe, (Mode *mode, char *suffixes) );
+FCT (Mode *, GetMode, (const char *name) );
+FCT (void, InitMode, (void) );
+FCT (Mode *, SearchMode, (const char *filename) );
+FCT (void, SetModeFont, (Mode *mode, const char *font_name) );
+FCT (void, SetModeSuffixe, (Mode *mode, const char *suffixes) );
 
 #endif /* _MODE_H_ */
--- new_window.c	2005-11-04 05:20:00.000000000 -0500
+++ new_window.c	2014-12-27 05:17:38.000000000 -0500
@@ -47,4 +47,6 @@
  */
 #include <stdio.h>
+#include <stdlib.h>
+#include <sys/wait.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -60,5 +62,7 @@
 #include "xcoral.h"
 #include "new_window.h"
+#include "page.h"
 #include "parse.h"
+#include "ie_func.h"
 #include "list_box.h"
 #include "browser_init.h"
@@ -70,4 +74,7 @@
 #include "macros.h"
 #include "buttons_bits.h"
+#include "tbox.h"
+#include "text_cursor.h"
+#include "Smac/smacXcoral.h"
 
 extern Trans st_initial;
@@ -91,8 +98,8 @@ void InitIconPixmap()
   
   if ((depth == 16)||(depth == 24)) {
-    logo_image = (XImage *)LoadImage256 ((char **)xpm_logo);
+    logo_image = LoadImage256 (xpm_logo);
     xcoral_icon = XCreatePixmap (dpy, DefaultRootWindow(dpy), 32, 32,depth);
     xcoral_icon_mask = XCreatePixmapFromBitmapData ( dpy, DefaultRootWindow (dpy), 
-						    logo_bits, 32, 32,
+						    (char *)logo_bits, 32, 32,
 						    BlackPixel(dpy, DefaultScreen(dpy)),
 						    WhitePixel(dpy, DefaultScreen(dpy)), 1 );
@@ -335,5 +342,5 @@ void DisplayOpenFiles ( text )
     ClearListBox ();
     OpenFilesInListBox ();
-    tmp = (char *) SelectFromListBox ( "Open Files" );
+    tmp = SelectFromListBox ();
     if ( tmp != 0 ) {
 	/* str [2] = 0; */
@@ -360,39 +367,10 @@ void DisplayOpenFiles ( text )
 **	Description : Pour eviter les ouvertures multiples
 **		de fichiers
-**	Input : Le nom du fichier.
-**	Ouput : Le nombre de buffer ouvert sur le fichier.
-*/
-int OldIsAlreadyLoad ( s, text )
-    char *s;
-    Text **text;
-{
-    EdWin **t;
-    Text *tmp = 0;
-    int n = 0;
-    
-    for ( t = TWin; t < TWin + MAXWIN; t++ ) {
-	if ( *t == 0 )
-	  continue;
-	if ( strcmp ( s, (*t) -> text -> filename ) == 0 ) {
-	    n++;
-	    if ( ! tmp )
-	      tmp = (*t) -> text;
-	}
-    }
-    if ( tmp )
-      *text = tmp;
-    return n;
-}
-/*
-**	Function name : IsAlreadyLoad
-**
-**	Description : Pour eviter les ouvertures multiples
-**		de fichiers
 **	Input : Le contexte d'origine.
 **	Ouput : Le nombre de buffer ouvert sur le fichier.
 */
 int IsAlreadyLoad ( filename, from_text, text )
-    char *filename;
-    Text *from_text;
+    const char *filename;
+    const Text *from_text;
     Text **text; /* Return */
 {
@@ -480,8 +458,8 @@ int DeleteWindow ( text )
     }
     if ( tmp -> text -> shell_id != 0 ) {
-      int statusp, pid;
+      int statusp;
       void CleanFd();
       (void) kill ( tmp -> text -> shell_id, SIGKILL );
-      pid = wait ( &statusp );
+      wait ( &statusp );
       (void) CleanFd ( tmp -> text ); 
     }
@@ -561,6 +539,5 @@ int IsLastWindow ( nb )
 **	Ouput :
 */
-void Version ( text )
-    Text *text;
+void Version ()
 {
     char tmp [64];
@@ -578,6 +555,5 @@ void Version ( text )
 **	Ouput :
 */
-void Help ( text )
-    Text *text;
+void Help ()
 {
     DisplayManBox ();
@@ -594,10 +570,10 @@ void Hanoi ( text )
     Text *text;
 {
-  char *msg;
+  const char *msg;
   int nw = text->win_id;
   int tn = 5; /* Nombre de tours */
 
   StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "hanoi", 1, &tn) ;
+  msg = ie_call_function ( text, "hanoi", 1, &tn) ;
   text = update_cwd(nw);
   if ( msg != 0 )
--- new_window.h	1998-10-16 07:02:15.000000000 -0400
+++ new_window.h	2014-12-26 23:53:28.000000000 -0500
@@ -45,14 +45,14 @@
 
 FCT (void, ConfigWindow, (EdWin *e, int width, int height) );
-FCT (EdWin *, CreateWindow, () );
+FCT (EdWin *, CreateWindow, (void) );
 FCT (int, DeleteWindow, (Text *text) );
 FCT (void , DisplayOpenFiles, (Text *text) );
-FCT (void , InitIconPixmap, () );
-FCT (void , Help, (Text *text) );
+FCT (void , InitIconPixmap, (void) );
+FCT (void , Help, (void) );
 FCT (void , Hanoi, (Text *text) );
-FCT (int, IsAlreadyLoad, (char *s, Text *from_text, Text **text) );
+FCT (int, IsAlreadyLoad, (const char *fname, const Text *from_text, Text **text) );
 FCT (int, IsLastWindow, (int nb) );
 FCT (void , NewWindow, (Text *text) );
-FCT (void , Version, (Text *text) );
+FCT (void , Version, (void) );
 
 #endif /* _NEW_WINDOW_H_ */
--- page.c	2002-09-03 08:23:11.000000000 -0400
+++ page.c	2014-12-27 01:37:45.000000000 -0500
@@ -46,4 +46,5 @@
 #include <sys/time.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "main_text.h"
@@ -54,4 +55,5 @@
 #include "color_area.h"
 #include "selection.h"
+#include "chars_cmds.h"
 
 extern Display *dpy;
@@ -240,5 +242,5 @@ void SetLinesTable ( text )
 {
     int line, n = 0, wl = 1;
-    char *s = 0, *hs;
+    char *s = NULL, *hs;
     int len;
     
@@ -251,5 +253,5 @@ void SetLinesTable ( text )
     for ( line = text -> n1; line > 0 ; line-- ) {
 	if (! s)
-	  s = ( char * ) GetBackwardLine ( text -> buf, -line, &len );
+	  s = GetBackwardLine(text -> buf, -line, &len);
 	else
 	  while (*s++ != '\n')
@@ -258,5 +260,5 @@ void SetLinesTable ( text )
 	    if ( text -> sl ) {
 	      hs = s;
-	      s = HscrollString ( s, text );
+	      s = HscrollString(s, text);
 	      text -> page.hs_dl [wl] = s - hs;
 	    }
@@ -278,7 +280,7 @@ void SetLinesTable ( text )
     for ( line = 0; line < text -> n2 + 1 + n; line++ ) {
 	if ( line == 0 )
-	  s = ( char * ) GetCurrentLine ( text -> buf, &len );
+	  s = GetCurrentLine ( text -> buf, &len );
 	else if (line == 1)
-	  s = ( char * ) GetForwardLine ( text -> buf, line, &len );
+	  s = GetForwardLine ( text -> buf, line, &len );
 	else {
 	  if (s) {
@@ -447,5 +449,6 @@ static int DrawLineOfText ( text, li )
 {
     int n = 1;  /* Caracteres en cours de traitement    */
-    char  *p, *s, *pp, *ppp;
+    const char *s;
+    char *p, *pp, *ppp;
     int xx, width, count, binary_flag = False;
 /*    int sizetab = text -> tab_width * text -> blanc_width; */
@@ -864,6 +867,5 @@ static void ScrollUpFewLines ( text, n )
     Buf *buf;
     int len;
-    int sel_was_visible = SelectionIsVisible(text);
-    
+
     buf = text -> buf;
 #ifdef DEBUG
@@ -924,6 +926,5 @@ static void ScrollDownFewLines ( text, n
     Buf *buf;
     int len;
-    int sel_was_visible = SelectionIsVisible(text);
-    
+
     buf = text -> buf;
 #ifdef DEBUG
@@ -1430,14 +1431,13 @@ char *CurrentTextItem ( text )
 {
     int len;
-    char *str, *tmp;
+    char *str;
+    const char *tmp;
     
-    tmp = (char *) GetCurrentLine ( text -> buf, &len );
-    if ( (tmp == 0) || (len == 0) )
+    tmp = GetCurrentLine (text -> buf, &len);
+    if ( (tmp == NULL) || (len == 0) )
       return 0;
-    tmp [len] = 0;
-    str = (char *) malloc ( (unsigned) len + 2 );
-    (void) sprintf ( str, "%s", tmp );
+    str = malloc(len + 1);
+    sprintf(str, "%.*s", len, tmp);
     return (str);
-    
 }
 
--- page.h	1995-02-22 08:03:39.000000000 -0500
+++ page.h	2014-12-26 23:51:34.000000000 -0500
@@ -78,5 +78,5 @@ FCT (void, UpdateTextItem, (Text *text, 
 FCT (void, WatchOff, (Window win) );
 FCT (void, WatchOn, (Window win) );
-FCT (void, klaxon, () );
+FCT (void, klaxon, (void) );
 
 #endif /* _PAGE_H_ */
--- parse.c	2001-10-10 15:55:18.000000000 -0400
+++ parse.c	2014-12-26 23:03:20.000000000 -0500
@@ -61,4 +61,6 @@
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include <X11/Xlib.h>
 #include <X11/Xresource.h>
@@ -89,6 +91,4 @@
 
 extern 	Display *dpy;
-extern 	void exit ();
-extern 	char *getenv ();
 
 FCT (static char *, GetHomeDir, (char *dest) ); 
@@ -107,5 +107,4 @@ FCT (static void, Usage, () ); 
 
 static XrmOptionDescRec opTable [] = {
-  
   {"=",		"*geometry",	XrmoptionIsArg,		(caddr_t) 0 },
   {"-browsergeometry",	"*browsergeometry",	XrmoptionSepArg, (caddr_t) 0 },
@@ -157,5 +156,5 @@ void ParseOpenDisp ( argc, argv )
     char *str_type [10];
     char *displayname;
-    char buf [32];
+    char buf [64];
 
     char *cmd_name = strrchr ( *argv, '/' );
@@ -176,6 +175,5 @@ void ParseOpenDisp ( argc, argv )
      * Malheureusement il faut passer par un fichier intermediaire.
      */
-    bzero ( buf, 32 );
-    (void) sprintf ( buf, "/tmp/xcoral_db%d", getuid() );
+    (void) sprintf (buf, "/tmp/xcoral_db%ld", (long)getuid());
     XrmPutFileDatabase ( commandlineDB, buf );
     if ( (savecommandlineDB = XrmGetFileDatabase (  buf )) != 0 ) 
@@ -201,5 +199,5 @@ void ParseOpenDisp ( argc, argv )
     if ( XrmGetResource ( commandlineDB, "xcoral.display",
 			 "xcoral.display",	str_type, &value ) == True ) {
-	displayname = (char *) malloc ( (unsigned) (value.size + 1) );
+	displayname = malloc (value.size + 1);
 	bzero ( displayname, (int) (value.size + 1));
 	(void) strncpy ( displayname, value.addr, (int) value.size );
@@ -1017,5 +1015,5 @@ static void Usage ()
 unsigned long PixelValue ( display, str, result )
     Display *display;
-    char *str;
+    const char *str;
     int *result;
 {
--- parse.h	1995-02-22 08:03:39.000000000 -0500
+++ parse.h	2014-12-26 01:45:48.000000000 -0500
@@ -44,16 +44,16 @@
 #include "proto_decl.h"
 
-FCT (unsigned long, GetOpBD, () );
-FCT (unsigned int, GetOpBW, () );
+FCT (unsigned long, GetOpBD, (void) );
+FCT (unsigned int, GetOpBW, (void) );
 FCT (unsigned long, GetOpColor, (int type) );
-FCT (char *, GetOpFilename, () );
+FCT (char *, GetOpFilename, (void) );
 FCT (XFontStruct *, GetOpFont, (int type) );
 FCT (int, GetOpGeo, (int type) );
-FCT (void, GetUserDatabase, () );
-FCT (void, MergeOptions, () );
-FCT (int, OpVerbose, () );
+FCT (void, GetUserDatabase, (void) );
+FCT (void, MergeOptions, (void) );
+FCT (int, OpVerbose, (void) );
 FCT (void, ParseOpenDisp, (int *argc, char *argv[]) );
-FCT (unsigned long, PixelValue, (Display *dpy, char *str, int *result) );
-FCT (int, UseColor, () );
+FCT (unsigned long, PixelValue, (Display *dpy, const char *str, int *result) );
+FCT (int, UseColor, (void) );
 
 
--- proc_dict.c	2002-11-24 14:03:43.000000000 -0500
+++ proc_dict.c	2014-12-27 03:31:37.000000000 -0500
@@ -44,4 +44,5 @@
 #endif
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "result_types.h"
@@ -65,7 +66,7 @@ int proc_count = 0;
 */
 ProcRec* create_proc(proc_name, staticp, parsed_file)
-    char* proc_name;
+    const char *proc_name;
     int staticp;
-    char * parsed_file;
+    const char *parsed_file;
 {
   ProcRec**  head;
@@ -99,5 +100,5 @@ ProcRec* create_proc(proc_name, staticp,
 */
 ProcRec* find_proc(proc_name)
-  char* proc_name;
+  const char* proc_name;
 {
   ProcRec**  head;
@@ -114,5 +115,5 @@ ProcRec* find_proc(proc_name)
 */
 void proc_eraze_file(file_name)
-    char * file_name;
+    const char * file_name;
 {
   FileRec * current_file;
--- proc_dict.h	2002-11-24 05:41:19.000000000 -0500
+++ proc_dict.h	2014-12-27 03:10:58.000000000 -0500
@@ -83,9 +83,11 @@ extern  int proc_count;
 */
 
-extern ProcRec*     create_proc   (/* char* proc_name */);
+extern ProcRec*     create_proc   (const char* proc_name, int staticp, const char *parsedfile);
 
-extern ProcRec*     find_proc     (/* char* proc_name */);
+extern ProcRec*     find_proc     (const char* proc_name);
 
-extern void proc_eraze_marked_files();
+extern void proc_eraze_file(const char * file_name);
+
+extern void proc_eraze_marked_files(void);
 
 #endif  /*  PROCDICT_H  */
--- process.c	2001-01-01 07:45:04.000000000 -0500
+++ process.c	2014-12-27 05:01:44.000000000 -0500
@@ -40,4 +40,5 @@
 
 #include <stdio.h>
+#include <unistd.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -46,4 +47,5 @@
 #include <signal.h>
 #include <fcntl.h>
+#include <sys/wait.h>
 
 #if HAVE_STRING_H
@@ -117,7 +119,7 @@ void SetShellMode ( text )
     Text *text;
 {
-    int pid, c_pid;
-    char *shell;
-    
+    pid_t pid, c_pid;
+    const char *shell;
+ 
     if ( strcmp(text -> current_mode -> name, "Shell") != 0 ) {
 	text -> current_mode = (Mode *) GetMode ("Shell");
@@ -153,13 +155,12 @@ void SetShellMode ( text )
       (void) setpgrp ( c_pid, c_pid);
 #endif
-      shell = (char *) getenv("XCORAL_SHELL");
+      shell = getenv("XCORAL_SHELL");
       if (shell == NULL) {
-	shell = (char *) getenv("SHELL");
+	shell = getenv("SHELL");
 	if (shell == NULL) {
-	  shell = (char *) malloc(strlen("/bin/csh")+2);
-	  strcpy(shell,"/bin/csh");
+	  shell = "/bin/csh";
 	}
       }
-      (void) execlp (shell, shell, "-i", 0);
+      (void) execlp (shell, shell, "-i", NULL);
       (void) fprintf ( stderr, "Can't exec shell\n" );
       break;
@@ -217,5 +218,5 @@ void KillShell ( text )
 static void GetExitShell ()
 {
-    int pid;
+    pid_t pid;
     int statusp;
     EdWin **t;
--- process.h	1995-02-22 08:03:40.000000000 -0500
+++ process.h	2014-12-27 05:02:26.000000000 -0500
@@ -44,5 +44,5 @@
 #include "proto_decl.h"
 
-FCT (void, InitShellMode, () );
+FCT (void, InitShellMode, (void) );
 FCT (void, KillShell, (Text *text) );
 FCT (void, ReadFromShell, (Text *text) );
@@ -53,4 +53,5 @@ FCT (void, shell_CtrD, (Text *text) );
 FCT (void, shell_key, (Text *text) );
 FCT (void, shell_return, (Text *text) );
+FCT (void, CleanFd, (Text *text) );
 
 #endif /* _PROCESS_H_ */
--- regex.c	1997-04-15 02:54:31.000000000 -0400
+++ regex.c	2014-12-27 05:37:47.000000000 -0500
@@ -1626,9 +1626,10 @@ regex_compile (pattern, size, syntax, bu
               if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
 
-              if (COMPILE_STACK_EMPTY)
+              if (COMPILE_STACK_EMPTY) {
                 if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
                   goto normal_backslash;
                 else
                   return REG_ERPAREN;
+              }
 
             handle_close:
@@ -1646,9 +1647,10 @@ regex_compile (pattern, size, syntax, bu
 
               /* See similar code for backslashed left paren above.  */
-              if (COMPILE_STACK_EMPTY)
+              if (COMPILE_STACK_EMPTY) {
                 if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
                   goto normal_char;
                 else
                   return REG_ERPAREN;
+              }
 
               /* Since we just checked for an empty stack above, this
@@ -2328,5 +2330,5 @@ typedef struct
    be called from within `PUSH_FAILURE_POINT'.  */
 #define PUSH_FAILURE_ITEM(item)						\
-  fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
+  fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t)(intptr_t)item
 
 /* The complement operation.  Assumes `fail_stack' is nonempty.  */
@@ -2834,5 +2836,5 @@ re_set_registers (bufp, regs, num_regs, 
       bufp->regs_allocated = REGS_UNALLOCATED;
       regs->num_regs = 0;
-      regs->start = regs->end = (regoff_t) 0;
+      regs->start = regs->end = NULL;
     }
 }
@@ -4878,5 +4880,5 @@ size_t
 regerror (errcode, preg, errbuf, errbuf_size)
     int errcode;
-    regex_t *preg;
+    const regex_t *preg __attribute__((unused));
     char *errbuf;
     size_t errbuf_size;
--- regex.h	1996-09-04 07:12:57.000000000 -0400
+++ regex.h	2014-12-27 05:38:06.000000000 -0500
@@ -476,5 +476,5 @@ extern int regexec
              regmatch_t pmatch[], int eflags));
 extern size_t regerror
-  _RE_ARGS ((int errcode, regex_t *preg, char *errbuf,
+  _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf,
              size_t errbuf_size));
 extern void regfree _RE_ARGS ((regex_t *preg));
--- result_types.h	1997-12-03 04:26:29.000000000 -0500
+++ result_types.h	2014-12-27 03:02:43.000000000 -0500
@@ -57,5 +57,5 @@ typedef int LineNumber;
 
 
-typedef char* StringTable[];
+typedef char** StringTable;
 
 
@@ -125,8 +125,8 @@ typedef struct Position Position;
 #define GET_METHOD_CLASS(pt)    (get_method_class(pt))
 
-extern char* get_method_class();
+extern const char* get_method_class(const char *method_name);
 
 #define GET_ATTRIBUTE_CLASS(pt)    (get_attribute_class(pt))
-extern char* get_attribute_class();
+extern const char* get_attribute_class(const char *class_name);
 
 #define HIDED(pt) ((pt)[-2] == 'H')
--- scroll.c	2003-02-05 07:58:53.000000000 -0500
+++ scroll.c	2014-12-26 01:52:34.000000000 -0500
@@ -56,4 +56,5 @@
 #include "parse.h"
 #include "buttons_bits.h"
+#include "tbox.h"
 
 static char gray [] = { 0x1, 0x02 };
@@ -127,5 +128,5 @@ void InitScroll ( display )
     
     if ((depth == 16)||(depth == 24)) {
-      sb_up_im = (XImage *)LoadImage256 ((char **) xpm_sb_up_bits);
+      sb_up_im = LoadImage256 (xpm_sb_up_bits);
       sb_up_pix = XCreatePixmap (display, DefaultRootWindow (display),
 				 SCROLL_BUTTONS_WIDTH, SCROLL_BUTTONS_HEIGHT, depth);
@@ -133,5 +134,5 @@ void InitScroll ( display )
 		 SCROLL_BUTTONS_WIDTH, SCROLL_BUTTONS_HEIGHT);
       
-      sb_down_im = (XImage *)LoadImage256 ((char **) xpm_sb_down_bits);
+      sb_down_im = LoadImage256 (xpm_sb_down_bits);
       sb_down_pix = XCreatePixmap (display, DefaultRootWindow (display),
 				   SCROLL_BUTTONS_WIDTH, SCROLL_BUTTONS_HEIGHT, depth);
@@ -139,5 +140,5 @@ void InitScroll ( display )
 		 SCROLL_BUTTONS_WIDTH, SCROLL_BUTTONS_HEIGHT);
 
-      sb_down_im_run = (XImage *)LoadImage256 ((char **) xpm_sb_down_bits_run);
+      sb_down_im_run = LoadImage256 (xpm_sb_down_bits_run);
       sb_down_pix_run = XCreatePixmap (display, DefaultRootWindow (display),
 				   SCROLL_BUTTONS_WIDTH, SCROLL_BUTTONS_HEIGHT, depth);
@@ -145,5 +146,5 @@ void InitScroll ( display )
 		 SCROLL_BUTTONS_WIDTH, SCROLL_BUTTONS_HEIGHT);
 
-      sb_up_im_run = (XImage *)LoadImage256 ((char **) xpm_sb_up_bits_run);
+      sb_up_im_run = LoadImage256 (xpm_sb_up_bits_run);
       sb_up_pix_run = XCreatePixmap (display, DefaultRootWindow (display),
 				 SCROLL_BUTTONS_WIDTH, SCROLL_BUTTONS_HEIGHT, depth);
@@ -152,5 +153,5 @@ void InitScroll ( display )
     }
     else {
-      sb_up_pix = 
+      sb_up_pix =
 	XCreatePixmapFromBitmapData ( display, root, (char *) sb_up_bits,
 				     SCROLL_BUTTONS_WIDTH, SCROLL_BUTTONS_HEIGHT,
--- scroll.h	2002-12-16 03:12:41.000000000 -0500
+++ scroll.h	2014-12-26 00:48:05.000000000 -0500
@@ -99,4 +99,6 @@ FCT (void, SetScrollBarSize, (Display *d
 FCT (void, SetScrollLine, (SWin *swin, int n) );
 FCT (void, ShowScrollFrame, (Display *display, SWin *s) );
+FCT (void, Display3DArrow, (SWin *, Window, int run) );
+
 
 #define SetScrollFont(s, f)	(s -> font = f)
--- selection.h	2001-01-06 06:58:16.000000000 -0500
+++ selection.h	2014-12-26 22:50:13.000000000 -0500
@@ -43,5 +43,5 @@
 #include "proto_decl.h"
 
-typedef struct _Selection {
+struct _Selection {
   int select;     /* Pour undiquer une selection */
   int start_line; /* Numero de la ligne ou commence la selection */
@@ -55,16 +55,19 @@ typedef struct _Selection {
   int s_sl;         /* Scroll horizontal au debut */
   int e_sl;         /* Scroll horizontal a la fin */
-} Selection;
+};
 
-extern void ClearSelection ();
-extern unsigned long HandleSelection ();
-extern void UpdateSelection ();
-extern void RefreshSelection ();
-extern void InitSelection();
-extern int SelectionIsVisible();
-extern void StartSelection();
-extern void EndSelection();
-extern void UpdateSelection();
-extern void ClearSelectionIfNeeded();
+typedef struct _Selection Selection;
+struct _Text;
 
-#endif /* _SELECTION_H_ */
+extern void ClearSelection(struct _Text *, int select);
+extern unsigned long HandleSelection(struct _Text *);
+extern void UpdateSelection(struct _Text *);
+extern void RefreshSelection(struct _Text *);
+extern void InitSelection(Display *, unsigned long fg, unsigned long bg);
+extern int SelectionIsVisible(const struct _Text *);
+extern void StartSelection(struct _Text *);
+extern void EndSelection(struct _Text *);
+extern void UpdateSelection(struct _Text *);
+extern void ClearSelectionIfNeeded(struct _Text *);
+
+#endif /* _SELECTION_H_ */
\ No newline at end of file
--- tbox.c	2008-01-09 11:49:25.000000000 -0500
+++ tbox.c	2014-12-27 05:46:18.000000000 -0500
@@ -39,4 +39,5 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -46,13 +47,14 @@
 #include "options.h" 
 #include "xc_conf.h" 
-#include "tbox.h" 
+#define DEFINE_BITMAPS
+#include "tbox.h"
+#include "parse.h"
+#include "main_events.h"
+#include "shadow.h"
 
 extern Display *dpy;
 static  Atom trombines_del;
-static  int display_tbox = True;
 
 XImage *image[3];
-XImage * LoadImage16 ();
-XImage * LoadImage256 ();
 
 int no_image = False;
@@ -79,5 +81,5 @@ void InitTrombinesBox() 
     XGCValues	 gcv;
     XSizeHints sizehints;
-    int visual_matched, i;
+    int visual_matched;
     
     black = BlackPixel ( dpy, DefaultScreen ( dpy ));
@@ -192,37 +194,13 @@ void InitTrombinesBox() 
 }
 
-int getDepth(unsigned long xx, int *max_value)
-{
-  unsigned long mask = xx; 
-  int i,j;
-
-  for(i=1;i<32;i++){
-    if ((mask & 1)==1) {
-      *max_value = mask+1;
-      for(i=1;i<16;i++){
-	mask = mask >> 1;
-	if(mask==0)
-	  break;
-      }
-      break;
-    }
-    mask = mask >> 1;
-  }
-  return i;
-}
-
 /* On affiche en noir et blanc */
-XImage * LoadImage16(char **xpm)
+XImage * LoadImage16(const char * const *xpm)
 {
   /* Pour les Sun et autres engins a 8 plans !!! on affiche en niveau de gris*/
   int wp, hp, ncp, ncpp; /* infos pixmap */
-  unsigned long *p;
   int i, j, index, dd;
-  char c1,c2,c3;
-  unsigned char rr, gg, bb;
+  char c1;
   XColor xcolor;
   rgb cm[1024];
-  rgb cm2[512];
-  rgb cm3[128];
   XImage *image;
   int depth;
@@ -240,13 +218,12 @@ XImage * LoadImage16(char **xpm)
   for (i=0;i<512;i++)cm[i].x = 0;
   for (i=1;i<(ncp+1);i++){ /* de 1 a 16*/
-    c1 = (char) ((char *)xpm[i])[0];
+    c1 = xpm[i][0];
     index = ((c1-7) * (c1-3)) % 507;
     if(cm[index].x == 0) {
       cm[index].x = 1;
-      strncpy (cm[index].rrggbb,(char *)(xpm[i]+5),6);
       cm[index].c1 = c1;
       
       /* recherche du niveau de gris, les 3 composantes ont le meme poids */
-      sscanf(((char *)(cm[index].rrggbb)),"%2X", &dd);
+      sscanf(xpm[i] + 5, "%2X", &dd);
       xcolor.red = (unsigned short)dd<<8;
       xcolor.green = (unsigned short)dd<<8;
@@ -265,5 +242,5 @@ XImage * LoadImage16(char **xpm)
 
   /* Cration de la structure pour l'image */
-  data = (char *) malloc (( wp * hp * 4 ));
+  data = malloc (( wp * hp * 4 ));
   bzero (data, (wp * hp * 4 ));
   
@@ -284,5 +261,5 @@ XImage * LoadImage16(char **xpm)
   for(i=0;i<hp;i++){
     for(j=0;j<wp;j++){
-      c1 = (char) (((char *)xpm[ncp+1+i])[j]);
+      c1 = xpm[ncp+1+i][j];
       index = ((c1-7) * (c1-3)) % 507;
       if(cm[index].c1 == c1){
@@ -321,17 +298,14 @@ unsigned long getPixelColor (unsigned ch
 }
 
-XImage * LoadImage256(char **xpm)
+XImage * LoadImage256(const char * const *xpm)
 {
     int wp, hp, ncp, ncpp; /* infos pixmap */
-    char c1,c2,c3;
-    unsigned char rr, gg, bb;
-    unsigned long *p;
-    int i, j, index, dd;
-    char buf[2];
-    XColor xcolor;
-    rgb cm[1024];
-    rgb cm2[512];
-    rgb cm3[128];
-    rgb cm4[256];
+    char c1,c2;
+    unsigned int rr, gg, bb;
+    int i, j, index;
+    rgb cm[1024] = { { 0 } };
+    rgb cm2[512] = { { 0 } };
+    rgb cm3[128] = { { 0 } };
+    rgb cm4[256] = { { 0 } };
     XImage * image;
     int depth;
@@ -348,29 +322,18 @@ XImage * LoadImage256(char **xpm)
   sscanf (xpm[0],"%d %d %d %d", &wp, &hp, &ncp, &ncpp);
   
-  for (i=0;i<1024;i++)cm[i].x = 0;      
-  for (i=0;i<512;i++)cm2[i].x = 0;      
-  for (i=0;i<128;i++)cm3[i].x = 0;      
-  for (i=0;i<256;i++)cm4[i].x = 0;      
   for (i=1;i<(ncp+1);i++){
-    rr = gg = bb = dd = 0;
-    c1 = (char) ((char *)xpm[i])[0];
-    c2 = (char) ((char *)xpm[i])[1];
+    rr = gg = bb = 0;
+    c1 = xpm[i][0];
+    c2 = xpm[i][1];
     index = ((c1-7) * (c2-3)) % 1007;
     if(cm[index].x == 0) {
       cm[index].x = 1;
-      if (((char)((char *)xpm[i])[5])=='N'){ /* (None. Pas de couleur */
+      if (xpm[i][5] == 'N'){ /* (None. Pas de couleur */
 	rr=gg=bb=0;
       }
       else {
-	strncpy (cm[index].rrggbb,(char *)(xpm[i]+6),6);
-	sscanf(((char *)(cm[index].rrggbb)),"%2X", &dd);
-	rr = (unsigned char) dd;
-	sscanf(((char *)(cm[index].rrggbb)+2),"%2X", &dd);
-	gg = (unsigned char) dd;
-	sscanf(((char *)(cm[index].rrggbb)+4),"%2X", &dd);
-	bb = (unsigned char) dd;
+	sscanf(xpm[i] + 6, "%2X%2X%2X", &rr, &gg, &bb);
       }
       cm[index].pixel = getPixelColor(rr,gg,bb);
-      cm[index].rrggbb[6]='\0';
       cm[index].c1 = c1;
       cm[index].c2 = c2;
@@ -380,13 +343,6 @@ XImage * LoadImage256(char **xpm)
       if(cm2[index].x == 0) {
 	cm2[index].x = 1;
-	strncpy (cm2[index].rrggbb,(char *)(xpm[i]+6),6);
-	sscanf(((char *)(cm2[index].rrggbb)),"%2X", &dd);
-	rr = (unsigned char) dd;
-	sscanf(((char *)(cm2[index].rrggbb)+2),"%2X", &dd);
-	gg = (unsigned char) dd;
-	sscanf(((char *)(cm2[index].rrggbb)+4),"%2X", &dd);
-	bb = (unsigned char) dd;
+	sscanf(xpm[i] + 6, "%2X%2X%2X", &rr, &gg, &bb);
 	cm2[index].pixel = getPixelColor(rr,gg,bb);
-	cm2[index].rrggbb[6]='\0';
 	cm2[index].c1 = c1;
 	cm2[index].c2 = c2;
@@ -396,13 +352,6 @@ XImage * LoadImage256(char **xpm)
 	if(cm3[index].x == 0) {
 	  cm3[index].x = 1;
-	  strncpy (cm3[index].rrggbb,(char *)(xpm[i]+6),6);
-	  sscanf(((char *)(cm3[index].rrggbb)),"%2X", &dd);
-	  rr = (unsigned char) dd;
-	  sscanf(((char *)(cm3[index].rrggbb)+2),"%2X", &dd);
-	  gg = (unsigned char) dd;
-	  sscanf(((char *)(cm3[index].rrggbb)+4),"%2X", &dd);
-	  bb = (unsigned char) dd;
+	  sscanf(xpm[i] + 6, "%2X%2X%2X", &rr, &gg, &bb);
 	  cm3[index].pixel = getPixelColor(rr,gg,bb);
- 	  cm3[index].rrggbb[6]='\0';
 	  cm3[index].c1 = c1;
 	  cm3[index].c2 = c2;
@@ -412,18 +361,11 @@ XImage * LoadImage256(char **xpm)
 	  if(cm4[index].x == 0) {
 	    cm4[index].x = 1;
-	    strncpy (cm4[index].rrggbb,(char *)(xpm[i]+6),6);
-	    sscanf(((char *)(cm4[index].rrggbb)),"%2X", &dd);
-	    rr = (unsigned char) dd;
-	    sscanf(((char *)(cm4[index].rrggbb)+2),"%2X", &dd);
-	    gg = (unsigned char) dd;
-	    sscanf(((char *)(cm4[index].rrggbb)+4),"%2X", &dd);
-	    bb = (unsigned char) dd;
+	    sscanf(xpm[i] + 6, "%2X%2X%2X", &rr, &gg, &bb);
 	    cm4[index].pixel = getPixelColor(rr,gg,bb);
-	    cm4[index].rrggbb[6]='\0';
 	    cm4[index].c1 = c1;
 	    cm4[index].c2 = c2;
 	  }
 	  else
-	    printf("brrr index = %d c1 = %d c2 = %d %s\n", index, c1, c2, cm[index].rrggbb);
+	    printf("brrr index = %d c1 = %d c2 = %d %s\n", index, c1, c2, xpm[i] + 6);
 	  }
       }
@@ -432,5 +374,5 @@ XImage * LoadImage256(char **xpm)
 
   /* Cration de la structure pour l'image */
-  data = (char *) malloc (( wp * hp * 4 ));
+  data = malloc (( wp * hp * 4 ));
   bzero (data, (wp * hp * 4 ));
   image = XCreateImage(dpy, 
@@ -449,6 +391,6 @@ XImage * LoadImage256(char **xpm)
   for(i=0;i<hp;i++){
     for(j=0;j<wp;j++){
-      c1 = (char) (((char *)xpm[ncp+1+i])[(2*j)]);
-      c2 = (char) (((char *)xpm[ncp+1+i])[(2*j)+1]);
+      c1 = xpm[ncp+1+i][2*j];
+      c2 = xpm[ncp+1+i][2*j + 1];
       index = ((c1-7) * (c2-3)) % 1007;
       if((cm[index].c1 == c1) && (cm[index].c2 == c2)) 
@@ -460,10 +402,8 @@ XImage * LoadImage256(char **xpm)
 	else {
 	  index = ((c1-7) * (c2-3)) % 119;
-	  if((cm3[index].c1 == c1) && (cm3[index].c2 == c2))
+	  if(index >= 0 && (cm3[index].c1 == c1) && (cm3[index].c2 == c2))
 	      XPutPixel (image, j, i, cm3[index].pixel);
-	  else {
-	    index = ((c1-7) * (c2-3)) % 201;
-	    XPutPixel (image, j, i, cm4[index].pixel);
-	  }
+	  else if ((index = ((c1-7) * (c2-3)) % 201) >= 0)
+	      XPutPixel (image, j, i, cm4[index].pixel);
 	}
       }
--- tbox.h	2001-04-21 19:48:46.000000000 -0400
+++ tbox.h	2014-12-26 00:13:45.000000000 -0500
@@ -10,5 +10,4 @@
 typedef struct _rgb {
   unsigned long pixel;
-  char rrggbb[7];
   char c1, c2;
   int x;
@@ -27,17 +26,20 @@ typedef struct _TBox {
 } TBox;
 TBox trombines_box;
-FCT (void, DisplayTrombines, () );
+FCT (void, DisplayTrombines, (void) );
 
 FCT (void, ConfigTrombinesBox, (int width, int height) );
-FCT (void, DisplayTrombines, () );
+FCT (void, DisplayTrombines, (void) );
 FCT (int, ExposeTrombinesBox, (XEvent *ev) );
-FCT (void, InitTrombinesBox, () );
+FCT (void, InitTrombinesBox, (void) );
 FCT (int, ButtonTrombinesBox, ( XButtonEvent * ev ));
+FCT (XImage *, LoadImage16, (const char * const *xpm));
+FCT (XImage *, LoadImage256, (const char * const *xpm));
 
 #define GetTrombinesBoxFrame() (trombines_box.frame)
 
 
+#ifdef DEFINE_BITMAPS
 /* XPM */
-static char *bp_16gray[] = {
+static const char *bp_16gray[] = {
 /* width height ncolors chars_per_pixel */
 "110 150 16 1",
@@ -212,5 +214,5 @@ static char *bp_16gray[] = {
 };
 /* XPM */
-static char *bp_256[] = {
+static const char *bp_256[] = {
 /* width height ncolors chars_per_pixel */
 "110 150 256 2",
@@ -625,5 +627,5 @@ static char *bp_256[] = {
 };
 /* XPM */
-static char *dl_16gray[] = {
+static const char *dl_16gray[] = {
 /* width height ncolors chars_per_pixel */
 "110 150 14 1",
@@ -796,5 +798,5 @@ static char *dl_16gray[] = {
 };
 /* XPM */
-static char *dl_256[] = {
+static const char *dl_256[] = {
 /* width height ncolors chars_per_pixel */
 "110 150 256 2",
@@ -1209,5 +1211,5 @@ static char *dl_256[] = {
 };
 /* XPM */
-static char *lf_16gray[] =
+static const char *lf_16gray[] =
 {
 /* width height ncolors chars_per_pixel */
@@ -1384,5 +1386,5 @@ static char *lf_16gray[] =
 
 /* XPM */
-static char *lf1_16gray[] = {
+static const char *lf1_16gray[] = {
 /* width height ncolors chars_per_pixel */
 "110 150 16 1",
@@ -1557,5 +1559,5 @@ static char *lf1_16gray[] = {
 };
 /* XPM */
-static char *lf_256[] = {
+static const char *lf_256[] = {
 /* width height num_colors chars_per_pixel */
 "110 150 249 2",
@@ -1964,5 +1966,5 @@ static char *lf_256[] = {
 
 /* XPM */
-static char *lf1_256[] = {
+static const char *lf1_256[] = {
 /* width height ncolors chars_per_pixel */
 "110 150 256 2",
@@ -2376,4 +2378,5 @@ static char *lf1_256[] = {
 ".b.).).e j < j j w j j j ; ; j.3X0X0.3.3.3 j j HX6X6.3.3X0 jX6 H j j.3Xm j.) jX%X%X%X% @X% @.q.q.q.qX%.qX% @X%X%X%X%X$.M.c <.bX4X4X4X4X4X6.3X6.3.3.3X6.3X0.3.3X0X6X6 ;X. H w w.c.M.e < < <.e.e.eX$X$.e < < < < <.M.c < <.I.I"
 };
+#endif
 
 #endif /* _TBOX_H_ */
--- text_cursor.c	2002-09-03 04:59:49.000000000 -0400
+++ text_cursor.c	2014-12-27 01:46:49.000000000 -0500
@@ -61,4 +61,5 @@
 #include "page.h"
 #include "selection.h"
+#include "handle_key.h"
 
 FCT (static void, GetCurrentXY, (Text *text, int *x, int *y, char *c) );
@@ -250,7 +251,7 @@ int MoveToXYinTextWindow ( text, x, y )
     int x, y;
 {
-    char *s, *sh;
+    const char *s;
+    const char *sh;
     int i, cur_line, new_line, delta;
-    char *HscrollString ();
     int len;
     
@@ -517,15 +518,14 @@ static void GetCurrentXY ( text, x, y, c
     char *c;	/* RETURN */
 {
-    char *s;  /* Current line */
-    char *cl; /* Current line from left */
+    const char *s;  /* Current line */
+    const char *cl; /* Current line from left */
     int n, n0;
     int len, clipx;
     int nc_l;
-    char *HscrollString ();
-    
+
     if ( TextInBuf ( text ) == False ) {
 	*x = text -> x_or;
 	*y = text -> y_or;
-	*c = 0;
+	*c = '\0';
 	return;
     }
@@ -615,5 +615,5 @@ static void GetCurrentXY ( text, x, y, c
 int MyTextWidth ( text, str, i )
     Text *text;
-    char *str;
+    const char *str;
     int i;
 {
@@ -624,7 +624,6 @@ int MyTextWidth ( text, str, i )
     int sizetab = tab_width * text -> blanc_width;
     xx = x = width = 0;
-    p = s = str;
 
-    if ( str == 0 ) 
+    if (str == NULL) 
       (void) fprintf ( stderr, "Internal Error 3...\n" );
     
@@ -638,11 +637,6 @@ int MyTextWidth ( text, str, i )
     if ( count == 0 )
       return 0;
-    else if ( count > 1 ) {
-      pp = (char *) malloc ((unsigned) count + 1);
-      (void) bcopy ( str, pp, count );
-    }
-    else
-	pp = str;
-	  
+    pp = strdup(str);
+
     p = pp;
     s = pp;
@@ -653,5 +647,5 @@ int MyTextWidth ( text, str, i )
 	}
 	p++;
-	count --;
+	count--;
     }
     p = pp; /* Pour replacer p au debut de la chaine */
@@ -677,6 +671,5 @@ int MyTextWidth ( text, str, i )
     }
     x += XTextWidth ( text -> font, s, n - 1 );
-    if ( count > 1 )
-      (void) free (pp);
+    free (pp);
     return (x);
 }
@@ -691,6 +684,6 @@ int MyTextWidth ( text, str, i )
 **		a la tabulation souhaitee.
 */
-char *HscrollString ( s, text )
-    char *s;
+char *HscrollString (s, text)
+    const char *s;
     Text *text;
 {
@@ -714,5 +707,5 @@ char *HscrollString ( s, text )
 	d--;
     }
-    return s;
+    return (char *)s;
 }
 
--- text_cursor.h	1996-09-18 07:59:40.000000000 -0400
+++ text_cursor.h	2014-12-27 01:38:34.000000000 -0500
@@ -49,5 +49,5 @@ FCT (int, ForwardChar, (Text *text) );
 FCT (void, FreezeTextCursor, (Text *text) );
 FCT (void, GotoLeft, (Text *text) );
-FCT (char *, HscrollString, (char *s, Text *text) );
+FCT (char *, HscrollString, (const char *s, Text *text) );
 FCT (void, MoveToBline, (Text *text) );
 FCT (void, MoveToEline, (Text *text) );
@@ -57,5 +57,5 @@ FCT (void, TextCursorOff, (Text *text) )
 FCT (void, UnFreezeTextCursor, (Text *text) );
 FCT (void, UpCursor, (Text *text) );
-FCT (int, MyTextWidth, (Text *text,char *str, int i) );
+FCT (int, MyTextWidth, (Text *text, const char *str, int i) );
 
 #endif /* _TEXT_CURSOR_H_ */
--- tool_bar.c	2001-10-21 16:24:50.000000000 -0400
+++ tool_bar.c	2014-12-27 05:42:39.000000000 -0500
@@ -39,4 +39,5 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -65,4 +66,5 @@
 #include "buttons_bits.h"
 #include "browser_init.h"
+#include "tbox.h"
 
 extern Display *dpy;
@@ -91,5 +93,5 @@ void (*f_tb_window []) () = {
 };
 
-static unsigned char *bname [] = {
+static const char *bname [] = {
   "Open file",
   "New window",
@@ -114,5 +116,5 @@ static unsigned char *bname [] = {
 };
 
-static unsigned char *bitmap_name [] = {
+static const char *bitmap_name [] = {
   dired_bits,
   new_window_bits,
@@ -137,5 +139,5 @@ static unsigned char *bitmap_name [] = {
 };
 
-static unsigned char **xpm_name [] = {
+static const char **xpm_name [] = {
   xpm_dired_bits,
   xpm_new_window_bits,
@@ -223,5 +225,5 @@ void InitToolBar(bg, ts, bs)
   for (i=0;i<N_BTOOLS;i++) {
     if ((depth == 16)||(depth == 24)) {
-      b_image [i] = (XImage *)LoadImage256 ((char **)xpm_name [i]);
+      b_image [i] = LoadImage256 (xpm_name [i]);
       b_pix [i] = XCreatePixmap (dpy, root, 32, 32, depth);
       XPutImage (dpy, b_pix [i], tb_gc, b_image[i], 0, 0, 0, 0, 32, 32);
@@ -254,5 +256,5 @@ ToolBar *CreateToolBar(parent, x, y)
   XWindowAttributes att;
   
-  ToolBar *tb = (ToolBar *) malloc (sizeof(ToolBar)+2);
+  ToolBar *tb = malloc (sizeof(ToolBar)+2);
    
   depth = DefaultDepth ( dpy, DefaultScreen ( dpy ));
@@ -268,5 +270,5 @@ ToolBar *CreateToolBar(parent, x, y)
 			  BlackPixel(dpy, DefaultScreen(dpy)),
 			  WhitePixel(dpy, DefaultScreen(dpy)));
-    
+
     tb -> tw [i].f = f_tb_window[i];
     XSelectInput ( dpy, tb -> tw [i].w, ExposureMask | ButtonPressMask | ButtonReleaseMask  
@@ -292,9 +294,9 @@ ToolBar *CreateToolBar(parent, x, y)
 
   if ((depth == 16)||(depth == 24)) {
-    logo_image = (XImage *)LoadImage256 ((char **)xpm_logo);
+    logo_image = LoadImage256 (xpm_logo);
     logo_pixmap = XCreatePixmap (dpy, root, 32, 32, depth);
     /* Le mask */
     logo_mask = XCreatePixmapFromBitmapData ( dpy, root, 
-				   logo_bits,
+				   (char *)logo_bits,
 				   TOOL_WINDOW_SIZE,
 				   TOOL_WINDOW_SIZE, 
@@ -307,5 +309,5 @@ ToolBar *CreateToolBar(parent, x, y)
   logo_pix = XCreatePixmapFromBitmapData ( dpy, root, 
 				   /* xlogo32_bits, */
-					  bwlogo_bits,
+				   (char *)bwlogo_bits,
 				   TOOL_WINDOW_SIZE,
 				   TOOL_WINDOW_SIZE, 
@@ -314,5 +316,5 @@ ToolBar *CreateToolBar(parent, x, y)
  
   slogo_pix = XCreatePixmapFromBitmapData ( dpy, root,
-					   slogo_bits,
+					   (char *)slogo_bits,
 					   40, 8,
 					   BlackPixel(dpy, DefaultScreen(dpy)),
--- tool_bar.h	2001-08-15 09:23:37.000000000 -0400
+++ tool_bar.h	2014-12-27 05:45:04.000000000 -0500
@@ -51,5 +51,5 @@ typedef struct _btool_window {
         void    (* f) ();
 	Pixmap pix;
-	char *title;
+	const char *title;
 }tool_window;
 
@@ -60,4 +60,5 @@ typedef struct _ToolBar {
 } ToolBar;
 
+struct EdWin;
 
 FCT (ToolBar *, CreateToolBar, (Window parent, int x, int y) );
@@ -65,4 +66,6 @@ FCT (void, DisplayToolBar, (ToolBar *too
 FCT (int, ExposeToolBar, (ToolBar *tool_bar, XEvent *ev) );
 FCT (void, InitToolBar, (unsigned long bg, unsigned long ts, unsigned long bs) );
+FCT (int, EnterInToolBar, (struct EdWin *, Window) );
+FCT (int, ToolBarButton, (struct EdWin *, XEvent *) );
 
 #endif /* _TOOLS_BAR_H_ */
--- undo.c	2001-06-18 07:09:31.000000000 -0400
+++ undo.c	2014-12-27 01:34:33.000000000 -0500
@@ -5,5 +5,5 @@
    File: undo.c
    Path: /home/fournigault/c/X11/xcoral-2.31/undo.c
-   Description: 
+   Description:
    Created: Fri Jan 27 11:38:09 MET 1995
    Author: Lionel Fournigault
@@ -12,9 +12,9 @@
 
    RCS $Revision$ $State$
-   
+
 
    ########################################################################
 
-   Note: 
+   Note:
 
    ########################################################################
@@ -73,8 +73,8 @@ FCT (static void, Do_UDelOneChar, (Text 
 FCT (static void, Do_UReplace, (Text *text,int type, int old_line, int old_pos) );
 FCT (static Undo *, GetCurrentUndo, (Text *text) );
-FCT (static void, U_AddChars, (Text *text, int type, char *s, int len, int n) );
-FCT (static void, U_DelChars, (Text *text, char *s, int len) );
-FCT (static void, U_OneChar, (Text *text, int len, char *s, char *sr, int type) );
-FCT (static void, U_RepAlloc, (char **p, char *str) );
+FCT (static void, U_AddChars, (Text *text, int type, const char *s, int len, int n) );
+FCT (static void, U_DelChars, (Text *text, const char *s, int len) );
+FCT (static void, U_OneChar, (Text *text, int len, const char *s, const char *sr, int type) );
+FCT (static void, U_RepAlloc, (char **p, const char *str) );
 
 static int flag_redo = 0;
@@ -84,10 +84,4 @@ extern Display *dpy;
 /* #define U_TRACE */
 
-FCT (void, DeleteUndo, (Text *text));
-FCT (void, ResetUndo, (Text *text));
-FCT (void, StoreInUndo, (Text *text, char *s, char *sr, int len, int n, int type));
-FCT (void, DoUndo, (Text *text));
-FCT (void, DoUndoUndo, (Text *text));
-
 /*
 **	Pour le buffer courant, les infos seront stokees dans
@@ -110,5 +104,5 @@ static Undo *GetCurrentUndo ( text )
     int index = 0;
     Undo *tmp = text -> udi;
-    
+
     while ( index != text -> u_index ) {
 	tmp = tmp -> next;
@@ -141,5 +135,5 @@ void DeleteUndo ( text )
     int i =0;
 #endif /* U_TRACE */
-    
+
     if ( current_u == 0 ) {
 #ifdef U_TRACE
@@ -148,9 +142,9 @@ void DeleteUndo ( text )
 	return;
     }
-    
+
     while ( True ) {
 	if ( current_u -> buf  != 0 ) {
 #ifdef U_TRACE
-	    (void) fprintf ( stderr, "DeleteUndo : free (buf) %d\n",  
+	    (void) fprintf ( stderr, "DeleteUndo : free (buf) %d\n",
 			    current_u -> buf );
 #endif /* U_TRACE */
@@ -166,5 +160,5 @@ void DeleteUndo ( text )
 	if ( current_u -> str_new != 0 ) {
 #ifdef U_TRACE
-	    (void) fprintf ( stderr, "DeleteUndo : free (str_new) %d\n", 
+	    (void) fprintf ( stderr, "DeleteUndo : free (str_new) %d\n",
 			    current_u -> str_new );
 #endif /* U_TRACE */
@@ -175,5 +169,5 @@ void DeleteUndo ( text )
 	    (void) fprintf ( stderr, "DeleteUndo : free (end) %d\n",  current_u );
 #endif /* U_TRACE */
-	    (void) free ( (char *) current_u );		
+	    (void) free ( (char *) current_u );
 #ifdef U_TRACE
 	    i++;
@@ -193,5 +187,5 @@ void DeleteUndo ( text )
     (void) fprintf ( stderr, "DeleteUndo : free %d undo elements %d\n", i );
 #endif /* U_TRACE */
-    
+
 }
 
@@ -200,5 +194,5 @@ void DeleteUndo ( text )
 **
 **	Description : Alloue une structure Undo et mise a zero
-**	Input : 
+**	Input :
 **	Ouput : Le pointeur sur la structure ou 0 si ya plus de memoire.
 */
@@ -206,13 +200,13 @@ static Undo *AllocUndoBuf ()
 {
     Undo *tmp;
-    
+
     if (( tmp = (Undo *) malloc ((unsigned) sizeof (Undo))) == 0 )
       return 0;
-    
+
     bzero ( (char *) tmp, sizeof (Undo));
 #ifdef U_TRACE
     (void) fprintf ( stderr, "AllocUndoBuf : %d\n", tmp );
 #endif /* U_TRACE */
-    
+
     return (tmp);
 }
@@ -222,5 +216,5 @@ static Undo *AllocUndoBuf ()
 **
 **	Description : Mise a zero de la liste.
-**		
+**
 **	Input : 	Le Text courant
 **	Ouput :
@@ -235,7 +229,7 @@ void ResetUndo ( text )
 	return;
     }
-    
+
     DeleteUndo ( text );
-    
+
     text -> udi = 0;
     text -> u_index = 0;
@@ -251,5 +245,5 @@ void ResetUndo ( text )
 **		passe dans cette fonction.
 **
-**	Input : 
+**	Input :
 **		Le Text courant,
 **		La chaine ajoutee ou enlevee,
@@ -258,10 +252,10 @@ void ResetUndo ( text )
 **		Le nombre de lignes dans la chaine,
 **		Le type de l'operation.
-**		
+**
 **	Ouput :
 */
 void StoreInUndo ( text, s, sr, len ,n, type )
     Text *text;
-    char *s, *sr;
+    const char *s, *sr;
     int len;
     int n;
@@ -269,9 +263,9 @@ void StoreInUndo ( text, s, sr, len ,n, 
 {
     Undo *new_udi;
-    
-    if ( text -> shell_id != 0 ) 
+
+    if ( text -> shell_id != 0 )
       return;
-    
-    if ( s == 0 ) {
+
+    if (s == NULL) {
 #ifdef U_TRACE
 	(void) fprintf ( stderr, "StoreInUndo : (null) string\n" );
@@ -279,5 +273,5 @@ void StoreInUndo ( text, s, sr, len ,n, 
 	return;
     }
-    
+
     /*
        * Si des 'undo' ont ete effectues, alors on les vire.
@@ -285,8 +279,8 @@ void StoreInUndo ( text, s, sr, len ,n, 
     if ( text -> u_index != 0 )
       CompactUndo ( text );
-    
-    if ( (new_udi = AllocUndoBuf ()) == 0 ) 
+
+    if ( (new_udi = AllocUndoBuf ()) == 0 )
       (void) fprintf ( stderr, "Hum... AllocUndoBuf memory error\n" );
-    
+
     if ( text -> udi != 0 ) {
 #ifdef U_TRACE
@@ -297,19 +291,19 @@ void StoreInUndo ( text, s, sr, len ,n, 
     }
     text -> udi = new_udi;
-    
+
     if ( len == 1 || len == -1 ) {
-	/* 
-	   * on ajoute ou on enleve 1 seul caractere 
+	/*
+	   * on ajoute ou on enleve 1 seul caractere
 	   * si sr != 0 alors c'est une substitution.
 	*/
 	(void) U_OneChar ( text, len, s, sr, type );
     }
-    
-    else { 			
+
+    else {
 	if ( len > 0 ) {
 	    /* On a ajoute plusieurs caracteres */
 	    (void) U_AddChars ( text, type, s, len, n );
 	}
-	else {	
+	else {
 	    /* on enleve plusieurs caracteres */
 	    (void ) U_DelChars ( text, s, len );
@@ -326,5 +320,5 @@ void StoreInUndo ( text, s, sr, len ,n, 
 **	Description : Plusieurs caracteres ont ete effaces.
 **		Avant de stoker les infos, on verifie si ya assez
-**		de place pour ranger les caracteres effaces. 	
+**		de place pour ranger les caracteres effaces.
 **
 **	Input : Le Text courant, la chaine effacee et sa longueur.
@@ -333,5 +327,5 @@ void StoreInUndo ( text, s, sr, len ,n, 
 static void U_DelChars (text, s, len )
     Text *text;
-    char *s;
+    const char *s;
     int len;
 {
@@ -339,5 +333,5 @@ static void U_DelChars (text, s, len )
     (void) fprintf ( stderr, "U_DelChars\n" );
 #endif /* U_TRACE */
-    
+
     if ( (- len ) > text -> udi -> size ) {
 #ifdef U_TRACE
@@ -359,7 +353,7 @@ static void U_DelChars (text, s, len )
     /*	(void) strncpy ( text -> udi -> buf, s, -len ); */
     (void) bcopy ( s, text -> udi -> buf, -len );
-    
+
     text -> udi -> buf [-len] = 0;
-    
+
     text -> udi -> pos = GetNcFromLeft ( text -> buf );
     text -> udi -> current_line = text -> no_current_line;
@@ -373,5 +367,5 @@ static void U_DelChars (text, s, len )
 **	Description : Plusieurs caracteres ont ete ajoutes.
 **		Avant de stocker les infos, on verifie si ya assez
-**		de place pour ranger les caracteres ajoutes. 	
+**		de place pour ranger les caracteres ajoutes.
 **
 **	Input : Le Text courant,
@@ -384,5 +378,5 @@ static void U_AddChars ( text,type, s, l
     Text *text;
     int type;
-    char *s;
+    const char *s;
     int len, n;
 {
@@ -437,5 +431,5 @@ static void U_AddChars ( text,type, s, l
 **	Description : Un caractere a ete ajoute ou enleve.
 **		On se sert aussi de cette fonction pour les
-**		substitutions (global ou query).			
+**		substitutions (global ou query).
 **
 **	Input : Le Text courant,
@@ -449,5 +443,5 @@ static void U_OneChar ( text, len, s, sr
     Text *text;
     int len;
-    char *s, *sr;
+    const char *s, *sr;
     int type;
 {
@@ -466,5 +460,5 @@ static void U_OneChar ( text, len, s, sr
 #endif /* U_TRACE */
       text -> udi -> c = *s;
-      text -> udi -> pos = 
+      text -> udi -> pos =
 	(len == 1) ? GetNcFromLeft ( text -> buf ) : 1+GetNcFromLeft ( text -> buf );
       text -> udi -> op = (len == 1) ? U_ADD : U_DEL;
@@ -487,5 +481,5 @@ static void U_OneChar ( text, len, s, sr
     }
     text -> udi -> current_line = text -> no_current_line;
-    text -> udi -> one_char = True; 
+    text -> udi -> one_char = True;
     text -> udi -> type = type;
     text -> udi -> nb_lines = 0;
@@ -503,8 +497,9 @@ static void U_OneChar ( text, len, s, sr
 */
 static void U_RepAlloc ( p, str )
-    char **p, *str;
+    char **p;
+    const char *str;
 {
     if ( *p == 0 ) {
-	*p = (char *) malloc ( (unsigned) strlen (str) + 1);
+	*p = malloc(strlen(str) + 1);
 #ifdef U_TRACE
 	(void) fprintf ( stderr, "U_RepAlloc : p (null) : malloc %d\n", *p );
@@ -544,5 +539,5 @@ static void CompactUndo ( text )
     (void) fprintf ( stderr, "CompactUndo from index %d\n", text -> u_index );
 #endif /* U_TRACE */
-    
+
     while ( text -> u_index != 0 ) {
 	if ( current_u -> buf  != 0 ) {
@@ -590,16 +585,16 @@ void DoUndo ( text )
     Mode *save_mode = text -> current_mode;
     Undo *tmp = GetCurrentUndo ( text );
-    
+
     if (text -> selection -> select == True)
       ClearSelection(text, True);
-    
+
     text -> current_mode = (Mode *) GetMode ("default");
 #ifdef U_TRACE
     (void) fprintf ( stderr, "DoUndo\n" );
 #endif /* U_TRACE */
-    
+
     old_pos = 	GetNcFromLeft ( text -> buf );
     old_line = text -> no_current_line;
-    
+
     if ( tmp == 0 ) {
 #ifdef U_TRACE
@@ -626,12 +621,12 @@ void DoUndo ( text )
 	MoveToBline ( text );
     }
-    
+
     if ( tmp -> one_char == True ) {
 	switch ( tmp -> type ) {
 	case U_STD:
 	case U_INSERT:
-	  if ( tmp -> op == U_ADD ) 
+	  if ( tmp -> op == U_ADD )
 	    (void) Do_UDelOneChar ( text );
-	  else 
+	  else
 	    (void) Do_UAddOneChar ( text );
 	  break;
@@ -645,5 +640,5 @@ void DoUndo ( text )
     }
     else {
-      if ( tmp -> op == U_ADD ) 
+      if ( tmp -> op == U_ADD )
 	(void) Do_UDelChars ( text );
       else {
@@ -676,5 +671,5 @@ static void Do_UReplace ( text, type, ol
     int old_line, old_pos;
 {
-    
+
     int newpos, modif = False;
     char *start, *end, *tmp;
@@ -682,13 +677,13 @@ static void Do_UReplace ( text, type, ol
     char *str_old = current_u -> str_new;
     char *str_new = current_u -> str_old;
-    
+
 #ifdef U_TRACE
     (void) fprintf ( stderr, "Do_UReplace\n" );
 #endif /* U_TRACE */
-    
+
     TextCursorOff ( text );
     SetTextModif ( text );
     MoveHole ( text -> buf , current_u -> pos );
-    
+
     start = (char *) RightBuf ( text -> buf );
     end = (char *) BottomBuf ( text -> buf );
@@ -696,5 +691,5 @@ static void Do_UReplace ( text, type, ol
     while ( (newpos=BmSearch( start, str_old,  end - start, 1 )) != -1 ) {
 	/* On se place a la fin du mot */
-	(void) MoveHole ( text -> buf, newpos + strlen (str_old)); 
+	(void) MoveHole ( text -> buf, newpos + strlen (str_old));
 	DeleteNchar ( text -> buf, strlen ( str_old) );
 	InsertNchar ( text -> buf, str_new, strlen ( str_new));
@@ -703,5 +698,5 @@ static void Do_UReplace ( text, type, ol
 	if ( text -> current_ce != 0 )
 	  (void) UpdateColorList ( text, strlen(str_new)-strlen(str_old));
-  
+
 	modif = True;
 	start = (char *) RightBuf ( text -> buf ); /* Position courante */
@@ -715,5 +710,5 @@ static void Do_UReplace ( text, type, ol
     HoleToLeft ( text -> buf );
     text -> no_current_line = 1;
-    
+
     if ( type == U_REP ) {
 #ifdef U_TRACE
@@ -737,5 +732,5 @@ static void Do_UReplace ( text, type, ol
 	SetTextModif ( text );
     }
-    
+
     tmp = (char *) malloc ( (unsigned) strlen ( current_u  -> str_old ) + 1 );
 #ifdef U_TRACE
@@ -766,5 +761,5 @@ static void Do_UAddChars ( text )
     (void) fprintf ( stderr, "Do_UAddChars \n" );
 #endif /* U_TRACE */
-    
+
     TextCursorOff ( text );
     SetTextModif ( text );
@@ -809,12 +804,12 @@ static void Do_UDelChars ( text )
 {
     int lines;
-    Undo *current_u = GetCurrentUndo ( text );	
+    Undo *current_u = GetCurrentUndo ( text );
 #ifdef U_TRACE
     (void) fprintf ( stderr, "Do_UDelChars\n" );
 #endif /* U_TRACE */
-    
+
     TextCursorOff ( text );
     ClipOn ( text, 0 );
-    
+
     MoveHole ( text -> buf, current_u -> pos );
     lines = GetNewLine (current_u -> buf, current_u -> size );
@@ -839,5 +834,5 @@ static void Do_UDelChars ( text )
 	SetLinesTable ( text );
 	RefreshPage ( text );
-	(void) MoveScrollBar ( dpy, text -> swin, 
+	(void) MoveScrollBar ( dpy, text -> swin,
 			      CURRENT, text -> no_current_line - text -> n1 - 1 );
 	RefreshScrollBar ( dpy, text -> swin );
@@ -870,5 +865,5 @@ static void Do_UDelOneChar ( text )
     (void) fprintf ( stderr, "Do_UDelOneChar\n" );
 #endif /* U_TRACE */
-    
+
     if ((current_u -> type == U_INSERT)
 	&& (current_u -> c == '\n')) {
@@ -896,11 +891,11 @@ static void Do_UDelOneChar ( text )
     if ( (current_u -> c == '\n')
 	&& (current_u -> type != U_INSERT) ) {
-	
+
 #ifdef U_TRACE
 	(void) fprintf ( stderr, "Do_UDelOneChar : c : return\n" );
 #endif /* U_TRACE */
-	
+
 	current_u -> current_line --;
-	current_u -> pos = 	
+	current_u -> pos =
 	  1 + GetNcFromLeft ( text -> buf );
     }
@@ -923,5 +918,5 @@ static void Do_UAddOneChar ( text )
     (void) fprintf ( stderr, "Do_UAddOneChar\n" );
 #endif /* U_TRACE */
-    
+
     MoveHole ( text -> buf, current_u -> pos -1);
     switch ( current_u -> c ) {
@@ -954,5 +949,5 @@ static void Do_UAddOneChar ( text )
 #endif /* U_TRACE */
       }
-      
+
       break;
     case '\t':
@@ -976,5 +971,5 @@ static void Do_UAddOneChar ( text )
       (void) fprintf ( stderr, "Do_UAddOneChar : Default\n" );
 #endif /* U_TRACE */
-      
+
       text -> u_todo = False;
       f_impc ( text, (int) current_u -> c );
@@ -1006,5 +1001,5 @@ void DoUndoUndo ( text )
 	(void) fprintf ( stderr, "DoUndoUndo : index (null)\n" );
 #endif /* U_TRACE */
-	
+
 	klaxon ();
 	return;
--- warn_box.c	2006-11-16 12:00:13.000000000 -0500
+++ warn_box.c	2014-12-26 00:30:46.000000000 -0500
@@ -303,5 +303,5 @@ static void UpdateWarningTitle ()
 */
 void DisplayWMessage ( mess, from, separator )
-    char *mess, *from;
+    const char *mess, *from;
     int separator;
 {
--- warn_box.h	1997-01-24 09:54:53.000000000 -0500
+++ warn_box.h	2014-12-26 00:31:11.000000000 -0500
@@ -76,8 +76,8 @@ typedef struct {
 FCT (int, ButtonWarningBox, (XButtonEvent *ev) );
 FCT (void, ConfigWarningBox, (int width, int height) );
-FCT (void, DisplayWMessage, (char *mess, char *from, int separator) );
+FCT (void, DisplayWMessage, (const char *mess, const char *from, int separator) );
 FCT (int, ExposeWarningBox , (XEvent *ev) );
-FCT (void, InitWarningBox, () );
-FCT (void, UnmapWarningBox, () );
+FCT (void, InitWarningBox, (void) );
+FCT (void, UnmapWarningBox, (void) );
 
 #endif /* _WARN_BOX_H_ */
--- xcoral.c	2005-12-16 07:49:26.000000000 -0500
+++ xcoral.c	2014-12-27 22:41:38.000000000 -0500
@@ -40,4 +40,5 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <signal.h>
 #include <X11/Xlib.h>
@@ -45,4 +46,5 @@
 #include <X11/Xutil.h>
 #include <X11/keysym.h>
+#include <X11/Xresource.h>
 #include <sys/param.h>
 
@@ -67,4 +69,7 @@
 #include "new_window.h"
 #include "tool_bar.h"
+#include "tbox.h"
+#include "color_area.h"
+#include "Smac/smac.h"
 
 #if HAVE_STRING_H
@@ -72,5 +77,5 @@
 #  if !HAVE_BZERO
 extern FCT (void, bzero, (char *dst, int len) );
-extern FCT (void, bcopy, (char *src, char *dst, int len) );
+extern FCT (void, bcopy, (const char *src, char *dst, int len) );
 #  endif
 #else
@@ -86,6 +91,4 @@ FCT (static RETSIGTYPE, contHandler, () 
 FCT (static RETSIGTYPE, stopHandler, () );
 
-extern init_smac();
-
 /*
  **	Initialise les resources, les menus, les bouttons etc...
@@ -93,4 +96,5 @@ extern init_smac();
  **	la boucle d'evenements.
  */
+int
 main ( argc, argv ) 
     int argc;
@@ -175,5 +179,9 @@ main ( argc, argv ) 
   SetBrowserMode ( (Mode *) GetMode ("C++mode") );
   SetBrowserDir ( (char *) pathname );
+#ifdef RUNTIMECHECK
   init_smac(1024, 18);
+#else
+  init_smac(1024);
+#endif
   InitIconPixmap ();
   InitSelection (dpy,GetOpColor ( OP_TEXT_FG ), GetOpColor ( OP_TEXT_BG ));
@@ -195,6 +203,5 @@ main ( argc, argv ) 
     xcoralrc = (char *) getenv ("XCORALRC");
     if (!xcoralrc) {
-      (void) sprintf ( tmp, (char *) getenv ( "HOME" ) );
-      (void) strcat ( tmp, "/.xcoralrc" );
+      (void) sprintf (tmp, "%s/.xcoralrc", getenv("HOME"));
     }
     else 
@@ -204,24 +211,22 @@ main ( argc, argv ) 
       /* pas de xcoralrc defini, ca craint */
       /* On copie celui qui est dans SmacLib */
-      (void) sprintf (tmp, "cp %s/xcoralrc.lf %s/.xcoralrc\n",
-		      XCORAL_LIB_DIR,(char *)getenv ("HOME"));
+      (void) sprintf (tmp, "cp -p %s/xcoralrc.lf %s/.xcoralrc\n",
+		      XCORAL_LIB_DIR, getenv ("HOME"));
       system(tmp);
-      (void) sprintf (tmp, (char *) getenv ("HOME"));
-      (void) strcat (tmp, "/.xcoralrc");
+      (void) sprintf (tmp, "%s/.xcoralrc", getenv("HOME"));
     }
     else {
       /* On verifie que la version est correcte */
-      if ((fd = fopen((char *)tmp,"r"))!=0){
+      if ((fd = fopen(tmp, "r"))!=0){
 	fgets(pp,8,fd);
-	if (strncmp((char *)(pp+3),CURRENT_VERSION,4)!=0){
+	if (strncmp(pp + 3, CURRENT_VERSION, 4) != 0){
 	  /* .xcoralrc ne correspond pas a la version courante. Copie */
-	  (void) sprintf(pp,"%s/.xcoralrc.old",(char *)getenv ("HOME"));
+	  (void) sprintf(pp, "%s/.xcoralrc.old", getenv ("HOME"));
 	  rename (tmp,pp);
 	  /* On copie celui qui est dans SmacLib */
-	  (void) sprintf (tmp, "cp %s/xcoralrc.lf %s/.xcoralrc\n",
-			  XCORAL_LIB_DIR,(char *)getenv ("HOME"));
+	  (void) sprintf (tmp, "cp -p %s/xcoralrc.lf %s/.xcoralrc\n",
+			  XCORAL_LIB_DIR, getenv ("HOME"));
 	  system(tmp);
-	  (void) sprintf (tmp, (char *) getenv ("HOME"));
-	  (void) strcat (tmp, "/.xcoralrc");
+	  (void) sprintf (tmp, "%s/.xcoralrc", getenv ("HOME"));
 	  (void) fprintf (stderr,"Your .xcoralrc file is obsolete so it has been moved as .xcoralrc.old\n");
 	  (void) fprintf (stderr,"A new .xcoralrc file has been created in your home directory\n");
@@ -301,6 +306,6 @@ main ( argc, argv ) 
 
   WaitForEvent ();
-  
   /*NOTREACHED*/
+  return 0;
 }
 
--- xcoral.h	2008-04-02 14:50:44.000000000 -0400
+++ xcoral.h	2014-12-26 00:45:37.000000000 -0500
@@ -49,5 +49,5 @@
  *	La structure associe a chaque fenetre d'edition.
  */
-typedef struct {
+struct EdWin {
 	Window		w_frame;	/* La fenetre mere */
 	int		width, height;	/* Geometrie */
@@ -60,5 +60,6 @@ typedef struct {
 	XSizeHints	*shints;	/* Les options */
 	ToolBar         *tool_bar;      /* la tool bar */
-} EdWin;
+};
+typedef struct EdWin EdWin;
 
 extern Display	*dpy;		/* Le display */
@@ -67,6 +68,6 @@ extern EdWin	*TWin [];		/* La table de f
 extern XContext	EdContext;	/* Le contexte courant */
 
-extern char 	*menu_names [];
-extern char 	**item_names [];	
+extern const char 	*menu_names [];
+extern const char 	**item_names [];	
 extern void		(**func_names []) ();	/* Callback */
 
--- Smac/Makefile.in	2006-10-16 16:20:36.000000000 -0400
+++ Smac/Makefile.in	2014-12-28 00:24:23.000000000 -0500
@@ -8,4 +8,5 @@
 
 CFLAGS  = @CFLAGS@ -D$(LEX) $(XC_DEFS) -DXCORAL_LIB_DIR=$(XCORALLIBDIR) @DEFS@
+CFLAGS += @XC_X_INCLUDES@
 LDFLAGS = 
 
@@ -38,12 +39,13 @@
 
 word.h	: word.c
-	$(CC) -o word word.c
+	$(CC) $(CFLAGS) -o word word.c
 	rm -f word.h
 	./word > word.h
 	rm -f word
 
-y.tab.o	: word.h
 
-y.tab.c	: c5.y
+y.tab.o	: word.h y.tab.h
+
+y.tab.c y.tab.h: c5.y
 	$(YACC) -dl c5.y
 
--- cb_names.c	2001-10-18 07:25:18.000000000 -0400
+++ cb_names.c	2014-12-28 22:31:56.000000000 -0500
@@ -59,9 +59,9 @@
 #include "tbox.h"
 
-char *menu_names[] = { 
+const char *menu_names[] = { 
 	"File", "Window", "Edit", "Modes", "Search", "Region", "Font", "Misc", 0
 };
 
-static char *file_menu [] = {
+static const char *file_menu [] = {
 	"New file        ^x k",
 	"Read file       ^x^f",
@@ -75,5 +75,5 @@
 };
 			
-static char *window_menu [] = {
+static const char *window_menu [] = {
 	"New text window     ^x n",
 	"Delete text window  ^x^c",
@@ -85,5 +85,5 @@
 };
 
-static char *edit_menu [] = {
+static const char *edit_menu [] = {
   "Undo           ^u",
   "Redo           ^t",
@@ -94,5 +94,5 @@
 };
 
-static char *mode_menu [] = {
+static const char *mode_menu [] = {
 	"Select default mode",
 	"Select C mode",
@@ -113,5 +113,5 @@
 };
 			
-static char *search_menu [] = { 
+static const char *search_menu [] = { 
 	"Forward search        ^s",
 	"Backward search       ^r",
@@ -125,5 +125,5 @@
 };
 
-static char *mark_menu [] = {
+static const char *mark_menu [] = {
 	"Set mark              ^space",
 	"Goto the mark           ^x m",
@@ -141,20 +141,5 @@
 };
 
-static char *version_menu [] = {
-        "Initialize version",
-        "Check in",
-	"Check out locked",
-	"Check out unlocked",
-	"Check in and out locked",
-	"Check in and out unlocked",
-	"Lock revision",
-	"Unlock revision",
-	"Display diff",
-	"Display log",
-	"Display repository",
-	0
-};
-
-static char *font_menu [] = { 
+static const char *font_menu [] = { 
 	"Courier bold 10",
 	"Courier bold 12",
@@ -175,5 +160,5 @@
 };
 
-static char *font_names [] = {
+static const char *font_names [] = {
         "-adobe-courier-bold-r-normal--10-100-75-75-m-60-iso8859-1",  
         "-adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1",
@@ -193,5 +178,5 @@
 };
 
-static char *misc_menu [] = {
+static const char *misc_menu [] = {
   "Programming util... ",
   "Rcs commands...     ",
@@ -208,5 +193,5 @@
 };
 
-char **item_names [] = {
+const char **item_names [] = {
 	file_menu,
 	window_menu,
@@ -298,19 +283,4 @@
 };
 
-static void (*f_version []) () = {
-        CV_Initialize,
-	CV_CheckIn,
-	CV_CheckOutLocked,
-	CV_CheckOutUnlocked,
-	CV_CheckInAndOutLocked,
-	CV_CheckInAndOutUnlocked,
-	CV_LockRevision,
-	CV_UnlockRevision,
-	CV_ListDiff,
-	CV_ListLog,
-	CV_ListRepository,
-	0
-};
-
 static void (*f_font []) () = { 
 	0,0,0,0,0,0,0,0,0,0,0,0,0,0
--- chars_cmds.c	2001-08-16 08:29:47.000000000 -0400
+++ chars_cmds.c	2014-12-28 22:28:05.000000000 -0500
@@ -98,6 +98,4 @@
 extern char *ie_call_function();
 
-FCT (static RETSIGTYPE, donothing, () );
-
 static char *cut_buffer = 0;
 static int n_cb = 0;
@@ -362,5 +360,5 @@
     int n;
 {
-  char *p;
+  const char *p;
   int mark = 0;
   int len, dn;
@@ -375,5 +373,5 @@
 
   mark = UpdateMark ( text, 0, -(n -1) );
-  p = (char *) DeleteLines ( text -> buf, n, &len, &dn );
+  p = DeleteLines ( text -> buf, n, &len, &dn );
   if ( mark ) 
     UpdateMarkPos (text );
@@ -421,5 +419,5 @@
     int i;
 {
-  char *p;
+  const char *p;
   int len, dn;
   
@@ -428,5 +426,5 @@
 
   TextCursorOff ( text );
-  p = (char *) RestoreKillBuf ( i, &len, &dn );
+  p = RestoreKillBuf ( i, &len, &dn );
   
   if ( p == 0 ) {
@@ -484,6 +482,6 @@
   ClearListBox ();
   KillBufferInList ();
-  str = (char *) SelectFromListBox ( "Kill Buffers" );
-  if ( str != 0 ) {
+  str = SelectFromListBox ();
+  if (str != NULL) {
     /* str += 9; */
     /* On vire le "Select : " */
@@ -510,5 +508,5 @@
 {
   int lines;
-  char *s;
+  const char *s;
   int nbytes;
   
@@ -532,5 +530,5 @@
       RefreshScrollBar ( dpy, text -> swin );
     }
-    (void) StoreInUndo ( text, s, (char *) 0, nbytes, lines, U_STD );
+    (void) StoreInUndo ( text, s, NULL, nbytes, lines, U_STD );
     
     /* Pour la couleur */
@@ -557,5 +555,5 @@
 void InsertLines ( text, s, nbytes, lines )
     Text *text;
-    char *s;
+    const char *s;
     int nbytes;
     int lines;
@@ -640,5 +638,6 @@
 {
   int lines;
-  char *s, *tmp = 0;
+  const char *s;
+  char *tmp = NULL;
   int mark = 0;
   int nbytes;
@@ -652,5 +651,5 @@
     return;
   
-  if ( (s != 0) && (nbytes != 0 )) {
+  if ( (s != NULL) && (nbytes != 0 )) {
     if ( (text -> modif == False) && (strcmp(text -> filename,"NoName")==0) )
       return;
@@ -701,5 +700,5 @@
       }
     }
-    tmp = (char *) malloc ( (unsigned) nbytes + 2 );
+    tmp = malloc (nbytes + 2);
     (void) bcopy ( RightBuf ( text -> buf ), tmp, nbytes );
     
@@ -728,5 +727,5 @@
       RefreshScrollBar ( dpy, text -> swin );
     }
-    (void) StoreInUndo ( text, tmp, (char *) 0, -nbytes, lines, U_STD );
+    (void) StoreInUndo ( text, tmp, NULL, -nbytes, lines, U_STD );
     (void) StoreInKillBuf ( tmp, nbytes, lines );
     
@@ -743,6 +742,4 @@
   }
 }
-static int timer_expire = False;
-static RETSIGTYPE donothing () { timer_expire = True; }
 
 
@@ -783,87 +780,20 @@
 
 
-/*
-**	Function name : FunctionHeader
-**
-**	Description : 
-**	Input : 
-**	Ouput :
-*/
-void FunctionHeader ( text )
-    Text *text;
-{
-  char *msg;
-  int nw = text->win_id;
-  
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "function_header", 0, 0);
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-}
-
-
-/*
-**	Function name : IncludeHeader
-**
-**	Description : 
-**	Input : 
-**	Ouput :
-*/
-void IncludeHeader ( text )
-    Text *text;
+static void commonf(Text *text, const char *funcname)
 {
-  char *msg;
+  const char *msg;
   int nw = text->win_id;
   
   StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "include_header", 0, 0) ;
+  msg = ie_call_function ( text, funcname, 0, 0) ;
   text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-}
-
-/*
-**	Function name : ClassHeader
-**
-**	Description : 
-**	Input : 
-**	Ouput :
-*/
-void ClassHeader ( text )
-    Text *text;
-{
-  char *msg;
-  int nw = text->win_id;
-    
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "class_header", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-}
-
-/*
-**	Function name : MethodHeader
-**
-**	Description : 
-**	Input : 
-**	Ouput :
-*/
-void MethodHeader ( text )
-    Text *text;
-{
-  char *msg;
-  int nw = text->win_id;
-
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "method_header", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
+  if (msg != NULL)
+    DisplayMessage(text -> mwin, msg);
+  ie_redisplay (text);
+  if (TextInBuf(text) == False) {
+     TextCursorOff(text);
+     ClearPage(text);
+     TextCursorOn(text);
+  }  
 }
 
@@ -878,19 +808,5 @@
     Text *text;
 {
-  char *msg;
-  int nw = text->win_id;
-
-  StorePosition ( text );
-/*  msg = (char *) ie_call_function ( text, "add_header", 0, 0) ;*/
-  msg = (char *) ie_call_function ( text, "programming_utilities", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-  if(TextInBuf(text)==False){
-     TextCursorOff(text);
-     ClearPage(text);
-     TextCursorOn(text);
-  }  
+  commonf(text, "programming_utilities");
 }
 
@@ -905,18 +821,5 @@
     Text *text;
 {
-  char *msg;
-  int nw = text->win_id;
-
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "rcs_commands", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-  if(TextInBuf(text)==False){
-     TextCursorOff(text);
-     ClearPage(text);
-     TextCursorOn(text);
-  }  
+  commonf(text, "rcs_commands");
 }
 
@@ -932,18 +835,5 @@
     Text *text;
 {
-  char *msg;
-  int nw = text->win_id;
-
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "latex_macros", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-  if(TextInBuf(text)==False){
-     TextCursorOff(text);
-     ClearPage(text);
-     TextCursorOn(text);
-  }  
+  commonf(text, "latex_macros");
 }
 
@@ -958,18 +848,5 @@
     Text *text;
 {
-  char *msg;
-  int nw = text->win_id;
-
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "html_macros", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-  if(TextInBuf(text)==False){
-     TextCursorOff(text);
-     ClearPage(text);
-     TextCursorOn(text);
-  }  
+  commonf(text, "html_macros");
 }
 
@@ -984,18 +861,5 @@
     Text *text;
 {
-  char *msg;
-  int nw = text->win_id;
-
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "misc_commands", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay (text);
-  if(TextInBuf(text)==False){
-     TextCursorOff(text);
-     ClearPage(text);
-     TextCursorOn(text);
-  }  
+  commonf(text, "misc_commands");
 }
 
@@ -1010,18 +874,5 @@
     Text *text;
 {
-  char *msg;
-  int nw = text->win_id;
-
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "user_commands", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-  if(TextInBuf(text)==False){
-     TextCursorOff(text);
-     ClearPage(text);
-     TextCursorOn(text);
-  }  
+  commonf(text, "user_commands");
 }
 
@@ -1036,18 +887,5 @@
     Text *text;
 {
-  char *msg;
-  int nw = text->win_id;
-
-  StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "edir", 0, 0) ;
-  text = update_cwd(nw);
-  if ( msg != 0 )
-    DisplayMessage ( text -> mwin, msg );
-  ie_redisplay ( text );
-  if(TextInBuf(text)==False){
-     TextCursorOff(text);
-     ClearPage(text);
-     TextCursorOn(text);
-  }  
+  commonf(text, "edir");
 }
 
@@ -1130,9 +968,9 @@
 */
 void Store_bytes(s, n)
-    char *s; int n;
+    const char *s; int n;
 {
   Clear_bytes();
   
-  cut_buffer = (char *) malloc (n+2);
+  cut_buffer = malloc (n+2);
   bzero (cut_buffer, n+2);
   strncpy (cut_buffer, s, n);
@@ -1147,5 +985,5 @@
 **	Output :
 */
-char *Fetch_bytes(n)
+const char *Fetch_bytes(n)
     int *n;
 {
@@ -1166,5 +1004,5 @@
     free (cut_buffer);
     n_cb = 0;
-    cut_buffer = 0;
+    cut_buffer = NULL;
   }
 }
--- chars_cmds.h	2001-01-20 10:34:49.000000000 -0500
+++ chars_cmds.h	2014-12-28 22:15:27.000000000 -0500
@@ -51,10 +51,6 @@
 FCT (void, DisplayKillBuffer, (Text *text) );
 FCT (void, GetBytesFromCutBuffer, (Text *text) );
-FCT (void, InsertLines, (Text *text, char *s, int nbytes, int lines) );
+FCT (void, InsertLines, (Text *text, const char *s, int nbytes, int lines) );
 
-FCT (void, ClassHeader, (Text *text) );
-FCT (void, FunctionHeader, (Text *text) );
-FCT (void, MethodHeader, (Text *text) );
-FCT (void, IncludeHeader, (Text *text) );
 FCT (void, LatexMacros, (Text *text) );
 FCT (void, ProgrammingUtil, (Text *text) );
@@ -73,7 +69,7 @@
 FCT (void, f_tab, (Text *text) );
 FCT (void, QuotedChar, (Text *text) );
-FCT (void, Store_bytes, (char *s, int n) );
-FCT (char *, Fetch_bytes, (int *n) );
-FCT (void, Clear_bytes, () );
+FCT (void, Store_bytes, (const char *s, int n) );
+FCT (const char *, Fetch_bytes, (int *n) );
+FCT (void, Clear_bytes, (void) );
 
 #endif /* _CHARS_CMDS_H_ */
--- input_str.c	2000-04-06 16:55:48.000000000 -0400
+++ input_str.c	2014-12-28 21:48:13.000000000 -0500
@@ -84,4 +84,6 @@
 #include "shadow.h"
 #include "input_str.h"
+#include "fs_box.h"
+#include "Smac/smacXcoral.h"
 
 Text *input_str;
@@ -104,16 +106,15 @@
 #define MINIB_CANCEL 4
 
-char *str_buf;
+static char *str_buf;
 int str_buf_len;
 #define STR_BUF_LEN 64
 
 FCT (static void, CleanInputStr, () );
-FCT (static int, CommonLength, (char *s, int ns, int r) );
-FCT (static void, ConfigInputString, () );
-FCT (static char *, ExpandFileName, (char *s, int *n, int *common) );
-FCT (static void, ExposeInputString, () );
-FCT (void, InputStrSave, (char *s, int len) );
-FCT (static void, InputStrUnmap, () );
-FCT (static void, PrintMatchedNames, (char *s, int combien) );
+FCT (static int, CommonLength, (const char *s, int ns, int r) );
+FCT (static void, ConfigInputString, (void) );
+FCT (static char *, ExpandFileName, (const char *s, int *n, int *common) );
+FCT (static void, ExposeInputString, (void) );
+FCT (static void, InputStrUnmap, (void) );
+FCT (static void, PrintMatchedNames, (const char *s, int combien) );
 
 extern Atom prop_sel;
@@ -171,15 +172,15 @@
     }
     
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^A", "goto_beginning_of_line" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^B", "goto_previous_char" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^D", "delete_char" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^E", "goto_end_of_line" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^F", "goto_next_char" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^G", "str_abort" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^H", "delete" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^K", "kill_line" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^M", "str_return" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^I", "str_tab" );
-    ie_key_def ( input_str,"input_str" , (unsigned char *)"^P", "str_previous" );
+    ie_key_def ("input_str" , "^A", "goto_beginning_of_line");
+    ie_key_def ("input_str" , "^B", "goto_previous_char");
+    ie_key_def ("input_str" , "^D", "delete_char");
+    ie_key_def ("input_str" , "^E", "goto_end_of_line");
+    ie_key_def ("input_str" , "^F", "goto_next_char");
+    ie_key_def ("input_str" , "^G", "str_abort");
+    ie_key_def ("input_str" , "^H", "delete");
+    ie_key_def ("input_str" , "^K", "kill_line");
+    ie_key_def ("input_str" , "^M", "str_return");
+    ie_key_def ("input_str" , "^I", "str_tab");
+    ie_key_def ("input_str" , "^P", "str_previous");
 
     input_str -> current_mode -> key [DELETE].func = ie_WR_delete_char;
@@ -210,9 +211,9 @@
 **	Ouput :
 */
-char *InputString ( parent, raise, gc, font, prompt, reply )
+const char *InputString ( parent, raise, gc, font, prompt, reply )
     Window parent, raise;
     GC gc;
     XFontStruct *font;
-    char *prompt;
+    const char *prompt;
     int reply;
 {
@@ -221,5 +222,5 @@
     XWindowAttributes att;
     int len;
-    char *str, *s;
+    const char *str, *s;
     int lines;
     int nbytes;
@@ -502,7 +503,7 @@
 **	Ouput : La chaine
 */
-char *GetString ( text, prompt, reply )
+const char *GetString ( text, prompt, reply )
     Text *text;
-    char *prompt;
+    const char *prompt;
     int reply;
 {
@@ -519,10 +520,9 @@
         /* 100 pixels, c'est le minimum, 7,8,9 caracteres
 	   suivant la fonte */
-	return ( (char *) GetStringFromDB ( prompt, reply ));
+	return (GetStringFromDB ( prompt, reply ));
     }
     else {
         /* Mini-Buffer */
-	return ( (char *)
-		InputString ( text -> mwin -> mess, 0,
+	return (InputString (text -> mwin -> mess, 0,
 			     text -> mwin -> mess_gc,
 			     text -> mwin -> font, prompt, reply ));
@@ -632,18 +632,14 @@
 */
 void InputStrSave ( s, len )
-    char *s;
+    const char *s;
     int len;
 {
     if ( len > (str_buf_len - 1) ) {
-	(void) free ( str_buf );
-	str_buf = (char *) malloc ( (unsigned) (len + 2));
-	(void) strncpy ( str_buf, s, len );
-	str_buf [len] = 0;
+	free(str_buf);
+	str_buf = malloc((len + 2));
 	str_buf_len = len + 2;
     }
-    else {
 	(void) strncpy ( str_buf, s, len );
-	str_buf [len] = 0;
-    }
+    str_buf [len] = '\0';
 }
 
@@ -655,6 +651,5 @@
 **	Ouput :
 */
-void InputStrPrevious ( text )
-    Text *text;
+void InputStrPrevious ()
 {
     TextCursorOff ( input_str );
@@ -675,6 +670,5 @@
 **	Ouput :
 */
-void InputStrReturn ( text )
-    Text *text;
+void InputStrReturn ()
 {
     str_status = STR_RETURN;
@@ -688,6 +682,5 @@
 **	Ouput :
 */
-void InputStrAbort ( text )
-    Text *text;
+void InputStrAbort ()
 {
     str_status = STR_ABORT;
@@ -702,5 +695,5 @@
 */
 static char * ExpandFileName (s, n, common)
-    char * s;
+    const char * s;
     int * n;
     int * common;
@@ -708,6 +701,7 @@
     DIR * dp;
     struct dirent * entry;
-    char * result = 0;
+    char * result = NULL;
     int rlength = 0;
+    int dirlen;
     char * current_dir;
     
@@ -715,48 +709,47 @@
     
     {
-	char *fsdirname, *newdir;
-	char *slash;
+	const char *fsdirname;
+	const char *slash;
 	
-	fsdirname = (char *) GetFsBoxInternalDir();
+	fsdirname = GetFsBoxInternalDir();
 	slash = strrchr(s, '/');
 
 	if (fsdirname) {
 	    /* On est dans le file selecteur */
-	    if(slash) {
+	    if (slash) {
 		if (strlen(s)==1 && *s == '/') /* C'est la racine */
-		  ;
+		  dirlen = 1;
 		else
-		  *slash = 0; /* Pour que s soit une directorie */
+		  dirlen = slash - s; /* Pour que s soit une directorie */
 		if (*s != '/') {
 		    /* on part de fsdirname */
-		    newdir = (char *)malloc(strlen(fsdirname)+strlen(s)+2);
-		    sprintf(newdir,"%s%s",fsdirname, s);
-		    dp = opendir(newdir);
-		    current_dir = (char *) stringdup(newdir);
-		    free(newdir);
+		    current_dir = malloc(strlen(fsdirname) + dirlen + 2);
+		    sprintf(current_dir,"%s%.*s",fsdirname, dirlen, s);
+		    dp = opendir(current_dir);
 		}
 		else {
 		  dp = opendir(s);
-		  current_dir = (char *) stringdup(s);
+		  current_dir = strdup(s);
 		}
-		*slash = '/';
 		s = slash + 1;
 	    }
 	    else {
 		dp = opendir(fsdirname);
-		current_dir = (char *) stringdup(fsdirname);
+		current_dir = strdup(fsdirname);
 	    }
 	}
 	else {
 	    if (slash) {
-		*slash = 0;
-		dp = opendir(s);
-		current_dir = (char *) stringdup(s);
-		*slash = '/';
+		dirlen = slash - s;
+		if (dirlen == 0)
+		  dirlen = 1;
+		current_dir = malloc(dirlen + 1);
+		bcopy(s, current_dir, dirlen);
+		dp = opendir(current_dir);
 		s = slash + 1;
 	    }
 	    else {
 		dp = opendir(".");
-		current_dir = (char *) stringdup(".");
+		current_dir = strdup(".");
 	    }
 	}
@@ -765,5 +758,5 @@
     
     if (! dp)
-      return 0;
+      return NULL;
     
     *common = strlen(s);
@@ -772,5 +765,5 @@
       if (strstr(entry->d_name, s) == entry->d_name) {
 	char * nresult =
-	  (char *) malloc((unsigned int) rlength + NAMLEN(entry) + 1 + 1);
+	  malloc(rlength + NAMLEN(entry) + 1 + 1);
 	
 	if (! nresult) {
@@ -816,5 +809,5 @@
 */
 static int CommonLength(s, ns, r)
-    char * s;
+    const char * s;
     int ns;
     int r;
@@ -825,5 +818,5 @@
     
     while ((c = s[++r])) {
-	char * p = s;
+	const char * p = s;
 	int n = ns - 1;
 	
@@ -847,9 +840,9 @@
 */
 static void PrintMatchedNames(s, combien )
-    char * s;
+    const char * s;
     int combien;
 {
     char *tmp;
-    char *str = s;
+    const char *str = s;
     int len, i;
     
@@ -859,5 +852,5 @@
 	s += strlen ( s ) + 1;
     }
-    tmp = (char *) malloc ( (unsigned int) len + combien + 2 );
+    tmp = malloc (len + combien + 2 );
     bzero ( tmp, len + combien + 2 );
     for ( i=0; i<combien; i++ ) {
@@ -867,5 +860,5 @@
     }
     DisplayWMessage ( tmp, " Matched Names", True );
-    (void) free ( tmp );
+    free ( tmp );
 }
 
@@ -877,8 +870,8 @@
 **	Ouput :
 */
-void InputStrTab ( text )
-    Text *text;
+void InputStrTab ()
 {
-    char *s, *t_str;
+    const char *s, *spacep;
+    char *t_str;
     int len, combien;
 /*
@@ -888,17 +881,19 @@
     }
 */
-    s = (char *) GetCurrentLine ( input_str -> buf, &len );
-    s[input_str -> buf -> l_cur - input_str -> buf -> top] = 0;
+    s = GetCurrentLine ( input_str -> buf, &len );
     
-    {
       /* recherche le dernier mot */
-      char * spacep = strrchr(s, ' ');
+    for (spacep = s + (input_str->buf->l_cur - input_str->buf->top);
+	 spacep != s; spacep--) {
+      if (*spacep == ' ')
+	break;
+    }
 
-      if (spacep)
+    if (spacep != s)
         s = spacep + 1;
-    }
+ 
     TextCursorOff ( input_str );
     if (*s == '~') {
-      char * expandtilde = (char *) ExpandTildeName (s);
+      const char * expandtilde = ExpandTildeName (s);
 
       DeleteNchar(input_str -> buf, strlen(s));
@@ -907,7 +902,7 @@
     }
     if ( mb_context == CTX_EVAL_EXP )
-      t_str = (char *) ExpandSmacName ( s, &combien, &len);
+      t_str = ExpandSmacName ( s, &combien, &len);
     else
-      t_str = (char *) ExpandFileName ( s, &combien, &len);
+      t_str = ExpandFileName ( s, &combien, &len);
     if ( combien == 0 )
       klaxon ();
@@ -932,21 +926,13 @@
 }
 
-/*
-**	Function name : ExpandTildeName
-**
-**	Description : 
-**	Input : 
-**	Ouput :
-*/
-char *ExpandTildeName ( name )
-    char *name;
+const char *ExpandTildeName ( name )
+    const char *name;
 {
     struct passwd *pwd;
     char *home;
-    char *p = name + 1;
     static char  buf_dir_tmp [MAXPATHLEN];
     
     if ( name [1] == '/' || name [1] == '\0') {   /* c'est moi */
-	if ( (home = (char *) getenv ( "HOME" )) == 0 )
+	if ((home = getenv ("HOME")) == NULL)
 	  return name;
 	(void) strcpy ( buf_dir_tmp, home );
@@ -954,11 +940,11 @@
     }
     else { /* c'est un autre */
-	int save;
+	const char *p;
+	char *pb;
 	
-	while ( *p && *p != '/' ) p++;
-	save = *p;
-	*p = 0;
-	pwd = getpwnam ( name + 1 );
-	*p = save;
+	for (p = name + 1, pb = buf_dir_tmp; *p && *p != '/'; p++)
+	  *pb++ = *p;
+	*pb = 0;
+	pwd = getpwnam (buf_dir_tmp);
 	if (  pwd ) {
 	    (void) strcpy ( buf_dir_tmp, pwd ->  pw_dir);
@@ -979,7 +965,7 @@
 */
 void FillMiniBuffer ( str )
-    char *str;
+    const char *str;
 {
-    if ( (str == 0) || (strlen(str)== 0) )
+    if (str == NULL || str[0] == '\0')
       return;
     
--- main_buffer.c	1998-09-20 13:01:18.000000000 -0400
+++ main_buffer.c	2014-12-28 22:11:41.000000000 -0500
@@ -539,5 +539,5 @@
 void InsertNchar ( buf, s, n )
     Buf *buf;
-    char *s;
+    const char *s;
     int n;
 {
@@ -601,5 +601,5 @@
 */
 char *GetForwardLine ( buf, n, len )
-    Buf *buf;
+    const Buf *buf;
     int n;
     int *len;	/* Return */
@@ -644,5 +644,5 @@
 */
 char *GetBackwardLine ( buf, n, len )
-    Buf *buf;
+    const Buf *buf;
     int n;
     int *len; /* Return */
@@ -694,5 +694,5 @@
 */
 char *GetCurrentLine ( buf, len )
-    Buf *buf;
+    const Buf *buf;
     int *len; /* Return */
 {
@@ -819,5 +819,5 @@
 */
 int GetNcFromLeft ( buf )
-    Buf *buf;
+    const Buf *buf;
 {
     int n = 0;
@@ -851,5 +851,5 @@
 */
 int GetNcFromRight ( buf )
-    Buf *buf;
+    const Buf *buf;
 {
     int n = 0;
@@ -879,5 +879,5 @@
 */
 int GetNumberOfLineInBuf ( buf )
-    Buf *buf;
+    const Buf *buf;
 {
     int n = 1;
@@ -928,8 +928,8 @@
 */
 int GetNewLine ( t, len )
-    char *t; /* le texte */
+    const char *t; /* le texte */
     int len; /* la longeur du texte */
 {
-    char *start = t;
+    const char *start = t;
     int nl = 0;
     
@@ -962,5 +962,5 @@
 */
 int GetCurrentChar ( buf, c )
-    Buf *buf;
+    const Buf *buf;
     char *c; /* Return */
 {
@@ -984,5 +984,5 @@
 */
 void GetPrevChar ( buf, c )
-    Buf *buf;
+    const Buf *buf;
     char *c;
 {
@@ -1006,5 +1006,5 @@
 **		des lignes
 */
-char *DeleteLines ( buf, n, len, dn )
+const char *DeleteLines ( buf, n, len, dn )
     Buf *buf;
     int n;      /* nb lignes demandees */
--- main_buffer.h	1995-03-17 03:08:33.000000000 -0500
+++ main_buffer.h	2014-12-28 22:08:55.000000000 -0500
@@ -59,19 +59,19 @@
 FCT (void, ClearBuffer, (Buf *buf) );
 FCT (void, DeleteBuffer, (Buf *buf) );
-FCT (char *, DeleteLines, (Buf *buf, int n, int *len, int *dn) );
+FCT (const char *, DeleteLines, (Buf *buf, int n, int *len, int *dn) );
 FCT (void, DeleteNchar, (Buf *buf, int n) );
-FCT (char *, GetBackwardLine, (Buf *buf, int n, int *len) );
+FCT (char *, GetBackwardLine, (const Buf *buf, int n, int *len) );
 FCT (Buf *, GetBuffer, (unsigned int size) );
-FCT (int, GetCurrentChar, (Buf *buf, char *c) );
-FCT (char *, GetCurrentLine, (Buf *buf, int *len) );
-FCT (char *, GetForwardLine, (Buf *buf, int n, int *len) );
-FCT (int, GetNcFromLeft, (Buf *buf) );
-FCT (int, GetNcFromRight, (Buf *buf) );
-FCT (int, GetNewLine, (char *t, int len) );
-FCT (int, GetNumberOfLineInBuf, (Buf *buf) );
-FCT (void, GetPrevChar, (Buf *buf, char *c) );
+FCT (int, GetCurrentChar, (const Buf *buf, char *c) );
+FCT (char *, GetCurrentLine, (const Buf *buf, int *len) );
+FCT (char *, GetForwardLine, (const Buf *buf, int n, int *len) );
+FCT (int, GetNcFromLeft, (const Buf *buf) );
+FCT (int, GetNcFromRight, (const Buf *buf) );
+FCT (int, GetNewLine, (const char *t, int len) );
+FCT (int, GetNumberOfLineInBuf, (const Buf *buf) );
+FCT (void, GetPrevChar, (const Buf *buf, char *c) );
 FCT (void, HoleToLeft, (Buf *buf) );
 FCT (void, HoleToRight, (Buf *buf) );
-FCT (void, InsertNchar, (Buf *buf, char *s, int n) );
+FCT (void, InsertNchar, (Buf *buf, const char *s, int n) );
 FCT (int, LoadFileInBuffer, (Buf *buf, FILE *fd, int len, int flag) );
 FCT (int, MoveHole, (Buf *buf, int n) );
--- main_events.c	2006-12-16 10:43:49.000000000 -0500
+++ main_events.c	2014-12-28 22:32:27.000000000 -0500
@@ -39,4 +39,6 @@
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <setjmp.h>
 #include <signal.h>
@@ -47,4 +49,5 @@
 #include <sys/select.h>
 #endif
+#include <err.h>
 
 #include <X11/Xlib.h>
@@ -63,4 +66,5 @@
 #include "ctr_panel.h"
 #include "main_events.h"
+#include "parse.h"
 #include "process.h"
 #include "new_window.h"
@@ -71,7 +75,11 @@
 #include "cb_names.h"
 #include "get_file.h"
+#include "scroll.h"
 #include "selection.h"
 #include "tbox.h"
 #include "options.h"
+#include "ie_func.h"
+#include "Smac/smacXcoral.h"
+#include "tool_bar.h"
 
 EdWin	*CreateWindow ();
@@ -90,17 +98,14 @@
 static XEvent *ev = &event;
 
-extern void exit ();
-extern int ToolBarButton();
-
 FCT (static void, ButtonPressInControl, (XEvent *ev, Text *text, int i) );
-FCT (static void, HandleKeyPress, () );
-FCT (static void, HandleKeyRelease, () );
-FCT (static void, HandleMap, () );
-FCT (static void, HandleMessage, () );
-FCT (static void, HandleSelectionRequest, () );
-FCT (static void, HandleSelectionNotify, () );
-FCT (static void, HandlePropertyNotify, () );
-FCT (static void, IgnoreEvent, () );
-FCT (static void, ButtonUserFunc, (Text *text, int x, int y, char *func_name) );
+FCT (static void, HandleKeyPress, (void) );
+FCT (static void, HandleKeyRelease, (void) );
+FCT (static void, HandleMap, (void) );
+FCT (static void, HandleMessage, (void) );
+FCT (static void, HandleSelectionRequest, (void) );
+FCT (static void, HandleSelectionNotify, (void) );
+FCT (static void, HandlePropertyNotify, (void) );
+FCT (static void, IgnoreEvent, (void) );
+FCT (static void, ButtonUserFunc, (Text *text, int x, int y, const char *func_name) );
 
 #define MAX_EVENT 64
@@ -422,6 +427,5 @@
   XSelectionEvent ev_not;
   int nbytes = 0;
-  char *s;
-  int result;
+  const char *s;
 
 #ifdef DEBUG
@@ -436,5 +440,5 @@
   s = Fetch_bytes (&nbytes);
 
-  if (s == 0 || nbytes == 0) {
+  if (s == NULL || nbytes == 0) {
 #ifdef DEBUG
     (void) fprintf ( stderr, "Selection Request null\n" );
@@ -451,17 +455,7 @@
 				ev -> xselectionrequest.target : ev -> xselectionrequest.property);
 
-  if ((ev -> xselectionrequest.selection == XA_PRIMARY)
-      &&((ev -> xselectionrequest.target == XA_STRING)
-	|| strcmp(XGetAtomName(dpy,ev_not.target),"COMPOUND_TEXT") ==0) 
-      &&(ev -> xselectionrequest.property)) {
-    {
       XChangeProperty (dpy, ev_not.requestor, ev_not.property,
 		       ev_not.target, 8, PropModeReplace,
 		       (unsigned char *) s, nbytes );
-    }
-  }
-  else {
-    ev_not.property = None;
-  }
 
   XSendEvent (dpy, ev_not.requestor, False, 0L, (XEvent *) &ev_not);
@@ -883,5 +877,5 @@
 	return;
     }
-    if ( ToolBarButton ( edwin, (XButtonEvent *) ev ) == True ) {
+    if ( ToolBarButton ( edwin, ev ) == True ) {
       return;
     }
@@ -994,5 +988,5 @@
 	    }
 	    TextCursorOn ( edwin -> text );
-	    selection_time = HandleSelection (edwin -> text, ev);
+	    selection_time = HandleSelection(edwin -> text);
 	    if (edwin -> text -> selection -> select == True) {
 	      /* Il faut effacer la derniere selection si elle existe */
@@ -1164,5 +1158,5 @@
     Text *text;
     int x, y;
-    char *func_name;
+    const char *func_name;
 {
     int old_x = text -> x_pos;
--- mark_reg.c	2000-12-26 10:14:59.000000000 -0500
+++ mark_reg.c	2014-12-28 00:18:17.000000000 -0500
@@ -43,4 +43,10 @@
 #include <X11/Xutil.h>
 
+#if HAVE_STRING_H
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+
 #include "main_text.h"
 #include "mark_reg.h"
@@ -54,4 +60,5 @@
 #include "kill_buf.h"
 #include "selection.h"
+#include "Smac/smacXcoral.h"
 
 /* #define DEBUG */
@@ -65,5 +72,5 @@
 FCT (static int, OnMark, (Text *text, int len, int lines) );
 FCT (static void, SmallRegion, (Text *text, int op) );
-FCT (static void, eval_expression, (Text *text, char *str) );
+FCT (static void, eval_expression, (Text *text, const char *str) );
 
 static int ml, mp;
@@ -617,5 +624,5 @@
     int diff, lines;
     int len;
-    char *p;
+    const char *p;
     char buf [32];    
     
@@ -757,9 +764,9 @@
     Text *text;
 {
-  char *msg;
+  const char *msg;
   int nw = text->win_id;
 
   StorePosition ( text );
-  msg = (char *) ie_call_function ( text, "indent_region", 0, 0) ;
+  msg = ie_call_function ( text, "indent_region", 0, 0) ;
   text = update_cwd(nw);
   if ( msg != 0 )
@@ -778,9 +785,9 @@
     Text *text;
 {
-    char *msg;
+    const char *msg;
     int nw = text->win_id;
     
     StorePosition ( text );
-    msg = (char *) ie_eval_region (text) ;
+    msg = ie_eval_region (text) ;
     text = update_cwd(nw);
     
@@ -800,12 +807,12 @@
 static void eval_expression ( text, str )
     Text *text;
-    char *str;
+    const char *str;
 {
-    char *msg;
+    const char *msg;
     int nw = text->win_id;
     
     if ( str == 0 )
       return;
-    msg = (char *) ie_eval_expression ( text, str );
+    msg = ie_eval_expression ( text, str );
     text = update_cwd(nw);
     
@@ -827,5 +834,5 @@
     Text *text;
 {
-    char *str;
+    const char *str;
     char c = '\007'; /* ^G */
 
@@ -853,5 +860,5 @@
     Text *text;
 {
-    char *str;
+    const char *str;
     char c = '\007'; /* ^G */
     
@@ -863,5 +870,5 @@
     StorePosition ( text );
     SetMBcontext ( CTX_EVAL_EXP );
-    str = (char *) GetStringFromDB ( "Eval expression : ", False );
+    str = GetStringFromDB ( "Eval expression : ", False );
     SetMBcontext ( CTX_FILE );
   
@@ -884,8 +891,8 @@
     Text *text;
 {
-  char *msg;
+  const char *msg;
 
   StorePosition (text);
-  msg = (char *) ie_call_function ( text, "color_region", 0, 0);
+  msg = ie_call_function ( text, "color_region", 0, 0);
   if ( msg != 0 )
     DisplayMessage ( text -> mwin, msg );
@@ -903,8 +910,8 @@
     Text *text;
 {
-  char *msg;
+  const char *msg;
 
   StorePosition (text);
-  msg = (char *) ie_call_function ( text, "color_buffer", 0, 0);
+  msg = ie_call_function ( text, "color_buffer", 0, 0);
   if ( msg != 0 )
     DisplayMessage ( text -> mwin, msg );
@@ -921,8 +928,8 @@
     Text *text;
 {
-  char *msg;
+  const char *msg;
 
   StorePosition (text);
-  msg = (char *) ie_call_function ( text, "remove_colors", 0, 0);
+  msg = ie_call_function ( text, "remove_colors", 0, 0);
   if ( msg != 0 )
     DisplayMessage ( text -> mwin, msg );
@@ -1066,5 +1073,5 @@
   int lines;
   int len;
-  char *p;
+  const char *p;
   
   if ( text -> markline == 0 )
--- selection.c	2001-01-22 15:06:37.000000000 -0500
+++ selection.c	2014-12-28 22:03:30.000000000 -0500
@@ -39,4 +39,5 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/Xlib.h>
 #include <X11/cursorfont.h>
@@ -61,12 +62,4 @@
 FCT (static void, display_one_line, (Text *text));
 
-FCT (void, ClearSelection, (Text *text, int select) );
-FCT (void, RefreshSelection, (Text *text) );
-FCT (Time, HandleSelection, (Text *text, XEvent *ev) );
-FCT (void, StartSelection, (Text *text) );
-FCT (void, EndSelection, (Text *text) );
-FCT (void, UpdateSelection, (Text *text) );
-FCT (void, ClearSelectionIfNeeded, (Text *text) );
-
 extern Display *dpy;
 static XRectangle rect [8];
@@ -75,6 +68,5 @@
 static int select_run = False;
 static XEvent event;
-static scroll_x = 0;
-static scroll_run = False;
+static int scroll_run = False;
 static GC sgc;
 
@@ -94,5 +86,5 @@
     unsigned long gcm, sfg;
     int result;
-    char *s_color;
+    const char *s_color;
 
     if (UseColor() == False) {
@@ -107,16 +99,11 @@
 
     /* color display */
-    s_color = (char *) getenv("XCORAL_SELECTION");
-    if (s_color == NULL) {
-      sfg = PixelValue (dpy, "gray", &result);
-      if (result != False)
-	fg = sfg;
-    }
-    else {
+    s_color = getenv("XCORAL_SELECTION");
+    if (s_color == NULL)
+      s_color = "gray";
       sfg = PixelValue (dpy, s_color, &result);
-      if (result != False)
+    if (result)
 	fg = sfg;
-    }
-    if (result == False)
+    else 
       fg = BlackPixel(dpy, DefaultScreen(dpy));
 
@@ -137,7 +124,6 @@
 **	Output :
 */
-Time HandleSelection(text, ev)
+Time HandleSelection(text)
     Text *text;
-    XEvent *ev;
 {
   Window root, child;
@@ -714,7 +700,7 @@
 */
 int SelectionIsVisible(text)
-    Text *text;
+    const Text *text;
 {
-  if (text -> selection -> select == False) 
+  if (!text->selection->select) 
     return 0;
 
@@ -1031,5 +1017,5 @@
       (void) fprintf (stderr, "111 s equal e, sl sup el\n");
 #endif /* DEBUG11 */
-      Store_bytes((char *)(RightBuf(text->buf)/*+1*/),nc/*-1*/);
+      Store_bytes((RightBuf(text->buf)/*+1*/),nc/*-1*/);
     }
     else { /* nc<0 */
@@ -1037,5 +1023,5 @@
       (void) fprintf (stderr, "112 s equal e, sl inf el \n");
 #endif /* DEBUG11 */
-      Store_bytes((char *)(LeftBuf(text->buf)+nc+1), -nc);
+      Store_bytes((LeftBuf(text->buf)+nc+1), -nc);
     }
   }
@@ -1044,5 +1030,5 @@
     /* Selection vers le debut du buffer */
 #ifdef DEBUG11
-    (void) fprintf (stderr, "111 s sup e %c\n", (char *)RightBuf(text->buf)+1);
+    (void) fprintf (stderr, "111 s sup e %.10s\n", RightBuf(text->buf)+1);
 #endif /* DEBUG11 */
     nc = 0;
@@ -1229,5 +1215,5 @@
   if(select) {
     text -> selection -> select = True;
-    (void) get_bytes_selection (text);
+    get_bytes_selection (text);
   }
 }
