mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Merge pull request #61 from davidfoerster/normalize-line-terminators
Normalize line terminators
This commit is contained in:
50
.gitattributes
vendored
Normal file
50
.gitattributes
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Explicitly declare text files that could be normalized and converted
|
||||||
|
# to native line endings on checkout. However, as per the policy they're
|
||||||
|
# supposed to have LF endings on all platforms.
|
||||||
|
*.[ch] text diff=cpp eol=lf
|
||||||
|
*.[ch]pp text diff=cpp eol=lf
|
||||||
|
*.asm text eol=lf
|
||||||
|
Makefile text eol=lf
|
||||||
|
*.make text eol=lf
|
||||||
|
*.mk text eol=lf
|
||||||
|
*.inc text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
|
*.xml text eol=lf
|
||||||
|
*.xpm text -diff -merge eol=lf
|
||||||
|
*.pem text -diff -merge eol=lf
|
||||||
|
*.cer text -diff -merge eol=lf
|
||||||
|
*.manifest text eol=lf
|
||||||
|
*.sh text eol=lf
|
||||||
|
*.txt text eol=lf
|
||||||
|
*.html text diff=html eol=lf
|
||||||
|
*.idl text eol=lf
|
||||||
|
*.fbp text eol=lf
|
||||||
|
*.rgs text eol=lf
|
||||||
|
*.pkgproj text eol=lf
|
||||||
|
Sources text eol=lf
|
||||||
|
|
||||||
|
# Declare files that will always have LF line endings on checkout.
|
||||||
|
*.desktop text eol=lf
|
||||||
|
|
||||||
|
# Declare files that will always have CRLF line endings on checkout.
|
||||||
|
*.sln text eol=crlf
|
||||||
|
*.vcproj text eol=crlf
|
||||||
|
*.rc text eol=crlf
|
||||||
|
*.bat text eol=crlf
|
||||||
|
*.cmd text eol=crlf
|
||||||
|
|
||||||
|
# Denote all files that are truly binary and should not be modified.
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
*.pdf binary
|
||||||
|
*.bmp binary
|
||||||
|
*.ico binary
|
||||||
|
*.od[fgpst] binary
|
||||||
|
*.hc binary
|
||||||
|
*.icns binary
|
||||||
|
*.rtf binary
|
||||||
|
*.bz2 binary
|
||||||
|
*.pfx binary
|
||||||
@@ -8965,7 +8965,7 @@ char *LoadFileBlock (const wchar_t *fileName, __int64 fileOffset, DWORD count)
|
|||||||
// Returns -1 if there is an error, or the size of the file.
|
// Returns -1 if there is an error, or the size of the file.
|
||||||
__int64 GetFileSize64 (const wchar_t *path)
|
__int64 GetFileSize64 (const wchar_t *path)
|
||||||
{
|
{
|
||||||
HANDLE h = CreateFile (path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
|
HANDLE h = CreateFile (path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
LARGE_INTEGER size;
|
LARGE_INTEGER size;
|
||||||
__int64 retSize = -1;
|
__int64 retSize = -1;
|
||||||
|
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data,
|
|||||||
workItem->Encryption.UnitCount = unitsPerFragment;
|
workItem->Encryption.UnitCount = unitsPerFragment;
|
||||||
workItem->Encryption.StartUnitNo.Value = fragmentStartUnitNo;
|
workItem->Encryption.StartUnitNo.Value = fragmentStartUnitNo;
|
||||||
|
|
||||||
fragmentData += unitsPerFragment * ENCRYPTION_DATA_UNIT_SIZE;
|
fragmentData += unitsPerFragment * ENCRYPTION_DATA_UNIT_SIZE;
|
||||||
fragmentStartUnitNo += unitsPerFragment;
|
fragmentStartUnitNo += unitsPerFragment;
|
||||||
|
|
||||||
if (remainder > 0 && --remainder == 0)
|
if (remainder > 0 && --remainder == 0)
|
||||||
|
|||||||
@@ -590,7 +590,7 @@ BOOL CALLBACK KeyFilesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
|
|||||||
}
|
}
|
||||||
|
|
||||||
LoadKeyList (hwndDlg, param->FirstKeyFile);
|
LoadKeyList (hwndDlg, param->FirstKeyFile);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lw == IDC_KEYREMOVEALL)
|
if (lw == IDC_KEYREMOVEALL)
|
||||||
|
|||||||
@@ -946,7 +946,7 @@ dec_round:
|
|||||||
restore ebp,1
|
restore ebp,1
|
||||||
xor eax,[ebp]
|
xor eax,[ebp]
|
||||||
xor ebx,[ebp+4]
|
xor ebx,[ebp+4]
|
||||||
add sp, 2
|
add sp, 2
|
||||||
ret
|
ret
|
||||||
|
|
||||||
%else
|
%else
|
||||||
|
|||||||
@@ -3200,7 +3200,7 @@ __int64 PrintFreeSpace (HWND hwndTextBox, wchar_t *lpszDrive, PLARGE_INTEGER lDi
|
|||||||
else
|
else
|
||||||
nResourceString = "DISK_FREE_GB";
|
nResourceString = "DISK_FREE_GB";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
|
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
|
||||||
nResourceString = "MAX_HIDVOL_SIZE_TB";
|
nResourceString = "MAX_HIDVOL_SIZE_TB";
|
||||||
@@ -9476,7 +9476,7 @@ int ScanVolClusterBitmap (HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int
|
|||||||
goto vcmf_error;
|
goto vcmf_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
bufLen = (DWORD) (nbrClusters / 8 + 2 * sizeof(LARGE_INTEGER));
|
bufLen = (DWORD) (nbrClusters / 8 + 2 * sizeof(LARGE_INTEGER));
|
||||||
bufLen += 100000 + bufLen/10; // Add reserve
|
bufLen += 100000 + bufLen/10; // Add reserve
|
||||||
|
|
||||||
lpOutBuffer = (PVOLUME_BITMAP_BUFFER) malloc (bufLen);
|
lpOutBuffer = (PVOLUME_BITMAP_BUFFER) malloc (bufLen);
|
||||||
|
|||||||
Reference in New Issue
Block a user