summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/convert-modules.php3
-rw-r--r--tools/global-candidates.php1
-rw-r--r--tools/jedec.php4
3 files changed, 4 insertions, 4 deletions
diff --git a/tools/convert-modules.php b/tools/convert-modules.php
index f8c7a1a5..1b92490d 100644
--- a/tools/convert-modules.php
+++ b/tools/convert-modules.php
@@ -78,7 +78,7 @@ foreach (
$exFile = "modules/$module/lang/$lang/template-tags.json";
$existing = @json_decode(@file_get_contents($exFile), true);
if (!is_array($existing)) $existing = array();
- $existing = $existing + $old;
+ $existing += $old;
ksort($existing);
if (file_put_contents($exFile, json_encode($existing, JSON_PRETTY_PRINT)) > 0) {
unlink($path);
@@ -181,7 +181,6 @@ echo "Processing\n";
foreach ($messages as $id => $modules) {
asort($modules, SORT_NUMERIC);
$modules = array_reverse($modules, true);
- reset($modules);
$topModule = key($modules);
$topCount = $modules[$topModule];
$sum = 0;
diff --git a/tools/global-candidates.php b/tools/global-candidates.php
index 12e900a5..c42a43aa 100644
--- a/tools/global-candidates.php
+++ b/tools/global-candidates.php
@@ -58,6 +58,7 @@ foreach ($tags as $k => &$tag) {
}
}
}
+unset($tag);
echo "\n\nDUPLICATE STRINGS WITH DIFFERENT NAMES:\n";
foreach ($strings as $text => $data) {
diff --git a/tools/jedec.php b/tools/jedec.php
index a4df9667..1883abb9 100644
--- a/tools/jedec.php
+++ b/tools/jedec.php
@@ -13,11 +13,11 @@
$last = 0;
$index = 1;
$line = file_get_contents('jedec');
-preg_match_all("/^\s*([1-9][0-9]?|1[01][0-9]|12[0-6])\s+([^\r\n]{2,9}(?:[a-z][^\r\n]{0,10}){1,3}[\r\n]?[^\r\n0]{0,31})(?:\s*[\r\n]\s|\s+)((?:[10]\s+){8})([0-9a-f]{2})\s*\$/sim", $line, $oout, PREG_SET_ORDER);
+preg_match_all("/^\s*([1-9][0-9]?|1[01][0-9]|12[0-6])\s+([^\r\n]{2,9}(?:[a-z][^\r\n]{0,10}){1,3}[\r\n]?[^\r\n0]{0,31})(?:\s*[\r\n]\s|\s+)((?:[10]\s+){8})([0-9a-f]{2})\s*\$/im", $line, $oout, PREG_SET_ORDER);
$output = [];
foreach ($oout as $out) {
$id = (int)$out[1];
- $name = preg_replace("/[\s\r\n]+/ms", ' ', $out[2]);
+ $name = preg_replace("/[\s\r\n]+/m", ' ', $out[2]);
$bin = $out[3];
$hex = $out[4];
if ($id < $last) {