sub isASCII { ord "A" == 65 }
-sub display_bytes {
+sub display_bytes_no_quotes {
use bytes;
my $string = shift;
- return '"'
- . join("", map { sprintf("\\x%02x", ord $_) } split "", $string)
- . '"';
+ return join("", map { sprintf("\\x%02x", ord $_) } split "", $string)
+}
+
+sub display_bytes {
+ return '"' . display_bytes_no_quotes(shift) . '"';
}
sub output_warnings(@) {
- diag "The warnings were:\n" . join("", @_);
+ my @list = @_;
+ if (@list) {
+ diag "The warnings were:\n" . join "\n", map { chomp; $_ } @list;
+ }
+ else {
+ diag "No warnings were raised";
+ }
}
sub start_byte_to_cont($) {
$::is64bit = length sprintf("%x", ~0) > 8;
-$::first_continuation = (isASCII) ? 0x80 : 0xA0;
+$::lowest_continuation = (isASCII) ? 0x80 : 0xA0;
$::I8c = (isASCII) ? "\x80" : "\xa0"; # A continuation byte