English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Shallow copy of a record
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-01-22 (17:03)
From: Chris King <colanderman@g...>
Subject: Re: [Caml-list] Shallow copy of a record
On Sat, 22 Jan 2005 10:59:27 +0000, Jon Harrop <jon@jdh30.plus.com> 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!)