summaryrefslogtreecommitdiffstats
path: root/usr.bin/ee
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1998-01-12 07:51:07 +0000
committercharnier <charnier@FreeBSD.org>1998-01-12 07:51:07 +0000
commit40915b07bac623d99818ce029fe97e87fdcee7ae (patch)
tree3af91056dce55bde5edaa69888611ff23bf182b9 /usr.bin/ee
parentf8e5dea18291d1de0e6165c2c114244249314b07 (diff)
downloadFreeBSD-src-40915b07bac623d99818ce029fe97e87fdcee7ae.zip
FreeBSD-src-40915b07bac623d99818ce029fe97e87fdcee7ae.tar.gz
Use Id instead of Header. Sort #includes. Use err(3) and change exit(-1).
Diffstat (limited to 'usr.bin/ee')
-rw-r--r--usr.bin/ee/ee.c42
1 files changed, 19 insertions, 23 deletions
diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c
index fe6ee74..b53f146 100644
--- a/usr.bin/ee/ee.c
+++ b/usr.bin/ee/ee.c
@@ -48,11 +48,13 @@
| This software and documentation contains
| proprietary information which is protected by
| copyright. All rights are reserved.
- |
- | $Header: /home/ncvs/src/usr.bin/ee/ee.c,v 1.7 1996/12/29 10:54:10 joerg Exp $
- |
*/
+#ifndef lint
+static const char rcsid[] =
+ "$Id$";
+#endif /* not lint */
+
char *ee_copyright_message =
"Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996 Hugh Mahon ";
@@ -62,7 +64,7 @@ char *ee_long_notice[] = {
"copyright. All rights are reserved."
};
-char *version = "@(#) ee, version 1.3 $Revision: 1.7 $";
+char *version = "@(#) ee, version 1.3 $Revision: 1.8 $";
#ifdef NCURSE
#include "new_curse.h"
@@ -72,35 +74,30 @@ char *version = "@(#) ee, version 1.3 $Revision: 1.7 $";
#include <curses.h>
#endif
-#include <signal.h>
+#ifdef HAS_CTYPE
+#include <ctype.h>
+#endif
+#include <err.h>
+#include <errno.h>
#include <fcntl.h>
+#include <pwd.h>
+#include <signal.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_STDLIB
+#include <stdlib.h>
+#endif
+#include <string.h>
#ifdef HAS_UNISTD
#include <unistd.h>
#endif
-#ifdef HAS_CTYPE
-#include <ctype.h>
-#endif
-
-
#ifndef NO_CATGETS
#include <locale.h>
#include <nl_types.h>
@@ -3054,8 +3051,7 @@ 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);
+ errx(1, exec_err_msg, path);
}
else /* if the parent */
{
@@ -4973,7 +4969,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");
OpenPOWER on IntegriCloud