aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/test/railroad.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commit7a69bbfb278952228c9aa1eca241e65fcdef425e (patch)
treee83b2ef47811e687a6c54035c9af6d4a2b7f14e1 /contrib/ncurses/test/railroad.c
parent18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (diff)
downloadsrc-7a69bbfb278952228c9aa1eca241e65fcdef425e.tar.gz
src-7a69bbfb278952228c9aa1eca241e65fcdef425e.zip
Import ncurses-5.2-20010512 onto the vendor branch
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=76726
Diffstat (limited to 'contrib/ncurses/test/railroad.c')
-rw-r--r--contrib/ncurses/test/railroad.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/ncurses/test/railroad.c b/contrib/ncurses/test/railroad.c
index a9aa30674b47..6d5cd2581537 100644
--- a/contrib/ncurses/test/railroad.c
+++ b/contrib/ncurses/test/railroad.c
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey <dickey@clark.net> 2000
*
- * $Id: railroad.c,v 1.3 2000/09/24 00:20:33 tom Exp $
+ * $Id: railroad.c,v 1.5 2001/03/24 22:01:42 tom Exp $
*
* A simple demo of the termcap interface.
*/
@@ -120,7 +120,7 @@ ShowSign(char *string)
while (*string != 0) {
ch = *string;
if (moveit != 0) {
- for (first = length - 1; first > (string - base); first--) {
+ for (first = length - 2; first >= (string - base); first--) {
if (first < length - 1) {
tputs(tgoto(moveit, first + 1, height - 1), 1, outc);
PutChar(' ');
@@ -233,8 +233,9 @@ main(int argc, char *argv[])
if (argc > 1) {
railroad(argv + 1);
} else {
+ static char world[] = "Hello World";
static char *hello[] =
- {"Hello World", 0};
+ {world, 0};
railroad(hello);
}
return EXIT_SUCCESS;