summaryrefslogtreecommitdiff
path: root/ext/session/mod_files.bat
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-13 11:23:52 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-13 11:23:52 +0200
commitbe2ddc6b6575da0b8e7ed235464f7e23c71674c7 (patch)
tree5874fbbbc1fa30e04b9fc823912bce0ceea92389 /ext/session/mod_files.bat
parent272c629c0a1efff2a6a7c53af8f1632d2bcef252 (diff)
downloadphp-git-be2ddc6b6575da0b8e7ed235464f7e23c71674c7.tar.gz
Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
Diffstat (limited to 'ext/session/mod_files.bat')
-rw-r--r--ext/session/mod_files.bat114
1 files changed, 57 insertions, 57 deletions
diff --git a/ext/session/mod_files.bat b/ext/session/mod_files.bat
index 4ec9a49ca2..b6a8babae8 100644
--- a/ext/session/mod_files.bat
+++ b/ext/session/mod_files.bat
@@ -1,57 +1,57 @@
-@ECHO OFF
-SETLOCAL ENABLEDELAYEDEXPANSION
-
-IF _%1_==_AUTO_ (
- GOTO MakeDirs
-)
-
-IF _%2_==__ (
- ECHO Usage %0 ^<basedir^> ^<depth^> ^[^hash_bits^]
- ECHO.
- ECHO Where ^<basedir^> is the session directory
- ECHO ^<depth^> is the number of levels defined in session.save_path
- ECHO ^[hash_bits^] is the number of bits defined in session.hash_bits_per_character
- EXIT /B 1
-)
-
-SET /A Depth=%2 + 0 2>NUL
-IF /I %ERRORLEVEL% EQU 9167 GOTO DepthError
-IF _%Depth%_==__ GOTO DepthError
-IF /I %Depth% LEQ 0 GOTO DepthError
-
-IF _%3_==__ GOTO DefaultBits
-
-SET /A Bits=%3 + 0 2>NUL
-IF /I %ERRORLEVEL% EQU 9167 GOTO BitsError
-IF _%Bits%_==__ GOTO BitsError
-IF /I %Bits% LSS 4 GOTO BitsError
-IF /I %Bits% GTR 6 GOTO BitsError
-GOTO BitsSet
-
-:DefaultBits
-SET Bits=4
-:BitsSet
-
-SET HashChars=0 1 2 3 4 5 6 7 8 9 A B C D E F
-IF /I %Bits% GEQ 5 SET HashChars=!HashChars! G H I J K L M N O P Q R S T U V
-IF /I %Bits% GEQ 6 SET HashChars=!HashChars! W X Y Z - ,
-
-FOR %%A IN (%HashChars%) DO (
- ECHO Making %%A
- CALL "%~0" AUTO "%~1\%%~A" %Depth%
-)
-GOTO :EOF
-
-:MakeDirs
-MKDIR "%~2"
-SET /A ThisDepth=%3 - 1
-IF /I %ThisDepth% GTR 0 FOR %%A IN (%HashChars%) DO CALL "%~0" AUTO "%~2\%%~A" %ThisDepth%
-GOTO :EOF
-
-:DepthError
-ECHO ERROR: Invalid depth : %2
-EXIT /B 0
-
-:BitsError
-ECHO ERROR: Invalid hash_bits : %3
-EXIT /B 0
+@ECHO OFF
+SETLOCAL ENABLEDELAYEDEXPANSION
+
+IF _%1_==_AUTO_ (
+ GOTO MakeDirs
+)
+
+IF _%2_==__ (
+ ECHO Usage %0 ^<basedir^> ^<depth^> ^[^hash_bits^]
+ ECHO.
+ ECHO Where ^<basedir^> is the session directory
+ ECHO ^<depth^> is the number of levels defined in session.save_path
+ ECHO ^[hash_bits^] is the number of bits defined in session.hash_bits_per_character
+ EXIT /B 1
+)
+
+SET /A Depth=%2 + 0 2>NUL
+IF /I %ERRORLEVEL% EQU 9167 GOTO DepthError
+IF _%Depth%_==__ GOTO DepthError
+IF /I %Depth% LEQ 0 GOTO DepthError
+
+IF _%3_==__ GOTO DefaultBits
+
+SET /A Bits=%3 + 0 2>NUL
+IF /I %ERRORLEVEL% EQU 9167 GOTO BitsError
+IF _%Bits%_==__ GOTO BitsError
+IF /I %Bits% LSS 4 GOTO BitsError
+IF /I %Bits% GTR 6 GOTO BitsError
+GOTO BitsSet
+
+:DefaultBits
+SET Bits=4
+:BitsSet
+
+SET HashChars=0 1 2 3 4 5 6 7 8 9 A B C D E F
+IF /I %Bits% GEQ 5 SET HashChars=!HashChars! G H I J K L M N O P Q R S T U V
+IF /I %Bits% GEQ 6 SET HashChars=!HashChars! W X Y Z - ,
+
+FOR %%A IN (%HashChars%) DO (
+ ECHO Making %%A
+ CALL "%~0" AUTO "%~1\%%~A" %Depth%
+)
+GOTO :EOF
+
+:MakeDirs
+MKDIR "%~2"
+SET /A ThisDepth=%3 - 1
+IF /I %ThisDepth% GTR 0 FOR %%A IN (%HashChars%) DO CALL "%~0" AUTO "%~2\%%~A" %ThisDepth%
+GOTO :EOF
+
+:DepthError
+ECHO ERROR: Invalid depth : %2
+EXIT /B 0
+
+:BitsError
+ECHO ERROR: Invalid hash_bits : %3
+EXIT /B 0