delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/25/11:46:09

From: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
Organization: Darmstadt University of Technology
To: Andris Pavenis <pavenis AT lanet DOT lv>
Date: Sat, 25 Nov 2000 17:44:47 +0200
MIME-Version: 1.0
Subject: Re: Patch #3 for dtou.c
CC: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
References: <2593-Sat25Nov2000131027+0200-eliz AT is DOT elta DOT co DOT il>
In-reply-to: <Pine.A41.4.05.10011251321540.82314-100000@ieva06.lanet.lv>
X-mailer: Pegasus Mail for Windows (v2.54DE)
Message-ID: <927D321561@HRZ1.hrz.tu-darmstadt.de>
Reply-To: djgpp-workers AT delorie DOT com

Date: Sat, 25 Nov 2000 14:18:19 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
> Some initial comments:
>
> Perhaps there is no need to convert argv[0] to lowercase to print usage
> info. Function strlwr() used for this purpose is not portable (not ANSI,not
> POSIX). As result dtou.c is not compiling for me on Linux (glibc-2.2) and
> under AIX 4.3.1 on RS6000. Also we should strip path from argv[0] for
> displaying usage info
 I have no access to AIX, HP-UX, linux, etc. etc etc machines so I will let
you make all the changes needed.
I have forgotten to check if strlwr() is POSIX. Sorry. This must be corrected.
Usualy, the GNU programs print their full path when you isue a command like: tar.
This is the reason why I have tried to copy the same behaviour.

> Also I think it's better to return 0 unless return code is explicitly
> requested by some command line parameter.
Sorry but I do not understand this. This will completely break backward
compatibility. If this is wanted, a new "compatibility" switch must be
invented for dtou.

> About -v and -vv: I think that we should use verbose=2 instead of
> vverbose=1 (so if we change to getopt() each -v increases variable 
> verbose) 
>
> This version of dtou will also not work for example if we want to convert
> single file '-v' (it's veird of course). So I think it's better to use
> getopt() for parsing options (so one can use 'dtou -- -v')
I do not know about this. I have no preferences. I will let djgpp-workers
decide this. But I would like to know the decision as soon as possible
so I can start rewriting dtou.c and reuse as much as possible of this
code in utod.c

> I'm including patch with following fixes:
>
>	- IS_DIR_SEPARATOR is system specific ('\\' and ':' is a
>		separator not for all systems)
>	- stripping path from executable name when displaying usage info
>	- removal on non-portable function strlwr()
>	- adding missing '\n' at end of output of usage info
IS_DIR_SEPARATOR issue is OK.
The executable path issue. I do not know. AFAIK gnu programs
 always print the executable path.
Removal of strlwr()issue. This is OK.
Missing '\n' issue. The '\n' has **not** been forgotten. This was intentional.
I wanted that the complete help text fits into **one** screen without scrolling
 the first line out of the screen.

Regards,
Guerrero, Juan Manuel

- Raw text -


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