.\" Man page for gnatpp. .\" .\" Copyright (C) 2006 Ludovic Brenta .\" Copyright (C) 2014 Nicolas Boulenguez .\" .\" This is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3, or (at your option) any later .\" version. .\" .\" This is distributed in the hope that it will be useful, but WITHOUT .\" 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 .\" along with this page, in /usr/share/common-licenses/GPL-3. If not, \" see . .\" .TH "GNATPP" 1 "2014-08-09" "Debian GNU/Linux" "ASIS Tools" .\"---------------------------------------------------------------------- .SH NAME gnatpp \- Ada pretty\-printer .\"---------------------------------------------------------------------- .SH SYNOPSIS \fBgnatpp\fR [options] {\fIfilename\fR | \fB\-files\fR \fIfilename\fR} [\fIgcc_switches\fR] .\"---------------------------------------------------------------------- .SH DESCRIPTION \fBgnatpp\fR recreates the source text of the specified Ada units from GNAT's parse tree. Along the way, it reformats the source text according to the many options. The defaults are suitable for the GNAT style guide. .\"---------------------------------------------------------------------- .SH OPTIONS .IP \fB\-A\fR(0|1|2|3|4|5) set alignment, all the alignments are set ON by default .RS .IP 0 set the default for all the alignments OFF .IP 1 align colons in declarations .IP 2 align assignments in declarations .IP 3 align assignments in assignment statements .IP 4 align arrow delimiters in associations .IP 5 align 'AT' keywords in component clauses .RE .IP \fB\-a\fR(L|U|M) set attribute casing .RS .IP L lower case .IP U upper case .IP M mixed case (set as default) .RE .IP \fB\-c\fR(0|1|2|3|4) comments layout .RS .IP 0 do not format comments .IP 1 GNAT style comment line indentation (set as default) .IP 2 standard comment line indentation .IP 3 GNAT style comment beginning .IP 4 reformat comment blocks .RE .IP \fB\-cl\fR\fInnn\fR indentation level for continuation lines, \fInnn\fR from 1 .. 9 .IP \fB\-D\fR\fIfile\fR set \fIfile\fR as the dictionary file defining casing exceptions .IP \fB\-D\-\fR do not use RM95\-defined casing for predefined names, use casing defined by \fB\-n\fR parameter and dictionary file(s) instead .IP \fB\-e\fR do not set missed end/exit labels .IP \fB\-ff\fR put Form Feed after a pragma Page .IP \fB\-gnatec\fR\fIpath\fR the same as GNAT \-gnatec option .IP \fB\-i\fR\fInnn\fR indentation level, \fInnn\fR from 1 .. 9, the default value is 3 .IP \fB\-I\fR\fRdir\fR the same as GNAT \-I option .IP \fB\-I\-\fR the same as GNAT \-I\- option .IP \fB\-k\fR(L|U) set keyword casing .RS .IP L lower case (set as default) .IP U upper case .RE .IP \fB\-l\fR(1|2|3) set construct layout .RS .IP 1 GNAT style layout (set as default) .IP 2 compact layout .IP 3 uncompact layout .RE .IP \fB\-M\fR\fInnn\fR set maximum line length, \fInnn\fR from 32 .. 256, the default value is 79 .IP \fB\-n\fR(D|U|L|M) set name casing (for both defining and usage occurrences) .RS .IP D as declared (set as default) .IP U all in upper case .IP L all in lower case .IP M mixed .RE .IP \fB\-N\fR no tabulation in comments .IP \fB\-p\fR(L|U|M) .RS .IP L lower case .IP U upper case .IP M mixed case (set as default) .RE .IP \fB\-\-RTS=\fR\fIdir\fR the same as GNAT \-\-RTS option .IP \fB\-T\fR\fInnn\fR do not use additional indentation level for case alternatives and variants if their number is \fInnn\fR or more (the default value is 10) .IP \fB\-q\fR quiet mode .IP \fB\-v\fR verbose mode .IP \fB\-dd\fR progress indicator verbose mode .IP \fB\-w\fR warnings ON .SS Output file control .IP \fB\-pipe\fR send the output into stdout .IP "\fB\-o\fR \fIoutput_file\fR" write the output into output_file. Give up if \fIoutput_file\fR already exists .IP "\fB\-of\fR \fIoutput_file\fR" write the output into output_file, overriding the existing file .IP \fB\-r\fR replace the argument source with the pretty\-printed source and copy the argument source into \fIfilename.npp\fR. Give up if \fIfilename.npp\fR already exists. .IP \fB\-rf\fR replace the argument source with the pretty\-printed source and copy the argument source into \fIfilename.npp\fR, overriding the existing file .IP \fB\-rnb\fR replace the argument source with the pretty\-printed source and do not create the back\-up copy of the argument source .SS Input files .IP \fIfilename\fR the name of the Ada source file to be reformatted. Wildcards are allowed. .IP "\fB\-files\fR \fIfilename\fR" the name of the text file containing a list of Ada source files to reformat .SS GCC switches .IP \fIgcc_switches\fR Passed to gnatgcc as "\fB\-cargs\fR \fIgcc_switches\fR". .\"---------------------------------------------------------------------- .SH SEE ALSO gnat(1), asistant(1), gnat2xml(1), gnatcheck(1), gnatelim(1), gnatmetric(1), gnatstub(1), gnattest(1) .P Documentation about the ASIS tools may be found in \fI/usr/share/doc/asis\-doc/\fR if the \fBasis\-doc\fR package is installed. .\" The reference documentation about ASIS is excluded due to license problems, but may be found in various formats at \fIhttp://libre.adacore.com/developers/documentation\fR.