.FIGURE 15 .CENTER TECO IN C FOR FREE .SKIP 3 .CENTER Pete Siemsen .CENTER 645 Ohio Ave, _# 302 .CENTER Long Beach, Ca. 90814 .PAGE .FIGURE 5 TECO-C is an implementation of TECO as defined by the PDP-11 Teco User's Guide, DEC order number DEC-11-UTECA-B-D. It was written using the Guide as a specification. .SKIP 8 .CENTER Undocumented features of TECO-11 and TECO-C .skip 3 .LIST .LIST ELEMENT 8192 bit in ET flag causes ' character to be ESCAPE .LIST ELEMENT Q-registers named ".x" are local to the current macro level. .LIST ELEMENT HELP .END LIST .PAGE .figure 1 .CENTER TECO-C vs. TECO-11 .SKIP .CENTER in rough order of importance .SKIP 4 .LITERAL TECO-C TECO-11 free: you get what you exhaustively tested pay for (maybe bugs) runs on MicroVaxes and only compatibility mode more soon (until VMS v5.0) No W command (no video) supports slow video and and no /SCROLL qualifier supports /SCROLL virtual memory buffer and 100k total bytes q-registers faster slower UNIX-style command line, VMS-style command line, not parsed with macro parsed with a TECO macro 32-bit numeric values 16-bit numeric values VT200s in VT200 mode VT200s in VT100 mode if you want LF and BS immediate commands direct I/O to/from not implemented q-registers (E% and EQ) large (not complete) small help file, can't HELP file, interactive move around help tree only TEC$HELP or system settable HELP library help libraries EO returns 100 EO returns 39, 40, etc. correct case sensitivity thinks { is same as [, etc. no -P, -N, -Y has -P, -N, -Y no filename switches has them, like /CR and /FT .END LITERAL .CENTER other very minor differences .PAGE .CENTER TECO-C portability .LIST .LIST ELEMENT 283 files, 32 are system-dependent .LIST ELEMENT Runs under VAX/VMS, almost runs under XENIX, once ran under CPM-68k .LIST ELEMENT Include file controls conditionally compiled code in system-dependent files. .LIST ELEMENT Almost no terminal dependencies. .LIST ELEMENT Uses RMS under VMS, fopen/fclose/fgets etc. under XENIX. .LIST ELEMENT Uses a memory move function which maps to OTS$MOVC3 under VMS and to C code under XENIX. .LIST ELEMENT Reports errors from system-dependent code with detail dependent upon the system. For instance, RMS error messages are reported from VAX code. .LIST ELEMENT Uses a UNIX-style command line and C's standard way of accessing command-line arguments. .END LIST .PAGE .CENTER Implementation of TECO-C .SKIP .LIST .LIST ELEMENT Edit buffer gap scheme instead of a contiguous edit buffer. .LIST ELEMENT Commands are parsed by indexing into a jump table using the command character. .LIST ELEMENT Memory is managed with calloc/realloc/free calls. .LIST ELEMENT One function per file. .LIST ELEMENT Function names are 6 characters or less. .LIST ELEMENT Every function has access to global variables: there is very little parameter passing. .LIST ELEMENT System-dependent function names start with a "Z". .LIST ELEMENT An in-line debugging system exists which displays function entry/exit text as TECO-C runs. Can be controlled with _^P command and is conditionally compiled. .LIST ELEMENT There is a small suite of TECO test macros. They were written to compare TECO-C's behavior to TECO-11's. .END LIST .PAGE .CENTER Helpful files in TECO-C save set .SKIP .LIST .LIST ELEMENT TECOC.HLB is better than TECO-11's help library, and can be used from TECO-11. .LIST ELEMENT CHANGE.TEC is like VMS SEARCH, but changes the string. .LIST ELEMENT There is no manual, but COMMANDS.TXT contains a "wall chart" of TECO-C commands. .LIST ELEMENT PG.MEM contains a "programmer's" guide which describes algorithms and data structures used in TECO-C. .LIST ELEMENT PROBLEMS.TXT contains desciptions of known bugs and some ideas. .LIST ELEMENT Several (20-30) TECO macros can be found in files named *.TEC. They are undocumented. .END LIST .PAGE .CENTER Future of TECO-C .SKIP .LIST .LIST ELEMENT Video: what form? TECO-11's VTEDIT.TEC is clunky. Making it like EDT or TPU means depending on a DEC-style keyboard. Making it like EMACS is REALLY re-inventing the wheel. .LIST ELEMENT Video: how to handle terminals? If I use SMG, the it's VAX-dependent. If I use curses, then it's UNIX-dependent. If I write my own, then it will support a small number of terminals. .LIST ELEMENT Avoid enhancements that cause several "flavors" to exist, if possible. .LIST ELEMENT When it runs well under two environments, TECO-C will be submitted to the DECUS Software Library. Other TECO-related elements of the library will be combined into a single Library entry. .END LIST