add directory Minix
This commit is contained in:
411
Minix/2.0.0/wwwman/man9/as.9.html
Normal file
411
Minix/2.0.0/wwwman/man9/as.9.html
Normal file
@@ -0,0 +1,411 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>as(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>as(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>as</STRONG> <STRONG>-</STRONG> <STRONG>assembler</STRONG>
|
||||
|
||||
<STRONG>AS</STRONG>--<STRONG>--ASSEMBLER</STRONG> <STRONG>[IBM]</STRONG>
|
||||
|
||||
|
||||
|
||||
This document describes the language accepted by the 80386
|
||||
assembler that is part of the Amsterdam Compiler Kit. Note that only
|
||||
the syntax is described, only a few 386 instructions are shown as
|
||||
examples.
|
||||
|
||||
<STRONG>Tokens,</STRONG> <STRONG>Numbers,</STRONG> <STRONG>Character</STRONG> <STRONG>Constants,</STRONG> <STRONG>and</STRONG> <STRONG>Strings</STRONG>
|
||||
|
||||
The syntax of numbers is the same as in C. The constants 32, 040,
|
||||
and 0x20 all represent the same number, but are written in decimal,
|
||||
octal, and hex, respectively. The rules for character constants and
|
||||
strings are also the same as in C. For example, 'a' is a character
|
||||
constant. A typical string is "string". Expressions may be formed with
|
||||
C operators, but must use [ and ] for parentheses. (Normal parentheses
|
||||
are claimed by the operand syntax.)
|
||||
|
||||
<STRONG>Symbols</STRONG>
|
||||
|
||||
Symbols contain letters and digits, as well as three special
|
||||
characters: dot, tilde, and underscore. The first character may not be
|
||||
a digit or tilde.
|
||||
|
||||
The names of the 80386 registers are reserved. These are:
|
||||
|
||||
al, bl, cl, dl
|
||||
ah, bh, ch, dh
|
||||
ax, bx, cx, dx, eax, ebx, ecx, edx
|
||||
si, di, bp, sp, esi, edi, ebp, esp
|
||||
cs, ds, ss, es, fs, gs
|
||||
|
||||
The xx and exx variants of the eight general registers are treated as
|
||||
synonyms by the assembler. Normally "ax" is the 16-bit low half of the
|
||||
32-bit "eax" register. The assembler determines if a 16 or 32 bit
|
||||
operation is meant solely by looking at the instruction or the
|
||||
instruction prefixes. It is however best to use the proper registers
|
||||
when writing assembly to not confuse those who read the code.
|
||||
|
||||
The last group of 6 segment registers are used for selector + offset
|
||||
mode addressing, in which the effective address is at a given offset in
|
||||
one of the 6 segments.
|
||||
|
||||
Names of instructions and pseudo-ops are not reserved. Alphabetic
|
||||
characters in opcodes and pseudo-ops must be in lower case.
|
||||
|
||||
<STRONG>Separators</STRONG>
|
||||
Commas, blanks, and tabs are separators and can be interspersed
|
||||
freely between tokens, but not within tokens. Commas are only legal
|
||||
between operands.
|
||||
|
||||
<STRONG>Comments</STRONG>
|
||||
|
||||
The comment character is '!'. The rest of the line is ignored.
|
||||
|
||||
<STRONG>Opcodes</STRONG>
|
||||
|
||||
The opcodes are listed below. Notes: (1) Different names for the
|
||||
same instruction are separated by '/'. (2) Square brackets ([])
|
||||
indicate that 0 or 1 of the enclosed characters can be included. (3)
|
||||
Curly brackets ({}) work similarly, except that one of the enclosed
|
||||
characters <EM>must</EM> be included. Thus square brackets indicate an option,
|
||||
whereas curly brackets indicate that a choice must be made.
|
||||
|
||||
<STRONG>Data</STRONG> <STRONG>Transfer</STRONG>
|
||||
|
||||
mov[b] dest, source ! Move word/byte from source to dest
|
||||
pop dest ! Pop stack
|
||||
push source ! Push stack
|
||||
xchg[b] op1, op2 ! Exchange word/byte
|
||||
xlat ! Translate
|
||||
o16 ! Operate on a 16 bit object instead of 32 bit
|
||||
|
||||
<STRONG>Input/Output</STRONG>
|
||||
|
||||
in[b] source ! Input from source I/O port
|
||||
in[b] ! Input from DX I/O port
|
||||
out[b] dest ! Output to dest I/O port
|
||||
out[b] ! Output to DX I/O port
|
||||
|
||||
<STRONG>Address</STRONG> <STRONG>Object</STRONG>
|
||||
|
||||
lds reg,source ! Load reg and DS from source
|
||||
les reg,source ! Load reg and ES from source
|
||||
lea reg,source ! Load effect address of source to reg and DS
|
||||
{cdsefg}seg ! Specify seg register for next instruction
|
||||
a16 ! Use 16 bit addressing mode instead of 32 bit
|
||||
|
||||
<STRONG>Flag</STRONG> <STRONG>Transfer</STRONG>
|
||||
|
||||
lahf ! Load AH from flag register
|
||||
popf ! Pop flags
|
||||
pushf ! Push flags
|
||||
sahf ! Store AH in flag register
|
||||
|
||||
<STRONG>Addition</STRONG>
|
||||
|
||||
aaa ! Adjust result of BCD addition
|
||||
add[b] dest,source ! Add
|
||||
adc[b] dest,source ! Add with carry
|
||||
daa ! Decimal Adjust after addition
|
||||
inc[b] dest ! Increment by 1
|
||||
|
||||
<STRONG>Subtraction</STRONG>
|
||||
|
||||
aas ! Adjust result of BCD subtraction
|
||||
sub[b] dest,source ! Subtract
|
||||
sbb[b] dest,source ! Subtract with borrow from dest
|
||||
das ! Decimal adjust after subtraction
|
||||
dec[b] dest ! Decrement by one
|
||||
neg[b] dest ! Negate
|
||||
cmp[b] dest,source ! Compare
|
||||
|
||||
<STRONG>Multiplication</STRONG>
|
||||
|
||||
aam ! Adjust result of BCD multiply
|
||||
imul[b] source ! Signed multiply
|
||||
mul[b] source ! Unsigned multiply
|
||||
|
||||
<STRONG>Division</STRONG>
|
||||
|
||||
aad ! Adjust AX for BCD division
|
||||
o16 cbw ! Sign extend AL into AH
|
||||
o16 cwd ! Sign extend AX into DX
|
||||
cwde ! Sign extend AX into EAX
|
||||
cdq ! Sign extend EAX into EDX
|
||||
idiv[b] source ! Signed divide
|
||||
div[b] source ! Unsigned divide
|
||||
|
||||
<STRONG>Logical</STRONG>
|
||||
|
||||
and[b] dest,source ! Logical and
|
||||
not[b] dest ! Logical not
|
||||
or[b] dest,source ! Logical inclusive or
|
||||
test[b] dest,source ! Logical test
|
||||
xor[b] dest,source ! Logical exclusive or
|
||||
|
||||
<STRONG>Shift</STRONG>
|
||||
|
||||
sal[b]/shl[b] dest,CL ! Shift logical left
|
||||
sar[b] dest,CL ! Shift arithmetic right
|
||||
shr[b] dest,CL ! Shift logical right
|
||||
|
||||
<STRONG>Rotate</STRONG>
|
||||
|
||||
rcl[b] dest,CL ! Rotate left, with carry
|
||||
rcr[b] dest,CL ! Rotate right, with carry
|
||||
rol[b] dest,CL ! Rotate left
|
||||
ror[b] dest,CL ! Rotate right
|
||||
|
||||
<STRONG>String</STRONG> <STRONG>Manipulation</STRONG>
|
||||
|
||||
cmps[b] ! Compare string element ds:esi with es:edi
|
||||
lods[b] ! Load from ds:esi into AL, AX, or EAX
|
||||
movs[b] ! Move from ds:esi to es:edi
|
||||
rep ! Repeat next instruction until ECX=0
|
||||
repe/repz ! Repeat next instruction until ECX=0 and ZF=1
|
||||
repne/repnz ! Repeat next instruction until ECX!=0 and ZF=0
|
||||
scas[b] ! Compare ds:esi with AL/AX/EAX
|
||||
stos[b] ! Store AL/AX/EAX in es:edi
|
||||
|
||||
<STRONG>Control</STRONG> <STRONG>Transfer</STRONG>
|
||||
|
||||
<EM>As</EM> accepts a number of special jump opcodes that can assemble to
|
||||
instructions with either a byte displacement, which can only reach to
|
||||
targets within -126 to +129 bytes of the branch, or an instruction with
|
||||
a 32-bit displacement. The assembler automatically chooses a byte or
|
||||
word displacement instruction.
|
||||
|
||||
The English translation of the opcodes should be obvious, with
|
||||
'l(ess)' and 'g(reater)' for signed comparisions, and 'b(elow)' and
|
||||
'a(bove)*(CQ for unsigned comparisions. There are lots of synonyms to
|
||||
allow you to write "jump if not that" instead of "jump if this".
|
||||
|
||||
The 'call', 'jmp', and 'ret' instructions can be either
|
||||
intrasegment or intersegment. The intersegment versions are indicated
|
||||
with the suffix 'f'.
|
||||
|
||||
<STRONG>Unconditional</STRONG>
|
||||
|
||||
jmp[f] dest ! jump to dest (8 or 32-bit displacement)
|
||||
call[f] dest ! call procedure
|
||||
ret[f] ! return from procedure
|
||||
|
||||
<STRONG>Conditional</STRONG>
|
||||
|
||||
ja/jnbe ! if above/not below or equal (unsigned)
|
||||
jae/jnb/jnc ! if above or equal/not below/not carry (uns.)
|
||||
jb/jnae/jc ! if not above nor equal/below/carry (unsigned)
|
||||
jbe/jna ! if below or equal/not above (unsigned)
|
||||
jg/jnle ! if greater/not less nor equal (signed)
|
||||
jge/jnl ! if greater or equal/not less (signed)
|
||||
jl/jnqe ! if less/not greater nor equal (signed)
|
||||
jle/jgl ! if less or equal/not greater (signed)
|
||||
je/jz ! if equal/zero
|
||||
jne/jnz ! if not equal/not zero
|
||||
jno ! if overflow not set
|
||||
jo ! if overflow set
|
||||
jnp/jpo ! if parity not set/parity odd
|
||||
jp/jpe ! if parity set/parity even
|
||||
jns ! if sign not set
|
||||
js ! if sign set
|
||||
|
||||
<STRONG>Iteration</STRONG> <STRONG>Control</STRONG>
|
||||
|
||||
jcxz dest ! jump if ECX = 0
|
||||
loop dest ! Decrement ECX and jump if CX != 0
|
||||
loope/loopz dest ! Decrement ECX and jump if ECX = 0 and ZF = 1
|
||||
loopne/loopnz dest ! Decrement ECX and jump if ECX != 0 and ZF = 0
|
||||
|
||||
<STRONG>Interrupt</STRONG>
|
||||
|
||||
int n ! Software interrupt n
|
||||
into ! Interrupt if overflow set
|
||||
iretd ! Return from interrupt
|
||||
|
||||
<STRONG>Flag</STRONG> <STRONG>Operations</STRONG>
|
||||
|
||||
clc ! Clear carry flag
|
||||
cld ! Clear direction flag
|
||||
cli ! Clear interrupt enable flag
|
||||
cmc ! Complement carry flag
|
||||
stc ! Set carry flag
|
||||
std ! Set direction flag
|
||||
sti ! Set interrupt enable flag
|
||||
|
||||
|
||||
<STRONG>Location</STRONG> <STRONG>Counter</STRONG>
|
||||
|
||||
The special symbol '.' is the location counter and its value is the
|
||||
address of the first byte of the instruction in which the symbol appears
|
||||
and can be used in expressions.
|
||||
|
||||
<STRONG>Segments</STRONG>
|
||||
|
||||
There are four different assembly segments: text, rom, data and
|
||||
bss. Segments are declared and selected by the .<EM>sect</EM> pseudo-op. It is
|
||||
customary to declare all segments at the top of an assembly file like
|
||||
this:
|
||||
|
||||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
|
||||
The assembler accepts up to 16 different segments, but MINIX expects
|
||||
only four to be used. Anything can in principle be assembled into any
|
||||
segment, but the MINIX bss segment may only contain uninitialized data.
|
||||
Note that the '.' symbol refers to the location in the current segment.
|
||||
|
||||
<STRONG>Labels</STRONG>
|
||||
|
||||
There are two types: name and numeric. Name labels consist of a
|
||||
name followed by a colon (:).
|
||||
|
||||
The numeric labels are single digits. The nearest 0: label may be
|
||||
referenced as 0f in the forward direction, or 0b backwards.
|
||||
|
||||
<STRONG>Statement</STRONG> <STRONG>Syntax</STRONG>
|
||||
|
||||
Each line consists of a single statement. Blank or comment lines
|
||||
are allowed.
|
||||
|
||||
<STRONG>Instruction</STRONG> <STRONG>Statements</STRONG>
|
||||
|
||||
The most general form of an instruction is
|
||||
|
||||
label: opcode operand1, operand2 ! comment
|
||||
|
||||
|
||||
<STRONG>Expression</STRONG> <STRONG>Semantics</STRONG>
|
||||
|
||||
The following operators can be used: + - * / & | ^ ~ << (shift
|
||||
left) >> (shift right) - (unary minus). 32-bit integer arithmetic is
|
||||
used. Division produces a truncated quotient.
|
||||
|
||||
<STRONG>Addressing</STRONG> <STRONG>Modes</STRONG>
|
||||
|
||||
Below is a list of the addressing modes supported. Each one is
|
||||
followed by an example.
|
||||
|
||||
constant mov eax, 123456
|
||||
direct access mov eax, (counter)
|
||||
register mov eax, esi
|
||||
indirect mov eax, (esi)
|
||||
base + disp. mov eax, 6(ebp)
|
||||
scaled index mov eax, (4*esi)
|
||||
base + index mov eax, (ebp)(2*esi)
|
||||
base + index + disp. mov eax, 10(edi)(1*esi)
|
||||
|
||||
Any of the constants or symbols may be replacement by expressions.
|
||||
Direct access, constants and displacements may be any type of
|
||||
expression. A scaled index with scale 1 may be written without the
|
||||
'1*'.
|
||||
|
||||
<STRONG>Call</STRONG> <STRONG>and</STRONG> <STRONG>Jmp</STRONG>
|
||||
|
||||
The 'call' and 'jmp' instructions can be interpreted as a load into
|
||||
the instruction pointer.
|
||||
|
||||
call _routine ! Direct, intrasegment
|
||||
call (subloc) ! Indirect, intrasegment
|
||||
call 6(ebp) ! Indirect, intrasegment
|
||||
call ebx ! Direct, intrasegment
|
||||
call (ebx) ! Indirect, intrasegment
|
||||
callf (subloc) ! Indirect, intersegment
|
||||
callf seg:offs ! Direct, intersegment
|
||||
|
||||
|
||||
|
||||
<STRONG>Symbol</STRONG> <STRONG>Assigment</STRONG>
|
||||
|
||||
|
||||
Symbols can acquire values in one of two ways. Using a symbol as a
|
||||
label sets it to '.' for the current segment with type relocatable.
|
||||
Alternative, a symbol may be given a name via an assignment of the form
|
||||
|
||||
symbol = expression
|
||||
|
||||
in which the symbol is assigned the value and type of its arguments.
|
||||
|
||||
|
||||
<STRONG>Storage</STRONG> <STRONG>Allocation</STRONG>
|
||||
|
||||
|
||||
Space can be reserved for bytes, words, and longs using pseudo-ops.
|
||||
They take one or more operands, and for each generate a value whose size
|
||||
is a byte, word (2 bytes) or long (4 bytes). For example:
|
||||
|
||||
.data1 2, 6 ! allocate 2 bytes initialized to 2 and 6
|
||||
.data2 3, 0x10 ! allocate 2 words initialized to 3 and 16
|
||||
.data4 010 ! allocate a longword initialized to 8
|
||||
.space 40 ! allocates 40 bytes of zeros
|
||||
|
||||
allocates 50 (decimal) bytes of storage, initializing the first two
|
||||
bytes to 2 and 6, the next two words to 3 and 16, then one longword with
|
||||
value 8 (010 octal), last 40 bytes of zeros.
|
||||
|
||||
<STRONG>String</STRONG> <STRONG>Allocation</STRONG>
|
||||
|
||||
The pseudo-ops .<EM>ascii</EM> and .<EM>asciz</EM> take one string argument and
|
||||
generate the ASCII character codes for the letters in the string. The
|
||||
latter automatically terminates the string with a null (0) byte. For
|
||||
example,
|
||||
|
||||
.ascii "hello"
|
||||
.asciz "world\n"
|
||||
|
||||
|
||||
<STRONG>Alignment</STRONG>
|
||||
Sometimes it is necessary to force the next item to begin at a
|
||||
word, longword or even a 16 byte address boundary. The .<EM>align</EM> pseudo-op
|
||||
zero or more null byte if the current location is a multiple of the
|
||||
argument of .align.
|
||||
|
||||
<STRONG>Segment</STRONG> <STRONG>Control</STRONG>
|
||||
|
||||
Every item assembled goes in one of the four segments: text, rom,
|
||||
data, or bss. By using the .<EM>sect</EM> pseudo-op with argument .<EM>text</EM>, .<EM>rom</EM>,
|
||||
.<EM>data</EM> or .<EM>bss</EM>, the programmer can force the next items to go in a
|
||||
particular segment.
|
||||
|
||||
<STRONG>External</STRONG> <STRONG>Names</STRONG>
|
||||
|
||||
A symbol can be given global scope by including it in a .<EM>define</EM>
|
||||
pseudo-op. Multiple names may be listed, separate by commas. It must
|
||||
be used to export symbols defined in the current program. Names not
|
||||
defined in the current program are treated as "undefined external"
|
||||
automatically, although it is customary to make this explicit with the
|
||||
.<EM>extern</EM> pseudo-op.
|
||||
|
||||
<STRONG>Common</STRONG>
|
||||
|
||||
The .<EM>comm</EM> pseudo-op declares storage that can be common to more
|
||||
than one module. There are two arguments: a name and an absolute
|
||||
expression giving the size in bytes of the area named by the symbol. The
|
||||
type of the symbol becomes external. The statement can appear in any
|
||||
segment. If you think this has something to do with FORTRAN, you are
|
||||
right.
|
||||
|
||||
<STRONG>Examples</STRONG>
|
||||
|
||||
In the kernel directory, there are several assembly code files that
|
||||
are worth inspecting as examples. However, note that these files, are
|
||||
designed to first be run through the C preprocessor. (The very first
|
||||
character is a # to signal this.) Thus they contain numerous constructs
|
||||
that are not pure assembler. For true assembler examples, compile any C
|
||||
program provided with MINIX using the <STRONG>-S</STRONG> flag. This will result in an
|
||||
assembly language file with a suffix with the same name as the C source
|
||||
file, but ending with the .s suffix.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
263
Minix/2.0.0/wwwman/man9/awk.9.html
Normal file
263
Minix/2.0.0/wwwman/man9/awk.9.html
Normal file
@@ -0,0 +1,263 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>awk(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>awk(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>awk</STRONG> <STRONG>-</STRONG> <STRONG>pattern</STRONG> <STRONG>matching</STRONG> <STRONG>language</STRONG>
|
||||
<STRONG>Syntax:</STRONG> <STRONG>awk</STRONG> <EM>rules</EM> [<EM>file</EM>] ...
|
||||
<STRONG>Flags:</STRONG> (none)
|
||||
<STRONG>Examples:</STRONG> awk rules input # Process <EM>input</EM> according to <EM>rules</EM>
|
||||
awk rules - >out # Input from terminal, output to <EM>out</EM>
|
||||
|
||||
AWK is a programming language devised by Aho, Weinberger, and
|
||||
Kernighan at Bell Labs (hence the name). <EM>Awk</EM> programs search files for
|
||||
specific patterns and performs 'actions' for every occurrence of these
|
||||
patterns. The patterns can be 'regular expressions' as used in the <EM>ed</EM>
|
||||
editor. The actions are expressed using a subset of the C language.
|
||||
|
||||
The patterns and actions are usually placed in a 'rules' file whose
|
||||
name must be the first argument in the command line, preceded by the
|
||||
flag <STRONG>-f</STRONG>. Otherwise, the first argument on the command line is taken to
|
||||
be a string containing the rules themselves. All other arguments are
|
||||
taken to be the names of text files on which the rules are to be
|
||||
applied, with <STRONG>-</STRONG> being the standard input. To take rules from the
|
||||
standard input, use <STRONG>-f</STRONG> <STRONG>-</STRONG>.
|
||||
|
||||
The command:
|
||||
|
||||
<STRONG>awk</STRONG> <STRONG>rules</STRONG> <STRONG>prog.d*u</STRONG>
|
||||
|
||||
would read the patterns and actions rules from the file <EM>rules</EM> and apply
|
||||
them to all the arguments.
|
||||
|
||||
The general format of a rules file is:
|
||||
|
||||
<pattern> { <action> } <pattern> { <action> } ...
|
||||
|
||||
There may be any number of these <pattern> { <action> } sequences in the
|
||||
rules file. <EM>Awk</EM> reads a line of input from the current input file and
|
||||
applies every <pattern> { <action> } in sequence to the line.
|
||||
|
||||
If the <pattern> corresponding to any { <action> } is missing, the
|
||||
action is applied to every line of input. The default { <action> } is
|
||||
to print the matched input line.
|
||||
|
||||
<STRONG>Patterns</STRONG>
|
||||
|
||||
The <pattern>s may consist of any valid C expression. If the
|
||||
<pattern> consists of two expressions separated by a comma, it is taken
|
||||
to be a range and the <action> is performed on all lines of input that
|
||||
match the range. <pattern>s may contain 'regular expressions' delimited
|
||||
by an @ symbol. Regular expressions can be thought of as a generalized
|
||||
'wildcard' string matching mechanism, similar to that used by many
|
||||
operating systems to specify file names. Regular expressions may
|
||||
contain any of the following characters:
|
||||
|
||||
x An ordinary character
|
||||
\ The backslash quotes any character
|
||||
^ A circumflex at the beginning of an expr matches the beginning
|
||||
of a line.
|
||||
$ A dollar-sign at the end of an expression matches the end of a
|
||||
line.
|
||||
. A period matches any single character except newline.
|
||||
* An expression followed by an asterisk matches zero or more
|
||||
occurrences of that expression: 'fo*' matches 'f', 'fo', 'foo',
|
||||
'fooo', etc.
|
||||
+ An expression followed by a plus sign matches one or more
|
||||
occurrences of that expression: 'fo+' matches 'fo', 'foo',
|
||||
'fooo', etc.
|
||||
[] A string enclosed in square brackets matches any single
|
||||
character in that string, but no others. If the first
|
||||
character in the string is a circumflex, the expression matches
|
||||
any character except newline and the characters in the string.
|
||||
For example, '[xyz]' matches 'xx' and 'zyx', while '[^xyz]'
|
||||
matches 'abc' but not 'axb'. A range of characters may be
|
||||
specified by two characters separated by '-'.
|
||||
|
||||
<STRONG>Actions</STRONG>
|
||||
|
||||
Actions are expressed as a subset of the C language. All variables
|
||||
are global and default to int's if not formally declared. Only char's
|
||||
and int's and pointers and arrays of char and int are allowed. <EM>Awk</EM>
|
||||
allows only decimal integer constants to be used----no hex (0xnn) or
|
||||
octal (0nn). String and character constants may contain all of the
|
||||
special C escapes (\n, \r, etc.).
|
||||
|
||||
<EM>Awk</EM> supports the 'if', 'else', 'while' and 'break' flow of control
|
||||
constructs, which behave exactly as in C.
|
||||
|
||||
Also supported are the following unary and binary operators, listed
|
||||
in order from highest to lowest precedence:
|
||||
|
||||
<STRONG>Operator</STRONG> <STRONG>Type</STRONG> <STRONG>Associativity</STRONG>
|
||||
() [] unary left to right
|
||||
! ~ ++ -- - * & unary right to left
|
||||
* / % binary left to right
|
||||
+ - binary left to right
|
||||
<< >> binary left to right
|
||||
< <= > >= binary left to right
|
||||
== != binary left to right
|
||||
& binary left to right
|
||||
^ binary left to right
|
||||
| binary left to right
|
||||
&& binary left to right
|
||||
|| binary left to right
|
||||
= binary right to left
|
||||
|
||||
Comments are introduced by a '#' symbol and are terminated by the first
|
||||
newline character. The standard '/*' and '*/' comment delimiters are
|
||||
not supported and will result in a syntax error.
|
||||
|
||||
|
||||
<STRONG>Fields</STRONG>
|
||||
|
||||
|
||||
When <EM>awk</EM> reads a line from the current input file, the record is
|
||||
automatically separated into 'fields.' A field is simply a string of
|
||||
consecutive characters delimited by either the beginning or end of line,
|
||||
or a 'field separator' character. Initially, the field separators are
|
||||
the space and tab character. The special unary operator '$' is used to
|
||||
reference one of the fields in the current input record (line). The
|
||||
fields are numbered sequentially starting at 1. The expression '$0'
|
||||
references the entire input line.
|
||||
|
||||
Similarly, the 'record separator' is used to determine the end of
|
||||
an input 'line,' initially the newline character. The field and record
|
||||
separators may be changed programatically by one of the actions and will
|
||||
remain in effect until changed again.
|
||||
|
||||
Multiple (up to 10) field separators are allowed at a time, but
|
||||
only one record separator.
|
||||
|
||||
Fields behave exactly like strings; and can be used in the same
|
||||
context as a character array. These 'arrays' can be considered to have
|
||||
been declared as:
|
||||
|
||||
|
||||
char ($n)[ 128 ];
|
||||
|
||||
|
||||
In other words, they are 128 bytes long. Notice that the parentheses
|
||||
are necessary because the operators [] and $ associate from right to
|
||||
left; without them, the statement would have parsed as:
|
||||
|
||||
|
||||
char $(1[ 128 ]);
|
||||
|
||||
|
||||
which is obviously ridiculous.
|
||||
|
||||
If the contents of one of these field arrays is altered, the '$0'
|
||||
field will reflect this change. For example, this expression:
|
||||
|
||||
|
||||
*$4 = 'A';
|
||||
|
||||
|
||||
will change the first character of the fourth field to an upper- case
|
||||
letter 'A'. Then, when the following input line:
|
||||
|
||||
|
||||
120 PRINT "Name address Zip"
|
||||
|
||||
|
||||
is processed, it would be printed as:
|
||||
|
||||
|
||||
120 PRINT "Name Address Zip"
|
||||
|
||||
|
||||
Fields may also be modified with the strcpy() function (see below). For
|
||||
example, the expression:
|
||||
|
||||
strcpy( $4, "Addr." );
|
||||
|
||||
applied to the same line above would yield:
|
||||
|
||||
120 PRINT "Name Addr. Zip"
|
||||
|
||||
|
||||
<STRONG>Predefined</STRONG> <STRONG>Variables</STRONG>
|
||||
|
||||
The following variables are pre-defined:
|
||||
|
||||
FS Field separator (see below).
|
||||
RS Record separator (see below also).
|
||||
NF Number of fields in current input record (line).
|
||||
NR Number of records processed thus far.
|
||||
FILENAME Name of current input file.
|
||||
BEGIN A special <pattern> that matches the beginning of
|
||||
input text.
|
||||
END A special <pattern> that matches the end of input
|
||||
text.
|
||||
|
||||
<EM>Awk</EM> also provides some useful built-in functions for string manipulation
|
||||
and printing:
|
||||
|
||||
print(arg) Simple printing of strings only, terminated by '\n'.
|
||||
printf(arg...) Exactly the printf() function from C.
|
||||
getline() Reads the next record and returns 0 on end of file.
|
||||
nextfile() Closes the current input file and begins processing
|
||||
the next file
|
||||
strlen(s) Returns the length of its string argument.
|
||||
strcpy(s,t) Copies the string 't' to the string 's'.
|
||||
strcmp(s,t) Compares the 's' to 't' and returns 0 if they match.
|
||||
toupper(c) Returns its character argument converted to upper-
|
||||
case.
|
||||
|
||||
tolower(c) Returns its character argument converted to lower-
|
||||
case.
|
||||
match(s,@re@) Compares the string 's' to the regular expression 're'
|
||||
and returns the number of matches found (zero if
|
||||
none).
|
||||
|
||||
<STRONG>Authors</STRONG>
|
||||
|
||||
<EM>Awk</EM> was written by Saeko Hirabauashi and Kouichi Hirabayashi.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
311
Minix/2.0.0/wwwman/man9/de.9.html
Normal file
311
Minix/2.0.0/wwwman/man9/de.9.html
Normal file
@@ -0,0 +1,311 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>de(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>de(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>de</STRONG> <STRONG>-</STRONG> <STRONG>disk</STRONG> <STRONG>editor</STRONG>
|
||||
<STRONG>Syntax:</STRONG> <STRONG>de</STRONG> [<STRONG>-w</STRONG>] <EM>block</EM>_<EM>device</EM>
|
||||
<STRONG>de</STRONG> <STRONG>-r</STRONG> <EM>file</EM>
|
||||
<STRONG>Flags:</STRONG> <STRONG>-r</STRONG> Recover a file that has been removed
|
||||
<STRONG>-w</STRONG> Enable writing, so device can be modified
|
||||
<STRONG>Examples:</STRONG> de -r /usr/ast/prog.c # Undo the effects of: <EM>rm</EM>
|
||||
/<EM>usr</EM>/<EM>ast</EM>/<EM>prog</EM>.<EM>c</EM>
|
||||
de -w /dev/fd0 # Edit /<EM>dev</EM>/<EM>fd0</EM> for writing
|
||||
|
||||
The <EM>de</EM> program allows a system administrator to examine and modify
|
||||
a MINIX file system device. Commands are available to move to any
|
||||
address on the disk and display the disk block contents. This
|
||||
information may be presented in one of three visual modes: as two-byte
|
||||
words, as ASCII characters or as a bit map. The disk may be searched for
|
||||
a string of characters. If the <STRONG>-w</STRONG> option is given, <EM>de</EM> will open the
|
||||
device for writing and words may be modified. Without this flag,
|
||||
writing is prohibited. Lost blocks and files can be recovered using a
|
||||
variety of commands. The <STRONG>-r</STRONG> option supports automated recovery of files
|
||||
removed by <EM>unlink</EM>.
|
||||
|
||||
<STRONG>Positioning</STRONG>
|
||||
|
||||
Disks are divided into blocks (also called 'zones') of 1024 bytes.
|
||||
<EM>De</EM> keeps a current address on the disk as a block number and a byte
|
||||
offset within the block. In some visual modes the offset is rounded off,
|
||||
for example, in 'word' mode the offset must be even.
|
||||
|
||||
There are different types of blocks on a file system device,
|
||||
including a super block, bit maps, i-nodes and data blocks. <EM>De</EM> knows
|
||||
the type of the current block, but will allow most positioning commands
|
||||
and visual modes to function anywhere on the disk.
|
||||
|
||||
The <EM>f</EM> command (or PGDN on the keypad) moves forward to the next
|
||||
block, similarly <EM>b</EM> (PGUP) moves backwards one block. <EM>F</EM> (END) moves to
|
||||
the last block and <EM>B</EM> (HOME) moves to the first block.
|
||||
|
||||
The arrow keys (or <EM>u</EM>, <EM>d</EM>, <EM>l</EM>, and <EM>r</EM>) change the current address by
|
||||
small increments. The size of the increment depends on the current
|
||||
display mode, as shown below. The various sizes suit each display and
|
||||
pointers move on the screen to follow each press of an arrow key.
|
||||
|
||||
<STRONG>Mode</STRONG> <STRONG>Up</STRONG> <STRONG>Down</STRONG> <STRONG>Left</STRONG> <STRONG>Right</STRONG>
|
||||
Word -2 +2 -32 +32
|
||||
Block -64 +64 -1 +1
|
||||
Map -256 +256 -4 +4
|
||||
|
||||
The <EM>g</EM> command allows movement to any specified block. Like all commands
|
||||
that take arguments, a prompt and subsequent input are written to the
|
||||
bottom line of the screen. Numerical entry may be decimal, octal or
|
||||
hexadecimal, for example 234, -1, 070, 0xf3, -X3C.
|
||||
While checking an i-node one may want to move to a block listed as
|
||||
a zone of the file. The <EM>G</EM> command takes the contents at the current
|
||||
address in the device as a block number and indirectly jumps to that
|
||||
block.
|
||||
|
||||
The address may be set to the start of any i-node using the
|
||||
command and supplying an i-node number. The <EM>I</EM> command maps a given file
|
||||
name into an i-node address. The file must exist on the current device
|
||||
and this device must be mounted.
|
||||
|
||||
<STRONG>The</STRONG> <STRONG>Display</STRONG>
|
||||
|
||||
The first line of the display contains the device name, the name of
|
||||
the current output file (if one is open) and the current search string.
|
||||
If <EM>de</EM> is being run with the <STRONG>-w</STRONG> option then the device name is flagged
|
||||
with '(w).' If a string is too long to fit on the line it is marked with
|
||||
'...'.
|
||||
|
||||
The second line contains the current block number, the total number
|
||||
of blocks, and the type of the current block. The types are: boot,
|
||||
super, i-node bit map, zone bit map, i-nodes and data block. If the
|
||||
current address is within a data block then the string 'in use' is
|
||||
displayed if the block corresponds to a set in the zone bit map.
|
||||
|
||||
The third line shows the offset in the current block. If the
|
||||
current address is within either the i-node or zone bit maps then the i-
|
||||
node or block number corresponding to the current bit is shown. If the
|
||||
current address is within an i-node then the i-node number and 'in use'
|
||||
status is displayed. If the address is within a bit map or i-node
|
||||
block, but past the last usable entry, then the string 'padding' is
|
||||
shown.
|
||||
|
||||
The rest of the screen is used to display data from the current
|
||||
block. There are three visual display modes: 'word,' 'block,' and
|
||||
'map.' The <EM>v</EM> command followed by <EM>w</EM>, <EM>b</EM>, or <EM>m</EM> sets the current display
|
||||
mode.
|
||||
|
||||
In 'word' mode 16 words, of two bytes each, are shown in either
|
||||
base 2, 8, 10 or 16. The current base is displayed to the far right of
|
||||
the screen. It can be changed using the <EM>o</EM> command followed by either an
|
||||
<EM>h</EM> (hexadecimal), <EM>d</EM> (decimal), <EM>o</EM> (octal) or <EM>b</EM> (binary).
|
||||
|
||||
<EM>De</EM> knows where i-nodes are, and will display the contents in a
|
||||
readable format, including the <EM>rwx</EM> bits, the user name and the time
|
||||
field. If the current page is at the beginning of the super block, or an
|
||||
executable file or an <EM>ar</EM> archive, then <EM>de</EM> will also inform the user. In
|
||||
all other cases the contents of the 16 words are shown to the right as
|
||||
equivalent ASCII characters.
|
||||
|
||||
|
||||
In 'block' mode a whole block of 1024 bytes is displayed as ASCII
|
||||
characters, 64 columns by 16 lines. Control codes are shown as
|
||||
highlighted characters. If the high order bit is set in any of the 1024
|
||||
bytes then an 'MSB' flag is shown on the far right of the screen, but
|
||||
these bytes are not individually marked.
|
||||
|
||||
In 'map' mode 2048 bits (256 bytes) are displayed from the top to
|
||||
the bottom (32 bits) and from the left to the right of the screen. Bit
|
||||
zero of a byte is towards the top of the screen. This visual mode is
|
||||
generally used to observe the bit map blocks. The number of set bits
|
||||
displayed is written on the far right of the screen.
|
||||
|
||||
<STRONG>Searching</STRONG>
|
||||
|
||||
A search for an ASCII string is initiated by the / command.
|
||||
Control characters not used for other purposes may be entered in the
|
||||
search string, for example CTRL-J is an end-of-line character. The
|
||||
search is from the current position to the end of the current device.
|
||||
|
||||
Once a search string has been defined by a use of /, the next
|
||||
search may be initiated with the <EM>n</EM> command, (a / followed immediately by
|
||||
an ENTER is equivalent to an <EM>n</EM>).
|
||||
|
||||
Whenever a search is in progress <EM>de</EM> will append one . to the prompt
|
||||
line for every 500 blocks searched. If the string is found between the
|
||||
end of the file system and the actual end of the device, then the
|
||||
current address is set to the end of the file system.
|
||||
|
||||
Some of the positioning commands push the current address and
|
||||
visual mode in a stack before going to a new address. These commands
|
||||
are <EM>B</EM>, <EM>F</EM>, <EM>g</EM>, <EM>G</EM>, <EM>i</EM>, <EM>I</EM>, <EM>n</EM>, <EM>x</EM> and /. The <EM>p</EM> (previous) command pops the last
|
||||
address and visual mode from the stack. This stack is eight entries
|
||||
deep.
|
||||
|
||||
<STRONG>Modifying</STRONG> <STRONG>the</STRONG> <STRONG>File</STRONG> <STRONG>System</STRONG>
|
||||
|
||||
The <EM>s</EM> command will prompt for a data word and store it at the
|
||||
current address on the disk. This is used to change information that can
|
||||
not be easily changed by any other means.
|
||||
|
||||
The data word is 16 bits wide, it may be entered in decimal, octal
|
||||
or hexadecimal. Remember that the <STRONG>-w</STRONG> option must be specified for the <EM>s</EM>
|
||||
command to operate. Be careful when modifying a mounted file system.
|
||||
|
||||
<STRONG>Recovering</STRONG> <STRONG>Files</STRONG>
|
||||
|
||||
Any block on the disk may be written to an output file. This is
|
||||
used to recover blocks marked as free on the disk. A write command will
|
||||
request a file name the first time it is used, on subsequent writes the
|
||||
data is appended to the current output file.
|
||||
The name of the current output file is changed using the <EM>c</EM> command.
|
||||
This file should be on a different file system, to avoid overwriting an
|
||||
i-node or block before it is recovered.
|
||||
|
||||
An ASCII block is usually recovered using the <EM>w</EM> command. All bytes
|
||||
will have their most significant bit cleared before being written to the
|
||||
output file. Bytes containing '\0' or '\177' are not copied. The <EM>W</EM>
|
||||
command writes the current block (1024 bytes exactly) to the output
|
||||
file.
|
||||
|
||||
When a file is deleted using <EM>unlink</EM> the i-node number in the
|
||||
directory is zeroed, but before its removal, it is copied into the end
|
||||
of the file name field. This allows the i-node of a deleted file to be
|
||||
found by searching through a directory. The <EM>x</EM> command asks for the path
|
||||
name of a lost file, extracts the old i-node number and changes the
|
||||
current disk address to the start of the i-node.
|
||||
|
||||
Once an i-node is found, all of the freed blocks may be recovered
|
||||
by checking the i-node zone fields, using 'G' to go to a block, writing
|
||||
it back out using 'w', going back to the i-node with <EM>p</EM> and advancing to
|
||||
the next block. This file extraction process is automated by using the <EM>X</EM>
|
||||
command, which goes through the i-node, indirect and double indirect
|
||||
blocks finding all the block pointers and recovering all the blocks of
|
||||
the file.
|
||||
|
||||
The <EM>X</EM> command closes the current output file and asks for the name
|
||||
of a new output file. All of the disk blocks must be marked as free, if
|
||||
they are not the command stops and the file must be recovered manually.
|
||||
|
||||
When extracting lost blocks <EM>de</EM> will maintain 'holes' in the file.
|
||||
Thus, a recovered sparse file does not allocate unused blocks and will
|
||||
keep its efficient storage scheme. This property of the <EM>X</EM> command may
|
||||
be used to move a sparse file from one device to another.
|
||||
|
||||
Automatic recovery may be initiated by the <STRONG>-r</STRONG> option on the command
|
||||
line. Also specified is the path name of a file just removed by <EM>unlink</EM>.
|
||||
<EM>De</EM> determines which mounted file system device held the file and opens
|
||||
it for reading. The lost i-node is found and the file extracted by
|
||||
automatically performing an <EM>x</EM> and an <EM>X</EM> command.
|
||||
|
||||
The recovered file will be written to /<EM>tmp</EM>. <EM>De</EM> will refuse to
|
||||
automatically recover a file on the same file system as /<EM>tmp</EM>. The lost
|
||||
file must have belonged to the user. If automatic recovery will not
|
||||
complete, then manual recovery may be performed.
|
||||
|
||||
<STRONG>Miscellaneous</STRONG>
|
||||
|
||||
The user can terminate a session with <EM>de</EM> by typing <EM>q</EM>, CTRL-D, or
|
||||
the key associated with SIGQUIT.
|
||||
|
||||
The <EM>m</EM> command invokes the MINIX <EM>sh</EM> shell as a subprocess.
|
||||
|
||||
For help while using <EM>de</EM> use <EM>h</EM>.
|
||||
|
||||
<STRONG>Command</STRONG> <STRONG>Summary</STRONG>
|
||||
|
||||
PGUP b Back one block
|
||||
PGDN f Forward one block
|
||||
HOME B Goto first block
|
||||
END F Goto last block
|
||||
UP u Move back 2/64/256 bytes
|
||||
DOWN d Move forward 2/64/256 bytes
|
||||
LEFT l Move back 32/1/4 bytes
|
||||
RIGHT r Move forward 32/1/4 bytes
|
||||
g Goto specified block
|
||||
G Goto block indirectly
|
||||
i Goto specified i-node
|
||||
I Filename to i-node
|
||||
/ Search
|
||||
n Next occurrence
|
||||
p Previous address
|
||||
h Help
|
||||
EOF q Quit
|
||||
m MINIX shell
|
||||
v Visual mode (w b m)
|
||||
o Output base (h d o b)
|
||||
c Change file name
|
||||
w Write ASCII block
|
||||
W Write block exactly
|
||||
x Extract lost directory entry
|
||||
X Extract lost file blocks
|
||||
s Store word
|
||||
|
||||
NOTES: When entering a line in response to a prompt from <EM>de</EM> there are a
|
||||
couple of editing characters available. The previous character may be
|
||||
erased by typing CTRL-H and the whole line may be erased by typing CTRL-
|
||||
U. ENTER terminates the input. If DELETE or a non-ASCII character is
|
||||
typed then the command requesting the input is aborted.
|
||||
|
||||
The commands <EM>G</EM>, <EM>s</EM> and <EM>X</EM> will only function if the current visual
|
||||
display mode is 'word.' The commands <EM>i</EM>, <EM>I</EM> and <EM>x</EM> change the mode to
|
||||
'word' on completion. The commands <EM>G</EM> and / change the mode to 'block'.
|
||||
These restrictions and automatic mode conversions are intended to aid
|
||||
the user.
|
||||
|
||||
The 'map' mode uses special graphic characters, and only functions
|
||||
if the user is at the console.
|
||||
|
||||
|
||||
|
||||
<EM>De</EM> generates warnings for illegal user input or if erroneous data
|
||||
is found on the disk, for example a corrupted magic number. Warnings
|
||||
appear in the middle of the screen for two seconds, then the current
|
||||
page is redrawn. Some minor errors, for example, setting an unknown
|
||||
visual mode, simply ring the bell. Major errors, for example I/O
|
||||
problems on the file system device cause an immediate exit from <EM>de</EM>.
|
||||
|
||||
The i-node and zone bit maps are read from the device when <EM>de</EM>
|
||||
starts up. These determine whether 'in use' or 'not in use' is displayed
|
||||
in the status field at the top of the screen. The bit maps are not re-
|
||||
read while using <EM>de</EM> and will become out-of-date if observing a mounted
|
||||
file system.
|
||||
|
||||
<EM>De</EM> requires termcap definitions for 'cm' and 'cl'. Furthermore,
|
||||
'so' and 'se' will also be used if available. The ANSI strings generated
|
||||
by the keypad arrows are recognized, as well as any single character
|
||||
codes defined by 'ku', 'kd', 'kl' and 'kr'.
|
||||
|
||||
<STRONG>Author</STRONG>
|
||||
|
||||
The <EM>de</EM> program was written by Terrence Holm.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
111
Minix/2.0.0/wwwman/man9/dis88.9.html
Normal file
111
Minix/2.0.0/wwwman/man9/dis88.9.html
Normal file
@@ -0,0 +1,111 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>dis88(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>dis88(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>dis88</STRONG> <STRONG>-</STRONG> <STRONG>disassembler</STRONG> <STRONG>[IBM]</STRONG>
|
||||
<STRONG>Syntax:</STRONG> <STRONG>dis88</STRONG> [<STRONG>-o</STRONG>] <EM>infile</EM> [<EM>outfile</EM>]
|
||||
<STRONG>Flags:</STRONG> <STRONG>-o</STRONG> List the object code along with the assembly code
|
||||
<STRONG>Examples:</STRONG> dis88 a.out >listing # Disassemble <EM>a</EM>.<EM>out</EM>
|
||||
dis88 -o a.out listing # Ditto, but with object code
|
||||
|
||||
<EM>Dis88</EM> disassembles 8088 object code to the assembly language format
|
||||
used by MINIX. It makes full use of symbol table information, supports
|
||||
separate instruction and data space, and generates synthetic labels when
|
||||
needed. It does not support 8087 mnemonics, symbolic data segment
|
||||
references, or the ESC mnemonic.
|
||||
|
||||
The program is invoked by:
|
||||
|
||||
<STRONG>dis88</STRONG> <STRONG>[-o]</STRONG> <STRONG>infile</STRONG> <STRONG>[outfile]</STRONG>
|
||||
|
||||
The -o flag causes object code to be listed. If no outfile is given,
|
||||
<EM>stdout</EM> is used.
|
||||
|
||||
The text segment of an object file is always padded to an even
|
||||
address. In addition, if the file has split I/D space, the text segment
|
||||
will be padded to a paragraph boundary (i.e., an address divisible by
|
||||
16). Due to padding, the disassembler may produce a few spurious, but
|
||||
harmless, instructions at the end of the text segment.
|
||||
|
||||
Because the information to which initialized data refers cannot
|
||||
generally be inferred from context, the data segment is treated
|
||||
literally. Byte values (in hexadecimal) are output, and long stretches
|
||||
of null data are represented by appropriate .<EM>zerow</EM> pseudo-ops.
|
||||
Disassembly of the bss segment, on the other hand, is quite
|
||||
straightforward, because uninitialized data is all zero by definition.
|
||||
No data is output in the bss segment, but symbolic labels are output as
|
||||
appropriate.
|
||||
|
||||
The output of operands in symbolic form is complicated somewhat by
|
||||
the existence of assembler symbolic constants and segment override
|
||||
opcodes. Thus, the program's symbol lookup routine attempts to apply a
|
||||
certain amount of intelligence when it is asked to find a symbol. If it
|
||||
cannot match on a symbol of the preferred type, it may output a symbol
|
||||
of some other type, depending on preassigned (and somewhat arbitrary)
|
||||
rankings within each type. Finally, if all else fails, it will output a
|
||||
string containing the address sought as a hex constant. For user
|
||||
convenience, the targets of branches are also output, in comments, as
|
||||
hexadecimal constants.
|
||||
|
||||
<STRONG>Error</STRONG> <STRONG>Messages</STRONG>
|
||||
|
||||
Various error messages may be generated as a result of problems
|
||||
encountered during the disassembly. They are listed below
|
||||
|
||||
Cannot access input file - Input file cannot be opened or
|
||||
read
|
||||
Cannot open output file - Output file cannot be created
|
||||
Input file not in object format - Bad magic number
|
||||
Not an 8086/8088 object file - CPU ID of the file header is
|
||||
incorrect
|
||||
Reloc table overflow - Relocation table exceeds 1500
|
||||
entries
|
||||
Symbol table overflow - Symbol table exceeds 1500 entries
|
||||
Lseek error - Input file corrupted (should never
|
||||
happen)
|
||||
Warning: no symbols - Symbol table is missing (use ast)
|
||||
Cannot reopen input file - Input file was removed during
|
||||
execution
|
||||
|
||||
<STRONG>Author</STRONG>
|
||||
|
||||
<EM>Dis88</EM> was written and copyrighted by G. M. Harding and is included
|
||||
here by permission. It may be freely redistributed provided th
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
BIN
Minix/2.0.0/wwwman/man9/elle.9.html.gz
Normal file
BIN
Minix/2.0.0/wwwman/man9/elle.9.html.gz
Normal file
Binary file not shown.
BIN
Minix/2.0.0/wwwman/man9/elvis.9.html.gz
Normal file
BIN
Minix/2.0.0/wwwman/man9/elvis.9.html.gz
Normal file
Binary file not shown.
311
Minix/2.0.0/wwwman/man9/indent.9.html
Normal file
311
Minix/2.0.0/wwwman/man9/indent.9.html
Normal file
@@ -0,0 +1,311 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>indent(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>indent(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>indent</STRONG> <STRONG>-</STRONG> <STRONG>reformat</STRONG> <STRONG>the</STRONG> <STRONG>layout</STRONG> <STRONG>of</STRONG> <STRONG>a</STRONG> <STRONG>program</STRONG>
|
||||
<STRONG>Syntax:</STRONG> <STRONG>indent</STRONG> <EM>in</EM>_<EM>file</EM> [<EM>out</EM>_<EM>file</EM>] [<EM>options</EM>]
|
||||
<STRONG>Flags:</STRONG> (many)
|
||||
<STRONG>Examples:</STRONG> indent -br -c25 prog.c # Indent <EM>prog</EM>.<EM>c</EM>
|
||||
indent -npcs prog.c newprog.c # Put output on <EM>newprog</EM>.<EM>c</EM>
|
||||
|
||||
<EM>Indent</EM> reads a C program in, rearranges the layout, and outputs a
|
||||
new C program that will compile to the same executable binary as the
|
||||
original one. The difference between the input and output is that the
|
||||
output is in a standard layout determined by a large number of options.
|
||||
For most of the options there are two choices, one that enables it and
|
||||
one that disables it.
|
||||
|
||||
If <EM>indent</EM> is called with no file files, it operates as a filter.
|
||||
If called with one file name, that file is reformatted and the result
|
||||
replaces the original file. A backup is created, however, with the
|
||||
suffix .<EM>BAK</EM>. If it is called with two file names, the first one is the
|
||||
input file and the second one is the output file. Only one file can be
|
||||
reformatted at a time (e.g., one cannot call <EM>indent</EM> with *.c as
|
||||
argument; this is an error and will not work.).
|
||||
|
||||
<STRONG>Options</STRONG>
|
||||
|
||||
Many options are available. If you want to format a program to the
|
||||
'official' MINIX format, use <EM>pretty</EM>, which calls <EM>indent</EM> with the proper
|
||||
options and then postprocesses the output. The options listed below
|
||||
control the formatting style.
|
||||
|
||||
OPTION: <STRONG>-bad</STRONG>, <STRONG>-nbad</STRONG>
|
||||
|
||||
If <STRONG>-bad</STRONG> is specified, a blank line is forced after every block of
|
||||
declarations. Default: <STRONG>-nbad</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-bap</STRONG>, <STRONG>-nbap</STRONG>
|
||||
|
||||
If <STRONG>-bap</STRONG> is specified, a blank line is forced after every procedure
|
||||
body. Default: <STRONG>-nbap</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-bbb</STRONG>, <STRONG>-nbbb</STRONG>
|
||||
|
||||
If <STRONG>-bbb</STRONG> is specified, a blank line is forced before every block
|
||||
comment. Default: <STRONG>-nbbb</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-bc</STRONG>, <STRONG>-nbc</STRONG>
|
||||
|
||||
If <STRONG>-bc</STRONG> is specified, then a newline is forced after each comma in a
|
||||
declaration. <STRONG>-nbc</STRONG> turns off this option. The default is <STRONG>-nbc</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-bl</STRONG>, <STRONG>-br</STRONG>
|
||||
|
||||
Specifying <STRONG>-bl</STRONG> lines up compound statements like this:
|
||||
|
||||
if (...)
|
||||
{
|
||||
code
|
||||
}
|
||||
|
||||
Specifying <STRONG>-br</STRONG> (the default) makes them look like this:
|
||||
|
||||
if (...) {
|
||||
code
|
||||
}
|
||||
|
||||
|
||||
OPTION: <STRONG>-c</STRONG><EM>n</EM>
|
||||
|
||||
The column in which comments on code start. The default is 33.
|
||||
|
||||
OPTION: <STRONG>-cd</STRONG><EM>n</EM>
|
||||
|
||||
The column in which comments on declarations start. The default is
|
||||
for these comments to start in the same column as those on code.
|
||||
|
||||
OPTION: <STRONG>-cdb</STRONG>, <STRONG>-ncdb</STRONG>
|
||||
|
||||
Enables (disables) the placement of comment delimiters on blank
|
||||
lines. With this option enabled, comments look like this:
|
||||
|
||||
/*
|
||||
* this is a comment
|
||||
*/
|
||||
|
||||
Rather than like this:
|
||||
|
||||
/* this is a comment */
|
||||
|
||||
This only affects block comments, not comments to the right of code. The
|
||||
default is <STRONG>-cdb</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-ce</STRONG>, <STRONG>-nce</STRONG>
|
||||
|
||||
Enables (disables) forcing 'else's to cuddle up to the immediately
|
||||
preceding '}'. The default is <STRONG>-ce</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-ci</STRONG><EM>n</EM>
|
||||
|
||||
Sets the continuation indent to be <EM>n</EM>. Continuation lines will be
|
||||
indented that far from the beginning of the first line of the statement.
|
||||
Parenthesized expressions have extra indentation added to indicate the
|
||||
nesting, unless <STRONG>-lp</STRONG> is in effect. <STRONG>-ci</STRONG> defaults to the same value as <STRONG>-i</STRONG>.
|
||||
OPTION: <STRONG>-cli</STRONG><EM>n</EM>
|
||||
|
||||
Causes case labels to be indented <EM>n</EM> tab stops to the right of the
|
||||
containing switch statement. <STRONG>-cli</STRONG>0.5 causes case labels to be indented
|
||||
half a tab stop. The default is <STRONG>-cli</STRONG>0. (This is the only option that
|
||||
takes a fractional argument.)
|
||||
|
||||
OPTION: <STRONG>-d</STRONG><EM>n</EM>
|
||||
|
||||
Controls the placement of comments which are not to the right of
|
||||
code. Specifying <STRONG>-d</STRONG>1 means that such comments are placed one
|
||||
indentation level to the left of code. The default <STRONG>-d</STRONG>0 lines up these
|
||||
comments with the code. See the section on comment indentation below.
|
||||
|
||||
OPTION: <STRONG>-di</STRONG><EM>n</EM>
|
||||
|
||||
Specifies the indentation, in character positions, from a
|
||||
declaration keyword to the following identifier. The default is <STRONG>-di</STRONG>16.
|
||||
|
||||
OPTION: <STRONG>-dj</STRONG>, <STRONG>-ndj</STRONG>
|
||||
|
||||
<STRONG>-dj</STRONG> left justifies declarations. <STRONG>-ndj</STRONG> indents declarations the
|
||||
same as code. The default is <STRONG>-ndj</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-ei</STRONG>, <STRONG>-nei</STRONG>
|
||||
|
||||
Enables (disables) special else<STRONG>-if</STRONG> processing. If enabled, ifs
|
||||
following elses will have the same indentation as the preceding if
|
||||
statement. The default is <STRONG>-ei</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-fc</STRONG>1, <STRONG>-nfc</STRONG>1
|
||||
|
||||
Enables (disables) the formatting of comments that start in column
|
||||
1. Often, comments whose leading '/' is in column 1 have been carefully
|
||||
hand formatted by the programmer. In such cases, <STRONG>-nfc</STRONG>1 should be used.
|
||||
The default is <STRONG>-fc</STRONG>1.
|
||||
|
||||
OPTION: <STRONG>-i</STRONG><EM>n</EM>
|
||||
|
||||
The number of spaces for one indentation level. The default is 8.
|
||||
|
||||
OPTION: <STRONG>-ip</STRONG>, <STRONG>-nip</STRONG>
|
||||
|
||||
Enables (disables) the indentation of parameter declarations from
|
||||
the left margin. The default is <STRONG>-ip</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-ln</STRONG>
|
||||
|
||||
|
||||
|
||||
Maximum length of an output line. The default is 78.
|
||||
|
||||
OPTION: <STRONG>-lp</STRONG>, <STRONG>-nlp</STRONG>
|
||||
|
||||
Lines up code surrounded by parenthesis in continuation lines. If
|
||||
a line has a left paren which is not closed on that line, then
|
||||
continuation lines will be lined up to start at the character position
|
||||
just after the left paren.
|
||||
|
||||
OPTION: <STRONG>-npro</STRONG>
|
||||
|
||||
Causes the profile files, .<EM>indent</EM>.<EM>pro</EM> in both the current directory
|
||||
and the user's home directory to be ignored.
|
||||
|
||||
OPTION: <STRONG>-pcs</STRONG>, <STRONG>-npcs</STRONG>
|
||||
|
||||
If true (<STRONG>-pcs</STRONG>) all procedure calls will have a space inserted
|
||||
between the name and the '('. The default is <STRONG>-npcs</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-ps</STRONG>, <STRONG>-nps</STRONG>
|
||||
|
||||
If true (<STRONG>-ps</STRONG>) the pointer following operator '->' will be
|
||||
surrounded by spaces on either side. The default is <STRONG>-nps</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-psl</STRONG>, <STRONG>-npsl</STRONG>
|
||||
|
||||
If true (<STRONG>-psl</STRONG>) the names of procedures being defined are placed in
|
||||
column 1 - their types, if any, will be left on the previous lines. The
|
||||
default is <STRONG>-psl</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-sc</STRONG>, <STRONG>-nsc</STRONG>
|
||||
|
||||
Enables (disables) the placement of asterisks (*) at the left edge
|
||||
of all comments. The default is <STRONG>-sc</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-sob</STRONG>, <STRONG>-nsob</STRONG>
|
||||
|
||||
If <STRONG>-sob</STRONG> is specified, <EM>indent</EM> will swallow optional blank lines.
|
||||
You can use this to get rid of blank lines after declarations. The
|
||||
default is <STRONG>-nsob</STRONG>.
|
||||
|
||||
OPTION: <STRONG>-st</STRONG>
|
||||
|
||||
Causes <EM>indent</EM> to take its input from <EM>stdin</EM>, and put its output to
|
||||
<EM>stdout</EM>.
|
||||
|
||||
OPTION: <STRONG>-T</STRONG><EM>typename</EM>
|
||||
|
||||
|
||||
|
||||
Adds typename to the list of type keywords. Names accumulate: <STRONG>-T</STRONG>
|
||||
can be specified more than once. You need to specify all the typenames
|
||||
that appear in your program that are defined by #typedefs. Nothing will
|
||||
be harmed if you miss a few, but the program will not be formatted as
|
||||
nicely as it should. This sounds like a painful thing to have to do,
|
||||
but it is really a symptom of a problem in C: typedef causes a syntactic
|
||||
change in the language and <EM>indent</EM> cannot find all typedefs.
|
||||
|
||||
OPTION: <STRONG>-troff</STRONG>
|
||||
|
||||
Causes <EM>indent</EM> to format the program for processing by <EM>troff</EM>. It
|
||||
will produce a fancy listing in much the same spirit as <EM>vgrind</EM>. If the
|
||||
output file is not specified, the default is standard output, rather
|
||||
than formatting in place.
|
||||
|
||||
OPTION: <STRONG>-v</STRONG>, <STRONG>-nv</STRONG>
|
||||
|
||||
The <STRONG>-v</STRONG> flag turns on verbose mode; <STRONG>-nv</STRONG> turns it off. When in
|
||||
verbose mode, <EM>indent</EM> reports when it splits one line of input into two
|
||||
or more lines of output, and gives some size statistics at completion.
|
||||
The default is <STRONG>-nv</STRONG>.
|
||||
|
||||
<STRONG>User</STRONG> <STRONG>Profiles</STRONG>
|
||||
|
||||
You may set up your own profile of defaults to <EM>indent</EM> by creating a
|
||||
file called .<EM>indent</EM>.<EM>pro</EM> in either your login directory and/or the
|
||||
current directory and including whatever switches you like. Switches in
|
||||
.<EM>indent</EM>.<EM>pro</EM> in the current directory override those in your login
|
||||
directory (with the exception of <STRONG>-T</STRONG> type definitions, which just
|
||||
accumulate). If <EM>indent</EM> is run and a profile file exists, then it is read
|
||||
to set up the program's defaults. The switches should be separated by
|
||||
spaces, tabs or newlines. Switches on the command line, however,
|
||||
override profile switches.
|
||||
|
||||
<STRONG>Comments</STRONG>
|
||||
|
||||
<EM>Indent</EM> assumes that any comment with a dash or star immediately
|
||||
after the start of comment (that is, '/*-' or '/**') is a comment
|
||||
surrounded by a box of stars. Each line of such a comment is left
|
||||
unchanged, except that its indentation may be adjusted to account for
|
||||
the change in indentation of the first line of the comment.
|
||||
|
||||
All other comments are treated as straight text. Indent fits as
|
||||
many words (separated by blanks, tabs, or newlines) on a line as
|
||||
possible. Blank lines break paragraphs.
|
||||
|
||||
If a comment is on a line with code it is started in the comment
|
||||
column, which is set by the <STRONG>-cn</STRONG> command line parameter. Otherwise, the
|
||||
comment is started at <EM>n</EM> indentation levels less than where code is
|
||||
currently being placed, where n is specified by the <STRONG>-dn</STRONG> command line
|
||||
parameter. If the code on a line extends past the comment column, the
|
||||
comment starts further to the right, and the right margin may be
|
||||
automatically extended in extreme cases.
|
||||
|
||||
<STRONG>Preprocessor</STRONG> <STRONG>Lines</STRONG>
|
||||
|
||||
In general, <EM>indent</EM> leaves preprocessor lines alone. The only
|
||||
reformatting that it will do is to straighten up trailing comments. It
|
||||
leaves embedded comments alone. Conditional compilation
|
||||
(#ifdef...#endif) is recognized and <EM>indent</EM> attempts to correctly
|
||||
compensate for the syntactic peculiarities introduced.
|
||||
|
||||
<STRONG>C</STRONG> <STRONG>Syntax</STRONG>
|
||||
|
||||
Indent understands a substantial amount about the syntax of C, but
|
||||
it has a forgiving parser. It attempts to cope with the usual sorts of
|
||||
incomplete and misformed syntax. In particular, the use of macros like:
|
||||
|
||||
#define forever for(;;)
|
||||
|
||||
is handled properly.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
162
Minix/2.0.0/wwwman/man9/kermit.9.html
Normal file
162
Minix/2.0.0/wwwman/man9/kermit.9.html
Normal file
@@ -0,0 +1,162 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>kermit(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>kermit(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>kermit</STRONG> <STRONG>-</STRONG> <STRONG>transfer</STRONG> <STRONG>a</STRONG> <STRONG>file</STRONG> <STRONG>using</STRONG> <STRONG>the</STRONG> <STRONG>kermit</STRONG> <STRONG>protocol</STRONG>
|
||||
<STRONG>Syntax:</STRONG> <STRONG>kermit</STRONG>
|
||||
<STRONG>Flags:</STRONG> (many)
|
||||
<STRONG>Example:</STRONG> kermit # Start kermit
|
||||
|
||||
This is a slightly lobotomized <EM>kermit</EM>. The help command, the
|
||||
script facility, and the automatic dial support have been removed. The ?
|
||||
and ESC commands still work, so there is still reasonable built-in help.
|
||||
The only V7 <EM>kermit</EM> feature that does not work is the ability to see
|
||||
whether there are input characters waiting. This means that you will
|
||||
not be able to ask for status during a file transfer (though this is not
|
||||
critical, because <EM>kermit</EM> prints a dot every so often and other special
|
||||
characters whenever there is an error or timeout).
|
||||
|
||||
Start <EM>kermit</EM>, and then type the following to open a 2400 baud
|
||||
session, for example:
|
||||
|
||||
<STRONG>set</STRONG> <STRONG>line</STRONG> <STRONG>/dev/tty1</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>speed</STRONG> <STRONG>2400</STRONG>
|
||||
<STRONG>connect</STRONG>
|
||||
|
||||
(It is more convenient if you put these commands in .<EM>kermrc</EM> in your home
|
||||
directory, so that they get done automatically whenever you run <EM>kermit</EM>.)
|
||||
This will connect you to the modem or whatever on the serial port. Now
|
||||
log into the other system.
|
||||
|
||||
When you want to transfer files, run <EM>kermit</EM> on the other system.
|
||||
To it, type
|
||||
|
||||
<STRONG>server</STRONG>
|
||||
|
||||
This puts its <EM>kermit</EM> into a sort of 'slave mode' where it expects
|
||||
commands from the <EM>kermit</EM> running on your MINIX system. Now come back to
|
||||
the command level on MINIX <EM>kermit</EM>, by typing the escape character
|
||||
followed by <EM>c</EM>. (<EM>Kermit</EM> will tell you the current escape character when
|
||||
you do the connect command.) At this point you can issue various
|
||||
commands. Your <EM>kermit</EM> will coordinate things with <EM>kermit</EM> on the other
|
||||
machine so that you only have to type commands at one end. Common
|
||||
commands are
|
||||
|
||||
<STRONG>get</STRONG> <EM>filename</EM>
|
||||
<STRONG>put</STRONG> <EM>filename</EM>
|
||||
<STRONG>remote</STRONG> <EM>dir</EM>
|
||||
|
||||
Filenames can include wildcards. By default, <EM>kermit</EM> works in a system-
|
||||
independent, text mode. (In effect it assumes that the whole world is
|
||||
MS-DOS and converts end of line and file names accordingly.) To send
|
||||
binary files, you will want to type
|
||||
|
||||
<STRONG>set</STRONG> <STRONG>file</STRONG> <STRONG>type</STRONG> <STRONG>bin</STRONG>
|
||||
|
||||
on both ends before starting any transfers. This disables CR LF to
|
||||
newline conversion. If both of your systems are some flavor of UNIX,
|
||||
you might as well put this in .<EM>kermrc</EM> on both ends and run in binary
|
||||
mode all the time. Also, if both systems are UNIX it is recommended
|
||||
that you use
|
||||
|
||||
<STRONG>set</STRONG> <STRONG>file</STRONG> <STRONG>name</STRONG> <STRONG>lit</STRONG>
|
||||
|
||||
on both ends. This causes it to keep file names unchanged, rather than
|
||||
mapping to legal MS-DOS names.
|
||||
|
||||
Here is a typical .<EM>kermrc</EM> for use on MINIX:
|
||||
|
||||
<STRONG>set</STRONG> <STRONG>line</STRONG> <STRONG>/dev/tty1</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>speed</STRONG> <STRONG>1200</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>esc</STRONG> <STRONG>29</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>file</STRONG> <STRONG>type</STRONG> <STRONG>bin</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>file</STRONG> <STRONG>name</STRONG> <STRONG>lit</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>retry</STRONG> <STRONG>90</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>prompt</STRONG> <STRONG>MINIX</STRONG> <STRONG>kermit></STRONG>
|
||||
<STRONG>connect</STRONG>
|
||||
|
||||
On the other end of the line, for example, the host at your local
|
||||
computer center to which you want to transfer files, a typical profile
|
||||
might be:
|
||||
|
||||
<STRONG>set</STRONG> <STRONG>rec</STRONG> <STRONG>packet</STRONG> <STRONG>1000</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>fil</STRONG> <STRONG>name</STRONG> <STRONG>lit</STRONG>
|
||||
<STRONG>set</STRONG> <STRONG>fil</STRONG> <STRONG>type</STRONG> <STRONG>bin</STRONG>
|
||||
<STRONG>server</STRONG>
|
||||
|
||||
|
||||
<EM>Kermit</EM> has many other options and features. For a pleasant and
|
||||
highly readable description of it, see the following book:
|
||||
|
||||
Title: Kermit: A File Transfer Protocol
|
||||
Author: Frank da Cruz
|
||||
Publisher: Digital Press
|
||||
Date: 1987
|
||||
ISBN: 0-932376-88
|
||||
|
||||
|
||||
For information about recent <EM>kermit</EM> developments, versions for
|
||||
other systems, and so forth, please contact:
|
||||
|
||||
Christine M. Gianone
|
||||
Manager, Kermit Development and Distribution
|
||||
University Center for Computing Activities
|
||||
Columbia University
|
||||
612 West 115th Street
|
||||
New York, N.Y. 10025
|
||||
|
||||
Over 400 versions of <EM>kermit</EM> are available, so it is likely there is one
|
||||
for any computer your MINIX system might want to talk to. Columbia
|
||||
University also publishes a newsletter about <EM>kermit</EM> that can be
|
||||
requested from the above address.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
211
Minix/2.0.0/wwwman/man9/m4.9.html
Normal file
211
Minix/2.0.0/wwwman/man9/m4.9.html
Normal file
@@ -0,0 +1,211 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>m4(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>m4(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>m4</STRONG> <STRONG>-</STRONG> <STRONG>macro</STRONG> <STRONG>processor</STRONG>
|
||||
<STRONG>Syntax:</STRONG> <STRONG>m4</STRONG> [<STRONG>-D</STRONG> <EM>name</EM> = <EM>value</EM>] [<STRONG>-U</STRONG> <EM>name</EM>]
|
||||
<STRONG>Flags:</STRONG> <STRONG>-D</STRONG> Define a symbol
|
||||
<STRONG>-U</STRONG> Undefine a symbol
|
||||
<STRONG>Example:</STRONG> m4 <m4test # Run M4
|
||||
|
||||
<EM>M4</EM> is a macro processor intended as a front end for Ratfor, Pascal,
|
||||
and other languages that do not have a built-in macro processing
|
||||
capability. M4 reads standard input, the processed text is written on
|
||||
the standard output.
|
||||
|
||||
The options and their effects are as follows:
|
||||
|
||||
-D name[=val] Defines name to val, or to null in val's absence.
|
||||
-U name Undefines name.
|
||||
|
||||
|
||||
Macro calls have the form: name(arg1,arg2, ..., argn)
|
||||
|
||||
The '(' must immediately follow the name of the macro. If the name of a
|
||||
defined macro is not followed by a ( it is taken to be a call of that
|
||||
macro with no arguments, i.e. name(). Potential macro names consist of
|
||||
alphabetic letters and digits.
|
||||
|
||||
Leading unquoted blanks, tabs and newlines are ignored while
|
||||
collecting arguments. Left and right single quotes are used to quote
|
||||
strings. The value of a quoted string is the string stripped of the
|
||||
quotes.
|
||||
|
||||
When a macro name is recognized, its arguments are collected by
|
||||
searching for a matching ). If fewer arguments are supplied than are in
|
||||
the macro definition, the trailing arguments are taken to be null.
|
||||
Macro evaluation proceeds normally during the collection of the
|
||||
arguments, and any commas or right parentheses which happen to turn up
|
||||
within the value of a nested call are as effective as those in the
|
||||
original input text. (This is typically referred as inside-out macro
|
||||
expansion.) After argument collection, the value of the macro is pushed
|
||||
back onto the input stream and rescanned.
|
||||
|
||||
M4 makes available the following built-in macros. They may be
|
||||
redefined, but once this is done the original meaning is lost. Their
|
||||
values are null unless otherwise stated.
|
||||
|
||||
<STRONG>define</STRONG> <STRONG>"(name</STRONG> <STRONG>[,</STRONG> <STRONG>val])"</STRONG> the second argument is installed as the
|
||||
value of the macro whose name is the first argument. If there is no
|
||||
second argument, the value is null. Each occurrence of $ n in the
|
||||
replacement text, where n is a digit, is replaced by the n -th argument.
|
||||
Argument 0 is the name of the macro; missing arguments are replaced by
|
||||
the null string.
|
||||
|
||||
<STRONG>defn</STRONG> <STRONG>"(name</STRONG> <STRONG>[,</STRONG> <STRONG>name</STRONG> <STRONG>...])"</STRONG> returns the quoted definition of its
|
||||
argument(s). Useful in renaming macros.
|
||||
|
||||
<STRONG>undefine</STRONG> <STRONG>"(name</STRONG> <STRONG>[,</STRONG> <STRONG>name</STRONG> <STRONG>...])"</STRONG> removes the definition of the
|
||||
macro(s) named. If there is more than one definition for the named
|
||||
macro, (due to previous use of pushdef) all definitions are removed.
|
||||
|
||||
<STRONG>pushdef</STRONG> <STRONG>"(name</STRONG> <STRONG>[,</STRONG> <STRONG>val])"</STRONG> like define, but saves any previous
|
||||
definition by stacking the current definition.
|
||||
|
||||
<STRONG>popdef</STRONG> <STRONG>"(name</STRONG> <STRONG>[,</STRONG> <STRONG>name</STRONG> <STRONG>...])"</STRONG> removes current definition of its
|
||||
argument(s), exposing the previous one if any.
|
||||
|
||||
<STRONG>ifdef</STRONG> <STRONG>"(name,</STRONG> <STRONG>if</STRONG>-<STRONG>def</STRONG> <STRONG>[,</STRONG> <STRONG>ifnot</STRONG>-<STRONG>def])"</STRONG> if the first argument is
|
||||
defined, the value is the second argument, otherwise the third. If
|
||||
there is no third argument, the value is null. A word indicating the
|
||||
current operating system is predefined. (e.g. unix or vms).
|
||||
|
||||
<STRONG>shift</STRONG> <STRONG>"(arg,</STRONG> <STRONG>arg,</STRONG> <STRONG>arg,</STRONG> <STRONG>...)"</STRONG> returns all but its first argument.
|
||||
The other arguments are quoted and pushed back with commas in between.
|
||||
The quoting nullifies the effect of the extra scan that will
|
||||
subsequently be performed.
|
||||
|
||||
<STRONG>changequote</STRONG> <STRONG>"(lqchar,</STRONG> <STRONG>rqchar)"</STRONG> change quote symbols to the first
|
||||
and second arguments. With no arguments, the quotes are reset back to
|
||||
the default characters. (i.e., `').
|
||||
|
||||
<STRONG>changecom</STRONG> <STRONG>"(lcchar,</STRONG> <STRONG>rcchar)"</STRONG> change left and right comment markers
|
||||
from the default # and newline. With no arguments, the comment
|
||||
mechanism is reset back to the default characters. With one argument,
|
||||
the left marker becomes the argument and the right marker becomes
|
||||
newline. With two arguments, both markers are affected.
|
||||
|
||||
<STRONG>divert</STRONG> <STRONG>"(divnum)"</STRONG> maintains 10 output streams, numbered 0-9.
|
||||
Initially stream 0 is the current stream. The divert macro changes the
|
||||
current output stream to its (digit-string) argument. Output diverted
|
||||
to a stream other than 0 through 9 is lost.
|
||||
|
||||
<STRONG>undivert</STRONG> <STRONG>"([divnum</STRONG> <STRONG>[,</STRONG> <STRONG>divnum</STRONG> <STRONG>...]])"</STRONG> causes immediate output of
|
||||
text from diversions named as argument(s), or all diversions if no
|
||||
argument. Text may be undiverted into another diversion. Undiverting
|
||||
discards the diverted text. At the end of input processing, M4 forces an
|
||||
automatic undivert unless is defined.
|
||||
|
||||
<STRONG>divnum</STRONG> <STRONG>"()"</STRONG> returns the value of the current output stream.
|
||||
|
||||
<STRONG>dnl</STRONG> <STRONG>"()"</STRONG> reads and discards characters up to and including the next
|
||||
newline.
|
||||
|
||||
|
||||
<STRONG>ifelse</STRONG> <STRONG>"(arg,</STRONG> <STRONG>arg,</STRONG> <STRONG>if</STRONG>-<STRONG>same</STRONG> <STRONG>[,</STRONG> <STRONG>ifnot</STRONG>-<STRONG>same</STRONG> <STRONG>|</STRONG> <STRONG>arg,</STRONG> <STRONG>arg</STRONG> <STRONG>...])"</STRONG> has
|
||||
three or more arguments. If the first argument is the same string as
|
||||
the second, then the value is the third argument. If not, and if there
|
||||
are more than four arguments, the process is repeated with arguments 4,
|
||||
5, 6 and 7. Otherwise, the value is either the fourth string, or, if it
|
||||
is not present, null.
|
||||
|
||||
<STRONG>incr</STRONG> <STRONG>"(num)"</STRONG> returns the value of its argument incremented by 1.
|
||||
The value of the argument is calculated by interpreting an initial
|
||||
digit-string as a decimal number.
|
||||
|
||||
<STRONG>decr</STRONG> <STRONG>"(num)"</STRONG> returns the value of its argument decremented by 1.
|
||||
|
||||
<STRONG>eval</STRONG> <STRONG>"(expression)"</STRONG> evaluates its argument as a constant
|
||||
expression, using integer arithmetic. The evaluation mechanism is very
|
||||
similar to that of cpp (#if expression). The expression can involve
|
||||
only integer constants and character constants, possibly connected by
|
||||
the binary operators
|
||||
|
||||
* / % + - >> << < > <= >= == != &
|
||||
^ | && ||
|
||||
|
||||
or the unary operators - ! or tilde or by the ternary operator ? : .
|
||||
Parentheses may be used for grouping. Octal numbers may be specified as
|
||||
in C.
|
||||
|
||||
<STRONG>len</STRONG> <STRONG>"(string)"</STRONG> returns the number of characters in its argument.
|
||||
|
||||
<STRONG>index</STRONG> <STRONG>"(search</STRONG>-<STRONG>string,</STRONG> <STRONG>string)"</STRONG> returns the position in its first
|
||||
argument where the second argument begins (zero origin), or 1 if the
|
||||
second argument does not occur.
|
||||
|
||||
<STRONG>substr</STRONG> <STRONG>"(string,</STRONG> <STRONG>index</STRONG> <STRONG>[,</STRONG> <STRONG>length])"</STRONG> returns a substring of its
|
||||
first argument. The second argument is a zero origin number selecting
|
||||
the first character (internally treated as an expression); the third
|
||||
argument indicates the length of the substring. A missing third
|
||||
argument is taken to be large enough to extend to the end of the first
|
||||
string.
|
||||
|
||||
<STRONG>translit</STRONG> <STRONG>"(source,</STRONG> <STRONG>from</STRONG> <STRONG>[,</STRONG> <STRONG>to])"</STRONG> transliterates the characters in
|
||||
its first argument from the set given by the second argument to the set
|
||||
given by the third. If the third argument is shorter than the second,
|
||||
all extra characters in the second argument are deleted from the first
|
||||
argument. If the third argument is missing altogether, all characters in
|
||||
the second argument are deleted from the first argument.
|
||||
|
||||
<STRONG>include</STRONG> <STRONG>"(filename)"</STRONG> returns the contents of the file that is named
|
||||
in the argument.
|
||||
|
||||
|
||||
<STRONG>sinclude</STRONG> <STRONG>"(filename)"</STRONG>is identical to include, except that it says
|
||||
nothing if the file is inaccessable.
|
||||
|
||||
<STRONG>paste</STRONG> <STRONG>"(filename)"</STRONG> returns the contents of the file named in the
|
||||
argument without any processing, unlike include.
|
||||
|
||||
<STRONG>spaste</STRONG> <STRONG>"(filename)"</STRONG> is identical to paste, except that it says
|
||||
nothing if the file is inaccessibl[De.
|
||||
|
||||
<STRONG>syscmd</STRONG> <STRONG>"(command)"</STRONG> executes the UNIX command given in the first
|
||||
argument. No value is returned.
|
||||
|
||||
<STRONG>sysval</STRONG> <STRONG>"()"</STRONG> is the return code from the last call to syscmd.
|
||||
.PP <STRONG>maketemp</STRONG> <STRONG>'(string)"</STRONG> fills in a string of XXXXXX in its argument
|
||||
with the current process ID.
|
||||
|
||||
<STRONG>m4exit</STRONG> <STRONG>"([exitcode])"</STRONG> causes immediate exit from M4. Argument 1,
|
||||
if given, is the exit code; the default is 0.
|
||||
|
||||
<STRONG>m4wrap</STRONG> <STRONG>"(m4</STRONG>-<STRONG>macro</STRONG>-<STRONG>or</STRONG>-<STRONG>built</STRONG>-<STRONG>n)"</STRONG> argument 1 will be pushed back at
|
||||
final EOF; example: m4wrap(`dumptable()').
|
||||
|
||||
<STRONG>errprint</STRONG> <STRONG>"(str</STRONG> <STRONG>[,</STRONG> <STRONG>str,</STRONG> <STRONG>str,</STRONG> <STRONG>...])"</STRONG> prints its argument(s) on
|
||||
stderr. If there is more than one argument, each argument is separated
|
||||
by a space during the output. An arbitrary number of arguments may be
|
||||
supplied.
|
||||
|
||||
<STRONG>dumpdef</STRONG> <STRONG>"([name,</STRONG> <STRONG>name,</STRONG> <STRONG>...])"</STRONG> prints current names and definitions,
|
||||
for the named items, or for all if no arguments are given.
|
||||
|
||||
|
||||
<STRONG>Author</STRONG>
|
||||
|
||||
|
||||
<EM>M4</EM> was written by Ozan S. Yigif.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
161
Minix/2.0.0/wwwman/man9/mined.9.html
Normal file
161
Minix/2.0.0/wwwman/man9/mined.9.html
Normal file
@@ -0,0 +1,161 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>mined(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>mined(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>mined</STRONG> <STRONG>-</STRONG> <STRONG>MINIX</STRONG> <STRONG>editor</STRONG>
|
||||
<STRONG>Syntax:</STRONG> <STRONG>mined</STRONG> [<EM>file</EM>]
|
||||
<STRONG>Flags:</STRONG> (none)
|
||||
<STRONG>Examples:</STRONG> mined /user/ast/book.3 # Edit an existing file
|
||||
mined # Call editor to create a new file
|
||||
ls -l | mined # Use <EM>mined</EM> as a pager to inspect
|
||||
listing
|
||||
|
||||
<EM>Mined</EM> is a simple screen editor. At any instant, a window of 24
|
||||
lines is visible on the screen. The current position in the file is
|
||||
shown by the cursor. Ordinary characters typed in are inserted at the
|
||||
cursor. Control characters and keys on the numeric keypad (at the
|
||||
right-hand side of the keyboard) are used to move the cursor and perform
|
||||
other functions.
|
||||
|
||||
Commands exist to move forward and backward a word, and delete
|
||||
words either in front of the cursor or behind it. A word in this
|
||||
context is a sequence of characters delimited on both ends by white
|
||||
space (space, tab, line feed, start of file, or end of file). The
|
||||
commands for deleting characters and words also work on line feeds,
|
||||
making it possible to join two consecutive lines by deleting the line
|
||||
feed between them.
|
||||
|
||||
The editor maintains one save buffer (not displayed). Commands are
|
||||
present to move text from the file to the buffer, from the buffer to the
|
||||
file, and to write the buffer onto a new file. If the edited text
|
||||
cannot be written out due to a full disk, it may still be possible to
|
||||
copy the whole text to the save buffer and then write it to a different
|
||||
file on a different disk with CTRL-Q. It may also be possible to escape
|
||||
from the editor with CTRL-S and remove some files.
|
||||
|
||||
Some of the commands prompt for arguments (file names, search
|
||||
patterns, etc.). All commands that might result in loss of the file
|
||||
being edited prompt to ask for confirmation.
|
||||
|
||||
A key (command or ordinary character) can be repeated <EM>n</EM> times by
|
||||
typing <EM>ESC</EM> <EM>n</EM> <EM>key</EM> where <EM>ESC</EM> is the 'escape' key.
|
||||
|
||||
Forward and backward searching requires a regular expression as the
|
||||
search pattern. Regular expressions follow the same rules as in the
|
||||
UNIX editor, <EM>ed</EM>. These rules can be stated as:
|
||||
|
||||
|
||||
Any displayable character matches itself.
|
||||
|
||||
. (period) matches any character except line feed.
|
||||
|
||||
^ (circumflex) matches the start of the line.
|
||||
|
||||
$ (dollar sign) matches the end of the line.
|
||||
\c matches the character <EM>c</EM> (including period, circumflex, etc).
|
||||
|
||||
[<EM>string</EM>] matches any of the characters in the string.
|
||||
|
||||
[^string] matches any of the characters except those in the
|
||||
string.
|
||||
|
||||
[<EM>x</EM>-<EM>y</EM>] matches any characters between <EM>x</EM> and <EM>y</EM> (e.g., [<EM>a</EM>-<EM>z</EM>]).
|
||||
|
||||
Pattern* matches any number of occurrences of <EM>pattern</EM>.
|
||||
|
||||
|
||||
Some examples of regular expressions are:
|
||||
|
||||
The boy matches the string 'The boy'
|
||||
^$ matches any empty line.
|
||||
^.$ matches any line containing exactly 1 character
|
||||
^A.*\.$ matches any line starting with an <EM>A</EM>, ending with a
|
||||
period.
|
||||
^[A-Z]*$ matches any line containing only capital letters (or
|
||||
empty).
|
||||
[A-Z0-9] matches any line containing either a capital letter or a
|
||||
digit.
|
||||
.*X$ matches any line ending in 'X'
|
||||
A.*B matches any line containing an 'A' and then a 'B'
|
||||
|
||||
|
||||
Control characters cannot be entered into a file simply by typing
|
||||
them because all of them are editor commands. To enter a control
|
||||
character, depress the ALT key, and then while holding it down, hit the
|
||||
ESC key. Release both ALT and ESC and type the control character.
|
||||
Control characters are displayed in reverse video.
|
||||
|
||||
The <EM>mined</EM> commands are as follows.
|
||||
|
||||
<STRONG>CURSOR</STRONG> <STRONG>MOTION</STRONG>
|
||||
<STRONG>arrows</STRONG> Move the cursor in the indicated direction
|
||||
<STRONG>CTRL</STRONG>-<STRONG>A</STRONG> Move cursor to start of current line
|
||||
<STRONG>CTRL</STRONG>-<STRONG>Z</STRONG> Move cursor to end of current line
|
||||
<STRONG>CTRL</STRONG>-<STRONG>^</STRONG> Move cursor to top of screen
|
||||
<STRONG>CTRL</STRONG>-<STRONG>_</STRONG> Move cursor to end of screen
|
||||
<STRONG>CTRL</STRONG>-<STRONG>F</STRONG> Move cursor forward to start of next word
|
||||
<STRONG>CTRL</STRONG>-<STRONG>B</STRONG> Move cursor backward to start of previous word
|
||||
|
||||
<STRONG>SCREEN</STRONG> <STRONG>MOTION</STRONG>
|
||||
<STRONG>Home</STRONG> <STRONG>key</STRONG> Move to first character of the file
|
||||
<STRONG>End</STRONG> <STRONG>key</STRONG> Move to last character of the file
|
||||
<STRONG>PgUp</STRONG> <STRONG>key</STRONG> Scroll window up 23 lines (closer to start of the file)
|
||||
<STRONG>PgDn</STRONG> <STRONG>key</STRONG> Scroll window down 23 lines (closer to end of the file)
|
||||
<STRONG>CTRL</STRONG>-<STRONG>U</STRONG> Scroll window up 1 line
|
||||
<STRONG>CTRL</STRONG>-<STRONG>D</STRONG> Scroll window down 1 line
|
||||
|
||||
<STRONG>MODIFYING</STRONG> <STRONG>TEXT</STRONG>
|
||||
<STRONG>Del</STRONG> <STRONG>key</STRONG> Delete the character under the cursor
|
||||
<STRONG>Backspace</STRONG> Delete the character to left of the cursor
|
||||
<STRONG>CTRL</STRONG>-<STRONG>N</STRONG> Delete the next word
|
||||
<STRONG>CTRL</STRONG>-<STRONG>P</STRONG> Delete the previous word
|
||||
<STRONG>CTRL</STRONG>-<STRONG>T</STRONG> Delete tail of line (all characters from cursor to end of
|
||||
line)
|
||||
<STRONG>CTRL</STRONG>-<STRONG>O</STRONG> Open up the line (insert line feed and back up)
|
||||
<STRONG>CTRL</STRONG>-<STRONG>G</STRONG> Get and insert a file at the cursor position
|
||||
|
||||
<STRONG>BUFFER</STRONG> <STRONG>OPERATIONS</STRONG>
|
||||
<STRONG>CTRL</STRONG>-<STRONG>@</STRONG> Set mark at current position for use with CTRL-C and
|
||||
CTRL-K
|
||||
<STRONG>CTRL</STRONG>-<STRONG>C</STRONG> Copy the text between the mark and the cursor into the
|
||||
buffer
|
||||
<STRONG>CTRL</STRONG>-<STRONG>K</STRONG> Delete text between mark and cursor; also copy it to the
|
||||
buffer
|
||||
<STRONG>CTRL</STRONG>-<STRONG>Y</STRONG> Yank contents of the buffer out and insert it at the
|
||||
cursor
|
||||
<STRONG>CTRL</STRONG>-<STRONG>Q</STRONG> Write the contents of the buffer onto a file
|
||||
|
||||
<STRONG>MISCELLANEOUS</STRONG>
|
||||
<STRONG>numeric</STRONG> <STRONG>+</STRONG> Search forward (prompts for regular expression)
|
||||
<STRONG>numeric</STRONG> <STRONG>-</STRONG> Search backward (prompts for regular expression)
|
||||
<STRONG>numeric</STRONG> <STRONG>5</STRONG> Display the file status
|
||||
<STRONG>CTRL</STRONG>-<STRONG>]</STRONG> Go to specific line
|
||||
<STRONG>CTRL</STRONG>-<STRONG>R</STRONG> Global replace <EM>pattern</EM> with <EM>string</EM> (from cursor to end)
|
||||
<STRONG>CTRL</STRONG>-<STRONG>L</STRONG> Line replace <EM>pattern</EM> with <EM>string</EM>
|
||||
<STRONG>CTRL</STRONG>-<STRONG>W</STRONG> Write the edited file back to the disk
|
||||
<STRONG>CTRL</STRONG>-<STRONG>X</STRONG> Exit the editor
|
||||
<STRONG>CTRL</STRONG>-<STRONG>S</STRONG> Fork off a shell (use CTRL-D to get back to the editor)
|
||||
<STRONG>CTRL</STRONG>-<STRONG>\</STRONG> Abort whatever the editor was doing and wait for command
|
||||
<STRONG>CTRL</STRONG>-<STRONG>E</STRONG> Erase screen and redraw it
|
||||
<STRONG>CTRL</STRONG>-<STRONG>V</STRONG> Visit (edit) a new file
|
||||
|
||||
|
||||
<STRONG>Author</STRONG>
|
||||
|
||||
<EM>Mined</EM> was designed by Andy Tanenbaum and written by Michiel
|
||||
Huisjes.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
111
Minix/2.0.0/wwwman/man9/roff.9.html
Normal file
111
Minix/2.0.0/wwwman/man9/roff.9.html
Normal file
@@ -0,0 +1,111 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>roff(9)</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>roff(9)</H1>
|
||||
<HR>
|
||||
<PRE>
|
||||
<STRONG>Command:</STRONG> <STRONG>roff</STRONG> <STRONG>-</STRONG> <STRONG>text</STRONG> <STRONG>formatter</STRONG>
|
||||
<STRONG>Syntax:</STRONG> <STRONG>roff</STRONG> [<STRONG>-hs</STRONG>] [<STRONG>+</STRONG><EM>n</EM>] [<STRONG>-</STRONG><EM>n</EM>] <EM>file</EM> ...
|
||||
<STRONG>Flags:</STRONG> <STRONG>-h</STRONG> Expand tabs to spaces in output
|
||||
<STRONG>-s</STRONG> Stop before each page; continue on DEL
|
||||
<STRONG>+</STRONG><EM>n</EM> Start printing with page <EM>n</EM>
|
||||
<STRONG>-</STRONG><EM>n</EM> Stop after page <EM>n</EM>
|
||||
<STRONG>Examples:</STRONG> roff file # Run off <EM>file</EM>
|
||||
roff +5 file # Run off <EM>file</EM> starting at page 5
|
||||
|
||||
<EM>Roff</EM> is a text formatter. Its input consists of the text to be
|
||||
output, intermixed with formatting commands. A formatting command is a
|
||||
line containing the control character followed by a two character
|
||||
command name, and possibly one or more arguments. The control character
|
||||
is initially '.' (dot). The formatted output is produced on standard
|
||||
output.
|
||||
|
||||
The formatting commands are listed below, with <EM>n</EM> being a number, <EM>c</EM>
|
||||
being a character, and <EM>t</EM> being a title. A + before <EM>n</EM> means it may be
|
||||
signed, indicating a positive or negative change from the current value.
|
||||
Initial values for <EM>n</EM>, where relevant, are given in parentheses.
|
||||
|
||||
<STRONG>.ad</STRONG> Adjust right margin.
|
||||
<STRONG>.ar</STRONG> Arabic page numbers.
|
||||
<STRONG>.br</STRONG> Line break. Subsequent text will begin on a new line.
|
||||
<STRONG>.bl</STRONG> n Insert <EM>n</EM> blank lines.
|
||||
<STRONG>.bp</STRONG> +n Begin new page and number it <EM>n</EM>. No <EM>n</EM> means +1.
|
||||
<STRONG>.cc</STRONG> c Control character is set to <EM>c</EM>.
|
||||
<STRONG>.ce</STRONG> n Center the next <EM>n</EM> input lines.
|
||||
<STRONG>.de</STRONG> zz Define a macro called <EM>zz</EM>. A line with '..' ends definition.
|
||||
<STRONG>.ds</STRONG> Double space the output. Same as <STRONG>.ls</STRONG> <STRONG>2</STRONG>.
|
||||
<STRONG>.ef</STRONG> t Even page footer title is set to <EM>t</EM>.
|
||||
<STRONG>.eh</STRONG> t Even page header title is set to <EM>t</EM>.
|
||||
<STRONG>.fi</STRONG> Begin filling output lines as full as possible.
|
||||
<STRONG>.fo</STRONG> t Footer titles (even and odd) are set to <EM>t</EM>.
|
||||
<STRONG>.hc</STRONG> c The character <EM>c</EM> (e.g., %) tells <EM>roff</EM> where hyphens are
|
||||
permitted.
|
||||
<STRONG>.he</STRONG> t Header titles (even and odd) are set to <EM>t</EM>.
|
||||
<STRONG>.hx</STRONG> Header titles are suppressed.
|
||||
<STRONG>.hy</STRONG> n Hyphenation is done if <EM>n</EM> is 1, suppressed if it is 0.
|
||||
Default is 1.
|
||||
<STRONG>.ig</STRONG> Ignore input lines until a line beginning with '..' is
|
||||
found.
|
||||
<STRONG>.in</STRONG> n Indent <EM>n</EM> spaces from the left margin; force line break.
|
||||
<STRONG>.ix</STRONG> n Same as .<EM>in</EM> but continue filling output on current line.
|
||||
<STRONG>.li</STRONG> n Literal text on next <EM>n</EM> lines. Copy to output unmodified.
|
||||
<STRONG>.ll</STRONG> +n Line length (including indent) is set to <EM>n</EM> (65).
|
||||
<STRONG>.ls</STRONG> +n Line spacing: <EM>n</EM> (1) is 1 for single spacing, 2 for double,
|
||||
etc.
|
||||
<STRONG>.m1</STRONG> n Insert <EM>n</EM> (2) blank lines between top of page and header.
|
||||
<STRONG>.m2</STRONG> n Insert <EM>n</EM> (2) blank lines between header and start of text.
|
||||
<STRONG>.m3</STRONG> n Insert <EM>n</EM> (1) blank lines between end of text and footer.
|
||||
<STRONG>.m4</STRONG> n Insert <EM>n</EM> (3) blank lines between footer and end of page.
|
||||
<STRONG>.na</STRONG> No adjustment of the right margin.
|
||||
<STRONG>.ne</STRONG> n Need <EM>n</EM> lines. If fewer are left, go to next page.
|
||||
<STRONG>.nn</STRONG> +n The next <EM>n</EM> output lines are not numbered.
|
||||
<STRONG>.n1</STRONG> Number output lines in left margin starting at 1.
|
||||
<STRONG>.n2</STRONG> n Number output lines starting at <EM>n</EM>. If 0, stop numbering.
|
||||
<STRONG>.ni</STRONG> +n Indent line numbers by <EM>n</EM> (0) spaces.
|
||||
<STRONG>.nf</STRONG> No more filling of lines.
|
||||
<STRONG>.nx</STRONG> f Switch input to file <EM>f</EM>.
|
||||
<STRONG>.of</STRONG> t Odd page footer title is set to <EM>t</EM>.
|
||||
<STRONG>.oh</STRONG> t Odd page header title is set to <EM>t</EM>.
|
||||
<STRONG>.pa</STRONG> +n Page adjust by <EM>n</EM> (1). Same as .bp
|
||||
<STRONG>.pl</STRONG> +n Paper length is <EM>n</EM> (66) lines.
|
||||
<STRONG>.po</STRONG> +n Page offset. Each line is started with <EM>n</EM> (0) spaces.
|
||||
<STRONG>.ro</STRONG> Page numbers are printed in Roman numerals.
|
||||
<STRONG>.sk</STRONG> n Skip <EM>n</EM> pages (i.e., make them blank), starting with next
|
||||
one.
|
||||
<STRONG>.sp</STRONG> n Insert <EM>n</EM> blank lines, except at top of page.
|
||||
<STRONG>.ss</STRONG> Single spacing. Equivalent to .ls 1.
|
||||
<STRONG>.ta</STRONG> Set tab stops, e.g., .ta 9 17 25 33 41 49 57 65 73
|
||||
(default).
|
||||
<STRONG>.tc</STRONG> c Tabs are expanded into <EM>c</EM>. Default is space.
|
||||
<STRONG>.ti</STRONG> n Indent next line <EM>n</EM> spaces; then go back to previous indent.
|
||||
<STRONG>.tr</STRONG> ab Translate <EM>a</EM> into <EM>b</EM> on output.
|
||||
<STRONG>.ul</STRONG> n Underline the letters and numbers in the next <EM>n</EM> lines.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Reference in New Issue
Block a user