HEX
Server: Apache
System: FreeBSD www860.sakura.ne.jp 13.0-RELEASE-p14 FreeBSD 13.0-RELEASE-p14 #2: Mon Dec 9 13:54:55 JST 2024 root@www5301.sakura.ne.jp:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
User: yoyo0427 (1306)
PHP: 8.3.8
Disabled: NONE
Upload Files
File: //usr/local/bin/sysconftoolcheck
#! /usr/local/bin/perl
# Copyright 2000 Double Precision, Inc.  See COPYING for
# distribution information.

my $linenum=0;

my $foundver=0;

my $filename=shift @ARGV;

open (F, $filename) || die "$filename: $!\n";

while (<F>)
{
    ++$linenum;
    if (/^\#\#VERSION:/)
    {
	$foundver=1;
	last;
    }

    last if $linenum > 20;
}

die "Did not find a ##VERSION header.\n" unless $foundver;

while (<F>)
{
    ++$linenum;
    next unless /^\#/;

    my $foundtag=0;

    $foundtag=1 if /^\#\#NAME:/;

    while (<F>)
    {
	++$linenum;

	if ( /^\#\#NAME:/ )
	{
	    die "Line $linenum: second ##NAME tags, without a setting.\n"
		if $foundtag;
	    $foundtag=1;
	}

	last unless /^#/;
    }

    print "Warning - line $linenum - did not see a ##NAME.\n"
	unless $foundtag;
}