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!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: [ANN] List_Image v0.2.0 Date: Wed, 31 Jan 2018 18:27:21 -0600 Organization: JSA Research & Innovation Message-ID: References: <575826a1-c983-49aa-95e2-54048f6b7b5b@googlegroups.com> Injection-Date: Thu, 1 Feb 2018 00:27:21 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="25736"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:50234 Date: 2018-01-31T18:27:21-06:00 List-Id: wrote in message news:da6805ff-8429-4ca0-bbb5-f5462040989d@googlegroups.com... ... > * EOL should be defined different when on Windows. I used to test > whether the GNAT.OS_Lib.Directory_Separator is '\', perhaps there's > a better way nowadays. For sure, a "Is_Windows" constant would be > useful somewhere. > > EOL : constant String := (if Is_Windows then ASCII.CR & ASCII.LF else > ASCII.LF); Ada defined System.System_Name for this sort of purpose, but since it is a constant and it is implementation-defined, it is is of limited use for this purpose. For Janus/Ada, you could use: Is_Windows : constant Boolean := (System.System_Name = System.Win32); ...but for the moment, "Win32" is the only constant defined, so you could use "True" as well. If we ever resurrected the Linux compiler, then there will be another constant again. (There used to be DOS_Ext and MS_DOS constants, but we got rid of those years ago.) Dunno if GNAT does anything useful with this constant or not. Randy.