From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <62e4022c76189277635e462989273aaf@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: Error reporting (Was: [9fans] GNU Make) Date: Thu, 3 Jun 2004 15:19:21 +0100 From: rog@vitanuova.com In-Reply-To: <0cb1cff0f6c4661c7af319469e1f7c7c@terzarima.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-qjpzgfqamizweevmlpzhbupame" Topicbox-Message-UUID: 9313a07e-eacd-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-qjpzgfqamizweevmlpzhbupame Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit > i assume because it reads better, in english anyway this is a pity. i think something like: file does not exist: '/usr/rog/dvfgfdds' is just as readable, and adheres to the usual convention for cascading of error messages (most to least recent; truncation can occur at the end if necessary). it is sometimes necessary to have a program distinguish between error messages, and the way i've seen some programs deal with the current convention: n = sizeof " does not exist" - 1; if(strlen(e) > n && strcmp(strlen(e)-n, " does not exist")){ /* file does not exist */ } is just wrong. --upas-qjpzgfqamizweevmlpzhbupame Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by doppio; Thu Jun 3 15:03:43 BST 2004 Received: from psuvax1.cse.psu.edu (localhost [127.0.0.1]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6D2DC19DFE for ; Thu, 3 Jun 2004 09:58:08 -0400 (EDT) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: from localhost (neuromancer.cse.psu.edu [130.203.4.2]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2238119A63 for <9fans@cse.psu.edu>; Thu, 3 Jun 2004 09:57:36 -0400 (EDT) Received: from mail.cse.psu.edu ([130.203.4.6]) by localhost (neuromancer [130.203.4.2]) (amavisd-new, port 10024) with LMTP id 27784-01-57 for <9fans@cse.psu.edu>; Thu, 3 Jun 2004 09:57:34 -0400 (EDT) Received: from lavoro.terzarima.net (spc1-york1-5-0-cust44.seac.broadband.ntl.com [80.0.45.44]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 232E819DE9 for <9fans@cse.psu.edu>; Thu, 3 Jun 2004 09:57:34 -0400 (EDT) Message-ID: <0cb1cff0f6c4661c7af319469e1f7c7c@terzarima.net> To: 9fans@cse.psu.edu Subject: Re: Error reporting (Was: [9fans] GNU Make) From: Charles Forsyth Date: Thu, 3 Jun 2004 14:54:01 +0100 In-Reply-To: <4a8f5dee0a8d8ba7be23785692dd2317@vitanuova.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-kjxrucklxhyfmftgvdfaaeuoqs" X-Virus-Scanned: by amavisd-new at cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces+rog=vitanuova.com@cse.psu.edu Errors-To: 9fans-bounces+rog=vitanuova.com@cse.psu.edu This is a multi-part message in MIME format. --upas-kjxrucklxhyfmftgvdfaaeuoqs Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit i assume because it reads better, in english anyway --upas-kjxrucklxhyfmftgvdfaaeuoqs Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by lavoro; Thu Jun 3 14:57:06 BST 2004 Received: from psuvax1.cse.psu.edu (localhost [127.0.0.1]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 4513A19E46 for ; Thu, 3 Jun 2004 09:55:50 -0400 (EDT) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: from localhost (neuromancer.cse.psu.edu [130.203.4.2]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7EE6119DE9 for <9fans@cse.psu.edu>; Thu, 3 Jun 2004 09:55:38 -0400 (EDT) Received: from mail.cse.psu.edu ([130.203.4.6]) by localhost (neuromancer [130.203.4.2]) (amavisd-new, port 10024) with LMTP id 27777-01-50 for <9fans@cse.psu.edu>; Thu, 3 Jun 2004 09:55:37 -0400 (EDT) Received: from smtp.vitanuova.com (unknown [62.254.170.97]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id AD42219A63 for <9fans@cse.psu.edu>; Thu, 3 Jun 2004 09:55:36 -0400 (EDT) Message-ID: <4a8f5dee0a8d8ba7be23785692dd2317@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: Error reporting (Was: [9fans] GNU Make) Date: Thu, 3 Jun 2004 15:01:47 +0100 From: rog@vitanuova.com In-Reply-To: <4b34059e61c4f6071f83af2fb750cfe3@proxima.alt.za> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces+forsyth=terzarima.net@cse.psu.edu Errors-To: 9fans-bounces+forsyth=terzarima.net@cse.psu.edu > you return the %r chunk and then hash it into an associative array of translated messages, indexed by hash. no you couldn't, 'cos the kernel adds a filename for some error messages. was there a good reason why the filename was put in front of the error message rather than vice versa? it seems odd - it means you have to parse the error message, rather than just doing a strncmp, and you don't have to worry too much about the filename being truncated at the end. --upas-kjxrucklxhyfmftgvdfaaeuoqs-- --upas-qjpzgfqamizweevmlpzhbupame--