Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 7e0614e7ef9a56778607315e7b84aa00 > files > 64

php-7.4.12-1.mga7.src.rpm

/* This is a generated file, do not modify */
/* Usage: php create_data_file.php /path/to/magic.mgc > data_file.c */
<?php
	$dta = file_get_contents( $argv[1] );
	$dta_l = strlen($dta);
	$j = 0;

	echo "const unsigned char php_magic_database[$dta_l] = {\n";
	for ($i = 0; $i < $dta_l; $i++) {
		printf("0x%02X, ", ord($dta[$i]));
		if ($j % 16 == 15) {
			echo "\n";
		}
		$j++;
	}
	echo "};\n";
?>