Skip to content

Commit

Permalink
unrar 7.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharlie committed Feb 28, 2025
1 parent 7530a4b commit 970bfa4
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ endif()

set(UNRAR_VERSION_MAJOR 7)
set(UNRAR_VERSION_MINOR 1)
set(UNRAR_VERSION_PATCH 4)
set(UNRAR_VERSION_PATCH 5)
set(PACKAGE_VERSION "${UNRAR_VERSION_MAJOR}.${UNRAR_VERSION_MINOR}.${UNRAR_VERSION_PATCH}")

string(TOLOWER "${CMAKE_C_COMPILER_ARCHITECTURE_ID}" UNRAR_ARCH_NAME)
Expand Down
12 changes: 11 additions & 1 deletion unrar/cmddata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,18 @@ void CommandData::ProcessCommand()
OutHelp(RARX_USERERROR);
#endif
}

// Since messages usually include '\n' in the beginning, we also issue
// the final '\n'. It is especially important in Unix, where otherwise
// the shell can display the prompt on the same line as the last message.
// mprintf is blocked with -idq and if error messages had been displayed
// in this mode, we use eprintf to separate them from shell prompt.
// If nothing was displayed with -idq, we avoid the excessive empty line.
if (!BareOutput)
mprintf(L"\n");
if (MsgStream==MSG_ERRONLY && IsConsoleOutputPresent())
eprintf(L"\n");
else
mprintf(L"\n");
}


Expand Down
8 changes: 8 additions & 0 deletions unrar/consio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
static MESSAGE_TYPE MsgStream=MSG_STDOUT;
static RAR_CHARSET RedirectCharset=RCH_DEFAULT;
static bool ProhibitInput=false;
static bool ConsoleOutputPresent=false;

static bool StdoutRedirected=false,StderrRedirected=false,StdinRedirected=false;

Expand Down Expand Up @@ -69,6 +70,8 @@ void ProhibitConsoleInput()
#ifndef SILENT
static void cvt_wprintf(FILE *dest,const wchar *fmt,va_list arglist)
{
ConsoleOutputPresent=true;

// No need for PrintfPrepareFmt here, vwstrprintf calls it.
std::wstring s=vwstrprintf(fmt,arglist);

Expand Down Expand Up @@ -406,3 +409,8 @@ void OutComment(const std::wstring &Comment)
mprintf(L"\n");
}


bool IsConsoleOutputPresent()
{
return ConsoleOutputPresent;
}
1 change: 1 addition & 0 deletions unrar/consio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ void SetConsoleMsgStream(MESSAGE_TYPE MsgStream);
void SetConsoleRedirectCharset(RAR_CHARSET RedirectCharset);
void ProhibitConsoleInput();
void OutComment(const std::wstring &Comment);
bool IsConsoleOutputPresent();

#ifndef SILENT
bool GetConsolePassword(UIPASSWORD_TYPE Type,const std::wstring &FileName,SecPassword *Password);
Expand Down
8 changes: 4 additions & 4 deletions unrar/dll.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <commctrl.h>

VS_VERSION_INFO VERSIONINFO
FILEVERSION 7, 10, 100, 1506
PRODUCTVERSION 7, 10, 100, 1506
FILEVERSION 7, 11, 1, 1520
PRODUCTVERSION 7, 11, 1, 1520
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
{
Expand All @@ -14,8 +14,8 @@ FILETYPE VFT_APP
VALUE "CompanyName", "Alexander Roshal\0"
VALUE "ProductName", "RAR decompression library\0"
VALUE "FileDescription", "RAR decompression library\0"
VALUE "FileVersion", "7.10.0\0"
VALUE "ProductVersion", "7.10.0\0"
VALUE "FileVersion", "7.11.1\0"
VALUE "ProductVersion", "7.11.1\0"
VALUE "LegalCopyright", "Copyright � Alexander Roshal 1993-2025\0"
VALUE "OriginalFilename", "Unrar.dll\0"
}
Expand Down
12 changes: 10 additions & 2 deletions unrar/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,18 @@ bool File::IsDevice()
#ifndef SFX_MODULE
int64 File::Copy(File &Dest,int64 Length)
{
std::vector<byte> Buffer(File::CopyBufferSize());
int64 CopySize=0;
bool CopyAll=(Length==INT64NDF);

// Adjust the buffer size to data size. So we do not waste too much time
// to vector initialization when copying many small data blocks like
// when updating an archive with many small files.
size_t BufSize=File::CopyBufferSize();
if (!CopyAll && Length<(int64)BufSize)
BufSize=(size_t)Length;

std::vector<byte> Buffer(BufSize);
int64 CopySize=0;

while (CopyAll || Length>0)
{
Wait();
Expand Down
8 changes: 4 additions & 4 deletions unrar/unrar.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "version.hpp"

VS_VERSION_INFO VERSIONINFO
FILEVERSION 7, 1, 1, 1213
PRODUCTVERSION 7, 1, 1, 1213
FILEVERSION 7, 11, 1, 1520
PRODUCTVERSION 7, 11, 1, 1520
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -21,12 +21,12 @@ BLOCK "000904b0"
BEGIN
VALUE "CompanyName", L"Alexander Roshal"
VALUE "FileDescription", L"UnRAR freeware"
VALUE "FileVersion", L"7.1.4"
VALUE "FileVersion", L"7.1.5"
VALUE "InternalName", L"unrar.exe"
VALUE "LegalCopyright", L"Copyright © 1993-2025 Alexander Roshal"
VALUE "OriginalFilename", L"unrar.exe"
VALUE "ProductName", L"UnRAR freeware"
VALUE "ProductVersion", L"7.1.4"
VALUE "ProductVersion", L"7.1.5"
END
END
BLOCK "VarFileInfo"
Expand Down
6 changes: 3 additions & 3 deletions unrar/version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define RARVER_MAJOR 7
#define RARVER_MINOR 10
#define RARVER_BETA 0
#define RARVER_DAY 12
#define RARVER_MINOR 11
#define RARVER_BETA 1
#define RARVER_DAY 26
#define RARVER_MONTH 2
#define RARVER_YEAR 2025

0 comments on commit 970bfa4

Please sign in to comment.