From c162a9dffda0154a473188a2727ef06486cab24e Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 4 May 2025 20:07:09 +0300 Subject: added a new README markdown file The original README is renamed to README.OLD. --- README | 227 ------------------------------------------------------------- README.OLD | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 104 ++++++++++++++++++++++++++++ 3 files changed, 331 insertions(+), 227 deletions(-) delete mode 100644 README create mode 100644 README.OLD create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index 4fbe480..0000000 --- a/README +++ /dev/null @@ -1,227 +0,0 @@ -Video TECO is licensed under the GNU license. If you find bugs or want to -send changes back to me, you can email me: paul@copters.com. - -To build TECO on a Posix system, run ./configure and then "make". I've built -it recently on Linux and Mac OS X and it compiles fine on both of those -operating systems. On the Mac you need to run it from a terminal or X11 window -i.e. there is no graphical front end. - -If you want a sample .teco_ini file, I'm putting mine at the end of this file. -It goes in your home directory. - -Paul Cantrell -December 11, 2007. - - -! This file is used to initialize macros for the TECO editor! - -! Q-Register 0 - - This is used to set initial stuff up. As soon as the teco.ini file - is read in, this q-register is executed. - - In this case, we use it to set the alternate rubout character to ^H - and to set nominal paragraph format width for the MF macro to 75 - - I also set backquote to work as ESCape, since the alpha keyboard - has those two keys mapped on top of each other. -! -0/6,4EJ4,8EJ1,96EJ75UF/ - -! Q-Register B - - This macro moves back one buffer. It assumes there are no holes - in the buffer space, which is a very bad assumption. However, - performing a full 0EB on every invokation would be a bit excessive. - A :EB loop really would be good -! - -B/q*u1q*"lq*-1eb|q*u2!end!'/ - -! Q-Register D - - This macro takes the current indenture, and decreases it by 4. - It assumes that the current indenture is correctly done with - tabs and possibly one group of 4 spaces. -! - -D/1<0L<0UD0A-32"E%D'0A-9"E%D'QDC-QD;>-A-32"E-4DOEND'-A-9"E-DI '>!END!!dedent by four spaces!/ - -! Q-Register E - - This macro uses the current error line to position to the position - in the source file that the error occurred on. -! - -E/[_[1[2[3s:d:;.u1lrq1,.x3q1j-s0x1c\u2eq1jiebeq31ij1im1q2mgm3]3]2]1]_/ - -! Q-Register F - - This macro reformats the paragraph between Q1 and . such that - lines don't exceed the nominal width. Spaces are only inserted - between words, never within. -! - -F/.u2q1j!loop!(q2-.)-QF"gQFc-wd10ioloop'q2j!Reformat the paragraph bounded by Q1 and Q2 into QF column wide!/ - -! Q-Register G - - This macro positions us to the line number specified as an argument - to the macro. -! - -G/UGJQG-1L!Macro to go to the specified line number!/ - -! Q-Register H - - This macro loads the symbol following the cursor into the search - q-register. -! - -H/.UHSmcQH,.X_!Macro to load next symbol into search register!/ - -! Q-Register I - - This macro indents the current line by 4. It assumes that the - current indenture is correctly done with tabs and possibly one - group of 4 spaces. -! - -I/0L.-Z"EI OEND'<0UI0A-32"E%I'0A-9"E%I'QIC-QI;>-A-32"E-4D9IOEND'-A-9"EI OEND'I !END!!Indent by four!/ - -! Q-Register K - - This macro deletes from the current position to the end of the line -! - -K/.UKLRQK,.K!Delete to end of line!/ - -! Q-Register L - - This macro converts the following word to lower case -! - -L/.UU<0A-32"E0;'0A-9"E0;'0A-10"E0;'C>.ULQUJQL-QU<0A-64"G0A-91"L0A+32IDR''C>!Convert word to lower case!/ - -! Q-Register N - - This macro moves to the next sequential buffer, and assumes that - there are no holes. -! - -M/-1ebhkecmakej/ - -N/Q*+1EB!Go to next edit buffer!/ - -! Q-Register O - - This macro inserts a blank line before the one which the cursor - is on, leaving the cursor positioned in the same place on the - current line. -! - -O/.UO0L10IQO+1J!Insert a blank line before this one!/ - -! Q-Register P - - This macro inserts a line in front of the current line, and - repositions the cursor to the begining of the new line. -! - -P/0L10IR!Insert a blank line before this one and move to it!/ - -! Q-Register R - - This macro tries to find the begining and end of a C-function, - and load Q9 to point to the begining, Q0 to point to the end, - and print a message in the message window with the definition - in it (such as routine(arg1, arg2, arg3)) -! - -R/[_[1.U1-S -{-S)C0X10L.U9S -}.U0Q1JQ*U1EQ11IJ1IQ1EBM1]1]_!Find the bounds of a C function and set them in Q9,Q0 and print the first line in the message line!/ - -! Q-Register S - - This macro copies the search q-register into a temporary - q-register where it can be edited. A second invokation moves - us back to the original source buffer. -! - -S/q*"lq_eb[9]_]9|[9q*u_[_]9eq9j'!Toggle in and out of the search buffer!/ - -! Q-Register T - - This macro prints a short table of contents in the message window. - It's mostly useful when only a few buffers have been loaded. -! - -T#[_q*u10ebhx5eq5jsbuffers-0l.,zk-k<-sbuffersd;w0ksdi:.u2s>sq2,.kw-wfk -.u20l:q2,.s/"sc.u20ls:q2,.k'0l>jzj1ij1iq1ebm5]_!Print a short list of buffers in the message line!# - -! Q-Register U - - This macro converts the word following the cursor to upper case -! - -U/.UU<0A-32"E0;'0A-9"E0;'0A-10"E0;'C>.ULQUJQL-QU<0A-96"G0A-123"L0A-32IDR''C>!Convert next word to upper case!/ - -! Q-Register V - - This macro sets the current indenture to that of the previous line. -! - -V/[_[1.U1-S -SW0X1Q1JG1]1]_/ - -! Q-Register W - - This macro writes out all the modified buffers, stopping if there - is a problem with one. -! - -W/[_[0Q*UW0EBQWEB]0]_!Write out modfied edit buffers!/ - -! Q-Register Y - - This macro reads the following string as a filename, and then - loads that file into the editor. -! - -! Q-Register X - -! - -X/u1q1ebq1-1/ - -Y#.U1[_sm[c,/,.,_]]_Q1,.X1EQ1JIEBM1# - -! Q-Register Z - - This macro reads in MAKE.LOG and tries to position the cursor - to the first occurance of a compiler error message. -! - -Z/[_-1EBHKERMAKE.LOGJ:S -"]_!Read MAKE.LOG into buffer -1!/ - -! Q-Register 4 - This macro loads all the files at the current position into the - editor. -! -4/[4[5[_q*u4]_]5]4/ - -7#[_s -begin d0l.u1s -Mrq1,.:x1.u1]_# - -8#[_-s -M2l.u1s -Mrq1,.:x1.u1]_# - -9/.u9erfiles.uuq9jmmq9,.kmwecdecode/ diff --git a/README.OLD b/README.OLD new file mode 100644 index 0000000..4fbe480 --- /dev/null +++ b/README.OLD @@ -0,0 +1,227 @@ +Video TECO is licensed under the GNU license. If you find bugs or want to +send changes back to me, you can email me: paul@copters.com. + +To build TECO on a Posix system, run ./configure and then "make". I've built +it recently on Linux and Mac OS X and it compiles fine on both of those +operating systems. On the Mac you need to run it from a terminal or X11 window +i.e. there is no graphical front end. + +If you want a sample .teco_ini file, I'm putting mine at the end of this file. +It goes in your home directory. + +Paul Cantrell +December 11, 2007. + + +! This file is used to initialize macros for the TECO editor! + +! Q-Register 0 + + This is used to set initial stuff up. As soon as the teco.ini file + is read in, this q-register is executed. + + In this case, we use it to set the alternate rubout character to ^H + and to set nominal paragraph format width for the MF macro to 75 + + I also set backquote to work as ESCape, since the alpha keyboard + has those two keys mapped on top of each other. +! +0/6,4EJ4,8EJ1,96EJ75UF/ + +! Q-Register B + + This macro moves back one buffer. It assumes there are no holes + in the buffer space, which is a very bad assumption. However, + performing a full 0EB on every invokation would be a bit excessive. + A :EB loop really would be good +! + +B/q*u1q*"lq*-1eb|q*u2!end!'/ + +! Q-Register D + + This macro takes the current indenture, and decreases it by 4. + It assumes that the current indenture is correctly done with + tabs and possibly one group of 4 spaces. +! + +D/1<0L<0UD0A-32"E%D'0A-9"E%D'QDC-QD;>-A-32"E-4DOEND'-A-9"E-DI '>!END!!dedent by four spaces!/ + +! Q-Register E + + This macro uses the current error line to position to the position + in the source file that the error occurred on. +! + +E/[_[1[2[3s:d:;.u1lrq1,.x3q1j-s0x1c\u2eq1jiebeq31ij1im1q2mgm3]3]2]1]_/ + +! Q-Register F + + This macro reformats the paragraph between Q1 and . such that + lines don't exceed the nominal width. Spaces are only inserted + between words, never within. +! + +F/.u2q1j!loop!(q2-.)-QF"gQFc-wd10ioloop'q2j!Reformat the paragraph bounded by Q1 and Q2 into QF column wide!/ + +! Q-Register G + + This macro positions us to the line number specified as an argument + to the macro. +! + +G/UGJQG-1L!Macro to go to the specified line number!/ + +! Q-Register H + + This macro loads the symbol following the cursor into the search + q-register. +! + +H/.UHSmcQH,.X_!Macro to load next symbol into search register!/ + +! Q-Register I + + This macro indents the current line by 4. It assumes that the + current indenture is correctly done with tabs and possibly one + group of 4 spaces. +! + +I/0L.-Z"EI OEND'<0UI0A-32"E%I'0A-9"E%I'QIC-QI;>-A-32"E-4D9IOEND'-A-9"EI OEND'I !END!!Indent by four!/ + +! Q-Register K + + This macro deletes from the current position to the end of the line +! + +K/.UKLRQK,.K!Delete to end of line!/ + +! Q-Register L + + This macro converts the following word to lower case +! + +L/.UU<0A-32"E0;'0A-9"E0;'0A-10"E0;'C>.ULQUJQL-QU<0A-64"G0A-91"L0A+32IDR''C>!Convert word to lower case!/ + +! Q-Register N + + This macro moves to the next sequential buffer, and assumes that + there are no holes. +! + +M/-1ebhkecmakej/ + +N/Q*+1EB!Go to next edit buffer!/ + +! Q-Register O + + This macro inserts a blank line before the one which the cursor + is on, leaving the cursor positioned in the same place on the + current line. +! + +O/.UO0L10IQO+1J!Insert a blank line before this one!/ + +! Q-Register P + + This macro inserts a line in front of the current line, and + repositions the cursor to the begining of the new line. +! + +P/0L10IR!Insert a blank line before this one and move to it!/ + +! Q-Register R + + This macro tries to find the begining and end of a C-function, + and load Q9 to point to the begining, Q0 to point to the end, + and print a message in the message window with the definition + in it (such as routine(arg1, arg2, arg3)) +! + +R/[_[1.U1-S +{-S)C0X10L.U9S +}.U0Q1JQ*U1EQ11IJ1IQ1EBM1]1]_!Find the bounds of a C function and set them in Q9,Q0 and print the first line in the message line!/ + +! Q-Register S + + This macro copies the search q-register into a temporary + q-register where it can be edited. A second invokation moves + us back to the original source buffer. +! + +S/q*"lq_eb[9]_]9|[9q*u_[_]9eq9j'!Toggle in and out of the search buffer!/ + +! Q-Register T + + This macro prints a short table of contents in the message window. + It's mostly useful when only a few buffers have been loaded. +! + +T#[_q*u10ebhx5eq5jsbuffers-0l.,zk-k<-sbuffersd;w0ksdi:.u2s>sq2,.kw-wfk +.u20l:q2,.s/"sc.u20ls:q2,.k'0l>jzj1ij1iq1ebm5]_!Print a short list of buffers in the message line!# + +! Q-Register U + + This macro converts the word following the cursor to upper case +! + +U/.UU<0A-32"E0;'0A-9"E0;'0A-10"E0;'C>.ULQUJQL-QU<0A-96"G0A-123"L0A-32IDR''C>!Convert next word to upper case!/ + +! Q-Register V + + This macro sets the current indenture to that of the previous line. +! + +V/[_[1.U1-S +SW0X1Q1JG1]1]_/ + +! Q-Register W + + This macro writes out all the modified buffers, stopping if there + is a problem with one. +! + +W/[_[0Q*UW0EBQWEB]0]_!Write out modfied edit buffers!/ + +! Q-Register Y + + This macro reads the following string as a filename, and then + loads that file into the editor. +! + +! Q-Register X + +! + +X/u1q1ebq1-1/ + +Y#.U1[_sm[c,/,.,_]]_Q1,.X1EQ1JIEBM1# + +! Q-Register Z + + This macro reads in MAKE.LOG and tries to position the cursor + to the first occurance of a compiler error message. +! + +Z/[_-1EBHKERMAKE.LOGJ:S +"]_!Read MAKE.LOG into buffer -1!/ + +! Q-Register 4 + This macro loads all the files at the current position into the + editor. +! +4/[4[5[_q*u4]_]5]4/ + +7#[_s +begin d0l.u1s +Mrq1,.:x1.u1]_# + +8#[_-s +M2l.u1s +Mrq1,.:x1.u1]_# + +9/.u9erfiles.uuq9jmmq9,.kmwecdecode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..13056be --- /dev/null +++ b/README.md @@ -0,0 +1,104 @@ +# Video TECO: Robin Haberkorn's fork + +This is a fork of Paul Cantrell's and Joyce Nishinaga's +Video TECO, as first [published on Sourceforge](https://sourceforge.net/projects/videoteco/). +Video TECO is a graphical interactive dialect of the +Text Editor and Corrector (TECO) for UNIX and VMS. + +This fork has the following extensions compared to the last +version published by Paul Cantrell in 2007 +([v6.4](https://github.com/rhaberkorn/videoteco-fork/releases/tag/v6.4)): + +* Ported to [real-mode MS-DOS](#MS-DOS%20port)! +* Fixed file backups. +* Avoid warnings and compatibility tweaks for newer C compilers (GCC/Clang) and current + versions of Linux and FreeBSD. + Actually, this fork currently requires some C99 feautures - but this might be reversed. +* Fixed possible memory corruptions. +* Reduced memory usage. +* `EC` command can be used both to insert stdout at the current buffer + position and pipe portions of the buffer through the external process. + The semantics are [SciTECO-compatible](https://rhaberkorn.github.io/sciteco/sciteco.7.html#Execute%20operating%20system%20command%20and%20filter%20buffer%20contents) + (but it was first implemented in this fork). + There is also a dumb non-UNIX implementation that works with temporary + files, that's currently only used for the MS-DOS port. +* Control characters are echoed in reverse video just like in SciTECO. +* Fixed echoing control characters on the end of lines. + Or was it broken only at the end of the document? + Anyway, it's fixed now. +* Code documentation using [Doxygen](https://doxygen.nl/) +* Added the [original manual](doc/TECO Manual V4/TECO Manual V4.html) to the repository. + +Video TECO is the main inspiration of [SciTECO](https://rhaberkorn.github.io/sciteco) and most +development and innovation nowadays takes place there. +Video TECO still remains interesting for legacy and space constrained systems as it has even lower +system requirements and almost no external dependencies (except for terminfo/termcap). +Also, Video TECO supports [split screen modes](https://www.copters.com/teco.html#RTFToC132), +that will probably never be added to SciTECO. +Any new features will be SciTECO-compatible if possible. + +![Split screen mode](doc/TECO%20Manual%20V4_files/teco_EP.gif) + +The original README can be found in [README.OLD](README.OLD) and contains +`~/.teco_ini` examples. + +## MS-DOS port + +This fork also compiles for real-mode 16-bit MS-DOS - in fact it will even work on 8088/8086 +processors. +It has been tested on MS-DOS 6.2, [FreeDOS](https://www.freedos.org/) 1.4 and +[SvarDOS](http://svardos.org/) (DR-DOS). +The port contains Long File Name (LFN) support and should also be useful +on Win9x (Windows 95-Me) systems. +Binaries can be downloaded in the [Releases section](https://github.com/rhaberkorn/videoteco-fork/releases). + +It currently only compiles with the [Open Watcom v1.9](https://github.com/open-watcom/open-watcom-1.9) +compiler. +It can be compiled both from DOS and Linux hosts if the environment is +set up correctly (`. owsetenv.sh`): + + wmake -f Makefile.wcc + +### Features and limitations + +* Being ported from UNIX, it outputs escape sequences and requires + [ANSI.SYS](https://en.wikipedia.org/wiki/ANSI.SYS), + [NANSI.SYS](http://www.kegel.com/nansi/) or + [ANSIPLUS](http://www.sweger.com/ansiplus/). + There is special NANSI.SYS support, so that driver is preferred. + Video TECO has a builtin termcap "database", but you can + set the `TERMCAP` environment variable to a custom termcap definition file + to tweak definitions. +* The console size/resolution is automatically detected. +* It supports the same Csh-like wildcard expansions as on UNIX for + command-line parameters. +* DOS linebreaks (CRLF) are automatically normalized to LF in the buffer unless + you specify the `-8` command-line parameter. + This is similar in spirit to but much more primitive than + SciTECO's [automatic EOL translation](https://rhaberkorn.github.io/sciteco/sciteco.7.html#BUFFER%20RING). + It relies on Watcom libc features. +* The initialization file is called TECO.INI and should be located in the same directory as TECO.EXE. + If Video TECO fails to locate it, you can define the `VTECO` environment variable to + point to the installation directory (e.g. `set VTECO=C:\VTECO`). + See [README.OLD](README.OLD) for macro examples. +* [Open Watcom v2.0](https://github.com/open-watcom/open-watcom-v2) is not yet supported - + generated binaries are still broken. + The v2.0 version is obviously not mature enough. +* Programs executed via `EC` should not print to stderr as it will confuse the + display. + This is hard to prevent though on DOS. +* For a real-mode DOS application the binary is relatively large. + There are of course much smaller editors written in assembly. + +### TODO + +- [ ] Re-evaluate Video TECO's lookaside buffers. + But they probably don't make sense considering the memory constraints. +- [ ] Dosbox has problems with drawing the command line cursor. + Obviously its ANSI.SYS emulation attaches attributes to character cells, + so a moving reverse `' '` leaks the attribute to the preceding or following + cell. + It also cannot deal with more than 25 rows. + But perhaps it's not so important to support Dosbox. +- [ ] Command line help (`-h`) +- [ ] SvarDOS package -- cgit v1.2.3