From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <06b0efc5b992d3c28581a18eb09a9196@plan9.bell-labs.com> From: presotto@plan9.bell-labs.com To: arisawa@ar.aichi-u.ac.jp, 9fans@cse.psu.edu Subject: Re: [9fans] getfields() MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-yzpfhoxrpvbhvktffnwafurrfh" Date: Fri, 6 Dec 2002 12:44:29 -0500 Topicbox-Message-UUID: 2f7858f4-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-yzpfhoxrpvbhvktffnwafurrfh Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I think its a 'lack of a specification' bug. I would find it surprising if I hadn't seen the code and just read the man page. If I can't figure out a reasonable way to explain it in the man page, I'll change the code. --upas-yzpfhoxrpvbhvktffnwafurrfh Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Fri Dec 6 09:21:16 EST 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Fri Dec 6 09:21:15 EST 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 4A536199E3; Fri, 6 Dec 2002 09:21:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from ar.aichi-u.ac.jp (ar.aichi-u.ac.jp [202.250.160.40]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 2FC9D1999B for <9fans@cse.psu.edu>; Fri, 6 Dec 2002 09:20:00 -0500 (EST) Received: from ar.aichi-u.ac.jp ([61.211.130.19]) by ar; Fri Dec 6 23:19:57 JST 2002 Mime-Version: 1.0 (Apple Message framework v548) Content-Type: text/plain; charset=US-ASCII; format=flowed From: Kenji Arisawa To: 9fans@cse.psu.edu Content-Transfer-Encoding: 7bit Message-Id: X-Mailer: Apple Mail (2.548) Subject: [9fans] getfields() Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 6 Dec 2002 23:19:56 +0900 Hello, Is the following is a specification or bug? #include #include void main(int argc, char *argv[]) { char *args[2]; char *line; line = "##alice###bob###"; getfields(line, args, 2, 1, "#"); print("%s,%s\n", args[0], args[1]); } The output is: alice,bob### Kenji Arisawa --upas-yzpfhoxrpvbhvktffnwafurrfh--