]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/name_match.c
ncurses 5.9 - patch 20130713
[ncurses.git] / ncurses / tinfo / name_match.c
index fccd26491e44d611d603d26e7d3bc546d5f2795e..c648535526d2f012d0351e5eb39eed40a8a6d97d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1999-2008,2011 Free Software Foundation, Inc.              *
+ * Copyright (c) 1999-2012,2013 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            *
 #include <curses.priv.h>
 #include <tic.h>
 
-MODULE_ID("$Id: name_match.c,v 1.21 2011/08/13 20:23:12 tom Exp $")
+MODULE_ID("$Id: name_match.c,v 1.23 2013/05/25 20:20:08 tom Exp $")
 
 #define FirstName _nc_globals.first_name
 
-#if USE_TERMCAP && NCURSES_XNAMES
+#if NCURSES_USE_TERMCAP && NCURSES_XNAMES
 static const char *
 skip_index(const char *name)
 {
@@ -62,8 +62,9 @@ _nc_first_name(const char *const sp)
 
 #if NO_LEAKS
     if (sp == 0) {
-       if (FirstName != 0)
+       if (FirstName != 0) {
            FreeAndNull(FirstName);
+       }
     } else
 #endif
     {
@@ -72,7 +73,7 @@ _nc_first_name(const char *const sp)
 
        if (FirstName != 0) {
            const char *src = sp;
-#if USE_TERMCAP && NCURSES_XNAMES
+#if NCURSES_USE_TERMCAP && NCURSES_XNAMES
            src = skip_index(sp);
 #endif
            for (n = 0; n < MAX_NAME_SIZE; n++) {