CVS commit: src/tests/lib/libcurses

2021-06-22 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Tue Jun 22 07:49:59 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: addstr2.chk addstr3.chk
copywin6.chk copywin7.chk dupwin1.chk dupwin2.chk
src/tests/lib/libcurses/tests: addstr

Log Message:
Update the check files to account for fixes to addstr.c


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/check_files/addstr2.chk \
src/tests/lib/libcurses/check_files/addstr3.chk
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/check_files/copywin6.chk \
src/tests/lib/libcurses/check_files/copywin7.chk
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/check_files/dupwin1.chk \
src/tests/lib/libcurses/check_files/dupwin2.chk
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/tests/addstr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-06-22 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Tue Jun 22 07:29:16 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: slk1.chk slk3.chk slk5.chk
slk6.chk slk_init.chk
src/tests/lib/libcurses/tests: slk

Log Message:
Fix slk test and check files due to libcurses slk changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/check_files/slk1.chk \
src/tests/lib/libcurses/check_files/slk3.chk \
src/tests/lib/libcurses/check_files/slk5.chk \
src/tests/lib/libcurses/check_files/slk6.chk \
src/tests/lib/libcurses/check_files/slk_init.chk
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/tests/slk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-06-15 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Tue Jun 15 22:21:09 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: slk

Log Message:
Restore the slk_wset test after fixing a but in libcurses.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/tests/slk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 21:54:52 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: fix argument handling for mvwget_wch

There's currently no test for that function, therefore no functional
change.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 19:50:18 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: lint.lua

Log Message:
tests/libcurses: make error handling in the linter simpler


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/slave/lint.lua

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 19:41:12 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: lint.lua

Log Message:
tests/libcurses: improve code locality in linter

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/slave/lint.lua

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 19:25:08 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: lint.lua

Log Message:
tests/libcurses: improve local variable names in linter


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/slave/lint.lua

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 19:17:53 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c curses_commands.h

Log Message:
tests/libcurses: unexport argument handling functions

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/tests/lib/libcurses/slave/curses_commands.c
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libcurses/slave/curses_commands.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 19:13:20 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: KNF for while loop


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 18:11:44 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c lint.lua

Log Message:
tests/libcurses: remove redundant argument numbers

Since all arguments are processed in increasing order, there is no need
to add the redundant argument numbers.  Most of the curses functions
have less than 5 arguments, which makes it easy enough to count the ARG
macros.

Changes to curses_commands.c:

