Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ a.pr.bsd(1) — DOMAIN Ada 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

a.pr(1)

NAME

a.pr − source code formatter

FORMAT

a.pr [options] ada_source.a

DESCRIPTION

a.pr reformats Ada source code according to the options given below, which make a.pr easy to tailor for individual Ada coding standards. 
 
Options can be specified in a runtime configuration file, .prrc (located in either the user’s current working directory or the home directory), as well as on the command line. Default options (such as -pg) are included to an option specified in the .prrc file to be overridden on the command line. 
 
Invoked without a filename, a.pr reads its input from stdin. 
 
Error and warning messages are written to stderr. 

.prrc Command Options

(Defaults are shown in brackets.) 

chars number Specify maximum number of characters of code per line including comment and indentation; any line extending over this limit will be continued on the next line; valid range is 20 .. 500 [132]. 

indent number Specify amount of indentation between levels; valid range is 1 .. 8 [8]. 

lines number Specify maximum number of lines allowed on a page; valid range is 1 .. 1000 [55]. 

margin number Specify starting margin for top-most level; valid range is 0 .. 15 [0]. 

no_page Paginate only when pragma PAGE is encountered. 

page number Set page size; perform pagination with blank lines; valid range is 1 .. 1000 [paginate using form feeds]. 

page_lu Start each library unit (indicated by a WITH clause) on a new page [do not start on new page]. 

tabs number Print tabs for indentation whenever the number of spaces needed for indentation is greater than or equal to the specified number; valid range is 0 .. 8; if tabs 0 is specified, indentation will be performed with blanks [8]. 

reserved case Print all reserved words in the specified case: upper, lower, same [lower]. 

ident case Print all identifiers in the specified case: upper, lower, same [upper]. 

comment case Print all comments in the specified case: upper, lower, same [same]. 

align_cmts where Align comments to the right of the longest line (comment) or the longest line containing a comment (line) [comment]. 

no_warning Suppress warning messages regarding line length greater than desired [provide warnings]. 

record where Print RECORD on either the same line (same) or on the next one (next) [same]. 

a.pr Command Line Options

(Defaults are shown in brackets.) 

-ac (align comment) Align comments to the right of the longest line that contains a comment [default]. 

-al (align line) Align comments to the right of the longest line, regardless of whether it contains a comment [-ac]. 

-c number (characters) Specify maximum number of characters of source code allowed on a line. Valid range is 20 .. 500 [132]. 

-cl (comments lower) Print comments in lower case [-cs]. 

-cs (comments same) Print comments as in source code [default]. 

-cu (comments upper) Print comments in upper case [-cs]. 

-i number (indent) Specify indentation between levels. Valid range is 1 .. 8 [8]. 

-il (identifiers lower) Print identifiers in lower case [-iu]. 

-is (identifiers same) Print identifiers as in source code [-iu]. 

-iu (identifiers upper) Print identifiers in upper case [default]. 

-l number (lines) Specify maximum number of lines allowed on a page. Valid range is 1 .. 1000 [55]. 

-m number (margin) Specify starting margin for top-most level. Valid range is 0 .. 15 [0]. 

-nl (no page library unit) Do not start a new page for each library unit [default]. 

-np (no pagination) Specify no pagination. Pagination will occur only when pragma PAGE is encountered [-pg]. 

-nw (no warnings) Suppress warning messages regarding line length [-w]. 

-p number (page) Specify page size. Valid range is 1 .. 1000 [-pg]. 

-pg (pagination) Paginate using form feeds [default]. 

-pl (page library) Start a new page whenever a library unit is encountered [-nl]. 

-rl (reserved lower) Print reserved words in lower case [default]. 

-RN (record next) Print RECORD on the line following type or for [-RS]. 

-rs (reserved same) Print reserved words as in source code [-rl]. 

-RS (record same) Print RECORD on the same line as type or for [default]. 

-ru (reserved upper) Print reserved words in upper case [-rl]. 

-t number (tabs) Specify tabs for indentation whenever the number of spaces needed is greater than or equal to the specified number. If -t 0 is specified, indentation will be performed with spaces. Valid range is 0 .. 8 [8]. 

-w (warning) Provide warning messages regarding line lengths greater than desired [default]. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026