]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/alloc_ttype.c
ncurses 5.6 - patch 20081012
[ncurses.git] / ncurses / tinfo / alloc_ttype.c
index 9f31ed3ffab75b6712727847b9058534df257c84..b2b06d1b79ce7a347860dc6c93bb1121c73b103e 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1999-2003,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1999-2006,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -43,7 +43,7 @@
 #include <tic.h>
 #include <term_entry.h>
 
-MODULE_ID("$Id: alloc_ttype.c,v 1.16 2006/07/08 19:18:38 tom Exp $")
+MODULE_ID("$Id: alloc_ttype.c,v 1.17 2008/10/12 16:12:00 tom Exp $")
 
 #if NCURSES_XNAMES
 /*
@@ -365,6 +365,17 @@ adjust_cancels(TERMTYPE *to, TERMTYPE *from)
                } else {
                    j++;
                }
+           } else if ((k = _nc_find_ext_name(from, to->ext_Names[j],
+                                             STRING)) >= 0) {
+               if (_nc_del_ext_name(to, name, NUMBER)
+                   || _nc_del_ext_name(to, name, BOOLEAN)) {
+                   k = _nc_ins_ext_name(to, name, STRING);
+                   to->Strings[k] = CANCELLED_STRING;
+               } else {
+                   j++;
+               }
+           } else {
+               j++;
            }
        } else {
            j++;