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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!au2pb.net!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 21 Mar 2016 12:23:26 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: Operating System differences and Ada OS independent programming Date: Mon, 21 Mar 2016 13:24:08 -0400 Organization: IISS Elusive Unicorn Message-ID: References: <56eff4a4$0$4238$e4fe514c@news.kpn.nl> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.79.219.206 X-Trace: sv3-eNqsYTtH8KJ25vAlK3clc1AMhQsjGBJWiNeZPo0gfTXyQ7eIMXrQ7qgMNLB3MLh8lpzBhEmhWxOyKtZ!Muu5Yy9H+im69YRhaS3oZKmeByKkjXJp7fZTc3VwEZaVT5/xTmTr5+DT8zV1oBhNBnf7m2uHempE!zwOZjoWe18oBTUPZnV/BNcuiKdYe X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2272 Xref: news.eternal-september.org comp.lang.ada:29837 Date: 2016-03-21T13:24:08-04:00 List-Id: On Mon, 21 Mar 2016 14:18:03 +0100, "ldries46" declaimed the following: > >For example a file can be in Windows on: ..\..\name and on Linux on >../../name >or in windows on C:\directory\* while in Linux on dev1/directory/* > Windows APIs don't care -- feed them / all day. It is only if you are passing the file name to something that uses a command line interpreter ("shell") where the / becomes an option introducer and you need \. >Is there a general form which can be used or is there a routine which can be >used to determine which operating the program is on. Maybe there is some >kind of pragma defined which can be used the same way as in C/C++ compiler >diectives. > Standard library Directories http://www.adaic.org/resources/add_content/standards/05rm/html/RM-A-16.html may provide some help, though it appears to lack a "normalize path" operation... The compose() operation may allow for building up OS compatible paths but is nothing like Python's os.path.join() -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/