Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: Source/core/scripts/xxd.pl

Issue 23583012: Move xxd.pl script to core/scripts as its used by other core components like XMLTreeViewer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #! /usr/bin/perl 1 #! /usr/bin/perl
2 2
3 # Copyright (C) 2010-2011 Google Inc. All rights reserved. 3 # Copyright (C) 2010-2011 Google Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # # Redistributions of source code must retain the above copyright 9 # # Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 25 matching lines...) Expand all
36 open($input, '<', $fname) or die "Can't open file for read: $fname $!"; 36 open($input, '<', $fname) or die "Can't open file for read: $fname $!";
37 $/ = undef; 37 $/ = undef;
38 $text = <$input>; 38 $text = <$input>;
39 close($input); 39 close($input);
40 40
41 $text = join(', ', map('0x' . unpack("H*", $_), split(undef, $text))); 41 $text = join(', ', map('0x' . unpack("H*", $_), split(undef, $text)));
42 42
43 open($output, '>', $output) or die "Can't open file for write: $output $!"; 43 open($output, '>', $output) or die "Can't open file for write: $output $!";
44 print $output "const unsigned char $varname\[\] = {\n$text\n};\n"; 44 print $output "const unsigned char $varname\[\] = {\n$text\n};\n";
45 close($output); 45 close($output);
OLDNEW
« LayoutTests/inspector/resources/blink-fs.js ('K') | « Source/core/inspector/xxd.pl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698