summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes10
-rw-r--r--ee.110
-rwxr-xr-xee.c61
-rw-r--r--ee_version.h6
4 files changed, 59 insertions, 28 deletions
diff --git a/Changes b/Changes
index b86ea3033599..bfb0c18437ca 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,13 @@
+version 1.4.5a (12/23/2001)
+- modified get_options to be cleaner for arg handling
+
+version 1.4.5 (12/15/2001)
+- made changes to check usage of arguments provided so that if a file is
+ specified options are no longer accepted (that is, they are treated as file
+ names)
+- changed to use ee_version.h to allow changing version number without need
+ to change ee.c directly
+
version 1.4.4 (8/17/2001)
- added code to check if the parent process has died, and if so to exit
gracefully
diff --git a/ee.1 b/ee.1
index be79cbf6c50d..18de1bb2629b 100644
--- a/ee.1
+++ b/ee.1
@@ -4,7 +4,7 @@
.\"
.\" nroff -man ee.1
.\"
-.\" $Header: /home/hugh/sources/old_ae/RCS/ee.1,v 1.19 1995/11/29 04:03:15 hugh Exp hugh $
+.\" $Header: /home/hugh/sources/old_ae/RCS/ee.1,v 1.22 2001/12/16 04:49:27 hugh Exp $
.\"
.\"
.TH ee 1 "" "" "" ""
@@ -29,6 +29,10 @@ is the same as
but restricted to editing the named
file (no file operations, or shell escapes are allowed).
.PP
+An editor with similar user-friendly qualities but more features is available
+and is called
+.I aee.
+.PP
For
.I ee
to work properly, the environment variable
@@ -532,8 +536,8 @@ 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.
+Copyright (c) 1990, 1991, 1992, 1993, 1995, 1996, 2001 Hugh Mahon.
.SH "SEE ALSO"
.PP
-termcap(4), terminfo(4), environ(5), spell(1), ispell(1), lp(1)
+termcap(4), terminfo(4), environ(5), spell(1), ispell(1), lp(1), aee(1)
diff --git a/ee.c b/ee.c
index 584cdd6aef8a..f2628e1f9eae 100755
--- a/ee.c
+++ b/ee.c
@@ -49,7 +49,7 @@
| proprietary information which is protected by
| copyright. All rights are reserved.
|
- | $Header: /home/hugh/sources/old_ae/RCS/ee.c,v 1.97 2001/08/17 23:14:05 hugh Exp $
+ | $Header: /home/hugh/sources/old_ae/RCS/ee.c,v 1.99 2001/12/24 05:43:32 hugh Exp $
|
*/
@@ -62,7 +62,9 @@ char *ee_long_notice[] = {
"copyright. All rights are reserved."
};
-char *version = "@(#) ee, version 1.4.1 $Revision: 1.97 $";
+#include "ee_version.h"
+
+char *version = "@(#) ee, version " EE_VERSION " $Revision: 1.99 $";
#ifdef NCURSE
#include "new_curse.h"
@@ -2046,6 +2048,7 @@ char *arguments[];
struct files *temp_names;
char *name;
char *ptr;
+ int no_more_opts = FALSE;
/*
| see if editor was invoked as 'ree' (restricted mode)
@@ -2062,7 +2065,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))
@@ -2086,37 +2089,45 @@ char *arguments[];
fprintf(stderr, usage4);
exit(1);
}
- else if (*buff == '+')
+ else if ((*buff == '+') && (start_at_line == NULL))
{
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
diff --git a/ee_version.h b/ee_version.h
new file mode 100644
index 000000000000..fc767408239d
--- /dev/null
+++ b/ee_version.h
@@ -0,0 +1,6 @@
+/*
+ | provide a version number for ee
+ */
+
+#define EE_VERSION "1.4.5a"
+#define DATE_STRING "$Date: 2001/12/24 05:43:10 $"