NAME
asa — interpret
carriage-control characters
DESCRIPTION
This utility is optional. It shall be provided on systems that support the FOR - TRAN Runtime Utilities Option.
SYNOPSIS
asa |
[file ...] |
DESCRIPTION
The asa utility shall write its input
files to standard output, mapping carriagecontrol characters from the text
files to line-printer control sequences in an implementation-defined manner.
The first character of every line shall be removed from the input, and the
following actions shall be performed: If the character removed is:
<space> The rest of the line shall be output without change. 0 A
<newline> shall be output, then the rest of the input line. 1 One or
more implementation-defined characters that causes an advance to the next
page shall be output, followed by the rest of the input line. + The
<newline> of the previous line shall be replaced with one or more
implementation-defined characters that causes printing to return to column
position 1, followed by the rest of the input line. If the + is the first
character in the input, it shall have the same effect as <space>. The
action of the asa utility is unspecified upon
encountering any character other than those listed above as the first
character in a line.
OPTIONS
None.
OPERANDS
- file
-
A pathname of a text file used for input. If no file operands are specified, the standard input shall be used.
STANDARD INPUT
The standard input shall be used only if no file operands are specified. See Input Files.
INPUT FILES
The input files shall be text files.
C FORTRAN Development and Runtime Utilities Options
ENVIRONMENT VARIABLES
The following environment variables shall affect the execution of
asa:
LANG-
This variable shall determine the locale to use for the locale categories when both LC_ALL and the corresponding environment variable (beginning with LC_ ) do not specify a locale. See 2.6.
LC_ALL-
This variable shall determine the locale to be used to override any values for locale categories specified by the settings of LANG or any environment variables beginning with LC_.
LC_CTYPE-
This variable shall determine the locale for the interpretation of sequences of bytes of text data as characters (e.g., single- versus multibyte characters in arguments and input files).
LC_MESSAGES-
This variable shall determine the language in which messages should be written.
ASYNCHRONOUS EVENTS
Default.
STANDARD OUTPUT
The standard output shall be the text from the input file modified as described in C.1.2.
STANDARD ERROR
None.
OUTPUT FILES
None.
EXTENDED DESCRIPTION
None.
EXIT STATUS
The asa utility shall exit with one of the
following values:
CONSEQUENCES OF ERRORS
Default.
RATIONALE
EXAMPLES
The asa utility is needed to map
‘‘standard’’ FORTRAN 77 output
into a form acceptable to contemporary printers. Usually
asa is used to pipe data to the lp utility (see lp
in lp(1) .) The following command:
asa file permits the viewing of file (created by a
program using FORTRAN -style carriage control characters)
on a terminal. The following command: a.out | asa |
lp formats the FORTRAN output of a.out and directs it to
the printer.
HISTORY OF DECISIONS MADE
This utility is generally used only by FORTRAN
programs. It was moved to this annex in response to multiple ballot
objections requesting its removal. The working group decided to retain
asa to avoid breaking the existing large base of
FOR - TRAN applications that put
carriage control characters in their output files. This is a compromise
position to achieve balloting acceptance: the overhead of maintaining a
separate option in
POSIX. 2
for just this one utility is seen to be small in comparison to the benefit
achieved for FORTRAN applications. Since it is a separate
option, there is no requirement that a system have a
FORTRAN compiler in order to run applications that need
asa. Historical implementations have used an
ASCII <form-feed> character in response to a
’1’, and an ASCII <carriage-return> in
response to a ’+’. It is suggested that implementations treat
characters other than ’0’, ’1’, and
’+’ as <space> in the absence of any compelling reason
to do otherwise. However, the action is listed here as
‘‘unspecified,’’ permitting an implementation to
provide extensions to access fast multiple line slewing and channel seeking
in a nonportable manner.
C FORTRAN Development and Runtime Utilities Options