From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: tuhs-bounces@minnie.tuhs.org X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.1 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id a4443541 for ; Fri, 24 Aug 2018 10:58:53 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id EAED6A1A2E; Fri, 24 Aug 2018 20:58:51 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 59C41A1A1A; Fri, 24 Aug 2018 20:58:42 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 09261A1A1A; Fri, 24 Aug 2018 20:58:40 +1000 (AEST) X-Greylist: delayed 452 seconds by postgrey-1.35 at minnie.tuhs.org; Fri, 24 Aug 2018 20:58:39 AEST Received: from avasout07.plus.net (avasout07.plus.net [84.93.230.235]) by minnie.tuhs.org (Postfix) with ESMTPS id 6739DA1A19 for ; Fri, 24 Aug 2018 20:58:39 +1000 (AEST) Received: from mindy.dunnington.cx ([84.92.27.202]) by smtp with ESMTP id t9gFfbLqbjlDzt9gGfqpuT; Fri, 24 Aug 2018 11:51:05 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=GrdsBH9C c=1 sm=1 tr=0 a=W5Q3TbzFkoGugBkjAUuyvQ==:117 a=W5Q3TbzFkoGugBkjAUuyvQ==:17 a=IkcTkHD0fZMA:10 a=dapMudl6Dx4A:10 a=53hEF3hdf4F6cJwScfgA:9 a=QEXdDO2ut3YA:10 Received: from [172.17.2.96] (natpool1.dunnington.cx [84.92.27.201]) by mindy.dunnington.cx (8.12.9/8.12.9/8.12.9.08) with ESMTP id w7OAfjb4008805 for ; Fri, 24 Aug 2018 11:41:46 +0100 (BST) To: tuhs@minnie.tuhs.org References: <10c401d43aef$8be34870$a3a9d950$@ronnatalie.com> <151301d43b2f$07881ed0$16985c70$@ronnatalie.com> <4130AFB4-1740-46BC-AA98-F9D01549049C@bitblocks.com> From: Pete Turnbull Message-ID: <0b4dd231-93f5-dbf2-fe5c-42b4a3fb464d@dunnington.plus.com> Date: Fri, 24 Aug 2018 11:41:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <4130AFB4-1740-46BC-AA98-F9D01549049C@bitblocks.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfFdQFfV5CO2kVkNkAgWFKbFuTHc9jgyWXu8h4CBKL7Bdd4bhjxbqYKVaCRQNKQpNDpE6Ju5ddsYACet+FZwM1MlMstMrx5/70H4/Us2Ws3C/oC/OvJZH df3qcdxe//6uweSo7yKiupwxiV9Wnc8bjXQgRQUBKDfEh2+fvLUJocyhR1/Z13MD3p6D73ls1U3YQA== Subject: Re: [TUHS] C++ / Kernel X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On 24/08/2018 02:41, Bakul Shah wrote: >>From what I recall {c,m,re}alloc() returned a char*, not a void *. > I don't have K&R1 handy at the moment so can't recall if void* was > mentioned in the book (if not, that could be one reason for a lack of > its use). Yes, K&R1 specifically states that alloc(n) returns a char* (page 97), calloc(n, sizeof(obj)) returns a pointer to whatever type you specify (page 157), and void isn't mentioned anywhere in the book that I can see. -- Pete Pete Turnbull