Date: Tue, 20 Jan 1998 09:01:35 +0900 (JST) From: shigio@wafu.netgate.net To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: shigio@wafu.netgate.net Subject: bin/5529: expand(1) cannot treat argument correctly. Message-ID: <199801200118.RAA12428@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 5529 >Category: bin >Synopsis: expand(1) cannot treat argument correctly. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 19 17:20:00 PST 1998 >Last-Modified: >Originator: Shigio Yamaguchi >Organization: Freelance programmer >Release: FreeBSD 2.2.5-RELEASE >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++; } >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801200118.RAA12428>