This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Ada] GNAT.Directory_Operations has problems


On Fri, Nov 02, 2001 at 11:22:18PM -0500, dewar@gnat.com wrote:
> I am not sure why you think there should be a new interface (which would
> indeed be difficult, or perhaps you are not using the term interface in
> the Ada sense). 

"interface", as in the public part of the ads file. The current
interface stores arbitrary length strings (i.e. filenames on the Hurd)
into fixed strings provided by the user, and truncates without warning
if the name is too long. Silently mangling the data upon error is not an
Ada feature. 

The new features could be implemented along side the old functions, or
in a new package, deprecating the old. 

> I agree that it would be nice to generalize the implementation
> here (as opposed to the interface), suggestions welcome.

Except for the fact that 1024 is not FILENAME_MAX, and that that
constant needs to be changed to match FILENAME_MAX of the system instead
of being hardcoded in, I don't see problems with the implementation. My
problems with the package came up during coding, before the
implementation mattered. 

-- 
David Starner - dstarner98@aasaa.ofe.org
Pointless website: http://dvdeug.dhis.org
"I saw a daemon stare into my face, and an angel touch my breast; each 
one softly calls my name . . . the daemon scares me less."
- "Disciple", Stuart Davis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]