]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/comp_parse.c
ncurses 6.1 - patch 20200118
[ncurses.git] / ncurses / tinfo / comp_parse.c
index b97332ebc990c007f33975cfdc4eca57ac1db062..82c3fa2c950a05124b1617058d2bed752fc53d91 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2018,2019 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            *
@@ -47,7 +47,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: comp_parse.c,v 1.105 2018/04/14 20:33:44 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.108 2019/12/14 22:34:35 tom Exp $")
 
 static void sanity_check2(TERMTYPE2 *, bool);
 NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
@@ -80,7 +80,7 @@ force_bar(char *dst, char *src)
        size_t len = strlen(src);
        if (len > MAX_NAME_SIZE)
            len = MAX_NAME_SIZE;
-       _nc_STRNCPY(dst, src, len);
+       _nc_STRNCPY(dst, src, MAX_NAME_SIZE);
        _nc_STRCPY(dst + len, "|", NAMEBUFFER_SIZE - len);
        src = dst;
     }
@@ -180,11 +180,11 @@ remove_collision(char *n1, char *n2)
                        ++qend;
                    while ((*qstart++ = *qend++) != '\0') ;
                    fprintf(stderr, "...now\t%s\n", p2);
+                   removed = TRUE;
                } else {
                    fprintf(stderr, "Cannot remove alias '%.*s'\n",
                            (int) (qend - qstart), qstart);
                }
-               removed = TRUE;
                break;
            }
        }
@@ -724,6 +724,6 @@ NCURSES_EXPORT(void)
 _nc_free_tic(int code)
 {
     _nc_leaks_tic();
-    _nc_free_tinfo(code);
+    exit_terminfo(code);
 }
 #endif