]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/parse_entry.c
ncurses 6.0 - patch 20170422
[ncurses.git] / ncurses / tinfo / parse_entry.c
index d814594854aa44c1f5ac018c0a198a33f1b0d294..1a786f664b2f7ed4a0cb2c42d54a9b63b31c521f 100644 (file)
@@ -47,7 +47,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: parse_entry.c,v 1.83 2017/04/06 22:15:54 tom Exp $")
+MODULE_ID("$Id: parse_entry.c,v 1.84 2017/04/21 21:09:54 tom Exp $")
 
 #ifdef LINT
 static short const parametrized[] =
@@ -369,7 +369,16 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
            }
 
            /* deal with bad type/value combinations. */
-           if (token_type != CANCEL && entry_ptr->nte_type != token_type) {
+           if (token_type == CANCEL) {
+               /*
+                * Prefer terminfo in this (long-obsolete) ambiguity:
+                */
+               if (!strcmp("ma", _nc_curr_token.tk_name)) {
+                   entry_ptr = _nc_find_type_entry("ma", NUMBER,
+                                                   _nc_syntax != 0);
+                   assert(entry_ptr != 0);
+               }
+           } else if (entry_ptr->nte_type != token_type) {
                /*
                 * Nasty special cases here handle situations in which type
                 * information can resolve name clashes.  Normal lookup