This commit was generated by cvs2svn to compensate for changes in r10452,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
6c29f08e5a
22
usr.bin/ee/Makefile
Normal file
22
usr.bin/ee/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
CFLAGS+= -DCAP -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \
|
||||
-DHAS_CTYPE -DHAS_SYS_IOCTL -DHAS_SYS_WAIT -DSLCT_HDR
|
||||
|
||||
PROG= ee
|
||||
SRCS= ee.c
|
||||
LINKS= ${BINDIR}/ee ${BINDIR}/ree
|
||||
DPADD= ee.cat ${LIBNCURSES} ${LIBMYTINFO}
|
||||
LDADD= -lncurses -lmytinfo
|
||||
CLEANFILES+= ee.cat
|
||||
|
||||
# I'm not sure if this is kosher, but I don't see any system default just
|
||||
# now.
|
||||
LANG?= en_US.ISO_8859-1
|
||||
|
||||
ee.cat: ${.CURDIR}/ee.msg
|
||||
gencat -new ee.cat ${.CURDIR}/ee.msg
|
||||
|
||||
afterinstall: ee.cat
|
||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ee.cat \
|
||||
${DESTDIR}/usr/share/nls/${LANG}/ee.cat
|
||||
|
||||
.include <bsd.prog.mk>
|
116
usr.bin/ee/README
Normal file
116
usr.bin/ee/README
Normal file
@ -0,0 +1,116 @@
|
||||
THIS MATERIAL IS PROVIDED "AS IS". THERE ARE NO WARRANTIES OF
|
||||
ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. Neither Hewlett-Packard nor
|
||||
Hugh Mahon shall be liable for errors contained herein, nor for
|
||||
incidental or consequential damages in connection with the
|
||||
furnishing, performance or use of this material. Neither
|
||||
Hewlett-Packard nor Hugh Mahon assumes any responsibility for
|
||||
the use or reliability of this software or documentation. This
|
||||
software and documentation is totally UNSUPPORTED. There is no
|
||||
support contract available. Hewlett-Packard has done NO
|
||||
Quality Assurance on ANY of the program or documentation. You
|
||||
may find the quality of the materials inferior to supported
|
||||
materials.
|
||||
|
||||
This software may be distributed under the terms of Larry Wall's
|
||||
Artistic license, a copy of which is included in this distribution.
|
||||
(see doc/Artistic).
|
||||
|
||||
This notice must be included with this software and any
|
||||
derivatives.
|
||||
|
||||
Any modifications to this software by anyone but the original author
|
||||
must be so noted.
|
||||
|
||||
|
||||
The editor 'ee' (easy editor) is intended to be a simple, easy to use
|
||||
terminal-based screen oriented editor that requires no instruction to
|
||||
use. Its primary use would be for people who are new to computers, or who
|
||||
use computers only for things like e-mail.
|
||||
|
||||
ee's simplified interface is highlighted by the use of pop-up menus which
|
||||
make it possible for users to carry out tasks without the need to
|
||||
remember commands. An information window at the top of the screen shows
|
||||
the user the operations available with control-keys.
|
||||
|
||||
ee allows users to use full eight-bit characters. If the host system has
|
||||
the capabilities, ee can use message catalogs, which would allow users to
|
||||
translate the message catalog into other languages which use eight-bit
|
||||
characters. See the file ee.i18n.guide for more details.
|
||||
|
||||
ee relies on the virtual memory abilities of the platform it is running on
|
||||
and does not have its own memory management capabilities.
|
||||
|
||||
I am releasing ee because I hate to see new users and non-computer types
|
||||
get frustrated by vi, and would like to see more intuitive interfaces for
|
||||
basic tools (both character-based and graphical) become more pervasive.
|
||||
Terminal capabilities and communication speeds have evolved considerably
|
||||
since the time in which vi's interface was created, allowing much more
|
||||
intuitive interfaces to be used. Since character-based I/O won't be
|
||||
completely replaced by graphical user interfaces for at least a few more
|
||||
years, I'd like to do what I can to make using computers with less
|
||||
glamorous interfaces as easy to use as possible. If terminal interfaces
|
||||
are still used in ten years, I hope neophytes won't still be stuck with
|
||||
only vi.
|
||||
|
||||
For a text editor to be easy to use requires a certain set of abilities. In
|
||||
order for ee to work, a terminal must have the ability to position the cursor
|
||||
on the screen, and should have arrow keys that send unique sequences
|
||||
(multiple characters, the first character is an "escape", octal code
|
||||
'\033'). All of this information needs to be in a database called "terminfo"
|
||||
(System V implementations) or "termcap" (usually used for BSD systems). In
|
||||
case the arrow keys do not transmit unique sequences, motion operations are
|
||||
mapped to control keys as well, but this at least partially defeats the
|
||||
purpose. The curses package is used to handle the I/O which deals with the
|
||||
terminal's capabilities.
|
||||
|
||||
While ee is based on curses, I have included here the source code to
|
||||
new_curse, a subset of curses developed for use with ee. 'curses' often
|
||||
will have a defect that reduces the usefulness of the editor relying upon
|
||||
it. This is unused by the FreeBSD version of ee (the existing ncurses
|
||||
library works just fine) but is included in the doc subdirectory for
|
||||
reference purposes should anyone wish to port ee to a platform for
|
||||
which the existing curses libraries are insufficient.
|
||||
|
||||
The files doc/new_curse.[ch] contain a subset of the 'curses' library
|
||||
used by applications to handle screen output. Unfortunately, curses
|
||||
varies from system to system, so I developed new_curse to provide
|
||||
consistent behavior across systems. It works on both SystemV and BSD
|
||||
systems, and while it can sometimes be slower than other curses packages,
|
||||
it will get the information on the screen painted correctly more often
|
||||
than vendor supplied curses. Again, FreeBSD does not have this problem
|
||||
but you may find it useful on other platforms.
|
||||
|
||||
If you experience problems with data being displayed improperly, check
|
||||
your terminal configuration, especially if you're using a terminal
|
||||
emulator, and make sure that you are using the right terminfo entry
|
||||
before rummaging through code. Terminfo entries often contain
|
||||
inaccuracies, or incomplete information, or may not totally match the
|
||||
terminal or emulator the terminal information is being used with.
|
||||
Complaints that ee isn't working quite right often end up being something
|
||||
else (like the terminal emulator being used).
|
||||
|
||||
Both ee and new_curse were developed using K&R C (also known as "classic
|
||||
C"), but it can also be compiled with ANSI C. You should be able to
|
||||
build ee by simply typing "make".
|
||||
|
||||
ee is the result of several conflicting design goals. While I know that it
|
||||
solves the problems of some users, I also have no doubt that some will decry
|
||||
its lack of more features. I will settle for knowing that ee does fulfill
|
||||
the needs of a minority (but still large number) of users. The goals of ee
|
||||
are:
|
||||
|
||||
1. To be so easy to use as to require no instruction.
|
||||
2. To be easy to compile and, if necessary, port to new platforms
|
||||
by people with relatively little knowledge of C and UNIX.
|
||||
3. To have a minimum number of files to be dealt with, for compile
|
||||
and installation.
|
||||
4. To have enough functionality to be useful to a large number of
|
||||
people.
|
||||
|
||||
Hugh Mahon |___|
|
||||
h_mahon@fc.hp.com | |
|
||||
|\ /|
|
||||
| \/ |
|
||||
|
117
usr.bin/ee/doc/Artistic
Normal file
117
usr.bin/ee/doc/Artistic
Normal file
@ -0,0 +1,117 @@
|
||||
|
||||
|
||||
|
||||
|
||||
The "Artistic License"
|
||||
|
||||
Preamble
|
||||
|
||||
The intent of this document is to state the conditions under which a
|
||||
Package may be copied, such that the Copyright Holder maintains some
|
||||
semblance of artistic control over the development of the package,
|
||||
while giving the users of the package the right to use and distribute
|
||||
the Package in a more-or-less customary fashion, plus the right to make
|
||||
reasonable modifications.
|
||||
|
||||
Definitions:
|
||||
|
||||
"Package" refers to the collection of files distributed by the
|
||||
Copyright Holder, and derivatives of that collection of files
|
||||
created through textual modification.
|
||||
|
||||
"Standard Version" refers to such a Package if it has not been
|
||||
modified, or has been modified in accordance with the wishes
|
||||
of the Copyright Holder.
|
||||
|
||||
"Copyright Holder" is whoever is named in the copyright or
|
||||
copyrights for the package.
|
||||
|
||||
"You" is you, if you're thinking about copying or distributing
|
||||
this Package.
|
||||
|
||||
"Reasonable copying fee" is whatever you can justify on the
|
||||
basis of media cost, duplication charges, time of people involved,
|
||||
and so on. (You will not be required to justify it to the
|
||||
Copyright Holder, but only to the computing community at large
|
||||
as a market that must bear the fee.)
|
||||
|
||||
"Freely Available" means that no fee is charged for the item
|
||||
itself, though there may be fees involved in handling the item.
|
||||
It also means that recipients of the item may redistribute it
|
||||
under the same conditions they received it.
|
||||
|
||||
1. You may make and give away verbatim copies of the source form of the
|
||||
Standard Version of this Package without restriction, provided that you
|
||||
duplicate all of the original copyright notices and associated disclaimers.
|
||||
|
||||
2. You may apply bug fixes, portability fixes and other modifications
|
||||
derived from the Public Domain or from the Copyright Holder. A Package
|
||||
modified in such a way shall still be considered the Standard Version.
|
||||
|
||||
3. You may otherwise modify your copy of this Package in any way, provided
|
||||
that you insert a prominent notice in each changed file stating how and
|
||||
when you changed that file, and provided that you do at least ONE of the
|
||||
following:
|
||||
|
||||
a) place your modifications in the Public Domain or otherwise make them
|
||||
Freely Available, such as by posting said modifications to Usenet or
|
||||
an equivalent medium, or placing the modifications on a major archive
|
||||
site such as uunet.uu.net, or by allowing the Copyright Holder to include
|
||||
your modifications in the Standard Version of the Package.
|
||||
|
||||
b) use the modified Package only within your corporation or organization.
|
||||
|
||||
c) rename any non-standard executables so the names do not conflict
|
||||
with standard executables, which must also be provided, and provide
|
||||
a separate manual page for each non-standard executable that clearly
|
||||
documents how it differs from the Standard Version.
|
||||
|
||||
d) make other distribution arrangements with the Copyright Holder.
|
||||
|
||||
4. You may distribute the programs of this Package in object code or
|
||||
executable form, provided that you do at least ONE of the following:
|
||||
|
||||
a) distribute a Standard Version of the executables and library files,
|
||||
together with instructions (in the manual page or equivalent) on where
|
||||
to get the Standard Version.
|
||||
|
||||
b) accompany the distribution with the machine-readable source of
|
||||
the Package with your modifications.
|
||||
|
||||
c) accompany any non-standard executables with their corresponding
|
||||
Standard Version executables, giving the non-standard executables
|
||||
non-standard names, and clearly documenting the differences in manual
|
||||
pages (or equivalent), together with instructions on where to get
|
||||
the Standard Version.
|
||||
|
||||
d) make other distribution arrangements with the Copyright Holder.
|
||||
|
||||
5. You may charge a reasonable copying fee for any distribution of this
|
||||
Package. You may charge any fee you choose for support of this Package.
|
||||
You may not charge a fee for this Package itself. However,
|
||||
you may distribute this Package in aggregate with other (possibly
|
||||
commercial) programs as part of a larger (possibly commercial) software
|
||||
distribution provided that you do not advertise this Package as a
|
||||
product of your own.
|
||||
|
||||
6. The scripts and library files supplied as input to or produced as
|
||||
output from the programs of this Package do not automatically fall
|
||||
under the copyright of this Package, but belong to whomever generated
|
||||
them, and may be sold commercially, and may be aggregated with this
|
||||
Package.
|
||||
|
||||
7. C subroutines supplied by you and linked into this Package in order
|
||||
to emulate subroutines and variables of the language defined by this
|
||||
Package shall not be considered part of this Package, but are the
|
||||
equivalent of input as in Paragraph 6, provided these subroutines do
|
||||
not change the language in any way that would cause it to fail the
|
||||
regression tests for the language.
|
||||
|
||||
8. The name of the Copyright Holder may not be used to endorse or promote
|
||||
products derived from this software without specific prior written permission.
|
||||
|
||||
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
The End
|
141
usr.bin/ee/doc/ee.i18n.guide
Normal file
141
usr.bin/ee/doc/ee.i18n.guide
Normal file
@ -0,0 +1,141 @@
|
||||
Easy Editor ("ee") provides the ability to translate the messages displayed to
|
||||
the user and the commands entered. This is done via message catalogs,
|
||||
following X/Open standards. ee only supports eight bit characters.
|
||||
|
||||
(The name ee.i18n.guide is for "ee internationalization guide". The i18n
|
||||
abbreviation is used because there are 18 characters between the first
|
||||
letter ("i") and last ("n") of "internationalization".)
|
||||
|
||||
All of the messages, warnings, information, and commands, are contained in the
|
||||
message catalog. Each numbered entry represents an individual string used by
|
||||
ee. Some strings contain formatting information for formatted print
|
||||
statements, which are of the form "%s", or "%d", these must be preserved in
|
||||
the translation, or the correct information will not be displayed. For those
|
||||
strings containing multiple formatting codes, the order of each item must be
|
||||
preserved as well.
|
||||
|
||||
Message content
|
||||
1 title for modes, or settings menu
|
||||
2 - 8 entries for modes menu, each line should be the same length
|
||||
(padded with spaces)
|
||||
9 - 34 other menu titles and entries
|
||||
35 - 56 help screen
|
||||
57 - 61 actions assigned to control keys
|
||||
62 - 66 commands information
|
||||
67 message displayed when info window turned off
|
||||
68 indication that no file name was entered when invoking ee
|
||||
69 prompt for decimal value of character to be entered
|
||||
70 message displaying the print command being invoked
|
||||
71 prompt for command
|
||||
72 prompt for name of file to be written
|
||||
73 prompt for name of file to be read
|
||||
74 string used to display the decimal value of the character
|
||||
the cursor is on
|
||||
75 string displaying an unrecognized command
|
||||
76 string indicating that the command entered is not a unique
|
||||
substring of a valid command
|
||||
77 string indicating the current line number
|
||||
78 string for displaying the length of the line
|
||||
79 string for displaying the name of the file
|
||||
80 - 83 strings showing how to invoke ee, and its options
|
||||
84 message indicating that the file entered is a directory, not a
|
||||
text file
|
||||
85 message informing that the entered file does not yet exist
|
||||
86 message informing that the file can't be opened (because of
|
||||
permission problems)
|
||||
87 message after file has been read with the file name and number
|
||||
of lines read
|
||||
88 message indicating that the file has been read
|
||||
89 message indicating that the file is being read
|
||||
90 message indicating that permissions only allow the file to be
|
||||
read, not written
|
||||
91 message after file has been read with the file name and number
|
||||
of lines read
|
||||
92 prompt for name of file to be saved (used when no name was
|
||||
entered for a file to edit)
|
||||
93 message indicating that the file was not written, since no
|
||||
name was entered at the prompt
|
||||
94 prompt asking user if changes should not be saved ("yes_char"
|
||||
will be expected for affirmative response)
|
||||
95 "yes" character, single character expected to confirm action
|
||||
(can be upper or lower case, will be converted to upper-case
|
||||
during test)
|
||||
96 prompt
|
||||
97 error message
|
||||
98 message indicating that the named file is being written
|
||||
99 message indicating the name of the file written, the number of
|
||||
lines, and the number of characters (order of items must be
|
||||
maintained)
|
||||
100 search in progress message
|
||||
101 message that the string was not found
|
||||
102 prompt for search
|
||||
103 message that string could not be executed
|
||||
104 self-explanatory
|
||||
105 message for menus, indicating that the Escape character will
|
||||
allow the user to exit the menu
|
||||
106 error message indicating the menu won't fit on the screen
|
||||
107 self-explanatory
|
||||
108 prompt for shell command
|
||||
109 message displayed while formatting a paragraph
|
||||
110 string which places message for spell checking at top of
|
||||
buffer (the portions 'list of unrecognized words' and
|
||||
'-=-=-=-=-=-' may be replaced, but the rest must remain the
|
||||
same)
|
||||
111 message informing that spell checking is in progress
|
||||
112 prompt for right margin
|
||||
113 error informing user that operation is not permitted in ree
|
||||
114 string indicating mode is turned 'on' in modes menu
|
||||
115 string indicating mode is turned 'off' in modes menu
|
||||
116 - 131 strings used for commands (some also used for initialization)
|
||||
132 - 144 strings used for initialization
|
||||
145 entry for settings menu for emacs key bindings settings
|
||||
146 - 153 help screen entries for emacs key bindings info
|
||||
154 - 158 info window entries for emacs key bindings info
|
||||
159 string for turning on emacs key bindings in the init file
|
||||
160 string for turning off emacs key bindings in the init file
|
||||
|
||||
Care should be taken when translating commands and initialization keywords
|
||||
because the algorithm used for detecting uniqueness of entered commands
|
||||
will not be able to distinguish words that are not unique before the end
|
||||
of the shorter word, for example, it would not be able to distinguish the
|
||||
command 'abcd' from 'abcde'.
|
||||
|
||||
After translating the messages, use the 'gencat' command to create the compiled
|
||||
catalog used when running the software. The standard syntax would be:
|
||||
|
||||
gencat ee.cat ee.msg
|
||||
|
||||
Where ee.msg is the file containing the translations, and ee.cat is the
|
||||
compiled catalog. If the file ee.cat does not exist, it will be created.
|
||||
Check the documentation for your system for proper syntax.
|
||||
|
||||
Message catalog placement varies from system to system. A common location
|
||||
for message catalogs is in /usr/lib/nls. In this directory are
|
||||
directories with the names of other languages. The default language is
|
||||
'C'. There is also an environment variable, named NLSPATH used to
|
||||
determine where message catalogs can be found. This variable is similar
|
||||
to the PATH variable used for commands, but with some differences. The
|
||||
NLSPATH variable must have the ability to handle different names for
|
||||
languages and the catalog files, so it has field descriptors for these. A
|
||||
typical setting for NLSPATH could be:
|
||||
|
||||
NLSPATH=/usr/lib/nls/%L/%N.cat:/usr/local/lib/nls/%L/%N.cat
|
||||
|
||||
Where "%L" is the field descriptor for the language (obtained from the
|
||||
LANG environment variable) and "%N" is the name of the file (with the
|
||||
".cat" appended by the path variable, it is not passed from the requesting
|
||||
program). The colon (:) is used to separate paths, so in the above
|
||||
example there are two paths possible for message catalogs. You may wish
|
||||
to maintain catalogs for applications that are not supported by your
|
||||
system vendor in a location unique for you, and this is facilitated by the
|
||||
NLSPATH variable. Remember to set and export both the LANG and NLSPATH
|
||||
variables for each user that expects to use localization either in a
|
||||
system-wide profile or in each user's profile. See your system
|
||||
documentation for more information.
|
||||
|
||||
The message catalog supplied with ee also uses the '$quote' directive to
|
||||
specify a quote around strings to ensure proper padding. This directive
|
||||
may not be supported on all systems, and lead to quotes being included in
|
||||
the string used in ee, which will cause incorrect behavior. If the
|
||||
'$quote' directive is not supported by your system's gencat command, edit
|
||||
the msg file to remove the leading and trailing quotation marks.
|
3574
usr.bin/ee/doc/new_curse.c
Normal file
3574
usr.bin/ee/doc/new_curse.c
Normal file
File diff suppressed because it is too large
Load Diff
255
usr.bin/ee/doc/new_curse.h
Normal file
255
usr.bin/ee/doc/new_curse.h
Normal file
@ -0,0 +1,255 @@
|
||||
/*
|
||||
| new_curse.h
|
||||
|
|
||||
| A subset of curses developed for use with ae.
|
||||
|
|
||||
| written by Hugh Mahon
|
||||
|
|
||||
| THIS MATERIAL IS PROVIDED "AS IS". THERE ARE
|
||||
| NO WARRANTIES OF ANY KIND WITH REGARD TO THIS
|
||||
| MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
| IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. Neither
|
||||
| Hewlett-Packard nor Hugh Mahon shall be liable
|
||||
| for errors contained herein, nor for
|
||||
| incidental or consequential damages in
|
||||
| connection with the furnishing, performance or
|
||||
| use of this material. Neither Hewlett-Packard
|
||||
| nor Hugh Mahon assumes any responsibility for
|
||||
| the use or reliability of this software or
|
||||
| documentation. This software and
|
||||
| documentation is totally UNSUPPORTED. There
|
||||
| is no support contract available. Hewlett-
|
||||
| Packard has done NO Quality Assurance on ANY
|
||||
| of the program or documentation. You may find
|
||||
| the quality of the materials inferior to
|
||||
| supported materials.
|
||||
|
|
||||
| This software is not a product of Hewlett-Packard, Co., or any
|
||||
| other company. No support is implied or offered with this software.
|
||||
| You've got the source, and you're on your own.
|
||||
|
|
||||
| This software may be distributed under the terms of Larry Wall's
|
||||
| Artistic license, a copy of which is included in this distribution.
|
||||
|
|
||||
| This notice must be included with this software and any derivatives.
|
||||
|
|
||||
| Copyright (c) 1986, 1987, 1988, 1991, 1995 Hugh Mahon
|
||||
| All are rights reserved.
|
||||
|
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef SYS5
|
||||
#include <termio.h>
|
||||
#else
|
||||
#include <sgtty.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#define KEY_BREAK 0401
|
||||
#define KEY_DOWN 0402
|
||||
#define KEY_UP 0403
|
||||
#define KEY_LEFT 0404
|
||||
#define KEY_RIGHT 0405
|
||||
#define KEY_HOME 0406
|
||||
#define KEY_BACKSPACE 0407
|
||||
#define KEY_F0 0410
|
||||
#define KEY_F(n) (KEY_F0+(n))
|
||||
#define KEY_DL 0510
|
||||
#define KEY_IL 0511
|
||||
#define KEY_DC 0512
|
||||
#define KEY_IC 0513
|
||||
#define KEY_EIC 0514
|
||||
#define KEY_CLEAR 0515
|
||||
#define KEY_EOS 0516
|
||||
#define KEY_EOL 0517
|
||||
#define KEY_SF 0520
|
||||
#define KEY_SR 0521
|
||||
#define KEY_NPAGE 0522
|
||||
#define KEY_PPAGE 0523
|
||||
#define KEY_STAB 0524
|
||||
#define KEY_CTAB 0525
|
||||
#define KEY_CATAB 0526
|
||||
#define KEY_ENTER 0527
|
||||
#define KEY_SRESET 0530
|
||||
#define KEY_RESET 0531
|
||||
#define KEY_PRINT 0532
|
||||
#define KEY_LL 0533
|
||||
#define KEY_A1 0534
|
||||
#define KEY_A3 0535
|
||||
#define KEY_B2 0536
|
||||
#define KEY_C1 0537
|
||||
#define KEY_C3 0540
|
||||
#define KEY_BTAB 0541
|
||||
#define KEY_BEG 0542
|
||||
#define KEY_CANCEL 0543
|
||||
#define KEY_CLOSE 0544
|
||||
#define KEY_COMMAND 0545
|
||||
#define KEY_COPY 0546
|
||||
#define KEY_CREATE 0547
|
||||
#define KEY_END 0550
|
||||
#define KEY_EXIT 0551
|
||||
#define KEY_FIND 0552
|
||||
#define KEY_HELP 0553
|
||||
#define KEY_MARK 0554
|
||||
#define KEY_MESSAGE 0555
|
||||
#define KEY_MOVE 0556
|
||||
#define KEY_NEXT 0557
|
||||
#define KEY_OPEN 0560
|
||||
#define KEY_OPTIONS 0561
|
||||
#define KEY_PREVIOUS 0562
|
||||
#define KEY_REDO 0563
|
||||
#define KEY_REFERENCE 0564
|
||||
#define KEY_REFRESH 0565
|
||||
#define KEY_REPLACE 0566
|
||||
#define KEY_RESTART 0567
|
||||
#define KEY_RESUME 0570
|
||||
#define KEY_SAVE 0571
|
||||
#define KEY_SBEG 0572
|
||||
#define KEY_SCANCEL 0573
|
||||
#define KEY_SCOMMAND 0574
|
||||
#define KEY_SCOPY 0575
|
||||
#define KEY_SCREATE 0576
|
||||
#define KEY_SDC 0577
|
||||
#define KEY_SDL 0600
|
||||
#define KEY_SELECT 0601
|
||||
#define KEY_SEND 0602
|
||||
#define KEY_SEOL 0603
|
||||
#define KEY_SEXIT 0604
|
||||
#define KEY_SFIND 0605
|
||||
#define KEY_SHELP 0606
|
||||
#define KEY_SHOME 0607
|
||||
#define KEY_SIC 0610
|
||||
#define KEY_SLEFT 0611
|
||||
#define KEY_SMESSAGE 0612
|
||||
#define KEY_SMOVE 0613
|
||||
#define KEY_SNEXT 0614
|
||||
#define KEY_SOPTIONS 0615
|
||||
#define KEY_SPREVIOUS 0616
|
||||
#define KEY_SPRINT 0617
|
||||
#define KEY_SREDO 0620
|
||||
#define KEY_SREPLACE 0621
|
||||
#define KEY_SRIGHT 0622
|
||||
#define KEY_SRSUME 0623
|
||||
#define KEY_SSAVE 0624
|
||||
#define KEY_SSUSPEND 0625
|
||||
#define KEY_SUNDO 0626
|
||||
#define KEY_SUSPEND 0627
|
||||
#define KEY_UNDO 0630
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define A_STANDOUT 0001 /* standout mode */
|
||||
#define SCROLL 1 /* text has been scrolled */
|
||||
#define CLEAR 2 /* window has been cleared */
|
||||
#define CHANGE 3 /* window has been changed */
|
||||
#define UP 1 /* direction of scroll */
|
||||
#define DOWN 2
|
||||
|
||||
struct _line {
|
||||
struct _line *next_screen;
|
||||
struct _line *prev_screen;
|
||||
char *row;
|
||||
char *attributes;
|
||||
int last_char;
|
||||
int changed;
|
||||
int scroll;
|
||||
int number;
|
||||
};
|
||||
|
||||
struct _line *top_of_win;
|
||||
|
||||
typedef struct WIND {
|
||||
int SR; /* starting row */
|
||||
int SC; /* starting column */
|
||||
int LC; /* last column */
|
||||
int LX; /* last cursor column position */
|
||||
int LY; /* last cursor row position */
|
||||
int Attrib; /* attributes active in window */
|
||||
int Num_lines; /* number of lines */
|
||||
int Num_cols; /* number of columns */
|
||||
int scroll_up; /* number of lines moved */
|
||||
int scroll_down;
|
||||
int SCROLL_CLEAR; /* indicates that window has been scrolled or cleared */
|
||||
struct _line *first_line;
|
||||
} WINDOW;
|
||||
|
||||
extern WINDOW *curscr;
|
||||
extern WINDOW *stdscr;
|
||||
|
||||
extern int LINES, COLS;
|
||||
|
||||
#if __STDC__ || defined(__cplusplus)
|
||||
#define P_(s) s
|
||||
#else
|
||||
#define P_(s) ()
|
||||
#endif
|
||||
|
||||
extern void copy_window P_((WINDOW *origin, WINDOW *destination));
|
||||
extern void reinitscr P_((int));
|
||||
extern void initscr P_((void));
|
||||
extern int Get_int P_((void));
|
||||
extern int INFO_PARSE P_((void));
|
||||
extern int AtoI P_((void));
|
||||
extern void Key_Get P_((void));
|
||||
extern struct _line *Screenalloc P_((int columns));
|
||||
extern WINDOW *newwin P_((int lines, int cols, int start_l, int start_c));
|
||||
extern int Operation P_((int Temp_Stack[], int place));
|
||||
extern void Info_Out P_((char *string, int p_list[], int place));
|
||||
extern void wmove P_((WINDOW *window, int row, int column));
|
||||
extern void clear_line P_((struct _line *line, int column, int cols));
|
||||
extern void werase P_((WINDOW *window));
|
||||
extern void wclrtoeol P_((WINDOW *window));
|
||||
extern void wrefresh P_((WINDOW *window));
|
||||
extern void touchwin P_((WINDOW *window));
|
||||
extern void wnoutrefresh P_((WINDOW *window));
|
||||
extern void flushinp P_((void));
|
||||
extern void ungetch P_((int c));
|
||||
extern int wgetch P_((WINDOW *window));
|
||||
extern void Clear P_((int));
|
||||
extern int Get_key P_((int first_char));
|
||||
extern void waddch P_((WINDOW *window, int c));
|
||||
extern void winsertln P_((WINDOW *window));
|
||||
extern void wdeleteln P_((WINDOW *window));
|
||||
extern void wclrtobot P_((WINDOW *window));
|
||||
extern void wstandout P_((WINDOW *window));
|
||||
extern void wstandend P_((WINDOW *window));
|
||||
extern void waddstr P_((WINDOW *window, char *string));
|
||||
extern void clearok P_((WINDOW *window, int flag));
|
||||
extern void echo P_((void));
|
||||
extern void noecho P_((void));
|
||||
extern void raw P_((void));
|
||||
extern void noraw P_((void));
|
||||
extern void nl P_((void));
|
||||
extern void nonl P_((void));
|
||||
extern void saveterm P_((void));
|
||||
extern void fixterm P_((void));
|
||||
extern void resetterm P_((void));
|
||||
extern void nodelay P_((WINDOW *window, int flag));
|
||||
extern void idlok P_((WINDOW *window, int flag));
|
||||
extern void keypad P_((WINDOW *window, int flag));
|
||||
extern void savetty P_((void));
|
||||
extern void resetty P_((void));
|
||||
extern void endwin P_((void));
|
||||
extern void delwin P_((WINDOW *window));
|
||||
extern void wprintw P_((WINDOW *window, __const char* format, ...));
|
||||
extern void iout P_((WINDOW *window, int value));
|
||||
extern int Comp_line P_((struct _line *line1, struct _line *line2));
|
||||
extern struct _line *Insert_line P_((int row, int end_row, WINDOW *window));
|
||||
extern struct _line *Delete_line P_((int row, int end_row, WINDOW *window));
|
||||
extern void CLEAR_TO_EOL P_((WINDOW *window, int row, int column));
|
||||
extern int check_delete P_((WINDOW *window, int line, int offset, struct _line *pointer_new, struct _line *pointer_old));
|
||||
extern int check_insert P_((WINDOW *window, int line, int offset, struct _line *pointer_new, struct _line *pointer_old));
|
||||
extern void doupdate P_((void));
|
||||
extern void Position P_((WINDOW *window, int row, int col));
|
||||
extern void Char_del P_((char *line, char *attrib, int offset, int maxlen));
|
||||
extern void Char_ins P_((char *line, char *attrib, int newc, int newatt, int offset, int maxlen));
|
||||
extern void attribute_on P_((void));
|
||||
extern void attribute_off P_((void));
|
||||
extern void Char_out P_((int newc, int newatt, char *line, char *attrib, int offset));
|
||||
|
||||
#undef P_
|
||||
|
508
usr.bin/ee/ee.1
Normal file
508
usr.bin/ee/ee.1
Normal file
@ -0,0 +1,508 @@
|
||||
.\"
|
||||
.\"
|
||||
.\" To format this reference page, use the command:
|
||||
.\"
|
||||
.\" nroff -man ee.1
|
||||
.\"
|
||||
.\" $Header: /users/hugh/tmp/old_ae/ee.1,v 1.16 1993/06/22 04:18:33 hugh Exp $
|
||||
.\"
|
||||
.\"
|
||||
.TH ee 1 "" "" "" ""
|
||||
.SH NAME
|
||||
ee \- easy editor
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
ee [-e] [-i] [-h] [+#] [\fIfile\fR ...]
|
||||
ree [-e] [-i] [-h] [+#] [\fIfile\fR ...]
|
||||
.ta
|
||||
.fi
|
||||
.ad b
|
||||
.SH DESCRIPTION
|
||||
The command
|
||||
.I ee
|
||||
is a simple screen oriented text editor. It is always in text insertion
|
||||
mode unless there is a prompt at the bottom of the terminal, or a
|
||||
menu present (in a box in the middle of the terminal). The command
|
||||
.I ree
|
||||
is the same as
|
||||
.I ee,
|
||||
but restricted to editing the named
|
||||
file (no file operations, or shell escapes are allowed).
|
||||
.PP
|
||||
For
|
||||
.I ee
|
||||
to work properly, the environment variable
|
||||
.SM TERM
|
||||
must be set to indicate the type of terminal being used. For
|
||||
example, for an
|
||||
.SM HP 700/92
|
||||
terminal, the
|
||||
.SM TERM
|
||||
variable should be set to "70092". See your System Administrator if
|
||||
you need more information.
|
||||
.\"
|
||||
.\" options
|
||||
.\"
|
||||
.SS Options
|
||||
The following options are available from the command line:
|
||||
.PP
|
||||
.TP 4
|
||||
.B -e
|
||||
Turns off expansion of tab character to spaces.
|
||||
.TP
|
||||
.B -i
|
||||
Turns off display of information window at top of terminal.
|
||||
.TP
|
||||
.B -h
|
||||
Turns off highlighting of borders of windows and menus (improves
|
||||
performance on some terminals).
|
||||
.TP
|
||||
.B +#
|
||||
Moves the cursor to line '#' at startup.
|
||||
.br
|
||||
.\"
|
||||
.\" control keys
|
||||
.\"
|
||||
.SS "Control keys"
|
||||
To do anything other than insert text, the user must use the control
|
||||
keys (the
|
||||
.B Control
|
||||
key, represented by a "^", pressed in conjunction with an
|
||||
alphabetic key, e.g., ^a) and function keys available on the keyboard
|
||||
(such as
|
||||
.BR "Next Page" ", " "Prev Page" ,
|
||||
arrow keys, etc.).
|
||||
.PP
|
||||
Since not all terminals have function keys,
|
||||
.I ee
|
||||
has the basic cursor movement functions assigned to control keys as
|
||||
well as more intuitive keys on the keyboard when available. For
|
||||
instance, to move the cursor up, the user can use the up arrow key,
|
||||
or
|
||||
.BR ^u .
|
||||
.RS 4
|
||||
.nf
|
||||
.ta 1.4i
|
||||
.sp
|
||||
^a Prompt for the decimal value of a character to insert.
|
||||
^b Move to the bottom of the text.
|
||||
^c Get the prompt for a command.
|
||||
^d Move the cursor down.
|
||||
^e Prompt for the string to search for.
|
||||
^f Undelete the last deleted character.
|
||||
^g Move to the beginning of the line.
|
||||
^h Backspace.
|
||||
^i Tab.
|
||||
^j Insert a newline.
|
||||
^k Delete the character the cursor is sitting on.
|
||||
^l Move the cursor left.
|
||||
^m Insert a newline.
|
||||
^n Move to the next page.
|
||||
^o Move to the end of the line.
|
||||
^p Move to the previous page.
|
||||
^r Move the cursor to the right.
|
||||
^t Move to the top of the text.
|
||||
^u Move the cursor up.
|
||||
^v Undelete the last deleted word.
|
||||
^w Delete the word beginning at the cursor position.
|
||||
^x Search.
|
||||
^y Delete from the cursor position to the end of line.
|
||||
^z Undelete the last deleted line.
|
||||
^[ (ESC) Pop up menu.
|
||||
.ta
|
||||
.fi
|
||||
.RE
|
||||
.sp
|
||||
.SS "EMACS keys mode"
|
||||
.PP
|
||||
Since many shells provide an Emacs mode (for cursor movement and other editing
|
||||
operations), some bindings that may be more useful for people familiar with
|
||||
those bindings have been provided. These are accessible via the
|
||||
.B settings
|
||||
menu, or via the initialization file (see below). The mappings are as follows:
|
||||
.RS
|
||||
.nf
|
||||
.ta 1.4i
|
||||
^a Move to the beginning of the line.
|
||||
^b Back 1 character.
|
||||
^c Command prompt.
|
||||
^d Delete character the cursor is sitting on.
|
||||
^e End of line.
|
||||
^f Forward 1 character.
|
||||
^g Go back 1 page.
|
||||
^h Backspace.
|
||||
^i Tab.
|
||||
^j Undelete last deleted character.
|
||||
^k Delete line.
|
||||
^l Undelete last deleted line.
|
||||
^m Insert a newline.
|
||||
^n Move to the next line.
|
||||
^o Prompt for the decimal value of a character to insert.
|
||||
^p Previous line.
|
||||
^r Restore last deleted word.
|
||||
^t Move to the top of the text.
|
||||
^u Move to the bottom of the text.
|
||||
^v Move to the next page.
|
||||
^w Delete the word begining at the cursor position.
|
||||
^y Prompt for the string to search for.
|
||||
^z Next word.
|
||||
^[ (ESC) Pop up menu.
|
||||
.ta
|
||||
.fi
|
||||
.RE
|
||||
.sp
|
||||
.\"
|
||||
.\" function keys
|
||||
.\"
|
||||
.SS "Function Keys"
|
||||
.RS 4
|
||||
.IP "\fBNext Page\fR"
|
||||
Move to the next page.
|
||||
.IP "\fBPrev Page\fR"
|
||||
Move to the previous page.
|
||||
.IP "\fBDelete Char\fR"
|
||||
Delete the character the cursor is on.
|
||||
.IP "\fBDelete Line\fR"
|
||||
Delete from the cursor to the end of line.
|
||||
.IP "\fBInsert line\fR"
|
||||
Insert a newline at the cursor position.
|
||||
.IP "\fBArrow keys\fR"
|
||||
Move the cursor in the direction indicated.
|
||||
.RE
|
||||
.\"
|
||||
.\" commands
|
||||
.\"
|
||||
.SS Commands
|
||||
.PP
|
||||
Some operations require more information than a single keystroke can
|
||||
provide. For the most basic operations, there is a menu that can be
|
||||
obtained by pressing the
|
||||
.SM \fBESC\fR
|
||||
key. The same operations, and more can be performed by obtaining the
|
||||
command prompt (^c) and typing in one of the commands below.
|
||||
.RS 4
|
||||
.IP "!\fBcmd\fR"
|
||||
Execute \fBcmd\fR in a shell.
|
||||
.IP "\fB0-9\fR"
|
||||
Move to the line indicated.
|
||||
.IP "\fBcase\fR"
|
||||
Make searches case sensitive.
|
||||
.IP "\fBcharacter\fR"
|
||||
Display the ascii value of the character at the cursor.
|
||||
.IP "\fBexit\fR"
|
||||
Save the edited text, and leave the editor.
|
||||
.IP "\fBexpand\fR"
|
||||
Expand tabs to spaces.
|
||||
.IP "\fBfile\fR"
|
||||
Print the name of the file.
|
||||
.IP "\fBhelp\fR"
|
||||
Display help screen.
|
||||
.IP "\fBline\fR"
|
||||
Display the current line number.
|
||||
.IP "\fBnocase\fR
|
||||
Make searches insensitive to case (the default).
|
||||
.IP "\fBnoexpand\fR"
|
||||
Don't expand tab to spaces when the TAB key is pressed.
|
||||
.IP "\fBquit\fR"
|
||||
Leave the editor without saving changes.
|
||||
.IP "\fBread\fR \fIfile\fR"
|
||||
Read the named \fIfile\fR.
|
||||
.IP "\fBwrite\fR \fIfile\fR"
|
||||
Write the text to the named \fIfile\fR.
|
||||
.RE
|
||||
.\"
|
||||
.\" menu options
|
||||
.\"
|
||||
.SS "Menu Operations"
|
||||
.PP
|
||||
Pop-up menus can be obtained by pressing the
|
||||
.B escape
|
||||
key (or
|
||||
.B ^[
|
||||
if no
|
||||
.B escape
|
||||
key is present). When in the menu, the escape key can be
|
||||
used to leave the menu without performing any operations. Use the up and
|
||||
down arrow keys, or
|
||||
.B ^u
|
||||
for moving up and
|
||||
.B ^d
|
||||
for moving down to move to the desired items in the menu, then press
|
||||
.B return
|
||||
to perform the indicated task.
|
||||
.PP
|
||||
The main menu in \fIee\fR is as follows:
|
||||
.RS 4
|
||||
.IP "\fBleave editor\fR"
|
||||
If changes have been made, the user will get a menu prompting whether or
|
||||
not the changes should be saved.
|
||||
.IP "\fBhelp\fR"
|
||||
Displays a help screen, with all of the keyboard operations and commands.
|
||||
.IP "\fBfile operations\fR"
|
||||
Pops up a menu for selecting whether to read a file, write to a file, or
|
||||
save the current contents of the editor, as well as send the contents of
|
||||
the editor to a print command (see the section \fBInitializing ee from a
|
||||
file\fR).
|
||||
.IP "\fBredraw screen\fR"
|
||||
Provides a means to repaint the screen if the screen has been corrupted.
|
||||
.IP "\fBsettings\fR"
|
||||
Shows the current values of the operating modes, and right margin. By
|
||||
pressing return when the cursor is on a particular item, the value can be
|
||||
changed. To leave this menu, press the \fBescape\fR key. (See \fBModes\fR
|
||||
below.)
|
||||
.IP "\fBsearch\fR"
|
||||
.br
|
||||
Pops up a menu in which the user may choose to enter a string to search
|
||||
for, or search for a string already entered.
|
||||
.IP "\fBmiscellaneous\fR"
|
||||
Pops up a menu that allows the user to format the current paragraph,
|
||||
execute a shell command, or check the spelling of the text in the editor.
|
||||
.RE
|
||||
.\"
|
||||
.\" paragraph formatting
|
||||
.\"
|
||||
.SS "Paragraph Formatting"
|
||||
.PP
|
||||
Paragraphs are defined for \fIee\fR by a block of text bounded by:
|
||||
.sp
|
||||
.RS 8
|
||||
.IP \(bu
|
||||
Begin or end of file.
|
||||
.IP \(bu
|
||||
Line with no characters, or only spaces and/or tabs.
|
||||
.IP \(bu
|
||||
Line starting with a period ('.') or right angle bracket ('>').
|
||||
.RE
|
||||
.PP
|
||||
A paragraph may be formatted two ways: explicitly by choosing the
|
||||
\fBformat paragraph\fR menu item, or by setting \fIee\fR to automatically
|
||||
format paragraphs. The automatic mode may be set via a menu, or via the
|
||||
initialization file.
|
||||
.PP
|
||||
There are three states for text operation in \fIee\fR: free-form, margins,
|
||||
and automatic formatting.
|
||||
.PP
|
||||
"Free-form" is best used for things like programming. There are no
|
||||
restrictions on the length of lines, and no formatting takes place.
|
||||
.PP
|
||||
"Margins" allows the user to type in text without having to worry about going
|
||||
beyond the right margin (the right margin may be set in the \fBsettings\fR
|
||||
menu, the default is for the margin to be the right edge of the
|
||||
terminal). This is the mode that allows the \fBformat paragraph\fR menu
|
||||
item to work.
|
||||
.PP
|
||||
"Automatic formatting" provides word-processor-like behavior. The user
|
||||
may type in text, while \fIee\fR will make sure the entire paragraph fits
|
||||
within the width of the terminal every time the user inserts a space after
|
||||
typing or deleting text. Margin observation must also be enabled in order for
|
||||
automatic formatting to occur.
|
||||
.\"
|
||||
.\" modes
|
||||
.\"
|
||||
.SS Modes
|
||||
.PP
|
||||
Although ee is a 'modeless' editor (it is in text insertion mode all the
|
||||
time), there are modes in some of the things it does. These include:
|
||||
.RS 4
|
||||
.IP "\fBtab expansion\fR"
|
||||
Tabs may be inserted as a single tab character, or replaced with spaces.
|
||||
.IP "\fBcase sensitivity\fR"
|
||||
The search operation can be sensitive to whether characters are upper- or
|
||||
lower-case, or ignore case completely.
|
||||
.IP "\fBmargins observed\fR"
|
||||
Lines can either be truncated at the right margin, or extend on forever.
|
||||
.IP "\fBauto paragraph formatting\fR"
|
||||
While typing in text, the editor can try to keep it looking reasonably well
|
||||
within the width of the screen.
|
||||
.IP "\fBeightbit characters\fR"
|
||||
Toggles whether eight bit characters are displayed as their value in angle
|
||||
brackets (e.g. "<220>") or as a character.
|
||||
.IP "\fBinfo window\fR"
|
||||
A window showing the keyboard operations that can be performed can be
|
||||
displayed or not.
|
||||
.IP"\fBemacs keys\fR"
|
||||
Control keys may be given bindings similar to emacs, or not.
|
||||
.RE
|
||||
.PP
|
||||
You may set these modes via the initialization file (see below), or with a
|
||||
menu (see above).
|
||||
.\"
|
||||
.\" spell checking
|
||||
.\"
|
||||
.SS "Spell Checking"
|
||||
.PP
|
||||
There are two ways to have the spelling in the text checked from \fIee\fR.
|
||||
One is by the traditional \fIspell\fR(1) command, the other is with the
|
||||
optional \fIispell\fR(1) command.
|
||||
.PP
|
||||
Using \fIspell\fR, the words that are not recognized will be placed at the top
|
||||
of the file. For the \fIispell\fR option, the file is written to disk,
|
||||
then \fIispell\fR run on the file, and the file read back in once
|
||||
\fIispell\fR has completed making changes to the file.
|
||||
.\"
|
||||
.\" printing
|
||||
.\"
|
||||
.SS "Printing the contents of the editor"
|
||||
.PP
|
||||
The user may select a menu item which prints the contents of the editor.
|
||||
.I ee
|
||||
pipes the text in the editor to the command specified by the
|
||||
initialization command
|
||||
.B printcommand
|
||||
(see the section
|
||||
.B Initializing ee from a file
|
||||
below). The default is to send the contents to "lp".
|
||||
.PP
|
||||
Whatever the user assigns to
|
||||
.B printcommand
|
||||
must take input from
|
||||
standard input. See your system administrator for more details.
|
||||
.\"
|
||||
.\" shell operations
|
||||
.\"
|
||||
.SS "Shell operations"
|
||||
.PP
|
||||
Shell commands can be executed from within
|
||||
.I ee
|
||||
by selecting the
|
||||
.B shell command
|
||||
item in the
|
||||
.B miscellaneous
|
||||
menu, or by placing an exclamation mark ("!") before the command to
|
||||
execute at the
|
||||
.B command:
|
||||
prompt. Additionally, the user may direct the contents of the edit buffer
|
||||
out to a shell operation (via a pipe) by using the left angle bracket
|
||||
(">"), followed by a "!" and the shell command to execute. The output of
|
||||
a shell operation can also be directed into the edit buffer by using a
|
||||
right angle bracket ("<") before the exclamation mark. These can even be
|
||||
used together to send output to a shell operation and read back the
|
||||
results into the editor. So, if the editor contained a list of words
|
||||
to be sorted, they could be sorted by typing the following at the command
|
||||
prompt:
|
||||
.RS 4
|
||||
.sp
|
||||
><!sort
|
||||
.sp
|
||||
.RE
|
||||
This would send the contents of the editor to be piped into the
|
||||
.I sort
|
||||
utility and the result would be placed into the edit buffer at the current
|
||||
cursor location. The old information would have to be deleted by the user.
|
||||
.\"
|
||||
.\" initializing ee from a file
|
||||
.\"
|
||||
.SS "Initializing ee from a file"
|
||||
.PP
|
||||
Since different users have different preferences, \fIee\fR allows some
|
||||
slight configurability. There are three possible locations for an
|
||||
initialization file for ee: the file \fI/usr/share/misc/init.ee\fR, the
|
||||
file \fI.init.ee\fR in the user's home directory, or the file \fI.init.ee\fR
|
||||
in the current directory (if different from the home
|
||||
directory). This allows system administrators to set some preferences for
|
||||
the users on a system-wide basis (for example, the \fBprint\fR command),
|
||||
and the user to customize settings for particular directories (like one
|
||||
for correspondence, and a different directory for programming).
|
||||
.PP
|
||||
The file \fI\/usr/share/misc/init.ee\fR is read first, then
|
||||
\fI$HOME/.init.ee\fR, then \fI.init.ee\fR, with the settings specified by the
|
||||
most recent file read taking precedence.
|
||||
.PP
|
||||
The following items may be entered in the initialization file:
|
||||
.RS 4
|
||||
.IP \fBcase\fR
|
||||
Sets searches to be case sensitive.
|
||||
.IP \fBnocase\fR
|
||||
Sets searches to be insensitive to case (default).
|
||||
.IP \fBexpand\fR
|
||||
Causes \fIee\fR to expand tabs to spaces (default).
|
||||
.IP \fBnoexpand\fR
|
||||
Causes \fIee\fR to insert tabs as a single character.
|
||||
.IP \fBinfo\fR
|
||||
A small information window is displayed at the top of the terminal
|
||||
(default).
|
||||
.IP \fBnoinfo\fR
|
||||
Turns off the display of the information window.
|
||||
.IP \fBmargins\fR
|
||||
Causes \fIee\fR to truncate lines at the right margin when the
|
||||
cursor passes beyond the right margin as set by the user
|
||||
while text is being inserted
|
||||
(default).
|
||||
.IP \fBnomargins\fR
|
||||
Allows lines to extend beyond the right margin.
|
||||
.IP \fBautoformat\fR
|
||||
Causes \fIee\fR to automatically try to format the current paragraph while
|
||||
text insertion is occurring.
|
||||
.IP \fBnoautoformat\fR
|
||||
Turns off automatic paragraph formatting (default).
|
||||
.IP \fBprintcommand\fR
|
||||
Allows the setting of the print command (default: "lp").
|
||||
.IP \fBrightmargin\fR
|
||||
The user can select a value for the right margin (the first column on the
|
||||
screen is zero).
|
||||
.IP \fBhighlight\fR
|
||||
Turns on highlighting border of information window and menus (default).
|
||||
.IP \fBnohighlight\fR
|
||||
Turns off highlighting of border of information window and menus.
|
||||
.IP \fBeightbit\fR
|
||||
Turns on display of eight bit characters.
|
||||
.IP \fBnoeightbit\fR
|
||||
Turns off display of eight bit characters (they are displayed as their decimal
|
||||
value inside angle brackets, e.g., "<220>").
|
||||
.IP \fBemacs\fR
|
||||
Turns on emacs key bindings.
|
||||
.IP \fBnoemacs\fR
|
||||
Turns off emacs key bindings.
|
||||
.RE
|
||||
.SH CAVEATS
|
||||
.PP
|
||||
THIS MATERIAL IS PROVIDED "AS IS". THERE ARE
|
||||
NO WARRANTIES OF ANY KIND WITH REGARD TO THIS
|
||||
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. Neither
|
||||
Hewlett-Packard nor Hugh Mahon shall be liable
|
||||
for errors contained herein, nor for
|
||||
incidental or consequential damages in
|
||||
connection with the furnishing, performance or
|
||||
use of this material. Neither Hewlett-Packard
|
||||
nor Hugh Mahon assumes any responsibility for
|
||||
the use or reliability of this software or
|
||||
documentation. This software and
|
||||
documentation is totally UNSUPPORTED. There
|
||||
is no support contract available. Hewlett-Packard
|
||||
has done NO Quality Assurance on ANY
|
||||
of the program or documentation. You may find
|
||||
the quality of the materials inferior to
|
||||
supported materials.
|
||||
.PP
|
||||
Always make a copy of files that cannot be easily reproduced before
|
||||
editing. Save files early, and save often.
|
||||
.SS "International Code Set Support"
|
||||
.I ee
|
||||
supports single-byte character code sets (eight-bit clean).
|
||||
.SH WARNINGS
|
||||
The automatic paragraph formatting operation
|
||||
may be too slow for slower systems.
|
||||
.SH FILES
|
||||
.PP
|
||||
.I /usr/share/misc/init.ee
|
||||
.br
|
||||
.I $HOME/.init.ee
|
||||
.br
|
||||
.I .init.ee
|
||||
.SH AUTHOR
|
||||
.PP
|
||||
The software
|
||||
.I ee
|
||||
was developed by Hugh Mahon.
|
||||
.PP
|
||||
This software and documentation contains
|
||||
proprietary information which is protected by
|
||||
copyright. All rights are reserved.
|
||||
.PP
|
||||
Copyright (c) 1990, 1991, 1992, 1993 Hugh Mahon.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
termcap(4), terminfo(4), environ(5), spell(1), ispell(1), lp(1)
|
||||
|
4793
usr.bin/ee/ee.c
Normal file
4793
usr.bin/ee/ee.c
Normal file
File diff suppressed because it is too large
Load Diff
170
usr.bin/ee/ee.msg
Normal file
170
usr.bin/ee/ee.msg
Normal file
@ -0,0 +1,170 @@
|
||||
$ This file contains the messages for ee ("easy editor"). See the file
|
||||
$ ee.i18n.guide for more information
|
||||
$
|
||||
$ For ee patchlevel 3
|
||||
$
|
||||
$ $Header: /users/hugh/tmp/old_ae/ee.msg,v 1.3 1993/06/22 04:13:35 hugh Exp $
|
||||
$
|
||||
$set 1
|
||||
$quote "
|
||||
1 "modes menu"
|
||||
2 "tabs to spaces "
|
||||
3 "case sensitive search"
|
||||
4 "margins observed "
|
||||
5 "auto-paragraph format"
|
||||
6 "eightbit characters "
|
||||
7 "info window "
|
||||
8 "right margin "
|
||||
9 "leave menu"
|
||||
10 "save changes"
|
||||
11 "no save"
|
||||
12 "file menu"
|
||||
13 "read a file"
|
||||
14 "write a file"
|
||||
15 "save file"
|
||||
16 "print editor contents"
|
||||
17 "search menu"
|
||||
18 "search for ..."
|
||||
19 "search"
|
||||
20 "spell menu"
|
||||
21 "use 'spell'"
|
||||
22 "use 'ispell'"
|
||||
23 "miscellaneous menu"
|
||||
24 "format paragraph"
|
||||
25 "shell command"
|
||||
26 "check spelling"
|
||||
27 "main menu"
|
||||
28 "leave editor"
|
||||
29 "help"
|
||||
30 "file operations"
|
||||
31 "redraw screen"
|
||||
32 "settings"
|
||||
33 "search"
|
||||
34 "miscellaneous"
|
||||
35 "Control keys: "
|
||||
36 "^a ascii code ^i tab ^r right "
|
||||
37 "^b bottom of text ^j newline ^t top of text "
|
||||
38 "^c command ^k delete char ^u up "
|
||||
39 "^d down ^l left ^v undelete word "
|
||||
40 "^e search prompt ^m newline ^w delete word "
|
||||
41 "^f undelete char ^n next page ^x search "
|
||||
42 "^g begin of line ^o end of line ^y delete line "
|
||||
43 "^h backspace ^p prev page ^z undelete line "
|
||||
44 "^[ (escape) menu "
|
||||
45 " "
|
||||
46 "Commands: "
|
||||
47 "help : get this info file : print file name "
|
||||
48 "read : read a file char : ascii code of char "
|
||||
49 "write : write a file case : case sensitive search "
|
||||
50 "exit : leave and save nocase : case insensitive search "
|
||||
51 "quit : leave, no save !cmd : execute \"cmd\" in shell "
|
||||
52 "line : display line # 0-9 : go to line \"#\" "
|
||||
53 "expand : expand tabs noexpand: do not expand tabs "
|
||||
54 " "
|
||||
55 " ee [-i] [-e] [-h] [file(s)] "
|
||||
56 " -i : no information window -e : do not expand tabs -h : no highlight "
|
||||
57 "^[ (escape) menu ^e search prompt ^y delete line ^u up ^p prev page "
|
||||
58 "^a ascii code ^x search ^z undelete line ^d down ^n next page "
|
||||
59 "^b bottom of text ^g begin of line ^w delete word ^l left "
|
||||
60 "^t top of text ^o end of line ^v undelete word ^r right "
|
||||
61 "^c command ^k delete char ^f undelete char "
|
||||
62 "help : get help info |file : print file name |line : print line # "
|
||||
63 "read : read a file |char : ascii code of char |0-9 : go to line \"#\""
|
||||
64 "write: write a file |case : case sensitive search |exit : leave and save "
|
||||
65 "!cmd : shell \"cmd\" |nocase: ignore case in search |quit : leave, no save"
|
||||
66 "expand: expand tabs |noexpand: do not expand tabs "
|
||||
67 " press Escape (^[) for menu"
|
||||
68 "no file"
|
||||
69 "ascii code: "
|
||||
70 "sending contents of buffer to \"%s\" "
|
||||
71 "command: "
|
||||
72 "name of file to write: "
|
||||
73 "name of file to read: "
|
||||
74 "character = %d"
|
||||
75 "unknown command \"%s\""
|
||||
76 "entered command is not unique"
|
||||
77 "line %d "
|
||||
78 "length = %d"
|
||||
79 "current file is \"%s\" "
|
||||
80 "usage: %s [-i] [-e] [-h] [+line_number] [file(s)]\n"
|
||||
81 " -i turn off info window\n"
|
||||
82 " -e do not convert tabs to spaces\n"
|
||||
83 " -h do not use highlighting\n"
|
||||
84 "file \"%s\" is a directory"
|
||||
85 "new file \"%s\""
|
||||
86 "can't open \"%s\""
|
||||
87 "file \"%s\", %d lines"
|
||||
88 "finished reading file \"%s\""
|
||||
89 "reading file \"%s\""
|
||||
90 ", read only"
|
||||
91 "file \"%s\", %d lines"
|
||||
92 "enter name of file: "
|
||||
93 "no filename entered: file not saved"
|
||||
94 "changes have been made, are you sure? (y/n [n]) "
|
||||
95 "y"
|
||||
96 "file already exists, overwrite? (y/n) [n] "
|
||||
97 "unable to create file \"%s\""
|
||||
98 "writing file \"%s\""
|
||||
99 "\"%s\" %d lines, %d characters"
|
||||
100 " ...searching"
|
||||
101 "string \"%s\" not found"
|
||||
102 "search for: "
|
||||
103 "could not exec %s\n"
|
||||
104 "press return to continue "
|
||||
105 "press Esc to cancel"
|
||||
106 "menu too large for window"
|
||||
107 "press any key to continue "
|
||||
108 "shell command: "
|
||||
109 "...formatting paragraph..."
|
||||
110 "<!echo 'list of unrecognized words'; echo -=-=-=-=-=-"
|
||||
111 "sending contents of edit buffer to 'spell'"
|
||||
112 "right margin is: "
|
||||
113 "restricted mode: unable to perform requested operation"
|
||||
114 "ON"
|
||||
115 "OFF"
|
||||
116 "HELP"
|
||||
117 "WRITE"
|
||||
118 "READ"
|
||||
119 "LINE"
|
||||
120 "FILE"
|
||||
121 "CHARACTER"
|
||||
122 "REDRAW"
|
||||
123 "RESEQUENCE"
|
||||
124 "AUTHOR"
|
||||
125 "VERSION"
|
||||
126 "CASE"
|
||||
127 "NOCASE"
|
||||
128 "EXPAND"
|
||||
129 "NOEXPAND"
|
||||
130 "EXIT"
|
||||
131 "QUIT"
|
||||
132 "INFO"
|
||||
133 "NOINFO"
|
||||
134 "MARGINS"
|
||||
135 "NOMARGINS"
|
||||
136 "AUTOFORMAT"
|
||||
137 "NOAUTOFORMAT"
|
||||
138 "ECHO"
|
||||
139 "PRINTCOMMAND"
|
||||
140 "RIGHTMARGIN"
|
||||
141 "HIGHLIGHT"
|
||||
142 "NOHIGHLIGHT"
|
||||
143 "EIGHTBIT"
|
||||
144 "NOEIGHTBIT"
|
||||
145 "emacs key bindings "
|
||||
146 "^a beginning of line ^i tab ^r restore word "
|
||||
147 "^b back 1 char ^j undel char ^t top of text "
|
||||
148 "^c command ^k delete line ^u bottom of text "
|
||||
149 "^d delete char ^l undelete line ^v next page "
|
||||
150 "^e end of line ^m newline ^w delete word "
|
||||
151 "^f forward 1 char ^n next line ^x search "
|
||||
152 "^g go back 1 page ^o ascii char insert ^y search prompt "
|
||||
153 "^h backspace ^p prev line ^z next word "
|
||||
154 "^[ (escape) menu ^y search prompt ^k delete line ^p prev li ^g prev page"
|
||||
155 "^o ascii code ^x search ^l undelete line ^n next li ^v next page"
|
||||
156 "^u end of file ^a begin of line ^w delete word ^b back 1 char "
|
||||
157 "^t top of text ^e end of line ^r restore word ^f forward 1 char "
|
||||
158 "^c command ^d delete char ^j undelete char ^z next word "
|
||||
159 "EMACS"
|
||||
160 "NOEMACS"
|
||||
161 " +# put cursor at line #\n"
|
Loading…
x
Reference in New Issue
Block a user