From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,31af760e939556ef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!12g2000pri.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Interpretation of extensions different from Unix/Linux? Date: Fri, 14 Aug 2009 16:02:29 -0700 (PDT) Organization: http://groups.google.com Message-ID: <19be2422-65fe-4aed-8acb-f9f2819f29bc@12g2000pri.googlegroups.com> References: <8a5f3b98-1c5a-4d47-aca7-e106d1223fa9@a26g2000yqn.googlegroups.com> <87skg7952j.fsf@jspa-nykredit.sparre-andersen.dk> <1f999bfa99erz$.9b8p6yymr8x7$.dlg@40tude.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1250290950 30446 127.0.0.1 (14 Aug 2009 23:02:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 14 Aug 2009 23:02:30 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 12g2000pri.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7807 Date: 2009-08-14T16:02:29-07:00 List-Id: On Aug 14, 1:01=A0am, "Dmitry A. Kazakov" wrote: > On Thu, 13 Aug 2009 23:56:03 -0500, Randy Brukardt wrote: > > "Dmitry A. Kazakov" wrote in message > >news:iavqqy3ue6ne$.uxihdofxdalx.dlg@40tude.net... > > ... > >> Latin-1 is a limitation that makes impossible to write OS-independent > >> programs. BTW, I didn't check it but I suppose that the GNAT implement= ation > >> is not even Latin-1, it is in fact UTF-8, at least under Linux. So it = is > >> broken twice. Once per design, once by the implementation to fix broke= n > >> design. > > > Actually, the use of UTF-8 in this way is the recommendation of the ARG= . We > > have no plans of changing any of the file handling routines away from > > String. We may add some Implementation Advice to make it clear that > > implementations are advised to support UTF-8 encoded file names. > > The problem is 3.5.2 which claims that Character is Latin-1. > > (UTF-8 is a problem of its own in Ada. We need a private type with two > interfaces. One of Wide_Wide_String another of an array of octets. Ada > cannot provide this.) I'm not sure I understand just what is being proposed---but if the idea is that a String type is to be used as an array of UTF-8 octets, it would definitely be a disappointment. Abstractly, a String is an array where each element of the array represents a "character", which is either one graphic symbol or a control character. Forcing a String to represent, basically, an arbitrary sequence of bytes that don't have any relation to graphic characters, seems like an abomination to me---the sort of thing a C programmer might do, but that shouldn't be allowed or encouraged in Ada, and it would sadden me if it were allowed. It would be a step toward making Ada "just another programming language", as Randy put it in another thread. I think I could even live with having a routine take an Interfaces.C.char_array parameter to represent an array of octets. But not String, please... -- Adam > > >>>> 3. Even so it provides no way to get the name of the root > > >>> Because it is OS neutral, and there is no independent concept of a ro= ot. > > >> An OS-neutral Ada.Directories would provide enumeration of roots. Any > >> usable Ada.Directories must have the concept of roots nodes. > > > Enumeration of roots is impractible on Windows, because every possible = file > > share would have to be included in such a list (including any that don'= t > > have permissions to read). That would be impossibly slow, and pretty > > pointless to boot. It also would cause problems with removable disks > > (Windows gives a failure if you try to enumerate an empty floppy disk).= I've > > dealt with those headaches from our compiler installer, and I wouldn't = want > > to force them on other users of Ada. > > Same to me. But it is required to make Ada.Directories any usable. > > Presently I use Exists in a loop through "A".."Z" + "/". That works both > under Linux and Windows. Do you think that is *better*?! (:-)) > > > If you can't do it reasonably in Windows, it surely doesn't belong in > > Ada.Directories. > > The MS-explorer does not drop that nasty c0000013 pop up window when > started. From this I conclude there should be a way to. > > Technically, it is certainly possible, for example (a bit exaggerated), d= o > system with "cmd" on "dir A:". If the output is "The system cannot find t= he > path ,specified." (in the current locale (:-)), there is no "A:". Repeat = up > to "Z:"... (:-)) > > -- > Regards, > Dmitry A. Kazakovhttp://www.dmitry-kazakov.de