delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/09/20/14:45:37

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: rafael AT gauzon DOT com (rafael garcia)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: calling unzip32 from djgpp
Date: 20 Sep 2004 11:30:05 -0700
Organization: http://groups.google.com
Lines: 45
Message-ID: <42da7100.0409201030.753ea573@posting.google.com>
References: <42da7100 DOT 0409200153 DOT 6cb9560f AT posting DOT google DOT com> <414ECC5B DOT 7000802 AT acm DOT org>
NNTP-Posting-Host: 80.58.14.170
X-Trace: posting.google.com 1095705006 26848 127.0.0.1 (20 Sep 2004 18:30:06 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Mon, 20 Sep 2004 18:30:06 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Cesar Rabak <crabak AT acm DOT org> wrote in message news:<414ECC5B DOT 7000802 AT acm DOT org>...
> > @unzip32 -o %1
> > @if errorlevel 1 echo UNZIP32 COULD NOT TERMINATE CORRECTLY
> > @rem   I don't know why this message appears only if called 
> > @rem   from system() but not from console
> > 
> If I call the above bat file from a C program as follows:
> 
> #include <stdlib.h>
> 
> int
> main(void)
> {
>      system("prueba.bat");
>      return 0;
> }
> 
> I get the same results be it calling the bat file ("prueba.bat") or the 
> compiled program.
> 
> HTH

I have being got confused because my program obtains filenames to
decompress programatically and they come with complete path, including
extension, while when I call the BAT from console I don't give the
extension. So:

c:\c>unzip32 -o prueba
Archive: prueba.zip
 extracting: ./prueba.txt
c:\c>echo %errorlevel%
0
c:\c>unzip32 -o prueba.zip
Archive: prueba.zip
 extracting: ./prueba.txt
c:\c>echo %errorlevel%
1                             <------------------ !!!!!

The problem is when you include the ".zip" file extension, unzip32.exe
changes its return code to 1 !!!

I don't know if this is a bug or a feature but it has bad colour for
me.

Thanks for your help.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019