From: Keith Bostic Date: Mon, 28 Nov 1988 10:13:10 +0000 (-0800) Subject: backward compatible processing for "+/pattern" X-Git-Tag: BSD-4_3_Net_1-Snapshot-Development~215 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/56c4581e8030ca6db4de634f231d66520748f938?hp=b279662279912badd659f51548c48d295e6910e3 backward compatible processing for "+/pattern" SCCS-vsn: usr.bin/more/option.c 5.7 --- diff --git a/usr/src/usr.bin/more/option.c b/usr/src/usr.bin/more/option.c index afcd157bc8..9e12be2c65 100644 --- a/usr/src/usr.bin/more/option.c +++ b/usr/src/usr.bin/more/option.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)option.c 5.6 (Berkeley) %G%"; +static char sccsid[] = "@(#)option.c 5.7 (Berkeley) %G%"; #endif /* not lint */ #include @@ -48,6 +48,12 @@ option(argc, argv) int ch; char *p; + /* backward compatible processing for "+/search" */ + char **a; + for (a = argv; *a; ++a) + if ((*a)[0] == '+' && (*a)[1] == '/') + (*a)[0] = '-'; + optind = 1; /* called twice, re-init getopt. */ while ((ch = getopt(argc, argv, "0123456789/:ceinpst:ux:")) != EOF) switch((char)ch) {