* replace ^(\tARG_\w+\()\d(?:, |) with $1
* replace (define ARG_\w+\()i,\s with $1
* replace args\[i\] with *args++
* replace \(i\) with ()
* replace \(void\)0 with args++

The wrong argument count in cmd_mvwget_wch is still detected by
lint.lua, as it was before.  There is no test yet that covers this
function.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/tests/lib/libcurses/slave/curses_commands.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/slave/lint.lua

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 12:46:02 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: commands.c slave.c

Log Message:
tests/libcurses: add parentheses around argument to sizeof


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libcurses/slave/commands.c
cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-06-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 13 11:06:20 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: sprinkle 'const', normalize sizeof

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-06-10 Thread Michael Forney
Module Name:src
Committed By:   mcf
Date:   Thu Jun 10 07:21:07 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
Unset ESCDELAY in libcurses test director to ensure consistent results

Non-default values of ESCDELAY may result in unexpected test failures.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-06-05 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sun Jun  6 04:57:58 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: Makefile slk1.chk slk3.chk
slk5.chk slk6.chk slk_init.chk
src/tests/lib/libcurses/tests: addstr slk
Added Files:
src/tests/lib/libcurses/check_files: addstr2.chk addstr3.chk

Log Message:
New tests and updates for corrected behaviour due to fix for PR56224
* Added extra testing to the addstr test to demonstrate bug described
  in PR#56224 and validate case when scrolling enabled still works.
* Fixed slk test, the slk_init output changed due to corrected wrapping,
  slk_restore no longer returns ERR probably due to addwchar no longer
  returning ERR when an implicit scroll was attempted when scrolling
  disabled.  Commented out the slk_wset test, this is now returning ERR
  instead of misbehaving, needs investigation.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/check_files/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/check_files/addstr2.chk \
src/tests/lib/libcurses/check_files/addstr3.chk
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/check_files/slk1.chk \
src/tests/lib/libcurses/check_files/slk3.chk \
src/tests/lib/libcurses/check_files/slk5.chk \
src/tests/lib/libcurses/check_files/slk6.chk \
src/tests/lib/libcurses/check_files/slk_init.chk
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/tests/addstr
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/slk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-06-04 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sat Jun  5 06:23:48 UTC 2021

Modified Files:
src/tests/lib/libcurses: chk_gen

Log Message:
Convert % into %% in input string so printf won't barf


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/chk_gen

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-06-04 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sat Jun  5 06:13:37 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: clear

Log Message:
Decouple the clear test from the addstr test, they should not be linked
together because they are not really related.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/clear

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/check_files

2021-06-04 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sat Jun  5 06:11:09 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: Makefile
Added Files:
src/tests/lib/libcurses/check_files: clear0.chk

Log Message:
Add new check file for the clear test.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/check_files/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/check_files/clear0.chk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-06-04 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Fri Jun  4 23:07:39 UTC 2021

Modified Files:
src/tests/lib/libcurses: debug_test

Log Message:
Fix debug_test so it actually works and does not do damage
* disable blind clearing of /tmp.  The comment says this is needed for 
getwin/putwin
  those tests need to be looked at to correct this.
* remove invalid -I option from director arguments for now.
* fix paths to executables so debug_test will work with installed versions by 
default
  the previous version was using the src tree locations but basedir was wrong 
for that.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/debug_test

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Apr  6 01:29:37 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: fix names of over-the-wire data types

The test 'mvscanw' reported that it would send '%s' as 'numeric', which
was rather suspicious.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Apr  6 00:47:00 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: clean up table of input functions

The previous "table" was an insult to any reader.  It was unsorted,
listed the functions shuffled, and was not even formatted consistently.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Apr  6 00:35:58 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: don't waste time calling strlen needlessly


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-04-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Apr  4 09:49:13 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c
src/tests/lib/libcurses/tests: mvscanw

Log Message:
Reapply fix for big-endian environments, which was lost when GSoC results
were merged...

http://www.nerv.org/netbsd/?q=id:20200620T075016Z.3584036ccf31f69ee76ea4a02e9be30ff081df21

> Fix false positive for mvscanw tests on big endian machines.
>
> When conversion specifier is not a derivative form of "%s", retrieve
> input as 32bit integer, and then convert to string literal. Then we
> can avoid interpretation from ASCII code to integer, which is
> apparently byte-order depended.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/tests/lib/libcurses/slave/curses_commands.c
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/tests/mvscanw

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-04-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Apr  4 09:42:08 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c
src/tests/lib/libcurses/tests: mvscanw

Log Message:
When mvscanw(3) fails, string is not modified.
Let's ignore the 2nd result for this case.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libcurses/slave/curses_commands.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/tests/mvscanw

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-04-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Apr  4 09:34:24 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
s/&string/string/ for mvscanw(3); string is already pointer to buffer.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-24 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb 25 01:07:43 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: addbytes addch

Log Message:
tests/libcurses: add test for '\b' in addch

Just to ensure that addch and addstr behave the same, after the recent
fix for handling '\t'.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/tests/addbytes
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libcurses/tests/addch

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-24 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb 25 00:50:10 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l

Log Message:
tests/libcurses: use common style for parse error messages


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/tests/lib/libcurses/director/testlang_conf.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-24 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb 25 00:42:00 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l

Log Message:
tests/libcurses: use common syntax for accessing array elements

Writing *(p+1) is needlessly confusing, even though it adds a little
symmetry between *p and *(p+1).  Still, one of these expressions has
parentheses, the other doesn't, which breaks the symmetry.

Wrap overly long code line.

It's confusing to refer to the digits after the backslash once with
index 0 to 2, and the other time with index 1 to 3.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libcurses/director/testlang_conf.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-24 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb 25 00:32:44 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l

Log Message:
tests/libcurses: reduce indentation

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/lib/libcurses/director/testlang_conf.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-24 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb 25 00:26:57 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: addbytes

Log Message:
libcurses: ensure that '\b' in handled correctly in addstr

Just to ensure that the recent fix for '\t' handling in addstr/addch
didn't introduce another bug.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/tests/addbytes

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-24 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb 25 00:25:31 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l
src/tests/lib/libcurses/tests: addchstr

Log Message:
libcurses: prevent unknown escpae sequences in tests

Before, '\b' was interpreted as a simple 'b', which is confusing for C
programmers.  Same for '\a'.  There is absolutely no reason to escape
letters, so fail early in these cases.

The '\h' in the test addchstr was obviously a typo that was easy to
detect, if only the compiler had been strict enough from the very
beginning.

The code is wider than 80 characters, same as the code that parses octal
escape sequences a few lines above it.  This code will be refactored to
use less indentation in a follow-up commit.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/tests/addchstr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Feb 15 15:55:51 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
Simplify to avoid copy based on the size of the source.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb 15 07:06:27 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l testlang_parse.y
src/tests/lib/libcurses/slave: commands.c

Log Message:
tests/libcurses: fix error handling for non-system errors

These errors are unrelated to errno.  The scanf family of functions also
does not set errno.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.47 -r1.48 src/tests/lib/libcurses/director/testlang_parse.y
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libcurses/slave/commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb 14 11:21:37 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: addch

Log Message:
tests/libcurses: document the history about tab bugs in addch/addstr

Verified by installing all versions of libcurses from 2012 to 2021 and
running a simple test program on them:

#include 
#include 

int
main(int argc, char **argv)
{
int xstr, ystr, xch, ych;

initscr();

addstr("\t");
xstr = getcurx(stdscr);
addstr("\n");
ystr = getcury(stdscr);

addch('\t');
xch = getcurx(stdscr);
addch('\n');
ych = getcury(stdscr);

endwin();

fprintf(stderr, "%s\t%d,%d\t%d,%d\n",
argv[1], ystr, xstr, ych, xch);
}

Some selected outputs:

...
2016.11.24.14.49.08 1,0 2,8
2016.11.28.18.25.26 1,8 2,8
...
2019.05.12.02.29.00 1,8 2,8
2019.05.20.22.17.41 1,8 2,16
...
2021.02.13.10.37.00 1,8 2,16
2021.02.13.14.30.37 1,8 2,8


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/tests/addch

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 22:19:47 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: addbytes

Log Message:
tests/libcurses: note that addbytes is not part of the API

https://mail-index.netbsd.org/source-changes-d/2021/02/13/msg013199.html


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/addbytes

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 19:23:11 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: commands.c

Log Message:
tests/libcurses: protect against short writes

The previous code only errored out if a write failed completely.  If it
was partially written, the program continued without writing the rest of
it.

Extract the common code into a few functions that write raw data to the
parent process.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libcurses/slave/commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 18:24:11 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: lint.lua

Log Message:
tests/libcurses: remove unused code in linter


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/slave/lint.lua

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 16:43:12 UTC 2021

Modified Files:
src/tests/lib/libcurses: atf.terminfo

Log Message:
tests/libcurses: use ASCII only in terminfo description


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/atf.terminfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 16:38:02 UTC 2021

Modified Files:
src/tests/lib/libcurses: atf.terminfo

Log Message:
tests/libcurses: split terminfo entry over more lines

This provides space to see each capability on its own, instead of having
to search them in the blob of text.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/atf.terminfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 10:03:49 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: slave.c

Log Message:
tests/libcurses: extract read_command_argument from process_commands

Having code indented so far to the right that each word gets its own
line is ridiculous.  Fix that.

While here, remove the cargo-cult realloc pattern, which is not needed
if the process exits immediately on error.

While here, reduce the indentation of the code by returning early.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 09:28:27 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: slave.c

Log Message:
tests/libcurses: fix reading from the parent process

In case of a short read, processing the incomplete data invoked
undefined behavior.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 09:18:12 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c
src/tests/lib/libcurses/slave: slave.c

Log Message:
tests/libcurses: fix child process handling

The child process needs to be properly controlled by the parent process.
Otherwise it is not possible to get code coverage data from it using
gcov since that requires the child process to exit normally.  Previously
the child process had been killed because its parent had exited.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:43:03 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: fix error messages


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:37:21 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: mvwin

Log Message:
tests/libcurses: "fix" test mvwin

The test mvwin previously expected an endless stream of bytes, by
comparing the actual output with /dev/zero.  This didn't make sense as
the curses output does not contain '\0' in any of the test cases.

Compare with /dev/null instead.  This is as wrong as before, but the
curses test framework currently ignores this situation, as for many
other test cases.  See the numerous "Excess" messages in atf-run.log.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/mvwin

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:26:12 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: remove undocumented, unused command line option

The option -T has the same effect as the removed option -p.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:22:34 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: remove include path from usage message

The option has been removed a few minutes ago.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:17:15 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: slave.c slave.h

Log Message:
tests/libcurses: clean up remaining include guard, comments

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libcurses/slave/slave.c
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/slave/slave.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:14:46 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c director.h returns.h
testlang_conf.l testlang_parse.y
src/tests/lib/libcurses/slave: command_table.h commands.c
curses_commands.c curses_commands.h

Log Message:
tests/libcurses: clean up inclusion guards, function declarations

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/director/director.h
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/director/returns.h
cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.45 -r1.46 src/tests/lib/libcurses/director/testlang_parse.y
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/slave/command_table.h \
src/tests/lib/libcurses/slave/curses_commands.h
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libcurses/slave/commands.c
cvs rdiff -u -r1.21 -r1.22 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:00:07 UTC 2021

Modified Files:
src/tests/lib/libcurses: t_curses.sh
src/tests/lib/libcurses/director: director.c testlang_conf.l

Log Message:
tests/libcurses: remove include path handling

All include commands in the current test suite use relative paths.
Instead of a fixed include path, interpret the included filename
relative to the including file.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/lib/libcurses/t_curses.sh
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libcurses/director/testlang_conf.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 07:32:19 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: align comments


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 07:31:07 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: fix misleading usage documentation

The check-files are not config files.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 07:08:45 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c director.h
testlang_parse.y

Log Message:
tests/libcurses: fix pipe handling in the parent process

The parent process, like the child process, needs only 2 of the 4 pipe
ends.

In verbose mode (now at testlang_parse.y:1151 and :1154), both ends of the
pipe_from_slave were examined.  This looked like a typo and has been fixed
to those pipe ends that are relevant to the parent process.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/director/director.h
cvs rdiff -u -r1.44 -r1.45 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 06:45:42 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c
src/tests/lib/libcurses/slave: commands.c slave.c slave.h

Log Message:
tests/libcurses: fix pipe handling in child process

The child process only ever needs 2 ends of the pipes: one for reading
the commands, one for writing back the results.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libcurses/slave/commands.c
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libcurses/slave/slave.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/slave/slave.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 05:38:16 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: fix warnings for missing environment variables


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 21:29:54 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: slave.c

Log Message:
tests/libcurses: format misleading do-while loop


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 21:29:03 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: command_table.h curses_commands.h

Log Message:
tests/libcurses: remove wrong comments


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/slave/command_table.h \
src/tests/lib/libcurses/slave/curses_commands.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 20:45:00 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: remove excess empty lines


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 20:41:37 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c
Added Files:
src/tests/lib/libcurses/slave: lint.lua

Log Message:
tests/libcurses: query function arguments in consistent order


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libcurses/slave/curses_commands.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/slave/lint.lua

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 18:20:05 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: don't access args directly

By providing declarative syntax for accessing the arguments, the
unnecessarily detailed boilerplate code is hidden.  This allows easy
inspection by tools and humans, to check for typos and other mistakes.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 16:59:32 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: replace ARG_CHTYPE_STRING with ARG_CHTYPE

All uses of the previous macro did not treat the argument as a string or
array of chtype, but as a single chtype.  It's strange that the previous
code arbitrarily split the access to the argument by first storing it as
a pointer and then dereferencing it.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 16:49:19 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: add shortcut macros for SCREEN and unsigned int


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 14:05:57 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: remove redundant comments

There is nothing surprising about call2, call3 or call4.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 12:58:52 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: reduce boilerplate in function dispatcher

No functional change.  The generated code for GCC 9.3 on NetBSD 9.99.80
x86_64 is exactly the same as before.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 12 08:55:32 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: reduce boilerplate in function dispatcher

This makes the code more declarative and easier to reason about.

The generated code stays exactly the same.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  9 20:42:31 UTC 2021

Modified Files:
src/tests/lib/libcurses: t_curses.sh
src/tests/lib/libcurses/director: director.c testlang_parse.y
src/tests/lib/libcurses/slave: commands.c slave.c

Log Message:
tests/libcurses: add missing space after control flow keywords


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/tests/lib/libcurses/t_curses.sh
cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.43 -r1.44 src/tests/lib/libcurses/director/testlang_parse.y
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libcurses/slave/commands.c \
src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  9 20:39:20 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: commands.c

Log Message:
tests/libcurses: replace remaining strcasecmp with strcmp

There is no reason to write special functions in a different case than
the canonical one, just like for the regular curses functions.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libcurses/slave/commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  9 20:31:02 UTC 2021

Modified Files:
src/tests/lib/libcurses: testframe.txt
src/tests/lib/libcurses/tests: timeout wtimeout

Log Message:
tests/libcurses: fix spelling of the special call to DRAIN


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libcurses/testframe.txt
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/tests/timeout
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/wtimeout

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  9 20:24:02 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: commands.c

Log Message:
tests/libcurses: compare function names case-sensitive

There is absolutely no reason to write function names in upper case or
mixed case.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libcurses/slave/commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  9 20:22:11 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
tests/libcurses: fix scanf parameter for unsigned int


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 23:54:03 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l testlang_parse.y

Log Message:
tests/libcurses: fix off-by-one error in line numbers in diagnostics

I had broken this in testlang_parse.y 1.22 from 2021-02-07, when I
extracted the common 'eol' from the statements.  Extracting 'eol' had
the effect that the action for the statement was run before the line
number increased.

Now the line numbers in the diagnostics are the same again as before.

For lines that end with a backslash, the reported line number is the one
from the last of these lines, not the first one, also as before.  This
feature is not used by any of the current tests though.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.42 -r1.43 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 20:55:42 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: use consistent indentation for grammar rules


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 20:39:33 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: extract functions 'input' and 'noinput' from grammar


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 20:26:46 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: indent grammar functions consistently


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 20:09:45 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: declare %type in grammar

It looks as if the original author just didn't know how to declare the
type of non-terminals.  The explicit types in the '$' expressions were
all consistent.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 19:35:22 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: extract function 'delay_millis' from the grammar


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 19:28:08 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: move function 'check' out of the grammar section

This removes the inconsistent indentation.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 19:15:21 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c director.h returns.h
testlang_conf.l testlang_parse.y
src/tests/lib/libcurses/slave: command_table.h commands.c
curses_commands.c curses_commands.h slave.c slave.h

Log Message:
tests/libcurses: fix typo in license text


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libcurses/director/director.c \
src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/director/director.h
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/director/returns.h
cvs rdiff -u -r1.35 -r1.36 src/tests/lib/libcurses/director/testlang_parse.y
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/slave/command_table.h \
src/tests/lib/libcurses/slave/curses_commands.h \
src/tests/lib/libcurses/slave/slave.h
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/slave/commands.c
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libcurses/slave/curses_commands.c
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 19:09:59 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: remove unused token DRAIN

There is a special function named 'DRAIN', but not a statement.  The
function name does not need its own token.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 19:04:37 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: fix sentinel for execl

For systems where NULL is defined as a simple 0 or 0L.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb  8 19:00:22 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: on errors, print nonprintable characters as well


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 23:30:33 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: addch

Log Message:
tests/libcurses: fix undefined behavior in test addch

The libcurses framework is not strictly typed and thus provides plenty
of ways to shoot yourself in the foot.  It's a waste of time debugging
things that a proper programming language can easily prevent.

The function addch expects an argument of type 'chtype'.  Passing a
"double-quoted" string does not match this, as 'chtype' is completely
different from a plain 'char'.  Instead, functions taking a 'chtype'
must be passed a `backtick-quoted` string.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/tests/addch

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 21:33:27 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: use a single message style for diagnostics

Previously, there were several concurring styles:

$msg in line %zu of file %s
$msg line %zu of file %s
%s, %zu: $msg

All these are now replaced with "%s:%zu: $msg".


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 20:48:07 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: make grammar for test cases conflict-free

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 20:40:06 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l testlang_parse.y
src/tests/lib/libcurses/tests: keyname

Log Message:
tests/libcurses: fix grammar for arrays

Previously, commas were completely ignored by the grammar.  Erroring out
on invalid characters made some of the tests fail since the comma was
not recognized anymore.  Add it back, but only for defining arrays.  It
would have been possible to leave out the commas or make them optional,
but since the current tests do not make use of that, keep the grammar as
strict as possible.

Fix an unclosed string literal in a test.  This had been wrongly
accepted before by the grammar.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.31 -r1.32 src/tests/lib/libcurses/director/testlang_parse.y
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/tests/keyname

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 20:32:25 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l

Log Message:
tests/libcurses: do not allow control characters in paths


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libcurses/director/testlang_conf.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 20:27:40 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l

Log Message:
tests/libcurses: error out on trying to parse /dev/zero

Be strict when parsing the tests.  Any unknown character is an error.
This avoids an endless loop when running "./director /dev/zero".  There
is no point in silently ignoring other invalid characters as well, as
this would only leave potential test writers in an unclear state,
without any benefit.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libcurses/director/testlang_conf.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 20:20:06 UTC 2021

Modified Files:
src/tests/lib/libcurses: testframe.txt

Log Message:
tests/libcurses: fix documentation of call[234]

The function getyx is not a function but a macro.  It does not return
int, but void.  Since these changes destroy the simplicity of the
example, combining a regular return value and pass-by-reference return
values, I rewrote the whole section and added more examples.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/testframe.txt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 19:49:32 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l
src/tests/lib/libcurses/tests: innstr

Log Message:
tests/libcurses: require keywords to be lowercase, except for OK and ERR

There is no need to write the keywords in upper case or mixed case.  The
only case where a keyword did not have the canonical form yet was a
single lowercase 'ok' in the test case 'innstr'.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/innstr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 19:44:34 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: add missing semicolon in grammar


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 19:28:07 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: returns.h

Log Message:
tests/libcurses: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/director/returns.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/check_files

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 18:56:37 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: addchstr2.chk

Log Message:
tests/libcurses: fix expected test output

The test framework doesn't check the files strictly, it only checks
whether the expected output is a prefix of the actual output, or vice
versa.  This allows several deviations to pass unnoticed, which is
wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/check_files/addchstr2.chk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 18:32:20 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: add const to some function parameters


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 18:14:44 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: simplify code for writing to the .exp file

If a write(2) returns less than 1, it must be an error.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 17:50:16 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: actually compare the stream to an absolute path

Up to now, the test command "compare /dev/null" was a no-op since the
command was only parsed but not run at all.  Now run it.

This makes the test mvwin fail.  That test will have to be fixed.

Comparing to /dev/null is certainly possible and may make sense,
comparing to /dev/zero is nonsense since the actual stream can never be
endless.  Some tests do that nevertheless, for whatever reason.

In order to have the expected test output closer to the curses commands
that cause it, it may be a good idea to add another command
'compare_str' that would work independently of an external file and at
the same time allow the expected output to be commented and explained.
This is not possible right now since the .chk files are read exactly
as-is.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 17:32:55 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l testlang_parse.y

Log Message:
tests/libcurses: use more common abbreviations for tokens


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.26 -r1.27 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 17:26:15 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: use standard indentation for grammar rule 'arg'


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 17:23:29 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: extract grammar rule 'arg'


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 13:56:23 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: error out if called with too many arguments

This helps against users who try to add more options after the first
non-option argument and wonder why these options are silently ignored.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 13:44:22 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: document another bug in the test director


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 13:22:23 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: fix usage of director


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  7 13:06:02 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: addch

Log Message:
tests/libcurses: demonstrate more bugs in addch


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/tests/addch

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   >