Index: trunk/extensions/AbuseFilter/parser_native/maketest.cpp |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | * Usage: maketest <filter> [VAR=value] [VAR=value...] |
16 | 16 | */ |
17 | 17 | |
| 18 | +#include <cstring> |
18 | 19 | #include <iostream> |
19 | 20 | |
20 | 21 | #include <boost/format.hpp> |
— | — | @@ -28,14 +29,14 @@ |
29 | 30 | return 1; |
30 | 31 | } |
31 | 32 | |
32 | | - std::cout.write(argv[1], strlen(argv[1])); |
| 33 | + std::cout.write(argv[1], std::strlen(argv[1])); |
33 | 34 | std::cout.write(&zero, 1); |
34 | 35 | |
35 | 36 | argc -= 2; |
36 | 37 | argv += 2; |
37 | 38 | |
38 | 39 | while (argc) { |
39 | | - char *s = strchr(*argv, '='); |
| 40 | + char *s = std::strchr(*argv, '='); |
40 | 41 | if (s == NULL) { |
41 | 42 | std::cerr << "error: variable with no value: " << *argv << '\n'; |
42 | 43 | return 1; |
— | — | @@ -44,7 +45,7 @@ |
45 | 46 | std::cout.write(*argv, s - *argv); |
46 | 47 | std::cout.write(&zero, 1); |
47 | 48 | *s++ = '\0'; |
48 | | - std::cout.write(s, strlen(s)); |
| 49 | + std::cout.write(s, std::strlen(s)); |
49 | 50 | std::cout.write(&zero, 1); |
50 | 51 | |
51 | 52 | argc--; |
Index: trunk/extensions/AbuseFilter/parser_native/runtests.sh |
— | — | @@ -5,9 +5,9 @@ |
6 | 6 | ntotal=0 |
7 | 7 | |
8 | 8 | for test in *.t; do |
9 | | - echo "$test \c" |
| 9 | + printf "%-20s " "$test" |
10 | 10 | filter=$(head -1 $test) |
11 | | - vars=$(tail +2 $test) |
| 11 | + vars=$(tail -n +2 $test) |
12 | 12 | expect=$(cat ${test%.t}.r) |
13 | 13 | result=$(../maketest "$filter" $vars | (cd ..; ./af_parser)) |
14 | 14 | if [ "$expect" = "$result" ]; then |