From: Roland Haeder Date: Sat, 29 Mar 2014 19:47:07 +0000 (+0100) Subject: Moved for merge preparation. X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=d2d298a1fcc6217a93e7d67f0de7b976d5bfd5e7 Moved for merge preparation. Signed-off-by: Roland Haeder --- diff --git a/chash/LICENSE b/chash/LICENSE deleted file mode 100644 index 74f55a96..00000000 --- a/chash/LICENSE +++ /dev/null @@ -1,2 +0,0 @@ -These contributed codes, mostly by myself, are for testing/experimenting -purposes only and are provided "AS IS" and "WITHOUT ANY WARRANTY". \ No newline at end of file diff --git a/chash/chash.php b/chash/chash.php deleted file mode 100644 index a1e91c28..00000000 --- a/chash/chash.php +++ /dev/null @@ -1,197 +0,0 @@ - - * @copyright Copyright (c) 2013 by Core Developer Team - * @license See LICENSE (public-domain) - */ - -/** - * Calculates a simple but stronger hash from given string. No salts are being - * added here. - * - * @param $str The string to be hashed - * @return $hash The hash from string $str - */ -function hashString ($str) { - // Calculate strong hash from given string - $hash = mhash(MHASH_RIPEMD320, $str); - - // Return it hexadecimal-encoded - return bin2hex($hash); -} - -/** - * Double-hashes given string. This is done by hashing the given string and - * then hashing the generated hash again. - * - * @param $str The string to be hashed 4 times - * @return $hash The generated hash - */ -function doubleHashString ($str) { - // Generate hash from given hash - $hash = hashString(hashString($str)); - - // Return it - return $hash; -} - -/** - * Calculates a "modula-hash" based given two hashes. - * - * @param $hash1 Hash 1 - * @param $hash2 Hash 2 - */ -function modulaHash ($hash1, $hash2) { - // Both must have same length - assert(strlen($hash1) === strlen($hash2)); - - // Init new hash - $modulaHash = ''; - - // "Walk" trough first hash and get every 2 byte of both hashes - for ($idx = 0; $idx < strlen($hash1); $idx += 2) { - // Init modula value - $mod = 0; - - // Get both hash parts and convert to ASCII number - $part1 = hexdec(substr($hash1, $idx, 2)); - $part2 = hexdec(substr($hash2, $idx, 2)); - - /* - * If part1 is larget part2, part1 is divident and vise-versa. But don't do it - * if one is zero - */ - if (($part1 > $part2) && ($part2 > 0)) { - // 'part1' is larger than 'part2' - $mod = $part1 % $part2; - } elseif (($part1 < $part2) && ($part1 > 0)) { - // 'part2' is larger than 'part1' - $mod = $part2 % $part1; - } - - // "Invert" the result against 255 - $mod = 255 - $mod; - - // Encode to hex, pre-pad it with zeros and add to new hash - $modulaHash .= padHex($mod); - } // END - for - - // Modula hash must have same length as input hash - assert(strlen($modulaHash) === strlen($hash1)); - - // Return modula hash - return $modulaHash; -} - -/** - * Calculates a "sqrt-hash" based given two hashes and single-hash it - * - * @param $hash1 Hash 1 - * @param $hash2 Hash 2 - */ -function sqrtHash ($hash1, $hash2) { - // Both must have same length - assert(strlen($hash1) === strlen($hash2)); - - // Init new hash - $sqrtHash = ''; - - // "Walk" trough first hash and get every 2 byte of both hashes - for ($idx = 0; $idx < strlen($hash1); $idx += 2) { - // Init modula value - $mod = 0; - - // Get both hash parts and convert to ASCII number - $part1 = hexdec(substr($hash1, $idx, 2)); - $part2 = hexdec(substr($hash2, $idx, 2)); - - // Calculate square root of both parts being multiplied and round up, then "invert" it against 255 - $sqrt = intval(255 - ceil(sqrt($part1 * $part2))); - - // Encode to hex, pre-pad it with zeros and add to new hash - $sqrtHash .= padHex($sqrt); - } // END - for - - // "sqrt-hash" must have same length as input hash - assert(strlen($sqrtHash) === strlen($hash1)); - - // Hash reversed "sqrt-hash" again and return it - return hashString(strrev($sqrtHash)); -} - -/** - * Converts a number between 0 and 255 into a zero-padded hexadecimal string - * - * @param $num Number between 0 and 255 - * @return $hex Hexadecimal string, padded with zeros - */ -function padHex ($num) { - // Must be a integer number and between 0 and 255 - assert(is_int($num)); - assert($num >= 0); - assert($num <= 255); - - // Convert it - $hex = str_pad(dechex($num), 2, '0', STR_PAD_LEFT); - - // ... and return it - return $hex; -} - -/* - * Calculate "genesis" hashes, please note that these "genesis strings" are now - * known to the public as you can read them here in source code and therefore I - * will not use them for the real genesis hashes. - */ -$hashes = array( - // A famous quote from Deus Ex 2 - Invisible War - doublehashString('"Informations must be free." - AI Helios'), - // My name + URL of my first StatusNet instance - doubleHashString('Roland Haeder, http://status.mxchange.org'), - // A famous quote from Linus Torwalds - doubleHashString('"Software is like sex. Its better when its free." - Linus Torwalds'), - // Possible truth ;-) - doubleHashString('September 11 is a big lie.'), - - // GNU is not Uni* - doubleHashString('GNU is Not Uni*.'), - // WINE is not an emulator - doubleHashString('WINE Is Not an Emulator.'), - // FlightGear - Fly free! - doubleHashString('FlightGear - Fly free!'), - // Linus Torwalds Quote - doubleHashString('Your code is shit.. your argument is shit.'), -); - -// Calculate "modula hash" from 1st/4th and 2nd/3rd -$modulaHashes = array( - // "Block" 0 - modulaHash($hashes[0], $hashes[3]), - modulaHash($hashes[1], $hashes[2]), - - // "Block" 1 - modulaHash($hashes[4], $hashes[7]), - modulaHash($hashes[5], $hashes[6]), -); - -// Calculate "sqrt hash" -$sqrtHashes = array( - sqrtHash($modulaHashes[0], $modulaHashes[1]), - sqrtHash($modulaHashes[2], $modulaHashes[3]) -); - -// Calulcate modula hash -$modulaHash = modulaHash($sqrtHashes[0], $sqrtHashes[1]); - -// Output results -print ('hashes=' . print_r($hashes, TRUE)); -print ('modulaHashes=' . print_r($modulaHashes, TRUE)); -print ('sqrtHashes=' . print_r($sqrtHashes, TRUE)); -print ('modulaHash=' . $modulaHash . PHP_EOL); - -// [EOF] -?> diff --git a/commit-rest.sh b/commit-rest.sh deleted file mode 100755 index 423f9adb..00000000 --- a/commit-rest.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -if test "$1" = ""; then - echo "Usage: $0 \"\" [file/directory]" - exit 1 -fi - -echo "$0: Reading projects..." -if test "$2" = ""; then - LIST=`svn status */ | grep " " | grep -v "X " | cut -d " " -f 8 | cut -d "/" -f 1 | sort --unique` -else - LIST=`svn status */*/"$2" | grep "/" | grep -v "X " | cut -d " " -f 8 | cut -d "/" -f 1-2 | sort --unique` -fi - -for repos in ${LIST}; do - echo "$0: Committing in ${repos} ..." - cd "${repos}" || exit 255 - svn commit -m "$1" "$2" - cd - -done - -exit 0 diff --git a/commit-trunks.sh b/commit-trunks.sh deleted file mode 100755 index 5c44decb..00000000 --- a/commit-trunks.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -if test "$1" = ""; then - echo "Usage: $0 \"\"" - exit 1 -fi - -echo "$0: Reading projects..." -LIST=`find */trunk/application/*/*.php | cut -d "/" -f 1-2 | sort --unique` - -for repos in ${LIST}; do - echo "$0: Committing in ${repos} ..." - cd "${repos}" || exit 255 - svn commit -m "$1" - cd - -done - -exit 0 diff --git a/contrib/chash/LICENSE b/contrib/chash/LICENSE new file mode 100644 index 00000000..74f55a96 --- /dev/null +++ b/contrib/chash/LICENSE @@ -0,0 +1,2 @@ +These contributed codes, mostly by myself, are for testing/experimenting +purposes only and are provided "AS IS" and "WITHOUT ANY WARRANTY". \ No newline at end of file diff --git a/contrib/chash/chash.php b/contrib/chash/chash.php new file mode 100644 index 00000000..a1e91c28 --- /dev/null +++ b/contrib/chash/chash.php @@ -0,0 +1,197 @@ + + * @copyright Copyright (c) 2013 by Core Developer Team + * @license See LICENSE (public-domain) + */ + +/** + * Calculates a simple but stronger hash from given string. No salts are being + * added here. + * + * @param $str The string to be hashed + * @return $hash The hash from string $str + */ +function hashString ($str) { + // Calculate strong hash from given string + $hash = mhash(MHASH_RIPEMD320, $str); + + // Return it hexadecimal-encoded + return bin2hex($hash); +} + +/** + * Double-hashes given string. This is done by hashing the given string and + * then hashing the generated hash again. + * + * @param $str The string to be hashed 4 times + * @return $hash The generated hash + */ +function doubleHashString ($str) { + // Generate hash from given hash + $hash = hashString(hashString($str)); + + // Return it + return $hash; +} + +/** + * Calculates a "modula-hash" based given two hashes. + * + * @param $hash1 Hash 1 + * @param $hash2 Hash 2 + */ +function modulaHash ($hash1, $hash2) { + // Both must have same length + assert(strlen($hash1) === strlen($hash2)); + + // Init new hash + $modulaHash = ''; + + // "Walk" trough first hash and get every 2 byte of both hashes + for ($idx = 0; $idx < strlen($hash1); $idx += 2) { + // Init modula value + $mod = 0; + + // Get both hash parts and convert to ASCII number + $part1 = hexdec(substr($hash1, $idx, 2)); + $part2 = hexdec(substr($hash2, $idx, 2)); + + /* + * If part1 is larget part2, part1 is divident and vise-versa. But don't do it + * if one is zero + */ + if (($part1 > $part2) && ($part2 > 0)) { + // 'part1' is larger than 'part2' + $mod = $part1 % $part2; + } elseif (($part1 < $part2) && ($part1 > 0)) { + // 'part2' is larger than 'part1' + $mod = $part2 % $part1; + } + + // "Invert" the result against 255 + $mod = 255 - $mod; + + // Encode to hex, pre-pad it with zeros and add to new hash + $modulaHash .= padHex($mod); + } // END - for + + // Modula hash must have same length as input hash + assert(strlen($modulaHash) === strlen($hash1)); + + // Return modula hash + return $modulaHash; +} + +/** + * Calculates a "sqrt-hash" based given two hashes and single-hash it + * + * @param $hash1 Hash 1 + * @param $hash2 Hash 2 + */ +function sqrtHash ($hash1, $hash2) { + // Both must have same length + assert(strlen($hash1) === strlen($hash2)); + + // Init new hash + $sqrtHash = ''; + + // "Walk" trough first hash and get every 2 byte of both hashes + for ($idx = 0; $idx < strlen($hash1); $idx += 2) { + // Init modula value + $mod = 0; + + // Get both hash parts and convert to ASCII number + $part1 = hexdec(substr($hash1, $idx, 2)); + $part2 = hexdec(substr($hash2, $idx, 2)); + + // Calculate square root of both parts being multiplied and round up, then "invert" it against 255 + $sqrt = intval(255 - ceil(sqrt($part1 * $part2))); + + // Encode to hex, pre-pad it with zeros and add to new hash + $sqrtHash .= padHex($sqrt); + } // END - for + + // "sqrt-hash" must have same length as input hash + assert(strlen($sqrtHash) === strlen($hash1)); + + // Hash reversed "sqrt-hash" again and return it + return hashString(strrev($sqrtHash)); +} + +/** + * Converts a number between 0 and 255 into a zero-padded hexadecimal string + * + * @param $num Number between 0 and 255 + * @return $hex Hexadecimal string, padded with zeros + */ +function padHex ($num) { + // Must be a integer number and between 0 and 255 + assert(is_int($num)); + assert($num >= 0); + assert($num <= 255); + + // Convert it + $hex = str_pad(dechex($num), 2, '0', STR_PAD_LEFT); + + // ... and return it + return $hex; +} + +/* + * Calculate "genesis" hashes, please note that these "genesis strings" are now + * known to the public as you can read them here in source code and therefore I + * will not use them for the real genesis hashes. + */ +$hashes = array( + // A famous quote from Deus Ex 2 - Invisible War + doublehashString('"Informations must be free." - AI Helios'), + // My name + URL of my first StatusNet instance + doubleHashString('Roland Haeder, http://status.mxchange.org'), + // A famous quote from Linus Torwalds + doubleHashString('"Software is like sex. Its better when its free." - Linus Torwalds'), + // Possible truth ;-) + doubleHashString('September 11 is a big lie.'), + + // GNU is not Uni* + doubleHashString('GNU is Not Uni*.'), + // WINE is not an emulator + doubleHashString('WINE Is Not an Emulator.'), + // FlightGear - Fly free! + doubleHashString('FlightGear - Fly free!'), + // Linus Torwalds Quote + doubleHashString('Your code is shit.. your argument is shit.'), +); + +// Calculate "modula hash" from 1st/4th and 2nd/3rd +$modulaHashes = array( + // "Block" 0 + modulaHash($hashes[0], $hashes[3]), + modulaHash($hashes[1], $hashes[2]), + + // "Block" 1 + modulaHash($hashes[4], $hashes[7]), + modulaHash($hashes[5], $hashes[6]), +); + +// Calculate "sqrt hash" +$sqrtHashes = array( + sqrtHash($modulaHashes[0], $modulaHashes[1]), + sqrtHash($modulaHashes[2], $modulaHashes[3]) +); + +// Calulcate modula hash +$modulaHash = modulaHash($sqrtHashes[0], $sqrtHashes[1]); + +// Output results +print ('hashes=' . print_r($hashes, TRUE)); +print ('modulaHashes=' . print_r($modulaHashes, TRUE)); +print ('sqrtHashes=' . print_r($sqrtHashes, TRUE)); +print ('modulaHash=' . $modulaHash . PHP_EOL); + +// [EOF] +?> diff --git a/contrib/commit-rest.sh b/contrib/commit-rest.sh new file mode 100755 index 00000000..423f9adb --- /dev/null +++ b/contrib/commit-rest.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if test "$1" = ""; then + echo "Usage: $0 \"\" [file/directory]" + exit 1 +fi + +echo "$0: Reading projects..." +if test "$2" = ""; then + LIST=`svn status */ | grep " " | grep -v "X " | cut -d " " -f 8 | cut -d "/" -f 1 | sort --unique` +else + LIST=`svn status */*/"$2" | grep "/" | grep -v "X " | cut -d " " -f 8 | cut -d "/" -f 1-2 | sort --unique` +fi + +for repos in ${LIST}; do + echo "$0: Committing in ${repos} ..." + cd "${repos}" || exit 255 + svn commit -m "$1" "$2" + cd - +done + +exit 0 diff --git a/contrib/commit-trunks.sh b/contrib/commit-trunks.sh new file mode 100755 index 00000000..5c44decb --- /dev/null +++ b/contrib/commit-trunks.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +if test "$1" = ""; then + echo "Usage: $0 \"\"" + exit 1 +fi + +echo "$0: Reading projects..." +LIST=`find */trunk/application/*/*.php | cut -d "/" -f 1-2 | sort --unique` + +for repos in ${LIST}; do + echo "$0: Committing in ${repos} ..." + cd "${repos}" || exit 255 + svn commit -m "$1" + cd - +done + +exit 0 diff --git a/contrib/lfdb2/LICENSE b/contrib/lfdb2/LICENSE new file mode 100644 index 00000000..74f55a96 --- /dev/null +++ b/contrib/lfdb2/LICENSE @@ -0,0 +1,2 @@ +These contributed codes, mostly by myself, are for testing/experimenting +purposes only and are provided "AS IS" and "WITHOUT ANY WARRANTY". \ No newline at end of file diff --git a/contrib/lfdb2/read.php b/contrib/lfdb2/read.php new file mode 100644 index 00000000..8779b654 --- /dev/null +++ b/contrib/lfdb2/read.php @@ -0,0 +1,70 @@ + 0) { + $a = explode('.', $chr); + $chr = $a[0]; + //print __LINE__.':i=' . $i . ',chr=' . $chr . ',unpacked=' . $unpacked . PHP_EOL; + $unpacked -= ($chr * $factor); + //print __LINE__.':i=' . $i . ',chr=' . $chr . ',unpacked=' . $unpacked . PHP_EOL; + } else { + $chr = $unpacked; + $unpacked = 0; + } + + //print 'chr=' . $chr . PHP_EOL; + $decoded .= chr($chr); + } // END - for +} // END - for + +$decoded = gzuncompress($decoded); + +print 'Writing ' . strlen($decoded) . ' bytes to output ...' . PHP_EOL; +file_put_contents('test.data.out' . ($__factor * 2), $decoded); + +// [EOF] +?> diff --git a/contrib/lfdb2/test.data b/contrib/lfdb2/test.data new file mode 100644 index 00000000..63376f30 Binary files /dev/null and b/contrib/lfdb2/test.data differ diff --git a/contrib/lfdb2/write.php b/contrib/lfdb2/write.php new file mode 100644 index 00000000..25cdbbdb --- /dev/null +++ b/contrib/lfdb2/write.php @@ -0,0 +1,69 @@ +>$__factor; + $r = $big & $__right; + + $unpacked = str_pad(pack($__format, $l, $r), 8, '0', STR_PAD_LEFT); + //print 'big=' . $big . ',unpacked('.strlen($unpacked) . ')='.md5($unpacked).PHP_EOL; + + $encoded .= $unpacked; +} // END - for + +print 'Hash(' . strlen($encoded) . ')=' . md5($encoded) . PHP_EOL; +print 'Encoded ' . strlen($str) . ' bytes into ' . strlen($encoded) . ' bytes ...' . PHP_EOL; + +file_put_contents('test.data.bin' . ($__factor * 2), $encoded); + +print 'File size is: ' . filesize('test.data.bin' . ($__factor * 2)) . ' bytes.' . PHP_EOL; + +// [EOF] +?> diff --git a/contrib/lint.sh b/contrib/lint.sh new file mode 100755 index 00000000..00c4a2c5 --- /dev/null +++ b/contrib/lint.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +echo "$0: Analysing PHP scripts for syntax errors (lint) ..." +LINT=`find -type f -name "*.php" -exec php -l -f {} 2>&1 \; | grep -v "No syntax errors detected in"` + +if test "${LINT}" != ""; then + echo "${LINT}" +else + echo "$0: No syntax errors found." +fi diff --git a/contrib/mindmaps/Local File Database - NG.mm b/contrib/mindmaps/Local File Database - NG.mm new file mode 100644 index 00000000..55d1a8a9 --- /dev/null +++ b/contrib/mindmaps/Local File Database - NG.mm @@ -0,0 +1,1080 @@ + + + + + + + + +

+ Local File Database - NG +

+

+ Revision: 1 +

+

+ Short name: LFDB2 +

+

+ Work in progress! +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/contrib/patch.sh b/contrib/patch.sh new file mode 100755 index 00000000..5dbfe7db --- /dev/null +++ b/contrib/patch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +if test "$1" = ""; then + echo "Usage: $0 " + exit +fi + +LIST=`find ??*/trunk/ -maxdepth 0 -type d | sort --unique` + +for entry in ${LIST}; do + echo "$0: Patching in ${entry} ..." + cd "${entry}" + patch -p0 < "../../$1" + cd - +done diff --git a/contrib/patch_core.sh b/contrib/patch_core.sh new file mode 100755 index 00000000..6d93d1fc --- /dev/null +++ b/contrib/patch_core.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +svn diff inc/ > ../../core/trunk/i || exit 1 +cd ../../core/trunk/ || exit 1 +svn up || exit 1 +sh ../contrib/patch_i.sh "$1" || exit 1 +cd - +svn up inc/ diff --git a/contrib/patch_i.sh b/contrib/patch_i.sh new file mode 100755 index 00000000..6690ae0d --- /dev/null +++ b/contrib/patch_i.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +patch -p0 < i || exit 10 +if test "$1" = ""; then + svn commit || exit 10 +else + svn commit -m "$1" || exit 10 +fi +rm i diff --git a/contrib/prop-set.sh b/contrib/prop-set.sh new file mode 100755 index 00000000..1df2b4ca --- /dev/null +++ b/contrib/prop-set.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +find -type f -name "*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; +find -type f -name "*-" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; +find -type f -name "*_" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; +find -type f -name "_*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; +find -type f -name "*.php" -exec svn propset svn:mime-type "text/plain" {} \; +find -type f -name "*-" -exec svn propset svn:mime-type "text/plain" {} \; +find -type f -name "*_" -exec svn propset svn:mime-type "text/plain" {} \; +find -type f -name "_*.php" -exec svn propset svn:mime-type "text/plain" {} \; +find -type f -name "*.jpg" -exec svn propset svn:mime-type "image/jpeg" {} \; +find -type f -name "*.png" -exec svn propset svn:mime-type "image/png" {} \; +find -type f -name "*.gif" -exec svn propset svn:mime-type "image/gif" {} \; +find -type f -name "*.txt" -exec svn propset svn:mime-type "text/plain" {} \; +find -type f -name "*.tpl" -exec svn propset svn:mime-type "text/plain" {} \; diff --git a/contrib/remove-deprecated.sh b/contrib/remove-deprecated.sh new file mode 100755 index 00000000..cd8d9f05 --- /dev/null +++ b/contrib/remove-deprecated.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +if ! test -e "svn-externals.txt"; then + echo "$0: Please execute this script from root directory." + exit 1 +fi + +echo "$0: Searching for deprecated PHP scripts ..." +LIST1=`find -type f -name "*.php" -size 24c -exec grep -H "@DEPRECATED" {} \;` + +LIST="${LIST1} ${LIST2}" + +if test "${LIST}" != " "; then + echo "${LIST}" | cut -d ":" -f 1 | xargs svn --force del + sh ./todo-builder.sh +fi diff --git a/contrib/todo-all.sh b/contrib/todo-all.sh new file mode 100755 index 00000000..f3a806af --- /dev/null +++ b/contrib/todo-all.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "$0: Reading projects..." +LIST=`find -maxdepth 1 -type d -name "??*" | sort --unique` +SVN_DIRS="branches tags trunk" + +for repos in $LIST; do + for svn_dir in $SVN_DIRS; do + if test -e "$repos/$svn_dir/todo-builder.sh"; then + echo "$0: Updating TODOs.txt in $repos/$svn_dir" + cd "$repos/$svn_dir/" + sh ./todo-builder.sh + svn add docs/TODOs.txt >/dev/null 2>&1 + cd - >/dev/null + fi + done +done diff --git a/lfdb2/LICENSE b/lfdb2/LICENSE deleted file mode 100644 index 74f55a96..00000000 --- a/lfdb2/LICENSE +++ /dev/null @@ -1,2 +0,0 @@ -These contributed codes, mostly by myself, are for testing/experimenting -purposes only and are provided "AS IS" and "WITHOUT ANY WARRANTY". \ No newline at end of file diff --git a/lfdb2/read.php b/lfdb2/read.php deleted file mode 100644 index 8779b654..00000000 --- a/lfdb2/read.php +++ /dev/null @@ -1,70 +0,0 @@ - 0) { - $a = explode('.', $chr); - $chr = $a[0]; - //print __LINE__.':i=' . $i . ',chr=' . $chr . ',unpacked=' . $unpacked . PHP_EOL; - $unpacked -= ($chr * $factor); - //print __LINE__.':i=' . $i . ',chr=' . $chr . ',unpacked=' . $unpacked . PHP_EOL; - } else { - $chr = $unpacked; - $unpacked = 0; - } - - //print 'chr=' . $chr . PHP_EOL; - $decoded .= chr($chr); - } // END - for -} // END - for - -$decoded = gzuncompress($decoded); - -print 'Writing ' . strlen($decoded) . ' bytes to output ...' . PHP_EOL; -file_put_contents('test.data.out' . ($__factor * 2), $decoded); - -// [EOF] -?> diff --git a/lfdb2/test.data b/lfdb2/test.data deleted file mode 100644 index 63376f30..00000000 Binary files a/lfdb2/test.data and /dev/null differ diff --git a/lfdb2/write.php b/lfdb2/write.php deleted file mode 100644 index 25cdbbdb..00000000 --- a/lfdb2/write.php +++ /dev/null @@ -1,69 +0,0 @@ ->$__factor; - $r = $big & $__right; - - $unpacked = str_pad(pack($__format, $l, $r), 8, '0', STR_PAD_LEFT); - //print 'big=' . $big . ',unpacked('.strlen($unpacked) . ')='.md5($unpacked).PHP_EOL; - - $encoded .= $unpacked; -} // END - for - -print 'Hash(' . strlen($encoded) . ')=' . md5($encoded) . PHP_EOL; -print 'Encoded ' . strlen($str) . ' bytes into ' . strlen($encoded) . ' bytes ...' . PHP_EOL; - -file_put_contents('test.data.bin' . ($__factor * 2), $encoded); - -print 'File size is: ' . filesize('test.data.bin' . ($__factor * 2)) . ' bytes.' . PHP_EOL; - -// [EOF] -?> diff --git a/lint.sh b/lint.sh deleted file mode 100755 index 00c4a2c5..00000000 --- a/lint.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -echo "$0: Analysing PHP scripts for syntax errors (lint) ..." -LINT=`find -type f -name "*.php" -exec php -l -f {} 2>&1 \; | grep -v "No syntax errors detected in"` - -if test "${LINT}" != ""; then - echo "${LINT}" -else - echo "$0: No syntax errors found." -fi diff --git a/mindmaps/Local File Database - NG.mm b/mindmaps/Local File Database - NG.mm deleted file mode 100644 index 55d1a8a9..00000000 --- a/mindmaps/Local File Database - NG.mm +++ /dev/null @@ -1,1080 +0,0 @@ - - - - - - - - -

- Local File Database - NG -

-

- Revision: 1 -

-

- Short name: LFDB2 -

-

- Work in progress! -

- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/patch.sh b/patch.sh deleted file mode 100755 index 5dbfe7db..00000000 --- a/patch.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -if test "$1" = ""; then - echo "Usage: $0 " - exit -fi - -LIST=`find ??*/trunk/ -maxdepth 0 -type d | sort --unique` - -for entry in ${LIST}; do - echo "$0: Patching in ${entry} ..." - cd "${entry}" - patch -p0 < "../../$1" - cd - -done diff --git a/patch_core.sh b/patch_core.sh deleted file mode 100755 index 6d93d1fc..00000000 --- a/patch_core.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -svn diff inc/ > ../../core/trunk/i || exit 1 -cd ../../core/trunk/ || exit 1 -svn up || exit 1 -sh ../contrib/patch_i.sh "$1" || exit 1 -cd - -svn up inc/ diff --git a/patch_i.sh b/patch_i.sh deleted file mode 100755 index 6690ae0d..00000000 --- a/patch_i.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -patch -p0 < i || exit 10 -if test "$1" = ""; then - svn commit || exit 10 -else - svn commit -m "$1" || exit 10 -fi -rm i diff --git a/prop-set.sh b/prop-set.sh deleted file mode 100755 index 1df2b4ca..00000000 --- a/prop-set.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -find -type f -name "*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*-" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*_" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "_*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*.php" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*-" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*_" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "_*.php" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*.jpg" -exec svn propset svn:mime-type "image/jpeg" {} \; -find -type f -name "*.png" -exec svn propset svn:mime-type "image/png" {} \; -find -type f -name "*.gif" -exec svn propset svn:mime-type "image/gif" {} \; -find -type f -name "*.txt" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*.tpl" -exec svn propset svn:mime-type "text/plain" {} \; diff --git a/remove-deprecated.sh b/remove-deprecated.sh deleted file mode 100755 index cd8d9f05..00000000 --- a/remove-deprecated.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if ! test -e "svn-externals.txt"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -echo "$0: Searching for deprecated PHP scripts ..." -LIST1=`find -type f -name "*.php" -size 24c -exec grep -H "@DEPRECATED" {} \;` - -LIST="${LIST1} ${LIST2}" - -if test "${LIST}" != " "; then - echo "${LIST}" | cut -d ":" -f 1 | xargs svn --force del - sh ./todo-builder.sh -fi diff --git a/todo-all.sh b/todo-all.sh deleted file mode 100755 index f3a806af..00000000 --- a/todo-all.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -echo "$0: Reading projects..." -LIST=`find -maxdepth 1 -type d -name "??*" | sort --unique` -SVN_DIRS="branches tags trunk" - -for repos in $LIST; do - for svn_dir in $SVN_DIRS; do - if test -e "$repos/$svn_dir/todo-builder.sh"; then - echo "$0: Updating TODOs.txt in $repos/$svn_dir" - cd "$repos/$svn_dir/" - sh ./todo-builder.sh - svn add docs/TODOs.txt >/dev/null 2>&1 - cd - >/dev/null - fi - done -done