Hi bde@ and ed@ I think the patch attached is the latest changes to bring it as it used to be before I synced the code with OpenBSD.
Mostly all issues that you both pointed out were addressed. Could you both make a review and point to me if there is any issue still remain? Basically this patch address: - Remove the extra information at the usage(). - Add space between variables on while() and for(). - Remove the extra space in a if statement. - Remove the extra brackets. - s/Reason/reason/g. All the best. 2015-08-10 11:24 GMT+08:00 Bruce Evans <b...@optusnet.com.au>: > On Mon, 10 Aug 2015, Marcelo Araujo wrote: > > 2015-08-09 19:51 GMT+08:00 Ed Schouten <e...@nuxi.nl>: >> >> Hi Marcelo, >>> >>> 2015-08-04 4:34 GMT+02:00 Marcelo Araujo <ara...@freebsd.org>: >>> >>>> Sync the code with the OpenBSD version. >>>> >>> >>> That's a shame. It looks like improvements that we made to our version >>> have been undone because of this. >>> ... >>> Though the style(9) conformance of tool wasn't ideal, this change made it >>> worse. >>> >> >> Agree with you! >> >> These tools are original from OpenBSD, I'm trying first to sync the code >> and then will rework them. I will try to send it back to upstream(OpenBSD) >> as soon as I have time. >> > > In fact, the changes were more than half to back out FreeBSD cleanups by > syncing with the 1994 OpenBSD version. The cleanups were small (less > than 50 lines changed), and OpenBSD doesn't seem to have changed much > either. > > Bruce > -- -- Marcelo Araujo (__)ara...@freebsd.org \\\'',)http://www.FreeBSD.org <http://www.freebsd.org/> \/ \ ^ Power To Server. .\. /_)
Index: ypmatch.c =================================================================== --- ypmatch.c (revision 286562) +++ ypmatch.c (working copy) @@ -68,12 +68,6 @@ fprintf(stderr, "%s\n%s\n", "usage: ypmatch [-kt] [-d domainname] key ... mapname", " ypmatch -x"); - fprintf(stderr, - "where\n" - "\tmapname may be either a mapname or a nickname for a map.\n" - "\t-k prints keys as well as values.\n" - "\t-t inhibits map nickname translation.\n" - "\t-x dumps the map nickname translation table.\n"); exit(1); } @@ -87,10 +81,10 @@ domainname = NULL; notrans = key = 0; - while ((c=getopt(argc, argv, "xd:kt")) != -1) + while ((c = getopt(argc, argv, "xd:kt")) != -1) switch (c) { case 'x': - for (i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++) + for (i = 0; i<sizeof ypaliases/sizeof ypaliases[0]; i++) printf("Use \"%s\" for \"%s\"\n", ypaliases[i].alias, ypaliases[i].name); @@ -108,16 +102,15 @@ usage(); } - if ((argc-optind) < 2 ) + if ((argc-optind) < 2) usage(); - if (domainname == NULL) { + if (domainname == NULL) yp_get_default_domain(&domainname); - } inmap = argv[argc-1]; if (notrans == 0) { - for (i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++) + for (i = 0; i<sizeof ypaliases/sizeof ypaliases[0]; i++) if (strcmp(inmap, ypaliases[i].alias) == 0) inmap = ypaliases[i].name; } @@ -137,7 +130,7 @@ case YPERR_YPBIND: errx(1, "not running ypbind"); default: - errx(1, "can't match key %s in map %s. Reason: %s", + errx(1, "can't match key %s in map %s. reason: %s", inkey, inmap, yperr_string(r)); rval = 1; break;
_______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"