From tim@robbins.dropbear.id.au  Sun Mar 24 17:29:18 2002
Return-Path: <tim@robbins.dropbear.id.au>
Received: from descent.robbins.dropbear.id.au (227.c.001.mel.iprimus.net.au [203.134.131.227])
	by hub.freebsd.org (Postfix) with ESMTP id 1523D37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Mar 2002 17:29:10 -0800 (PST)
Received: (from tim@localhost)
	by descent.robbins.dropbear.id.au (8.11.6/8.11.6) id g2P1QCx16439;
	Mon, 25 Mar 2002 12:26:13 +1100 (EST)
	(envelope-from tim)
Message-Id: <200203250126.g2P1QCx16439@descent.robbins.dropbear.id.au>
Date: Mon, 25 Mar 2002 12:26:13 +1100 (EST)
From: "Tim J. Robbins" <tim@robbins.dropbear.id.au>
Reply-To: "Tim J. Robbins" <tim@robbins.dropbear.id.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: join(1) SYNOPSIS and usage() are misleading
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36270
>Category:       bin
>Synopsis:       join(1) SYNOPSIS and usage() are misleading
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 24 17:30:00 PST 2002
>Closed-Date:    Wed Jun 19 04:20:39 PDT 2002
>Last-Modified:  Wed Jun 19 04:20:39 PDT 2002
>Originator:     Tim J. Robbins
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD descent.robbins.dropbear.id.au 4.5-STABLE FreeBSD 4.5-STABLE #17: Thu Mar 21 19:48:18 EST 2002 tim@descent.robbins.dropbear.id.au:/usr/obj/usr/src/sys/DESCENT i386


	
>Description:
The SYNOPSIS section of join(1) and the usage() function in join.c
indicate that you can invoke it as "join -a 2" (for example), which does
not work due to hacks added to make obsolete syntax work.
>How-To-Repeat:
join -a 2 foo bar
>Fix:

This patch corrects the documentation. According to the SUSV3 standard,
we should accept both -a2 and -a 2, and error when -a is used without
an argument, however.

The POSIX.2 conformance claim may also need to be removed from the manual
page.

Index: join.1
===================================================================
RCS file: /home/ncvs/src/usr.bin/join/join.1,v
retrieving revision 1.7
diff -u -r1.7 join.1
--- join.1	2001/08/15 09:09:41	1.7
+++ join.1	2002/03/25 01:23:24
@@ -44,7 +44,7 @@
 .Sh SYNOPSIS
 .Nm
 .Oo
-.Fl a Ar file_number | Fl v Ar file_number
+.Fl a Ns Ar file_number | Fl v Ar file_number
 .Oc
 .Op Fl e Ar string
 .Op Fl j Ar file_number field
Index: join.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/join/join.c,v
retrieving revision 1.11
diff -u -r1.11 join.c
--- join.c	2002/03/22 01:22:46	1.11
+++ join.c	2002/03/25 01:23:29
@@ -590,7 +590,7 @@
 usage()
 {
 	(void)fprintf(stderr, "%s %s\n%s\n",
-	    "usage: join [-a fileno | -v fileno ] [-e string] [-1 field]",
+	    "usage: join [-afileno | -v fileno ] [-e string] [-1 field]",
 	    "[-2 field]",
 		"            [-o list] [-t char] file1 file2");
 	exit(1);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: tjr 
State-Changed-When: Fri Apr 19 19:01:45 PDT 2002 
State-Changed-Why:  
Committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36270 

From: "Tim J. Robbins" <tjr@FreeBSD.ORG>
To: bug-followup@FreeBSD.ORG
Cc:  
Subject: Re: bin/36270: join(1) SYNOPSIS and usage() are misleading
Date: Sat, 20 Apr 2002 12:16:28 +1000

 On Fri, Apr 19, 2002 at 07:02:15PM -0700, tjr@FreeBSD.org wrote:
 
 > Synopsis: join(1) SYNOPSIS and usage() are misleading
 > 
 > State-Changed-From-To: open->patched
 > State-Changed-By: tjr
 > State-Changed-When: Fri Apr 19 19:01:45 PDT 2002
 > State-Changed-Why: 
 > Committed.
 
 I neglected to mention that the fix I committed was not the one suggested
 in the PR, but rather the opposite. Instead of changing the synopsis
 to point out that there must be no space between -a and its argument, I
 made it accept it with a space (per SUSv3).
State-Changed-From-To: patched->closed 
State-Changed-By: tjr 
State-Changed-When: Wed Jun 19 04:20:02 PDT 2002 
State-Changed-Why:  
Change has been MFC'd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36270 
>Unformatted:
