From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 17:06:19 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 C9F7E106564A; Mon, 28 Jun 2010 17:06:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FB8E8FC19; Mon, 28 Jun 2010 17:06:19 +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 o5SH6JnY064462; Mon, 28 Jun 2010 17:06:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SH6JVE064460; Mon, 28 Jun 2010 17:06:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201006281706.o5SH6JVE064460@svn.freebsd.org> From: Xin LI Date: Mon, 28 Jun 2010 17:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209576 - stable/8/bin/pax 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: Mon, 28 Jun 2010 17:06:20 -0000 Author: delphij Date: Mon Jun 28 17:06:19 2010 New Revision: 209576 URL: http://svn.freebsd.org/changeset/base/209576 Log: MFC r205942: Merge OpenBSD revisions 1.4 through 1.9, mostly style cleanups. Obtained from: OpenBSD Modified: stable/8/bin/pax/getoldopt.c Directory Properties: stable/8/bin/pax/ (props changed) Modified: stable/8/bin/pax/getoldopt.c ============================================================================== --- stable/8/bin/pax/getoldopt.c Mon Jun 28 14:15:54 2010 (r209575) +++ stable/8/bin/pax/getoldopt.c Mon Jun 28 17:06:19 2010 (r209576) @@ -1,4 +1,4 @@ -/* $OpenBSD: getoldopt.c,v 1.4 2000/01/22 20:24:51 deraadt Exp $ */ +/* $OpenBSD: getoldopt.c,v 1.9 2009/10/27 23:59:22 deraadt Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /*- @@ -7,7 +7,7 @@ * otherwise, it uses the old rules used by tar, dump, and ps. * * Written 25 August 1985 by John Gilmore (ihnp4!hoptoad!gnu) and placed - * in the Pubic Domain for your edification and enjoyment. + * in the Public Domain for your edification and enjoyment. */ #include @@ -33,7 +33,8 @@ getoldopt(int argc, char **argv, const c optarg = NULL; if (key == NULL) { /* First time */ - if (argc < 2) return EOF; + if (argc < 2) + return (-1); key = argv[1]; if (*key == '-') use_getopt++; @@ -42,18 +43,18 @@ getoldopt(int argc, char **argv, const c } if (use_getopt) - return getopt(argc, argv, optstring); + return (getopt(argc, argv, optstring)); c = *key++; if (c == '\0') { key--; - return EOF; + return (-1); } place = strchr(optstring, c); if (place == NULL || c == ':') { fprintf(stderr, "%s: unknown option %c\n", argv[0], c); - return('?'); + return ('?'); } place++; @@ -64,9 +65,9 @@ getoldopt(int argc, char **argv, const c } else { fprintf(stderr, "%s: %c argument missing\n", argv[0], c); - return('?'); + return ('?'); } } - return(c); + return (c); }