summaryrefslogtreecommitdiffstats
path: root/generic/tkArgv.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2008-04-07 22:27:21 (GMT)
committerhobbs <hobbs>2008-04-07 22:27:21 (GMT)
commit7960412128f72b9e1ecd504b0f3b6db3ec03ab2e (patch)
treeda698201329980e6240409a8862233e3019c1762 /generic/tkArgv.c
parent72545be83f4d2bd7b87eed2bb305c258c12e307d (diff)
downloadtk-7960412128f72b9e1ecd504b0f3b6db3ec03ab2e.zip
tk-7960412128f72b9e1ecd504b0f3b6db3ec03ab2e.tar.gz
tk-7960412128f72b9e1ecd504b0f3b6db3ec03ab2e.tar.bz2
use kenny variant for 1936238 fix
Diffstat (limited to 'generic/tkArgv.c')
-rw-r--r--generic/tkArgv.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/generic/tkArgv.c b/generic/tkArgv.c
index 286f348..1a530b2 100644
--- a/generic/tkArgv.c
+++ b/generic/tkArgv.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkArgv.c,v 1.11.2.1 2008/04/07 18:38:01 hobbs Exp $
+ * RCS: @(#) $Id: tkArgv.c,v 1.11.2.2 2008/04/07 22:27:21 hobbs Exp $
*/
#include "tkInt.h"
@@ -337,10 +337,7 @@ PrintUsage(
* for default options. */
{
register Tk_ArgvInfo *infoPtr;
- size_t width, i;
- int numSpaces; /* must be int to allow for negative values */
-#define NUM_SPACES 20
- static char spaces[] = " ";
+ size_t width, i, numSpaces;
char tmp[TCL_DOUBLE_SPACE];
/*
@@ -373,13 +370,8 @@ PrintUsage(
}
Tcl_AppendResult(interp, "\n ", infoPtr->key, ":", NULL);
numSpaces = width + 1 - strlen(infoPtr->key);
- while (numSpaces > 0) {
- if (numSpaces >= NUM_SPACES) {
- Tcl_AppendResult(interp, spaces, NULL);
- } else {
- Tcl_AppendResult(interp, spaces+NUM_SPACES-numSpaces,NULL);
- }
- numSpaces -= NUM_SPACES;
+ while (numSpaces-- > 0) {
+ Tcl_AppendResult(interp, " ", NULL);
}
Tcl_AppendResult(interp, infoPtr->help, NULL);
switch (infoPtr->type) {