X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Falloc_ttype.c;h=6e830d0fdf003eb17af7664df63286b75a27542e;hp=4a1b691382c86fb6551f9c2d8063342d7c3fb18e;hb=7d6371e47006c8aef4ac94f52998a35b03bf89cf;hpb=5e1e572b71ae31a6071daa24e2460a68a6f1003c diff --git a/ncurses/tinfo/alloc_ttype.c b/ncurses/tinfo/alloc_ttype.c index 4a1b6913..6e830d0f 100644 --- a/ncurses/tinfo/alloc_ttype.c +++ b/ncurses/tinfo/alloc_ttype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2016,2017 Free Software Foundation, Inc. * + * Copyright (c) 1999-2017,2018 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 * @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: alloc_ttype.c,v 1.29 2017/04/09 23:15:34 tom Exp $") +MODULE_ID("$Id: alloc_ttype.c,v 1.30 2018/04/14 19:24:54 tom Exp $") #if NCURSES_XNAMES /* @@ -388,12 +388,16 @@ adjust_cancels(TERMTYPE2 *to, TERMTYPE2 *from) NCURSES_EXPORT(void) _nc_align_termtype(TERMTYPE2 *to, TERMTYPE2 *from) { - int na = (int) NUM_EXT_NAMES(to); - int nb = (int) NUM_EXT_NAMES(from); + int na; + int nb; char **ext_Names; - DEBUG(2, ("align_termtype to(%d:%s), from(%d:%s)", na, to->term_names, - nb, from->term_names)); + na = to ? ((int) NUM_EXT_NAMES(to)) : 0; + nb = from ? ((int) NUM_EXT_NAMES(from)) : 0; + + DEBUG(2, ("align_termtype to(%d:%s), from(%d:%s)", + na, to ? NonNull(to->term_names) : "?", + nb, from ? NonNull(from->term_names) : "?")); if (na != 0 || nb != 0) { int ext_Booleans, ext_Numbers, ext_Strings; @@ -592,12 +596,4 @@ _nc_export_termtype2(TERMTYPE *dst, const TERMTYPE2 *src) DEBUG(2, ("_nc_export_termtype2...")); copy_termtype((TERMTYPE2 *) dst, src, srcINT); } - -/* FIXME - this will go away when conversion is complete */ -NCURSES_EXPORT(void) -_nc_import_termtype2(TERMTYPE2 *dst, const TERMTYPE *src) -{ - DEBUG(2, ("_nc_import_termtype2...")); - copy_termtype(dst, (const TERMTYPE2 *) src, dstINT); -} #endif /* NCURSES_EXT_NUMBERS */