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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e48997391b44ab3c,start X-Google-Attributes: gid103376,public From: Max Spicer Subject: Problems with the GNAT gnatchop utility Date: 1999/04/22 Message-ID: <7fmn4m$uhv$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 469443077 X-Http-Proxy: 1.0 chdnsc1.bae.co.uk:3128 (Squid/1.1.18), 1.0 nadhp1.bae.co.uk:3128 (Squid/1.1.22), 1.0 nadnl8.net.bae.co.uk:3128 (Squid/2.1.PATCH2), 1.0 x15.dejanews.com:80 (Squid/1.1.22) for client unknown, unknown, 141.245.41.133, 141.245.40.230 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Apr 22 08:37:42 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (X11; I; OSF1 V4.0 alpha) Date: 1999-04-22T00:00:00+00:00 List-Id: I have recently started to use the GNAT Ada compiler (v. 3.11p) in order to carry on the development of a system, written in Ada. The original development suite for the system used different filenaming conventions to GNAT and so I am trying to use gnatchop to convert all the Ada files to the default GNAT file naming standard. When I did an initial test, using a single file, I had no problems. However, when I tried to use gnatchop with more than one file at a time, I ran into problems. To illustrate the problem, say that I have two files as follows. test1.ada contains: -------------------------- package Test1 is procedure Hello; end Test1; package body Test1 is procedure Hello is begin null; end Hello; end Test1; -------------------------- test2.ada contains: -------------------------- package Test2 is procedure Goodbye; end Test2; package body Test2 is procedure Goodbye is begin null; end Goodbye; end Test2; -------------------------- If, from a directory containing _just_ these two files, I type gnatchop test1.ada test2.ada I get the following output: splitting test1.ada into: test1.ads test1.adb test1.adb already exists, use -w to overwrite test1.ads already exists, use -w to overwrite no files have been written However, if I run gnatchop on the two files individually, everything works as expected (test1.ads, test1.adb, test2.ads, test2.adb are created). It seems that gnatchop is treating the second (or final) argument as a directory to which it should send its output. In the documentation, the directory argument appears to be optional (as are multiple files), and I can't see how gnatchop should be able to distinguish between its last argument being a file to work on, or a directory. I know that I could get around this problem by using the -w switch, however I am afraid that this could result in a "real" error being ignored (I am working on a large amount of code). Is this a bug in gnatchop, have I missed something, or am I doing something wrong? Thanks, Max Spicer -- Max Spicer - mjs116@my-dejanews.com -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own