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

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

Issue 26414004: Move core/scripts to build/scripts so that platform can use them. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
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

Powered by Google App Engine
This is Rietveld 408576698