aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-05-07DOS: detect ANSIPLUS driverv7.0Robin Haberkorn3-17/+40
Actually, we cannot (easily) detect NANSI.SYS, so we don't enable optimizations by default. You will have to `set TECO_TERM=nansi.sys` to enable optimizations. Of course you can also still set the TERMCAP variable.
2025-05-06updated AUTO_DATE in teco.h in preparation for v7.0 releaseRobin Haberkorn2-1/+4
2025-05-05terminfo: use the enter_ca_mode/exit_ca_mode capabilities to restore the ↵Robin Haberkorn1-0/+8
screen at exit termcap was already doing it. Perhaps termcap is meant to be the main Video TECO interface?
2025-05-05removed declaration of tgetstr()Robin Haberkorn1-4/+0
It's in termcap.h...
2025-05-05removed poll.h and syspoll.hRobin Haberkorn2-172/+0
They were probably for compatibility on some obscure legacy UNIX, that lacked the header for some strange reason. (But then, why wouldn't you just define `struct pollfd` and poll() in one of Video TECO's headers?)
2025-05-05automatically use the current date when building with AutotoolsRobin Haberkorn3-26/+33
* It's actually the time of running ./configure that will be used. * On OpenWatcom, it does not seem to be possible to set variables based on external processes, so you will still have to update AUTO_DATE in teco.h when releasing for DOS.
2025-05-05reconstructed Autotools build system (closes #1)Robin Haberkorn12-7069/+488
The resulting config.h.in is similar to the one from the CVS repo. However, I removed checks that apparently weren't referenced in the code base. Also, I fixed the terminfo check. Previously, it was actually building against termcap on my system. Terminfo should always be preferred. Currently, it does not check against ncurses itself. If it turns out there are systems with an ncurses pkg-config file, but without tinfo, we might have to check for ncurses as well. It adds both -Wall and -Wsign-compare, which turned out to be useful to debug the DOS version.
2025-05-05tecterm.c: avoid duplicate function declarationsRobin Haberkorn1-9/+2
2025-05-04DOS: added `wmake release` target to create zip archivesRobin Haberkorn1-2/+6
The text files are added with DOS line-breaks. Well, actually README.OLD is currently detected as a binary file, so it won't.
2025-05-04yet more README.md fixesRobin Haberkorn1-2/+3
2025-05-04minor README.md fixesRobin Haberkorn1-3/+5
2025-05-04added a copy of the GPLv3Robin Haberkorn1-0/+674
This is both important to highlight the license on Github and so we can ship it in the DOS releases.
2025-05-04added a new README markdown fileRobin Haberkorn2-0/+104
The original README is renamed to README.OLD.
2025-05-04added the original "TECO Manual V4" (Video TECO User's Guide) - just for ↵Robin Haberkorn4-0/+4840
archival purposes I haven't updated it with any of the changes I did since Paul Cantrell put it online in 2007. Original source: https://www.copters.com/teco.html
2025-05-04moved the DOS-specific defines into teco.h, so we don't need the `@WCC_DEFS` ↵Robin Haberkorn2-7/+31
workaround Also, we increased the maximum size of objects to be put into the "far data" section, which significantly decreases the DOS binary size.
2025-05-04fixup fd12f39ce43fe465dac987f078355c77d1dbbb07: fixed some sloppy editing issuesRobin Haberkorn2-4/+4
It now compiles with -DDEBUG1 again (magic struct checks).
2025-05-04mention myself on <0EB>: "Munged by Robin Haberkorn"Robin Haberkorn1-0/+7
2025-05-04fixed echoing of control characters at the end of the lineRobin Haberkorn1-2/+2
This had been broken even before my mungings.
2025-05-04DOS: hopefully fixed wildcard expansions in the drive rootRobin Haberkorn1-1/+2
Apparently "." doesn't always have the S_ISDIR flag in SvarDOS (DR-DOS), so we simply exclude it.
2025-05-03DOS: add `-8` command-line parameter for disabling automatic EOL conversionsRobin Haberkorn1-0/+6
* this preserves CRs in the buffer - they will be echoed like ^M * This is inspired by SciTECO's `-8`/`--8bit` parameter.
2025-05-03escapes and control chars are now also echoed in reverse videoRobin Haberkorn1-8/+21
Just like in SciTECO!
2025-05-03various data type improvementsRobin Haberkorn7-40/+43
* fixes at least <FS>, which has been broken since b5325e00c402ec18034da4b4a4aaaefa87bb1fef. * but probably many other commands as well in the DOS version when working with "very large" documents * now compiles cleanly with -Wsign-compare
2025-05-03DOS: expand glob patterns when opening filesRobin Haberkorn3-12/+29
* This is not done by the shell in DOS. * As a side effect, we support all of the Csh-like constructs like {a,b,c} in contrast to Watcom's fnmatch().
2025-04-27DOS: use backslash directory separators instead of slashRobin Haberkorn3-22/+27
2025-04-27DOS: clear screen on exitRobin Haberkorn1-1/+1
It would be better to restore the previous screen contents, but that's probably not trivial to implement.
2025-04-27the magic struct fields are omitted now unless DEBUG1 is definedRobin Haberkorn4-36/+48
* The magic field is now always called __magic. * Saves some memory, which is important especially on MS-DOS.
2025-04-27implemented EC for non-UNIX almost pure standard C compilersRobin Haberkorn3-17/+128
In particular, this will work on MS-DOS, albeit inefficiently. You also cannot generically redirect stderr on COMMAND.COM.
2025-04-26unsigned long is the base type for buffer positions nowRobin Haberkorn8-392/+402
* This allows handling files >64kb even on 16-bit DOS. * A few flags fields could be squashed into bitfields. * The buffer overview (0EB) has been adapted for DOS. We can only show the total amount of allocated memory (as by tecmem.c) for the time being. Unfortunately, we don't have a total amount of available memory since _memavl() is for small data models and the sbrk() apparently doesn't grow.
2025-04-25DOS: Eliminate unused codeRobin Haberkorn1-2/+2
This reduces the binary size by a few kilobytes.
2025-04-25the maximum filename length is now determined by standard C's FILENAME_MAXRobin Haberkorn1-5/+5
This will save a lot of stack space and sometimes heap space on DOS.
2025-04-24enabled LFN supportRobin Haberkorn1-1/+1
I tested it on FreeDOS with DOSLFN.COM. Should also work on Win9x, so the DOS port works a Windows editor as well.
2025-04-23added .gitignore fileRobin Haberkorn1-0/+32
2025-04-23DOS: the ini file is called TECO.INI and is located in the binary's directoryRobin Haberkorn1-7/+19
You can also `set VTECO=...` to the directory of TECO.INI (usually the installation directory). This is helpful if the location of the binary's directory is unreliable.
2025-04-23DOS: revised builtin termcap definitions and enable NANSI.SYS extensions ↵Robin Haberkorn1-11/+38
dynamically * The clrtobot capability (cd) is only used after goto(1,1), so it's safe to clear the entire screen. * Consistently use ESC[0m to disable attributes. AFAIK, it's not possible to disable individual attributes only. * al, AL, dl, DL, ic and dc are actually available, but only under NANSI.SYS. We now detect recent versions of NANSI.SYS dynamically and enable these extensions, which will speed up screen scrolling. * Scrolling is now fixed under Dosbox. Obviously they don't support the NANSI.SYS extensions. * You can still define %TERMCAP% even on DOS to load a customized termcap definitions file.
2025-04-23updated Makefile.wcc: it assumes that $WATCOM has been set and the compilers ↵Robin Haberkorn1-7/+20
are in $PATH * has been tested both hosted on Linux and DOS with OpenWatcom v1.9. * more aggressively optimize for executable size
2025-04-23DOS: implemented console size detectionRobin Haberkorn3-1/+41
This is done via 10h interrupts and special memory regions. The alternative would have been to use set the cursor to 9999,9999 and query the cursor position via ANSI escape sequences.
2025-04-23DOS: Enter inserts LFRobin Haberkorn1-1/+1
Linefeeds are normalized to LF in the buffer.
2025-04-23MS-DOS real-mode (8086) portRobin Haberkorn8-33/+254
It can be cross-compiled or compiled natively on 32-bit DOS with OpenWatcom C v1.9. Compiling on an 8086 might be possible later on - but we would have to add support for some ancient ANSI C compiler.
2025-04-21properly initialize all allocated structuresRobin Haberkorn4-55/+9
* Fixes access to uninitialized field in cmd_token, as found via Valgrind. * Possibly other structures also aren't fully initialized, so I memset() them as well.
2025-04-21silence some warnings when compiling under FreeBSD (and probably Linux)Robin Haberkorn7-32/+32
Also avoid old-school function declarations without parameters (`void foo();`). This is unnecessarily loosing type safety.
2011-07-19extensive EC command documentation (doxygen)Robin Haberkorn1-1/+21
2011-07-18add some comments to EC command and clean up filedescriptors after fork()Robin Haberkorn1-14/+21
2011-07-18fixed colon-modifier and single-argument ranges for EC commandRobin Haberkorn2-3/+75
2011-07-18fixed EC command: care about DOT changeRobin Haberkorn1-18/+55
* undo token for DOT change, necessary if DOT was in EC argument range * use read/buff_insert loop to insert new text so we don't have to tweak DOT to be able to use buff_readfd and can do pipe-specific stuff
2011-07-18revised EC commandRobin Haberkorn4-99/+135
unidirectional pipe with no arguments. with one/two arguments, the buffer content is piped into the process and replaced with its output. * fixed error handling, now the child's exit status matters if everything else is OK, as well * colon modifier has standard behaviour of returning the command status
2011-07-18remove NULL macro definition: may be platform dependantRobin Haberkorn1-1/+0
2011-07-17compute BITS_PER_INT automatically based on BITS_PER_CHARRobin Haberkorn1-5/+6
this is possible since BITS_PER_INT is not used in any preprocessor expression
2011-07-17disable .OLD backup file creation by defaultRobin Haberkorn1-1/+3
* should be configurable using ./configure (disabled by default)
2011-07-17documented FT command (in Doxygen at least): the FT command performs various ↵Robin Haberkorn1-12/+59
etags/ctags functions
2011-07-15fixed pointer formatting on systems where sizeof(int) != sizeof(void*)Robin Haberkorn4-88/+51
this avoids most of the remaining compiler warnings