]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_tparm.c
ncurses 5.9 - patch 20111217
[ncurses.git] / ncurses / tinfo / lib_tparm.c
index 7cd12f7f6845e3c14820d43725ac6c00e5d92f8b..53205d1711bf06fb86c563edc4433e959ee9e995 100644 (file)
@@ -42,7 +42,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tparm.c,v 1.82 2011/01/15 22:19:12 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.84 2011/10/22 15:48:47 tom Exp $")
 
 /*
  *     char *
@@ -153,7 +153,7 @@ save_number(const char *fmt, int number, int len)
     if (len < 30)
        len = 30;               /* actually log10(MAX_INT)+1 */
 
-    get_space((unsigned) len + 1);
+    get_space((size_t) len + 1);
 
     (void) sprintf(TPS(out_buff) + TPS(out_used), fmt, number);
     TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used));
@@ -164,7 +164,7 @@ save_char(int c)
 {
     if (c == 0)
        c = 0200;
-    get_space(1);
+    get_space((size_t) 1);
     TPS(out_buff)[TPS(out_used)++] = (char) c;
 }
 
@@ -450,7 +450,7 @@ _nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount)
 }
 
 static NCURSES_INLINE char *
-tparam_internal(bool use_TPARM_ARG, const char *string, va_list ap)
+tparam_internal(int use_TPARM_ARG, const char *string, va_list ap)
 {
     char *p_is_s[NUM_PARM];
     TPARM_ARG param[NUM_PARM];
@@ -522,7 +522,7 @@ tparam_internal(bool use_TPARM_ARG, const char *string, va_list ap)
     }
 #ifdef TRACE
     if (USE_TRACEF(TRACE_CALLS)) {
-       for (i = 0; i < popcount; i++) {
+       for (i = 0; i < num_args; i++) {
            if (p_is_s[i] != 0)
                save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
            else
@@ -757,7 +757,7 @@ tparam_internal(bool use_TPARM_ARG, const char *string, va_list ap)
        cp++;
     }                          /* endwhile (*cp) */
 
-    get_space(1);
+    get_space((size_t) 1);
     TPS(out_buff)[TPS(out_used)] = '\0';
 
     T((T_RETURN("%s"), _nc_visbuf(TPS(out_buff))));