Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
0c12c4c4
Commit
0c12c4c4
authored
5 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Fix ESC E (NEL) handling... should be identical to CR LF
parent
ba5ddb90
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/conio/cterm.c
+4
-1
4 additions, 1 deletion
src/conio/cterm.c
src/conio/cterm.txt
+46
-42
46 additions, 42 deletions
src/conio/cterm.txt
with
50 additions
and
43 deletions
src/conio/cterm.c
+
4
−
1
View file @
0c12c4c4
...
@@ -3610,8 +3610,11 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
...
@@ -3610,8 +3610,11 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
case
'E'
:
// Next Line
case
'E'
:
// Next Line
TERM_XY
(
&
col
,
&
row
);
TERM_XY
(
&
col
,
&
row
);
row
++
;
row
++
;
if
(
row
>
TERM_MAXY
)
if
(
row
>
TERM_MAXY
)
{
scrollup
(
cterm
);
row
=
TERM_MAXY
;
row
=
TERM_MAXY
;
}
col
=
TERM_MINX
;
GOTOXY
(
col
,
row
);
GOTOXY
(
col
,
row
);
break
;
break
;
case
'H'
:
case
'H'
:
...
...
This diff is collapsed.
Click to expand it.
src/conio/cterm.txt
+
46
−
42
View file @
0c12c4c4
...
@@ -23,37 +23,37 @@ here: https://github.com/mattiase/wraptest
...
@@ -23,37 +23,37 @@ here: https://github.com/mattiase/wraptest
Control characters:
Control characters:
NUL:
0x00 -
NUL:
In doorway mode, indicates that the next character is
In doorway mode, indicates that the next character is
a literal character. The IBM CP437 character will
a literal character. The IBM CP437 character will
be displayed. This allows ESC and other control
be displayed. This allows ESC and other control
characters to be placed on the screen.
characters to be placed on the screen.
CR:
0x07 - BEL:
Move cursor position to column 1 of the current line
Beep
LF:
Move cursor position to same column of the next row.
If current row is the last row, scrolls the screen up
and fills the new row with the current attribute.
BS:
0x08 -
BS:
Non-destructive backspace. Moves cursor position to
Non-destructive backspace. Moves cursor position to
the previous column unless the current column is the
the previous column unless the current column is the
first, in which case no operation is performed.
first, in which case no operation is performed.
0x07:
0x09 - HT:
Beep
Moves to the next horizontal tab stop. Does not overwrite
any characters in between. If the starting position is
TAB:
Moves to the next tab stop. Does not overwrite any
characters in between. If the starting position is
last column, advances to next line. If starting
last column, advances to next line. If starting
position is the last column of the last line, performs
position is the last column of the last line, performs
a scroll, filling the new line at bottom with the
a scroll, filling the new line at bottom with the
current attribute and moves to the first character in
current attribute and moves to the first character in
the new line.
the new line.
0x0A - LF:
Move cursor position to same column of the next row.
If current row is the last row, scrolls the screen up
and fills the new row with the current attribute.
0x0D - CR:
Move cursor position to column 1 of the current line
Control Codes:
Control Codes:
--------------
--------------
...
@@ -61,22 +61,21 @@ Control codes are in the following format:
...
@@ -61,22 +61,21 @@ Control codes are in the following format:
ESC {'0' (ZERO) to '~'}
ESC {'0' (ZERO) to '~'}
Legal combinations which are not handled are silently dropped.
Legal combinations which are not handled are silently dropped.
ESC H Set Tab
ESC E Next Line (NEL)
Moves to the line home position of the next line.
(Same as CR LF)
ESC H Set Tab (HTS)
Sets a tab stop at the current column
Sets a tab stop at the current column
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
ESC M Reverse Line Feed
ESC M Reverse Line Feed
(RI)
Move up one line
Move up one line
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
ESC _ Application Program String
ESC P Device Control String (DCS)
Begins a string consisting of the characters 0x08 - 0x0d and
0x20-0x7e, terminated by a String Terminator (ST)
The string is currently ignored.
ESC P Device Control String
Begins a string consisting of the characters 0x08 - 0x0d and
Begins a string consisting of the characters 0x08 - 0x0d and
0x20-0x7e, terminated by a String Terminator (ST)
0x20-0x7e, terminated by a String Terminator (ST)
Supported OSC values:
Supported OSC values:
...
@@ -203,12 +202,14 @@ ESC P Device Control String
...
@@ -203,12 +202,14 @@ ESC P Device Control String
terminating ; may be left out if the sequence to be
terminating ; may be left out if the sequence to be
repeated ends at the end of the string.
repeated ends at the end of the string.
ESC
^ Privacy Message
ESC
X Start Of String (SOS)
Begins a string consisting of the characters 0x08 - 0x0d and
As the above strings, but may contain any characters except
0x20-0x7e, terminated by
a String Terminator
(ST)
a Start Of String sequence or
a String Terminator
sequence.
The string is currently ignored.
The string is currently ignored.
ESC ] Operating System Command
ESC \ String Terminator (ST)
ESC ] Operating System Command (OSC)
Begins a string consisting of the characters 0x08 - 0x0d and
Begins a string consisting of the characters 0x08 - 0x0d and
0x20-0x7e, terminated by a String Terminator (ST)
0x20-0x7e, terminated by a String Terminator (ST)
Supported OSC values:
Supported OSC values:
...
@@ -230,14 +231,17 @@ ESC ] Operating System Command
...
@@ -230,14 +231,17 @@ ESC ] Operating System Command
SOURCE: xterm
SOURCE: xterm
ESC
X Start Of String
ESC
^ Privacy Message (PM)
As the above strings, but may contain any characters except
Begins a string consisting of the characters 0x08 - 0x0d and
a Start Of String sequence or
a String Terminator
sequence.
0x20-0x7e, terminated by
a String Terminator
(ST)
The string is currently ignored.
The string is currently ignored.
ESC \ String Terminator
ESC _ Application Program String (APS)
Begins a string consisting of the characters 0x08 - 0x0d and
0x20-0x7e, terminated by a String Terminator (ST)
The string is currently ignored.
ESC c Reset
Terminal
ESC c Reset
to Initial State (RIS)
Resets all the terminal settings, clears the screen, and homes
Resets all the terminal settings, clears the screen, and homes
the cursor.
the cursor.
...
@@ -271,7 +275,7 @@ Sequence Parameters:
...
@@ -271,7 +275,7 @@ Sequence Parameters:
If a default is defined, the parameter is optional
If a default is defined, the parameter is optional
CSI Pn @
CSI Pn @
(ICH)
Insert Character(s)
Insert Character(s)
Defaults: Pn = 1
Defaults: Pn = 1
Moves text from the current position to the right edge Pn characters
Moves text from the current position to the right edge Pn characters
...
@@ -280,8 +284,8 @@ CSI Pn @
...
@@ -280,8 +284,8 @@ CSI Pn @
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn SP @
CSI Pn SP @
(SL)
S
hift
Left
S
croll
Left
Defaults: Pn = 1
Defaults: Pn = 1
Shifts the contents of the screen left Pn columns(s) with
Shifts the contents of the screen left Pn columns(s) with
leftmost columns going off-screen and the resulting hole being
leftmost columns going off-screen and the resulting hole being
...
@@ -289,7 +293,7 @@ CSI Pn SP @
...
@@ -289,7 +293,7 @@ CSI Pn SP @
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn A
CSI Pn A
(CUU)
Cursor Up
Cursor Up
Defaults: Pn = 1
Defaults: Pn = 1
Moves the cursor position up Pn lines from the current position.
Moves the cursor position up Pn lines from the current position.
...
@@ -298,8 +302,8 @@ CSI Pn A
...
@@ -298,8 +302,8 @@ CSI Pn A
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn SP A
CSI Pn SP A
(SR)
S
hift
Right
S
croll
Right
Defaults: Pn = 1
Defaults: Pn = 1
Shifts the contents of the screen right Pn columns(s) with
Shifts the contents of the screen right Pn columns(s) with
rightmost columns going off-screen and the resulting hole being
rightmost columns going off-screen and the resulting hole being
...
@@ -307,7 +311,7 @@ CSI Pn SP A
...
@@ -307,7 +311,7 @@ CSI Pn SP A
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn B
CSI Pn B
(CUD)
Cursor Down
Cursor Down
Defaults: Pn = 1
Defaults: Pn = 1
Moves the cursor position down Pn lines from the current position.
Moves the cursor position down Pn lines from the current position.
...
@@ -316,7 +320,7 @@ CSI Pn B
...
@@ -316,7 +320,7 @@ CSI Pn B
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn C
CSI Pn C
(CUF)
Cursor Right
Cursor Right
Defaults: Pn = 1
Defaults: Pn = 1
Moves the cursor position right Pn columns from the current position.
Moves the cursor position right Pn columns from the current position.
...
@@ -325,7 +329,7 @@ CSI Pn C
...
@@ -325,7 +329,7 @@ CSI Pn C
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn D
CSI Pn D
(CUB)
Cursor Left
Cursor Left
Defaults: Pn = 1
Defaults: Pn = 1
Moves the cursor position left Pn columns from the current position.
Moves the cursor position left Pn columns from the current position.
...
@@ -334,7 +338,7 @@ CSI Pn D
...
@@ -334,7 +338,7 @@ CSI Pn D
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Ps1 ; Ps2 sp D
CSI Ps1 ; Ps2 sp D
(FNT)
Font Selection
Font Selection
Defaults: Ps1 = 0 Ps2 = 0
Defaults: Ps1 = 0 Ps2 = 0
"sp" indicates a single space character.
"sp" indicates a single space character.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment