From shigio@wafu.netgate.net Mon Jan 19 17:18:52 1998 Received: from wafu.netgate.net (wafu.netgate.net [204.145.147.80]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA12428 for ; Mon, 19 Jan 1998 17:18:51 -0800 (PST) (envelope-from shigio@wafu.netgate.net) Received: (qmail 19167 invoked from network); 19 Jan 1998 17:22:05 -0000 Received: from ins76.tama.dti.ne.jp (HELO chiota.signet.or.jp) (210.159.144.30) by wafu.netgate.net with SMTP; 19 Jan 1998 17:22:05 -0000 Received: (from shigio@localhost) by chiota.signet.or.jp (8.8.5/) id JAA10119; Tue, 20 Jan 1998 09:01:35 +0900 (JST) Message-Id: <199801200118.RAA12428@hub.freebsd.org> Date: Tue, 20 Jan 1998 09:01:35 +0900 (JST) From: shigio@wafu.netgate.net Reply-To: shigio@wafu.netgate.net To: FreeBSD-gnats-submit@freebsd.org Cc: shigio@wafu.netgate.net Subject: expand(1) cannot treat argument correctly. X-Send-Pr-Version: 3.2 >Number: 5529 >Category: bin >Synopsis: expand(1) cannot treat argument correctly. >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: Mon Jan 19 17:20:00 PST 1998 >Closed-Date: Sun Feb 1 23:20:01 PST 1998 >Last-Modified: Sun Feb 1 23:24:37 PST 1998 >Originator: Shigio Yamaguchi >Release: FreeBSD 2.2.5-RELEASE >Organization: Freelance programmer >Environment: FreeBSD 2.2.5-RELEASE >Description: Expand(1) often assumes file name as a tab spec because it overlook first character of the arguments. For example, 'i10' is assumed as '-10'. As the result that it cannot treat such file name. >How-To-Repeat: % expand i10 (doesn't return) or % echo > i386 % expand i386 Bad tab stop spec >Fix: *** expand.c.org Tue Jan 20 07:38:48 1998 --- expand.c Tue Jan 20 08:45:52 1998 *************** *** 69,75 **** register int n; /* handle obsolete syntax */ ! while (argc > 1 && argv[1][0] && isdigit(argv[1][1])) { getstops(&argv[1][1]); argc--; argv++; } --- 69,75 ---- register int n; /* handle obsolete syntax */ ! while (argc > 1 && argv[1][0] == '-' && isdigit(argv[1][1])) { getstops(&argv[1][1]); argc--; argv++; } >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: cwt State-Changed-When: Sun Feb 1 23:20:01 PST 1998 State-Changed-Why: Suggested fix applied in rev 1.3 of expand.c and also in 2.2.5-stable rev 1.1.1.1.8.2 of expand.c. Thanks! >Unformatted: