while (strlen(filt) > 0) {
     filter *new_filter;
     /* break up the filt list */
-    char *end = strchr(filt, ',');
-    char *next;
+    const char *end = strchr(filt, ',');
+    const char *next;
     int len;
     if (end == NULL) {
       end = strchr(filt, '\0');
     int present;
     filter *filt = filters;
     /* break the string up */
-    char *end = strchr(flags, ',');
-    char *next;
+    const char *end = strchr(flags, ',');
+    const char *next;
     int len;
     if (end == NULL) {
       end = strchr(flags, '\0');
 
 
 typedef struct _icache_tree icache_tree;
 struct _icache_tree {
-  char *name;
+  const char *name;
   icache_tree *next;
   icache_tree *children;
 };
 
 static icache_tree *
 icache_tree_insert(icache_tree *tree,
-                  char *name)
+                  const char *name)
 {
   icache_tree *new_tree;
   /* find it */
 
   /* output the table that contains the actual instruction info */
   lf_printf(file, "typedef struct _itable_instruction_info {\n");
   lf_printf(file, "  itable_index nr;\n");
-  lf_printf(file, "  char *format;\n");
-  lf_printf(file, "  char *form;\n");
-  lf_printf(file, "  char *flags;\n");
-  lf_printf(file, "  char *mnemonic;\n");
-  lf_printf(file, "  char *name;\n");
-  lf_printf(file, "  char *file;\n");
+  lf_printf(file, "  const char *format;\n");
+  lf_printf(file, "  const char *form;\n");
+  lf_printf(file, "  const char *flags;\n");
+  lf_printf(file, "  const char *mnemonic;\n");
+  lf_printf(file, "  const char *name;\n");
+  lf_printf(file, "  const char *file;\n");
   lf_printf(file, "  int line_nr;\n");
   lf_printf(file, "} itable_info;\n");
   lf_printf(file, "\n");
 
 model_c_or_h_function(insn_table *entry,
                      lf *file,
                      table_entry *function,
-                     char *prefix)
+                     const char *prefix)
 {
   if (function->fields[function_type] == NULL
       || function->fields[function_type][0] == '\0') {
   insn *insn_ptr;
   model *model_ptr;
   insn *macro;
-  char *name;
+  const char *name;
   int model_create_p = 0;
   int model_init_p = 0;
   int model_halt_p = 0;
 {
   model_c_passed_data *data_ptr = (model_c_passed_data *)data;
   lf *file = data_ptr->file;
-  char *current_name = data_ptr->model_ptr->printable_name;
+  const char *current_name = data_ptr->model_ptr->printable_name;
   table_model_entry *model_ptr = instruction->file_entry->model_first;
 
   while (model_ptr) {
 {
   insn *insn_ptr;
   model *model_ptr;
-  char *name;
+  const char *name;
   int model_create_p = 0;
   int model_init_p = 0;
   int model_halt_p = 0;
 
 
 
 void
-append_cache_rule (cache_table **table, char *type, char *field_name,
-                  char *derived_name, char *type_def,
-                  char *expression, table_entry *file_entry)
+append_cache_rule (cache_table **table, const char *type,
+                  const char *field_name, const char *derived_name,
+                  const char *type_def, const char *expression,
+                  table_entry *file_entry)
 {
   while ((*table) != NULL)
     table = &(*table)->next;
 
 
 cache_table *
-load_cache_table(char *file_name,
+load_cache_table(const char *file_name,
                 int hi_bit_nr)
 {
   table *file = table_open(file_name, nr_cache_rule_fields, 0);
 
 typedef struct _cache_table cache_table;
 struct _cache_table {
   cache_rule_type type;
-  char *field_name;
-  char *derived_name;
-  char *type_def;
-  char *expression;
+  const char *field_name;
+  const char *derived_name;
+  const char *type_def;
+  const char *expression;
   table_entry *file_entry;
   cache_table *next;
 };
 
 
 extern cache_table *load_cache_table
-(char *file_name,
+(const char *file_name,
  int hi_bit_nr);
 
 extern void append_cache_rule
 (cache_table **table,
- char *type,
- char *field_name,
- char *derived_name,
- char *type_def,
- char *expression,
+ const char *type,
+ const char *field_name,
+ const char *derived_name,
+ const char *type_def,
+ const char *expression,
  table_entry *file_entry);
 
 
 
 
 decode_table *
-load_decode_table(char *file_name,
+load_decode_table(const char *file_name,
                  int hi_bit_nr)
 {
   table *file = table_open(file_name, nr_decode_fields, 0);
 
 (const char *type);
 
 extern decode_table *load_decode_table
-(char *file_name,
+(const char *file_name,
  int hi_bit_nr);
 
 extern void dump_decode_rule
 
 
 static insn_fields *
 parse_insn_format(table_entry *entry,
-                 char *format)
+                 const char *format)
 {
-  char *chp;
+  const char *chp;
   insn_fields *fields = ZALLOC(insn_fields);
 
   /* create a leading sentinal */
   chp = format;
 
   while (*chp != '\0') {
-    char *start_pos;
-    char *start_val;
+    const char *start_pos;
+    const char *start_val;
     int strlen_val;
     int strlen_pos;
     insn_field *new_field;
 }
 
 
-void
+static void
 parse_include_entry (table *file,
                      table_entry *file_entry,
                     filter *filters,
   /* Check out any model information returned to make sure the model
      is correct.  */
   for(insn_model_ptr = file_entry->model_first; insn_model_ptr; insn_model_ptr = insn_model_ptr->next) {
-    char *name = insn_model_ptr->fields[insn_model_name];
+    const char *name = insn_model_ptr->fields[insn_model_name];
     int len = strlen (insn_model_ptr->fields[insn_model_fields]);
 
     while (len > 0 && isspace(*insn_model_ptr->fields[insn_model_fields])) {
     return field_constant_slash;
   /* field, though variable is on the list */
   if (field->is_string && rule->force_expansion != NULL) {
-    char *forced_fields = rule->force_expansion;
+    const char *forced_fields = rule->force_expansion;
     while (*forced_fields != '\0') {
       int field_len;
-      char *end = strchr(forced_fields, ',');
+      const char *end = strchr(forced_fields, ',');
       if (end == NULL)
        field_len = strlen(forced_fields);
       else
 
 
 
 lf *
-lf_open(char *name,
-       char *real_name,
+lf_open(const char *name,
+       const char *real_name,
        lf_file_references references,
        lf_file_type type,
        const char *program)
 
    suppressed with LINE_NUMBERS */
 
 extern lf *lf_open
-(char *name,
- char *real_name,
+(const char *name,
+ const char *real_name,
  lf_file_references file_references,
  lf_file_type type,
  const char *program);
 
 #include <string.h>
 
 void
-error (char *msg, ...)
+error (const char *msg, ...)
 {
   va_list ap;
   va_start(ap, msg);
 }
 
 void
-dumpf (int indent, char *msg, ...)
+dumpf (int indent, const char *msg, ...)
 {
   va_list ap;
   for (; indent > 0; indent--)
   const char *name = names;
   while (*name != '\0') {
     /* find our name */
-    char *end = strchr(name, ',');
-    char *next;
+    const char *end = strchr(name, ',');
+    const char *next;
     int len;
     if (end == NULL) {
       end = strchr(name, '\0');
 
 #include "filter_filename.h"
 
 extern void error
-(char *msg, ...);
+(const char *msg, ...);
 
 #define ASSERT(EXPRESSION) \
 do { \
 (long size);
 
 extern void dumpf
-(int indent, char *msg, ...);
+(int indent, const char *msg, ...);
 
 extern unsigned target_a2i
 (int ms_bit_nr,