Репозиторий Sisyphus
Последнее обновление: 15 октября 2021 | Пакетов: 17364 | Посещений: 22087363
en ru br
Репозитории ALT
S:1.0.8-alt2
5.1: 1.0.6-alt1
4.1: 1.0.6-alt0.M40.1
4.0: 1.0.6-alt0.M40.1
+updates:1.0.5-alt2
3.0: 1.0.3-alt5
www.altlinux.org/Changes

Группа :: Архивирование/Сжатие
Пакет: bzip2

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: bzip2-1.0.3-alt-progname.patch
Скачать


--- bzip2-1.0.3/bzip2.c.orig	2005-04-10 00:28:59 +0400
+++ bzip2-1.0.3/bzip2.c	2005-04-10 00:30:56 +0400
@@ -300,8 +300,7 @@ Int32   longestFileName;
 Char    inName [FILE_NAME_LEN];
 Char    outName[FILE_NAME_LEN];
 Char    tmpName[FILE_NAME_LEN];
-Char    *progName;
-Char    progNameReally[FILE_NAME_LEN];
+const char    *progName;
 FILE    *outputHandleJustInCase;
 Int32   workFactor;
 
@@ -1845,7 +1844,6 @@
 IntNative main ( IntNative argc, Char *argv[] )
 {
    Int32  i, j;
-   Char   *tmp;
    Cell   *argList;
    Cell   *aa;
    Bool   decode;
@@ -1884,10 +1882,7 @@ IntNative main ( IntNative argc, Char *a
    copyFileName ( inName,  "(none)" );
    copyFileName ( outName, "(none)" );
 
-   copyFileName ( progNameReally, argv[0] );
-   progName = &progNameReally[0];
-   for (tmp = &progNameReally[0]; *tmp != '\0'; tmp++)
-      if (*tmp == PATH_SEP) progName = tmp + 1;
+   progName = program_invocation_short_name;
 
 
    /*-- Copy flags from env var BZIP2, and 
--- bzip2-1.0.3/bzip2recover.c.orig	2005-04-10 00:31:41 +0400
+++ bzip2-1.0.3/bzip2recover.c	2005-04-10 00:37:47 +0400
@@ -99,7 +99,7 @@ typedef  unsigned char  Bool;
 
 Char inFileName[BZ_MAX_FILENAME];
 Char outFileName[BZ_MAX_FILENAME];
-Char progName[BZ_MAX_FILENAME];
+const char *progName;
 
 MaybeUInt64 bytesOut = 0;
 MaybeUInt64 bytesIn  = 0;
@@ -367,7 +367,7 @@ Int32 main ( Int32 argc, Char** argv )
    UInt32      buffHi, buffLo, blockCRC;
    Char*       p;
 
-   strcpy ( progName, argv[0] );
+   progName = program_invocation_short_name;
    inFileName[0] = outFileName[0] = 0;
 
    fprintf ( stderr, 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin