From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id BB5B7BB91 for ; Sat, 22 Jan 2005 18:03:11 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0MH3Bm0000999 for ; Sat, 22 Jan 2005 18:03:11 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA28792 for ; Sat, 22 Jan 2005 18:03:10 +0100 (MET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0MH3A1x000996 for ; Sat, 22 Jan 2005 18:03:10 +0100 Received: by wproxy.gmail.com with SMTP id 71so214533wra for ; Sat, 22 Jan 2005 09:03:09 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=Ri3pVPgdUFAcWD4fFtsRr37X2HBXEGRvwXJeAdfUJTKtaD1mZj1uRWPeh0X4hQqg+dpm19mnYQpUdw5vSNZ1QLIGF7GhIFLO7TK4l8FbmoXj4W2F9UWEmL4Zbw8jIEzGob1xxOtUmS808D1ikabAuk2rsWUaicvxhfD16yWLFVg= Received: by 10.54.7.6 with SMTP id 6mr120483wrg; Sat, 22 Jan 2005 09:03:09 -0800 (PST) Received: by 10.54.5.8 with HTTP; Sat, 22 Jan 2005 09:03:09 -0800 (PST) Message-ID: <875c7e070501220903587e4476@mail.gmail.com> Date: Sat, 22 Jan 2005 12:03:09 -0500 From: Chris King Reply-To: Chris King To: Jon Harrop Subject: Re: [Caml-list] Shallow copy of a record Cc: "O'Caml Mailing List" In-Reply-To: <200501221059.28064.jon@jdh30.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <875c7e0705012120277c090ec8@mail.gmail.com> <200501221059.28064.jon@jdh30.plus.com> X-Miltered: at nez-perce with ID 41F2874F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41F2874E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 tcgetattr:01 tcgetattr:01 functional:02 bugs:03 terminal:04 terminal:04 structure:04 chris:05 problem:05 indeed:05 probably:05 preferable:05 background:91 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: On Sat, 22 Jan 2005 10:59:27 +0000, Jon Harrop wrote: > Why do you want to do this? My specific need is to make a copy of the structure returned by tcgetattr to be used to reset the terminal state (i.e. one seperate from the "working" copy used to change the terminal state). I realize that I can just call tcgetattr twice (and indeed that's probably preferable in a functional language) but my C background wants me just to make a copy :). (I've actually thought of other reasons not to do this, but the problem still bugs me!)