+ All Categories
Home > Documents > GNU Teseq 1.0.0 Manual

GNU Teseq 1.0.0 Manual

Date post: 29-May-2018
Category:
Upload: micah-cowan
View: 240 times
Download: 0 times
Share this document with a friend
30
8/9/2019 GNU Teseq 1.0.0 Manual http://slidepdf.com/reader/full/gnu-teseq-100-manual 1/30 GNU Teseq 1.0.0 Manual by Micah Cowan <[email protected] >
Transcript
Page 1: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 1/30

GNU Teseq 1.0.0 Manual

by Micah Cowan < [email protected]>

Page 2: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 2/30

This manual is or GNU Teseq, version 1.0.0.

Copyright c 2008 Micah Cowan < [email protected]>

Permission is granted to copy, distribute and/or modiy this document under theterms o the GNU Free Documentation License, Version 1.2 or any later versionpublished by the Free Sotware Foundation; with no Invariant Sections, noFront-Cover Texts, and no Back-Cover Texts. A copy o the license is includedin the section entitled “GNU Free Documentation License”.

Page 3: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 3/30

i

Table o Contents

1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

A Quick Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Invoking Teseq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Interactive Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.1 Text Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.2 Control-Character Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.3 Escape-Sequence Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Recognizing Escape Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.4 Label Lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103.5 Description Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.6 Delay Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4 The Reseq Command . . . . . . . . . . . . . . . . . . . . . . . . . 13

Reserved Line Prexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

6 Future Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . 16

6.1 Localized Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

166.2 Stateul Processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166.3 Terminal Database Awareness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

7 Contact and Inormation . . . . . . . . . . . . . . . . . . . . . 18

Appendix A Copying . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Page 4: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 4/30

Chapter 1: Overview 1

1 Overview

GNU Teseq is a tool or translating les that contain control characters and terminal controlsequences, into human-understandable text. It is intended to aid in debugging problems interminal emulators, sotware that makes use o special terminal eatures, and interactionsbetween the two.

It is primarily targeted at individuals who possess a basic understanding o terminalcontrol sequences, especially csi sequences; however, by deault Teseq will try to identiyand describe the sequences that it encounters, and the behavior they might produce in aterminal.

Teseq describes control unctions as they are interpreted by VT100-compatible terminals,and/or terminals compliant with the Ecma-48 / ISO/IEC 6429 standard. Teseq does not 

support describing control unctions according to terminal-specic denitions in a databasesuch as termcap or termino, though uture versions may include limited support or that(see Chapter 6 [Future Enhancements], page 16). Thereore, the descriptions Teseq usesor control unctions may not necessarily match their actual interpretation by whateverterminal device the characters were actually intended or.

GNU Teseq is ree sotware. See Appendix A [Copying], page 19, or copying conditions.

A Quick Example

You can’t beat a short example to demonstrate what a program does, so here goes. Supposeyou’ve got a program that writes the ollowing output to a terminal.

Hi there, world

A simple text string, using a boldace ont to render the rst word.

Suppose that, ater a moment or two, the program then replaced the nal word “world”with the word “earth”.

In order to achieve this efect, the program would have to send special controls to theterminal to ask it to start writing in bold text, and then to revert back to normal text orthe rest. To replace the nal word, it might have to issue a series o backspaces beoreissuing the replacement word. All o this will be handled transparently by the terminal,and you wouldn’t see any o the special characters the program sent to the terminal—unlessperhaps you convinced the program to write to a text le as i it were writing to a terminal,or ran the program under a terminal capture utility such as the script command.

You may be able to produce this efect yoursel with the ollowing shell command.

