readme.1st
1 TECO-C (version number 146)
2
3 Copyright 1983, 1990 by Pete Siemsen. This software is provided to
4you free of charge for your own use. Use it as you see fit; if it doesn't
5work, I disclaim all responsibility. You may re-distribute this software
6UNCHANGED only if you include this copy-right notice. Alternatively, if
7you change this software, you may re-distribute the result only if you
8include BOTH this copyright notice, AND an additional notice identifying
9you and indicating that you have changed the software.
10
11 This program is still under development. See file PROBLEMS.TXT for
12notes I've written to myself about things to do to the program. If you
13modify this code to enhance it or fix a bug, please communicate the changes
14to me. My address is
15
16 Pete Siemsen
17 645 Ohio Avenue #302
18 Long Beach, Ca. 90814
19
20 (213) 433-3059 (home)
21 (213) 740-7391 (work)
22 Internet: siemsen@usc.edu
23
24[NOTE -- This is old information. Better to contact me, Tom Almy, below.]
25
26*******************************************************
27
28This archive contains TECO-C modified and compiled for DOS, Win32,
29OS/2, and Linux (on Intel 32bit architecture). The modifications have been made by:
30
31 Tom Almy
32 tomalmy@aracnet.com
33
34who is a "old time" TECO user. Not only did I port TECO-C but I also
35corrected some bugs. For OS/2 modified the file backup algorithm to do
36copying rather than renaming as an option. This makes it Workplace
37Shell friendly. The Win32, Linux and OS/2 versions allow long file names.
38
39Included files in this archive:
40
41readme.1st This file
42readme.txt Quick operating instructions for the TECO literate
43readme.lnx Operating and install instructions for Linux users
44wchart.txt List of all the implemented commands.
45teco.doc The official teco reference. TECOC IS CLOSE TO TECO-11 IN FUNCTIONALITY
46*.tes TECO command files for various things
47*.tec Compressed TECO command files
48
49These apply to OS/2, DOS, and Windows versions:
50inspect.cmd Command files to invoke tecoc
51inspect.bat (cmd for OS/2, bat for DOS/Win32)
52mung.cmd
53mung.bat
54teco.cmd
55teco.bat
56tmake.cmd this would be "make" but most people use the program
57 "make".
58tmake.bat
59tecocmd.btm Equivalent aliases for JPSoft products (4DOS, et cetera)
60
61
62
63The executable program is downloaded as a separate file.
64
readme.lnx
1Running TECOC on Linux
2
3Tecoc takes a first argument of mung, teco, or make to control its
4operating mode. In this Linux version, the name of the executable is
5tested to provide this first argument. Typically soft links are used
6to the tecoc executable, however aliases could be used instead. The
7mapping is:
8
9Make is tecoc make (note uppercase first letter)
10teco is tecoc teco
11mung is tecoc mung
12inspect is tecoc teco -inspect
13
14The provided TAR file has these four soft links defined. Extract the
15TAR file into a directory in your path, typically /usr/local/bin,
16after making sure none of the command names already exist for other
17applications. Necessary environment variables and files are described below.
18
19Several option switches are allowed on the TECO command line:
20
21 -in[spect] -- Read file only, don't create an output file.
22 -noc[reate] -- If file doesn't exist, don't create it.
23 -noi[ni] -- Don't execute INI file. (valid for MAKE or MUNG as well)
24 -nom[emory] -- don't save filename as "last edited file" (valid for
25 MAKE also)
26 -nop[age] -- Formfeeds don't stop file reads (valid for MAKE also)
27 -nor[ename] -- Don't rename files, but copy them to keep references correct
28 (OS/2 only)
29 +nnn -- sets NOPAGE and positions dot to line nnn.
30
31The part of the switch name in the square brackets is optional. For
32instance "-in" is the same as "-inspect".
33
34MAKE filespec
35
36 starts tecoc to create file filespec. Does equivalent of EWfilespec$$
37
38TECO filespec
39
40 starts tecoc to edit file filespec. Does equivalent of
41 EBfilespec$Y$
42
43TECO filespec2=filespec1
44
45 starts tecoc to edit filespec1, writing to filespec2. Does
46 equivalent of ERfilespec1$EWfilespec2$Y$$
47
48TECO
49
50 starts tecoc to edit last edited file. Filename is saved in file
51 named teco*.tmp in the current directory, unless overriden
52 (described below).
53
54MUNG filespec <args>
55
56 starts tecoc to execute filespec. Equivalent to
57 I<args>$JEIfilespec$$
58
59 You can use "TECO @filespec <args>" instead of MUNG.
60
61**************
62Key Bindings
63
64The keys mentioned in the teco.doc file are somewhat confusing.
65This should help:
66
67<DELIM> The "Esc" key, "Esc" echoes as "$", however the
68 teco.doc file shows it as '`'.
69<BS> Type as Control-h, this isn't the "Backspace" key.
70<DELETE> The "Backspace" key. This isn't the "Delete" key.
71<CR> The "Enter" key.
72<LF> Type as Control-j.
73
74Note that the assignments for <BS> and <DELETE> shown here are
75swapped. <BS> can be "Backspace" and <DELETE> can be control-h by
76clearing ET&2048, e.g. 2048,0ET
77
78
79**************
80
81The Initialization File.
82
83Tecoc mungs (executes as teco commands) the file TECO.INI in the
84current directory before processing the command line. Initialization
85can be done instead by defining a TEC_INIT environment variable. The
86value is either the list of teco commands to execute or a "$" followed
87by the pathname of the file containing the initialization file. This
88allows a single, centrally located initialization file. REMEMBER that
89the "$" must be escaped, i.e. "\$"
90
91The initialization file can be used to make initial settings. It can
92return a value, but the value setting is somewhat obscure.
93
94Example (csh):
95setenv TEC_INIT 1es
96
97Example (bash):
98TEC_INIT=1es
99export TEC_INIT
100
101will cause successful searches to auto-display in all teco sessions.
102
103**************
104
105Changing the location of the memory file.
106
107Define the environment variable TEC_MEMORY to be "$" followed by the
108pathname of the file designated the memory file.
109
110Example (csh):
111setenv TEC_MEMORY ~/teco.mem
112setenv TEC_MEMORY \$$TEC_MEMORY
113Example (bash):
114TEC_MEMORY = ~/teco.mem
115TEC_MEMORY = \$$TEC_MEMORY
116export TEC_MEMORY
117
118will cause the name of the last edit file to be stored in the file
119teco.mem in the home directory. By default the file name is tecoN.tmp in
120the current directory, where "N" is the process ID of the parent process to
121teco.
122
123
124**************
125
126The Libary directory
127
128Defining the environment variable TEC_LIBRARY to be a directory path
129(including the final "/") will allow the EI command to fetch
130teco commands from this directory if the file is not found in the
131current directory.
132
133Example (csh):
134setenv TEC_LIBRARY=\$/usr/local/lib/
135
136will cause the directory /usr/local/lib to be searched for teco command files.
137
138
139**************
140
141Implemented flags:
142
143ED&1 Allow carat "^" character in string searches
144ED&2 Allow yank and _ unconditionally
145ED&16 Failed searches preserve dot
146ED&64 Move dot by one after each match in multiple occurance searches
147
148ET&1 Type out in image mode
149ET&2 Use scope for delete and control-U (default=1)
150ET&4 Accept lowercase input (default=1)
151ET&8 ^T reads without echo
152ET&32 ^T reads with no wait
153ET&128 MUNG mode (abort on error) cleared by "*" prompt
154ET&2048 Swap backspace and delete
155ET&4096 We are using 8 bit characters (default=1)
156ET&32768 Trap control-C
157
158EZ&1 Mark Henderson, who did much of the Unix port, likes the way
159 VAX/VMS keeps versions of files. VMS appends a semicolon followed
160 by a version number to files, and has the PURGE command to clean
161 out old versions of files. If this bit is off, TECO-C will handle
162 file version numbers, appending the appropriate version number to
163 file names. Mark supplied a "purge" program (distributed with TECO-C)
164 for users of this feature. Setting this flag turns off the feature,
165 to make TECO-C function as expected by the average Unix user. This
166 flag is set by default.
167EZ&128 Don't stop read on formfeeds
168EZ&256 If set, don't do newline translation on file read/write -- binary mode.
169 TECO is based on separate carriage return (CR) and line feed (LF)
170 line termination. Normally on file input newline (line feed)
171 characters are converted to CRLF pairs unless preceded
172 by a CR -- this allows reading DOS format files. On output CRLF pairs
173 are converted back to new line characters. Set this bit before starting
174 to edit a binary file, or when editing a DOS file for which no format
175 conversion is desired (ie file is saved back in DOS format).
176EZ&8192 This bit is set by default, but has no significance in this release.
177EZ&16384 Normally the backup file name is created by replacing the file extension
178 with "bak" -- foo.c becomes foo.bak, however if this bit is set then
179 the backup file name is created by simply adding ".bak" to the name -- foo.c
180 becomes foo.c.bak. This choice is overridden by EZ&1 = 0.
181
182