Mail Archives: djgpp-workers/2000/04/28/18:04:27
Hello.
Eli Zaretskii wrote:
>
> Richard Dawe wrote:
> > I've only applied a few of the diffs from fileutils 3.16 port - you
> > seem to have done much of the work for me already Eli. ;)
>
> I'd suggest to scrutinize each change I did, and also look for things
> I didn't do, but which should be done now.
Yes, I haven't applied all your patches. I'm actually surprised how many
of the patches still seem relevant. The next stage is find other changes
that need doing.
None of the patches for dd could be applied, unfortunately, so that might
take some time to get right.
> For example, the code in dircolors.c which looks at the shell name
> should probably be made workable with DOS-style sh.exe and such, what
> with so many people who use Bash for interactive sessions.
The shell seems to default to Bourne syntax, when SHELL is not set to csh
or tcsh (the path is stripped off). Actually, I will need to strip off the
'.exe' extension (and '.com') from that check.
> > I have one question: in the patch from fileutils 3.16 port for
> > dircolors.c there is a line #ifdef'd on __DJGPP__ that _always_ sets
> > the 'term' variable to "console". In non-DJGPP cases the terminal is
> > obtained from the TERM environment variable. Is there any reason why
> > we shouldn't allow the TERM env var to override "console", e.g. for
> > output redirection?
>
> Probably not. But could you please explain more about what do you
> want to do here? I'm not sure I understand the details of your plan.
OK, here's the section of code, to which I've applied the patch from
fileutils 3.16:
/* Get terminal type */
term = getenv ("TERM");
#ifdef __DJGPP__
/* DJGPP port can always colorize, but TERM is not usually defined
there. */
term = "console";
#endif
if (term == NULL || *term == '\0')
term = "none";
I was thinking that we might not want to override the setting of TERM if
input was redirected and TERM was set to e.g. vt100. If this is unlikely
to happen or we don't support output to different terminal types, then I
guess we don't lose anything by ignoring TERM.
Basically, I'm curious why the setting of TERM is just discarded in
fileutils 3.16's dircolors.
I found that 'ls c:' does not work in bash (in 3.16 and 4.0 ports). Even
'ls c\:' fails. Is this expected behaviour? 'ls c:' works OK from
command.com.
Thanks, bye,
--
Richard Dawe
richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/
- Raw text -