$ printf ’\033[1mHi\033[m there, world’; sleep 1; \

printf ’\b\b\b\b\bearth\n’

I you were to examine the output rom such a command with a text editor, it might looksomething like this.

^[[1mHi^[[m there, world^H^H^H^H^Hearth

Not very readable, is it? That’s where Teseq comes in! When you run that gibberishthrough the teseq command with the deault settings, you’ll get the ollowing output.

: E s c [ 1 m

& SGR: SELECT GRAPHIC RENDITION

Page 5: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 5/30

Chapter 1: Overview 2

" Set bold text.

|Hi|

: E s c [ 0 m

& SGR: SELECT GRAPHIC RENDITION

" Clear graphic rendition to defaults.

| there, world|

. BS/^H BS/^H BS/^H BS/^H BS/^H

|earth|.

Note that the special control sequences that tell the terminal to start and stop writing inboldace text are separated out on their own lines (prexed with a colon ‘ :’), and ollowedby an identication (prexed with an ampersand ‘&’) and a description o what it does(prexed with a quote character ‘"’).

The actual text appears in lines bracketed by pipe ‘|’ characters.

The series o single-character backspace controls appear on a line prexed with a period‘.’, identied by its identiying acronym (bs or backspace), and its control-key represen-tation (Control-H).

The nal word, “earth”, is ollowed by a period just ater the closing pipe symbol; thisindicates a ollowing lineeed (or “newline”) character.

The reseq command may be used to reverse the procedure, accepting the above inputand printing out the original set o escape sequences that produced it. See Chapter 4[Reseq], page 13.

Page 6: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 6/30

Chapter 2: Invoking Teseq 3

2 Invoking Teseq

The ormat or running the teseq program is:

teseq options [input-file ] [output-file ]teseq -h | --help

teseq -V | --version

I  input-fle  or output-fle  is unspecied, or specied as ‘-’, standard input/output is used.Output is written to standard output by deault, but see the ‘-o’ option.

‘-h’‘--help’ Print usage inormation on standard output and exit successully.

‘-V’‘--version’

Print the version number and licensing inormation or teseq on standard out-put and then exit successully.

‘-C’ For control characters rom the C0 set o Ecma-48 / ISO/IEC 6429, don’t writethe control-key representation, only the identiying acronym. For example,write the carriage-return/line-eed combination as

. CR LF

rather than

. CR/^M LF/^J

‘-D’ Don’t print description lines (those beginning with ‘"’).

‘-E’ Don’t print escape-sequence lines (beginning with ‘:’). Warning: this results inloss o inormation, and in particular means that running the output through

the reseq command won’t reproduce the input.Still, this option can be useul (in combination with ‘-L’) or those that don’tcare about the exact sequence o characters, or what their unction is called,but just what their efects in the terminal are (those that Teseq understands).The output produced

‘-L’ Don’t print identiying labels (lines beginning with ‘&’) or escape sequences.

‘-I’‘--no-interactive’

Don’t put the terminal into non-canonical or no-echo mode, and don’t try toensure output lines are nished when a signal is received (see below).

‘-b’‘--buffered’

Force teseq to use bufered I/O (see below).

‘-t timings ’‘--timings timings ’

Read timing inormation rom timings  and emit delay lines. This le mustbe ormatted as i generated by ‘script -t’ (or the script command romutil-linux).

Page 7: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 7/30

Chapter 2: Invoking Teseq 4

‘-x’ Allow teseq to recognize some additional, non-standard sequences, such asextensions rom VT100 or Xterm. Without this option, teseq will only in-terpret unctions standardized by Ecma-35 / ISO/IEC 2200 and Ecma-48 /ISO/IEC 6429.

Note that there are no options or suppressing text lines (‘ |’) or control-character lines (‘.’),as there are or description or escape-sequence lines.

The ‘-L’, ‘-D’ and ‘-E’ options also have mnemonic equivalents o ‘-&’, ‘-"’ and ‘-:’respectively, corresponding to the character prexes or the lines they suppress; and ‘-C’has an ‘-^’ equivalent, or the ‘^X’-style control representations it suppresses. However,while they may be more practical to remember, they will be less practical to type, sinceboth ‘-&’ and ‘-"’ are apt to be interpreted as special by the shell, and must be quoted inorder to pass them to the teseq command.

Interactive Mode

When teseq is started with a terminal as its input, it sets the terminal to non-canonicalmode. That way, you can see real-time translation o input, as you type. I both inputand output are terminals, then teseq will also turn local echo of, so that the charactersyou type will not interere with the output you see. You can try it out by simply runningteseq without any arguments. Note, this means that the control or indicating “end-o-le” (usually ‘C-d’) will not be processed specially, but will be passed through to teseq

like any other character. Use the interrupt character (usually ‘C-c’) instead, or speciy‘--no-interactive’ to disable this behavior.

When run in this way, characters typed as input are immediately translated and writtenout. The exception is that when an escape character is encountered, teseq must wait orthe next ew characters beore writing anything, so it can decide whether to start an escape

line or a control-character line.When teseq has a terminal as its output, it is careul to ensure that it nishes output

lines when it is stopped by a signal. I it was in the middle o writing a text line, it willwrite the closing pipe character ‘|’, ollowed by a newline. I it was in the middle o tryingto determine whether it’s in a valid escape sequence or just an escape character ollowed byother characters, it will assume the latter case, and translate all the characters it has seenso ar.

To orce teseq to behave as i it’s not connected to a terminal (that is, to rerainrom ensuring lines are nished, or setting non-canonical/no-echo mode), use the‘--no-interactive’ (‘-I’) option.

The teseq program does not take care to nish lines when the output is not a terminal.

Whether or not teseq is connected to a terminal, it uses unbufered I/O by deault,unless the input is an ordinary le. This is so that each character may be processed assoon as it’s seen. However, this can result in much longer processing time overall. To orceteseq to bufer its input and output, use the ‘--buffered’ (‘-b’) option.

Page 8: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 8/30

Chapter 3: Output Format 5

3 Output Format

Teseq produces output that is primarily intended to be read by humans (rom input thatis usually not). For this reason, Teseq output ollows the ollowing principles:

• Displays or diferent sorts o characters and sequences are displayed on distinct lines,and are easily distinguished by the initial character.

• Every input character should be unambiguously visible to the user in the output (ex-cept, o course, when the user explicitly asks not to see them, as with the ‘ -E’ option).In particular, trailing space should be visible.

• Line lengths are limited to a maximum o 78 characters, so as to t comortably onmost terminal displays.

• The output makes clear distinction between line breaks that occur due to line limits orintermixed character types, and those that actually occurred in the input.

See Chapter 1 [Overview], page 1, or an output example.

3.1 Text Lines

Lines o plain text input, are output between a pair o pipe characters ‘|’, with a nalperiod to indicate the lineeed character. Input:

Hello there

Output:

|Hello there|.

Trailing whitespace is thus made plainly visible to the reader.

|Trailing space: |.

A blank line is represented as empty content between the pipes.

||.

I the input line is too long to display as one line o output, it will be displayed as ollows,with dash characters, ‘-’, to mark continuity at the beginnings and ends o the lines (outsidethe pipe characters).

|This input line |-

-|was too long to|-

-| fit|.

You might wonder whether pipe characters themselves might have to be escaped, so asto avoid conusion with the surrounding pipes. Ater all, in a C string literal, denoted bydouble-quotes, ‘"’, one must escape literal double-quote characters by preceding them with

a backslash (and must then also escape literal backslashes): "She said \"no\"". However,no such escaping mechanism is needed in Teseq. Input:

A line with a pipe | in it, and a line with just a pipe

|

Output:

|A line with a pipe | in it, and a line with just a pipe|.

|||.

No special treatment whatsoever!

Page 9: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 9/30

Chapter 3: Output Format 6

The reason Teseq can get away with this is that the pipe character only has its special“mark the enclosed as normal text” meaning, when it is the rst and the last character on aline o output (aside rom a possible preacing dash to indicate a wrapped line, or a trailingdash or period).

A lot o the output lines you’ve seen so ar have all ended with a period, denoting thelineeed character. However, this isn’t always the case. For instance, i the input linecontains a control character, Teseq will close the text line (with just a pipe, no period),print a control-character line with the control characters, and then nish up the rest o the text line. The ollowing sample output represents a single line which contains a deletecharacter and a null character:

|Fee fi|

. DEL/^?

|fo|

. NUL/^@

|fum|.

And here’s a line that’s terminated with a carriage-return/line-eed combination, ratherthan just a lineeed.

|The promised line|

. CR/^M LF/^J

The lineeed character is special: when it’s preceded by control characters or escape se-quence, it’s printed as a control character; when it’s preceded by text characters (or bynothing at all), it’s printed as that nal dot thing. This behavior is designed to make anewline look like the end o a line or a blank line when it should, and to look like a controlcharacter when it should.

And o course, i the nal line in the le is missing a newline, the dot won’t appear there

either.Currently, the only characters included in text lines, are those rom the printable range

o characters rom US ASCII (Ecma-6 / ISO 646)—and sometimes lineeed, representedby the special nal-dot notation. This means that i the terminal was using a characterset that high-value code points, all high-valued bytes will be represented in hexadecimalon control-character lines, and not displayed on a text line. Future versions o Teseq mayprovide options allowing or these characters to be represented properly in text lines, butor now, the output ormat is ASCII characters only. See Chapter 6 [Future Enhancements],page 16.

Note that even characters alling in the normal range o ASCII printable characters maynot necessarily be represented correctly: or instance, i escape codes are present in the

input that would switch the terminal to a diferent national variant o Ecma-6 / ISO 646,then the real terminal might display (say, or ISO-646ES) ‘~N’ instead o ‘[’; but the outputrom Teseq will not change based on this (even though it will recognize and identiy thecontrol sequences that invoke that character set or use).

3.2 Control-Character Lines

Control-character lines are used to display characters whose code values all outside therange o printable characters rom US ASCII (Ecma-6 / ISO 646). That is, those characters

Page 10: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 10/30

Chapter 3: Output Format 7

whose code values all below below 32 decimal (those rom the C0 set o control charactersrom Ecma-48 / ISO/IEC 6429); and those whose values are at or above 127 decimal (the“delete” character, and character byte values with the high bit set).

Control-character lines begin with an initial dot, ‘.’, ollowed by the control charactersor high-value bytes being represented.

. BEL/^G NUL/^ CR/^M LF/^J DEL/^? xA0 xFF

Control characters (whose numeric codes all below decimal 32, plus the delete character atdecimal 127) are represented by a mnemonic acronym identiying the character’s unction.Unless the ‘-C’ was given, this acronym is ollowed by a slash, and the control-key combina-tion that would produce the corresponding character (control characters are usually muchmore recognizable rom one or the other o their name or their control-character represen-tation, than they are by their hexadecimal code value). The “control-key combination”representation consists o a “hat” or “circumex accent” character, ollowed by a characterwith a value in the range o 63 through 95 decimal.

Note that the delete character, designated as ‘DEL/^?

’, is a special case, in that one cannot generally reproduce that key by holding down the control key and typing a questionmark; it is simply used as an identication o the key.

Other values (high-value bytes) are represented by the lowercase letter ‘x’ ollowed bythe two-digit hexadecimal code value or the character.

For reerence, here’s a table o the control characters (plus del). It is based on theinormation rom Table 1 o Ecma-48 / ISO/IEC 6429 (the control-key representation hasbeen added).

Hex Key Name Hex Key Name

x00 ^@ NUL x10 ^P DLE

x01^

A SOH x11^

Q DC1x02 ^B STX x12 ^R DC2x03 ^C ETX x13 ^S DC3x04 ^D EOT x14 ^T DC4x05 ^E ENQ x15 ^U NAKx06 ^F ACK x16 ^V SYNx07 ^G BEL x17 ^W ETBx08 ^H BS x18 ^X CANx09 ^I TAB x19 ^Y EMx0A ^J LF x1A ^Z SUBx0B ^K VT x1B ^[ ESCx0C ^L FF x1C ^\ IS4

x0D ^M CR x1D ^] IS3x0E ^N SO x1E ^^ IS2x0F ^O SI x1F ^ IS1x7F ^? DEL

3.3 Escape-Sequence Lines

Escape-sequence lines, which begin with the colon, ‘:’, don’t add any new semantics—anycharacters in an escape-sequence line could be represented on control-character and text

Page 11: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 11/30

Chapter 3: Output Format 8

lines (and, with just a one-character change in the escape sequence, would be). But theyserve to set escape sequences apart rom normal control-character or text lines, making iteasier to see on one line all the characters that contribute to a single control unction, ratherthan splitting them between control-character and text lines. Here’s an example with someintermixed escape-sequence and text lines (without the usual label and description lines,which are described in later sections):

|Well |

: E s c [ 3 ; 3 1 m

|Daniel|

: E s c [ 2 3 ; 3 9 m

| didn’t do it...|.

The two escape-sequence lines represent, respectively, controls that set text rendering touse italics in the color red, and to set normal ont rendering in the deault color (the actualinterpretation o these controls may vary by application).

Note that the escape-sequence lines include control characters (well, character, namely‘Esc’) intermixed with normal text characters. So the above could have been written like:

|Well |

. ESC

|[3;31mDaniel|

. ESC

|[23;39m didn’t do it...|.

But this loses the separation between characters that, yes, happen to be text characters,but really just contribute to some terminal control unction invocation, and characters thatare, really and truly, text.

: E s c [ 3 ; 3 1 m

Some things to note. First, the escape key is noted as ‘Esc’, and not ‘ESC’ as it would bein a control-character line. Don’t ask me why; maybe I just elt it was one more thing todilineate between escape-sequence lines and control-character lines.

Also, each character is separated rom its neighbors by a single space, except that stringso digits are lumped all together.

Each character is represented by itsel (including colon, as long as it’s not at the start o the line), except the escape character, and the space character (represented as ‘Spc’). Con-trol characters and high-value bytes are not currently represented on escape-sequence lines(they are not part o any escape sequences Teseq recognizes), but i they are in the uture(say, as part o non-standardized escape sequences), they will most likely be represented as‘xXX’ hexadecimal strings (as high-value bytes are represented in control-character lines.

I an escape sequence requires more than one output line, the continuing lines will alsobegin with a colon, ollowed by two spaces (instead o one). Lines will not be split in themiddle o a number.

: E s c [ 1 ; 2 ; 3 ; 4

: ; 5 ; 6 ; 7 m

Page 12: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 12/30

Chapter 3: Output Format 9

Recognizing Escape Sequences

Okay, great, so escape-sequence lines help distinguish control-characters and text charactersthat make up an escape sequence rom those that don’t. But what exactly makes up an

escape sequence, anyway?The Ecma-35 / ISO/IEC 2200 standard denes an escape sequence to be a sequence o 

characters beginning with esc, with a nal byte in the range x30–x7E, and any number(including zero) o intermediate bytes in the range x20-x2F. Table 3.1 has been providedas a reerence or nding which characters match which codes.

x2X x3X x4X x5X x6X x7X

xX0 spc 0 @ P ‘ pxX1 ! 1 A Q a qxX2 " 2 B R b r

xX3 # 3 C S c sxX4 $ 4 D T d txX5 % 5 E U e uxX6 & 6 F V vxX7 ’ 7 G W g wxX8 ( 8 H X h xxX9 ) 9 I Y i yxXA * : J Z j zxXB + ; K [ k {

xXC , < L \ l |

xXD - = M ] m }

xXE . > N ^ n ~

xXF / ? O o del

Table 3.1

So, or instance, the ollowing is a valid escape sequence.

: E s c $ ( C

‘$’ and ‘(’ have code values x24 and x28, and so are valid intermediate bytes; ‘C’ has thevalue x43, and so terminates the escape sequence.

You may have noticed that a lot o the examples o escape sequences in this documentdon’t actually ollow this ormat. For instance,

: E s c [ 3 ; 3 1 m

According to the denition we just gave, ‘[’ should be the nal byte o an escape sequence.So why does Teseq keep going until it reaches the ‘ m’?

The answer is that the escape sequence does end with the ‘[’; but the combination ‘Esc

[’ invokes a control named CONTROL SEQUENCE INTRODUCER (csi). The csi control marksthe beginning o a diferent kind o sequence, called a “control sequence”. Control sequencesare described by the Ecma-48 / ISO/IEC 6429 standard, which considers it to be a distinctconcept rom escape sequences; however, Teseq treats both types o sequences as “escapesequences”.

Page 13: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 13/30

Chapter 3: Output Format 10

A control sequence starts with the two-character csi escape sequence ‘Esc [’, ollowedby an optional sequence o parameter bytes in the range x30–x3F, an optional sequence o intermediate bytes in the range x20–x2F (the same range as intermediate bytes in a regularescape sequence), and a nal byte in the range x40–x7e. The set o standard controlsequence unctions are dened in Ecma-48 / ISO/IEC 6429.

When used in accordance with the standard, the parameter bytes are used to provide asemicolon-separated list o numeric parameters to the control unction being invoked. Theseafect the details o the control unction’s behavior; but not which control unction is beinginvoked:

: E s c [ 1 m

& SGR: SELECT GRAPHIC RENDITION

" Set bold text.

: E s c [ 0 m

& SGR: SELECT GRAPHIC RENDITION

" Clear graphic rendition to defaults.

Both sequences end with the same sequence o intermediate bytes (none) and nal byte;both invoke the sgr control unction. But the rst one indicates that ollowing text shouldbe rendered boldace, while the second indicates that text rendering should be restored toits deault settings.

Intermediate bytes, however, together with the nal byte, do afect the meaning o theunction invoked. Currently, Ecma-48 / ISO/IEC 6429 only denes unctions or either nointermediate bytes, or a single space character (x20) as the intermediate byte.

: E s c [ A

& CUU: CURSOR UP

: Esc [ Spc A

& SR: SCROLL RIGHT

Ecma-48 / ISO/IEC 6429 describes an alternate representation or csi; the 8-bit byte valuex9B. Teseq does not currently treat that value specially, nor any o the other high-valuebytes rom the C1 set o control unctions. This is because whether or not those bytesindicate control unctions is dependent upon what character encoding is in use. Futureversions o Teseq may support an option to interpret these orms as well, at which timecontrol sequences using the single-byte csi control will probably be rendered like:

: C S I [ 1 m

Ecma-48 / ISO/IEC 6429 also describes another kind o sequence called “control strings”.These are not interpreted by Teseq; the control characters involved (or example, ‘SOS/^X’and ‘ST/^\’ will be printed on control-character lines, and any text characters will be

displayed on text lines.Future versions o Teseq will probably not depart rom this display behavior; however,

support or some common interpretations or control strings may be added, in which casea label line and/or description line might ollow the control string, describing its usualinterpretation.

3.4 Label Lines

Label lines begin with the ampersand, ‘&’:

Page 14: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 14/30

Chapter 3: Output Format 11

& SGR: SELECT GRAPHIC RENDITION

Label lines always describe a control unction, and are always preceded by the escapesequence that invokes that unction (unless the ‘-E’ option was given, suppressing output

or escape-sequence lines).The ormat o a label line’s content is always acronym: name ; both o these are denedor each control unction by Ecma-48 / ISO/IEC 6429. I the ‘-x’ option was specied toteseq, then some labels may also name private unctions dened by DEC or the VT100and similar terminals.

Label lines currently are never wrapped; however, uture versions o Teseq may wraplabel lines. At that time, continuation label lines will probably consist o an extra spaceater the ampersand (similar to how escape-sequence lines are wrapped). Lines will neverbe split in the middle o a word.

Future versions o Teseq may use label lines to describe things besides escape sequences;or instance, control characters or control strings, or other strings that may be interpreted

specially by some devices or applications.

3.5 Description Lines

Description lines begin with the double-quote, ‘"’:

" Move the cursor up 2 lines.

Sequences o description lines are generally preceded by a label line (unless the ‘-L’ optionwas supplied), and describe the same control unction labeled by that line. More than onedescription line may be used to describe a unction, whereas only one label line is ever usedor a control unction.

It is important to understand that the descriptions provided are only approximationsand guesses, and sufer rom various limitations. The behavior o many control unctions

are dependent on terminal state that Teseq does not track. Teseq chooses a common deaultsetting or applicable terminal modes, and issues a description based on that. For instance,the insert line unction is described as ollows:

: E s c [ 2 L

& IL: INSERT LINE

" Shift lines after the cursor to make room for 2 new lines.

However, depending on the current setting o the line editing mode, the actual behaviormight be to shit the lines before the cursor, rather than the ones ater. Future versions o Teseq may track enough terminal state to improve the accuracy o these descriptions (seeChapter 6 [Future Enhancements], page 16), but they would still need to guess at the initialstate o the terminal, or any modes that had not been explicitly set or reset.

Descriptions are also oten inaccurate. For instance, the description or insert line

should really read “shit the current line and the lines ater the cursor. . .”. In addition,no mention is made o the act that the extent o the shited part is dependent on previousinvocations o  select editing extent. A conscious decision has been made to valuebrevity over accuracy.

Also, the descriptions are based (loosely) on the semantics dened by Ecma-48 /ISO/IEC 6429. There is no guarantee that this corresponds to the semantics denedor the actual terminal on which these unctions were invoked. The terminal may have

Page 15: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 15/30

Chapter 3: Output Format 12

diferent behavior, or may not even accept the unction. The descriptions are intended asa rough aid in remembering what a given unction does; to really understand the actualsemantics o a unction, you should read the terminal device’s documentation, and/orEcma-48 / ISO/IEC 6429.

Description lines currently are never wrapped; however, uture versions o Teseq maywrap label lines. At that time, continuation label lines will probably consist o an extraspace ater the double-quote (just as label lines are wrapped). Lines will never be split inthe middle o a word.

Future versions o Teseq may use description lines to describe thigns besides escapesequences; or instance, control characters or control strings, or other strings that may beinterpreted specially by some devices or applications.

Some description lines may appear without a preceding label line (even when ‘-L’ wasnot specied), in the event that no standard designation or the unction is known.

3.6 Delay Lines

A delay line begins with an “at” sign ‘@’, and contains a single numeric value; a numbero seconds to pause beore continuing on to process urther lines. The reseq program willobey these instructions only i it is given the ‘--replay’ option.

@ 3.0051

Delay lines are only issued by teseq when it has been given the ‘-t’ option, which uses atiming le rom ‘script -t’ to determine where to insert delays. Aside rom that, delay linescan be useul or manual insertion into Teseq output, to introduce a delay at a particularpoint when using ‘reseq --replay’, which can aid in giving the user time to more easilyobserve terminal behavior.

Page 16: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 16/30

Chapter 4: The Reseq Command 13

4 The Reseq Command

Synopsis:

reseq [-t|--timings=timings ] input outputreseq --replay [-d divisor ] input [output ]

reseq -h | --help

reseq -V | --version

The input and output arguments are mandatory, but may be specied as ‘-’ or standardinput or output. Reseq doesn’t let output deault to standard output because, since itgenerates raw terminal codes, it is uncommon (and potentially unsae) to send this directlyto the terminal. The exception is when the ‘--replay’ argument has been specied, whichis only useul when output is going to the terminal; in that event, the output argument isoptional.

‘-h’

‘--help’ Print usage inormation on standard output and exit successully.

‘-V’‘--version’

Print the version number and licensing inormation o hello on standard outputand then exit successully.

‘--replay’Honor delay lines in the input, pausing the specied amount o time beore con-tinuing to process the next line. This is useul or producing behavior equivalentto that o the scriptreplay command (rom util-linux), but using a Teseq out-put le as input, rather than a raw typescript le.

‘-d divisor ’Play back the script at divisor  times the original speed (meaningless unless‘--replay’ was also specied).

‘-t timings ’‘--timings timings ’

Produce timing inormation rom delay lines, in the ormat generated by script

-t. This can be used to regenerate script typescript and timing les that wereed as the input to teseq -t timings. Note that the result will difer slightlyrom the output rom script -t, in that the rst delay will be zeroed out(teseq always throws out the rst delay value, whose value rom script is anarbitrary value between 0 and 1), and the last delay line will include all the

remaining characters (script’s timings don’t count the nal timestamp line).

The reseq command essentially does the reverse o  teseq. I you eed it the output romteseq, it will generate the corresponding escape sequences—that is, it will generate thesame content that was ed to teseq to produce that output. The shell command

$ teseq foo | reseq - -

is roughly equivalent to

$ cat foo

Page 17: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 17/30

Chapter 4: The Reseq Command 14

The reseq command is written in Perl, unlike teseq which is compiled rom C-languagesources, and so requires a Perl interpreter to be present in order to unction.

O the various types o lines output by the teseq command, reseq only understands

our; text lines:|Hello, there|.

|Here are|-

-|some wrapped|-

-|lines|.

control-character lines:

. CR/^M LF/^J

. CR LF

escape-sequence lines:

: E s c [ 3 1 ; 3 m

And, o course, delay lines:

@ 3.14159

Reserved Line Prefxes

It’s important or reseq to be able to process its input correctly, even i that output camerom a diferent version o  teseq than reseq is amiliar with. So, it’s important that reseq

should reuse to continue processing input i it encounters a line that it doesn’t recognize,but which might contain important semantic inormation that efects the output reseq

should produce.

At the same time, it’d be a shame or reseq to reuse to process a line it doesn’tunderstand, i that line contains non-critical inormation. For example, consider delay

lines (beginning with ‘@’. The delay line holds semantic inormation, to be sure; but notinormation that would afect reseq’s normal operation (it only has meaning when one o the ‘--timings’ or ‘--replay’ options has been specied). So, i an older version o  reseq

had existed that did not recognize them, it would have been a shame i its introduction inthe newer release had caused the older version to reuse to process it.

To address both o these concerns, reseq has taken the approach o reserving certainprexes or use as “semantically signicant” line prexes, and others or use in lines thatreseq can saely ignore. A line that begins with any o the ollowing characters, will causereseq to halt processing and exit with an error.

!$+/=[\^{~

The idea is that these prexes are reserved or uture use in lines that reseq must understand

in order to produce correct results.This leaves all remaining characters ree or use in speciying uture teseq output lines

that do not afect processing or older reseqs. Note that they are still reserved or teseq,and are not intended or users to insert commentary or such. However, teseq will neveruse a line beginning with the space character; and reseq will always ignore such lines, sothe space character may be used to indicate user comments.

Page 18: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 18/30

Chapter 5: Standards 15

5 Standards

The most authoritative source o inormation on control unctions, their representations inbytes, and their intended meaning, is the Ecma-48 / ISO/IEC 6429 standard. Also relatedis the Ecma-35 / ISO/IEC 2200 standard, which describes control unctions or switchingthe character encoding, and denes the possible orms o escape sequence (note that, inTeseq, “escape sequence” reers to both the Ecma-48 concept o “control sequences”, andthe ocial Ecma-35 meaning o “escape sequence”. These standards are available, “ree o charge and copyright”, at:

http://www.ecma-international.org/.

In addition to the denitions provided by these standards, Teseq also recognizes additionalsequences when the ‘-x’ option has been specied. Sources o inormation that were usedor identiying and describing these sequences, include:

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html

http://www.vt100.net/.

Page 19: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 19/30

Chapter 6: Future Enhancements 16

6 Future Enhancements

Here are some potential additions that may appear in uture versions o Teseq.

6.1 Localized MessagesIt is expected that a near release o Teseq will include support or native-language transla-tions o control label names and descriptions. Note that the acronym portions o label lineswill never be translated: they represent ocial designations or their respective controls.

An important requirement o such translations is that they must not interere with pro-cessing o the document; i they use a shit-based encoding, they will shit to the translationencoding only ater the line prex, which must be a plain ASCII character, and shit backto normal ASCII prior to the end o the line. Bytes with values corresponding to the ASCIIcontrol characters nul, cr, or lf (hexadecimal ‘x00’, ‘x0D’, and ‘0x0A’) will not appear,except when they represent their ASCII unctions (in no case will nuls be present in thedocument).

These requirements rule out the use o wide-character encodings such as UCS-2 or UTF-16, which could not be intermixed with ascii characters and which have character repre-sentations that would enclude byte values corresponding to the orbidden characters notedabove, but should be compatible with UTF-8, ISO 2022-based encodings such as the ISO8859 series, ISO 2022-JP, or EUC-JP and other encodings that meet these requirementssuch as GBK, Big5, or Shit JIS.

6.2 Stateul Processing

Future versions o Teseq may support options to remember state inormation about the ter-minal. For instance i Teseq has seen the invocation o  select graphic rendition to setunderlined text, Teseq might render any urther text that appears in with underlining. In

addition, the meaning o some standardized commands dened by Ecma-48 / ISO/IEC 6429depend on the current setting o various terminal modes, and Teseq currently makes as-sumptions about those modes. A state-remembering Teseq might remember the last timea mode was set, and no longer need to make assumptions.

I Teseq is given inormation about the size o the target terminal, it could also provideinormation about the cursor’s present location ater every cursor-moving command.

Currently, all output rom teseq is in US ASCII; but uture versions o Teseq mightsupport output in other encodings. I that happens, Teseq might also add support or thehandling o Ecma-35 / ISO/IEC 2200 character code-switching sequences, such that thecharacters given in text lines would reect the actual characters as they would actuallyappear in the terminal device, depending on the current encoding state.

Note that eatures which alter the bytes ound between the pipe characters o a text line,would most likely break reverse-translation with reseq, as it would be much harder to tellwhat the original byte values had been.

6.3 Terminal Database Awareness

Future versions o Teseq may allow the user to speciy the name o the terminal or which theinput was intended, which Teseq will then use to detect when a eature rom that terminal’sentry in the terminal database (or example, the termino database) has been invoked.

Page 20: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 20/30

Chapter 6: Future Enhancements 17

Since eatures rom terminal database entries oten involve multiple Ecma-48 /ISO/IEC 6429 controls, Teseq would probably need to indicate out-o-band “start” and“end” markers or the eature. For instance, i the denition or the ‘clear’ eature or thespecied terminal is ‘\E[H\E[J’, then an input string o ‘\E[m\E[H\E[J\E(B’ might resultin output like:

: E s c [ m

# start: clear

: E s c [ H

: E s c [ J

# end: clear

: E s c ( B

(Label and description lines have been removed rom this example.)

No commitment has been made to any particular output ormat or this eature; theabove is intended purely as an example o one possible approach.

Page 21: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 21/30

Chapter 7: Contact and Inormation 18

7 Contact and Inormation

I you have any questions, comments, suggestions, or bug reports, please take advantageo the mailing list at [email protected]. To subscribe, send an empty email withthe Subject “subscribe” to [email protected]; or use the web interace athttp://lists.gnu.org/mailman/listinfo/bug-teseq .

The ocial website or GNU Teseq is at http://www.gnu.org/software/teseq/. Forthe latest updates and other inormation, please check that site (or better yet, stay appraisedby subscribing to the mailing list.

GNU Teseq uses Savannah to manage bug-tracking, and to host the development sourcerepository in Mercurial: https://savannah.gnu.org/projects/teseq/ .

There is also an IRC channel (#teseq), hosted on irc.reenode.net.

Page 22: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 22/30

Appendix A: Copying 19

Appendix A Copying

Version 1.2, November 2002

Copyright c 2000,2001,2002 Free Sotware Foundation, Inc.51 Franklin St, Fith Floor, Boston, MA 02110-1301, USA

Everyone is permitted to copy and distribute verbatim copieso this license document, but changing it is not allowed.

0. PREAMBLE

The purpose o this License is to make a manual, textbook, or other unctional anduseul document ree  in the sense o reedom: to assure everyone the efective reedomto copy and redistribute it, with or without modiying it, either commercially or non-commercially. Secondarily, this License preserves or the author and publisher a wayto get credit or their work, while not being considered responsible or modicationsmade by others.

This License is a kind o “copylet”, which means that derivative works o the documentmust themselves be ree in the same sense. It complements the GNU General PublicLicense, which is a copylet license designed or ree sotware.

We have designed this License in order to use it or manuals or ree sotware, becauseree sotware needs ree documentation: a ree program should come with manualsproviding the same reedoms that the sotware does. But this License is not limited tosotware manuals; it can be used or any textual work, regardless o subject matter orwhether it is published as a printed book. We recommend this License principally orworks whose purpose is instruction or reerence.

1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains anotice placed by the copyright holder saying it can be distributed under the termso this License. Such a notice grants a world-wide, royalty-ree license, unlimited induration, to use that work under the conditions stated herein. The “Document”,below, reers to any such manual or work. Any member o the public is a licensee, andis addressed as “you”. You accept the license i you copy, modiy or distribute the workin a way requiring permission under copyright law.

A “Modied Version” o the Document means any work containing the Document ora portion o it, either copied verbatim, or with modications and/or translated intoanother language.

A “Secondary Section” is a named appendix or a ront-matter section o the Documentthat deals exclusively with the relationship o the publishers or authors o the Document

to the Document’s overall subject (or to related matters) and contains nothing thatcould all directly within that overall subject. (Thus, i the Document is in part atextbook o mathematics, a Secondary Section may not explain any mathematics.) Therelationship could be a matter o historical connection with the subject or with relatedmatters, or o legal, commercial, philosophical, ethical or political position regardingthem.

The “Invariant Sections” are certain Secondary Sections whose titles are designated, asbeing those o Invariant Sections, in the notice that says that the Document is released

Page 23: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 23/30

Appendix A: Copying 20

under this License. I a section does not t the above denition o Secondary then it isnot allowed to be designated as Invariant. The Document may contain zero InvariantSections. I the Document does not identiy any Invariant Sections then there are none.

The “Cover Texts” are certain short passages o text that are listed, as Front-CoverTexts or Back-Cover Texts, in the notice that says that the Document is released underthis License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text maybe at most 25 words.

A “Transparent” copy o the Document means a machine-readable copy, representedin a ormat whose specication is available to the general public, that is suitable orrevising the document straightorwardly with generic text editors or (or images com-posed o pixels) generic paint programs or (or drawings) some widely available drawingeditor, and that is suitable or input to text ormatters or or automatic translation toa variety o ormats suitable or input to text ormatters. A copy made in an otherwiseTransparent le ormat whose markup, or absence o markup, has been arranged tothwart or discourage subsequent modication by readers is not Transparent. An image

ormat is not Transparent i used or any substantial amount o text. A copy that isnot “Transparent” is called “Opaque”.

Examples o suitable ormats or Transparent copies include plain ascii withoutmarkup, Texino input ormat, LaTEX input ormat, SGML or XML using a publiclyavailable DTD, and standard-conorming simple HTML, PostScript or PDF designedor human modication. Examples o transparent image ormats include PNG, XCF

and JPG. Opaque ormats include proprietary ormats that can be read and editedonly by proprietary word processors, SGML or XML or which the DTD and/orprocessing tools are not generally available, and the machine-generated HTML,PostScript or PDF produced by some word processors or output purposes only.

The “Title Page” means, or a printed book, the title page itsel, plus such ollowing

pages as are needed to hold, legibly, the material this License requires to appear in thetitle page. For works in ormats which do not have any title page as such, “Title Page”means the text near the most prominent appearance o the work’s title, preceding thebeginning o the body o the text.

A section “Entitled XYZ” means a named subunit o the Document whose title eitheris precisely XYZ or contains XYZ in parentheses ollowing text that translates XYZ inanother language. (Here XYZ stands or a specic section name mentioned below, suchas “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preservethe Title” o such a section when you modiy the Document means that it remains asection “Entitled XYZ” according to this denition.

The Document may include Warranty Disclaimers next to the notice which states that

this License applies to the Document. These Warranty Disclaimers are considered tobe included by reerence in this License, but only as regards disclaiming warranties:any other implication that these Warranty Disclaimers may have is void and has noefect on the meaning o this License.

2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially ornoncommercially, provided that this License, the copyright notices, and the licensenotice saying this License applies to the Document are reproduced in all copies, and

Page 24: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 24/30

Appendix A: Copying 21

that you add no other conditions whatsoever to those o this License. You may not usetechnical measures to obstruct or control the reading or urther copying o the copiesyou make or distribute. However, you may accept compensation in exchange or copies.I you distribute a large enough number o copies you must also ollow the conditionsin section 3.

You may also lend copies, under the same conditions stated above, and you may publiclydisplay copies.

3. COPYING IN QUANTITY

I you publish printed copies (or copies in media that commonly have printed covers) o the Document, numbering more than 100, and the Document’s license notice requiresCover Texts, you must enclose the copies in covers that carry, clearly and legibly, allthese Cover Texts: Front-Cover Texts on the ront cover, and Back-Cover Texts onthe back cover. Both covers must also clearly and legibly identiy you as the publishero these copies. The ront cover must present the ull title with all words o the title

equally prominent and visible. You may add other material on the covers in addition.Copying with changes limited to the covers, as long as they preserve the title o theDocument and satisy these conditions, can be treated as verbatim copying in otherrespects.

I the required texts or either cover are too voluminous to t legibly, you should putthe rst ones listed (as many as t reasonably) on the actual cover, and continue therest onto adjacent pages.

I you publish or distribute Opaque copies o the Document numbering more than 100,you must either include a machine-readable Transparent copy along with each Opaquecopy, or state in or with each Opaque copy a computer-network location rom whichthe general network-using public has access to download using public-standard network

protocols a complete Transparent copy o the Document, ree o added material. I you use the latter option, you must take reasonably prudent steps, when you begindistribution o Opaque copies in quantity, to ensure that this Transparent copy willremain thus accessible at the stated location until at least one year ater the last timeyou distribute an Opaque copy (directly or through your agents or retailers) o thatedition to the public.

It is requested, but not required, that you contact the authors o the Document wellbeore redistributing any large number o copies, to give them a chance to provide youwith an updated version o the Document.

4. MODIFICATIONS

You may copy and distribute a Modied Version o the Document under the conditions

o sections 2 and 3 above, provided that you release the Modied Version under preciselythis License, with the Modied Version lling the role o the Document, thus licensingdistribution and modication o the Modied Version to whoever possesses a copy o it. In addition, you must do these things in the Modied Version:

A. Use in the Title Page (and on the covers, i any) a title distinct rom that o theDocument, and rom those o previous versions (which should, i there were any,be listed in the History section o the Document). You may use the same title asa previous version i the original publisher o that version gives permission.

Page 25: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 25/30

Appendix A: Copying 22

B. List on the Title Page, as authors, one or more persons or entities responsible orauthorship o the modications in the Modied Version, together with at least veo the principal authors o the Document (all o its principal authors, i it has ewerthan ve), unless they release you rom this requirement.

C. State on the Title page the name o the publisher o the Modied Version, as thepublisher.

D. Preserve all the copyright notices o the Document.

E. Add an appropriate copyright notice or your modications adjacent to the othercopyright notices.

F. Include, immediately ater the copyright notices, a license notice giving the publicpermission to use the Modied Version under the terms o this License, in the ormshown in the Addendum below.

G. Preserve in that license notice the ull lists o Invariant Sections and required CoverTexts given in the Document’s license notice.

H. Include an unaltered copy o this License.

I. Preserve the section Entitled “History”, Preserve its Title, and add to it an itemstating at least the title, year, new authors, and publisher o the Modied Versionas given on the Title Page. I there is no section Entitled “History” in the Docu-ment, create one stating the title, year, authors, and publisher o the Documentas given on its Title Page, then add an item describing the Modied Version asstated in the previous sentence.

J. Preserve the network location, i any, given in the Document or public access toa Transparent copy o the Document, and likewise the network locations given inthe Document or previous versions it was based on. These may be placed in the“History” section. You may omit a network location or a work that was published

at least our years beore the Document itsel, or i the original publisher o theversion it reers to gives permission.

K. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Titleo the section, and preserve in the section all the substance and tone o each o thecontributor acknowledgements and/or dedications given therein.

L. Preserve all the Invariant Sections o the Document, unaltered in their text andin their titles. Section numbers or the equivalent are not considered part o thesection titles.

M. Delete any section Entitled “Endorsements”. Such a section may not be includedin the Modied Version.

N. Do not retitle any existing section to be Entitled “Endorsements” or to conict intitle with any Invariant Section.

O. Preserve any Warranty Disclaimers.

I the Modied Version includes new ront-matter sections or appendices that qualiyas Secondary Sections and contain no material copied rom the Document, you may atyour option designate some or all o these sections as invariant. To do this, add theirtitles to the list o Invariant Sections in the Modied Version’s license notice. Thesetitles must be distinct rom any other section titles.

Page 26: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 26/30

Appendix A: Copying 23

You may add a section Entitled “Endorsements”, provided it contains nothing butendorsements o your Modied Version by various parties—or example, statements o peer review or that the text has been approved by an organization as the authoritativedenition o a standard.

You may add a passage o up to ve words as a Front-Cover Text, and a passage o upto 25 words as a Back-Cover Text, to the end o the list o Cover Texts in the ModiedVersion. Only one passage o Front-Cover Text and one o Back-Cover Text may beadded by (or through arrangements made by) any one entity. I the Document alreadyincludes a cover text or the same cover, previously added by you or by arrangementmade by the same entity you are acting on behal o, you may not add another; butyou may replace the old one, on explicit permission rom the previous publisher thatadded the old one.

The author(s) and publisher(s) o the Document do not by this License give permissionto use their names or publicity or or to assert or imply endorsement o any ModiedVersion.

5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this License,under the terms dened in section 4 above or modied versions, provided that youinclude in the combination all o the Invariant Sections o all o the original documents,unmodied, and list them all as Invariant Sections o your combined work in its licensenotice, and that you preserve all their Warranty Disclaimers.

The combined work need only contain one copy o this License, and multiple identicalInvariant Sections may be replaced with a single copy. I there are multiple InvariantSections with the same name but diferent contents, make the title o each such sectionunique by adding at the end o it, in parentheses, the name o the original author orpublisher o that section i known, or else a unique number. Make the same adjustment

to the section titles in the list o Invariant Sections in the license notice o the combinedwork.

In the combination, you must combine any sections Entitled “History” in the vari-ous original documents, orming one section Entitled “History”; likewise combine anysections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. Youmust delete all sections Entitled “Endorsements.”

6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting o the Document and other documents releasedunder this License, and replace the individual copies o this License in the variousdocuments with a single copy that is included in the collection, provided that youollow the rules o this License or verbatim copying o each o the documents in all

other respects.You may extract a single document rom such a collection, and distribute it individu-ally under this License, provided you insert a copy o this License into the extracteddocument, and ollow this License in all other respects regarding verbatim copying o that document.

7. AGGREGATION WITH INDEPENDENT WORKS

A compilation o the Document or its derivatives with other separate and independentdocuments or works, in or on a volume o a storage or distribution medium, is called

Page 27: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 27/30

Appendix A: Copying 24

an “aggregate” i the copyright resulting rom the compilation is not used to limit thelegal rights o the compilation’s users beyond what the individual works permit. Whenthe Document is included in an aggregate, this License does not apply to the otherworks in the aggregate which are not themselves derivative works o the Document.

I the Cover Text requirement o section 3 is applicable to these copies o the Document,then i the Document is less than one hal o the entire aggregate, the Document’s CoverTexts may be placed on covers that bracket the Document within the aggregate, or theelectronic equivalent o covers i the Document is in electronic orm. Otherwise theymust appear on printed covers that bracket the whole aggregate.

8. TRANSLATION

Translation is considered a kind o modication, so you may distribute translationso the Document under the terms o section 4. Replacing Invariant Sections withtranslations requires special permission rom their copyright holders, but you mayinclude translations o some or all Invariant Sections in addition to the original versionso these Invariant Sections. You may include a translation o this License, and all thelicense notices in the Document, and any Warranty Disclaimers, provided that youalso include the original English version o this License and the original versions o those notices and disclaimers. In case o a disagreement between the translation andthe original version o this License or a notice or disclaimer, the original version willprevail.

I a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “His-tory”, the requirement (section 4) to Preserve its Title (section 1) will typically requirechanging the actual title.

9. TERMINATION

You may not copy, modiy, sublicense, or distribute the Document except as expresslyprovided or under this License. Any other attempt to copy, modiy, sublicense ordistribute the Document is void, and will automatically terminate your rights underthis License. However, parties who have received copies, or rights, rom you under thisLicense will not have their licenses terminated so long as such parties remain in ullcompliance.

10. FUTURE REVISIONS OF THIS LICENSE

The Free Sotware Foundation may publish new, revised versions o the GNU FreeDocumentation License rom time to time. Such new versions will be similar in spiritto the present version, but may difer in detail to address new problems or concerns.See http://www.gnu.org/copyleft/.

Each version o the License is given a distinguishing version number. I the Documentspecies that a particular numbered version o this License “or any later version”applies to it, you have the option o ollowing the terms and conditions either o thatspecied version or o any later version that has been published (not as a drat) bythe Free Sotware Foundation. I the Document does not speciy a version number o this License, you may choose any version ever published (not as a drat) by the FreeSotware Foundation.

Page 28: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 28/30

Appendix A: Copying 25

ADDENDUM: How to use this License or your documents

To use this License in a document you have written, include a copy o the License in thedocument and put the ollowing copyright and license notices just ater the title page:

Copyright (C) year your name.Permission is granted to copy, distribute and/or modify this document

under the terms of the GNU Free Documentation License, Version 1.2

or any later version published by the Free Software Foundation;

with no Invariant Sections, no Front-Cover Texts, and no Back-Cover

Texts. A copy of the license is included in the section entitled ‘‘GNU

Free Documentation License’’.

I you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the“with. . .Texts.” line with this:

with the Invariant Sections being list their titles, with

the Front-Cover Texts being list, and with the Back-Cover Texts

being list.

I you have Invariant Sections without Cover Texts, or some other combination o the

three, merge those two alternatives to suit the situation.I your document contains nontrivial examples o program code, we recommend releasing

these examples in parallel under your choice o ree sotware license, such as the GNUGeneral Public License, to permit their use in ree sotware.

Page 29: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 29/30

Index 26

Index

"

". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

&& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

--" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4--buffered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 4--help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3--help (reseq) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13--no-interactive . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 4--replay (reseq)

. . . . . . . . . . . . . . . . . . . . . . . . .

13, 14--timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3--timings (reseq) . . . . . . . . . . . . . . . . . . . . . . . . 13, 14--version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3--version (reseq) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 4-C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 7-D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-d (reseq) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 11-h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-h (reseq) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

-I. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3, 4-L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 11-t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-t (reseq) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 14-V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-V (reseq) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

@

@. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

|

| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

AASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6, 16

Ccontrol character

. . . . . . . . . . . . . . . . . . . . . . . . . . .

1, 3, 6control characters table . . . . . . . . . . . . . . . . . . . . . . . . . 7control sequence . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 9, 15Control Sequence Introducer . . . . . . . . . . . . . . . . . . . . 1control string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10control-character line . . . . . . . . . . . . . . . . . . . . . 4, 6, 14csi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 9

Ddelay line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 12, 14delete character . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7description line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 11

EEcma-35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4, 9, 15, 16Ecma-48 . . . . . . . . 1, 3, 4, 7, 9, 10, 11, 12, 15, 16, 17Ecma-6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6escape sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15escape sequence, defned . . . . . . . . . . . . . . . . . . . . . . . . 9escape sequence, fnal byte . . . . . . . . . . . . . . . . . . . . . . 9escape sequence, intermediate byte . . . . . . . . . . . . . . 9escape-sequence line . . . . . . . . . . . . . . . . . . . . . . . . . 3, 14escape-sequence lines . . . . . . . . . . . . . . . . . . . . . . . . . . . 7examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Ffnal byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 10

HHello, world! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Iintermediate byte . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 10invoking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

ISO 646. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6ISO/IEC 2200 . . . . . . . . . . . . . . . . . . . . . . . . 4, 9, 15, 16ISO/IEC 6429 . . 1, 3, 4, 7, 9, 10, 11, 12, 15, 16, 17

Llabel line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 10line prefx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 4, 5, 14line prefx, reserved . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Page 30: GNU Teseq 1.0.0 Manual

8/9/2019 GNU Teseq 1.0.0 Manual

http://slidepdf.com/reader/full/gnu-teseq-100-manual 30/30

Index 27

Nnon-canonical mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Ooptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Pparameter byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14prefx, line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 4, 5, 14

Rreseq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 3, 12, 13, 16reserved line prefxes . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Reversing the output o  teseq . . . . . . . . . . . . . . . . . 13

Sscript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 3, 12, 13scriptreplay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13standards . . . . 1, 3, 4, 6, 7, 9, 10, 11, 12, 15, 16, 17

Ttable o control characters . . . . . . . . . . . . . . . . . . . . . . 7table o printable ASCII characters . . . . . . . . . . . . . 9termcap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1terminal emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1termino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 16teseq , interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . 4teseq , reversing the output . . . . . . . . . . . . . . . . . . . . 13text line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4, 14, 16

Uusage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


Recommended