delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/23/05:07:16

From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
To: <djgpp-workers AT delorie DOT com>
Subject: RE: New patch for dtou.c
Date: Thu, 23 Nov 2000 11:08:57 +0100
Message-ID: <NBBBIOJKJBNCHJBEKHLOEEAHCCAA.tim.van.holder@pandora.be>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <5A4F5D3251@HRZ1.hrz.tu-darmstadt.de>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id FAA04877
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> The return code of main() is always the return code generated by the last processed file
> as usual.
That is wath Andris meant. If he runs dtou on 15 files, and only the last one is processed correctly, he will not be able to tell this from the exit code (which would be zero). So he's suggesting that you only return such a code in case of verbose operation (so you can see which files went wrong).
In any case, returning only that status of the last file processed feels wrong; IMO it would be better to return the highest status returned by all files processed, so in the above example, the return could would not be 0 in the first place. This would still have the drawback that you won't know which file went wrong just by checking the return code, so such a status would still need to be used only if the -v option is used (indicating that you care about what happened to the files).

Tim Van Holder

- Raw text -


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