]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_tparm.c
ncurses 6.0 - patch 20170311
[ncurses.git] / ncurses / tinfo / lib_tparm.c
index 44a20611e37327a532a167fd7719b9aa5a78212a..53a36092723aec2dc1b6ef48197946cfc1c6c427 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2015,2016 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 <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tparm.c,v 1.93 2014/10/11 03:04:31 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.95 2016/05/28 23:22:52 tom Exp $")
 
 /*
  *     char *
@@ -527,7 +527,6 @@ tparam_internal(int use_TPARM_ARG, const char *string, va_list ap)
     termcap_hack = FALSE;
     if (popcount == 0) {
        termcap_hack = TRUE;
-       popcount = number;
        for (i = number - 1; i >= 0; i--) {
            if (p_is_s[i])
                spush(p_is_s[i]);
@@ -672,11 +671,15 @@ tparam_internal(int use_TPARM_ARG, const char *string, va_list ap)
                break;
 
            case 'A':
-               npush(npop() && npop());
+               y = npop();
+               x = npop();
+               npush(y && x);
                break;
 
            case 'O':
-               npush(npop() || npop());
+               y = npop();
+               x = npop();
+               npush(y || x);
                break;
 
            case '&':