1ASA(1P) POSIX Programmer's Manual ASA(1P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 asa - interpret carriage-control characters
13
15 asa [ file ... ]
16
18 The asa utility shall write its input files to standard output, mapping
19 carriage-control characters from the text files to line-printer control
20 sequences in an implementation-defined manner.
21
22 The first character of every line shall be removed from the input, and
23 the following actions are performed.
24
25 If the character removed is:
26
27 <space>
28 The rest of the line is output without change.
29
30 0 A <newline> is output, then the rest of the input line.
31
32 1 One or more implementation-defined characters that causes an
33 advance to the next page shall be output, followed by the rest
34 of the input line.
35
36 + The <newline> of the previous line shall be replaced with one or
37 more implementation-defined characters that causes printing to
38 return to column position 1, followed by the rest of the input
39 line. If the '+' is the first character in the input, it shall
40 be equivalent to <space>.
41
42
43 The action of the asa utility is unspecified upon encountering any
44 character other than those listed above as the first character in a
45 line.
46
48 None.
49
51 file A pathname of a text file used for input. If no file operands
52 are specified, the standard input shall be used.
53
54
56 The standard input shall be used only if no file operands are speci‐
57 fied; see the INPUT FILES section.
58
60 The input files shall be text files.
61
63 The following environment variables shall affect the execution of asa:
64
65 LANG Provide a default value for the internationalization variables
66 that are unset or null. (See the Base Definitions volume of
67 IEEE Std 1003.1-2001, Section 8.2, Internationalization Vari‐
68 ables for the precedence of internationalization variables used
69 to determine the values of locale categories.)
70
71 LC_ALL If set to a non-empty string value, override the values of all
72 the other internationalization variables.
73
74 LC_CTYPE
75 Determine the locale for the interpretation of sequences of
76 bytes of text data as characters (for example, single-byte as
77 opposed to multi-byte characters in arguments and input files).
78
79 LC_MESSAGES
80 Determine the locale that should be used to affect the format
81 and contents of diagnostic messages written to standard error.
82
83 NLSPATH
84 Determine the location of message catalogs for the processing of
85 LC_MESSAGES .
86
87
89 Default.
90
92 The standard output shall be the text from the input file modified as
93 described in the DESCRIPTION section.
94
96 None.
97
99 None.
100
102 None.
103
105 The following exit values shall be returned:
106
107 0 All input files were output successfully.
108
109 >0 An error occurred.
110
111
113 Default.
114
115 The following sections are informative.
116
118 None.
119
121 1. The following command:
122
123
124 asa file
125
126 permits the viewing of file (created by a program using FORTRAN-style
127 carriage-control characters) on a terminal.
128
129 2. The following command:
130
131
132 a.out | asa | lp
133
134 formats the FORTRAN output of a.out and directs it to the printer.
135
137 The asa utility is needed to map "standard" FORTRAN 77 output into a
138 form acceptable to contemporary printers. Usually, asa is used to pipe
139 data to the lp utility; see lp.
140
141 This utility is generally used only by FORTRAN programs. The standard
142 developers decided to retain asa to avoid breaking the historical large
143 base of FORTRAN applications that put carriage-control characters in
144 their output files. There is no requirement that a system have a FOR‐
145 TRAN compiler in order to run applications that need asa.
146
147 Historical implementations have used an ASCII <form-feed> in response
148 to a 1 and an ASCII <carriage-return> in response to a '+' . It is sug‐
149 gested that implementations treat characters other than 0, 1, and '+'
150 as <space> in the absence of any compelling reason to do otherwise.
151 However, the action is listed here as "unspecified", permitting an
152 implementation to provide extensions to access fast multiple-line slew‐
153 ing and channel seeking in a non-portable manner.
154
156 None.
157
159 fort77, lp
160
162 Portions of this text are reprinted and reproduced in electronic form
163 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
164 -- Portable Operating System Interface (POSIX), The Open Group Base
165 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
166 Electrical and Electronics Engineers, Inc and The Open Group. In the
167 event of any discrepancy between this version and the original IEEE and
168 The Open Group Standard, the original IEEE and The Open Group Standard
169 is the referee document. The original Standard can be obtained online
170 at http://www.opengroup.org/unix/online.html .
171
172
173
174IEEE/The Open Group 2003 ASA(1P)