config root man

Current Path : /compat/linux/proc/68247/cwd/usr/local/bin/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/68247/cwd/usr/local/bin/rfnmz

#! /usr/local/bin/perl -w
#
# -*- Perl -*-
#
# rfnmz - Reindex NMZ.field.* files.
#
# Copyright (C) 2000 Namazu Project All rights reserved.
#     This is free software with ABSOLUTELY NO WARRANTY.
#

use strict;
use FileHandle;
die "usage: rfnmz <index>\n" if @ARGV == 0;

my $target = $ARGV[0];
die "invalid target: $target\n" unless -d $target;

chdir $target;
my @fields = grep {! /\.i$/} glob 'NMZ.field.*';

for my $field (@fields) {
    my $fh_in = new FileHandle;
    $fh_in->open($field) || die "$field: $!";
    binmode($fh_in);

    my $fh_out = new FileHandle;
    $fh_out->open(">$field.i") || die "$field: $!";
    binmode($fh_out);

    my $ptr = 0;
    while (<$fh_in>) {
	print $fh_out pack 'N', $ptr;
	$ptr += length;
    }
}


Man Man