Moved default keymap to keychars.c
[idzebra-moved-to-github.git] / util / charmap.c
index 023d22f..120bbed 100644 (file)
@@ -4,7 +4,16 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: charmap.c,v $
- * Revision 1.2  1996-06-03 10:15:09  quinn
+ * Revision 1.5  1996-06-04 08:32:15  quinn
+ * Moved default keymap to keychars.c
+ *
+ * Revision 1.4  1996/06/03  16:32:13  quinn
+ * Temporary bug-fix
+ *
+ * Revision 1.3  1996/06/03  15:17:46  quinn
+ * Fixed bug.
+ *
+ * Revision 1.2  1996/06/03  10:15:09  quinn
  * Fixed bug in mapping function.
  *
  * Revision 1.1  1996/05/31  09:07:18  quinn
@@ -60,10 +69,7 @@ static chr_t_entry *set_map_string(chr_t_entry *root, char *from, int len,
            (char*) root->target == CHR_UNKNOWN)
            root->target = (unsigned char *) xstrdup(to);
        else if ((char*) to != CHR_SPACE)
-       {
-           logf(LOG_FATAL, "Character map overlap");
-           return 0;
-       }
+           logf(LOG_WARN, "Character map overlap");
     }
     else
     {
@@ -131,24 +137,9 @@ static chr_t_entry *find_entry(chr_t_entry *t, char **from, int len)
 
 char **chr_map_input(chr_t_entry *t, char **from, int len)
 {
-    static char *buf[2] = {0, 0}, str[2] = {0, 0};
+    static char *buf[2] = {0, 0};
     chr_t_entry *res;
 
-    if (!t) /* no table loaded. Null mapping */
-    {
-       if (isalnum(**from))
-       {
-           str[0] = **from;
-           buf[0] = str;
-       }
-       else if (isspace(**from))
-           buf[0] = (char*) CHR_SPACE;
-       else
-           buf[0] = (char*) CHR_UNKNOWN;
-       (*from)++;
-       return buf;
-    }
-    /* no children match. use our target string */
     if (!(res = find_entry(t, from, len)))
        abort();
     buf[0] = (char *) res->target;