X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcaptoinfo.c;h=6a2252ee25406ede681d42f76d2ed7dda5aaba2e;hp=f5bad75a97cfebe552a3072d641a2976fef4cca0;hb=d76c9bfec68e0efa6e1b8e95b32b66caf25cfc12;hpb=a8e3f06ac309504143cd56ac9ec55889bfdf4914 diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c index f5bad75a..6a2252ee 100644 --- a/ncurses/tinfo/captoinfo.c +++ b/ncurses/tinfo/captoinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * + * Copyright (c) 1998-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 * @@ -97,7 +97,7 @@ #include #include -MODULE_ID("$Id: captoinfo.c,v 1.94 2017/04/21 23:26:38 tom Exp $") +MODULE_ID("$Id: captoinfo.c,v 1.96 2018/05/12 16:46:55 tom Exp $") #if 0 #define DEBUG_THIS(p) DEBUG(9, p) @@ -246,6 +246,8 @@ static void getparm(int parm, int n) /* push n copies of param on the terminfo stack if not already there */ { + int nn; + if (seenr) { if (parm == 1) parm = 2; @@ -253,7 +255,7 @@ getparm(int parm, int n) parm = 1; } - while (n-- > 0) { + for (nn = 0; nn < n; ++nn) { dp = save_string(dp, "%p"); dp = save_char(dp, '0' + parm); } @@ -680,7 +682,7 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz if (isoctal(UChar(xx1))) { int pad = 0; int xx2; - int fix; + int fix = 0; if (!isoctal(UChar(str[1]))) pad = 2;