From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA08692; Fri, 11 Jan 2002 10:26:58 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA08609 for caml-list@pauillac.inria.fr; Fri, 11 Jan 2002 10:26:58 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA29632 for ; Wed, 9 Jan 2002 17:20:29 +0100 (MET) Received: from dpt-info.u-strasbg.fr (dpt-info.u-strasbg.fr [130.79.44.193]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g09GKSj27945 for ; Wed, 9 Jan 2002 17:20:28 +0100 (MET) Received: (from luther@localhost) by dpt-info.u-strasbg.fr (8.9.3/8.9.3) id RAA16207 for caml-list@inria.fr; Wed, 9 Jan 2002 17:20:37 +0100 Date: Wed, 9 Jan 2002 17:20:37 +0100 From: Sven To: caml-list@inria.fr Subject: [Caml-list] ocaml magic file ... Message-ID: <20020109172037.A16133@dpt-info.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, ... I have this small magic file (to put in /etc/magic) for file to recognize the various .cm* file types. here it is : -------- cut here -------------- # Magic local data for file(1) command. # Insert here your local magic data. Format is described in magic(5). 0 string Caml1999 Objective Caml >8 string X exec file >8 string I interface file\ (*.cmi) >8 string O object file\ (*.cmo) >8 string A library file\ (*.cma) >8 string Y native object file\ (*.cmx) >8 string Z native library file\ (*.cmxa) >8 string M 'ast_impl' file >8 string N 'ast_intf' file >9 string >\0 (Version %3.3s). -------- cut here -------------- It gives this kind of output for the various ocaml kind of files i know of. digest.cmi: Objective Caml interface file\ (*.cmi) (Version 008). profiling.cmo: Objective Caml object file\ (*.cmo) (Version 004). dynlink.cma: Objective Caml library file\ (*.cma) (Version 006). random.cmx: Objective Caml native object file\ (*.cmx) (Version 006). bigarray.cmxa: Objective Caml native library file\ (*.cmxa) (Version 008). I don't really know what the ast_impl, the ast_intf and the exec file type are all about, so these may not be the best strings around. I plan to sent this to the maintainer of the debian package including the file utility, and would like other people to review it, just to see if i did a very big mistake somewhere. Also, feel free to move it to your /etc/magic, or to use it for any other kind of use. Friendly, Sven Luther ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr