raw2c.pl
来自「大名鼎鼎的CE下播放软件,TCPPMP的源代码!!!2410下可以流畅的解QVG」· PL 代码 · 共 17 行
PL
17 行
#!/usr/bin/perl -w# Turns binary files into C source code (static const unsigned char arrays).use strict;for (@ARGV) { open INPUT, $_ and binmode INPUT or die "$_: $!\n"; s!.*[/\\]!!; y/0-9A-Za-z/_/c; print "static const unsigned char ${_}[] = {\n\t"; my $buf; print join ', ', map sprintf('0x%02X', $_), unpack 'C*', $buf if read INPUT, $buf, 16; print ",\n\t", join ', ', map sprintf('0x%02X', $_), unpack 'C*', $buf while read INPUT, $buf, 16; close INPUT; print "\n};\n"}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?