summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses/test/railroad.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerpeter <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commit2d92ca4d1406bb14f0584ee668516b4c3303416c (patch)
treeddc5913d13b386dceb6b29644af208b011ae2bad /contrib/ncurses/test/railroad.c
parent5411edc0fbb52100d0c701ae4710b831a88fe7d5 (diff)
parentb7ada7f2444f41b672faef4f93e446bdf8584cf9 (diff)
downloadFreeBSD-src-2d92ca4d1406bb14f0584ee668516b4c3303416c.zip
FreeBSD-src-2d92ca4d1406bb14f0584ee668516b4c3303416c.tar.gz
This commit was generated by cvs2svn to compensate for changes in r76726,
which included commits to RCS files with non-trunk default branches.
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 a9aa306..6d5cd25 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;
OpenPOWER on IntegriCloud