Change option usage

This commit is contained in:
Yutaka Sawada
2025-03-16 11:25:24 +09:00
committed by GitHub
parent 6bbe98b1dd
commit e32168b44b
4 changed files with 23 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
[ par2j.exe - version 1.3.3.4 or later ] [ par2j.exe - version 1.3.3.5 or later ]
Type "par2j.exe" to see version, test integrity, and show usage below. Type "par2j.exe" to see version, test integrity, and show usage below.
@@ -312,7 +312,7 @@ Because it may be difficult to predict recovery file size,
use trial command to see how is the size. use trial command to see how is the size.
When it's "/lr" or "/lr0", block count of the largest input file is used. When it's "/lr" or "/lr0", block count of the largest input file is used.
(If the max file is 1000 KB and block size is 10 KB, /lr is same as /lr100.) (If the max file is 1000 KB and block size is 10 KB, /lr is same as /lr100.)
When split size "/ls" is set with "/lr0", When both "/lr0" and "/ls(split size)" are set,
block count of the splited file size is used instead of the largest input file. block count of the splited file size is used instead of the largest input file.
for example, /lr , /lr10 , /lr2000 for example, /lr , /lr10 , /lr2000
@@ -364,6 +364,13 @@ This is possible, only when there is one input file of .ZIP or .7z format.
When recovery files are created in a different directory, When recovery files are created in a different directory,
the protected archive file is made in the directory. the protected archive file is made in the directory.
/ls2 has a special feature to set limit size of recovery files directly.
When both "/ls2" and "/lr(limit size)" are set,
setting number of /lr is recognizned as file size instead of number of blocks.
In this usage, setting limit size must be less than 2 GB.
If you want max 100 MB each file size, set like these; /ls2 /lr102400000
Because the calculation ignores packets, you may set a bit smaller size.
for example, /ls10000 , /ls1048576, /ls1 for example, /ls10000 , /ls1048576, /ls1
/lc : /lc :

View File

@@ -1,5 +1,5 @@
// par2_cmd.c // par2_cmd.c
// Copyright : 2024-11-30 Yutaka Sawada // Copyright : 2025-03-12 Yutaka Sawada
// License : GPL // License : GPL
#ifndef _UNICODE #ifndef _UNICODE
@@ -1448,14 +1448,12 @@ ri= switch_set & 0x00040000
} else if (wcsncmp(tmp_p, L"lr", 2) == 0){ } else if (wcsncmp(tmp_p, L"lr", 2) == 0){
recovery_limit = 0; recovery_limit = 0;
j = 2; j = 2;
while ((j < 2 + 6) && (tmp_p[j] >= '0') && (tmp_p[j] <= '9')){ while ((j < 2 + 10) && (tmp_p[j] >= '0') && (tmp_p[j] <= '9')){
recovery_limit = (recovery_limit * 10) + (tmp_p[j] - '0'); recovery_limit = (recovery_limit * 10) + (tmp_p[j] - '0');
j++; j++;
} }
if (recovery_limit <= 0) // -lr0 ならソース・ファイルの最大ブロック数と同じにする if (recovery_limit <= 0) // -lr0 ならソース・ファイルの最大ブロック数と同じにする
recovery_limit = -1; recovery_limit = -1;
if (recovery_limit > MAX_PARITY_NUM)
recovery_limit = MAX_PARITY_NUM;
} else if (wcsncmp(tmp_p, L"ls", 2) == 0){ } else if (wcsncmp(tmp_p, L"ls", 2) == 0){
__int64 num8 = 0; __int64 num8 = 0;
j = 2; j = 2;
@@ -1977,6 +1975,14 @@ fclose(fp);
if (recovery_limit > j) if (recovery_limit > j)
recovery_limit = j; recovery_limit = j;
} }
} else {
if (split_size == 2){ // 制限をブロック数ではなく、サイズとして認識する
recovery_limit /= block_size;
if (recovery_limit < 1)
recovery_limit = 1;
}
if (recovery_limit > MAX_PARITY_NUM) // パリティ・ブロック数の最大値を超えない
recovery_limit = MAX_PARITY_NUM;
} }
// パリティ・ブロックをリカバリ・ファイルに分配する方法 // パリティ・ブロックをリカバリ・ファイルに分配する方法
i = (switch_set & 0x30000) >> 16; i = (switch_set & 0x30000) >> 16;

View File

@@ -1,7 +1,7 @@
1 RT_STRING ".\\source.cl" 1 RT_STRING ".\\source.cl"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 1,3,3,4 FILEVERSION 1,3,3,5
PRODUCTVERSION 1,3,3,0 PRODUCTVERSION 1,3,3,0
FILEOS 0x40004 FILEOS 0x40004
FILETYPE 0x1 FILETYPE 0x1
@@ -11,9 +11,9 @@ BLOCK "StringFileInfo"
BLOCK "040904B0" BLOCK "040904B0"
{ {
VALUE "FileDescription", "PAR2 client" VALUE "FileDescription", "PAR2 client"
VALUE "LegalCopyright", "Copyright (C) 2024 Yutaka Sawada" VALUE "LegalCopyright", "Copyright (C) 2025 Yutaka Sawada"
VALUE "ProductName", "par2j" VALUE "ProductName", "par2j"
VALUE "FileVersion", "1.3.3.4" VALUE "FileVersion", "1.3.3.5"
VALUE "ProductVersion", "1.3.3.0" VALUE "ProductVersion", "1.3.3.0"
} }
} }

View File

@@ -1,2 +1,2 @@
#define FILE_VERSION "1.3.3.4" // ファイルのバージョン番号 #define FILE_VERSION "1.3.3.5" // ファイルのバージョン番号
#define PRODUCT_VERSION "1.3.3" // 製品のバージョン番号 #define PRODUCT_VERSION "1.3.3" // 製品のバージョン番号