Merge local changes to ee(1) into contrib space.
The source file, manual page and English translation are now directly obtained from the contrib/ directory. This makes it a lot easier to merge a newer version of ee(1) into the tree. Thanks to: des and jhb
This commit is contained in:
parent
6eedde2cb2
commit
0eb321bfa5
278
contrib/ee/ee.c
278
contrib/ee/ee.c
@ -53,6 +53,9 @@
|
||||
|
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
char *ee_copyright_message =
|
||||
"Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996 Hugh Mahon ";
|
||||
|
||||
@ -66,38 +69,36 @@ char *version = "@(#) ee, version 1.4.1 $Revision: 1.96 $";
|
||||
|
||||
#ifdef NCURSE
|
||||
#include "new_curse.h"
|
||||
#elif HAS_NCURSES
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#ifdef HAS_SYS_WAIT
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAS_STDLIB
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAS_STDARG
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAS_UNISTD
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAS_CTYPE
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAS_SYS_WAIT
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#ifdef HAS_STDARG
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#ifdef HAS_STDLIB
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#ifdef HAS_UNISTD
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef NO_CATGETS
|
||||
#include <locale.h>
|
||||
@ -202,8 +203,11 @@ unsigned char *d_char; /* deleted character */
|
||||
unsigned char *d_word; /* deleted word */
|
||||
unsigned char *d_line; /* deleted line */
|
||||
char in_string[513]; /* buffer for reading a file */
|
||||
unsigned char *print_command = "lp"; /* string to use for the print command */
|
||||
unsigned char *print_command = "lpr"; /* string to use for the print command */
|
||||
unsigned char *start_at_line = NULL; /* move to this line at start of session*/
|
||||
const char count_text_default[] = "===============================================================================";
|
||||
int count_text_len = sizeof(count_text_default); /* length of the line above */
|
||||
char count_text[sizeof(count_text_default)]; /* buffer for current position display */
|
||||
int in; /* input character */
|
||||
|
||||
FILE *temp_fp; /* temporary file pointer */
|
||||
@ -219,6 +223,7 @@ WINDOW *com_win;
|
||||
WINDOW *text_win;
|
||||
WINDOW *help_win;
|
||||
WINDOW *info_win;
|
||||
WINDOW *count_win;
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define P_(s) s
|
||||
@ -298,7 +303,7 @@ void finish P_((void));
|
||||
int quit P_((int noverify));
|
||||
void edit_abort P_((int arg));
|
||||
void delete_text P_((void));
|
||||
int write_file P_((char *file_name));
|
||||
int write_file P_((char *file_name, int warn_if_exists));
|
||||
int search P_((int display_message));
|
||||
void search_prompt P_((void));
|
||||
void del_char P_((void));
|
||||
@ -339,6 +344,7 @@ char *is_in_string P_((char *string, char *substring));
|
||||
char *resolve_name P_((char *name));
|
||||
int restrict_mode P_((void));
|
||||
int unique_test P_((char *string, char *list[]));
|
||||
void renumber_lines P_((struct text *firstline, int startnumber));
|
||||
void strings_init P_((void));
|
||||
|
||||
#undef P_
|
||||
@ -535,28 +541,23 @@ char *more_above_str, *more_below_str;
|
||||
|
||||
char *chinese_cmd, *nochinese_cmd;
|
||||
|
||||
#ifndef __STDC__
|
||||
#ifndef HAS_STDLIB
|
||||
extern char *malloc();
|
||||
extern char *realloc();
|
||||
extern char *getenv();
|
||||
FILE *fopen(); /* declaration for open function */
|
||||
#endif /* HAS_STDLIB */
|
||||
#endif /* __STDC__ */
|
||||
|
||||
int
|
||||
main(argc, argv) /* beginning of main program */
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
int counter;
|
||||
|
||||
for (counter = 1; counter < 24; counter++)
|
||||
signal(counter, SIG_IGN);
|
||||
/* Always read from (and write to) a terminal. */
|
||||
if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO)) {
|
||||
fprintf(stderr, "ee's standard input and output must be a terminal\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
signal(SIGCHLD, SIG_DFL);
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGINT, edit_abort);
|
||||
signal(SIGHUP, edit_abort);
|
||||
|
||||
d_char = malloc(3); /* provide a buffer for multi-byte chars */
|
||||
d_word = malloc(150);
|
||||
*d_word = (char) NULL;
|
||||
@ -577,7 +578,7 @@ char *argv[];
|
||||
scr_pos =0;
|
||||
scr_vert = 0;
|
||||
scr_horz = 0;
|
||||
bit_bucket = fopen("/dev/null", "w");
|
||||
bit_bucket = fopen(_PATH_DEVNULL, "w");
|
||||
edit = TRUE;
|
||||
gold = case_sen = FALSE;
|
||||
shell_fork = TRUE;
|
||||
@ -608,10 +609,23 @@ char *argv[];
|
||||
|
||||
while(edit)
|
||||
{
|
||||
wrefresh(text_win);
|
||||
if (info_window)
|
||||
{
|
||||
snprintf(count_text, count_text_len, "L: %d C: %d %s", \
|
||||
curr_line->line_number, scr_horz + 1, count_text_default);
|
||||
wmove(count_win, 0, 0);
|
||||
if (!nohighlight)
|
||||
wstandout(count_win);
|
||||
wprintw(count_win, count_text);
|
||||
wstandend(count_win);
|
||||
wnoutrefresh(count_win);
|
||||
}
|
||||
|
||||
wnoutrefresh(text_win);
|
||||
doupdate();
|
||||
in = wgetch(text_win);
|
||||
if (in == -1)
|
||||
exit(0);
|
||||
continue;
|
||||
|
||||
resize_check();
|
||||
|
||||
@ -810,6 +824,7 @@ int disp;
|
||||
if (temp_buff->next_line != NULL)
|
||||
temp_buff->next_line->prev_line = curr_line;
|
||||
curr_line->next_line = temp_buff->next_line;
|
||||
renumber_lines(curr_line->next_line, curr_line->line_number + 1);
|
||||
temp2 = temp_buff->line;
|
||||
if (in == 8)
|
||||
{
|
||||
@ -943,13 +958,13 @@ int column;
|
||||
}
|
||||
else
|
||||
{
|
||||
waddch(window, (char)character );
|
||||
waddch(window, (unsigned char)character );
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
waddch(window, (char)character);
|
||||
waddch(window, (unsigned char)character);
|
||||
return(1);
|
||||
}
|
||||
for (i2 = 0; (string[i2] != (char) NULL) && (((column+i2+1)-horiz_offset) < last_col); i2++)
|
||||
@ -1054,8 +1069,8 @@ int disp;
|
||||
temp_nod->line = extra= malloc(10);
|
||||
temp_nod->line_length = 1;
|
||||
temp_nod->max_length = 10;
|
||||
temp_nod->line_number = curr_line->line_number + 1;
|
||||
temp_nod->next_line = curr_line->next_line;
|
||||
renumber_lines(temp_nod, curr_line->line_number + 1);
|
||||
if (temp_nod->next_line != NULL)
|
||||
temp_nod->next_line->prev_line = temp_nod;
|
||||
temp_nod->prev_line = curr_line;
|
||||
@ -1507,8 +1522,10 @@ function_key() /* process function key */
|
||||
left(TRUE);
|
||||
else if (in == KEY_RIGHT)
|
||||
right(TRUE);
|
||||
else if ( in == KEY_HOME)
|
||||
top();
|
||||
else if (in == KEY_HOME)
|
||||
bol();
|
||||
else if (in == KEY_END)
|
||||
eol();
|
||||
else if ( in == KEY_UP)
|
||||
up();
|
||||
else if (in == KEY_DOWN)
|
||||
@ -1674,7 +1691,7 @@ char *cmd_str1;
|
||||
cmd_str = cmd_str2 = get_string(file_write_prompt_str, TRUE);
|
||||
}
|
||||
tmp_file = resolve_name(cmd_str);
|
||||
write_file(tmp_file);
|
||||
write_file(tmp_file, 1);
|
||||
if (tmp_file != cmd_str)
|
||||
free(tmp_file);
|
||||
}
|
||||
@ -1855,7 +1872,7 @@ int advance; /* if true, skip leading spaces and tabs */
|
||||
esc_flag = FALSE;
|
||||
in = wgetch(com_win);
|
||||
if (in == -1)
|
||||
exit(0);
|
||||
continue;
|
||||
if (((in == 8) || (in == 127) || (in == KEY_BACKSPACE)) && (g_pos > 0))
|
||||
{
|
||||
tmp_int = g_horz;
|
||||
@ -1880,7 +1897,7 @@ int advance; /* if true, skip leading spaces and tabs */
|
||||
esc_flag = TRUE;
|
||||
in = wgetch(com_win);
|
||||
if (in == -1)
|
||||
exit(0);
|
||||
continue;
|
||||
}
|
||||
*nam_str = in;
|
||||
g_pos++;
|
||||
@ -1954,7 +1971,7 @@ char *cmd_str;
|
||||
int number;
|
||||
int i;
|
||||
char *ptr;
|
||||
char *direction;
|
||||
char *direction = NULL;
|
||||
struct text *t_line;
|
||||
|
||||
ptr = cmd_str;
|
||||
@ -2025,9 +2042,10 @@ char *arguments[];
|
||||
{
|
||||
char *buff;
|
||||
int count;
|
||||
struct files *temp_names;
|
||||
struct files *temp_names = NULL;
|
||||
char *name;
|
||||
char *ptr;
|
||||
int no_more_opts = FALSE;
|
||||
|
||||
/*
|
||||
| see if editor was invoked as 'ree' (restricted mode)
|
||||
@ -2044,7 +2062,7 @@ char *arguments[];
|
||||
input_file = FALSE;
|
||||
recv_file = FALSE;
|
||||
count = 1;
|
||||
while (count < numargs)
|
||||
while ((count < numargs) && (!no_more_opts))
|
||||
{
|
||||
buff = arguments[count];
|
||||
if (!strcmp("-i", buff))
|
||||
@ -2073,32 +2091,40 @@ char *arguments[];
|
||||
buff++;
|
||||
start_at_line = buff;
|
||||
}
|
||||
|
||||
else if (!(strcmp("--", buff)))
|
||||
no_more_opts = TRUE;
|
||||
else
|
||||
{
|
||||
if (top_of_stack == NULL)
|
||||
{
|
||||
temp_names = top_of_stack = name_alloc();
|
||||
}
|
||||
else
|
||||
{
|
||||
temp_names->next_name = name_alloc();
|
||||
temp_names = temp_names->next_name;
|
||||
}
|
||||
ptr = temp_names->name = malloc(strlen(buff) + 1);
|
||||
while (*buff != (char) NULL)
|
||||
{
|
||||
*ptr = *buff;
|
||||
buff++;
|
||||
ptr++;
|
||||
}
|
||||
*ptr = (char) NULL;
|
||||
temp_names->next_name = NULL;
|
||||
input_file = TRUE;
|
||||
recv_file = TRUE;
|
||||
count--;
|
||||
no_more_opts = TRUE;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
while (count < numargs)
|
||||
{
|
||||
buff = arguments[count];
|
||||
if (top_of_stack == NULL)
|
||||
{
|
||||
temp_names = top_of_stack = name_alloc();
|
||||
}
|
||||
else
|
||||
{
|
||||
temp_names->next_name = name_alloc();
|
||||
temp_names = temp_names->next_name;
|
||||
}
|
||||
ptr = temp_names->name = malloc(strlen(buff) + 1);
|
||||
while (*buff != (char) NULL)
|
||||
{
|
||||
*ptr = *buff;
|
||||
buff++;
|
||||
ptr++;
|
||||
}
|
||||
*ptr = (char) NULL;
|
||||
temp_names->next_name = NULL;
|
||||
input_file = TRUE;
|
||||
recv_file = TRUE;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -2292,8 +2318,8 @@ int *append; /* TRUE if must append more text to end of current line */
|
||||
if (!(*append)) /* if not append to current line, insert new one */
|
||||
{
|
||||
tline = txtalloc(); /* allocate data structure for next line */
|
||||
tline->line_number = curr_line->line_number + 1;
|
||||
tline->next_line = curr_line->next_line;
|
||||
renumber_lines(tline, curr_line->line_number + 1);
|
||||
tline->prev_line = curr_line;
|
||||
curr_line->next_line = tline;
|
||||
if (tline->next_line != NULL)
|
||||
@ -2372,7 +2398,7 @@ finish() /* prepare to exit edit session */
|
||||
file_name = tmp_file;
|
||||
}
|
||||
|
||||
if (write_file(file_name))
|
||||
if (write_file(file_name, 1))
|
||||
{
|
||||
text_changes = FALSE;
|
||||
quit(0);
|
||||
@ -2412,6 +2438,7 @@ int noverify;
|
||||
recv_file = TRUE;
|
||||
input_file = TRUE;
|
||||
check_fp();
|
||||
text_changes = FALSE;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@ -2448,8 +2475,9 @@ delete_text()
|
||||
}
|
||||
|
||||
int
|
||||
write_file(file_name)
|
||||
write_file(file_name, warn_if_exists)
|
||||
char *file_name;
|
||||
int warn_if_exists;
|
||||
{
|
||||
char cr;
|
||||
char *tmp_point;
|
||||
@ -2459,7 +2487,8 @@ char *file_name;
|
||||
int write_flag = TRUE;
|
||||
|
||||
charac = lines = 0;
|
||||
if ((in_file_name == NULL) || strcmp(in_file_name, file_name))
|
||||
if (warn_if_exists &&
|
||||
((in_file_name == NULL) || strcmp(in_file_name, file_name)))
|
||||
{
|
||||
if ((temp_fp = fopen(file_name, "r")))
|
||||
{
|
||||
@ -3125,9 +3154,8 @@ char *string; /* string containing user command */
|
||||
}
|
||||
for (value = 1; value < 24; value++)
|
||||
signal(value, SIG_DFL);
|
||||
execl(path, last_slash, "-c", string, NULL);
|
||||
printf(exec_err_msg, path);
|
||||
exit(-1);
|
||||
execl(path, last_slash, "-c", string, (char *)NULL);
|
||||
errx(1, exec_err_msg, path);
|
||||
}
|
||||
else /* if the parent */
|
||||
{
|
||||
@ -3170,7 +3198,7 @@ char *string; /* string containing user command */
|
||||
}
|
||||
if (shell_fork)
|
||||
{
|
||||
printf(continue_msg);
|
||||
printf("%s", continue_msg);
|
||||
fflush(stdout);
|
||||
while ((in = getchar()) != '\n')
|
||||
;
|
||||
@ -3230,9 +3258,12 @@ set_up_term() /* set up the terminal for operating with ae */
|
||||
if (info_window)
|
||||
{
|
||||
info_type = CONTROL_KEYS;
|
||||
info_win = newwin(6, COLS, 0, 0);
|
||||
info_win = newwin(5, COLS, 0, 0);
|
||||
werase(info_win);
|
||||
paint_info_win();
|
||||
count_win = newwin(1, COLS, 5, 0);
|
||||
leaveok(count_win, TRUE);
|
||||
wrefresh(count_win);
|
||||
}
|
||||
|
||||
last_col = COLS - 1;
|
||||
@ -3257,6 +3288,7 @@ resize_check()
|
||||
delwin(text_win);
|
||||
delwin(com_win);
|
||||
delwin(help_win);
|
||||
delwin(count_win);
|
||||
set_up_term();
|
||||
redraw();
|
||||
wrefresh(text_win);
|
||||
@ -3274,7 +3306,7 @@ struct menu_entries menu_list[];
|
||||
int counter;
|
||||
int length;
|
||||
int input;
|
||||
int temp;
|
||||
int temp = 0;
|
||||
int list_size;
|
||||
int top_offset; /* offset from top where menu items start */
|
||||
int vert_pos; /* vertical position */
|
||||
@ -3356,10 +3388,7 @@ struct menu_entries menu_list[];
|
||||
wmove(temp_win, (counter + top_offset - off_start), 3);
|
||||
|
||||
wrefresh(temp_win);
|
||||
in = wgetch(temp_win);
|
||||
input = in;
|
||||
if (input == -1)
|
||||
exit(0);
|
||||
input = wgetch(temp_win);
|
||||
|
||||
if (((tolower(input) >= 'a') && (tolower(input) <= 'z')) ||
|
||||
((input >= '0') && (input <= '9')))
|
||||
@ -3602,8 +3631,6 @@ help()
|
||||
wprintw(com_win, press_any_key_msg);
|
||||
wrefresh(com_win);
|
||||
counter = wgetch(com_win);
|
||||
if (counter == -1)
|
||||
exit(0);
|
||||
werase(com_win);
|
||||
wmove(com_win, 0, 0);
|
||||
werase(help_win);
|
||||
@ -3631,11 +3658,6 @@ paint_info_win()
|
||||
else if (info_type == COMMANDS)
|
||||
waddstr(info_win, command_strings[counter]);
|
||||
}
|
||||
wmove(info_win, 5, 0);
|
||||
if (!nohighlight)
|
||||
wstandout(info_win);
|
||||
waddstr(info_win, "===============================================================================");
|
||||
wstandend(info_win);
|
||||
wrefresh(info_win);
|
||||
}
|
||||
|
||||
@ -3669,12 +3691,15 @@ create_info_window()
|
||||
idlok(text_win, TRUE);
|
||||
werase(text_win);
|
||||
info_window = TRUE;
|
||||
info_win = newwin(6, COLS, 0, 0);
|
||||
info_win = newwin(5, COLS, 0, 0);
|
||||
werase(info_win);
|
||||
info_type = CONTROL_KEYS;
|
||||
midscreen(min(scr_vert, last_line), point);
|
||||
clearok(info_win, TRUE);
|
||||
paint_info_win();
|
||||
count_win = newwin(1, COLS, 5, 0);
|
||||
leaveok(count_win, TRUE);
|
||||
wrefresh(count_win);
|
||||
wrefresh(text_win);
|
||||
clear_com_win = TRUE;
|
||||
}
|
||||
@ -3705,7 +3730,7 @@ int arg;
|
||||
{
|
||||
string = get_string(file_write_prompt_str, TRUE);
|
||||
tmp_file = resolve_name(string);
|
||||
write_file(tmp_file);
|
||||
write_file(tmp_file, 1);
|
||||
if (tmp_file != string)
|
||||
free(tmp_file);
|
||||
free(string);
|
||||
@ -3742,7 +3767,7 @@ int arg;
|
||||
string = tmp_file;
|
||||
}
|
||||
}
|
||||
if (write_file(string))
|
||||
if (write_file(string, 1))
|
||||
{
|
||||
in_file_name = string;
|
||||
text_changes = FALSE;
|
||||
@ -4051,7 +4076,7 @@ Format() /* format the paragraph according to set margins */
|
||||
}
|
||||
|
||||
unsigned char *init_name[3] = {
|
||||
"/usr/local/lib/init.ee",
|
||||
"/usr/share/misc/init.ee",
|
||||
NULL,
|
||||
".init.ee"
|
||||
};
|
||||
@ -4068,6 +4093,8 @@ ee_init() /* check for init file and read it if it exists */
|
||||
int temp_int;
|
||||
|
||||
string = getenv("HOME");
|
||||
if (!string)
|
||||
string = "/root"; /* Set to reasonable default so we don't crash */
|
||||
str1 = home = malloc(strlen(string)+10);
|
||||
strcpy(home, string);
|
||||
strcat(home, "/.init.ee");
|
||||
@ -4353,17 +4380,25 @@ spell_op() /* check spelling of words in the editor */
|
||||
void
|
||||
ispell_op()
|
||||
{
|
||||
char name[128];
|
||||
char template[128], *name;
|
||||
char string[256];
|
||||
int pid;
|
||||
int fd;
|
||||
|
||||
if (restrict_mode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
pid = getpid();
|
||||
sprintf(name, "/tmp/ee.%d", pid);
|
||||
if (write_file(name))
|
||||
(void)sprintf(template, "/tmp/ee.XXXXXXXX");
|
||||
name = mktemp(&template[0]);
|
||||
fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0600);
|
||||
if (fd < 0) {
|
||||
wmove(com_win, 0, 0);
|
||||
wprintw(com_win, create_file_fail_msg, name);
|
||||
wrefresh(com_win);
|
||||
return;
|
||||
}
|
||||
close(fd);
|
||||
if (write_file(name, 0))
|
||||
{
|
||||
sprintf(string, "ispell %s", name);
|
||||
sh_command(string);
|
||||
@ -4961,6 +4996,19 @@ char *list[];
|
||||
return(num_match);
|
||||
}
|
||||
|
||||
void
|
||||
renumber_lines(firstline, startnumber)
|
||||
struct text *firstline;
|
||||
int startnumber;
|
||||
{
|
||||
struct text *lineptr;
|
||||
int i;
|
||||
|
||||
i = startnumber;
|
||||
for (lineptr = firstline; lineptr != NULL; lineptr = lineptr->next_line)
|
||||
lineptr->line_number = i++;
|
||||
}
|
||||
|
||||
#ifndef NO_CATGETS
|
||||
/*
|
||||
| Get the catalog entry, and if it got it from the catalog,
|
||||
@ -5001,7 +5049,7 @@ strings_init()
|
||||
|
||||
#ifndef NO_CATGETS
|
||||
setlocale(LC_ALL, "");
|
||||
catalog = catopen("ee", 0);
|
||||
catalog = catopen("ee", NL_CAT_LOCALE);
|
||||
#endif /* NO_CATGETS */
|
||||
|
||||
modes_menu[0].item_string = catgetlocal( 1, "modes menu");
|
||||
@ -5047,7 +5095,7 @@ strings_init()
|
||||
help_text[6] = catgetlocal( 41, "^f undelete char ^n next page ^x search ");
|
||||
help_text[7] = catgetlocal( 42, "^g begin of line ^o end of line ^y delete line ");
|
||||
help_text[8] = catgetlocal( 43, "^h backspace ^p prev page ^z undelete line ");
|
||||
help_text[9] = catgetlocal( 44, "^[ (escape) menu ");
|
||||
help_text[9] = catgetlocal( 44, "^[ (escape) menu ESC-Enter: exit ee ");
|
||||
help_text[10] = catgetlocal( 45, " ");
|
||||
help_text[11] = catgetlocal( 46, "Commands: ");
|
||||
help_text[12] = catgetlocal( 47, "help : get this info file : print file name ");
|
||||
@ -5064,7 +5112,7 @@ strings_init()
|
||||
control_keys[1] = catgetlocal( 58, "^a ascii code ^x search ^z undelete line ^d down ^n next page ");
|
||||
control_keys[2] = catgetlocal( 59, "^b bottom of text ^g begin of line ^w delete word ^l left ");
|
||||
control_keys[3] = catgetlocal( 60, "^t top of text ^o end of line ^v undelete word ^r right ");
|
||||
control_keys[4] = catgetlocal( 61, "^c command ^k delete char ^f undelete char ");
|
||||
control_keys[4] = catgetlocal( 61, "^c command ^k delete char ^f undelete char ESC-Enter: exit ee ");
|
||||
command_strings[0] = catgetlocal( 62, "help : get help info |file : print file name |line : print line # ");
|
||||
command_strings[1] = catgetlocal( 63, "read : read a file |char : ascii code of char |0-9 : go to line \"#\"");
|
||||
command_strings[2] = catgetlocal( 64, "write: write a file |case : case sensitive search |exit : leave and save ");
|
||||
@ -5106,7 +5154,7 @@ strings_init()
|
||||
searching_msg = catgetlocal( 100, " ...searching");
|
||||
str_not_found_msg = catgetlocal( 101, "string \"%s\" not found");
|
||||
search_prompt_str = catgetlocal( 102, "search for: ");
|
||||
exec_err_msg = catgetlocal( 103, "could not exec %s\n");
|
||||
exec_err_msg = catgetlocal( 103, "could not exec %s");
|
||||
continue_msg = catgetlocal( 104, "press return to continue ");
|
||||
menu_cancel_msg = catgetlocal( 105, "press Esc to cancel");
|
||||
menu_size_err_msg = catgetlocal( 106, "menu too large for window");
|
||||
@ -5154,8 +5202,8 @@ strings_init()
|
||||
mode_strings[7] = catgetlocal( 145, "emacs key bindings ");
|
||||
emacs_help_text[0] = help_text[0];
|
||||
emacs_help_text[1] = catgetlocal( 146, "^a beginning of line ^i tab ^r restore word ");
|
||||
emacs_help_text[2] = catgetlocal( 147, "^b back 1 char ^j undel char ^t top of text ");
|
||||
emacs_help_text[3] = catgetlocal( 148, "^c command ^k delete line ^u bottom of text ");
|
||||
emacs_help_text[2] = catgetlocal( 147, "^b back 1 char ^j undel char ^t begin of file ");
|
||||
emacs_help_text[3] = catgetlocal( 148, "^c command ^k delete line ^u end of file ");
|
||||
emacs_help_text[4] = catgetlocal( 149, "^d delete char ^l undelete line ^v next page ");
|
||||
emacs_help_text[5] = catgetlocal( 150, "^e end of line ^m newline ^w delete word ");
|
||||
emacs_help_text[6] = catgetlocal( 151, "^f forward 1 char ^n next line ^x search ");
|
||||
@ -5174,11 +5222,11 @@ strings_init()
|
||||
emacs_help_text[19] = help_text[19];
|
||||
emacs_help_text[20] = help_text[20];
|
||||
emacs_help_text[21] = help_text[21];
|
||||
emacs_control_keys[0] = catgetlocal( 154, "^[ (escape) menu ^y search prompt ^k delete line ^p prev li ^g prev page");
|
||||
emacs_control_keys[1] = catgetlocal( 155, "^o ascii code ^x search ^l undelete line ^n next li ^v next page");
|
||||
emacs_control_keys[2] = catgetlocal( 156, "^u end of file ^a begin of line ^w delete word ^b back 1 char ");
|
||||
emacs_control_keys[3] = catgetlocal( 157, "^t top of text ^e end of line ^r restore word ^f forward 1 char ");
|
||||
emacs_control_keys[4] = catgetlocal( 158, "^c command ^d delete char ^j undelete char ^z next word ");
|
||||
emacs_control_keys[0] = catgetlocal( 154, "^[ (escape) menu ^y search prompt ^k delete line ^p prev line ^g prev page");
|
||||
emacs_control_keys[1] = catgetlocal( 155, "^o ascii code ^x search ^l undelete line ^n next line ^v next page");
|
||||
emacs_control_keys[2] = catgetlocal( 156, "^u end of file ^a begin of line ^w delete word ^b back char ^z next word");
|
||||
emacs_control_keys[3] = catgetlocal( 157, "^t begin of file ^e end of line ^r restore word ^f forward char ");
|
||||
emacs_control_keys[4] = catgetlocal( 158, "^c command ^d delete char ^j undelete char ESC-Enter: exit");
|
||||
EMACS_string = catgetlocal( 159, "EMACS");
|
||||
NOEMACS_string = catgetlocal( 160, "NOEMACS");
|
||||
usage4 = catgetlocal( 161, " +# put cursor at line #\n");
|
||||
|
@ -4,6 +4,7 @@ $
|
||||
$ For ee patchlevel 3
|
||||
$
|
||||
$ $Header: /home/hugh/sources/old_ae/RCS/ee.msg,v 1.8 1996/11/30 03:23:40 hugh Exp $
|
||||
$ $FreeBSD$
|
||||
$
|
||||
$
|
||||
$set 1
|
||||
@ -51,7 +52,7 @@ $quote "
|
||||
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 "
|
||||
44 "^[ (escape) menu ESC-Enter: exit ee "
|
||||
45 " "
|
||||
46 "Commands: "
|
||||
47 "help : get this info file : print file name "
|
||||
@ -68,7 +69,7 @@ $quote "
|
||||
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 "
|
||||
61 "^c command ^k delete char ^f undelete char ESC-Enter: exit ee "
|
||||
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 "
|
||||
@ -110,7 +111,7 @@ $quote "
|
||||
100 " ...searching"
|
||||
101 "string \"%s\" not found"
|
||||
102 "search for: "
|
||||
103 "could not exec %s\n"
|
||||
103 "could not exec %s"
|
||||
104 "press return to continue "
|
||||
105 "press Esc to cancel"
|
||||
106 "menu too large for window"
|
||||
@ -154,8 +155,8 @@ $quote "
|
||||
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 "
|
||||
147 "^b back 1 char ^j undel char ^t begin of file "
|
||||
148 "^c command ^k delete line ^u end of file "
|
||||
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 "
|
||||
@ -164,7 +165,7 @@ $quote "
|
||||
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 "
|
||||
157 "^t begin of file ^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"
|
||||
|
@ -1,117 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
@ -1,28 +0,0 @@
|
||||
$FreeBSD$
|
||||
|
||||
Hugh F. Mahon's EasyEditor
|
||||
originals can be found at: http://mahon.cwx.net/
|
||||
http://www.users.qwest.net/~hmahon/
|
||||
|
||||
Imported by:
|
||||
|
||||
cvs import -m "Virgin import of Hugh F. Mahon's EasyEditor 1.4.1." \
|
||||
src/usr.bin/ee HUGH_F_MAHON ee_1_4_1
|
||||
|
||||
Notes:
|
||||
1. Due to an error this release was imported as 1.4.1, while in fact
|
||||
it is version 1.4.2.
|
||||
|
||||
2. Due to historical reasons files layout has been changed from the
|
||||
vendor's one. The following log shows details:
|
||||
|
||||
$ tar xvfz tar xvfz ee-1.4.2.src.tgz
|
||||
$ cd easyedit
|
||||
$ rm Makefile create.make genstr make.default
|
||||
$ mv README.ee README
|
||||
$ mkdir -p nls/en_US.US-ASCII
|
||||
$ mv ee.msg nls/en_US.US-ASCII/
|
||||
|
||||
|
||||
sobomax@FreeBSD.org
|
||||
27 May 2000
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${.CURDIR}/../../contrib/ee
|
||||
|
||||
CFLAGS+= -DCAP -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \
|
||||
-DHAS_CTYPE -DHAS_SYS_IOCTL -DHAS_SYS_WAIT -DSLCT_HDR
|
||||
|
||||
@ -21,7 +23,11 @@ NLSLINKS_de_DE.ISO8859-1= de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \
|
||||
|
||||
NLSSRCFILES=ee.msg
|
||||
.for lang in ${NLS}
|
||||
. if exists(${.CURDIR}/nls/${lang}/ee.msg)
|
||||
NLSSRCDIR_${lang}= ${.CURDIR}/nls/${lang}
|
||||
. else
|
||||
NLSSRCDIR_${lang}= ${.CURDIR}/../../contrib/ee
|
||||
. endif
|
||||
.endfor
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -1,116 +0,0 @@
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
The file new_curse.c contains a subset of 'curses', a package for
|
||||
applications to use 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. Unless problems occur during the building
|
||||
of ee, it is recommended that you use new_curse rather than the curses
|
||||
supplied with your system.
|
||||
|
||||
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". A make file which takes into account
|
||||
the characteristics of your system will be created, and then ee will be
|
||||
built. If there are problems encountered, you will be notified about
|
||||
them.
|
||||
|
||||
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 | |
|
||||
|\ /|
|
||||
| \/ |
|
||||
|
623
usr.bin/ee/ee.1
623
usr.bin/ee/ee.1
@ -1,623 +0,0 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 30, 1995
|
||||
.Dt EE 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm ee
|
||||
.Nd easy editor
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl eih
|
||||
.Op +#
|
||||
.Op Ar
|
||||
.Nm ree
|
||||
.Op Fl eih
|
||||
.Op +#
|
||||
.Op Ar
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
utility
|
||||
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
|
||||
.Nm ree
|
||||
utility is the same as
|
||||
.Nm ,
|
||||
but restricted to editing the named
|
||||
file (no file operations, or shell escapes are allowed).
|
||||
.Pp
|
||||
For
|
||||
.Nm
|
||||
to work properly, the environment variable
|
||||
.Ev TERM
|
||||
must be set to indicate the type of terminal being used.
|
||||
For
|
||||
example, for an
|
||||
.Tn HP 700/92
|
||||
terminal, the
|
||||
.Ev TERM
|
||||
variable should be set to "70092".
|
||||
See your System Administrator if
|
||||
you need more information.
|
||||
.Pp
|
||||
The following options are available:
|
||||
.Bl -tag -width indent
|
||||
.It Fl e
|
||||
Turn off expansion of tab character to spaces.
|
||||
.It Fl i
|
||||
Turn off display of information window at top of terminal.
|
||||
.It Fl h
|
||||
Turn off highlighting of borders of windows and menus (improves
|
||||
performance on some terminals).
|
||||
.It Sy +#
|
||||
Move the cursor to line '#' at startup.
|
||||
.El
|
||||
.Ss "Control keys"
|
||||
To do anything other than insert text, the user must use the control
|
||||
keys (the
|
||||
.Li Control
|
||||
key, represented by a "^", pressed in conjunction with an
|
||||
alphabetic key, e.g., ^a) and function keys available on the keyboard
|
||||
(such as
|
||||
.Em "Next Page" ,
|
||||
.Em "Prev Page" ,
|
||||
arrow keys, etc.).
|
||||
.Pp
|
||||
Since not all terminals have function keys,
|
||||
.Nm
|
||||
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
|
||||
.Em ^u .
|
||||
.Bl -tag -width indent
|
||||
.It ^a
|
||||
Prompt for the decimal value of a character to insert.
|
||||
.It ^b
|
||||
Move to the bottom of the text.
|
||||
.It ^c
|
||||
Get the prompt for a command.
|
||||
.It ^d
|
||||
Move the cursor down.
|
||||
.It ^e
|
||||
Prompt for the string to search for.
|
||||
.It ^f
|
||||
Undelete the last deleted character.
|
||||
.It ^g
|
||||
Move to the beginning of the line.
|
||||
.It ^h
|
||||
Backspace.
|
||||
.It ^i
|
||||
Tab.
|
||||
.It ^j
|
||||
Insert a newline.
|
||||
.It ^k
|
||||
Delete the character the cursor is sitting on.
|
||||
.It ^l
|
||||
Move the cursor left.
|
||||
.It ^m
|
||||
Insert a newline.
|
||||
.It ^n
|
||||
Move to the next page.
|
||||
.It ^o
|
||||
Move to the end of the line.
|
||||
.It ^p
|
||||
Move to the previous page.
|
||||
.It ^r
|
||||
Move the cursor to the right.
|
||||
.It ^t
|
||||
Move to the top of the text.
|
||||
.It ^u
|
||||
Move the cursor up.
|
||||
.It ^v
|
||||
Undelete the last deleted word.
|
||||
.It ^w
|
||||
Delete the word beginning at the cursor position.
|
||||
.It ^x
|
||||
Search.
|
||||
.It ^y
|
||||
Delete from the cursor position to the end of line.
|
||||
.It ^z
|
||||
Undelete the last deleted line.
|
||||
.It ^[ (ESC)
|
||||
Pop up menu.
|
||||
.El
|
||||
.Ss "EMACS keys mode"
|
||||
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
|
||||
.Em settings
|
||||
menu, or via the initialization file (see below).
|
||||
The mappings are as follows:
|
||||
.Bl -tag -width indent
|
||||
.It ^a
|
||||
Move to the beginning of the line.
|
||||
.It ^b
|
||||
Back 1 character.
|
||||
.It ^c
|
||||
Command prompt.
|
||||
.It ^d
|
||||
Delete character the cursor is sitting on.
|
||||
.It ^e
|
||||
End of line.
|
||||
.It ^f
|
||||
Forward 1 character.
|
||||
.It ^g
|
||||
Go back 1 page.
|
||||
.It ^h
|
||||
Backspace.
|
||||
.It ^i
|
||||
Tab.
|
||||
.It ^j
|
||||
Undelete last deleted character.
|
||||
.It ^k
|
||||
Delete line.
|
||||
.It ^l
|
||||
Undelete last deleted line.
|
||||
.It ^m
|
||||
Insert a newline.
|
||||
.It ^n
|
||||
Move to the next line.
|
||||
.It ^o
|
||||
Prompt for the decimal value of a character to insert.
|
||||
.It ^p
|
||||
Previous line.
|
||||
.It ^r
|
||||
Restore last deleted word.
|
||||
.It ^t
|
||||
Move to the top of the text.
|
||||
.It ^u
|
||||
Move to the bottom of the text.
|
||||
.It ^v
|
||||
Move to the next page.
|
||||
.It ^w
|
||||
Delete the word beginning at the cursor position.
|
||||
.It ^y
|
||||
Prompt for the string to search for.
|
||||
.It ^z
|
||||
Next word.
|
||||
.It ^[ (ESC)
|
||||
Pop up menu.
|
||||
.El
|
||||
.Ss "Function Keys"
|
||||
.Bl -tag -width indent
|
||||
.It Next Page
|
||||
Move to the next page.
|
||||
.It Prev Page
|
||||
Move to the previous page.
|
||||
.It Delete Char
|
||||
Delete the character the cursor is on.
|
||||
.It Delete Line
|
||||
Delete from the cursor to the end of line.
|
||||
.It Insert line
|
||||
Insert a newline at the cursor position.
|
||||
.It Arrow keys
|
||||
Move the cursor in the direction indicated.
|
||||
.El
|
||||
.Ss Commands
|
||||
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
|
||||
.Tn ESC
|
||||
key.
|
||||
The same operations, and more can be performed by obtaining the
|
||||
command prompt (^c) and typing in one of the commands below.
|
||||
.Bl -tag -width indent
|
||||
.It ! Ns Ar cmd
|
||||
Execute
|
||||
.Ar cmd
|
||||
in a shell.
|
||||
.It 0-9
|
||||
Move to the line indicated.
|
||||
.It case
|
||||
Make searches case sensitive.
|
||||
.It character
|
||||
Display the ASCII value of the character at the cursor.
|
||||
.It exit
|
||||
Save the edited text, and leave the editor.
|
||||
.It expand
|
||||
Expand tabs to spaces.
|
||||
.It file
|
||||
Print the name of the file.
|
||||
.It help
|
||||
Display help screen.
|
||||
.It line
|
||||
Display the current line number.
|
||||
.It nocase
|
||||
Make searches insensitive to case (the default).
|
||||
.It noexpand
|
||||
Do not expand tab to spaces when the TAB key is pressed.
|
||||
.It quit
|
||||
Leave the editor without saving changes.
|
||||
.It read Ar file
|
||||
Read the named
|
||||
.Ar file .
|
||||
.It write Ar file
|
||||
Write the text to the named
|
||||
.Ar file .
|
||||
.El
|
||||
.Ss "Menu Operations"
|
||||
Pop-up menus can be obtained by pressing the
|
||||
.Em escape
|
||||
key (or
|
||||
.Em ^[
|
||||
if no
|
||||
.Em 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
|
||||
.Em ^u
|
||||
for moving up and
|
||||
.Em ^d
|
||||
for moving down to move to the desired items in the menu, then press
|
||||
.Em return
|
||||
to perform the indicated task.
|
||||
.Pp
|
||||
To the left of each menu item is a letter, which if the corresponding
|
||||
letter is pressed on the keyboard selects that menu entry.
|
||||
.Pp
|
||||
The main menu in
|
||||
.Nm
|
||||
is as follows:
|
||||
.Bl -tag -width indent
|
||||
.It leave editor
|
||||
If changes have been made, the user will get a menu prompting whether or
|
||||
not the changes should be saved.
|
||||
.It help
|
||||
Display a help screen, with all of the keyboard operations and commands.
|
||||
.It file operations
|
||||
Pop 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
|
||||
.Sx "Initializing ee from a file" ) .
|
||||
.It redraw screen
|
||||
Provide a means to repaint the screen if the screen has been corrupted.
|
||||
.It settings
|
||||
Show 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
|
||||
.Em escape
|
||||
key.
|
||||
(See
|
||||
.Sx Modes
|
||||
below.)
|
||||
.It search
|
||||
Pop up a menu in which the user may choose to enter a string to search
|
||||
for, or search for a string already entered.
|
||||
.It miscellaneous
|
||||
Pop 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.
|
||||
.El
|
||||
.Ss "Paragraph Formatting"
|
||||
Paragraphs are defined for
|
||||
.Nm
|
||||
by a block of text bounded by:
|
||||
.Bl -bullet -width indent
|
||||
.It
|
||||
Begin or end of file.
|
||||
.It
|
||||
Line with no characters, or only spaces and/or tabs.
|
||||
.It
|
||||
Line starting with a period ('.') or right angle bracket ('>').
|
||||
.El
|
||||
.Pp
|
||||
A paragraph may be formatted two ways: explicitly by choosing the
|
||||
.Em format paragraph
|
||||
menu item, or by setting
|
||||
.Nm
|
||||
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
|
||||
.Nm :
|
||||
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
|
||||
.Em settings
|
||||
menu, the default is for the margin to be the right edge of the
|
||||
terminal).
|
||||
This is the mode that allows the
|
||||
.Em format paragraph
|
||||
menu item to work.
|
||||
.Pp
|
||||
"Automatic formatting" provides word-processor-like behavior.
|
||||
The user
|
||||
may type in text, while
|
||||
.Nm
|
||||
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.
|
||||
.Ss Modes
|
||||
Although
|
||||
.Nm
|
||||
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:
|
||||
.Bl -tag -width indent
|
||||
.It tab expansion
|
||||
Tabs may be inserted as a single tab character, or replaced with spaces.
|
||||
.It case sensitivity
|
||||
The search operation can be sensitive to whether characters are upper- or
|
||||
lower-case, or ignore case completely.
|
||||
.It margins observed
|
||||
Lines can either be truncated at the right margin, or extend on forever.
|
||||
.It auto paragraph formatting
|
||||
While typing in text, the editor can try to keep it looking reasonably well
|
||||
within the width of the screen.
|
||||
.It eightbit characters
|
||||
Toggle whether eight bit characters are displayed as their value in angle
|
||||
brackets (e.g.\& "<220>") or as a character.
|
||||
.It info window
|
||||
A window showing the keyboard operations that can be performed can be
|
||||
displayed or not.
|
||||
.It emacs keys
|
||||
Control keys may be given bindings similar to emacs, or not.
|
||||
.It 16 bit characters
|
||||
Toggles whether sixteen bit characters are handled as one 16-bit quantities or
|
||||
two 8-bit quantities.
|
||||
This works primarily with the Chinese Big 5 code set.
|
||||
.El
|
||||
.Pp
|
||||
You may set these modes via the initialization file (see below), or with a
|
||||
menu (see above).
|
||||
.Ss "Spell Checking"
|
||||
There are two ways to have the spelling in the text checked from
|
||||
.Nm .
|
||||
One is by the traditional
|
||||
.Xr spell 1
|
||||
command, the other is with the
|
||||
optional
|
||||
.Nm ispell
|
||||
command.
|
||||
.Pp
|
||||
Using
|
||||
.Nm spell ,
|
||||
the words that are not recognized will be placed at the top
|
||||
of the file.
|
||||
For the
|
||||
.Nm ispell
|
||||
option, the file is written to disk,
|
||||
then
|
||||
.Nm ispell
|
||||
run on the file, and the file read back in once
|
||||
.Nm ispell
|
||||
has completed making changes to the file.
|
||||
.Ss "Printing the contents of the editor"
|
||||
The user may select a menu item which prints the contents of the editor.
|
||||
The
|
||||
.Nm
|
||||
utility pipes the text in the editor to the command specified by the
|
||||
initialization command
|
||||
.Em printcommand
|
||||
(see the section
|
||||
.Sx Initializing ee from a file
|
||||
below).
|
||||
The default is to send the contents to
|
||||
.Xr lp 1 .
|
||||
.Pp
|
||||
Whatever the user assigns to
|
||||
.Em printcommand
|
||||
must take input from
|
||||
standard input.
|
||||
See your system administrator for more details.
|
||||
.Ss "Shell operations"
|
||||
Shell commands can be executed from within
|
||||
.Nm
|
||||
by selecting the
|
||||
.Em shell command
|
||||
item in the
|
||||
.Em miscellaneous
|
||||
menu, or by placing an exclamation mark ("!") before the command to
|
||||
execute at the
|
||||
.Em 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:
|
||||
.Dl ><!sort
|
||||
This would send the contents of the editor to be piped into the
|
||||
.Xr sort 1
|
||||
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.
|
||||
.Ss "Initializing ee from a file"
|
||||
Since different users have different preferences,
|
||||
.Nm
|
||||
allows some
|
||||
slight configurability.
|
||||
There are three possible locations for an
|
||||
initialization file for
|
||||
.Nm :
|
||||
the file
|
||||
.Pa /usr/share/misc/init.ee ,
|
||||
the file
|
||||
.Pa .init.ee
|
||||
in the user's home directory, or the file
|
||||
.Pa .init.ee
|
||||
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
|
||||
.Em print
|
||||
command),
|
||||
and the user to customize settings for particular directories (like one
|
||||
for correspondence, and a different directory for programming).
|
||||
.Pp
|
||||
The file
|
||||
.Pa /usr/share/misc/init.ee
|
||||
is read first, then
|
||||
.Pa $HOME/.init.ee ,
|
||||
then
|
||||
.Pa .init.ee ,
|
||||
with the settings specified by the
|
||||
most recent file read taking precedence.
|
||||
.Pp
|
||||
The following items may be entered in the initialization file:
|
||||
.Bl -tag -width indent
|
||||
.It case
|
||||
Set searches to be case sensitive.
|
||||
.It nocase
|
||||
Set searches to be insensitive to case (default).
|
||||
.It expand
|
||||
Cause
|
||||
.Nm
|
||||
to expand tabs to spaces (default).
|
||||
.It noexpand
|
||||
Cause
|
||||
.Nm
|
||||
to insert tabs as a single character.
|
||||
.It info
|
||||
A small information window is displayed at the top of the terminal
|
||||
(default).
|
||||
.It noinfo
|
||||
Turn off the display of the information window.
|
||||
.It margins
|
||||
Cause
|
||||
.Nm
|
||||
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).
|
||||
.It nomargins
|
||||
Allow lines to extend beyond the right margin.
|
||||
.It autoformat
|
||||
Cause
|
||||
.Nm
|
||||
to automatically try to format the current paragraph while
|
||||
text insertion is occurring.
|
||||
.It noautoformat
|
||||
Turn off automatic paragraph formatting (default).
|
||||
.It printcommand
|
||||
Allow the setting of the print command (default: "lp").
|
||||
.It rightmargin
|
||||
The user can select a value for the right margin (the first column on the
|
||||
screen is zero).
|
||||
.It highlight
|
||||
Turn on highlighting of border of information window and menus (default).
|
||||
.It nohighlight
|
||||
Turn off highlighting of border of information window and menus.
|
||||
.It eightbit
|
||||
Turn on display of eight bit characters.
|
||||
.It noeightbit
|
||||
Turn off display of eight bit characters (they are displayed as their decimal
|
||||
value inside angle brackets, e.g., "<220>").
|
||||
.It 16bit
|
||||
Turns on handling of 16-bit characters.
|
||||
.It no16bit
|
||||
Turns off handling of 16-bit characters.
|
||||
.It emacs
|
||||
Turns on emacs key bindings.
|
||||
.It noemacs
|
||||
Turns off emacs key bindings.
|
||||
.El
|
||||
.Ss "Save Editor Configuration"
|
||||
When using this entry from the
|
||||
.Em settings
|
||||
menu, the user may choose to save the current configuration of
|
||||
the editor (see
|
||||
.Sx Initializing ee from a file
|
||||
above) to a file named
|
||||
.Pa .init.ee
|
||||
in the current directory or the user's home directory.
|
||||
If a file named
|
||||
.Pa .init.ee
|
||||
already exists, it will be renamed
|
||||
.Pa .init.ee.old .
|
||||
.Sh CAVEATS
|
||||
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"
|
||||
The
|
||||
.Nm
|
||||
utility supports single-byte character code sets (eight-bit clean), or the
|
||||
Chinese Big-5 code set.
|
||||
(Other multi-byte code sets may function, but the
|
||||
reason Big-5 works is that a two-byte character also takes up two columns on
|
||||
the screen.)
|
||||
.Sh WARNINGS
|
||||
The automatic paragraph formatting operation
|
||||
may be too slow for slower systems.
|
||||
.Sh FILES
|
||||
.Bl -tag -width /usr/share/misc/init.ee -compact
|
||||
.It Pa /usr/share/misc/init.ee
|
||||
.It Pa $HOME/.init.ee
|
||||
.It Pa .init.ee
|
||||
.El
|
||||
.Sh AUTHORS
|
||||
The software
|
||||
.Nm
|
||||
was developed by
|
||||
.An 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, 1995, 1996 Hugh Mahon.
|
||||
.Sh "SEE ALSO"
|
||||
.Xr ispell 1 Pq Pa ports/textproc/ispell ,
|
||||
.Xr lpr 1 ,
|
||||
.Xr spell 1 ,
|
||||
.Xr termcap 5 ,
|
||||
.Xr terminfo 5 ,
|
||||
.Xr environ 7
|
5313
usr.bin/ee/ee.c
5313
usr.bin/ee/ee.c
File diff suppressed because it is too large
Load Diff
@ -1,158 +0,0 @@
|
||||
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 supports eight bit characters,
|
||||
as well as 16-bit characters. The Chinese Big 5 code set is the 16-bit
|
||||
code set that ee was modified to handle, as it is relatively easy to
|
||||
support since two byte characters also take up two columns on the screen,
|
||||
thereby simplifying the screen position calculations. Other multibyte
|
||||
code sets may function, but have not been tested.
|
||||
|
||||
(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
|
||||
161 fifth line of usage statement
|
||||
162 error message when unable to save configuration file
|
||||
163 positive feedback about saving the configuration file
|
||||
164 - 167 menu items for saving editor configuration
|
||||
168 error message when unable to save configuration file
|
||||
169 error message for ree when not specifying the file
|
||||
180 self-explanatory
|
||||
181 - 182 indicators of more information in menu (for when scrolling
|
||||
menus because menu contents won't fit vertically on screen)
|
||||
183 menu entry for modes menu for 16 bit characters
|
||||
184 - 185 strings for initialization to turn on or off 16 bit
|
||||
character handling
|
||||
|
||||
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.
|
@ -1,185 +0,0 @@
|
||||
$ This file contains the messages for ee ("easy editor"). See the file
|
||||
$ ee.i18n.guide for more information
|
||||
$
|
||||
$ For ee patchlevel 3
|
||||
$
|
||||
$ $FreeBSD$
|
||||
$
|
||||
$
|
||||
$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 ESC-Enter: exit ee "
|
||||
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 "+# :go to line # -i :no info window -e : don't 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 ESC-Enter: exit ee "
|
||||
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"
|
||||
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 begin of file "
|
||||
148 "^c command ^k delete line ^u end of file "
|
||||
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 begin of file ^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"
|
||||
162 "unable to open .init.ee for writing, no configuration saved!"
|
||||
163 "ee configuration saved in file %s"
|
||||
164 "save editor configuration"
|
||||
165 "save ee configuration"
|
||||
166 "save in current directory"
|
||||
167 "save in home directory"
|
||||
168 "ee configuration not saved"
|
||||
169 "must specify a file when invoking ree"
|
||||
180 "menu too large for window"
|
||||
181 "^^more^^"
|
||||
182 "VVmoreVV"
|
||||
183 "16 bit characters "
|
||||
184 "16BIT"
|
||||
185 "NO16BIT"
|
Loading…
Reference in New Issue
Block a user