1ASA(P)                     POSIX Programmer's Manual                    ASA(P)
2
3
4

NAME

6       asa - interpret carriage-control characters
7

SYNOPSIS

9       asa [ file ... ]
10

DESCRIPTION

12       The asa utility shall write its input files to standard output, mapping
13       carriage-control characters from the text files to line-printer control
14       sequences in an implementation-defined manner.
15
16       The  first character of every line shall be removed from the input, and
17       the following actions are performed.
18
19       If the character removed is:
20
21       <space>
22              The rest of the line is output without change.
23
24       0      A <newline> is output, then the rest of the input line.
25
26       1      One or more implementation-defined  characters  that  causes  an
27              advance  to  the next page shall be output, followed by the rest
28              of the input line.
29
30       +      The <newline> of the previous line shall be replaced with one or
31              more  implementation-defined  characters that causes printing to
32              return to column position 1, followed by the rest of  the  input
33              line.  If  the '+' is the first character in the input, it shall
34              be equivalent to <space>.
35
36
37       The action of the asa utility  is  unspecified  upon  encountering  any
38       character  other  than  those  listed above as the first character in a
39       line.
40

OPTIONS

42       None.
43

OPERANDS

45       file   A pathname of a text file used for input. If  no  file  operands
46              are specified, the standard input shall be used.
47
48

STDIN

50       The  standard  input  shall be used only if no file operands are speci‐
51       fied; see the INPUT FILES section.
52

INPUT FILES

54       The input files shall be text files.
55

ENVIRONMENT VARIABLES

57       The following environment variables shall affect the execution of asa:
58
59       LANG   Provide a default value for the  internationalization  variables
60              that  are  unset  or  null.  (See the Base Definitions volume of
61              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
62              ables  for the precedence of internationalization variables used
63              to determine the values of locale categories.)
64
65       LC_ALL If set to a non-empty string value, override the values  of  all
66              the other internationalization variables.
67
68       LC_CTYPE
69              Determine  the  locale  for  the  interpretation of sequences of
70              bytes of text data as characters (for  example,  single-byte  as
71              opposed to multi-byte characters in arguments and input files).
72
73       LC_MESSAGES
74              Determine  the  locale  that should be used to affect the format
75              and contents of diagnostic messages written to standard error.
76
77       NLSPATH
78              Determine the location of message catalogs for the processing of
79              LC_MESSAGES .
80
81

ASYNCHRONOUS EVENTS

83       Default.
84

STDOUT

86       The  standard  output shall be the text from the input file modified as
87       described in the DESCRIPTION section.
88

STDERR

90       None.
91

OUTPUT FILES

93       None.
94

EXTENDED DESCRIPTION

96       None.
97

EXIT STATUS

99       The following exit values shall be returned:
100
101        0     All input files were output successfully.
102
103       >0     An error occurred.
104
105

CONSEQUENCES OF ERRORS

107       Default.
108
109       The following sections are informative.
110

APPLICATION USAGE

112       None.
113

EXAMPLES

115        1. The following command:
116
117
118           asa file
119
120       permits the viewing of file (created by a program  using  FORTRAN-style
121       carriage-control characters) on a terminal.
122
123        2. The following command:
124
125
126           a.out | asa | lp
127
128       formats the FORTRAN output of a.out and directs it to the printer.
129

RATIONALE

131       The  asa  utility  is needed to map "standard" FORTRAN 77 output into a
132       form acceptable to contemporary printers. Usually, asa is used to  pipe
133       data to the lp utility; see lp.
134
135       This  utility  is generally used only by FORTRAN programs. The standard
136       developers decided to retain asa to avoid breaking the historical large
137       base  of  FORTRAN  applications that put carriage-control characters in
138       their output files. There is no requirement that a system have  a  FOR‐
139       TRAN compiler in order to run applications that need asa.
140
141       Historical  implementations  have used an ASCII <form-feed> in response
142       to a 1 and an ASCII <carriage-return> in response to a '+' . It is sug‐
143       gested  that  implementations treat characters other than 0, 1, and '+'
144       as <space> in the absence of any compelling  reason  to  do  otherwise.
145       However,  the  action  is  listed  here as "unspecified", permitting an
146       implementation to provide extensions to access fast multiple-line slew‐
147       ing and channel seeking in a non-portable manner.
148

FUTURE DIRECTIONS

150       None.
151

SEE ALSO

153       fort77 , lp
154
156       Portions  of  this text are reprinted and reproduced in electronic form
157       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
158       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
159       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
160       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
161       event of any discrepancy between this version and the original IEEE and
162       The  Open Group Standard, the original IEEE and The Open Group Standard
163       is the referee document. The original Standard can be  obtained  online
164       at http://www.opengroup.org/unix/online.html .
165
166
167
168IEEE/The Open Group                  2003                               ASA(P)
Impressum