summaryrefslogtreecommitdiffstats
path: root/bin/echo/echo.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-08-31 17:25:55 +0000
committerjkh <jkh@FreeBSD.org>1995-08-31 17:25:55 +0000
commit46a8ec79866af63a1ebb6ccfdb9dbc2ac69f979d (patch)
tree217e765b340a446289a167de6be25ad42d5e423b /bin/echo/echo.c
parent762f88b9d5ac8acf15dceb070040cb6814df0b40 (diff)
downloadFreeBSD-src-46a8ec79866af63a1ebb6ccfdb9dbc2ac69f979d.zip
FreeBSD-src-46a8ec79866af63a1ebb6ccfdb9dbc2ac69f979d.tar.gz
Well, it would appear that the "ayes" have it (though by a slim margin).
Apply my \c changes to echo. It should also be noted that this is: A) going into 2.2, not 2.1 B) a functional no-op unless you actually use it!
Diffstat (limited to 'bin/echo/echo.c')
-rw-r--r--bin/echo/echo.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/echo/echo.c b/bin/echo/echo.c
index ba9f9ed..e604765 100644
--- a/bin/echo/echo.c
+++ b/bin/echo/echo.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: echo.c,v 1.2 1994/09/24 02:55:18 davidg Exp $
*/
#ifndef lint
@@ -62,8 +62,14 @@ main(argc, argv)
else
nflag = 0;
- while (*argv) {
- (void)printf("%s", *argv);
+ while (argv[0]) {
+ int len = strlen(argv[0]);
+
+ if (len >= 2 && !argv[1] && argv[0][len - 2] == '\\' && argv[0][len - 1] == 'c') {
+ argv[0][len - 2] = '\0';
+ nflag = 1;
+ }
+ (void)printf("%s", argv[0]);
if (*++argv)
putchar(' ');
}
OpenPOWER on IntegriCloud