Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


*** empty log message ***
[palacios-OLD.git] / palacios / scripts / pw
1 #! /usr/bin/perl
2
3 # Inspect a 32 word at a specified offset in a file.
4 # $Revision: 1.1 $
5
6 use strict qw(refs vars);
7 use FileHandle;
8
9 my $filename = shift @ARGV;
10 my $offset = shift @ARGV;
11
12 ((defined $filename) && (defined $offset))
13     || die "Usage: pw <filename> <offset>\n";
14
15 my $fh = new FileHandle("<$filename");
16 printf( "%08x\n", ReadWord($fh, $offset) );
17
18 sub ReadWord {
19     my ($fh, $offset) = @_;
20     seek $fh, $offset, SEEK_SET;
21     my $buf = 'X' x 4;
22     read $fh, $buf, 4;
23     return unpack('V',$buf);
24 }