delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/03/10/01:50:51

Date: Sun, 10 Mar 1996 08:45:10 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: djgpp-workers AT delorie DOT com
Subject: Library docs-questions
Message-Id: <Pine.SUN.3.91.960310083107.2390O-100000@is>
Mime-Version: 1.0

While documenting some of the library functions, I saw a few things that 
puzzled me:

	1) `glob' doesn't use FA_HIDDEN and FA_SYSTEM in the attributes 
of files it gets from `findfirst' and `findnext'.  If this is 
intentional, I think it's wrong, because this way, an application can 
never get a name of a hidden file from the command line (unless it is 
given explicitly, i.e. without wildcard characters).  It also doesn't 
return files in hidden/system directories (with foo/.../*bar*).  If 
that's how it should be (I don't think so) then at least the `errfunc' 
should be called, because we then have an unreadable directory.

	2) `glob' returns GLOB_ERR when any of the calls to `malloc' 
fails.  Shouldn't it return GLOB_NOSPACE instead?  Right now, 
GLOB_NOSPACE is never returned (that's why the docs add-ons I've sent 
don't describe it).  I thought GLOB_ERR should only be returned when 
`errfunc' should be called (i.e. never under DOS).

	3) SIGINT is defined by ANSI, but <signal.h> only defines it in 
the non-ANSI section, which is wrong.

	4) `system' ignores some commands that it considers `null' 
commands.  Some of them indeed are (like ``rem''), but others aren't.  
For instance, ``cd something'' and ``set'' without an argument should not 
be ignored, I think.  Right now the code ignores both of these commands 
with or without arguments.  Any particular reason for that?

	5) `system' also doesn't support ``>>'' redirection.  It's almost 
trivial to add this support, I just want to know if there is any reason 
that it wasn't included originally.

- Raw text -


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