2020-06-02 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * ada_get_targ.adb: Bump copyright year. * adabkend.adb: Likewise. * adabkend.ads: Likewise. * adadecode.c: Likewise. * adadecode.h: Likewise. * adaint.c: Likewise. * adaint.h: Likewise. * affinity.c: Likewise. * ali-util.adb: Likewise. * ali-util.ads: Likewise. * ali.adb: Likewise. * ali.ads: Likewise. * alloc.ads: Likewise. * argv-lynxos178-raven-cert.c: Likewise. * argv.c: Likewise. * aspects.adb: Likewise. * aspects.ads: Likewise. * atree.adb: Likewise. * atree.ads: Likewise. * atree.h: Likewise. * aux-io.c: Likewise. * back_end.adb: Likewise. * back_end.ads: Likewise. * bcheck.adb: Likewise. * bcheck.ads: Likewise. * binde.adb: Likewise. * binde.ads: Likewise. * binderr.adb: Likewise. * binderr.ads: Likewise. * bindgen.adb: Likewise. * bindgen.ads: Likewise. * bindo-augmentors.adb: Likewise. * bindo-augmentors.ads: Likewise. * bindo-builders.adb: Likewise. * bindo-builders.ads: Likewise. * bindo-diagnostics.adb: Likewise. * bindo-diagnostics.ads: Likewise. * bindo-elaborators.adb: Likewise. * bindo-elaborators.ads: Likewise. * bindo-graphs.adb: Likewise. * bindo-graphs.ads: Likewise. * bindo-units.adb: Likewise. * bindo-units.ads: Likewise. * bindo-validators.adb: Likewise. * bindo-validators.ads: Likewise. * bindo-writers.adb: Likewise. * bindo-writers.ads: Likewise. * bindo.adb: Likewise. * bindo.ads: Likewise. * bindusg.adb: Likewise. * bindusg.ads: Likewise. * butil.adb: Likewise. * butil.ads: Likewise. * cal.c: Likewise. * casing.adb: Likewise. * casing.ads: Likewise. * ceinfo.adb: Likewise. * checks.adb: Likewise. * checks.ads: Likewise. * cio.c: Likewise. * clean.adb: Likewise. * clean.ads: Likewise. * comperr.adb: Likewise. * comperr.ads: Likewise. * contracts.adb: Likewise. * contracts.ads: Likewise. * csets.adb: Likewise. * csets.ads: Likewise. * csinfo.adb: Likewise. * cstand.adb: Likewise. * cstand.ads: Likewise. * cstreams.c: Likewise. * ctrl_c.c: Likewise. * debug.adb: Likewise. * debug.ads: Likewise. * debug_a.adb: Likewise. * debug_a.ads: Likewise. * einfo.adb: Likewise. * einfo.ads: Likewise. * elists.adb: Likewise. * elists.ads: Likewise. * elists.h: Likewise. * env.c: Likewise. * env.h: Likewise. * err_vars.ads: Likewise. * errno.c: Likewise. * errout.adb: Likewise. * errout.ads: Likewise. * erroutc.adb: Likewise. * erroutc.ads: Likewise. * errutil.adb: Likewise. * errutil.ads: Likewise. * eval_fat.adb: Likewise. * eval_fat.ads: Likewise. * exit.c: Likewise. * exp_aggr.adb: Likewise. * exp_aggr.ads: Likewise. * exp_atag.adb: Likewise. * exp_atag.ads: Likewise. * exp_attr.adb: Likewise. * exp_attr.ads: Likewise. * exp_cg.adb: Likewise. * exp_cg.ads: Likewise. * exp_ch10.ads: Likewise. * exp_ch11.adb: Likewise. * exp_ch11.ads: Likewise. * exp_ch12.adb: Likewise. * exp_ch12.ads: Likewise. * exp_ch13.adb: Likewise. * exp_ch13.ads: Likewise. * exp_ch2.adb: Likewise. * exp_ch2.ads: Likewise. * exp_ch3.adb: Likewise. * exp_ch3.ads: Likewise. * exp_ch4.adb: Likewise. * exp_ch4.ads: Likewise. * exp_ch5.adb: Likewise. * exp_ch5.ads: Likewise. * exp_ch6.adb: Likewise. * exp_ch6.ads: Likewise. * exp_ch7.adb: Likewise. * exp_ch7.ads: Likewise. * exp_ch8.adb: Likewise. * exp_ch8.ads: Likewise. * exp_ch9.adb: Likewise. * exp_ch9.ads: Likewise. * exp_code.adb: Likewise. * exp_code.ads: Likewise. * exp_dbug.adb: Likewise. * exp_dbug.ads: Likewise. * exp_disp.adb: Likewise. * exp_disp.ads: Likewise. * exp_dist.adb: Likewise. * exp_dist.ads: Likewise. * exp_fixd.adb: Likewise. * exp_fixd.ads: Likewise. * exp_imgv.adb: Likewise. * exp_imgv.ads: Likewise. * exp_intr.adb: Likewise. * exp_intr.ads: Likewise. * exp_pakd.adb: Likewise. * exp_pakd.ads: Likewise. * exp_prag.adb: Likewise. * exp_prag.ads: Likewise. * exp_sel.adb: Likewise. * exp_sel.ads: Likewise. * exp_smem.adb: Likewise. * exp_smem.ads: Likewise. * exp_spark.adb: Likewise. * exp_spark.ads: Likewise. * exp_strm.adb: Likewise. * exp_strm.ads: Likewise. * exp_tss.adb: Likewise. * exp_tss.ads: Likewise. * exp_unst.adb: Likewise. * exp_unst.ads: Likewise. * exp_util.adb: Likewise. * exp_util.ads: Likewise. * expander.adb: Likewise. * expander.ads: Likewise. * expect.c: Likewise. * fe.h: Likewise. * final.c: Likewise. * fmap.adb: Likewise. * fmap.ads: Likewise. * fname-sf.adb: Likewise. * fname-sf.ads: Likewise. * fname-uf.adb: Likewise. * fname-uf.ads: Likewise. * fname.adb: Likewise. * fname.ads: Likewise. * freeze.adb: Likewise. * freeze.ads: Likewise. * frontend.adb: Likewise. * frontend.ads: Likewise. * get_scos.adb: Likewise. * get_scos.ads: Likewise. * get_targ.adb: Likewise. * get_targ.ads: Likewise. * ghost.adb: Likewise. * ghost.ads: Likewise. * gnat1drv.adb: Likewise. * gnat1drv.ads: Likewise. * gnatbind.adb: Likewise. * gnatbind.ads: Likewise. * gnatchop.adb: Likewise. * gnatclean.adb: Likewise. * gnatcmd.adb: Likewise. * gnatcmd.ads: Likewise. * gnatdll.adb: Likewise. * gnatfind.adb: Likewise. * gnatkr.adb: Likewise. * gnatkr.ads: Likewise. * gnatlink.adb: Likewise. * gnatlink.ads: Likewise. * gnatls.adb: Likewise. * gnatls.ads: Likewise. * gnatmake.adb: Likewise. * gnatmake.ads: Likewise. * gnatname.adb: Likewise. * gnatname.ads: Likewise. * gnatprep.adb: Likewise. * gnatprep.ads: Likewise. * gnatvsn.adb: Likewise. * gnatxref.adb: Likewise. * gprep.adb: Likewise. * gprep.ads: Likewise. * gsocket.h: Likewise. * hostparm.ads: Likewise. * impunit.adb: Likewise. * impunit.ads: Likewise. * indepsw-aix.adb: Likewise. * indepsw-darwin.adb: Likewise. * indepsw-gnu.adb: Likewise. * indepsw.adb: Likewise. * indepsw.ads: Likewise. * init.c: Likewise. * initialize.c: Likewise. * inline.adb: Likewise. * inline.ads: Likewise. * itypes.adb: Likewise. * itypes.ads: Likewise. * krunch.adb: Likewise. * krunch.ads: Likewise. * layout.adb: Likewise. * layout.ads: Likewise. * lib-list.adb: Likewise. * lib-load.adb: Likewise. * lib-load.ads: Likewise. * lib-sort.adb: Likewise. * lib-util.adb: Likewise. * lib-util.ads: Likewise. * lib-writ.adb: Likewise. * lib-writ.ads: Likewise. * lib-xref-spark_specific.adb: Likewise. * lib-xref.adb: Likewise. * lib-xref.ads: Likewise. * lib.adb: Likewise. * lib.ads: Likewise. * libgnarl/a-astaco.adb: Likewise. * libgnarl/a-dispat.adb: Likewise. * libgnarl/a-dynpri.adb: Likewise. * libgnarl/a-etgrbu.ads: Likewise. * libgnarl/a-exetim__darwin.adb: Likewise. * libgnarl/a-exetim__default.ads: Likewise. * libgnarl/a-exetim__mingw.adb: Likewise. * libgnarl/a-exetim__mingw.ads: Likewise. * libgnarl/a-exetim__posix.adb: Likewise. * libgnarl/a-interr.adb: Likewise. * libgnarl/a-interr.ads: Likewise. * libgnarl/a-intnam.ads: Likewise. * libgnarl/a-intnam__aix.ads: Likewise. * libgnarl/a-intnam__darwin.ads: Likewise. * libgnarl/a-intnam__dragonfly.ads: Likewise. * libgnarl/a-intnam__dummy.ads: Likewise. * libgnarl/a-intnam__freebsd.ads: Likewise. * libgnarl/a-intnam__hpux.ads: Likewise. * libgnarl/a-intnam__linux.ads: Likewise. * libgnarl/a-intnam__lynxos.ads: Likewise. * libgnarl/a-intnam__mingw.ads: Likewise. * libgnarl/a-intnam__qnx.ads: Likewise. * libgnarl/a-intnam__rtems.ads: Likewise. * libgnarl/a-intnam__solaris.ads: Likewise. * libgnarl/a-intnam__vxworks.ads: Likewise. * libgnarl/a-reatim.adb: Likewise. * libgnarl/a-reatim.ads: Likewise. * libgnarl/a-retide.adb: Likewise. * libgnarl/a-retide.ads: Likewise. * libgnarl/a-rttiev.adb: Likewise. * libgnarl/a-rttiev.ads: Likewise. * libgnarl/a-synbar.adb: Likewise. * libgnarl/a-synbar.ads: Likewise. * libgnarl/a-synbar__posix.adb: Likewise. * libgnarl/a-synbar__posix.ads: Likewise. * libgnarl/a-sytaco.adb: Likewise. * libgnarl/a-sytaco.ads: Likewise. * libgnarl/a-tasatt.adb: Likewise. * libgnarl/a-tasatt.ads: Likewise. * libgnarl/a-taside.adb: Likewise. * libgnarl/a-taside.ads: Likewise. * libgnarl/a-taster.adb: Likewise. * libgnarl/g-boubuf.adb: Likewise. * libgnarl/g-boubuf.ads: Likewise. * libgnarl/g-boumai.ads: Likewise. * libgnarl/g-semaph.adb: Likewise. * libgnarl/g-semaph.ads: Likewise. * libgnarl/g-signal.adb: Likewise. * libgnarl/g-signal.ads: Likewise. * libgnarl/g-tastus.ads: Likewise. * libgnarl/g-thread.adb: Likewise. * libgnarl/g-thread.ads: Likewise. * libgnarl/i-vxinco.adb: Likewise. * libgnarl/i-vxinco.ads: Likewise. * libgnarl/s-inmaop.ads: Likewise. * libgnarl/s-inmaop__dummy.adb: Likewise. * libgnarl/s-inmaop__posix.adb: Likewise. * libgnarl/s-inmaop__vxworks.adb: Likewise. * libgnarl/s-interr.adb: Likewise. * libgnarl/s-interr.ads: Likewise. * libgnarl/s-interr__dummy.adb: Likewise. * libgnarl/s-interr__hwint.adb: Likewise. * libgnarl/s-interr__sigaction.adb: Likewise. * libgnarl/s-interr__vxworks.adb: Likewise. * libgnarl/s-intman.ads: Likewise. * libgnarl/s-intman__android.adb: Likewise. * libgnarl/s-intman__dummy.adb: Likewise. * libgnarl/s-intman__lynxos.adb: Likewise. * libgnarl/s-intman__mingw.adb: Likewise. * libgnarl/s-intman__posix.adb: Likewise. * libgnarl/s-intman__qnx.adb: Likewise. * libgnarl/s-intman__solaris.adb: Likewise. * libgnarl/s-intman__susv3.adb: Likewise. * libgnarl/s-intman__vxworks.adb: Likewise. * libgnarl/s-intman__vxworks.ads: Likewise. * libgnarl/s-linux.ads: Likewise. * libgnarl/s-linux__alpha.ads: Likewise. * libgnarl/s-linux__android.ads: Likewise. * libgnarl/s-linux__hppa.ads: Likewise. * libgnarl/s-linux__mips.ads: Likewise. * libgnarl/s-linux__riscv.ads: Likewise. * libgnarl/s-linux__sparc.ads: Likewise. * libgnarl/s-linux__x32.ads: Likewise. * libgnarl/s-mudido.adb: Likewise. * libgnarl/s-mudido__affinity.adb: Likewise. * libgnarl/s-osinte__aix.adb: Likewise. * libgnarl/s-osinte__aix.ads: Likewise. * libgnarl/s-osinte__android.adb: Likewise. * libgnarl/s-osinte__android.ads: Likewise. * libgnarl/s-osinte__darwin.adb: Likewise. * libgnarl/s-osinte__darwin.ads: Likewise. * libgnarl/s-osinte__dragonfly.adb: Likewise. * libgnarl/s-osinte__dragonfly.ads: Likewise. * libgnarl/s-osinte__dummy.ads: Likewise. * libgnarl/s-osinte__freebsd.adb: Likewise. * libgnarl/s-osinte__freebsd.ads: Likewise. * libgnarl/s-osinte__gnu.adb: Likewise. * libgnarl/s-osinte__gnu.ads: Likewise. * libgnarl/s-osinte__hpux-dce.adb: Likewise. * libgnarl/s-osinte__hpux-dce.ads: Likewise. * libgnarl/s-osinte__hpux.ads: Likewise. * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise. * libgnarl/s-osinte__linux.ads: Likewise. * libgnarl/s-osinte__lynxos178.adb: Likewise. * libgnarl/s-osinte__lynxos178e.ads: Likewise. * libgnarl/s-osinte__mingw.ads: Likewise. * libgnarl/s-osinte__posix.adb: Likewise. * libgnarl/s-osinte__qnx.adb: Likewise. * libgnarl/s-osinte__qnx.ads: Likewise. * libgnarl/s-osinte__rtems.adb: Likewise. * libgnarl/s-osinte__rtems.ads: Likewise. * libgnarl/s-osinte__solaris.adb: Likewise. * libgnarl/s-osinte__solaris.ads: Likewise. * libgnarl/s-osinte__vxworks.adb: Likewise. * libgnarl/s-osinte__vxworks.ads: Likewise. * libgnarl/s-osinte__x32.adb: Likewise. * libgnarl/s-proinf.adb: Likewise. * libgnarl/s-proinf.ads: Likewise. * libgnarl/s-qnx.ads: Likewise. * libgnarl/s-solita.adb: Likewise. * libgnarl/s-solita.ads: Likewise. * libgnarl/s-stusta.adb: Likewise. * libgnarl/s-stusta.ads: Likewise. * libgnarl/s-taasde.adb: Likewise. * libgnarl/s-taasde.ads: Likewise. * libgnarl/s-tadeca.adb: Likewise. * libgnarl/s-tadeca.ads: Likewise. * libgnarl/s-tadert.adb: Likewise. * libgnarl/s-tadert.ads: Likewise. * libgnarl/s-taenca.adb: Likewise. * libgnarl/s-taenca.ads: Likewise. * libgnarl/s-taprob.adb: Likewise. * libgnarl/s-taprob.ads: Likewise. * libgnarl/s-taprop.ads: Likewise. * libgnarl/s-taprop__dummy.adb: Likewise. * libgnarl/s-taprop__hpux-dce.adb: Likewise. * libgnarl/s-taprop__linux.adb: Likewise. * libgnarl/s-taprop__mingw.adb: Likewise. * libgnarl/s-taprop__posix.adb: Likewise. * libgnarl/s-taprop__qnx.adb: Likewise. * libgnarl/s-taprop__solaris.adb: Likewise. * libgnarl/s-taprop__vxworks.adb: Likewise. * libgnarl/s-tarest.adb: Likewise. * libgnarl/s-tarest.ads: Likewise. * libgnarl/s-tasdeb.adb: Likewise. * libgnarl/s-tasdeb.ads: Likewise. * libgnarl/s-tasinf.adb: Likewise. * libgnarl/s-tasinf.ads: Likewise. * libgnarl/s-tasinf__linux.adb: Likewise. * libgnarl/s-tasinf__linux.ads: Likewise. * libgnarl/s-tasinf__mingw.adb: Likewise. * libgnarl/s-tasinf__mingw.ads: Likewise. * libgnarl/s-tasinf__solaris.adb: Likewise. * libgnarl/s-tasinf__solaris.ads: Likewise. * libgnarl/s-tasinf__vxworks.ads: Likewise. * libgnarl/s-tasini.adb: Likewise. * libgnarl/s-tasini.ads: Likewise. * libgnarl/s-taskin.adb: Likewise. * libgnarl/s-taskin.ads: Likewise. * libgnarl/s-taspri__dummy.ads: Likewise. * libgnarl/s-taspri__hpux-dce.ads: Likewise. * libgnarl/s-taspri__lynxos.ads: Likewise. * libgnarl/s-taspri__mingw.ads: Likewise. * libgnarl/s-taspri__posix-noaltstack.ads: Likewise. * libgnarl/s-taspri__posix.ads: Likewise. * libgnarl/s-taspri__solaris.ads: Likewise. * libgnarl/s-taspri__vxworks.ads: Likewise. * libgnarl/s-tasque.adb: Likewise. * libgnarl/s-tasque.ads: Likewise. * libgnarl/s-tasren.adb: Likewise. * libgnarl/s-tasren.ads: Likewise. * libgnarl/s-tasres.ads: Likewise. * libgnarl/s-tassta.adb: Likewise. * libgnarl/s-tassta.ads: Likewise. * libgnarl/s-tasuti.adb: Likewise. * libgnarl/s-tasuti.ads: Likewise. * libgnarl/s-tataat.adb: Likewise. * libgnarl/s-tataat.ads: Likewise. * libgnarl/s-tpinop.adb: Likewise. * libgnarl/s-tpinop.ads: Likewise. * libgnarl/s-tpoaal.adb: Likewise. * libgnarl/s-tpoben.adb: Likewise. * libgnarl/s-tpoben.ads: Likewise. * libgnarl/s-tpobmu.adb: Likewise. * libgnarl/s-tpobmu.ads: Likewise. * libgnarl/s-tpobop.adb: Likewise. * libgnarl/s-tpobop.ads: Likewise. * libgnarl/s-tpopmo.adb: Likewise. * libgnarl/s-tpopsp__posix-foreign.adb: Likewise. * libgnarl/s-tpopsp__posix.adb: Likewise. * libgnarl/s-tpopsp__solaris.adb: Likewise. * libgnarl/s-tpopsp__tls.adb: Likewise. * libgnarl/s-tpopsp__vxworks-rtp.adb: Likewise. * libgnarl/s-tpopsp__vxworks-tls.adb: Likewise. * libgnarl/s-tpopsp__vxworks.adb: Likewise. * libgnarl/s-tporft.adb: Likewise. * libgnarl/s-tposen.adb: Likewise. * libgnarl/s-tposen.ads: Likewise. * libgnarl/s-vxwext.adb: Likewise. * libgnarl/s-vxwext.ads: Likewise. * libgnarl/s-vxwext__kernel-smp.adb: Likewise. * libgnarl/s-vxwext__kernel.adb: Likewise. * libgnarl/s-vxwext__kernel.ads: Likewise. * libgnarl/s-vxwext__noints.adb: Likewise. * libgnarl/s-vxwext__rtp-smp.adb: Likewise. * libgnarl/s-vxwext__rtp.adb: Likewise. * libgnarl/s-vxwext__rtp.ads: Likewise. * libgnarl/s-vxwext__vthreads.ads: Likewise. * libgnarl/s-vxwork__aarch64.ads: Likewise. * libgnarl/s-vxwork__arm.ads: Likewise. * libgnarl/s-vxwork__ppc.ads: Likewise. * libgnarl/s-vxwork__x86.ads: Likewise. * libgnarl/thread.c: Likewise. * libgnat/a-assert.adb: Likewise. * libgnat/a-assert.ads: Likewise. * libgnat/a-btgbso.adb: Likewise. * libgnat/a-btgbso.ads: Likewise. * libgnat/a-calari.adb: Likewise. * libgnat/a-calari.ads: Likewise. * libgnat/a-calcon.adb: Likewise. * libgnat/a-calcon.ads: Likewise. * libgnat/a-caldel.adb: Likewise. * libgnat/a-caldel.ads: Likewise. * libgnat/a-calend.adb: Likewise. * libgnat/a-calend.ads: Likewise. * libgnat/a-calfor.adb: Likewise. * libgnat/a-calfor.ads: Likewise. * libgnat/a-catizo.adb: Likewise. * libgnat/a-cbdlli.adb: Likewise. * libgnat/a-cbdlli.ads: Likewise. * libgnat/a-cbhama.adb: Likewise. * libgnat/a-cbhama.ads: Likewise. * libgnat/a-cbhase.adb: Likewise. * libgnat/a-cbhase.ads: Likewise. * libgnat/a-cbmutr.adb: Likewise. * libgnat/a-cbmutr.ads: Likewise. * libgnat/a-cborma.adb: Likewise. * libgnat/a-cborma.ads: Likewise. * libgnat/a-cborse.adb: Likewise. * libgnat/a-cborse.ads: Likewise. * libgnat/a-cbprqu.adb: Likewise. * libgnat/a-cbprqu.ads: Likewise. * libgnat/a-cbsyqu.adb: Likewise. * libgnat/a-cbsyqu.ads: Likewise. * libgnat/a-cdlili.adb: Likewise. * libgnat/a-cdlili.ads: Likewise. * libgnat/a-cfdlli.adb: Likewise. * libgnat/a-cfdlli.ads: Likewise. * libgnat/a-cfhama.adb: Likewise. * libgnat/a-cfhama.ads: Likewise. * libgnat/a-cfhase.adb: Likewise. * libgnat/a-cfhase.ads: Likewise. * libgnat/a-cfinve.adb: Likewise. * libgnat/a-cfinve.ads: Likewise. * libgnat/a-cforma.adb: Likewise. * libgnat/a-cforma.ads: Likewise. * libgnat/a-cforse.adb: Likewise. * libgnat/a-cforse.ads: Likewise. * libgnat/a-cgaaso.adb: Likewise. * libgnat/a-cgaaso.ads: Likewise. * libgnat/a-cgarso.adb: Likewise. * libgnat/a-cgcaso.adb: Likewise. * libgnat/a-chacon.adb: Likewise. * libgnat/a-chacon.ads: Likewise. * libgnat/a-chahan.adb: Likewise. * libgnat/a-chahan.ads: Likewise. * libgnat/a-chlat9.ads: Likewise. * libgnat/a-chtgbk.adb: Likewise. * libgnat/a-chtgbk.ads: Likewise. * libgnat/a-chtgbo.adb: Likewise. * libgnat/a-chtgbo.ads: Likewise. * libgnat/a-chtgke.adb: Likewise. * libgnat/a-chtgke.ads: Likewise. * libgnat/a-chtgop.adb: Likewise. * libgnat/a-chtgop.ads: Likewise. * libgnat/a-chzla1.ads: Likewise. * libgnat/a-chzla9.ads: Likewise. * libgnat/a-cidlli.adb: Likewise. * libgnat/a-cidlli.ads: Likewise. * libgnat/a-cihama.adb: Likewise. * libgnat/a-cihama.ads: Likewise. * libgnat/a-cihase.adb: Likewise. * libgnat/a-cihase.ads: Likewise. * libgnat/a-cimutr.adb: Likewise. * libgnat/a-cimutr.ads: Likewise. * libgnat/a-ciorma.adb: Likewise. * libgnat/a-ciorma.ads: Likewise. * libgnat/a-ciormu.adb: Likewise. * libgnat/a-ciormu.ads: Likewise. * libgnat/a-ciorse.adb: Likewise. * libgnat/a-ciorse.ads: Likewise. * libgnat/a-clrefi.adb: Likewise. * libgnat/a-clrefi.ads: Likewise. * libgnat/a-coboho.adb: Likewise. * libgnat/a-coboho.ads: Likewise. * libgnat/a-cobove.adb: Likewise. * libgnat/a-cobove.ads: Likewise. * libgnat/a-cofove.adb: Likewise. * libgnat/a-cofove.ads: Likewise. * libgnat/a-cofuba.adb: Likewise. * libgnat/a-cofuba.ads: Likewise. * libgnat/a-cofuma.adb: Likewise. * libgnat/a-cofuma.ads: Likewise. * libgnat/a-cofuse.adb: Likewise. * libgnat/a-cofuse.ads: Likewise. * libgnat/a-cofuve.adb: Likewise. * libgnat/a-cofuve.ads: Likewise. * libgnat/a-cogeso.adb: Likewise. * libgnat/a-cogeso.ads: Likewise. * libgnat/a-cohama.adb: Likewise. * libgnat/a-cohama.ads: Likewise. * libgnat/a-cohase.adb: Likewise. * libgnat/a-cohase.ads: Likewise. * libgnat/a-cohata.ads: Likewise. * libgnat/a-coinho.adb: Likewise. * libgnat/a-coinho.ads: Likewise. * libgnat/a-coinho__shared.adb: Likewise. * libgnat/a-coinho__shared.ads: Likewise. * libgnat/a-coinve.adb: Likewise. * libgnat/a-coinve.ads: Likewise. * libgnat/a-colien.adb: Likewise. * libgnat/a-colien.ads: Likewise. * libgnat/a-colire.adb: Likewise. * libgnat/a-colire.ads: Likewise. * libgnat/a-comlin.adb: Likewise. * libgnat/a-comlin.ads: Likewise. * libgnat/a-comutr.adb: Likewise. * libgnat/a-comutr.ads: Likewise. * libgnat/a-conhel.adb: Likewise. * libgnat/a-conhel.ads: Likewise. * libgnat/a-convec.adb: Likewise. * libgnat/a-convec.ads: Likewise. * libgnat/a-coorma.adb: Likewise. * libgnat/a-coorma.ads: Likewise. * libgnat/a-coormu.adb: Likewise. * libgnat/a-coormu.ads: Likewise. * libgnat/a-coorse.adb: Likewise. * libgnat/a-coorse.ads: Likewise. * libgnat/a-coprnu.adb: Likewise. * libgnat/a-coprnu.ads: Likewise. * libgnat/a-crbltr.ads: Likewise. * libgnat/a-crbtgk.adb: Likewise. * libgnat/a-crbtgk.ads: Likewise. * libgnat/a-crbtgo.adb: Likewise. * libgnat/a-crbtgo.ads: Likewise. * libgnat/a-crdlli.adb: Likewise. * libgnat/a-crdlli.ads: Likewise. * libgnat/a-csquin.ads: Likewise. * libgnat/a-cuprqu.adb: Likewise. * libgnat/a-cuprqu.ads: Likewise. * libgnat/a-cusyqu.adb: Likewise. * libgnat/a-cusyqu.ads: Likewise. * libgnat/a-cwila1.ads: Likewise. * libgnat/a-cwila9.ads: Likewise. * libgnat/a-decima.adb: Likewise. * libgnat/a-decima.ads: Likewise. * libgnat/a-dhfina.adb: Likewise. * libgnat/a-dhfina.ads: Likewise. * libgnat/a-diocst.adb: Likewise. * libgnat/a-diocst.ads: Likewise. * libgnat/a-direct.adb: Likewise. * libgnat/a-direct.ads: Likewise. * libgnat/a-direio.adb: Likewise. * libgnat/a-direio.ads: Likewise. * libgnat/a-dirval.adb: Likewise. * libgnat/a-dirval.ads: Likewise. * libgnat/a-dirval__mingw.adb: Likewise. * libgnat/a-einuoc.adb: Likewise. * libgnat/a-einuoc.ads: Likewise. * libgnat/a-elchha.adb: Likewise. * libgnat/a-elchha.ads: Likewise. * libgnat/a-elchha__vxworks-ppc-full.adb: Likewise. * libgnat/a-envvar.adb: Likewise. * libgnat/a-excach.adb: Likewise. * libgnat/a-except.adb: Likewise. * libgnat/a-except.ads: Likewise. * libgnat/a-excpol.adb: Likewise. * libgnat/a-excpol__abort.adb: Likewise. * libgnat/a-exctra.adb: Likewise. * libgnat/a-exctra.ads: Likewise. * libgnat/a-exexda.adb: Likewise. * libgnat/a-exexpr.adb: Likewise. * libgnat/a-exextr.adb: Likewise. * libgnat/a-exstat.adb: Likewise. * libgnat/a-finali.adb: Likewise. * libgnat/a-finali.ads: Likewise. * libgnat/a-locale.adb: Likewise. * libgnat/a-locale.ads: Likewise. * libgnat/a-nbnbin.adb: Likewise. * libgnat/a-nbnbin__gmp.adb: Likewise. * libgnat/a-nbnbre.adb: Likewise. * libgnat/a-ngcefu.adb: Likewise. * libgnat/a-ngcoar.adb: Likewise. * libgnat/a-ngcoty.adb: Likewise. * libgnat/a-ngcoty.ads: Likewise. * libgnat/a-ngelfu.adb: Likewise. * libgnat/a-ngelfu.ads: Likewise. * libgnat/a-ngrear.adb: Likewise. * libgnat/a-ngrear.ads: Likewise. * libgnat/a-nudira.adb: Likewise. * libgnat/a-nudira.ads: Likewise. * libgnat/a-nuflra.adb: Likewise. * libgnat/a-nuflra.ads: Likewise. * libgnat/a-numaux.ads: Likewise. * libgnat/a-numaux__darwin.adb: Likewise. * libgnat/a-numaux__darwin.ads: Likewise. * libgnat/a-numaux__libc-x86.ads: Likewise. * libgnat/a-numaux__vxworks.ads: Likewise. * libgnat/a-numaux__x86.adb: Likewise. * libgnat/a-numaux__x86.ads: Likewise. * libgnat/a-rbtgbk.adb: Likewise. * libgnat/a-rbtgbk.ads: Likewise. * libgnat/a-rbtgbo.adb: Likewise. * libgnat/a-rbtgbo.ads: Likewise. * libgnat/a-rbtgso.adb: Likewise. * libgnat/a-rbtgso.ads: Likewise. * libgnat/a-sbecin.adb: Likewise. * libgnat/a-sbecin.ads: Likewise. * libgnat/a-sbhcin.adb: Likewise. * libgnat/a-sbhcin.ads: Likewise. * libgnat/a-sblcin.adb: Likewise. * libgnat/a-sblcin.ads: Likewise. * libgnat/a-secain.adb: Likewise. * libgnat/a-secain.ads: Likewise. * libgnat/a-sequio.adb: Likewise. * libgnat/a-sequio.ads: Likewise. * libgnat/a-sfecin.ads: Likewise. * libgnat/a-sfhcin.ads: Likewise. * libgnat/a-sflcin.ads: Likewise. * libgnat/a-shcain.adb: Likewise. * libgnat/a-shcain.ads: Likewise. * libgnat/a-siocst.adb: Likewise. * libgnat/a-siocst.ads: Likewise. * libgnat/a-slcain.adb: Likewise. * libgnat/a-slcain.ads: Likewise. * libgnat/a-ssicst.adb: Likewise. * libgnat/a-ssicst.ads: Likewise. * libgnat/a-stboha.adb: Likewise. * libgnat/a-stmaco.ads: Likewise. * libgnat/a-storio.adb: Likewise. * libgnat/a-strbou.adb: Likewise. * libgnat/a-strbou.ads: Likewise. * libgnat/a-stream.adb: Likewise. * libgnat/a-stream.ads: Likewise. * libgnat/a-strfix.adb: Likewise. * libgnat/a-strhas.adb: Likewise. * libgnat/a-strmap.adb: Likewise. * libgnat/a-strmap.ads: Likewise. * libgnat/a-strsea.adb: Likewise. * libgnat/a-strsea.ads: Likewise. * libgnat/a-strsup.adb: Likewise. * libgnat/a-strsup.ads: Likewise. * libgnat/a-strunb.adb: Likewise. * libgnat/a-strunb.ads: Likewise. * libgnat/a-strunb__shared.adb: Likewise. * libgnat/a-strunb__shared.ads: Likewise. * libgnat/a-ststio.adb: Likewise. * libgnat/a-ststio.ads: Likewise. * libgnat/a-stunau.adb: Likewise. * libgnat/a-stunau.ads: Likewise. * libgnat/a-stunau__shared.adb: Likewise. * libgnat/a-stunha.adb: Likewise. * libgnat/a-stuten.adb: Likewise. * libgnat/a-stwibo.adb: Likewise. * libgnat/a-stwibo.ads: Likewise. * libgnat/a-stwifi.adb: Likewise. * libgnat/a-stwiha.adb: Likewise. * libgnat/a-stwima.adb: Likewise. * libgnat/a-stwima.ads: Likewise. * libgnat/a-stwise.adb: Likewise. * libgnat/a-stwise.ads: Likewise. * libgnat/a-stwisu.adb: Likewise. * libgnat/a-stwisu.ads: Likewise. * libgnat/a-stwiun.adb: Likewise. * libgnat/a-stwiun.ads: Likewise. * libgnat/a-stwiun__shared.adb: Likewise. * libgnat/a-stwiun__shared.ads: Likewise. * libgnat/a-stzbou.adb: Likewise. * libgnat/a-stzbou.ads: Likewise. * libgnat/a-stzfix.adb: Likewise. * libgnat/a-stzhas.adb: Likewise. * libgnat/a-stzmap.adb: Likewise. * libgnat/a-stzmap.ads: Likewise. * libgnat/a-stzsea.adb: Likewise. * libgnat/a-stzsea.ads: Likewise. * libgnat/a-stzsup.adb: Likewise. * libgnat/a-stzsup.ads: Likewise. * libgnat/a-stzunb.adb: Likewise. * libgnat/a-stzunb.ads: Likewise. * libgnat/a-stzunb__shared.adb: Likewise. * libgnat/a-stzunb__shared.ads: Likewise. * libgnat/a-suecin.adb: Likewise. * libgnat/a-suecin.ads: Likewise. * libgnat/a-suenco.adb: Likewise. * libgnat/a-suenst.adb: Likewise. * libgnat/a-suewst.adb: Likewise. * libgnat/a-suezst.adb: Likewise. * libgnat/a-suhcin.adb: Likewise. * libgnat/a-suhcin.ads: Likewise. * libgnat/a-sulcin.adb: Likewise. * libgnat/a-sulcin.ads: Likewise. * libgnat/a-suteio.adb: Likewise. * libgnat/a-suteio.ads: Likewise. * libgnat/a-suteio__shared.adb: Likewise. * libgnat/a-swbwha.adb: Likewise. * libgnat/a-swmwco.ads: Likewise. * libgnat/a-swunau.adb: Likewise. * libgnat/a-swunau.ads: Likewise. * libgnat/a-swunau__shared.adb: Likewise. * libgnat/a-swuwha.adb: Likewise. * libgnat/a-swuwti.adb: Likewise. * libgnat/a-swuwti.ads: Likewise. * libgnat/a-swuwti__shared.adb: Likewise. * libgnat/a-szbzha.adb: Likewise. * libgnat/a-szmzco.ads: Likewise. * libgnat/a-szunau.adb: Likewise. * libgnat/a-szunau.ads: Likewise. * libgnat/a-szunau__shared.adb: Likewise. * libgnat/a-szuzha.adb: Likewise. * libgnat/a-szuzti.adb: Likewise. * libgnat/a-szuzti.ads: Likewise. * libgnat/a-szuzti__shared.adb: Likewise. * libgnat/a-tags.adb: Likewise. * libgnat/a-tags.ads: Likewise. * libgnat/a-teioed.adb: Likewise. * libgnat/a-teioed.ads: Likewise. * libgnat/a-textio.adb: Likewise. * libgnat/a-textio.ads: Likewise. * libgnat/a-tiboio.adb: Likewise. * libgnat/a-ticoau.adb: Likewise. * libgnat/a-ticoau.ads: Likewise. * libgnat/a-ticoio.adb: Likewise. * libgnat/a-ticoio.ads: Likewise. * libgnat/a-tideau.adb: Likewise. * libgnat/a-tideau.ads: Likewise. * libgnat/a-tideio.adb: Likewise. * libgnat/a-tideio.ads: Likewise. * libgnat/a-tienau.adb: Likewise. * libgnat/a-tienau.ads: Likewise. * libgnat/a-tienio.adb: Likewise. * libgnat/a-tifiio.adb: Likewise. * libgnat/a-tiflau.adb: Likewise. * libgnat/a-tiflau.ads: Likewise. * libgnat/a-tiflio.adb: Likewise. * libgnat/a-tiflio.ads: Likewise. * libgnat/a-tigeau.adb: Likewise. * libgnat/a-tigeau.ads: Likewise. * libgnat/a-tigeli.adb: Likewise. * libgnat/a-tiinau.adb: Likewise. * libgnat/a-tiinau.ads: Likewise. * libgnat/a-tiinio.adb: Likewise. * libgnat/a-tiinio.ads: Likewise. * libgnat/a-timoau.adb: Likewise. * libgnat/a-timoau.ads: Likewise. * libgnat/a-timoio.adb: Likewise. * libgnat/a-timoio.ads: Likewise. * libgnat/a-tiocst.adb: Likewise. * libgnat/a-tiocst.ads: Likewise. * libgnat/a-tirsfi.adb: Likewise. * libgnat/a-tirsfi.ads: Likewise. * libgnat/a-titest.adb: Likewise. * libgnat/a-undesu.adb: Likewise. * libgnat/a-wichha.adb: Likewise. * libgnat/a-wichun.adb: Likewise. * libgnat/a-wichun.ads: Likewise. * libgnat/a-witeio.adb: Likewise. * libgnat/a-witeio.ads: Likewise. * libgnat/a-wrstfi.adb: Likewise. * libgnat/a-wrstfi.ads: Likewise. * libgnat/a-wtcoau.adb: Likewise. * libgnat/a-wtcoau.ads: Likewise. * libgnat/a-wtcoio.adb: Likewise. * libgnat/a-wtcstr.adb: Likewise. * libgnat/a-wtcstr.ads: Likewise. * libgnat/a-wtdeau.adb: Likewise. * libgnat/a-wtdeau.ads: Likewise. * libgnat/a-wtdeio.adb: Likewise. * libgnat/a-wtedit.adb: Likewise. * libgnat/a-wtedit.ads: Likewise. * libgnat/a-wtenau.adb: Likewise. * libgnat/a-wtenau.ads: Likewise. * libgnat/a-wtenio.adb: Likewise. * libgnat/a-wtfiio.adb: Likewise. * libgnat/a-wtflau.adb: Likewise. * libgnat/a-wtflau.ads: Likewise. * libgnat/a-wtflio.adb: Likewise. * libgnat/a-wtgeau.adb: Likewise. * libgnat/a-wtgeau.ads: Likewise. * libgnat/a-wtinau.adb: Likewise. * libgnat/a-wtinau.ads: Likewise. * libgnat/a-wtinio.adb: Likewise. * libgnat/a-wtmoau.adb: Likewise. * libgnat/a-wtmoau.ads: Likewise. * libgnat/a-wtmoio.adb: Likewise. * libgnat/a-wtmoio.ads: Likewise. * libgnat/a-wttest.adb: Likewise. * libgnat/a-wwboio.adb: Likewise. * libgnat/a-zchhan.adb: Likewise. * libgnat/a-zchuni.adb: Likewise. * libgnat/a-zchuni.ads: Likewise. * libgnat/a-zrstfi.adb: Likewise. * libgnat/a-zrstfi.ads: Likewise. * libgnat/a-ztcoau.adb: Likewise. * libgnat/a-ztcoio.adb: Likewise. * libgnat/a-ztcstr.adb: Likewise. * libgnat/a-ztcstr.ads: Likewise. * libgnat/a-ztdeau.adb: Likewise. * libgnat/a-ztdeau.ads: Likewise. * libgnat/a-ztdeio.adb: Likewise. * libgnat/a-ztedit.adb: Likewise. * libgnat/a-ztedit.ads: Likewise. * libgnat/a-ztenau.adb: Likewise. * libgnat/a-ztenau.ads: Likewise. * libgnat/a-ztenio.adb: Likewise. * libgnat/a-ztexio.adb: Likewise. * libgnat/a-ztexio.ads: Likewise. * libgnat/a-ztfiio.adb: Likewise. * libgnat/a-ztflau.adb: Likewise. * libgnat/a-ztflau.ads: Likewise. * libgnat/a-ztflio.adb: Likewise. * libgnat/a-ztgeau.adb: Likewise. * libgnat/a-ztgeau.ads: Likewise. * libgnat/a-ztinau.adb: Likewise. * libgnat/a-ztinau.ads: Likewise. * libgnat/a-ztinio.adb: Likewise. * libgnat/a-ztmoau.adb: Likewise. * libgnat/a-ztmoau.ads: Likewise. * libgnat/a-ztmoio.adb: Likewise. * libgnat/a-zttest.adb: Likewise. * libgnat/a-zzboio.adb: Likewise. * libgnat/g-allein.ads: Likewise. * libgnat/g-alleve.adb: Likewise. * libgnat/g-alleve.ads: Likewise. * libgnat/g-alleve__hard.adb: Likewise. * libgnat/g-alleve__hard.ads: Likewise. * libgnat/g-altcon.adb: Likewise. * libgnat/g-altcon.ads: Likewise. * libgnat/g-altive.ads: Likewise. * libgnat/g-alveop.adb: Likewise. * libgnat/g-alveop.ads: Likewise. * libgnat/g-alvety.ads: Likewise. * libgnat/g-alvevi.ads: Likewise. * libgnat/g-arrspl.adb: Likewise. * libgnat/g-arrspl.ads: Likewise. * libgnat/g-awk.adb: Likewise. * libgnat/g-awk.ads: Likewise. * libgnat/g-binenv.adb: Likewise. * libgnat/g-binenv.ads: Likewise. * libgnat/g-brapre.ads: Likewise. * libgnat/g-bubsor.adb: Likewise. * libgnat/g-bubsor.ads: Likewise. * libgnat/g-busora.adb: Likewise. * libgnat/g-busora.ads: Likewise. * libgnat/g-busorg.adb: Likewise. * libgnat/g-busorg.ads: Likewise. * libgnat/g-byorma.adb: Likewise. * libgnat/g-byorma.ads: Likewise. * libgnat/g-bytswa.adb: Likewise. * libgnat/g-bytswa.ads: Likewise. * libgnat/g-calend.adb: Likewise. * libgnat/g-calend.ads: Likewise. * libgnat/g-casuti.adb: Likewise. * libgnat/g-casuti.ads: Likewise. * libgnat/g-catiio.adb: Likewise. * libgnat/g-catiio.ads: Likewise. * libgnat/g-cgi.adb: Likewise. * libgnat/g-cgi.ads: Likewise. * libgnat/g-cgicoo.adb: Likewise. * libgnat/g-cgicoo.ads: Likewise. * libgnat/g-cgideb.adb: Likewise. * libgnat/g-cgideb.ads: Likewise. * libgnat/g-comlin.adb: Likewise. * libgnat/g-comlin.ads: Likewise. * libgnat/g-comver.adb: Likewise. * libgnat/g-comver.ads: Likewise. * libgnat/g-cppexc.adb: Likewise. * libgnat/g-cppexc.ads: Likewise. * libgnat/g-crc32.adb: Likewise. * libgnat/g-crc32.ads: Likewise. * libgnat/g-ctrl_c.adb: Likewise. * libgnat/g-ctrl_c.ads: Likewise. * libgnat/g-curexc.ads: Likewise. * libgnat/g-debpoo.adb: Likewise. * libgnat/g-debpoo.ads: Likewise. * libgnat/g-debuti.adb: Likewise. * libgnat/g-debuti.ads: Likewise. * libgnat/g-decstr.adb: Likewise. * libgnat/g-decstr.ads: Likewise. * libgnat/g-deutst.ads: Likewise. * libgnat/g-diopit.adb: Likewise. * libgnat/g-diopit.ads: Likewise. * libgnat/g-dirope.adb: Likewise. * libgnat/g-dirope.ads: Likewise. * libgnat/g-dynhta.adb: Likewise. * libgnat/g-dynhta.ads: Likewise. * libgnat/g-dyntab.adb: Likewise. * libgnat/g-dyntab.ads: Likewise. * libgnat/g-eacodu.adb: Likewise. * libgnat/g-encstr.adb: Likewise. * libgnat/g-encstr.ads: Likewise. * libgnat/g-enutst.ads: Likewise. * libgnat/g-excact.adb: Likewise. * libgnat/g-excact.ads: Likewise. * libgnat/g-except.ads: Likewise. * libgnat/g-exctra.adb: Likewise. * libgnat/g-exctra.ads: Likewise. * libgnat/g-expect.adb: Likewise. * libgnat/g-expect.ads: Likewise. * libgnat/g-exptty.adb: Likewise. * libgnat/g-exptty.ads: Likewise. * libgnat/g-flocon.ads: Likewise. * libgnat/g-forstr.adb: Likewise. * libgnat/g-forstr.ads: Likewise. * libgnat/g-graphs.adb: Likewise. * libgnat/g-graphs.ads: Likewise. * libgnat/g-heasor.adb: Likewise. * libgnat/g-heasor.ads: Likewise. * libgnat/g-hesora.adb: Likewise. * libgnat/g-hesora.ads: Likewise. * libgnat/g-hesorg.adb: Likewise. * libgnat/g-hesorg.ads: Likewise. * libgnat/g-htable.adb: Likewise. * libgnat/g-htable.ads: Likewise. * libgnat/g-io-put__vxworks.adb: Likewise. * libgnat/g-io.adb: Likewise. * libgnat/g-io.ads: Likewise. * libgnat/g-io_aux.adb: Likewise. * libgnat/g-io_aux.ads: Likewise. * libgnat/g-lists.adb: Likewise. * libgnat/g-lists.ads: Likewise. * libgnat/g-locfil.adb: Likewise. * libgnat/g-locfil.ads: Likewise. * libgnat/g-mbdira.adb: Likewise. * libgnat/g-mbdira.ads: Likewise. * libgnat/g-mbflra.adb: Likewise. * libgnat/g-mbflra.ads: Likewise. * libgnat/g-md5.adb: Likewise. * libgnat/g-md5.ads: Likewise. * libgnat/g-memdum.adb: Likewise. * libgnat/g-memdum.ads: Likewise. * libgnat/g-moreex.adb: Likewise. * libgnat/g-moreex.ads: Likewise. * libgnat/g-os_lib.adb: Likewise. * libgnat/g-os_lib.ads: Likewise. * libgnat/g-pehage.adb: Likewise. * libgnat/g-pehage.ads: Likewise. * libgnat/g-rannum.adb: Likewise. * libgnat/g-rannum.ads: Likewise. * libgnat/g-regexp.adb: Likewise. * libgnat/g-regexp.ads: Likewise. * libgnat/g-regist.adb: Likewise. * libgnat/g-regist.ads: Likewise. * libgnat/g-regpat.adb: Likewise. * libgnat/g-regpat.ads: Likewise. * libgnat/g-rewdat.adb: Likewise. * libgnat/g-rewdat.ads: Likewise. * libgnat/g-sechas.adb: Likewise. * libgnat/g-sechas.ads: Likewise. * libgnat/g-sehamd.adb: Likewise. * libgnat/g-sehamd.ads: Likewise. * libgnat/g-sehash.adb: Likewise. * libgnat/g-sehash.ads: Likewise. * libgnat/g-sercom.adb: Likewise. * libgnat/g-sercom.ads: Likewise. * libgnat/g-sercom__linux.adb: Likewise. * libgnat/g-sercom__mingw.adb: Likewise. * libgnat/g-sestin.ads: Likewise. * libgnat/g-sets.adb: Likewise. * libgnat/g-sets.ads: Likewise. * libgnat/g-sha1.adb: Likewise. * libgnat/g-sha1.ads: Likewise. * libgnat/g-sha224.ads: Likewise. * libgnat/g-sha256.ads: Likewise. * libgnat/g-sha384.ads: Likewise. * libgnat/g-sha512.ads: Likewise. * libgnat/g-shsh32.adb: Likewise. * libgnat/g-shsh32.ads: Likewise. * libgnat/g-shsh64.adb: Likewise. * libgnat/g-shsh64.ads: Likewise. * libgnat/g-shshco.adb: Likewise. * libgnat/g-shshco.ads: Likewise. * libgnat/g-soccon.ads: Likewise. * libgnat/g-socket.adb: Likewise. * libgnat/g-socket.ads: Likewise. * libgnat/g-socket__dummy.adb: Likewise. * libgnat/g-socket__dummy.ads: Likewise. * libgnat/g-socthi.adb: Likewise. * libgnat/g-socthi.ads: Likewise. * libgnat/g-socthi__dummy.adb: Likewise. * libgnat/g-socthi__dummy.ads: Likewise. * libgnat/g-socthi__mingw.adb: Likewise. * libgnat/g-socthi__mingw.ads: Likewise. * libgnat/g-socthi__vxworks.adb: Likewise. * libgnat/g-socthi__vxworks.ads: Likewise. * libgnat/g-soliop.ads: Likewise. * libgnat/g-soliop__lynxos.ads: Likewise. * libgnat/g-soliop__mingw.ads: Likewise. * libgnat/g-soliop__qnx.ads: Likewise. * libgnat/g-soliop__solaris.ads: Likewise. * libgnat/g-sothco.adb: Likewise. * libgnat/g-sothco.ads: Likewise. * libgnat/g-sothco__dummy.adb: Likewise. * libgnat/g-sothco__dummy.ads: Likewise. * libgnat/g-souinf.ads: Likewise. * libgnat/g-spchge.adb: Likewise. * libgnat/g-spchge.ads: Likewise. * libgnat/g-speche.adb: Likewise. * libgnat/g-speche.ads: Likewise. * libgnat/g-spipat.adb: Likewise. * libgnat/g-spipat.ads: Likewise. * libgnat/g-spitbo.adb: Likewise. * libgnat/g-spitbo.ads: Likewise. * libgnat/g-sptabo.ads: Likewise. * libgnat/g-sptain.ads: Likewise. * libgnat/g-sptavs.ads: Likewise. * libgnat/g-sse.ads: Likewise. * libgnat/g-ssvety.ads: Likewise. * libgnat/g-sthcso.adb: Likewise. * libgnat/g-stheme.adb: Likewise. * libgnat/g-strhas.ads: Likewise. * libgnat/g-string.adb: Likewise. * libgnat/g-string.ads: Likewise. * libgnat/g-strspl.ads: Likewise. * libgnat/g-stseme.adb: Likewise. * libgnat/g-stsifd__sockets.adb: Likewise. * libgnat/g-table.adb: Likewise. * libgnat/g-table.ads: Likewise. * libgnat/g-tasloc.adb: Likewise. * libgnat/g-tasloc.ads: Likewise. * libgnat/g-timsta.adb: Likewise. * libgnat/g-timsta.ads: Likewise. * libgnat/g-traceb.adb: Likewise. * libgnat/g-traceb.ads: Likewise. * libgnat/g-trasym.adb: Likewise. * libgnat/g-trasym.ads: Likewise. * libgnat/g-tty.adb: Likewise. * libgnat/g-tty.ads: Likewise. * libgnat/g-u3spch.adb: Likewise. * libgnat/g-u3spch.ads: Likewise. * libgnat/g-utf_32.adb: Likewise. * libgnat/g-utf_32.ads: Likewise. * libgnat/g-wispch.adb: Likewise. * libgnat/g-wispch.ads: Likewise. * libgnat/g-wistsp.ads: Likewise. * libgnat/g-zspche.adb: Likewise. * libgnat/g-zspche.ads: Likewise. * libgnat/g-zstspl.ads: Likewise. * libgnat/gnat.ads: Likewise. * libgnat/i-c.adb: Likewise. * libgnat/i-cexten.ads: Likewise. * libgnat/i-cobol.adb: Likewise. * libgnat/i-cobol.ads: Likewise. * libgnat/i-cpoint.adb: Likewise. * libgnat/i-cpoint.ads: Likewise. * libgnat/i-cstrea.adb: Likewise. * libgnat/i-cstrea.ads: Likewise. * libgnat/i-cstrin.adb: Likewise. * libgnat/i-cstrin.ads: Likewise. * libgnat/i-fortra.adb: Likewise. * libgnat/i-pacdec.adb: Likewise. * libgnat/i-pacdec.ads: Likewise. * libgnat/i-vxwoio.adb: Likewise. * libgnat/i-vxwoio.ads: Likewise. * libgnat/i-vxwork.ads: Likewise. * libgnat/i-vxwork__x86.ads: Likewise. * libgnat/interfac.ads: Likewise. * libgnat/memtrack.adb: Likewise. * libgnat/s-addima.adb: Likewise. * libgnat/s-addima.ads: Likewise. * libgnat/s-addope.adb: Likewise. * libgnat/s-addope.ads: Likewise. * libgnat/s-aotase.adb: Likewise. * libgnat/s-aotase.ads: Likewise. * libgnat/s-arit64.adb: Likewise. * libgnat/s-arit64.ads: Likewise. * libgnat/s-assert.adb: Likewise. * libgnat/s-assert.ads: Likewise. * libgnat/s-atacco.adb: Likewise. * libgnat/s-atacco.ads: Likewise. * libgnat/s-atocou.adb: Likewise. * libgnat/s-atocou.ads: Likewise. * libgnat/s-atocou__builtin.adb: Likewise. * libgnat/s-atocou__x86.adb: Likewise. * libgnat/s-atoope.ads: Likewise. * libgnat/s-atopar.adb: Likewise. * libgnat/s-atopar.ads: Likewise. * libgnat/s-atopex.adb: Likewise. * libgnat/s-atopex.ads: Likewise. * libgnat/s-atopri.adb: Likewise. * libgnat/s-atopri.ads: Likewise. * libgnat/s-auxdec.adb: Likewise. * libgnat/s-auxdec.ads: Likewise. * libgnat/s-bignum.adb: Likewise. * libgnat/s-bignum.ads: Likewise. * libgnat/s-bitfie.ads: Likewise. * libgnat/s-bitops.adb: Likewise. * libgnat/s-bitops.ads: Likewise. * libgnat/s-bituti.adb: Likewise. * libgnat/s-bituti.ads: Likewise. * libgnat/s-boarop.ads: Likewise. * libgnat/s-boustr.adb: Likewise. * libgnat/s-boustr.ads: Likewise. * libgnat/s-bytswa.ads: Likewise. * libgnat/s-carsi8.adb: Likewise. * libgnat/s-carsi8.ads: Likewise. * libgnat/s-carun8.adb: Likewise. * libgnat/s-carun8.ads: Likewise. * libgnat/s-casi16.adb: Likewise. * libgnat/s-casi16.ads: Likewise. * libgnat/s-casi32.adb: Likewise. * libgnat/s-casi32.ads: Likewise. * libgnat/s-casi64.adb: Likewise. * libgnat/s-casi64.ads: Likewise. * libgnat/s-casuti.adb: Likewise. * libgnat/s-casuti.ads: Likewise. * libgnat/s-caun16.adb: Likewise. * libgnat/s-caun16.ads: Likewise. * libgnat/s-caun32.adb: Likewise. * libgnat/s-caun32.ads: Likewise. * libgnat/s-caun64.adb: Likewise. * libgnat/s-caun64.ads: Likewise. * libgnat/s-chepoo.ads: Likewise. * libgnat/s-commun.adb: Likewise. * libgnat/s-commun.ads: Likewise. * libgnat/s-conca2.adb: Likewise. * libgnat/s-conca2.ads: Likewise. * libgnat/s-conca3.adb: Likewise. * libgnat/s-conca3.ads: Likewise. * libgnat/s-conca4.adb: Likewise. * libgnat/s-conca4.ads: Likewise. * libgnat/s-conca5.adb: Likewise. * libgnat/s-conca5.ads: Likewise. * libgnat/s-conca6.adb: Likewise. * libgnat/s-conca6.ads: Likewise. * libgnat/s-conca7.adb: Likewise. * libgnat/s-conca7.ads: Likewise. * libgnat/s-conca8.adb: Likewise. * libgnat/s-conca8.ads: Likewise. * libgnat/s-conca9.adb: Likewise. * libgnat/s-conca9.ads: Likewise. * libgnat/s-crc32.adb: Likewise. * libgnat/s-crc32.ads: Likewise. * libgnat/s-crtl.ads: Likewise. * libgnat/s-dfmkio.ads: Likewise. * libgnat/s-dfmopr.ads: Likewise. * libgnat/s-dgmgop.ads: Likewise. * libgnat/s-diflio.adb: Likewise. * libgnat/s-diflio.ads: Likewise. * libgnat/s-diflmk.ads: Likewise. * libgnat/s-digemk.ads: Likewise. * libgnat/s-diinio.adb: Likewise. * libgnat/s-diinio.ads: Likewise. * libgnat/s-dilomk.ads: Likewise. * libgnat/s-dim.ads: Likewise. * libgnat/s-dimkio.ads: Likewise. * libgnat/s-dimmks.ads: Likewise. * libgnat/s-direio.adb: Likewise. * libgnat/s-direio.ads: Likewise. * libgnat/s-dlmkio.ads: Likewise. * libgnat/s-dlmopr.ads: Likewise. * libgnat/s-dmotpr.ads: Likewise. * libgnat/s-dsaser.ads: Likewise. * libgnat/s-dwalin.adb: Likewise. * libgnat/s-dwalin.ads: Likewise. * libgnat/s-elaall.adb: Likewise. * libgnat/s-elaall.ads: Likewise. * libgnat/s-excdeb.adb: Likewise. * libgnat/s-excdeb.ads: Likewise. * libgnat/s-except.adb: Likewise. * libgnat/s-except.ads: Likewise. * libgnat/s-excmac__arm.adb: Likewise. * libgnat/s-excmac__arm.ads: Likewise. * libgnat/s-excmac__gcc.adb: Likewise. * libgnat/s-excmac__gcc.ads: Likewise. * libgnat/s-exctab.adb: Likewise. * libgnat/s-exctab.ads: Likewise. * libgnat/s-exctra.adb: Likewise. * libgnat/s-exctra.ads: Likewise. * libgnat/s-exnint.adb: Likewise. * libgnat/s-exnint.ads: Likewise. * libgnat/s-exnllf.adb: Likewise. * libgnat/s-exnllf.ads: Likewise. * libgnat/s-exnlli.adb: Likewise. * libgnat/s-exnlli.ads: Likewise. * libgnat/s-expint.adb: Likewise. * libgnat/s-expint.ads: Likewise. * libgnat/s-explli.adb: Likewise. * libgnat/s-explli.ads: Likewise. * libgnat/s-expllu.adb: Likewise. * libgnat/s-expllu.ads: Likewise. * libgnat/s-expmod.adb: Likewise. * libgnat/s-expmod.ads: Likewise. * libgnat/s-expuns.adb: Likewise. * libgnat/s-expuns.ads: Likewise. * libgnat/s-fatflt.ads: Likewise. * libgnat/s-fatgen.adb: Likewise. * libgnat/s-fatgen.ads: Likewise. * libgnat/s-fatlfl.ads: Likewise. * libgnat/s-fatllf.ads: Likewise. * libgnat/s-fatsfl.ads: Likewise. * libgnat/s-ficobl.ads: Likewise. * libgnat/s-filatt.ads: Likewise. * libgnat/s-fileio.adb: Likewise. * libgnat/s-fileio.ads: Likewise. * libgnat/s-finmas.adb: Likewise. * libgnat/s-finmas.ads: Likewise. * libgnat/s-finroo.adb: Likewise. * libgnat/s-finroo.ads: Likewise. * libgnat/s-flocon.adb: Likewise. * libgnat/s-flocon.ads: Likewise. * libgnat/s-flocon__none.adb: Likewise. * libgnat/s-fore.adb: Likewise. * libgnat/s-fore.ads: Likewise. * libgnat/s-gearop.adb: Likewise. * libgnat/s-gearop.ads: Likewise. * libgnat/s-genbig.adb: Likewise. * libgnat/s-genbig.ads: Likewise. * libgnat/s-geveop.adb: Likewise. * libgnat/s-geveop.ads: Likewise. * libgnat/s-gloloc.adb: Likewise. * libgnat/s-gloloc.ads: Likewise. * libgnat/s-gloloc__mingw.adb: Likewise. * libgnat/s-htable.adb: Likewise. * libgnat/s-htable.ads: Likewise. * libgnat/s-imenne.adb: Likewise. * libgnat/s-imenne.ads: Likewise. * libgnat/s-imgbiu.adb: Likewise. * libgnat/s-imgbiu.ads: Likewise. * libgnat/s-imgboo.adb: Likewise. * libgnat/s-imgboo.ads: Likewise. * libgnat/s-imgcha.adb: Likewise. * libgnat/s-imgcha.ads: Likewise. * libgnat/s-imgdec.adb: Likewise. * libgnat/s-imgdec.ads: Likewise. * libgnat/s-imgenu.adb: Likewise. * libgnat/s-imgenu.ads: Likewise. * libgnat/s-imgint.adb: Likewise. * libgnat/s-imgint.ads: Likewise. * libgnat/s-imgllb.adb: Likewise. * libgnat/s-imgllb.ads: Likewise. * libgnat/s-imglld.adb: Likewise. * libgnat/s-imglld.ads: Likewise. * libgnat/s-imglli.adb: Likewise. * libgnat/s-imglli.ads: Likewise. * libgnat/s-imgllu.adb: Likewise. * libgnat/s-imgllu.ads: Likewise. * libgnat/s-imgllw.adb: Likewise. * libgnat/s-imgllw.ads: Likewise. * libgnat/s-imgrea.adb: Likewise. * libgnat/s-imgrea.ads: Likewise. * libgnat/s-imguns.adb: Likewise. * libgnat/s-imguns.ads: Likewise. * libgnat/s-imgwch.adb: Likewise. * libgnat/s-imgwch.ads: Likewise. * libgnat/s-imgwiu.adb: Likewise. * libgnat/s-imgwiu.ads: Likewise. * libgnat/s-io.adb: Likewise. * libgnat/s-io.ads: Likewise. * libgnat/s-llflex.ads: Likewise. * libgnat/s-maccod.ads: Likewise. * libgnat/s-mantis.adb: Likewise. * libgnat/s-mantis.ads: Likewise. * libgnat/s-mastop.adb: Likewise. * libgnat/s-mastop.ads: Likewise. * libgnat/s-memcop.ads: Likewise. * libgnat/s-memory.adb: Likewise. * libgnat/s-memory.ads: Likewise. * libgnat/s-mmap.adb: Likewise. * libgnat/s-mmap.ads: Likewise. * libgnat/s-mmauni__long.ads: Likewise. * libgnat/s-mmosin__mingw.adb: Likewise. * libgnat/s-mmosin__mingw.ads: Likewise. * libgnat/s-mmosin__unix.adb: Likewise. * libgnat/s-mmosin__unix.ads: Likewise. * libgnat/s-multip.adb: Likewise. * libgnat/s-objrea.adb: Likewise. * libgnat/s-objrea.ads: Likewise. * libgnat/s-optide.adb: Likewise. * libgnat/s-os_lib.adb: Likewise. * libgnat/s-os_lib.ads: Likewise. * libgnat/s-osprim.ads: Likewise. * libgnat/s-osprim__darwin.adb: Likewise. * libgnat/s-osprim__lynxos.ads: Likewise. * libgnat/s-osprim__mingw.adb: Likewise. * libgnat/s-osprim__posix.adb: Likewise. * libgnat/s-osprim__posix2008.adb: Likewise. * libgnat/s-osprim__rtems.adb: Likewise. * libgnat/s-osprim__solaris.adb: Likewise. * libgnat/s-osprim__unix.adb: Likewise. * libgnat/s-osprim__vxworks.adb: Likewise. * libgnat/s-osprim__x32.adb: Likewise. * libgnat/s-osvers__vxworks-653.ads: Likewise. * libgnat/s-pack03.adb: Likewise. * libgnat/s-pack03.ads: Likewise. * libgnat/s-pack05.adb: Likewise. * libgnat/s-pack05.ads: Likewise. * libgnat/s-pack06.adb: Likewise. * libgnat/s-pack06.ads: Likewise. * libgnat/s-pack07.adb: Likewise. * libgnat/s-pack07.ads: Likewise. * libgnat/s-pack09.adb: Likewise. * libgnat/s-pack09.ads: Likewise. * libgnat/s-pack10.adb: Likewise. * libgnat/s-pack10.ads: Likewise. * libgnat/s-pack11.adb: Likewise. * libgnat/s-pack11.ads: Likewise. * libgnat/s-pack12.adb: Likewise. * libgnat/s-pack12.ads: Likewise. * libgnat/s-pack13.adb: Likewise. * libgnat/s-pack13.ads: Likewise. * libgnat/s-pack14.adb: Likewise. * libgnat/s-pack14.ads: Likewise. * libgnat/s-pack15.adb: Likewise. * libgnat/s-pack15.ads: Likewise. * libgnat/s-pack17.adb: Likewise. * libgnat/s-pack17.ads: Likewise. * libgnat/s-pack18.adb: Likewise. * libgnat/s-pack18.ads: Likewise. * libgnat/s-pack19.adb: Likewise. * libgnat/s-pack19.ads: Likewise. * libgnat/s-pack20.adb: Likewise. * libgnat/s-pack20.ads: Likewise. * libgnat/s-pack21.adb: Likewise. * libgnat/s-pack21.ads: Likewise. * libgnat/s-pack22.adb: Likewise. * libgnat/s-pack22.ads: Likewise. * libgnat/s-pack23.adb: Likewise. * libgnat/s-pack23.ads: Likewise. * libgnat/s-pack24.adb: Likewise. * libgnat/s-pack24.ads: Likewise. * libgnat/s-pack25.adb: Likewise. * libgnat/s-pack25.ads: Likewise. * libgnat/s-pack26.adb: Likewise. * libgnat/s-pack26.ads: Likewise. * libgnat/s-pack27.adb: Likewise. * libgnat/s-pack27.ads: Likewise. * libgnat/s-pack28.adb: Likewise. * libgnat/s-pack28.ads: Likewise. * libgnat/s-pack29.adb: Likewise. * libgnat/s-pack29.ads: Likewise. * libgnat/s-pack30.adb: Likewise. * libgnat/s-pack30.ads: Likewise. * libgnat/s-pack31.adb: Likewise. * libgnat/s-pack31.ads: Likewise. * libgnat/s-pack33.adb: Likewise. * libgnat/s-pack33.ads: Likewise. * libgnat/s-pack34.adb: Likewise. * libgnat/s-pack34.ads: Likewise. * libgnat/s-pack35.adb: Likewise. * libgnat/s-pack35.ads: Likewise. * libgnat/s-pack36.adb: Likewise. * libgnat/s-pack36.ads: Likewise. * libgnat/s-pack37.adb: Likewise. * libgnat/s-pack37.ads: Likewise. * libgnat/s-pack38.adb: Likewise. * libgnat/s-pack38.ads: Likewise. * libgnat/s-pack39.adb: Likewise. * libgnat/s-pack39.ads: Likewise. * libgnat/s-pack40.adb: Likewise. * libgnat/s-pack40.ads: Likewise. * libgnat/s-pack41.adb: Likewise. * libgnat/s-pack41.ads: Likewise. * libgnat/s-pack42.adb: Likewise. * libgnat/s-pack42.ads: Likewise. * libgnat/s-pack43.adb: Likewise. * libgnat/s-pack43.ads: Likewise. * libgnat/s-pack44.adb: Likewise. * libgnat/s-pack44.ads: Likewise. * libgnat/s-pack45.adb: Likewise. * libgnat/s-pack45.ads: Likewise. * libgnat/s-pack46.adb: Likewise. * libgnat/s-pack46.ads: Likewise. * libgnat/s-pack47.adb: Likewise. * libgnat/s-pack47.ads: Likewise. * libgnat/s-pack48.adb: Likewise. * libgnat/s-pack48.ads: Likewise. * libgnat/s-pack49.adb: Likewise. * libgnat/s-pack49.ads: Likewise. * libgnat/s-pack50.adb: Likewise. * libgnat/s-pack50.ads: Likewise. * libgnat/s-pack51.adb: Likewise. * libgnat/s-pack51.ads: Likewise. * libgnat/s-pack52.adb: Likewise. * libgnat/s-pack52.ads: Likewise. * libgnat/s-pack53.adb: Likewise. * libgnat/s-pack53.ads: Likewise. * libgnat/s-pack54.adb: Likewise. * libgnat/s-pack54.ads: Likewise. * libgnat/s-pack55.adb: Likewise. * libgnat/s-pack55.ads: Likewise. * libgnat/s-pack56.adb: Likewise. * libgnat/s-pack56.ads: Likewise. * libgnat/s-pack57.adb: Likewise. * libgnat/s-pack57.ads: Likewise. * libgnat/s-pack58.adb: Likewise. * libgnat/s-pack58.ads: Likewise. * libgnat/s-pack59.adb: Likewise. * libgnat/s-pack59.ads: Likewise. * libgnat/s-pack60.adb: Likewise. * libgnat/s-pack60.ads: Likewise. * libgnat/s-pack61.adb: Likewise. * libgnat/s-pack61.ads: Likewise. * libgnat/s-pack62.adb: Likewise. * libgnat/s-pack62.ads: Likewise. * libgnat/s-pack63.adb: Likewise. * libgnat/s-pack63.ads: Likewise. * libgnat/s-parame.adb: Likewise. * libgnat/s-parame.ads: Likewise. * libgnat/s-parame__ae653.ads: Likewise. * libgnat/s-parame__hpux.ads: Likewise. * libgnat/s-parame__rtems.adb: Likewise. * libgnat/s-parame__vxworks.adb: Likewise. * libgnat/s-parame__vxworks.ads: Likewise. * libgnat/s-parint.adb: Likewise. * libgnat/s-parint.ads: Likewise. * libgnat/s-pooglo.adb: Likewise. * libgnat/s-pooglo.ads: Likewise. * libgnat/s-pooloc.adb: Likewise. * libgnat/s-pooloc.ads: Likewise. * libgnat/s-poosiz.adb: Likewise. * libgnat/s-poosiz.ads: Likewise. * libgnat/s-powtab.ads: Likewise. * libgnat/s-purexc.ads: Likewise. * libgnat/s-rannum.adb: Likewise. * libgnat/s-rannum.ads: Likewise. * libgnat/s-ransee.adb: Likewise. * libgnat/s-ransee.ads: Likewise. * libgnat/s-regexp.adb: Likewise. * libgnat/s-regexp.ads: Likewise. * libgnat/s-regpat.adb: Likewise. * libgnat/s-regpat.ads: Likewise. * libgnat/s-resfil.adb: Likewise. * libgnat/s-resfil.ads: Likewise. * libgnat/s-restri.adb: Likewise. * libgnat/s-restri.ads: Likewise. * libgnat/s-rident.ads: Likewise. * libgnat/s-rpc.adb: Likewise. * libgnat/s-rpc.ads: Likewise. * libgnat/s-scaval.adb: Likewise. * libgnat/s-scaval.ads: Likewise. * libgnat/s-secsta.adb: Likewise. * libgnat/s-secsta.ads: Likewise. * libgnat/s-sequio.adb: Likewise. * libgnat/s-sequio.ads: Likewise. * libgnat/s-shasto.adb: Likewise. * libgnat/s-shasto.ads: Likewise. * libgnat/s-soflin.adb: Likewise. * libgnat/s-soflin.ads: Likewise. * libgnat/s-soliin.adb: Likewise. * libgnat/s-soliin.ads: Likewise. * libgnat/s-sopco3.adb: Likewise. * libgnat/s-sopco3.ads: Likewise. * libgnat/s-sopco4.adb: Likewise. * libgnat/s-sopco4.ads: Likewise. * libgnat/s-sopco5.adb: Likewise. * libgnat/s-sopco5.ads: Likewise. * libgnat/s-spsufi.adb: Likewise. * libgnat/s-spsufi.ads: Likewise. * libgnat/s-stache.adb: Likewise. * libgnat/s-stache.ads: Likewise. * libgnat/s-stalib.adb: Likewise. * libgnat/s-stalib.ads: Likewise. * libgnat/s-stausa.adb: Likewise. * libgnat/s-stausa.ads: Likewise. * libgnat/s-stchop.adb: Likewise. * libgnat/s-stchop.ads: Likewise. * libgnat/s-stchop__limit.ads: Likewise. * libgnat/s-stchop__rtems.adb: Likewise. * libgnat/s-stchop__vxworks.adb: Likewise. * libgnat/s-stoele.adb: Likewise. * libgnat/s-stoele.ads: Likewise. * libgnat/s-stopoo.adb: Likewise. * libgnat/s-stopoo.ads: Likewise. * libgnat/s-stposu.adb: Likewise. * libgnat/s-stposu.ads: Likewise. * libgnat/s-stratt.adb: Likewise. * libgnat/s-stratt.ads: Likewise. * libgnat/s-stratt__xdr.adb: Likewise. * libgnat/s-strcom.adb: Likewise. * libgnat/s-strcom.ads: Likewise. * libgnat/s-strhas.adb: Likewise. * libgnat/s-strhas.ads: Likewise. * libgnat/s-string.adb: Likewise. * libgnat/s-string.ads: Likewise. * libgnat/s-strops.adb: Likewise. * libgnat/s-strops.ads: Likewise. * libgnat/s-ststop.adb: Likewise. * libgnat/s-ststop.ads: Likewise. * libgnat/s-tasloc.adb: Likewise. * libgnat/s-tasloc.ads: Likewise. * libgnat/s-thread.ads: Likewise. * libgnat/s-thread__ae653.adb: Likewise. * libgnat/s-traceb.adb: Likewise. * libgnat/s-traceb.ads: Likewise. * libgnat/s-traceb__hpux.adb: Likewise. * libgnat/s-traceb__mastop.adb: Likewise. * libgnat/s-traent.adb: Likewise. * libgnat/s-traent.ads: Likewise. * libgnat/s-trasym.adb: Likewise. * libgnat/s-trasym.ads: Likewise. * libgnat/s-trasym__dwarf.adb: Likewise. * libgnat/s-tsmona.adb: Likewise. * libgnat/s-tsmona__linux.adb: Likewise. * libgnat/s-tsmona__mingw.adb: Likewise. * libgnat/s-unstyp.ads: Likewise. * libgnat/s-utf_32.adb: Likewise. * libgnat/s-utf_32.ads: Likewise. * libgnat/s-valboo.adb: Likewise. * libgnat/s-valboo.ads: Likewise. * libgnat/s-valcha.adb: Likewise. * libgnat/s-valcha.ads: Likewise. * libgnat/s-valdec.adb: Likewise. * libgnat/s-valdec.ads: Likewise. * libgnat/s-valenu.adb: Likewise. * libgnat/s-valenu.ads: Likewise. * libgnat/s-valint.adb: Likewise. * libgnat/s-valint.ads: Likewise. * libgnat/s-vallld.adb: Likewise. * libgnat/s-vallld.ads: Likewise. * libgnat/s-vallli.adb: Likewise. * libgnat/s-vallli.ads: Likewise. * libgnat/s-valllu.adb: Likewise. * libgnat/s-valllu.ads: Likewise. * libgnat/s-valrea.adb: Likewise. * libgnat/s-valrea.ads: Likewise. * libgnat/s-valuns.adb: Likewise. * libgnat/s-valuns.ads: Likewise. * libgnat/s-valuti.adb: Likewise. * libgnat/s-valuti.ads: Likewise. * libgnat/s-valwch.adb: Likewise. * libgnat/s-valwch.ads: Likewise. * libgnat/s-veboop.adb: Likewise. * libgnat/s-veboop.ads: Likewise. * libgnat/s-vector.ads: Likewise. * libgnat/s-vercon.adb: Likewise. * libgnat/s-vercon.ads: Likewise. * libgnat/s-wchcnv.adb: Likewise. * libgnat/s-wchcnv.ads: Likewise. * libgnat/s-wchcon.adb: Likewise. * libgnat/s-wchcon.ads: Likewise. * libgnat/s-wchjis.adb: Likewise. * libgnat/s-wchjis.ads: Likewise. * libgnat/s-wchstw.adb: Likewise. * libgnat/s-wchstw.ads: Likewise. * libgnat/s-wchwts.adb: Likewise. * libgnat/s-wchwts.ads: Likewise. * libgnat/s-widboo.adb: Likewise. * libgnat/s-widboo.ads: Likewise. * libgnat/s-widcha.adb: Likewise. * libgnat/s-widcha.ads: Likewise. * libgnat/s-widenu.adb: Likewise. * libgnat/s-widenu.ads: Likewise. * libgnat/s-widlli.adb: Likewise. * libgnat/s-widlli.ads: Likewise. * libgnat/s-widllu.adb: Likewise. * libgnat/s-widllu.ads: Likewise. * libgnat/s-widwch.adb: Likewise. * libgnat/s-widwch.ads: Likewise. * libgnat/s-win32.ads: Likewise. * libgnat/s-winext.ads: Likewise. * libgnat/s-wwdcha.adb: Likewise. * libgnat/s-wwdcha.ads: Likewise. * libgnat/s-wwdenu.adb: Likewise. * libgnat/s-wwdenu.ads: Likewise. * libgnat/s-wwdwch.adb: Likewise. * libgnat/s-wwdwch.ads: Likewise. * libgnat/system-aix.ads: Likewise. * libgnat/system-darwin-arm.ads: Likewise. * libgnat/system-darwin-ppc.ads: Likewise. * libgnat/system-darwin-x86.ads: Likewise. * libgnat/system-djgpp.ads: Likewise. * libgnat/system-dragonfly-x86_64.ads: Likewise. * libgnat/system-freebsd.ads: Likewise. * libgnat/system-hpux-ia64.ads: Likewise. * libgnat/system-hpux.ads: Likewise. * libgnat/system-linux-alpha.ads: Likewise. * libgnat/system-linux-arm.ads: Likewise. * libgnat/system-linux-hppa.ads: Likewise. * libgnat/system-linux-ia64.ads: Likewise. * libgnat/system-linux-m68k.ads: Likewise. * libgnat/system-linux-mips.ads: Likewise. * libgnat/system-linux-ppc.ads: Likewise. * libgnat/system-linux-riscv.ads: Likewise. * libgnat/system-linux-s390.ads: Likewise. * libgnat/system-linux-sh4.ads: Likewise. * libgnat/system-linux-sparc.ads: Likewise. * libgnat/system-linux-x86.ads: Likewise. * libgnat/system-lynxos178-ppc.ads: Likewise. * libgnat/system-lynxos178-x86.ads: Likewise. * libgnat/system-mingw.ads: Likewise. * libgnat/system-qnx-aarch64.ads: Likewise. * libgnat/system-rtems.ads: Likewise. * libgnat/system-solaris-sparc.ads: Likewise. * libgnat/system-solaris-x86.ads: Likewise. * libgnat/system-vxworks-arm-rtp-smp.ads: Likewise. * libgnat/system-vxworks-arm-rtp.ads: Likewise. * libgnat/system-vxworks-arm.ads: Likewise. * libgnat/system-vxworks-e500-kernel.ads: Likewise. * libgnat/system-vxworks-e500-rtp-smp.ads: Likewise. * libgnat/system-vxworks-e500-rtp.ads: Likewise. * libgnat/system-vxworks-e500-vthread.ads: Likewise. * libgnat/system-vxworks-ppc-kernel.ads: Likewise. * libgnat/system-vxworks-ppc-ravenscar.ads: Likewise. * libgnat/system-vxworks-ppc-rtp-smp.ads: Likewise. * libgnat/system-vxworks-ppc-rtp.ads: Likewise. * libgnat/system-vxworks-ppc-vthread.ads: Likewise. * libgnat/system-vxworks-ppc.ads: Likewise. * libgnat/system-vxworks-x86-kernel.ads: Likewise. * libgnat/system-vxworks-x86-rtp-smp.ads: Likewise. * libgnat/system-vxworks-x86-rtp.ads: Likewise. * libgnat/system-vxworks-x86-vthread.ads: Likewise. * libgnat/system-vxworks-x86.ads: Likewise. * libgnat/system-vxworks7-aarch64-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-aarch64.ads: Likewise. * libgnat/system-vxworks7-arm-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-arm.ads: Likewise. * libgnat/system-vxworks7-e500-kernel.ads: Likewise. * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-e500-rtp.ads: Likewise. * libgnat/system-vxworks7-ppc-kernel.ads: Likewise. * libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-ppc-rtp.ads: Likewise. * libgnat/system-vxworks7-ppc64-kernel.ads: Likewise. * libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-x86-kernel.ads: Likewise. * libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-x86-rtp.ads: Likewise. * libgnat/system-vxworks7-x86_64-kernel.ads: Likewise. * libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise. * libgnat/system.ads: Likewise. * link.c: Likewise. * live.adb: Likewise. * live.ads: Likewise. * locales.c: Likewise. * make.adb: Likewise. * make.ads: Likewise. * make_util.adb: Likewise. * make_util.ads: Likewise. * makeusg.adb: Likewise. * makeusg.ads: Likewise. * mdll-fil.adb: Likewise. * mdll-fil.ads: Likewise. * mdll-utl.adb: Likewise. * mdll-utl.ads: Likewise. * mdll.adb: Likewise. * mdll.ads: Likewise. * mingw32.h: Likewise. * mkdir.c: Likewise. * namet-sp.adb: Likewise. * namet-sp.ads: Likewise. * namet.adb: Likewise. * namet.ads: Likewise. * namet.h: Likewise. * nlists.adb: Likewise. * nlists.ads: Likewise. * nlists.h: Likewise. * opt.adb: Likewise. * opt.ads: Likewise. * osint-b.adb: Likewise. * osint-b.ads: Likewise. * osint-c.adb: Likewise. * osint-c.ads: Likewise. * osint-l.adb: Likewise. * osint-l.ads: Likewise. * osint-m.adb: Likewise. * osint-m.ads: Likewise. * osint.adb: Likewise. * osint.ads: Likewise. * output.adb: Likewise. * output.ads: Likewise. * par-ch10.adb: Likewise. * par-ch11.adb: Likewise. * par-ch12.adb: Likewise. * par-ch13.adb: Likewise. * par-ch2.adb: Likewise. * par-ch3.adb: Likewise. * par-ch4.adb: Likewise. * par-ch5.adb: Likewise. * par-ch6.adb: Likewise. * par-ch7.adb: Likewise. * par-ch8.adb: Likewise. * par-ch9.adb: Likewise. * par-endh.adb: Likewise. * par-labl.adb: Likewise. * par-load.adb: Likewise. * par-prag.adb: Likewise. * par-sync.adb: Likewise. * par-tchk.adb: Likewise. * par-util.adb: Likewise. * par.adb: Likewise. * par.ads: Likewise. * par_sco.adb: Likewise. * par_sco.ads: Likewise. * pprint.adb: Likewise. * pprint.ads: Likewise. * prep.adb: Likewise. * prep.ads: Likewise. * prepcomp.adb: Likewise. * prepcomp.ads: Likewise. * put_scos.adb: Likewise. * put_scos.ads: Likewise. * raise-gcc.c: Likewise. * raise.c: Likewise. * raise.h: Likewise. * repinfo-input.adb: Likewise. * repinfo-input.ads: Likewise. * repinfo.adb: Likewise. * repinfo.ads: Likewise. * repinfo.h: Likewise. * restrict.adb: Likewise. * restrict.ads: Likewise. * rident.ads: Likewise. * rtfinal.c: Likewise. * rtinit.c: Likewise. * rtsfind.adb: Likewise. * rtsfind.ads: Likewise. * runtime.h: Likewise. * s-oscons-tmplt.c: Likewise. * sa_messages.adb: Likewise. * sa_messages.ads: Likewise. * scans.adb: Likewise. * scans.ads: Likewise. * scil_ll.adb: Likewise. * scil_ll.ads: Likewise. * scn.adb: Likewise. * scn.ads: Likewise. * scng.adb: Likewise. * scng.ads: Likewise. * scos.adb: Likewise. * scos.ads: Likewise. * scos.h: Likewise. * sdefault.ads: Likewise. * seh_init.c: Likewise. * sem.adb: Likewise. * sem.ads: Likewise. * sem_aggr.adb: Likewise. * sem_aggr.ads: Likewise. * sem_attr.adb: Likewise. * sem_attr.ads: Likewise. * sem_aux.adb: Likewise. * sem_aux.ads: Likewise. * sem_case.adb: Likewise. * sem_case.ads: Likewise. * sem_cat.adb: Likewise. * sem_cat.ads: Likewise. * sem_ch10.adb: Likewise. * sem_ch10.ads: Likewise. * sem_ch11.adb: Likewise. * sem_ch11.ads: Likewise. * sem_ch12.adb: Likewise. * sem_ch12.ads: Likewise. * sem_ch13.adb: Likewise. * sem_ch13.ads: Likewise. * sem_ch2.adb: Likewise. * sem_ch2.ads: Likewise. * sem_ch3.adb: Likewise. * sem_ch3.ads: Likewise. * sem_ch4.adb: Likewise. * sem_ch4.ads: Likewise. * sem_ch5.adb: Likewise. * sem_ch5.ads: Likewise. * sem_ch6.adb: Likewise. * sem_ch6.ads: Likewise. * sem_ch7.adb: Likewise. * sem_ch7.ads: Likewise. * sem_ch8.adb: Likewise. * sem_ch8.ads: Likewise. * sem_ch9.adb: Likewise. * sem_ch9.ads: Likewise. * sem_dim.adb: Likewise. * sem_dim.ads: Likewise. * sem_disp.adb: Likewise. * sem_disp.ads: Likewise. * sem_dist.adb: Likewise. * sem_dist.ads: Likewise. * sem_elab.adb: Likewise. * sem_elab.ads: Likewise. * sem_elim.adb: Likewise. * sem_elim.ads: Likewise. * sem_eval.adb: Likewise. * sem_eval.ads: Likewise. * sem_intr.adb: Likewise. * sem_intr.ads: Likewise. * sem_mech.adb: Likewise. * sem_mech.ads: Likewise. * sem_prag.adb: Likewise. * sem_prag.ads: Likewise. * sem_res.adb: Likewise. * sem_res.ads: Likewise. * sem_scil.adb: Likewise. * sem_scil.ads: Likewise. * sem_smem.adb: Likewise. * sem_smem.ads: Likewise. * sem_type.adb: Likewise. * sem_type.ads: Likewise. * sem_util.adb: Likewise. * sem_util.ads: Likewise. * sem_warn.adb: Likewise. * sem_warn.ads: Likewise. * set_targ.adb: Likewise. * set_targ.ads: Likewise. * sfn_scan.adb: Likewise. * sfn_scan.ads: Likewise. * sigtramp-armdroid.c: Likewise. * sigtramp-ios.c: Likewise. * sigtramp-qnx.c: Likewise. * sigtramp-vxworks.c: Likewise. * sigtramp.h: Likewise. * sinfo-cn.adb: Likewise. * sinfo-cn.ads: Likewise. * sinfo.adb: Likewise. * sinfo.ads: Likewise. * sinput-c.adb: Likewise. * sinput-c.ads: Likewise. * sinput-d.adb: Likewise. * sinput-d.ads: Likewise. * sinput-l.adb: Likewise. * sinput-l.ads: Likewise. * sinput.adb: Likewise. * sinput.ads: Likewise. * socket.c: Likewise. * spark_xrefs.adb: Likewise. * spark_xrefs.ads: Likewise. * sprint.adb: Likewise. * sprint.ads: Likewise. * stand.adb: Likewise. * stand.ads: Likewise. * stringt.adb: Likewise. * stringt.ads: Likewise. * stringt.h: Likewise. * style.adb: Likewise. * style.ads: Likewise. * styleg.adb: Likewise. * styleg.ads: Likewise. * stylesw.adb: Likewise. * stylesw.ads: Likewise. * switch-b.adb: Likewise. * switch-b.ads: Likewise. * switch-c.adb: Likewise. * switch-c.ads: Likewise. * switch-m.adb: Likewise. * switch-m.ads: Likewise. * switch.adb: Likewise. * switch.ads: Likewise. * symbols.adb: Likewise. * symbols.ads: Likewise. * sysdep.c: Likewise. * table.adb: Likewise. * table.ads: Likewise. * targext.c: Likewise. * targparm.adb: Likewise. * targparm.ads: Likewise. * tbuild.adb: Likewise. * tbuild.ads: Likewise. * tempdir.adb: Likewise. * tempdir.ads: Likewise. * terminals.c: Likewise. * tracebak.c: Likewise. * tree_gen.adb: Likewise. * tree_gen.ads: Likewise. * tree_in.adb: Likewise. * tree_in.ads: Likewise. * tree_io.adb: Likewise. * tree_io.ads: Likewise. * treepr.adb: Likewise. * treepr.ads: Likewise. * ttypes.ads: Likewise. * types.adb: Likewise. * types.ads: Likewise. * types.h: Likewise. * uintp.adb: Likewise. * uintp.ads: Likewise. * uintp.h: Likewise. * uname.adb: Likewise. * uname.ads: Likewise. * urealp.adb: Likewise. * urealp.ads: Likewise. * urealp.h: Likewise. * usage.adb: Likewise. * usage.ads: Likewise. * validsw.adb: Likewise. * validsw.ads: Likewise. * warnsw.adb: Likewise. * warnsw.ads: Likewise. * widechar.adb: Likewise. * widechar.ads: Likewise. * xeinfo.adb: Likewise. * xnmake.adb: Likewise. * xoscons.adb: Likewise. * xr_tabls.adb: Likewise. * xr_tabls.ads: Likewise. * xref_lib.adb: Likewise. * xref_lib.ads: Likewise. * xsinfo.adb: Likewise. * xsnamest.adb: Likewise. * xtreeprs.adb: Likewise. * xutil.adb: Likewise. * xutil.ads: Likewise.
1850 lines
56 KiB
Ada
1850 lines
56 KiB
Ada
------------------------------------------------------------------------------
|
|
-- --
|
|
-- GNAT COMPILER COMPONENTS --
|
|
-- --
|
|
-- G N A T C H O P --
|
|
-- --
|
|
-- B o d y --
|
|
-- --
|
|
-- Copyright (C) 1998-2020, Free Software Foundation, Inc. --
|
|
-- --
|
|
-- GNAT is free software; you can redistribute it and/or modify it under --
|
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
|
-- ware Foundation; either version 3, or (at your option) any later ver- --
|
|
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
|
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
|
-- for more details. You should have received a copy of the GNU General --
|
|
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
|
|
-- http://www.gnu.org/licenses for a complete copy of the license. --
|
|
-- --
|
|
-- GNAT was originally developed by the GNAT team at New York University. --
|
|
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
|
-- --
|
|
------------------------------------------------------------------------------
|
|
|
|
with Ada.Characters.Conversions; use Ada.Characters.Conversions;
|
|
with Ada.Command_Line; use Ada.Command_Line;
|
|
with Ada.Directories; use Ada.Directories;
|
|
with Ada.Streams.Stream_IO; use Ada.Streams;
|
|
with Ada.Text_IO; use Ada.Text_IO;
|
|
with System.CRTL; use System; use System.CRTL;
|
|
|
|
with GNAT.Byte_Order_Mark; use GNAT.Byte_Order_Mark;
|
|
with GNAT.Command_Line; use GNAT.Command_Line;
|
|
with GNAT.OS_Lib; use GNAT.OS_Lib;
|
|
with GNAT.Heap_Sort_G;
|
|
with GNAT.Table;
|
|
|
|
with Switch; use Switch;
|
|
with Types;
|
|
|
|
procedure Gnatchop is
|
|
|
|
Config_File_Name : constant String_Access := new String'("gnat.adc");
|
|
-- The name of the file holding the GNAT configuration pragmas
|
|
|
|
Gcc : String_Access := new String'("gcc");
|
|
-- May be modified by switch --GCC=
|
|
|
|
Gcc_Set : Boolean := False;
|
|
-- True if a switch --GCC= is used
|
|
|
|
Gnat_Cmd : String_Access;
|
|
-- Command to execute the GNAT compiler
|
|
|
|
Gnat_Args : Argument_List_Access :=
|
|
new Argument_List'
|
|
(new String'("-c"),
|
|
new String'("-x"),
|
|
new String'("ada"),
|
|
new String'("-gnats"),
|
|
new String'("-gnatu"));
|
|
-- Arguments used in Gnat_Cmd call
|
|
|
|
EOF : constant Character := Character'Val (26);
|
|
-- Special character to signal end of file. Not required in input files,
|
|
-- but properly treated if present. Not generated in output files except
|
|
-- as a result of copying input file.
|
|
|
|
BOM_Length : Natural := 0;
|
|
-- Reset to non-zero value if BOM detected at start of file
|
|
|
|
--------------------
|
|
-- File arguments --
|
|
--------------------
|
|
|
|
subtype File_Num is Natural;
|
|
subtype File_Offset is Natural;
|
|
|
|
type File_Entry is record
|
|
Name : String_Access;
|
|
-- Name of chop file or directory
|
|
|
|
SR_Name : String_Access;
|
|
-- Null unless the chop file starts with a source reference pragma
|
|
-- in which case this field points to the file name from this pragma.
|
|
end record;
|
|
|
|
package File is new GNAT.Table
|
|
(Table_Component_Type => File_Entry,
|
|
Table_Index_Type => File_Num,
|
|
Table_Low_Bound => 1,
|
|
Table_Initial => 100,
|
|
Table_Increment => 100);
|
|
|
|
Directory : String_Access;
|
|
-- Record name of directory, or a null string if no directory given
|
|
|
|
Compilation_Mode : Boolean := False;
|
|
Overwrite_Files : Boolean := False;
|
|
Preserve_Mode : Boolean := False;
|
|
Quiet_Mode : Boolean := False;
|
|
Source_References : Boolean := False;
|
|
Verbose_Mode : Boolean := False;
|
|
Exit_On_Error : Boolean := False;
|
|
-- Global options
|
|
|
|
Write_gnat_adc : Boolean := False;
|
|
-- Gets set true if we append to gnat.adc or create a new gnat.adc.
|
|
-- Used to inhibit complaint about no units generated.
|
|
|
|
---------------
|
|
-- Unit list --
|
|
---------------
|
|
|
|
type Line_Num is new Natural;
|
|
-- Line number (for source reference pragmas)
|
|
|
|
type Unit_Count_Type is new Integer;
|
|
subtype Unit_Num is Unit_Count_Type range 1 .. Unit_Count_Type'Last;
|
|
-- Used to refer to unit number in unit table
|
|
|
|
type SUnit_Num is new Integer;
|
|
-- Used to refer to entry in sorted units table. Note that entry
|
|
-- zero is only for use by Heapsort, and is not otherwise referenced.
|
|
|
|
type Unit_Kind is (Unit_Spec, Unit_Body, Config_Pragmas);
|
|
|
|
-- Structure to contain all necessary information for one unit.
|
|
-- Entries are also temporarily used to record config pragma sequences.
|
|
|
|
type Unit_Info is record
|
|
File_Name : String_Access;
|
|
-- File name from GNAT output line
|
|
|
|
Chop_File : File_Num;
|
|
-- File number in chop file sequence
|
|
|
|
Start_Line : Line_Num;
|
|
-- Line number from GNAT output line
|
|
|
|
Offset : File_Offset;
|
|
-- Offset name from GNAT output line
|
|
|
|
SR_Present : Boolean;
|
|
-- Set True if SR parameter present
|
|
|
|
Length : File_Offset;
|
|
-- A length of 0 means that the Unit is the last one in the file
|
|
|
|
Kind : Unit_Kind;
|
|
-- Indicates kind of unit
|
|
|
|
Sorted_Index : SUnit_Num;
|
|
-- Index of unit in sorted unit list
|
|
|
|
Bufferg : String_Access;
|
|
-- Pointer to buffer containing configuration pragmas to be prepended.
|
|
-- Null if no pragmas to be prepended.
|
|
end record;
|
|
|
|
-- The following table stores the unit offset information
|
|
|
|
package Unit is new GNAT.Table
|
|
(Table_Component_Type => Unit_Info,
|
|
Table_Index_Type => Unit_Count_Type,
|
|
Table_Low_Bound => 1,
|
|
Table_Initial => 500,
|
|
Table_Increment => 100);
|
|
|
|
-- The following table is used as a sorted index to the Unit.Table.
|
|
-- The entries in Unit.Table are not moved, instead we just shuffle
|
|
-- the entries in Sorted_Units. Note that the zeroeth entry in this
|
|
-- table is used by GNAT.Heap_Sort_G.
|
|
|
|
package Sorted_Units is new GNAT.Table
|
|
(Table_Component_Type => Unit_Num,
|
|
Table_Index_Type => SUnit_Num,
|
|
Table_Low_Bound => 0,
|
|
Table_Initial => 500,
|
|
Table_Increment => 100);
|
|
|
|
function Is_Duplicated (U : SUnit_Num) return Boolean;
|
|
-- Returns true if U is duplicated by a later unit.
|
|
-- Note that this function returns false for the last entry.
|
|
|
|
procedure Sort_Units;
|
|
-- Sort units and set up sorted unit table
|
|
|
|
----------------------
|
|
-- File_Descriptors --
|
|
----------------------
|
|
|
|
function dup (handle : File_Descriptor) return File_Descriptor;
|
|
function dup2 (from, to : File_Descriptor) return File_Descriptor;
|
|
|
|
---------------------
|
|
-- Local variables --
|
|
---------------------
|
|
|
|
Warning_Count : Natural := 0;
|
|
-- Count of warnings issued so far
|
|
|
|
-----------------------
|
|
-- Local subprograms --
|
|
-----------------------
|
|
|
|
procedure Error_Msg (Message : String; Warning : Boolean := False);
|
|
-- Produce an error message on standard error output
|
|
|
|
function Files_Exist return Boolean;
|
|
-- Check Unit.Table for possible file names that already exist
|
|
-- in the file system. Returns true if files exist, False otherwise
|
|
|
|
function Get_Maximum_File_Name_Length return Integer;
|
|
pragma Import (C, Get_Maximum_File_Name_Length,
|
|
"__gnat_get_maximum_file_name_length");
|
|
-- Function to get maximum file name length for system
|
|
|
|
Maximum_File_Name_Length : constant Integer := Get_Maximum_File_Name_Length;
|
|
Maximum_File_Name_Length_String : constant String :=
|
|
Integer'Image
|
|
(Maximum_File_Name_Length);
|
|
|
|
function Locate_Executable
|
|
(Program_Name : String;
|
|
Look_For_Prefix : Boolean := True) return String_Access;
|
|
-- Locate executable for given program name. This takes into account
|
|
-- the target-prefix of the current command, if Look_For_Prefix is True.
|
|
|
|
subtype EOL_Length is Natural range 0 .. 2;
|
|
-- Possible lengths of end of line sequence
|
|
|
|
type EOL_String (Len : EOL_Length := 0) is record
|
|
Str : String (1 .. Len);
|
|
end record;
|
|
|
|
function Get_EOL
|
|
(Source : not null access String;
|
|
Start : Positive) return EOL_String;
|
|
-- Return the line terminator used in the passed string
|
|
|
|
procedure Parse_EOL
|
|
(Source : not null access String;
|
|
Ptr : in out Positive);
|
|
-- On return Source (Ptr) is the first character of the next line
|
|
-- or EOF. Source.all must be terminated by EOF.
|
|
|
|
function Parse_File (Num : File_Num) return Boolean;
|
|
-- Calls the GNAT compiler to parse the given source file and parses the
|
|
-- output using Parse_Offset_Info. Returns True if parse operation
|
|
-- completes, False if some system error (e.g. failure to read the
|
|
-- offset information) occurs.
|
|
|
|
procedure Parse_Offset_Info
|
|
(Chop_File : File_Num;
|
|
Source : not null access String);
|
|
-- Parses the output of the compiler indicating the offsets and names of
|
|
-- the compilation units in Chop_File.
|
|
|
|
procedure Parse_Token
|
|
(Source : not null access String;
|
|
Ptr : in out Positive;
|
|
Token_Ptr : out Positive);
|
|
-- Skips any separators and stores the start of the token in Token_Ptr.
|
|
-- Then stores the position of the next separator in Ptr. On return
|
|
-- Source (Token_Ptr .. Ptr - 1) is the token.
|
|
|
|
procedure Read_File
|
|
(FD : File_Descriptor;
|
|
Contents : out String_Access;
|
|
Success : out Boolean);
|
|
-- Reads file associated with FS into the newly allocated string Contents.
|
|
-- Success is true iff the number of bytes read is equal to the file size.
|
|
|
|
function Report_Duplicate_Units return Boolean;
|
|
-- Output messages about duplicate units in the input files in Unit.Table
|
|
-- Returns True if any duplicates found, False if no duplicates found.
|
|
|
|
function Scan_Arguments return Boolean;
|
|
-- Scan command line options and set global variables accordingly.
|
|
-- Also scan out file and directory arguments. Returns True if scan
|
|
-- was successful, and False if the scan fails for any reason.
|
|
|
|
procedure Usage;
|
|
-- Output message on standard output describing syntax of gnatchop command
|
|
|
|
procedure Warning_Msg (Message : String);
|
|
-- Output a warning message on standard error and update warning count
|
|
|
|
function Write_Chopped_Files (Input : File_Num) return Boolean;
|
|
-- Write all units that result from chopping the Input file
|
|
|
|
procedure Write_Config_File (Input : File_Num; U : Unit_Num);
|
|
-- Call to write configuration pragmas (append them to gnat.adc). Input is
|
|
-- the file number for the chop file and U identifies the unit entry for
|
|
-- the configuration pragmas.
|
|
|
|
function Get_Config_Pragmas
|
|
(Input : File_Num;
|
|
U : Unit_Num) return String_Access;
|
|
-- Call to read configuration pragmas from given unit entry, and return a
|
|
-- buffer containing the pragmas to be appended to following units. Input
|
|
-- is the file number for the chop file and U identifies the unit entry for
|
|
-- the configuration pragmas.
|
|
|
|
procedure Write_Source_Reference_Pragma
|
|
(Info : Unit_Info;
|
|
Line : Line_Num;
|
|
File : Stream_IO.File_Type;
|
|
EOL : EOL_String;
|
|
Success : in out Boolean);
|
|
-- If Success is True on entry, writes a source reference pragma using
|
|
-- the chop file from Info, and the given line number. On return Success
|
|
-- indicates whether the write succeeded. If Success is False on entry,
|
|
-- or if the global flag Source_References is False, then the call to
|
|
-- Write_Source_Reference_Pragma has no effect. EOL indicates the end
|
|
-- of line sequence to be written at the end of the pragma.
|
|
|
|
procedure Write_Unit
|
|
(Source : not null access String;
|
|
Num : Unit_Num;
|
|
TS_Time : OS_Time;
|
|
Write_BOM : Boolean;
|
|
Success : out Boolean);
|
|
-- Write one compilation unit of the source to file. Source is the pointer
|
|
-- to the input string, Num is the unit number, TS_Time is the timestamp,
|
|
-- Write_BOM is set True to write a UTF-8 BOM at the start of the file.
|
|
-- Success is set True unless the write attempt fails.
|
|
|
|
---------
|
|
-- dup --
|
|
---------
|
|
|
|
function dup (handle : File_Descriptor) return File_Descriptor is
|
|
begin
|
|
return File_Descriptor (System.CRTL.dup (int (handle)));
|
|
end dup;
|
|
|
|
----------
|
|
-- dup2 --
|
|
----------
|
|
|
|
function dup2 (from, to : File_Descriptor) return File_Descriptor is
|
|
begin
|
|
return File_Descriptor (System.CRTL.dup2 (int (from), int (to)));
|
|
end dup2;
|
|
|
|
---------------
|
|
-- Error_Msg --
|
|
---------------
|
|
|
|
procedure Error_Msg (Message : String; Warning : Boolean := False) is
|
|
begin
|
|
Put_Line (Standard_Error, Message);
|
|
|
|
if not Warning then
|
|
Set_Exit_Status (Failure);
|
|
|
|
if Exit_On_Error then
|
|
raise Types.Terminate_Program;
|
|
end if;
|
|
end if;
|
|
end Error_Msg;
|
|
|
|
-----------------
|
|
-- Files_Exist --
|
|
-----------------
|
|
|
|
function Files_Exist return Boolean is
|
|
Exists : Boolean := False;
|
|
|
|
begin
|
|
for SNum in 1 .. SUnit_Num (Unit.Last) loop
|
|
|
|
-- Only check and report for the last instance of duplicated files
|
|
|
|
if not Is_Duplicated (SNum) then
|
|
declare
|
|
Info : constant Unit_Info :=
|
|
Unit.Table (Sorted_Units.Table (SNum));
|
|
|
|
begin
|
|
if Is_Writable_File (Info.File_Name.all) then
|
|
Error_Msg (Info.File_Name.all
|
|
& " already exists, use -w to overwrite");
|
|
Exists := True;
|
|
end if;
|
|
end;
|
|
end if;
|
|
end loop;
|
|
|
|
return Exists;
|
|
end Files_Exist;
|
|
|
|
------------------------
|
|
-- Get_Config_Pragmas --
|
|
------------------------
|
|
|
|
function Get_Config_Pragmas
|
|
(Input : File_Num;
|
|
U : Unit_Num) return String_Access
|
|
is
|
|
Info : Unit_Info renames Unit.Table (U);
|
|
FD : File_Descriptor;
|
|
Name : aliased constant String :=
|
|
File.Table (Input).Name.all & ASCII.NUL;
|
|
Length : File_Offset;
|
|
Buffer : String_Access;
|
|
Result : String_Access;
|
|
|
|
Success : Boolean;
|
|
pragma Warnings (Off, Success);
|
|
|
|
begin
|
|
FD := Open_Read (Name'Address, Binary);
|
|
|
|
if FD = Invalid_FD then
|
|
Error_Msg ("cannot open " & File.Table (Input).Name.all);
|
|
return null;
|
|
end if;
|
|
|
|
Read_File (FD, Buffer, Success);
|
|
|
|
-- A length of 0 indicates that the rest of the file belongs to
|
|
-- this unit. The actual length must be calculated now. Take into
|
|
-- account that the last character (EOF) must not be written.
|
|
|
|
if Info.Length = 0 then
|
|
Length := Buffer'Last - (Buffer'First + Info.Offset);
|
|
else
|
|
Length := Info.Length;
|
|
end if;
|
|
|
|
Result := new String'(Buffer (1 .. Length));
|
|
Close (FD);
|
|
return Result;
|
|
end Get_Config_Pragmas;
|
|
|
|
-------------
|
|
-- Get_EOL --
|
|
-------------
|
|
|
|
function Get_EOL
|
|
(Source : not null access String;
|
|
Start : Positive) return EOL_String
|
|
is
|
|
Ptr : Positive := Start;
|
|
First : Positive;
|
|
Last : Natural;
|
|
|
|
begin
|
|
-- Skip to end of line
|
|
|
|
while Source (Ptr) /= ASCII.CR and then
|
|
Source (Ptr) /= ASCII.LF and then
|
|
Source (Ptr) /= EOF
|
|
loop
|
|
Ptr := Ptr + 1;
|
|
end loop;
|
|
|
|
Last := Ptr;
|
|
|
|
if Source (Ptr) /= EOF then
|
|
|
|
-- Found CR or LF
|
|
|
|
First := Ptr;
|
|
|
|
else
|
|
First := Ptr + 1;
|
|
end if;
|
|
|
|
-- Recognize CR/LF
|
|
|
|
if Source (Ptr) = ASCII.CR and then Source (Ptr + 1) = ASCII.LF then
|
|
Last := First + 1;
|
|
end if;
|
|
|
|
return (Len => Last + 1 - First, Str => Source (First .. Last));
|
|
end Get_EOL;
|
|
|
|
-------------------
|
|
-- Is_Duplicated --
|
|
-------------------
|
|
|
|
function Is_Duplicated (U : SUnit_Num) return Boolean is
|
|
begin
|
|
return U < SUnit_Num (Unit.Last)
|
|
and then
|
|
Unit.Table (Sorted_Units.Table (U)).File_Name.all =
|
|
Unit.Table (Sorted_Units.Table (U + 1)).File_Name.all;
|
|
end Is_Duplicated;
|
|
|
|
-----------------------
|
|
-- Locate_Executable --
|
|
-----------------------
|
|
|
|
function Locate_Executable
|
|
(Program_Name : String;
|
|
Look_For_Prefix : Boolean := True) return String_Access
|
|
is
|
|
Gnatchop_Str : constant String := "gnatchop";
|
|
Current_Command : constant String := Normalize_Pathname (Command_Name);
|
|
End_Of_Prefix : Natural;
|
|
Start_Of_Prefix : Positive;
|
|
Start_Of_Suffix : Positive;
|
|
Result : String_Access;
|
|
|
|
begin
|
|
Start_Of_Prefix := Current_Command'First;
|
|
Start_Of_Suffix := Current_Command'Last + 1;
|
|
End_Of_Prefix := Start_Of_Prefix - 1;
|
|
|
|
if Look_For_Prefix then
|
|
|
|
-- Find Start_Of_Prefix
|
|
|
|
for J in reverse Current_Command'Range loop
|
|
if Current_Command (J) = '/' or else
|
|
Current_Command (J) = Directory_Separator or else
|
|
Current_Command (J) = ':'
|
|
then
|
|
Start_Of_Prefix := J + 1;
|
|
exit;
|
|
end if;
|
|
end loop;
|
|
|
|
-- Find End_Of_Prefix
|
|
|
|
for J in Start_Of_Prefix ..
|
|
Current_Command'Last - Gnatchop_Str'Length + 1
|
|
loop
|
|
if Current_Command (J .. J + Gnatchop_Str'Length - 1) =
|
|
Gnatchop_Str
|
|
then
|
|
End_Of_Prefix := J - 1;
|
|
exit;
|
|
end if;
|
|
end loop;
|
|
end if;
|
|
|
|
if End_Of_Prefix > Current_Command'First then
|
|
Start_Of_Suffix := End_Of_Prefix + Gnatchop_Str'Length + 1;
|
|
end if;
|
|
|
|
declare
|
|
Command : constant String :=
|
|
Current_Command (Start_Of_Prefix .. End_Of_Prefix)
|
|
& Program_Name
|
|
& Current_Command (Start_Of_Suffix ..
|
|
Current_Command'Last);
|
|
begin
|
|
Result := Locate_Exec_On_Path (Command);
|
|
|
|
if Result = null then
|
|
Error_Msg
|
|
(Command & ": installation problem, executable not found");
|
|
end if;
|
|
end;
|
|
|
|
return Result;
|
|
end Locate_Executable;
|
|
|
|
---------------
|
|
-- Parse_EOL --
|
|
---------------
|
|
|
|
procedure Parse_EOL
|
|
(Source : not null access String;
|
|
Ptr : in out Positive) is
|
|
begin
|
|
-- Skip to end of line
|
|
|
|
while Source (Ptr) /= ASCII.CR and then Source (Ptr) /= ASCII.LF
|
|
and then Source (Ptr) /= EOF
|
|
loop
|
|
Ptr := Ptr + 1;
|
|
end loop;
|
|
|
|
if Source (Ptr) /= EOF then
|
|
Ptr := Ptr + 1; -- skip CR or LF
|
|
end if;
|
|
|
|
-- Skip past CR/LF or LF/CR combination
|
|
|
|
if (Source (Ptr) = ASCII.CR or else Source (Ptr) = ASCII.LF)
|
|
and then Source (Ptr) /= Source (Ptr - 1)
|
|
then
|
|
Ptr := Ptr + 1;
|
|
end if;
|
|
end Parse_EOL;
|
|
|
|
----------------
|
|
-- Parse_File --
|
|
----------------
|
|
|
|
function Parse_File (Num : File_Num) return Boolean is
|
|
Chop_Name : constant String_Access := File.Table (Num).Name;
|
|
Save_Stdout : constant File_Descriptor := dup (Standout);
|
|
Offset_Name : Temp_File_Name;
|
|
Offset_FD : File_Descriptor := Invalid_FD;
|
|
Buffer : String_Access;
|
|
Success : Boolean;
|
|
Failure : exception;
|
|
|
|
begin
|
|
-- Display copy of GNAT command if verbose mode
|
|
|
|
if Verbose_Mode then
|
|
Put (Gnat_Cmd.all);
|
|
|
|
for J in 1 .. Gnat_Args'Length loop
|
|
Put (' ');
|
|
Put (Gnat_Args (J).all);
|
|
end loop;
|
|
|
|
Put (' ');
|
|
Put_Line (Chop_Name.all);
|
|
end if;
|
|
|
|
-- Create temporary file
|
|
|
|
Create_Temp_File (Offset_FD, Offset_Name);
|
|
|
|
if Offset_FD = Invalid_FD then
|
|
Error_Msg ("gnatchop: cannot create temporary file");
|
|
Close (Save_Stdout);
|
|
return False;
|
|
end if;
|
|
|
|
-- Redirect Stdout to this temporary file in the Unix way
|
|
|
|
if dup2 (Offset_FD, Standout) = Invalid_FD then
|
|
Error_Msg ("gnatchop: cannot redirect stdout to temporary file");
|
|
Close (Save_Stdout);
|
|
Close (Offset_FD);
|
|
return False;
|
|
end if;
|
|
|
|
-- Call Gnat on the source filename argument with special options
|
|
-- to generate offset information. If this special compilation completes
|
|
-- successfully then we can do the actual gnatchop operation.
|
|
|
|
Spawn (Gnat_Cmd.all, Gnat_Args.all & Chop_Name, Success);
|
|
|
|
if not Success then
|
|
Error_Msg (Chop_Name.all & ": parse errors detected");
|
|
Error_Msg (Chop_Name.all & ": chop may not be successful");
|
|
end if;
|
|
|
|
-- Restore stdout
|
|
|
|
if dup2 (Save_Stdout, Standout) = Invalid_FD then
|
|
Error_Msg ("gnatchop: cannot restore stdout");
|
|
end if;
|
|
|
|
-- Reopen the file to start reading from the beginning
|
|
|
|
Close (Offset_FD);
|
|
Close (Save_Stdout);
|
|
Offset_FD := Open_Read (Offset_Name'Address, Binary);
|
|
|
|
if Offset_FD = Invalid_FD then
|
|
Error_Msg ("gnatchop: cannot access offset info");
|
|
raise Failure;
|
|
end if;
|
|
|
|
Read_File (Offset_FD, Buffer, Success);
|
|
|
|
if not Success then
|
|
Error_Msg ("gnatchop: error reading offset info");
|
|
Close (Offset_FD);
|
|
raise Failure;
|
|
else
|
|
Parse_Offset_Info (Num, Buffer);
|
|
end if;
|
|
|
|
-- Close and delete temporary file
|
|
|
|
Close (Offset_FD);
|
|
Delete_File (Offset_Name'Address, Success);
|
|
|
|
return Success;
|
|
|
|
exception
|
|
when Failure | Types.Terminate_Program =>
|
|
if Offset_FD /= Invalid_FD then
|
|
Close (Offset_FD);
|
|
end if;
|
|
|
|
Delete_File (Offset_Name'Address, Success);
|
|
return False;
|
|
end Parse_File;
|
|
|
|
-----------------------
|
|
-- Parse_Offset_Info --
|
|
-----------------------
|
|
|
|
procedure Parse_Offset_Info
|
|
(Chop_File : File_Num;
|
|
Source : not null access String)
|
|
is
|
|
First_Unit : constant Unit_Num := Unit.Last + 1;
|
|
Bufferg : String_Access := null;
|
|
Parse_Ptr : File_Offset := Source'First;
|
|
Token_Ptr : File_Offset;
|
|
Info : Unit_Info;
|
|
|
|
function Match (Literal : String) return Boolean;
|
|
-- Checks if given string appears at the current Token_Ptr location
|
|
-- and if so, bumps Parse_Ptr past the token and returns True. If
|
|
-- the string is not present, sets Parse_Ptr to Token_Ptr and
|
|
-- returns False.
|
|
|
|
-----------
|
|
-- Match --
|
|
-----------
|
|
|
|
function Match (Literal : String) return Boolean is
|
|
begin
|
|
Parse_Token (Source, Parse_Ptr, Token_Ptr);
|
|
|
|
if Source'Last + 1 - Token_Ptr < Literal'Length
|
|
or else
|
|
Source (Token_Ptr .. Token_Ptr + Literal'Length - 1) /= Literal
|
|
then
|
|
Parse_Ptr := Token_Ptr;
|
|
return False;
|
|
end if;
|
|
|
|
Parse_Ptr := Token_Ptr + Literal'Length;
|
|
return True;
|
|
end Match;
|
|
|
|
-- Start of processing for Parse_Offset_Info
|
|
|
|
begin
|
|
loop
|
|
-- Set default values, should get changed for all
|
|
-- units/pragmas except for the last
|
|
|
|
Info.Chop_File := Chop_File;
|
|
Info.Length := 0;
|
|
|
|
-- Parse the current line of offset information into Info
|
|
-- and exit the loop if there are any errors or on EOF.
|
|
|
|
-- First case, parse a line in the following format:
|
|
|
|
-- Unit x (spec) line 7, file offset 142, [SR, ]file name x.ads
|
|
|
|
-- Note that the unit name can be an operator name in quotes.
|
|
-- This is of course illegal, but both GNAT and gnatchop handle
|
|
-- the case so that this error does not interfere with chopping.
|
|
|
|
-- The SR ir present indicates that a source reference pragma
|
|
-- was processed as part of this unit (and that therefore no
|
|
-- Source_Reference pragma should be generated.
|
|
|
|
if Match ("Unit") then
|
|
Parse_Token (Source, Parse_Ptr, Token_Ptr);
|
|
|
|
if Match ("(body)") then
|
|
Info.Kind := Unit_Body;
|
|
elsif Match ("(spec)") then
|
|
Info.Kind := Unit_Spec;
|
|
else
|
|
exit;
|
|
end if;
|
|
|
|
exit when not Match ("line");
|
|
Parse_Token (Source, Parse_Ptr, Token_Ptr);
|
|
Info.Start_Line := Line_Num'Value
|
|
(Source (Token_Ptr .. Parse_Ptr - 1));
|
|
|
|
exit when not Match ("file offset");
|
|
Parse_Token (Source, Parse_Ptr, Token_Ptr);
|
|
Info.Offset := File_Offset'Value
|
|
(Source (Token_Ptr .. Parse_Ptr - 1));
|
|
|
|
Info.SR_Present := Match ("SR, ");
|
|
|
|
exit when not Match ("file name");
|
|
Parse_Token (Source, Parse_Ptr, Token_Ptr);
|
|
Info.File_Name := new String'
|
|
(Directory.all & Source (Token_Ptr .. Parse_Ptr - 1));
|
|
Parse_EOL (Source, Parse_Ptr);
|
|
|
|
-- Second case, parse a line of the following form
|
|
|
|
-- Configuration pragmas at line 10, file offset 223
|
|
|
|
elsif Match ("Configuration pragmas at") then
|
|
Info.Kind := Config_Pragmas;
|
|
Info.File_Name := Config_File_Name;
|
|
|
|
exit when not Match ("line");
|
|
Parse_Token (Source, Parse_Ptr, Token_Ptr);
|
|
Info.Start_Line := Line_Num'Value
|
|
(Source (Token_Ptr .. Parse_Ptr - 1));
|
|
|
|
exit when not Match ("file offset");
|
|
Parse_Token (Source, Parse_Ptr, Token_Ptr);
|
|
Info.Offset := File_Offset'Value
|
|
(Source (Token_Ptr .. Parse_Ptr - 1));
|
|
|
|
Parse_EOL (Source, Parse_Ptr);
|
|
|
|
-- Third case, parse a line of the following form
|
|
|
|
-- Source_Reference pragma for file "filename"
|
|
|
|
-- This appears at the start of the file only, and indicates
|
|
-- the name to be used on any generated Source_Reference pragmas.
|
|
|
|
elsif Match ("Source_Reference pragma for file ") then
|
|
Parse_Token (Source, Parse_Ptr, Token_Ptr);
|
|
File.Table (Chop_File).SR_Name :=
|
|
new String'(Source (Token_Ptr + 1 .. Parse_Ptr - 2));
|
|
Parse_EOL (Source, Parse_Ptr);
|
|
goto Continue;
|
|
|
|
-- Unrecognized keyword or end of file
|
|
|
|
else
|
|
exit;
|
|
end if;
|
|
|
|
-- Store the data in the Info record in the Unit.Table
|
|
|
|
Unit.Increment_Last;
|
|
Unit.Table (Unit.Last) := Info;
|
|
|
|
-- If this is not the first unit from the file, calculate
|
|
-- the length of the previous unit as difference of the offsets
|
|
|
|
if Unit.Last > First_Unit then
|
|
Unit.Table (Unit.Last - 1).Length :=
|
|
Info.Offset - Unit.Table (Unit.Last - 1).Offset;
|
|
end if;
|
|
|
|
-- If not in compilation mode combine current unit with any
|
|
-- preceding configuration pragmas.
|
|
|
|
if not Compilation_Mode
|
|
and then Unit.Last > First_Unit
|
|
and then Unit.Table (Unit.Last - 1).Kind = Config_Pragmas
|
|
then
|
|
Info.Start_Line := Unit.Table (Unit.Last - 1).Start_Line;
|
|
Info.Offset := Unit.Table (Unit.Last - 1).Offset;
|
|
|
|
-- Delete the configuration pragma entry
|
|
|
|
Unit.Table (Unit.Last - 1) := Info;
|
|
Unit.Decrement_Last;
|
|
end if;
|
|
|
|
-- If in compilation mode, and previous entry is the initial
|
|
-- entry for the file and is for configuration pragmas, then
|
|
-- they are to be appended to every unit in the file.
|
|
|
|
if Compilation_Mode
|
|
and then Unit.Last = First_Unit + 1
|
|
and then Unit.Table (First_Unit).Kind = Config_Pragmas
|
|
then
|
|
Bufferg :=
|
|
Get_Config_Pragmas
|
|
(Unit.Table (Unit.Last - 1).Chop_File, First_Unit);
|
|
Unit.Table (Unit.Last - 1) := Info;
|
|
Unit.Decrement_Last;
|
|
end if;
|
|
|
|
Unit.Table (Unit.Last).Bufferg := Bufferg;
|
|
|
|
-- If in compilation mode, and this is not the first item,
|
|
-- combine configuration pragmas with previous unit, which
|
|
-- will cause an error message to be generated when the unit
|
|
-- is compiled.
|
|
|
|
if Compilation_Mode
|
|
and then Unit.Last > First_Unit
|
|
and then Unit.Table (Unit.Last).Kind = Config_Pragmas
|
|
then
|
|
Unit.Decrement_Last;
|
|
end if;
|
|
|
|
<<Continue>>
|
|
null;
|
|
|
|
end loop;
|
|
|
|
-- Find out if the loop was exited prematurely because of
|
|
-- an error or if the EOF marker was found.
|
|
|
|
if Source (Parse_Ptr) /= EOF then
|
|
Error_Msg
|
|
(File.Table (Chop_File).Name.all & ": error parsing offset info");
|
|
return;
|
|
end if;
|
|
|
|
-- Handle case of a chop file consisting only of config pragmas
|
|
|
|
if Unit.Last = First_Unit
|
|
and then Unit.Table (Unit.Last).Kind = Config_Pragmas
|
|
then
|
|
-- In compilation mode, we append such a file to gnat.adc
|
|
|
|
if Compilation_Mode then
|
|
Write_Config_File (Unit.Table (Unit.Last).Chop_File, First_Unit);
|
|
Unit.Decrement_Last;
|
|
|
|
-- In default (non-compilation) mode, this is invalid
|
|
|
|
else
|
|
Error_Msg
|
|
(File.Table (Chop_File).Name.all &
|
|
": no units found (only pragmas)");
|
|
Unit.Decrement_Last;
|
|
end if;
|
|
end if;
|
|
|
|
-- Handle case of a chop file ending with config pragmas. This can
|
|
-- happen only in default non-compilation mode, since in compilation
|
|
-- mode such configuration pragmas are part of the preceding unit.
|
|
-- We simply concatenate such pragmas to the previous file which
|
|
-- will cause a compilation error, which is appropriate.
|
|
|
|
if Unit.Last > First_Unit
|
|
and then Unit.Table (Unit.Last).Kind = Config_Pragmas
|
|
then
|
|
Unit.Decrement_Last;
|
|
end if;
|
|
end Parse_Offset_Info;
|
|
|
|
-----------------
|
|
-- Parse_Token --
|
|
-----------------
|
|
|
|
procedure Parse_Token
|
|
(Source : not null access String;
|
|
Ptr : in out Positive;
|
|
Token_Ptr : out Positive)
|
|
is
|
|
In_Quotes : Boolean := False;
|
|
|
|
begin
|
|
-- Skip separators
|
|
|
|
while Source (Ptr) = ' ' or else Source (Ptr) = ',' loop
|
|
Ptr := Ptr + 1;
|
|
end loop;
|
|
|
|
Token_Ptr := Ptr;
|
|
|
|
-- Find end-of-token
|
|
|
|
while (In_Quotes
|
|
or else not (Source (Ptr) = ' ' or else Source (Ptr) = ','))
|
|
and then Source (Ptr) >= ' '
|
|
loop
|
|
if Source (Ptr) = '"' then
|
|
In_Quotes := not In_Quotes;
|
|
end if;
|
|
|
|
Ptr := Ptr + 1;
|
|
end loop;
|
|
end Parse_Token;
|
|
|
|
---------------
|
|
-- Read_File --
|
|
---------------
|
|
|
|
procedure Read_File
|
|
(FD : File_Descriptor;
|
|
Contents : out String_Access;
|
|
Success : out Boolean)
|
|
is
|
|
Length : constant File_Offset := File_Offset (File_Length (FD));
|
|
-- Include room for EOF char
|
|
Buffer : String_Access := new String (1 .. Length + 1);
|
|
|
|
This_Read : Integer;
|
|
Read_Ptr : File_Offset := 1;
|
|
|
|
begin
|
|
|
|
loop
|
|
This_Read := Read (FD,
|
|
A => Buffer (Read_Ptr)'Address,
|
|
N => Length + 1 - Read_Ptr);
|
|
Read_Ptr := Read_Ptr + Integer'Max (This_Read, 0);
|
|
exit when This_Read <= 0;
|
|
end loop;
|
|
|
|
Buffer (Read_Ptr) := EOF;
|
|
|
|
-- Comment needed for the following ???
|
|
-- Under what circumstances can the test fail ???
|
|
-- What is copy doing in that case???
|
|
|
|
if Read_Ptr = Length then
|
|
Contents := Buffer;
|
|
|
|
else
|
|
Contents := new String (1 .. Read_Ptr);
|
|
Contents.all := Buffer (1 .. Read_Ptr);
|
|
Free (Buffer);
|
|
end if;
|
|
|
|
Success := Read_Ptr = Length + 1;
|
|
end Read_File;
|
|
|
|
----------------------------
|
|
-- Report_Duplicate_Units --
|
|
----------------------------
|
|
|
|
function Report_Duplicate_Units return Boolean is
|
|
US : SUnit_Num;
|
|
U : Unit_Num;
|
|
|
|
Duplicates : Boolean := False;
|
|
|
|
begin
|
|
US := 1;
|
|
while US < SUnit_Num (Unit.Last) loop
|
|
U := Sorted_Units.Table (US);
|
|
|
|
if Is_Duplicated (US) then
|
|
Duplicates := True;
|
|
|
|
-- Move to last two versions of duplicated file to make it clearer
|
|
-- to understand which file is retained in case of overwriting.
|
|
|
|
while US + 1 < SUnit_Num (Unit.Last) loop
|
|
exit when not Is_Duplicated (US + 1);
|
|
US := US + 1;
|
|
end loop;
|
|
|
|
U := Sorted_Units.Table (US);
|
|
|
|
if Overwrite_Files then
|
|
Warning_Msg (Unit.Table (U).File_Name.all
|
|
& " is duplicated (all but last will be skipped)");
|
|
|
|
elsif Unit.Table (U).Chop_File =
|
|
Unit.Table (Sorted_Units.Table (US + 1)).Chop_File
|
|
then
|
|
Error_Msg (Unit.Table (U).File_Name.all
|
|
& " is duplicated in "
|
|
& File.Table (Unit.Table (U).Chop_File).Name.all);
|
|
|
|
else
|
|
Error_Msg (Unit.Table (U).File_Name.all
|
|
& " in "
|
|
& File.Table (Unit.Table (U).Chop_File).Name.all
|
|
& " is duplicated in "
|
|
& File.Table
|
|
(Unit.Table
|
|
(Sorted_Units.Table (US + 1)).Chop_File).Name.all);
|
|
end if;
|
|
end if;
|
|
|
|
US := US + 1;
|
|
end loop;
|
|
|
|
if Duplicates and not Overwrite_Files then
|
|
Put_Line ("use -w to overwrite files and keep last version");
|
|
end if;
|
|
|
|
return Duplicates;
|
|
end Report_Duplicate_Units;
|
|
|
|
--------------------
|
|
-- Scan_Arguments --
|
|
--------------------
|
|
|
|
function Scan_Arguments return Boolean is
|
|
Kset : Boolean := False;
|
|
-- Set true if -k switch found
|
|
|
|
begin
|
|
Initialize_Option_Scan;
|
|
|
|
-- Scan options first
|
|
|
|
loop
|
|
case Getopt ("c gnat? h k? p q r v w x -GCC=!") is
|
|
when ASCII.NUL =>
|
|
exit;
|
|
|
|
when '-' =>
|
|
Gcc := new String'(Parameter);
|
|
Gcc_Set := True;
|
|
|
|
when 'c' =>
|
|
Compilation_Mode := True;
|
|
|
|
when 'g' =>
|
|
Gnat_Args :=
|
|
new Argument_List'(Gnat_Args.all &
|
|
new String'("-gnat" & Parameter));
|
|
|
|
when 'h' =>
|
|
Usage;
|
|
raise Types.Terminate_Program;
|
|
|
|
when 'k' =>
|
|
declare
|
|
Param : String_Access := new String'(Parameter);
|
|
|
|
begin
|
|
if Param.all /= "" then
|
|
for J in Param'Range loop
|
|
if Param (J) not in '0' .. '9' then
|
|
Error_Msg ("-k# requires numeric parameter");
|
|
return False;
|
|
end if;
|
|
end loop;
|
|
|
|
else
|
|
Param := new String'("8");
|
|
end if;
|
|
|
|
Gnat_Args :=
|
|
new Argument_List'(Gnat_Args.all &
|
|
new String'("-gnatk" & Param.all));
|
|
Kset := True;
|
|
end;
|
|
|
|
when 'p' =>
|
|
Preserve_Mode := True;
|
|
|
|
when 'q' =>
|
|
Quiet_Mode := True;
|
|
|
|
when 'r' =>
|
|
Source_References := True;
|
|
|
|
when 'v' =>
|
|
Verbose_Mode := True;
|
|
Display_Version ("GNATCHOP", "1998");
|
|
|
|
when 'w' =>
|
|
Overwrite_Files := True;
|
|
|
|
when 'x' =>
|
|
Exit_On_Error := True;
|
|
|
|
when others =>
|
|
null;
|
|
end case;
|
|
end loop;
|
|
|
|
if not Kset and then Maximum_File_Name_Length > 0 then
|
|
|
|
-- If this system has restricted filename lengths, tell gnat1
|
|
-- about them, removing the leading blank from the image string.
|
|
|
|
Gnat_Args :=
|
|
new Argument_List'(Gnat_Args.all
|
|
& new String'("-gnatk"
|
|
& Maximum_File_Name_Length_String
|
|
(Maximum_File_Name_Length_String'First + 1
|
|
.. Maximum_File_Name_Length_String'Last)));
|
|
end if;
|
|
|
|
-- Scan file names
|
|
|
|
loop
|
|
declare
|
|
S : constant String := Get_Argument (Do_Expansion => True);
|
|
|
|
begin
|
|
exit when S = "";
|
|
File.Increment_Last;
|
|
File.Table (File.Last).Name := new String'(S);
|
|
File.Table (File.Last).SR_Name := null;
|
|
end;
|
|
end loop;
|
|
|
|
-- Case of more than one file where last file is a directory
|
|
|
|
if File.Last > 1
|
|
and then Is_Directory (File.Table (File.Last).Name.all)
|
|
then
|
|
Directory := File.Table (File.Last).Name;
|
|
File.Decrement_Last;
|
|
|
|
-- Make sure Directory is terminated with a directory separator,
|
|
-- so we can generate the output by just appending a filename.
|
|
|
|
if Directory (Directory'Last) /= Directory_Separator
|
|
and then Directory (Directory'Last) /= '/'
|
|
then
|
|
Directory := new String'(Directory.all & Directory_Separator);
|
|
end if;
|
|
|
|
-- At least one filename must be given
|
|
|
|
elsif File.Last = 0 then
|
|
if Argument_Count = 0 then
|
|
Usage;
|
|
else
|
|
Try_Help;
|
|
end if;
|
|
|
|
return False;
|
|
|
|
-- No directory given, set directory to null, so that we can just
|
|
-- concatenate the directory name to the file name unconditionally.
|
|
|
|
else
|
|
Directory := new String'("");
|
|
end if;
|
|
|
|
-- Finally check all filename arguments
|
|
|
|
for File_Num in 1 .. File.Last loop
|
|
declare
|
|
F : constant String := File.Table (File_Num).Name.all;
|
|
|
|
begin
|
|
if Is_Directory (F) then
|
|
Error_Msg (F & " is a directory, cannot be chopped");
|
|
return False;
|
|
|
|
elsif not Is_Regular_File (F) then
|
|
Error_Msg (F & " not found");
|
|
return False;
|
|
end if;
|
|
end;
|
|
end loop;
|
|
|
|
return True;
|
|
|
|
exception
|
|
when Invalid_Switch =>
|
|
Error_Msg ("invalid switch " & Full_Switch);
|
|
return False;
|
|
|
|
when Invalid_Parameter =>
|
|
Error_Msg ("-k switch requires numeric parameter");
|
|
return False;
|
|
end Scan_Arguments;
|
|
|
|
----------------
|
|
-- Sort_Units --
|
|
----------------
|
|
|
|
procedure Sort_Units is
|
|
|
|
procedure Move (From : Natural; To : Natural);
|
|
-- Procedure used to sort the unit list
|
|
-- Unit.Table (To) := Unit_List (From); used by sort
|
|
|
|
function Lt (Left, Right : Natural) return Boolean;
|
|
-- Compares Left and Right units based on file name (first),
|
|
-- Chop_File (second) and Offset (third). This ordering is
|
|
-- important to keep the last version in case of duplicate files.
|
|
|
|
package Unit_Sort is new GNAT.Heap_Sort_G (Move, Lt);
|
|
-- Used for sorting on filename to detect duplicates
|
|
|
|
--------
|
|
-- Lt --
|
|
--------
|
|
|
|
function Lt (Left, Right : Natural) return Boolean is
|
|
L : Unit_Info renames
|
|
Unit.Table (Sorted_Units.Table (SUnit_Num (Left)));
|
|
|
|
R : Unit_Info renames
|
|
Unit.Table (Sorted_Units.Table (SUnit_Num (Right)));
|
|
|
|
begin
|
|
return L.File_Name.all < R.File_Name.all
|
|
or else (L.File_Name.all = R.File_Name.all
|
|
and then (L.Chop_File < R.Chop_File
|
|
or else (L.Chop_File = R.Chop_File
|
|
and then L.Offset < R.Offset)));
|
|
end Lt;
|
|
|
|
----------
|
|
-- Move --
|
|
----------
|
|
|
|
procedure Move (From : Natural; To : Natural) is
|
|
begin
|
|
Sorted_Units.Table (SUnit_Num (To)) :=
|
|
Sorted_Units.Table (SUnit_Num (From));
|
|
end Move;
|
|
|
|
-- Start of processing for Sort_Units
|
|
|
|
begin
|
|
Sorted_Units.Set_Last (SUnit_Num (Unit.Last));
|
|
|
|
for J in 1 .. Unit.Last loop
|
|
Sorted_Units.Table (SUnit_Num (J)) := J;
|
|
end loop;
|
|
|
|
-- Sort Unit.Table, using Sorted_Units.Table (0) as scratch
|
|
|
|
Unit_Sort.Sort (Natural (Unit.Last));
|
|
|
|
-- Set the Sorted_Index fields in the unit tables
|
|
|
|
for J in 1 .. SUnit_Num (Unit.Last) loop
|
|
Unit.Table (Sorted_Units.Table (J)).Sorted_Index := J;
|
|
end loop;
|
|
end Sort_Units;
|
|
|
|
-----------
|
|
-- Usage --
|
|
-----------
|
|
|
|
procedure Usage is
|
|
begin
|
|
Put_Line
|
|
("Usage: gnatchop [-c] [-h] [-k#] " &
|
|
"[-r] [-p] [-q] [-v] [-w] [-x] [--GCC=xx] file [file ...] [dir]");
|
|
|
|
New_Line;
|
|
|
|
Display_Usage_Version_And_Help;
|
|
|
|
Put_Line
|
|
(" -c compilation mode, configuration pragmas " &
|
|
"follow RM rules");
|
|
|
|
Put_Line
|
|
(" -gnatxxx passes the -gnatxxx switch to gnat parser");
|
|
|
|
Put_Line
|
|
(" -h help: output this usage information");
|
|
|
|
Put_Line
|
|
(" -k# krunch file names of generated files to " &
|
|
"no more than # characters");
|
|
|
|
Put_Line
|
|
(" -k krunch file names of generated files to " &
|
|
"no more than 8 characters");
|
|
|
|
Put_Line
|
|
(" -p preserve time stamp, output files will " &
|
|
"have same stamp as input");
|
|
|
|
Put_Line
|
|
(" -q quiet mode, no output of generated file " &
|
|
"names");
|
|
|
|
Put_Line
|
|
(" -r generate Source_Reference pragmas refer" &
|
|
"encing original source file");
|
|
|
|
Put_Line
|
|
(" -v verbose mode, output version and generat" &
|
|
"ed commands");
|
|
|
|
Put_Line
|
|
(" -w overwrite existing filenames");
|
|
|
|
Put_Line
|
|
(" -x exit on error");
|
|
|
|
Put_Line
|
|
(" --GCC=xx specify the path of the gnat parser to be used");
|
|
|
|
New_Line;
|
|
Put_Line
|
|
(" file... list of source files to be chopped");
|
|
|
|
Put_Line
|
|
(" dir directory location for split files (defa" &
|
|
"ult = current directory)");
|
|
end Usage;
|
|
|
|
-----------------
|
|
-- Warning_Msg --
|
|
-----------------
|
|
|
|
procedure Warning_Msg (Message : String) is
|
|
begin
|
|
Warning_Count := Warning_Count + 1;
|
|
Put_Line (Standard_Error, "warning: " & Message);
|
|
end Warning_Msg;
|
|
|
|
-------------------------
|
|
-- Write_Chopped_Files --
|
|
-------------------------
|
|
|
|
function Write_Chopped_Files (Input : File_Num) return Boolean is
|
|
Name : aliased constant String :=
|
|
File.Table (Input).Name.all & ASCII.NUL;
|
|
FD : File_Descriptor;
|
|
Buffer : String_Access;
|
|
Success : Boolean;
|
|
TS_Time : OS_Time;
|
|
|
|
BOM_Present : Boolean;
|
|
BOM : BOM_Kind;
|
|
-- Record presence of UTF8 BOM in input
|
|
|
|
begin
|
|
FD := Open_Read (Name'Address, Binary);
|
|
TS_Time := File_Time_Stamp (FD);
|
|
|
|
if FD = Invalid_FD then
|
|
Error_Msg ("cannot open " & File.Table (Input).Name.all);
|
|
return False;
|
|
end if;
|
|
|
|
Read_File (FD, Buffer, Success);
|
|
|
|
if not Success then
|
|
Error_Msg ("cannot read " & File.Table (Input).Name.all);
|
|
Close (FD);
|
|
return False;
|
|
end if;
|
|
|
|
if not Quiet_Mode then
|
|
Put_Line ("splitting " & File.Table (Input).Name.all & " into:");
|
|
end if;
|
|
|
|
-- Test for presence of BOM
|
|
|
|
Read_BOM (Buffer.all, BOM_Length, BOM, XML_Support => False);
|
|
BOM_Present := BOM /= Unknown;
|
|
|
|
-- Only chop those units that come from this file
|
|
|
|
for Unit_Number in 1 .. Unit.Last loop
|
|
if Unit.Table (Unit_Number).Chop_File = Input then
|
|
Write_Unit
|
|
(Source => Buffer,
|
|
Num => Unit_Number,
|
|
TS_Time => TS_Time,
|
|
Write_BOM => BOM_Present and then Unit_Number /= 1,
|
|
Success => Success);
|
|
exit when not Success;
|
|
end if;
|
|
end loop;
|
|
|
|
Close (FD);
|
|
return Success;
|
|
end Write_Chopped_Files;
|
|
|
|
-----------------------
|
|
-- Write_Config_File --
|
|
-----------------------
|
|
|
|
procedure Write_Config_File (Input : File_Num; U : Unit_Num) is
|
|
FD : File_Descriptor;
|
|
Name : aliased constant String := "gnat.adc" & ASCII.NUL;
|
|
Buffer : String_Access;
|
|
Success : Boolean;
|
|
Append : Boolean;
|
|
Buffera : String_Access;
|
|
Bufferl : Natural;
|
|
|
|
begin
|
|
Write_gnat_adc := True;
|
|
FD := Open_Read_Write (Name'Address, Binary);
|
|
|
|
if FD = Invalid_FD then
|
|
FD := Create_File (Name'Address, Binary);
|
|
Append := False;
|
|
|
|
if not Quiet_Mode then
|
|
Put_Line ("writing configuration pragmas from " &
|
|
File.Table (Input).Name.all & " to gnat.adc");
|
|
end if;
|
|
|
|
else
|
|
Append := True;
|
|
|
|
if not Quiet_Mode then
|
|
Put_Line
|
|
("appending configuration pragmas from " &
|
|
File.Table (Input).Name.all & " to gnat.adc");
|
|
end if;
|
|
end if;
|
|
|
|
Success := FD /= Invalid_FD;
|
|
|
|
if not Success then
|
|
Error_Msg ("cannot create gnat.adc");
|
|
return;
|
|
end if;
|
|
|
|
-- In append mode, acquire existing gnat.adc file
|
|
|
|
if Append then
|
|
Read_File (FD, Buffera, Success);
|
|
|
|
if not Success then
|
|
Error_Msg ("cannot read gnat.adc");
|
|
return;
|
|
end if;
|
|
|
|
-- Find location of EOF byte if any to exclude from append
|
|
|
|
Bufferl := 1;
|
|
while Bufferl <= Buffera'Last
|
|
and then Buffera (Bufferl) /= EOF
|
|
loop
|
|
Bufferl := Bufferl + 1;
|
|
end loop;
|
|
|
|
Bufferl := Bufferl - 1;
|
|
Close (FD);
|
|
|
|
-- Write existing gnat.adc to new gnat.adc file
|
|
|
|
FD := Create_File (Name'Address, Binary);
|
|
Success := Write (FD, Buffera (1)'Address, Bufferl) = Bufferl;
|
|
|
|
if not Success then
|
|
Error_Msg ("error writing gnat.adc");
|
|
return;
|
|
end if;
|
|
end if;
|
|
|
|
Buffer := Get_Config_Pragmas (Input, U);
|
|
|
|
if Buffer /= null then
|
|
Success := Write (FD, Buffer.all'Address, Buffer'Length) =
|
|
Buffer'Length;
|
|
|
|
if not Success then
|
|
Error_Msg ("disk full writing gnat.adc");
|
|
return;
|
|
end if;
|
|
end if;
|
|
|
|
Close (FD);
|
|
end Write_Config_File;
|
|
|
|
-----------------------------------
|
|
-- Write_Source_Reference_Pragma --
|
|
-----------------------------------
|
|
|
|
procedure Write_Source_Reference_Pragma
|
|
(Info : Unit_Info;
|
|
Line : Line_Num;
|
|
File : Stream_IO.File_Type;
|
|
EOL : EOL_String;
|
|
Success : in out Boolean)
|
|
is
|
|
FTE : File_Entry renames Gnatchop.File.Table (Info.Chop_File);
|
|
Nam : String_Access;
|
|
|
|
begin
|
|
if Success and then Source_References and then not Info.SR_Present then
|
|
if FTE.SR_Name /= null then
|
|
Nam := FTE.SR_Name;
|
|
else
|
|
Nam := FTE.Name;
|
|
end if;
|
|
|
|
declare
|
|
Reference : String :=
|
|
"pragma Source_Reference (000000, """
|
|
& Nam.all & """);" & EOL.Str;
|
|
|
|
Pos : Positive := Reference'First;
|
|
Lin : Line_Num := Line;
|
|
|
|
begin
|
|
while Reference (Pos + 1) /= ',' loop
|
|
Pos := Pos + 1;
|
|
end loop;
|
|
|
|
while Reference (Pos) = '0' loop
|
|
Reference (Pos) := Character'Val
|
|
(Character'Pos ('0') + Lin mod 10);
|
|
Lin := Lin / 10;
|
|
Pos := Pos - 1;
|
|
end loop;
|
|
|
|
-- Assume there are enough zeroes for any program length
|
|
|
|
pragma Assert (Lin = 0);
|
|
|
|
begin
|
|
String'Write (Stream_IO.Stream (File), Reference);
|
|
Success := True;
|
|
exception
|
|
when others =>
|
|
Success := False;
|
|
end;
|
|
end;
|
|
end if;
|
|
end Write_Source_Reference_Pragma;
|
|
|
|
----------------
|
|
-- Write_Unit --
|
|
----------------
|
|
|
|
procedure Write_Unit
|
|
(Source : not null access String;
|
|
Num : Unit_Num;
|
|
TS_Time : OS_Time;
|
|
Write_BOM : Boolean;
|
|
Success : out Boolean)
|
|
is
|
|
|
|
procedure OS_Filename
|
|
(Name : String;
|
|
W_Name : Wide_String;
|
|
OS_Name : Address;
|
|
N_Length : access Natural;
|
|
Encoding : Address;
|
|
E_Length : access Natural);
|
|
pragma Import (C, OS_Filename, "__gnat_os_filename");
|
|
-- Returns in OS_Name the proper name for the OS when used with the
|
|
-- returned Encoding value. For example on Windows this will return the
|
|
-- UTF-8 encoded name into OS_Name and set Encoding to encoding=utf8
|
|
-- (the form parameter for Stream_IO).
|
|
--
|
|
-- Name is the filename and W_Name the same filename in Unicode 16 bits
|
|
-- (this corresponds to Win32 Unicode ISO/IEC 10646). N_Length/E_Length
|
|
-- are the length returned in OS_Name/Encoding respectively.
|
|
|
|
Info : Unit_Info renames Unit.Table (Num);
|
|
Name : aliased constant String := Info.File_Name.all & ASCII.NUL;
|
|
W_Name : aliased constant Wide_String := To_Wide_String (Name);
|
|
EOL : constant EOL_String :=
|
|
Get_EOL (Source, Source'First + Info.Offset);
|
|
OS_Name : aliased String (1 .. Name'Length * 2);
|
|
O_Length : aliased Natural := OS_Name'Length;
|
|
Encoding : aliased String (1 .. 64);
|
|
E_Length : aliased Natural := Encoding'Length;
|
|
Length : File_Offset;
|
|
|
|
begin
|
|
-- Skip duplicated files
|
|
|
|
if Is_Duplicated (Info.Sorted_Index) then
|
|
Put_Line (" " & Info.File_Name.all & " skipped");
|
|
Success := Overwrite_Files;
|
|
return;
|
|
end if;
|
|
|
|
-- Get OS filename
|
|
|
|
OS_Filename
|
|
(Name, W_Name,
|
|
OS_Name'Address, O_Length'Access,
|
|
Encoding'Address, E_Length'Access);
|
|
|
|
declare
|
|
E_Name : constant String := OS_Name (1 .. O_Length);
|
|
OS_Encoding : constant String := Encoding (1 .. E_Length);
|
|
File : Stream_IO.File_Type;
|
|
|
|
begin
|
|
begin
|
|
if not Overwrite_Files and then Exists (E_Name) then
|
|
raise Stream_IO.Name_Error;
|
|
else
|
|
Stream_IO.Create
|
|
(File, Stream_IO.Out_File, E_Name, OS_Encoding);
|
|
Success := True;
|
|
end if;
|
|
|
|
exception
|
|
when Stream_IO.Name_Error | Stream_IO.Use_Error =>
|
|
Error_Msg ("cannot create " & Info.File_Name.all);
|
|
return;
|
|
end;
|
|
|
|
-- A length of 0 indicates that the rest of the file belongs to
|
|
-- this unit. The actual length must be calculated now. Take into
|
|
-- account that the last character (EOF) must not be written.
|
|
|
|
if Info.Length = 0 then
|
|
Length := Source'Last - (Source'First + Info.Offset);
|
|
else
|
|
Length := Info.Length;
|
|
end if;
|
|
|
|
-- Write BOM if required
|
|
|
|
if Write_BOM then
|
|
String'Write
|
|
(Stream_IO.Stream (File),
|
|
Source.all (Source'First .. Source'First + BOM_Length - 1));
|
|
end if;
|
|
|
|
-- Prepend configuration pragmas if necessary
|
|
|
|
if Success and then Info.Bufferg /= null then
|
|
Write_Source_Reference_Pragma (Info, 1, File, EOL, Success);
|
|
String'Write (Stream_IO.Stream (File), Info.Bufferg.all);
|
|
end if;
|
|
|
|
Write_Source_Reference_Pragma
|
|
(Info, Info.Start_Line, File, EOL, Success);
|
|
|
|
if Success then
|
|
begin
|
|
String'Write
|
|
(Stream_IO.Stream (File),
|
|
Source (Source'First + Info.Offset ..
|
|
Source'First + Info.Offset + Length - 1));
|
|
exception
|
|
when Stream_IO.Use_Error | Stream_IO.Device_Error =>
|
|
Error_Msg ("disk full writing " & Info.File_Name.all);
|
|
return;
|
|
end;
|
|
end if;
|
|
|
|
if not Quiet_Mode then
|
|
Put_Line (" " & Info.File_Name.all);
|
|
end if;
|
|
|
|
Stream_IO.Close (File);
|
|
|
|
if Preserve_Mode then
|
|
Set_File_Last_Modify_Time_Stamp (E_Name, TS_Time);
|
|
end if;
|
|
end;
|
|
end Write_Unit;
|
|
|
|
procedure Check_Version_And_Help is new Check_Version_And_Help_G (Usage);
|
|
|
|
-- Start of processing for gnatchop
|
|
|
|
begin
|
|
-- Add the directory where gnatchop is invoked in front of the path, if
|
|
-- gnatchop is invoked with directory information.
|
|
|
|
declare
|
|
Command : constant String := Command_Name;
|
|
|
|
begin
|
|
for Index in reverse Command'Range loop
|
|
if Command (Index) = Directory_Separator then
|
|
declare
|
|
Absolute_Dir : constant String :=
|
|
Normalize_Pathname
|
|
(Command (Command'First .. Index));
|
|
PATH : constant String :=
|
|
Absolute_Dir
|
|
& Path_Separator
|
|
& Getenv ("PATH").all;
|
|
begin
|
|
Setenv ("PATH", PATH);
|
|
end;
|
|
|
|
exit;
|
|
end if;
|
|
end loop;
|
|
end;
|
|
|
|
-- Process command line options and initialize global variables
|
|
|
|
-- First, scan to detect --version and/or --help
|
|
|
|
Check_Version_And_Help ("GNATCHOP", "1998");
|
|
|
|
if not Scan_Arguments then
|
|
Set_Exit_Status (Failure);
|
|
return;
|
|
end if;
|
|
|
|
-- Check presence of required executables
|
|
|
|
Gnat_Cmd := Locate_Executable (Gcc.all, not Gcc_Set);
|
|
|
|
if Gnat_Cmd = null then
|
|
goto No_Files_Written;
|
|
end if;
|
|
|
|
-- First parse all files and read offset information
|
|
|
|
for Num in 1 .. File.Last loop
|
|
if not Parse_File (Num) then
|
|
goto No_Files_Written;
|
|
end if;
|
|
end loop;
|
|
|
|
-- Check if any units have been found (assumes non-empty Unit.Table)
|
|
|
|
if Unit.Last = 0 then
|
|
if not Write_gnat_adc then
|
|
Error_Msg ("no compilation units found", Warning => True);
|
|
end if;
|
|
|
|
goto No_Files_Written;
|
|
end if;
|
|
|
|
Sort_Units;
|
|
|
|
-- Check if any duplicate files would be created. If so, emit a warning if
|
|
-- Overwrite_Files is true, otherwise generate an error.
|
|
|
|
if Report_Duplicate_Units and then not Overwrite_Files then
|
|
goto No_Files_Written;
|
|
end if;
|
|
|
|
-- Check if any files exist, if so do not write anything Because all files
|
|
-- have been parsed and checked already, there won't be any duplicates
|
|
|
|
if not Overwrite_Files and then Files_Exist then
|
|
goto No_Files_Written;
|
|
end if;
|
|
|
|
-- After this point, all source files are read in succession and chopped
|
|
-- into their destination files.
|
|
|
|
-- Source_File_Name pragmas are handled as logical file 0 so write it first
|
|
|
|
for F in 1 .. File.Last loop
|
|
if not Write_Chopped_Files (F) then
|
|
Set_Exit_Status (Failure);
|
|
return;
|
|
end if;
|
|
end loop;
|
|
|
|
if Warning_Count > 0 then
|
|
declare
|
|
Warnings_Msg : constant String := Warning_Count'Img & " warning(s)";
|
|
begin
|
|
Error_Msg (Warnings_Msg (2 .. Warnings_Msg'Last), Warning => True);
|
|
end;
|
|
end if;
|
|
|
|
return;
|
|
|
|
<<No_Files_Written>>
|
|
|
|
-- Special error exit for all situations where no files have
|
|
-- been written.
|
|
|
|
if not Write_gnat_adc then
|
|
Error_Msg ("no source files written", Warning => True);
|
|
end if;
|
|
|
|
return;
|
|
|
|
exception
|
|
when Types.Terminate_Program =>
|
|
null;
|
|
|
|
end Gnatchop;
|