summaryrefslogtreecommitdiffstats
path: root/man1p/asa.1p
blob: 73537f04d91cdc8fb2128585dc243039a22f9ff8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "ASA" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" asa 
.SH NAME
asa \- interpret carriage-control characters
.SH SYNOPSIS
.LP
\fBasa\fP \fB[\fP \fIfile\fP \fB...\fP \fB]\fP\fB\fP
.SH DESCRIPTION
.LP
The \fIasa\fP utility shall write its input files to standard output,
mapping carriage-control characters from the text files
to line-printer control sequences in an implementation-defined manner.
.LP
The first character of every line shall be removed from the input,
and the following actions are performed.
.LP
If the character removed is:
.TP 7
<space>
The rest of the line is output without change.
.TP 7
0
A <newline> is output, then the rest of the input line.
.TP 7
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.
.TP 7
\fB+\fP
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 \fB'+'\fP is the first character in the
input, it shall be equivalent to <space>.
.sp
.LP
The action of the \fIasa\fP utility is unspecified upon encountering
any character other than those listed above as the first
character in a line.
.SH OPTIONS
.LP
None.
.SH OPERANDS
.TP 7
\fIfile\fP
A pathname of a text file used for input. If no \fIfile\fP operands
are specified, the standard input shall be used.
.sp
.SH STDIN
.LP
The standard input shall be used only if no \fIfile\fP operands are
specified; see the INPUT FILES section.
.SH INPUT FILES
.LP
The input files shall be text files.
.SH ENVIRONMENT VARIABLES
.LP
The following environment variables shall affect the execution of
\fIasa\fP:
.TP 7
\fILANG\fP
Provide a default value for the internationalization variables that
are unset or null. (See the Base Definitions volume of
IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
for
the precedence of internationalization variables used to determine
the values of locale categories.)
.TP 7
\fILC_ALL\fP
If set to a non-empty string value, override the values of all the
other internationalization variables.
.TP 7
\fILC_CTYPE\fP
Determine the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as
opposed to multi-byte characters in arguments and input files).
.TP 7
\fILC_MESSAGES\fP
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard
error.
.TP 7
\fINLSPATH\fP
Determine the location of message catalogs for the processing of \fILC_MESSAGES
\&.\fP 
.sp
.SH ASYNCHRONOUS EVENTS
.LP
Default.
.SH STDOUT
.LP
The standard output shall be the text from the input file modified
as described in the DESCRIPTION section.
.SH STDERR
.LP
None.
.SH OUTPUT FILES
.LP
None.
.SH EXTENDED DESCRIPTION
.LP
None.
.SH EXIT STATUS
.LP
The following exit values shall be returned:
.TP 7
\ 0
All input files were output successfully.
.TP 7
>0
An error occurred.
.sp
.SH CONSEQUENCES OF ERRORS
.LP
Default.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
None.
.SH EXAMPLES
.IP " 1." 4
The following command:
.sp
.RS
.nf

\fBasa\fP \fIfile\fP
.fi
.RE
.LP
permits the viewing of \fIfile\fP (created by a program using FORTRAN-style
carriage-control characters) on a terminal.
.LP
.IP " 2." 4
The following command:
.sp
.RS
.nf

\fBa.out | asa | lp
\fP
.fi
.RE
.LP
formats the FORTRAN output of \fBa.out\fP and directs it to the printer.
.LP
.SH RATIONALE
.LP
The \fIasa\fP utility is needed to map "standard" FORTRAN 77 output
into a form acceptable to contemporary printers. Usually,
\fIasa\fP is used to pipe data to the \fIlp\fP utility; see \fIlp\fP.
.LP
This utility is generally used only by FORTRAN programs. The standard
developers decided to retain \fIasa\fP to avoid breaking
the historical large base of FORTRAN applications that put carriage-control
characters in their output files. There is no
requirement that a system have a FORTRAN compiler in order to run
applications that need \fIasa\fP.
.LP
Historical implementations have used an ASCII <form-feed> in response
to a 1 and an ASCII <carriage-return> in
response to a \fB'+'\fP . It is suggested that implementations treat
characters other than 0, 1, and \fB'+'\fP 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 non-portable
manner.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIfort77\fP , \fIlp\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .