Home
last modified time | relevance | path

Searched refs:unpack (Results 1 – 25 of 100) sorted by relevance

1234

/mirbsd/src/gnu/usr.bin/perl/t/op/
Dpack.t100 my @ary2 = unpack($format,$foo);
117 is( ($x = unpack("%32B*", "\001\002\004\010\020\040\100\200\377")), 16 );
119 is( ($x = unpack("%32b69", "\001\002\004\010\020\040\100\200\017")), 12 );
121 is( ($x = unpack("%32B69", "\001\002\004\010\020\040\100\200\017")), 9 );
129 is( ($x = unpack("%32B*", "Now is the time for all good blurfl")), $sum );
136 $sum = unpack("%32b*", $foo);
137 my $longway = unpack("b*", $foo);
143 is( ($x = unpack("I",pack("I", 0xFFFFFFFF))), 0xFFFFFFFF );
156 my @y = unpack('w*', $y);
163 @y = unpack('w2', $x);
[all …]
Dvec.t17 is(unpack('C',$foo), 1);
27 is((unpack('C',substr($foo,1,1)) & 255), 0xf1);
Dchr.t26 sub hexes { join(" ",map{sprintf"%02x",$_}unpack("C*",chr($_[0]))) }
Dlfs.t183 if (unpack("L", pack("L", $offset_want)) == $offset_is) {
186 } elsif ($offset_want - unpack("L", pack("L", $offset_want)) - 1
189 printf "# %s - unpack('L', pack('L', %s)) - 1 equals %s.\n",
/mirbsd/src/gnu/usr.bin/perl/t/lib/warnings/
Dpp_pack3 Invalid type in unpack: '%c
5 my @A = unpack ("A,A", "22") ;
13 use warnings 'unpack' ;
14 my @a = unpack ("A,A", "22") ;
17 no warnings 'unpack' ;
18 my @b = unpack ("A,A", "22") ;
21 Invalid type ',' in unpack at - line 4.
58 print unpack("C", pack("C", -1)), "\n",
59 unpack("C", pack("C", 0)), "\n",
60 unpack("C", pack("C", 255)), "\n",
[all …]
/mirbsd/src/gnu/usr.bin/perl/pod/
Dperlpacktut.pod3 perlpacktut - tutorial on C<pack> and C<unpack>
7 C<pack> and C<unpack> are two functions for transforming data according
24 representational conversion provided by C<pack> and C<unpack> is an
27 the so-called "template" argument. C<unpack> is the reverse process,
44 sequence and a string of hexadecimal digits. Let's use C<unpack>, since
51 my( $hex ) = unpack( 'H*', $mem );
66 we note that C<unpack> with the template code C<H> converts the contents
123 if you use the right tools. C<pack> and C<unpack> are designed to help
125 look at a solution with C<unpack>:
128 my($date, $desc, $income, $expend) = unpack("A10xA27xA7A*", $_);
[all …]
Dperluniintro.pod455 } unpack("U*", $_[0])); # unpack Unicode characters
495 is to use C<unpack("C*", ...> to get the bytes or C<unpack("H*", ...)>
499 print join(" ", unpack("H*", pack("U", 0x100))), "\n";
681 @chars = unpack("U0U*", $string_of_bytes_that_I_think_is_utf8);
683 If invalid, a C<Malformed UTF-8 character (byte 0x##) in unpack>
685 Unicode". Without that the C<unpack("U*", ...)> would accept also
726 pack/unpack to convert to/from Unicode.
728 $native_string = pack("C*", unpack("U*", $Unicode_string));
729 $Unicode_string = pack("U*", unpack("C*", $native_string));
740 use C<unpack("C*", $string)> for the former, and you can create
Dperl573delta.pod140 fix unpack U to be the reverse of pack U
148 unpack("Z*Z*", pack("Z*Z*", ..)) was broken
/mirbsd/src/gnu/usr.bin/perl/ext/IPC/SysV/t/
Dipcsysv.t127 ($rmsgtype,$rmsgtext) = unpack("L! a*",$msgbuf);
179 my @data = unpack("s!*",$data);
196 @data = unpack("s!*",$data);
/mirbsd/src/gnu/usr.bin/perl/t/uni/
Dsprintf.t118 is((sprintf "%x %d", unpack("U*", $a), length($a)), "1234 1",
121 is((sprintf "%x %d", unpack("U*", $a), length($a)), "5678 1",
124 is((sprintf "%x %x %d", unpack("U*", $a), length($a)), "1234 5678 2",
/mirbsd/src/gnu/usr.bin/perl/lib/Pod/t/
Deol.t79 my $cksum1 = unpack("%32C*", <IN>);
82 my $cksum2 = unpack("%32C*", <IN>);
85 my $cksum3 = unpack("%32C*", <IN>);
/mirbsd/src/gnu/usr.bin/perl/lib/Net/t/
Ddatasend.t44 unpack("H*",$cmd->output),
45 unpack("H*",$expect)
Dconfig.t37 my $num = unpack('N', pack('C*', split(/\./, $_[0])));
/mirbsd/src/gnu/usr.bin/perl/ext/Storable/t/
Dutf8hash.t60 my $b = pack("C*", unpack("C*", $u));
65 is (pack("C*", unpack("C*", $u)), pack("C*", unpack("C*", $b)),
Dcompat06.t94 $data .= unpack("u", $_);
102 $data .= unpack("u", $_);
Doverload.t91 my $f = unpack 'u', q{7!084$0Q(05-?3U9%4DQ/040*!'-N;W<`};
/mirbsd/src/gnu/usr.bin/perl/ext/Encode/t/
Dencoding.t54 # we didn't break pack/unpack, I hope
56 print "not " unless unpack("C", pack("C", 0xdf)) == 0xdf;
60 print "not " unless unpack("C", chr(0xdf)) == 0xce;
63 print "not " unless unpack("U", pack("U", 0xdf)) == 0xdf;
66 print "not " unless unpack("U", chr(0xdf)) == 0x3af;
/mirbsd/src/gnu/usr.bin/perl/ext/PerlIO/t/
Dencoding.t111 join(" ", unpack("H*", $buf1)),
112 join(" ", unpack("H*", $buf2)), $offset;
/mirbsd/src/lib/libssl/src/crypto/bf/
DINSTALL7 To build, just unpack and type make.
/mirbsd/src/gnu/usr.bin/perl/t/run/
DswitchC.t23 my $b = pack("C*", unpack("U0C*", pack("U",256)));
/mirbsd/src/gnu/usr.bin/perl/ext/Fcntl/t/
Dsyslfs.t180 if (unpack("L", pack("L", $offset_want)) == $offset_is) {
183 } elsif ($offset_want - unpack("L", pack("L", $offset_want)) - 1
186 printf "# %s - unpack('L', pack('L', %s)) - 1 equals %s.\n",
/mirbsd/src/gnu/usr.bin/perl/t/io/
Dcrlf.t70 print join(" ", "#", map { sprintf("%02x", $_) } unpack("C*", $foo)),
/mirbsd/src/gnu/usr.bin/perl/ext/Unicode/Normalize/t/
Dshort.t38 our $a = pack 'U0C', unpack 'C', "\x{3042}";
/mirbsd/src/gnu/usr.bin/perl/os2/OS2/REXX/t/
Drx_tieydb.t31 print "# Process status is ", unpack("I", $pib[6]),
/mirbsd/src/gnu/usr.bin/perl/ext/IPC/SysV/
DSysV.xs80 unpack(obj,buf) in unpack() function
128 unpack(obj,ds) in unpack() function

1234