diff options
| author | Karl Heuer | 1995-01-17 00:18:20 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-01-17 00:18:20 +0000 |
| commit | 902a3b86a41b7142ba27c0430a9dff06e878fc14 (patch) | |
| tree | 7b35ab52d3fa57bf5845bdd3993796bb747619e6 /src | |
| parent | 2b803765ef411feae2470f5a932123792b223c62 (diff) | |
| download | emacs-902a3b86a41b7142ba27c0430a9dff06e878fc14.tar.gz emacs-902a3b86a41b7142ba27c0430a9dff06e878fc14.zip | |
(cmcheckmagic): New function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cm.c | 29 |
1 files changed, 29 insertions, 0 deletions
| @@ -100,6 +100,35 @@ addcol (n) { | |||
| 100 | #endif | 100 | #endif |
| 101 | 101 | ||
| 102 | /* | 102 | /* |
| 103 | * Terminals with magicwrap (xn) don't all behave identically. | ||
| 104 | * The VT100 leaves the cursor in the last column but will wrap before | ||
| 105 | * printing the next character. I hear that the Concept terminal does | ||
| 106 | * the wrap immediately but ignores the next newline it sees. And some | ||
| 107 | * terminals just have buggy firmware, and think that the cursor is still | ||
| 108 | * in limbo if we use direct cursor addressing from the phantom column. | ||
| 109 | * The only guaranteed safe thing to do is to emit a CRLF immediately | ||
| 110 | * after we reach the last column; this takes us to a known state. | ||
| 111 | */ | ||
| 112 | void | ||
| 113 | cmcheckmagic () | ||
| 114 | { | ||
| 115 | if (curX == FrameCols) | ||
| 116 | { | ||
| 117 | if (!MagicWrap || curY >= FrameRows - 1) | ||
| 118 | abort (); | ||
| 119 | if (termscript) | ||
| 120 | putc ('\r', termscript); | ||
| 121 | putchar ('\r'); | ||
| 122 | if (termscript) | ||
| 123 | putc ('\n', termscript); | ||
| 124 | putchar ('\n'); | ||
| 125 | curX = 0; | ||
| 126 | curY++; | ||
| 127 | } | ||
| 128 | } | ||
| 129 | |||
| 130 | |||
| 131 | /* | ||
| 103 | * (Re)Initialize the cost factors, given the output speed of the terminal | 132 | * (Re)Initialize the cost factors, given the output speed of the terminal |
| 104 | * in the variable ospeed. (Note: this holds B300, B9600, etc -- ie stuff | 133 | * in the variable ospeed. (Note: this holds B300, B9600, etc -- ie stuff |
| 105 | * out of <sgtty.h>.) | 134 | * out of <sgtty.h>.) |