From owner-svn-src-all@FreeBSD.ORG Fri Oct 29 21:44:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8D861065674; Fri, 29 Oct 2010 21:44:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CEAC8FC1C; Fri, 29 Oct 2010 21:44:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9TLihwF060027; Fri, 29 Oct 2010 21:44:43 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9TLihVc060022; Fri, 29 Oct 2010 21:44:43 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010292144.o9TLihVc060022@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 29 Oct 2010 21:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214538 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2010 21:44:43 -0000 Author: jilles Date: Fri Oct 29 21:44:43 2010 New Revision: 214538 URL: http://svn.freebsd.org/changeset/base/214538 Log: sh: Tweak some string constants to reduce code size. * Reduce some needless differences. * Shorten some error messages that should not happen. Modified: head/bin/sh/eval.c head/bin/sh/histedit.c head/bin/sh/parser.c head/bin/sh/var.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Fri Oct 29 21:29:43 2010 (r214537) +++ head/bin/sh/eval.c Fri Oct 29 21:44:43 2010 (r214538) @@ -1130,7 +1130,7 @@ commandcmd(int argc, char **argv) return typecmd_impl(2, argv - 1, cmd, path); } if (argc != 0) - error("commandcmd() called while it should not be"); + error("commandcmd bad call"); /* * Do nothing successfully if no command was specified; Modified: head/bin/sh/histedit.c ============================================================================== --- head/bin/sh/histedit.c Fri Oct 29 21:29:43 2010 (r214537) +++ head/bin/sh/histedit.c Fri Oct 29 21:44:43 2010 (r214538) @@ -297,7 +297,7 @@ histcmd(int argc, char **argv) laststr = argv[1]; break; default: - error("too many args"); + error("too many arguments"); } /* * Turn into event numbers. @@ -329,7 +329,7 @@ histcmd(int argc, char **argv) editfile = editfilestr; if ((efp = fdopen(fd, "w")) == NULL) { close(fd); - error("can't allocate stdio buffer for temp"); + error("Out of space"); } } Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Oct 29 21:29:43 2010 (r214537) +++ head/bin/sh/parser.c Fri Oct 29 21:44:43 2010 (r214538) @@ -1738,7 +1738,7 @@ getprompt(void *unused __unused) char *fmt; const char *pwd; int i, trim; - static char internal_error[] = ""; + static char internal_error[] = "??"; /* * Select prompt format. Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Fri Oct 29 21:29:43 2010 (r214537) +++ head/bin/sh/var.c Fri Oct 29 21:44:43 2010 (r214538) @@ -826,7 +826,7 @@ setvarcmd(int argc, char **argv) else if (argc == 3) setvar(argv[1], argv[2], 0); else - error("List assignment not implemented"); + error("too many arguments"); return 0; }