+Objective Caml 3.11.2:
+----------------------
+
+Bug fixes:
+- PR#4151: better documentation for min and max w.r.t. NaN
+- PR#4421: ocamlbuild uses wrong compiler for C files
+- PR#4710, PR#4720: ocamlbuild does not use properly configuration information
+- PR#4750: under some Windows installations, high start-up times for Unix lib
+- PR#4777: problem with scanf and CRLF
+- PR#4810: BSD problem with socket addresses, e.g. in Unix.getnameinfo
+- PR#4813: issue with parsing of float literals by the GNU assembler
+- PR#4816: problem with modules and private types
+- PR#4818: missed opportunity for type-based optimization of bigarray accesses
+- PR#4821: check for duplicate method names in classes
+- PR#4823: build problem on Mac OS X
+- PR#4836: spurious errors raised by Unix.single_write under Windows
+- PR#4841, PR#4860, PR#4930: problem with ocamlopt -output-obj under Mac OS X
+- PR#4847: C compiler error with ocamlc -output-obj under Win64
+- PR#4856: ocamlbuild uses ocamlrun to execute a native plugin
+- PR#4867, PR#4760: ocamlopt -shared fails on Mac OS X 64bit
+- PR#4873: ocamlbuild ignores "thread" tag when building a custom toplevel
+- PR#4890: ocamlbuild tries to use native plugin on bytecode-only arch
+- PR#4896: ocamlbuild should always pass -I to tools for external libraries
+- PR#4900: small bug triggering automatic compaction even if max_overhead = 1M
+- PR#4902: bug in %.0F printf format
+- PR#4910: problem with format concatenation
+- PR#4922: ocamlbuild recompiles too many files
+- PR#4923: missing \xff for scanf %S
+- PR#4933: functors not handling private types correctly
+- Module Printf: the simple conversion %F (without width indication) was not
+ treated properly.
+- Makefile: problem with cygwin, flexdll, and symbolic links
+
+Feature wishes:
+- PR#9: (tentative implementation) make ocamldebug use #linenum annotations
+- PR#123, PR#4477: custom exception printers
+- PR#3456: Obj.double_field and Obj.set_double_field functions
+- PR#4003: destination directory can be given to Filename.[open_]temp_file
+- PR#4647: Buffer.blit function
+- PR#4685: access to Filename.dir_sep
+- PR#4703: support for debugging embedded applications
+- PR#4723: "clear_rules" function to empty the set of ocamlbuild rules
+- PR#4921: configure option to help cross-compilers
+
Objective Caml 3.11.1:
----------------------
(contributed by Jonathan Davies, Citrix).
- Support for 64-bit mode in Solaris/x86 (PR#4670).
+
Objective Caml 3.11.0:
----------------------
- Small bugs in the make-package-macosx script
- Bug in typing of polymorphic variants (reported on caml-list)
+
Objective Caml 3.10.1:
----------------------
* First public release.
-$Id: Changes,v 1.183.2.18 2009/06/12 11:58:19 doligez Exp $
+$Id: Changes 9482 2009-12-22 13:32:12Z doligez $
-as <assembler and options> (default: determined automatically)
The assembler to use for assembling ocamlopt-generated code.
--aspp <assembler and options> (default: determined automatically>
+-aspp <assembler and options> (default: determined automatically)
The assembler to use for assembling the parts of the
run-time system manually written in assembly language.
This assembler must preprocess its input with the C preprocessor.
Installation in /usr, man pages in section "l":
./configure -bindir /usr/bin -libdir /usr/lib/ocaml -mandir /usr/man/manl
- On a MacOSX/Intel Core 2 or MacOSX/PowerPC host, to build a 64-bit version
- of OCaml:
+ On a MacOSX 10.5/Intel Core 2 or MacOSX 10.5/PowerPC host,
+ to build a 64-bit version of OCaml:
./configure -cc "gcc -m64"
+ On a MacOSX 10.6/Intel Core 2, to build a 32-bit version of OCaml:
+ ./configure -cc "gcc -m32" -as "as -arch i386" -aspp "gcc -m32 -c"
+
On a Linux x86/64 bits host, to build a 32-bit version of OCaml:
./configure -cc "gcc -m32" -as "as --32" -aspp "gcc -m32 -c"
make opt > log.opt 2>&1 # in sh
make opt >& log.opt # in csh
-5- (Optional) If you want to compile fast versions of the Objective
-Caml compilers, you can compile them with the native-code compiler
-(they are compiled to bytecode by default). Just do:
+5- Compile fast versions of the Objective Caml compilers, by
+compiling them with the native-code compiler (you have only compiled
+them to bytecode so far). Just do:
make opt.opt
# #
#########################################################################
-# $Id: Makefile,v 1.222.2.3 2009/05/19 14:46:13 doligez Exp $
+# $Id: Makefile 9480 2009-12-18 23:04:13Z doligez $
# The main Makefile
# The runtime system for the native-code compiler
-runtimeopt:
+runtimeopt: makeruntimeopt
+ cp asmrun/libasmrun.a stdlib/libasmrun.a
+
+makeruntimeopt:
cd asmrun; $(MAKE) all
- if test -f stdlib/libasmrun.a; then :; else \
- ln -s ../asmrun/libasmrun.a stdlib/libasmrun.a; fi
clean::
cd asmrun; $(MAKE) clean
.PHONY: ocamldoc.opt ocamllex ocamllex.opt ocamltools ocamltools.opt
.PHONY: ocamlyacc opt-core opt opt.opt otherlibraries
.PHONY: otherlibrariesopt package-macosx promote promote-cross
-.PHONY: restore runtime runtimeopt world world.opt
+.PHONY: restore runtime runtimeopt makeruntimeopt world world.opt
include .depend
# #
#########################################################################
-# $Id: Makefile.nt,v 1.113.2.1 2008/11/10 16:13:20 ertai Exp $
+# $Id: Makefile.nt 9127 2008-11-10 16:13:20Z ertai $
# The main Makefile
----
-$Id: README,v 1.44.14.1 2008/12/02 17:11:22 xleroy Exp $
+$Id: README 9146 2008-12-02 17:11:22Z xleroy $
-3.11.1
+3.11.2+rc1
# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli
-# $Id: VERSION,v 1.26.2.19 2009/06/12 11:58:19 doligez Exp $
+# $Id: VERSION 9500 2009-12-28 13:13:23Z doligez $
<otherlibs/num/nums.cm{,x}a> or <otherlibs/dbm/dbm.cm{,x}a>: ocamlmklib
<otherlibs/{,win32}graph/graphics.cm{,x}a>: ocamlmklib
<otherlibs/threads/threads.cm{,x}a>: ocamlmklib
+"otherlibs/threads/unix.cma": ocamlmklib
<otherlibs/bigarray/bigarray.cm{,x}a>: ocamlmklib
<otherlibs/{bigarray,systhreads}/**.ml*>: include_unix
<otherlibs/bigarray/**>: otherlibs_bigarray
<otherlibs/num/**>: otherlibs_num
<otherlibs/threads/**>: otherlibs_threads
+"otherlibs/threads/unix.cma": -otherlibs_threads
<otherlibs/systhreads/**>: otherlibs_systhreads
<otherlibs/dbm/**>: otherlibs_dbm
<otherlibs/graph/**>: otherlibs_graph
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.10 2002/11/29 15:03:36 xleroy Exp $ *)
+(* $Id: arch.ml 5304 2002-11-29 15:03:37Z xleroy $ *)
(* Specific operations for the Alpha processor *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.42 2006/04/16 23:28:14 doligez Exp $ *)
+(* $Id: emit.mlp 9314 2009-07-15 12:14:39Z xleroy $ *)
module LabelSet =
Set.Make(struct type t = Linearize.label let compare = compare end)
long decimal constants *)
` .quad 0x{emit_string(Nativeint.format "%x" n)}\n`
| Csingle f ->
- ` .float {emit_string f}\n`
+ emit_float32_directive ".long" f
| Cdouble f ->
- ` .double {emit_string f}\n`
+ emit_float64_directive ".quad" f
| Csymbol_address s ->
` .quad {emit_symbol s}\n`
| Clabel_address lbl ->
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.7 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the Alpha processor *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.3 1999/11/17 18:56:40 xleroy Exp $ *)
+(* $Id: reload.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Reloading for the Alpha *)
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.6 1999/11/17 18:56:40 xleroy Exp $ *)
+(* $Id: scheduling.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
open Arch
open Mach
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.12 2001/07/24 08:01:25 xleroy Exp $ *)
+(* $Id: selection.ml 3593 2001-07-24 08:01:25Z xleroy $ *)
(* Instruction selection for the Alpha processor *)
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.3 2007/01/01 13:07:35 xleroy Exp $ *)
+(* $Id: arch.ml 7784 2007-01-01 13:07:35Z xleroy $ *)
(* Machine-specific command-line options *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.16.2.4 2009/03/28 15:10:04 xleroy Exp $ *)
+(* $Id: emit.mlp 9475 2009-12-16 10:04:38Z xleroy $ *)
(* Emission of x86-64 (AMD 64) assembly code *)
end
| Lswitch jumptbl ->
let lbl = new_label() in
- if !pic_code || !Clflags.dlcode then begin
- (* PR#4424: r11 is known to be clobbered by the Lswitch,
- meaning that no variable that is live across the Lswitch
- is assigned to r11. However, the argument to Lswitch
- can still be assigned to r11, so we need to special-case
- this situation. *)
- if i.arg.(0).loc = Reg 9 (* ie r11, cf amd64/proc.ml *) then begin
- ` salq $3, %r11\n`;
- ` pushq %r11\n`;
- ` leaq {emit_label lbl}(%rip), %r11\n`;
- ` addq 0(%rsp), %r11\n`;
- ` addq $8, %rsp\n`;
- ` jmp *(%r11)\n`
- end else begin
- ` leaq {emit_label lbl}(%rip), %r11\n`;
- ` jmp *(%r11, {emit_reg i.arg.(0)}, 8)\n`
- end
- end else begin
- ` jmp *{emit_label lbl}(, {emit_reg i.arg.(0)}, 8)\n`
- end;
+ (* rax and rdx are clobbered by the Lswitch,
+ meaning that no variable that is live across the Lswitch
+ is assigned to rax or rdx. However, the argument to Lswitch
+ can still be assigned to one of these two registers, so
+ we must be careful not to clobber it before use. *)
+ let (tmp1, tmp2) =
+ if i.arg.(0).loc = Reg 0 (* rax *)
+ then (phys_reg 4 (*rdx*), phys_reg 0 (*rax*))
+ else (phys_reg 0 (*rax*), phys_reg 4 (*rdx*)) in
+ ` leaq {emit_label lbl}(%rip), {emit_reg tmp1}\n`;
+ ` movslq ({emit_reg tmp1}, {emit_reg i.arg.(0)}, 4), {emit_reg tmp2}\n`;
+ ` addq {emit_reg tmp2}, {emit_reg tmp1}\n`;
+ ` jmp *{emit_reg tmp1}\n`;
if macosx
then ` .const\n`
else ` .section .rodata\n`;
- emit_align 8;
+ emit_align 4;
`{emit_label lbl}:`;
for i = 0 to Array.length jumptbl - 1 do
- ` .quad {emit_label jumptbl.(i)}\n`
+ ` .long {emit_label jumptbl.(i)} - {emit_label lbl}\n`
done;
` .text\n`
| Lsetuptrap lbl ->
(* Emission of the floating-point constants *)
let emit_float_constant (lbl, cst) =
- `{emit_label lbl}: .double {emit_string cst}\n`
+ `{emit_label lbl}:`;
+ emit_float64_directive ".quad" cst
(* Emission of the profiling prelude *)
bound_error_call := 0;
` .text\n`;
emit_align 16;
- if macosx && is_generic_function fundecl.fun_name
+ if macosx
+ && not !Clflags.output_c_object
+ && is_generic_function fundecl.fun_name
then (* PR#4690 *)
` .private_extern {emit_symbol fundecl.fun_name}\n`
else
| Cint n ->
` .quad {emit_nativeint n}\n`
| Csingle f ->
- ` .float {emit_string f}\n`
+ emit_float32_directive ".long" f
| Cdouble f ->
- ` .double {emit_string f}\n`
+ emit_float64_directive ".quad" f
| Csymbol_address s ->
` .quad {emit_symbol s}\n`
| Clabel_address lbl ->
(* *)
(***********************************************************************)
-(* $Id: emit_nt.mlp,v 1.7 2008/01/11 16:13:11 doligez Exp $ *)
+(* $Id: emit_nt.mlp 8768 2008-01-11 16:13:18Z doligez $ *)
(* Emission of x86-64 (AMD 64) assembly code, MASM syntax *)
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.5.4.1 2009/03/28 15:52:13 xleroy Exp $ *)
+(* $Id: proc.ml 9342 2009-09-18 13:49:21Z xleroy $ *)
(* Description of the AMD64 processor *)
let rax = phys_reg 0
let rcx = phys_reg 5
let rdx = phys_reg 4
-let r11 = phys_reg 9
let rxmm15 = phys_reg 115
let stack_slot slot ty =
| Iop(Istore(Single, _)) -> [| rxmm15 |]
| Iop(Ialloc _ | Iintop(Icomp _) | Iintop_imm((Idiv|Imod|Icomp _), _))
-> [| rax |]
- | Iswitch(_, _) when !pic_code || !Clflags.dlcode -> [| r11 |]
+ | Iswitch(_, _) -> [| rax; rdx |]
| _ -> [||]
let destroyed_at_raise = all_phys_regs
(* *)
(***********************************************************************)
-(* $Id: proc_nt.ml,v 1.4 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc_nt.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the AMD64 processor with Win64 conventions *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.6 2007/11/06 15:16:55 frisch Exp $ *)
+(* $Id: reload.ml 8477 2007-11-06 15:16:56Z frisch $ *)
open Cmm
open Arch
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.1 2003/06/30 08:28:44 xleroy Exp $ *)
+(* $Id: scheduling.ml 5634 2003-06-30 08:28:48Z xleroy $ *)
open Schedgen (* to create a dependency *)
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.7.4.1 2008/10/29 14:32:01 xleroy Exp $ *)
+(* $Id: selection.ml 9114 2008-10-29 14:32:01Z xleroy $ *)
(* Instruction selection for the AMD64 *)
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.9 2002/11/29 15:03:36 xleroy Exp $ *)
+(* $Id: arch.ml 5304 2002-11-29 15:03:37Z xleroy $ *)
(* Specific operations for the ARM processor *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.19 2008/01/11 16:13:11 doligez Exp $ *)
+(* $Id: emit.mlp 9314 2009-07-15 12:14:39Z xleroy $ *)
(* Emission of ARM assembly code *)
| Csingle f ->
` .float {emit_string f}\n`
| Cdouble f ->
+ (* FIXME: this version of the ARM port is mixed-endian, so we
+ use .double instead of emit_float64_directive. The next
+ version is little-endian, so we'll use emit_float64 then. *)
` .align 0\n`;
` .double {emit_string f}\n`
| Csymbol_address s ->
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.9 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the ARM processor *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.4 1999/11/17 18:56:41 xleroy Exp $ *)
+(* $Id: reload.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Reloading for the ARM *)
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.4 1999/11/17 18:56:41 xleroy Exp $ *)
+(* $Id: scheduling.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
open Mach
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.7 2008/01/11 16:13:11 doligez Exp $ *)
+(* $Id: selection.ml 8768 2008-01-11 16:13:18Z doligez $ *)
(* Instruction selection for the ARM processor *)
(* *)
(***********************************************************************)
-(* $Id: asmgen.ml,v 1.22 2008/07/24 05:35:22 frisch Exp $ *)
+(* $Id: asmgen.ml 8930 2008-07-24 05:35:22Z frisch $ *)
(* From lambda to assembly code *)
(* *)
(***********************************************************************)
-(* $Id: asmgen.mli,v 1.8 2007/11/06 15:16:55 frisch Exp $ *)
+(* $Id: asmgen.mli 8477 2007-11-06 15:16:56Z frisch $ *)
(* From lambda to assembly code *)
(* *)
(***********************************************************************)
-(* $Id: asmlibrarian.ml,v 1.14 2005/09/24 16:45:56 xleroy Exp $ *)
+(* $Id: asmlibrarian.ml 7079 2005-09-24 16:45:56Z xleroy $ *)
(* Build libraries of .cmx files *)
(* *)
(***********************************************************************)
-(* $Id: asmlibrarian.mli,v 1.6 2000/04/21 08:10:27 weis Exp $ *)
+(* $Id: asmlibrarian.mli 3123 2000-04-21 08:13:22Z weis $ *)
(* Build libraries of .cmx files *)
(* *)
(***********************************************************************)
-(* $Id: asmlink.ml,v 1.78 2008/01/31 09:13:07 frisch Exp $ *)
+(* $Id: asmlink.ml 9338 2009-09-16 14:03:37Z garrigue $ *)
(* Link a set of .cmx/.o files and produce an executable *)
(fun (info, file_name, crc) -> check_consistency file_name info crc)
units_tolink;
Clflags.ccobjs := !Clflags.ccobjs @ !lib_ccobjs;
+ Clflags.ccopts := !lib_ccopts @ !Clflags.ccopts;
let objfiles = List.rev (List.map object_file_name objfiles) @
!Clflags.ccobjs in
(* *)
(***********************************************************************)
-(* $Id: asmlink.mli,v 1.12 2007/11/06 15:16:55 frisch Exp $ *)
+(* $Id: asmlink.mli 8477 2007-11-06 15:16:56Z frisch $ *)
(* Link a set of .cmx/.o files and produce an executable or a plugin *)
(* *)
(***********************************************************************)
-(* $Id: asmpackager.ml,v 1.26 2007/11/15 16:09:57 frisch Exp $ *)
+(* $Id: asmpackager.ml 8523 2007-11-15 16:09:57Z frisch $ *)
(* "Package" a set of .cmx/.o files into one .cmx/.o file having the
original compilation units as sub-modules. *)
(* *)
(***********************************************************************)
-(* $Id: asmpackager.mli,v 1.2 2005/08/01 15:51:09 xleroy Exp $ *)
+(* $Id: asmpackager.mli 7003 2005-08-01 15:51:09Z xleroy $ *)
(* "Package" a set of .cmx/.o files into one .cmx/.o file having the
original compilation units as sub-modules. *)
(* *)
(***********************************************************************)
-(* $Id: clambda.ml,v 1.17 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: clambda.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* A variant of the "lambda" code with direct / indirect calls explicit
and closures explicit too *)
(* *)
(***********************************************************************)
-(* $Id: clambda.mli,v 1.17 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: clambda.mli 7812 2007-01-29 12:11:18Z xleroy $ *)
(* A variant of the "lambda" code with direct / indirect calls explicit
and closures explicit too *)
(* *)
(***********************************************************************)
-(* $Id: closure.ml,v 1.55 2008/08/01 12:52:14 xleroy Exp $ *)
+(* $Id: closure.ml 8966 2008-08-01 12:52:14Z xleroy $ *)
(* Introduction of closures, uncurrying, recognition of direct calls *)
(* *)
(***********************************************************************)
-(* $Id: closure.mli,v 1.5 1999/11/17 18:56:30 xleroy Exp $ *)
+(* $Id: closure.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Introduction of closures, uncurrying, recognition of direct calls *)
(* *)
(***********************************************************************)
-(* $Id: cmm.ml,v 1.21 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: cmm.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
type machtype_component =
Addr
(* *)
(***********************************************************************)
-(* $Id: cmm.mli,v 1.21 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: cmm.mli 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Second intermediate language (machine independent) *)
(* *)
(***********************************************************************)
-(* $Id: cmmgen.ml,v 1.114.2.1 2009/01/26 17:06:10 xleroy Exp $ *)
+(* $Id: cmmgen.ml 9167 2009-01-26 17:06:10Z xleroy $ *)
(* Translation from closed lambda to C-- *)
(* *)
(***********************************************************************)
-(* $Id: cmmgen.mli,v 1.16 2008/01/31 09:13:08 frisch Exp $ *)
+(* $Id: cmmgen.mli 8800 2008-01-31 09:13:19Z frisch $ *)
(* Translation from closed lambda to C-- *)
(* *)
(***********************************************************************)
-(* $Id: codegen.ml,v 1.7 2000/04/21 08:10:29 weis Exp $ *)
+(* $Id: codegen.ml 3123 2000-04-21 08:13:22Z weis $ *)
(* From C-- to assembly code *)
(* *)
(***********************************************************************)
-(* $Id: codegen.mli,v 1.4 1999/11/17 18:56:31 xleroy Exp $ *)
+(* $Id: codegen.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* From C-- to assembly code *)
(* *)
(***********************************************************************)
-(* $Id: coloring.ml,v 1.13 2004/08/12 13:34:42 xleroy Exp $ *)
+(* $Id: coloring.ml 6592 2004-08-12 13:34:42Z xleroy $ *)
(* Register allocation by coloring of the interference graph *)
(* *)
(***********************************************************************)
-(* $Id: coloring.mli,v 1.4 1999/11/17 18:56:31 xleroy Exp $ *)
+(* $Id: coloring.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Register allocation by coloring of the interference graph *)
(* *)
(***********************************************************************)
-(* $Id: comballoc.ml,v 1.4 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: comballoc.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Combine heap allocations occurring in the same basic block *)
(* *)
(***********************************************************************)
-(* $Id: comballoc.mli,v 1.2 1999/11/17 18:56:32 xleroy Exp $ *)
+(* $Id: comballoc.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Combine heap allocations occurring in the same basic block *)
(* *)
(***********************************************************************)
-(* $Id: compilenv.ml,v 1.24 2007/11/06 15:16:55 frisch Exp $ *)
+(* $Id: compilenv.ml 8477 2007-11-06 15:16:56Z frisch $ *)
(* Compilation environments for compilation units *)
(* *)
(***********************************************************************)
-(* $Id: compilenv.mli,v 1.17 2007/11/06 15:16:55 frisch Exp $ *)
+(* $Id: compilenv.mli 8477 2007-11-06 15:16:56Z frisch $ *)
(* Compilation environments for compilation units *)
(* *)
(***********************************************************************)
-(* $Id: emit.mli,v 1.5 1999/11/17 18:56:32 xleroy Exp $ *)
+(* $Id: emit.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Generation of assembly code *)
(* *)
(***********************************************************************)
-(* $Id: emitaux.ml,v 1.12.12.1 2009/01/26 17:06:10 xleroy Exp $ *)
+(* $Id: emitaux.ml 9314 2009-07-15 12:14:39Z xleroy $ *)
(* Common functions for emitting assembly code *)
done;
if !pos > 0 then emit_char '\n'
+(* PR#4813: assemblers do strange things with float literals indeed,
+ so we convert to IEEE representation ourselves and emit float
+ literals as 32- or 64-bit integers. *)
+
+let emit_float64_directive directive f =
+ let x = Int64.bits_of_float (float_of_string f) in
+ emit_printf "\t%s\t0x%Lx\n" directive x
+
+let emit_float64_split_directive directive f =
+ let x = Int64.bits_of_float (float_of_string f) in
+ let lo = Int64.logand x 0xFFFF_FFFFL
+ and hi = Int64.shift_right_logical x 32 in
+ emit_printf "\t%s\t0x%Lx, 0x%Lx\n"
+ directive
+ (if Arch.big_endian then hi else lo)
+ (if Arch.big_endian then lo else hi)
+
+let emit_float32_directive directive f =
+ let x = Int32.bits_of_float (float_of_string f) in
+ emit_printf "\t%s\t0x%lx\n" directive x
+
(* Record live pointers at call points *)
type frame_descr =
(* *)
(***********************************************************************)
-(* $Id: emitaux.mli,v 1.12.12.1 2009/01/26 17:06:10 xleroy Exp $ *)
+(* $Id: emitaux.mli 9314 2009-07-15 12:14:39Z xleroy $ *)
(* Common functions for emitting assembly code *)
val emit_string_literal: string -> unit
val emit_string_directive: string -> string -> unit
val emit_bytes_directive: string -> string -> unit
+val emit_float64_directive: string -> string -> unit
+val emit_float64_split_directive: string -> string -> unit
+val emit_float32_directive: string -> string -> unit
type frame_descr =
{ fd_lbl: int; (* Return address *)
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.7 2002/11/29 15:03:36 xleroy Exp $ *)
+(* $Id: arch.ml 5304 2002-11-29 15:03:37Z xleroy $ *)
(* Specific operations for the HP PA-RISC processor *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.20 2006/04/16 23:28:14 doligez Exp $ *)
+(* $Id: emit.mlp 9475 2009-12-16 10:04:38Z xleroy $ *)
(* Emission of HP PA-RISC assembly code *)
` .text\n`;
emit_align 8;
List.iter
- (fun (lbl, cst) -> `{emit_label lbl}: .double {emit_string cst}\n`)
+ (fun (lbl, cst) ->
+ `{emit_label lbl}:`;
+ emit_float64_split_directive ".long" cst)
!float_constants;
float_constants := []
| Cint n ->
` .long {emit_nativeint n}\n`
| Csingle f ->
- ` .float {emit_string f}\n`
+ emit_float32_directive ".long" f
| Cdouble f ->
- ` .double {emit_string f}\n`
+ emit_float64_split_directive ".long" f
| Csymbol_address s ->
use_symbol s;
` .long {emit_symbol s}\n`
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.8 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the HP PA-RISC processor *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.4 2008/01/11 16:13:11 doligez Exp $ *)
+(* $Id: reload.ml 8768 2008-01-11 16:13:18Z doligez $ *)
(* Reloading for the HPPA *)
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.4 1999/11/17 18:56:42 xleroy Exp $ *)
+(* $Id: scheduling.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Instruction scheduling for the HPPA *)
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.6 2008/01/11 16:13:11 doligez Exp $ *)
+(* $Id: selection.ml 8768 2008-01-11 16:13:18Z doligez $ *)
(* Instruction selection for the HPPA processor *)
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.13 2006/04/16 23:28:14 doligez Exp $ *)
+(* $Id: arch.ml 7382 2006-04-16 23:28:22Z doligez $ *)
(* Machine-specific command-line options *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.41.2.4 2009/03/28 15:10:04 xleroy Exp $ *)
+(* $Id: emit.mlp 9475 2009-12-16 10:04:38Z xleroy $ *)
(* Emission of Intel 386 assembly code *)
let emit_float_constant (lbl, cst) =
` .data\n`;
- `{emit_label lbl}: .double {emit_string cst}\n`
+ `{emit_label lbl}:`;
+ emit_float64_split_directive ".long" cst
(* Emission of external symbol references (for MacOSX) *)
bound_error_call := 0;
` .text\n`;
emit_align 16;
- if macosx && is_generic_function fundecl.fun_name
+ if macosx
+ && not !Clflags.output_c_object
+ && is_generic_function fundecl.fun_name
then (* PR#4690 *)
` .private_extern {emit_symbol fundecl.fun_name}\n`
else
| Cint n ->
` .long {emit_nativeint n}\n`
| Csingle f ->
- ` .float {emit_string f}\n`
+ emit_float32_directive ".long" f
| Cdouble f ->
- ` .double {emit_string f}\n`
+ emit_float64_split_directive ".long" f
| Csymbol_address s ->
` .long {emit_symbol s}\n`
| Clabel_address lbl ->
(* *)
(***********************************************************************)
-(* $Id: emit_nt.mlp,v 1.28.4.1 2009/03/21 16:15:47 xleroy Exp $ *)
+(* $Id: emit_nt.mlp 9189 2009-03-21 16:15:47Z xleroy $ *)
(* Emission of Intel 386 assembly code, MASM syntax. *)
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.14 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the Intel 386 processor *)
(* *)
(***********************************************************************)
-(* $Id: proc_nt.ml,v 1.8 2008/01/11 16:13:11 doligez Exp $ *)
+(* $Id: proc_nt.ml 8768 2008-01-11 16:13:18Z doligez $ *)
(* Description of the Intel 386 processor, for Windows NT *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.6 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: reload.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
open Cmm
open Arch
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.3 2000/02/04 12:43:18 xleroy Exp $ *)
+(* $Id: scheduling.ml 2779 2000-02-04 12:43:18Z xleroy $ *)
open Schedgen (* to create a dependency *)
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.15 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: selection.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Instruction selection for the Intel x86 *)
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.5 2002/11/29 15:03:36 xleroy Exp $ *)
+(* $Id: arch.ml 5304 2002-11-29 15:03:37Z xleroy $ *)
(* Specific operations for the IA64 processor *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.17 2004/07/13 12:18:53 xleroy Exp $ *)
+(* $Id: emit.mlp 9314 2009-07-15 12:14:39Z xleroy $ *)
(* Emission of IA64 assembly code *)
| Cint n ->
` data8 {emit_nativeint n}\n`
| Csingle f ->
- ` real4 {emit_string f}\n`
+ emit_float32_directive "data4" f
| Cdouble f ->
- ` real8 {emit_string f}\n`
+ emit_float64_directive "data8" f
| Csymbol_address s ->
` data8 {emit_symbol s}#\n`
| Clabel_address lbl ->
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.6 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the IA64 processor *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.2 2000/07/16 02:57:31 xleroy Exp $ *)
+(* $Id: reload.ml 3235 2000-07-16 02:57:31Z xleroy $ *)
(* Reloading for the IA64. *)
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.3 2000/07/16 02:57:31 xleroy Exp $ *)
+(* $Id: scheduling.ml 3235 2000-07-16 02:57:31Z xleroy $ *)
open Schedgen (* to create a dependency *)
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.7 2004/05/03 12:27:07 xleroy Exp $ *)
+(* $Id: selection.ml 6276 2004-05-03 12:27:07Z xleroy $ *)
(* Instruction selection for the IA64 processor *)
(* *)
(***********************************************************************)
-(* $Id: interf.ml,v 1.15 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: interf.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Construction of the interference graph.
Annotate pseudoregs with interference lists and preference lists. *)
(* *)
(***********************************************************************)
-(* $Id: interf.mli,v 1.4 1999/11/17 18:56:33 xleroy Exp $ *)
+(* $Id: interf.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Construction of the interference graph.
Annotate pseudoregs with interference lists and preference lists. *)
(* *)
(***********************************************************************)
-(* $Id: linearize.ml,v 1.25 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: linearize.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Transformation of Mach code into a list of pseudo-instructions. *)
(* *)
(***********************************************************************)
-(* $Id: linearize.mli,v 1.14 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: linearize.mli 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Transformation of Mach code into a list of pseudo-instructions. *)
(* *)
(***********************************************************************)
-(* $Id: liveness.ml,v 1.15 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: liveness.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Liveness analysis.
Annotate mach code with the set of regs live at each point. *)
(* *)
(***********************************************************************)
-(* $Id: liveness.mli,v 1.5 2000/04/21 08:10:33 weis Exp $ *)
+(* $Id: liveness.mli 3123 2000-04-21 08:13:22Z weis $ *)
(* Liveness analysis.
Annotate mach code with the set of regs live at each point. *)
(* *)
(***********************************************************************)
-(* $Id: mach.ml,v 1.18 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: mach.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Representation of machine code by sequences of pseudoinstructions *)
(* *)
(***********************************************************************)
-(* $Id: mach.mli,v 1.18 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: mach.mli 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Representation of machine code by sequences of pseudoinstructions *)
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.6 2002/11/29 15:03:36 xleroy Exp $ *)
+(* $Id: arch.ml 5304 2002-11-29 15:03:37Z xleroy $ *)
(* Specific operations for the Mips processor *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.18 2004/01/05 20:25:56 doligez Exp $ *)
+(* $Id: emit.mlp 9314 2009-07-15 12:14:39Z xleroy $ *)
(* Emission of Mips assembly code *)
| Cint n ->
` .word {emit_nativeint n}\n`
| Csingle f ->
- ` .float {emit_string f}\n`
+ emit_float32_directive ".word" f
| Cdouble f ->
- ` .align 0\n`; (* Prevent alignment on 8-byte boundary *)
- ` .double {emit_string f}\n`
+ emit_float64_split_directive ".word" f
| Csymbol_address s ->
` .word {emit_symbol s}\n`
| Clabel_address lbl ->
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.7 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the Mips processor *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.3 1999/11/17 18:56:45 xleroy Exp $ *)
+(* $Id: reload.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Reloading for the Mips *)
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.2 1999/11/17 18:56:45 xleroy Exp $ *)
+(* $Id: scheduling.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
open Schedgen (* to create a dependency *)
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.4 1999/11/17 18:56:46 xleroy Exp $ *)
+(* $Id: selection.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Instruction selection for the Mips processor *)
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.12 2006/05/31 08:16:34 xleroy Exp $ *)
+(* $Id: arch.ml 7430 2006-05-31 08:16:34Z xleroy $ *)
(* Specific operations for the PowerPC processor *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.26.4.1 2009/01/26 17:06:10 xleroy Exp $ *)
+(* $Id: emit.mlp 9475 2009-12-16 10:04:38Z xleroy $ *)
(* Emission of PowerPC assembly code *)
call_gc_label := 0;
float_literals := [];
int_literals := [];
- if Config.system = "rhapsody" && is_generic_function fundecl.fun_name
+ if Config.system = "rhapsody"
+ && not !Clflags.output_c_object
+ && is_generic_function fundecl.fun_name
then (* PR#4690 *)
` .private_extern {emit_symbol fundecl.fun_name}\n`
else
` .align 3\n`;
List.iter
(fun (f, lbl) ->
- `{emit_label lbl}: .double 0d{emit_string f}\n`)
+ `{emit_label lbl}:`;
+ if ppc64
+ then emit_float64_directive ".quad" f
+ else emit_float64_split_directive ".long" f)
!float_literals;
List.iter
(fun (n, lbl) ->
| Cint n ->
` {emit_string datag} {emit_nativeint n}\n`
| Csingle f ->
- ` .float 0d{emit_string f}\n`
+ emit_float32_directive ".long" f
| Cdouble f ->
- ` .double 0d{emit_string f}\n`
+ if ppc64
+ then emit_float64_directive ".quad" f
+ else emit_float64_split_directive ".long" f
| Csymbol_address s ->
` {emit_string datag} {emit_symbol s}\n`
| Clabel_address lbl ->
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.14 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the Power PC *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.3 1999/11/17 18:56:46 xleroy Exp $ *)
+(* $Id: reload.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Reloading for the PowerPC *)
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.6 2004/06/19 16:13:33 xleroy Exp $ *)
+(* $Id: scheduling.ml 6423 2004-06-19 16:17:31Z xleroy $ *)
(* Instruction scheduling for the Power PC *)
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.8 2007/11/09 15:06:57 frisch Exp $ *)
+(* $Id: selection.ml 8499 2007-11-09 15:06:57Z frisch $ *)
(* Instruction selection for the Power PC processor *)
(* *)
(***********************************************************************)
-(* $Id: printcmm.ml,v 1.25 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: printcmm.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Pretty-printing of C-- code *)
(* *)
(***********************************************************************)
-(* $Id: printcmm.mli,v 1.6 2000/04/21 08:10:34 weis Exp $ *)
+(* $Id: printcmm.mli 3123 2000-04-21 08:13:22Z weis $ *)
(* Pretty-printing of C-- code *)
(* *)
(***********************************************************************)
-(* $Id: printlinear.ml,v 1.13 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: printlinear.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Pretty-printing of linearized machine code *)
(* *)
(***********************************************************************)
-(* $Id: printlinear.mli,v 1.5 2000/04/21 08:10:35 weis Exp $ *)
+(* $Id: printlinear.mli 3123 2000-04-21 08:13:22Z weis $ *)
(* Pretty-printing of linearized machine code *)
(* *)
(***********************************************************************)
-(* $Id: printmach.ml,v 1.23 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: printmach.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Pretty-printing of pseudo machine code *)
(* *)
(***********************************************************************)
-(* $Id: printmach.mli,v 1.6 2000/04/21 08:10:37 weis Exp $ *)
+(* $Id: printmach.mli 3123 2000-04-21 08:13:22Z weis $ *)
(* Pretty-printing of pseudo machine code *)
(* *)
(***********************************************************************)
-(* $Id: proc.mli,v 1.16 1999/11/17 18:56:35 xleroy Exp $ *)
+(* $Id: proc.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Processor descriptions *)
(* *)
(***********************************************************************)
-(* $Id: reg.ml,v 1.10 2000/06/29 11:44:06 xleroy Exp $ *)
+(* $Id: reg.ml 3216 2000-06-29 11:44:06Z xleroy $ *)
open Cmm
(* *)
(***********************************************************************)
-(* $Id: reg.mli,v 1.7 1999/11/17 18:56:35 xleroy Exp $ *)
+(* $Id: reg.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Pseudo-registers *)
(* *)
(***********************************************************************)
-(* $Id: reload.mli,v 1.6 1999/11/17 18:56:35 xleroy Exp $ *)
+(* $Id: reload.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Insert load/stores for pseudoregs that got assigned to stack locations. *)
(* *)
(***********************************************************************)
-(* $Id: reloadgen.ml,v 1.6 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: reloadgen.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Insert load/stores for pseudoregs that got assigned to stack locations. *)
(* *)
(***********************************************************************)
-(* $Id: reloadgen.mli,v 1.4 1999/11/17 18:56:36 xleroy Exp $ *)
+(* $Id: reloadgen.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
class reload_generic : object
method reload_operation :
(* *)
(***********************************************************************)
-(* $Id: schedgen.ml,v 1.12 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: schedgen.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Instruction scheduling *)
(* *)
(***********************************************************************)
-(* $Id: schedgen.mli,v 1.6 1999/11/17 18:56:36 xleroy Exp $ *)
+(* $Id: schedgen.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Instruction scheduling *)
(* *)
(***********************************************************************)
-(* $Id: scheduling.mli,v 1.3 1999/11/17 18:56:36 xleroy Exp $ *)
+(* $Id: scheduling.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Instruction scheduling *)
(* *)
(***********************************************************************)
-(* $Id: selectgen.ml,v 1.32 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: selectgen.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Selection of pseudo-instructions, assignment of pseudo-registers,
sequentialization. *)
(* *)
(***********************************************************************)
-(* $Id: selectgen.mli,v 1.8 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: selectgen.mli 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Selection of pseudo-instructions, assignment of pseudo-registers,
sequentialization. *)
(* *)
(***********************************************************************)
-(* $Id: selection.mli,v 1.6 1999/11/17 18:56:37 xleroy Exp $ *)
+(* $Id: selection.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Selection of pseudo-instructions, assignment of pseudo-registers,
sequentialization. *)
(* *)
(***********************************************************************)
-(* $Id: arch.ml,v 1.8 2002/11/29 15:03:08 xleroy Exp $ *)
+(* $Id: arch.ml 5303 2002-11-29 15:03:08Z xleroy $ *)
(* Specific operations for the Sparc processor *)
(* *)
(***********************************************************************)
-(* $Id: emit.mlp,v 1.24 2006/04/16 23:28:15 doligez Exp $ *)
+(* $Id: emit.mlp 9475 2009-12-16 10:04:38Z xleroy $ *)
(* Emission of Sparc assembly code *)
let emit_float_constant (lbl, cst) =
rodata ();
` .align 8\n`;
- `{emit_label lbl}: .double 0r{emit_string cst}\n`
+ `{emit_label lbl}:`;
+ emit_float64_split_directive ".word" cst
(* Emission of the profiling prelude *)
let emit_profile () =
| Cint n ->
` .word {emit_nativeint n}\n`
| Csingle f ->
- ` .single 0r{emit_string f}\n`
+ emit_float32_directive ".word" f
| Cdouble f ->
- ` .double 0r{emit_string f}\n`
+ emit_float64_split_directive ".word" f
| Csymbol_address s ->
` .word {emit_symbol s}\n`
| Clabel_address lbl ->
(* *)
(***********************************************************************)
-(* $Id: proc.ml,v 1.8 2007/10/30 12:37:16 xleroy Exp $ *)
+(* $Id: proc.ml 8462 2007-10-30 12:37:16Z xleroy $ *)
(* Description of the Sparc processor *)
(* *)
(***********************************************************************)
-(* $Id: reload.ml,v 1.3 1999/11/17 18:56:47 xleroy Exp $ *)
+(* $Id: reload.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Reloading for the Sparc *)
(* *)
(***********************************************************************)
-(* $Id: scheduling.ml,v 1.5 2002/11/29 15:03:08 xleroy Exp $ *)
+(* $Id: scheduling.ml 5303 2002-11-29 15:03:08Z xleroy $ *)
open Cmm
open Mach
(* *)
(***********************************************************************)
-(* $Id: selection.ml,v 1.8 2002/11/29 15:03:08 xleroy Exp $ *)
+(* $Id: selection.ml 5303 2002-11-29 15:03:08Z xleroy $ *)
(* Instruction selection for the Sparc processor *)
(* *)
(***********************************************************************)
-(* $Id: spill.ml,v 1.19 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: spill.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Insertion of moves to suggest possible spilling / reloading points
before register allocation. *)
(* *)
(***********************************************************************)
-(* $Id: spill.mli,v 1.4 1999/11/17 18:56:38 xleroy Exp $ *)
+(* $Id: spill.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Insertion of moves to suggest possible spilling / reloading points
before register allocation. *)
(* *)
(***********************************************************************)
-(* $Id: split.ml,v 1.10 2007/01/29 12:10:50 xleroy Exp $ *)
+(* $Id: split.ml 7812 2007-01-29 12:11:18Z xleroy $ *)
(* Renaming of registers at reload points to split live ranges. *)
(* *)
(***********************************************************************)
-(* $Id: split.mli,v 1.4 1999/11/17 18:56:38 xleroy Exp $ *)
+(* $Id: split.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Renaming of registers at reload points to split live ranges. *)
# #
#########################################################################
-# $Id: Makefile,v 1.59 2007/11/15 13:21:15 frisch Exp $
+# $Id: Makefile 8521 2007-11-15 13:21:15Z frisch $
include ../config/Makefile
# #
#########################################################################
-# $Id: Makefile.nt,v 1.28 2007/11/15 13:21:15 frisch Exp $
+# $Id: Makefile.nt 8521 2007-11-15 13:21:15Z frisch $
include ../config/Makefile
/* */
/***********************************************************************/
-/* $Id: alpha.S,v 1.29 2004/01/03 12:51:18 doligez Exp $ */
+/* $Id: alpha.S 6050 2004-01-03 12:51:20Z doligez $ */
/* Asm part of the runtime system, Alpha processor */
/* */
/***********************************************************************/
-/* $Id: amd64.S,v 1.12.2.1 2008/11/07 10:34:16 xleroy Exp $ */
+/* $Id: amd64.S 9119 2008-11-07 10:34:16Z xleroy $ */
/* Asm part of the runtime system, AMD64 processor */
/* Must be preprocessed by cpp */
;
;*********************************************************************
-; $Id: amd64nt.asm,v 1.5 2007/03/01 10:26:51 xleroy Exp $
+; $Id: amd64nt.asm 7942 2007-03-01 10:26:51Z xleroy $
; Asm part of the runtime system, AMD64 processor, Intel syntax
/* */
/***********************************************************************/
-/* $Id: arm.S,v 1.16 2008/02/29 14:21:21 doligez Exp $ */
+/* $Id: arm.S 8823 2008-02-29 14:21:22Z doligez $ */
/* Asm part of the runtime system, ARM processor */
/* */
/***********************************************************************/
-/* $Id: backtrace.c,v 1.4 2008/03/14 13:47:13 xleroy Exp $ */
+/* $Id: backtrace.c 8839 2008-03-14 13:47:24Z xleroy $ */
/* Stack backtrace for uncaught exceptions */
/* */
/***********************************************************************/
-/* $Id: fail.c,v 1.40 2008/09/18 11:23:28 xleroy Exp $ */
+/* $Id: fail.c 9030 2008-09-18 11:23:28Z xleroy $ */
/* Raising exceptions from C. */
;* *
;*********************************************************************
-; $Id: hppa.S,v 1.26 2006/04/16 23:28:15 doligez Exp $
+; $Id: hppa.S 7382 2006-04-16 23:28:22Z doligez $
; Asm part of the runtime system for the HP PA-RISC processor.
; Must be preprocessed by cpp
/* */
/***********************************************************************/
-/* $Id: i386.S,v 1.50 2008/08/01 08:04:57 xleroy Exp $ */
+/* $Id: i386.S 8962 2008-08-01 08:04:57Z xleroy $ */
/* Asm part of the runtime system, Intel 386 processor */
/* Must be preprocessed by cpp */
;
;*********************************************************************
-; $Id: i386nt.asm,v 1.20 2007/01/29 12:10:52 xleroy Exp $
+; $Id: i386nt.asm 7812 2007-01-29 12:11:18Z xleroy $
; Asm part of the runtime system, Intel 386 processor, Intel syntax
/* */
/***********************************************************************/
-/* $Id: ia64.S,v 1.13 2004/01/03 12:51:19 doligez Exp $ */
+/* $Id: ia64.S 9341 2009-09-17 13:05:47Z xleroy $ */
-/* Asm part of the runtime system, Alpha processor */
+/* Asm part of the runtime system, IA64 processor */
#undef BROKEN_POSTINCREMENT
sub r4 = r4, r2 ;;
cmp.ltu p0, p6 = r4, r5
(p6) br.ret.sptk b0 ;;
- /* Stash return address at sp (in stack scratch area) */
- mov r3 = b0 ;;
- st8 [sp] = r3
- /* Call GC */
- br.call.sptk b0 = caml_call_gc# ;;
- /* Return to caller */
- ld8 r3 = [sp] ;;
- mov b0 = r3 ;;
- br.ret.sptk b0
+ /* Fall through caml_call_gc */
+ br.sptk.many caml_call_gc#
.endp caml_allocN#
|* *
|***********************************************************************
-| $Id: m68k.S,v 1.15 2004/01/03 12:51:19 doligez Exp $
+| $Id: m68k.S 6050 2004-01-03 12:51:20Z doligez $
| Asm part of the runtime system, Motorola 68k processor
/* */
/***********************************************************************/
-/* $Id: mips.s,v 1.12 2004/07/13 12:18:53 xleroy Exp $ */
+/* $Id: mips.s 6552 2004-07-13 12:19:15Z xleroy $ */
/* Asm part of the runtime system, Mips processor, IRIX n32 conventions */
#* *
#*********************************************************************
-# $Id: power-aix.S,v 1.15 2004/01/03 12:51:19 doligez Exp $
+# $Id: power-aix.S 6050 2004-01-03 12:51:20Z doligez $
.csect .text[PR]
/* */
/*********************************************************************/
-/* $Id: power-elf.S,v 1.18 2004/01/03 12:51:19 doligez Exp $ */
+/* $Id: power-elf.S 6050 2004-01-03 12:51:20Z doligez $ */
#define Addrglobal(reg,glob) \
addis reg, 0, glob@ha; \
/* */
/*********************************************************************/
-/* $Id: power-rhapsody.S,v 1.15 2007/01/29 12:10:52 xleroy Exp $ */
+/* $Id: power-rhapsody.S 7812 2007-01-29 12:11:18Z xleroy $ */
#ifdef __ppc64__
#define X(a,b) b
/* */
/***********************************************************************/
-/* $Id: roots.c,v 1.45 2008/03/10 19:56:39 xleroy Exp $ */
+/* $Id: roots.c 8828 2008-03-10 19:56:39Z xleroy $ */
/* To walk the memory roots for garbage collection */
/* */
/***********************************************************************/
-/* $Id: signals_asm.c,v 1.6 2008/01/11 16:13:11 doligez Exp $ */
+/* $Id: signals_asm.c 8768 2008-01-11 16:13:18Z doligez $ */
/* Signal handling, code specific to the native-code compiler */
/* */
/***********************************************************************/
-/* $Id: signals_osdep.h,v 1.11.4.2 2009/03/28 15:18:31 xleroy Exp $ */
+/* $Id: signals_osdep.h 9194 2009-03-28 15:18:31Z xleroy $ */
/* Processor- and OS-dependent signal interface */
/* */
/***********************************************************************/
-/* $Id: sparc.S,v 1.26 2004/10/06 06:33:25 garrigue Exp $ */
+/* $Id: sparc.S 6631 2004-10-06 06:33:25Z garrigue $ */
/* Asm part of the runtime system for the Sparc processor. */
/* Must be preprocessed by cpp */
/* */
/***********************************************************************/
-/* $Id: stack.h,v 1.35 2007/11/06 15:16:55 frisch Exp $ */
+/* $Id: stack.h 8477 2007-11-06 15:16:56Z frisch $ */
/* Machine-dependent interface with the asm code */
/* */
/***********************************************************************/
-/* $Id: startup.c,v 1.36.2.1 2008/11/18 10:24:31 doligez Exp $ */
+/* $Id: startup.c 9131 2008-11-18 10:24:43Z doligez $ */
/* Start-up code */
camlheader
myocamlbuild
myocamlbuild.native
+libcamlrun.a
#!/bin/sh
-# $Id: boot-c-parts-windows.sh,v 1.3 2007/10/08 14:19:34 doligez Exp $
+# $Id: boot-c-parts-windows.sh 8416 2007-10-08 14:19:34Z doligez $
cd `dirname $0`/..
set -ex
#!/bin/sh
-# $Id: boot-c-parts.sh,v 1.2 2007/10/08 14:19:34 doligez Exp $
+# $Id: boot-c-parts.sh 8416 2007-10-08 14:19:34Z doligez $
cd `dirname $0`/..
set -ex
#!/bin/sh
-# $Id: boot.sh,v 1.2 2007/10/08 14:19:34 doligez Exp $
+# $Id: boot.sh 8416 2007-10-08 14:19:34Z doligez $
cd `dirname $0`/..
set -ex
TAGLINE='true: -use_stdlib'
#!/bin/sh
-# $Id: camlp4-bootstrap.sh,v 1.3 2007/10/08 14:19:34 doligez Exp $
+# $Id: camlp4-bootstrap.sh 8416 2007-10-08 14:19:34Z doligez $
set -e
cd `dirname $0`/..
#!/bin/sh
-# $Id: camlp4-byte-only.sh,v 1.3.4.1 2008/10/23 15:29:11 ertai Exp $
+# $Id: camlp4-byte-only.sh 9099 2008-10-23 15:29:11Z ertai $
set -e
cd `dirname $0`/..
. build/targets.sh
#!/bin/sh
-# $Id: camlp4-native-only.sh,v 1.3.4.1 2008/10/23 15:29:11 ertai Exp $
+# $Id: camlp4-native-only.sh 9099 2008-10-23 15:29:11Z ertai $
set -e
cd `dirname $0`/..
. build/targets.sh
#!/bin/sh
-# $Id: camlp4-targets.sh,v 1.2 2007/10/08 14:19:34 doligez Exp $
+# $Id: camlp4-targets.sh 8416 2007-10-08 14:19:34Z doligez $
CAMLP4_COMMON="\
camlp4/Camlp4/Camlp4Ast.partial.ml \
camlp4/boot/camlp4boot.byte"
# #
#########################################################################
-# $Id: distclean.sh,v 1.7.4.1 2008/10/23 15:29:11 ertai Exp $
+# $Id: distclean.sh 9099 2008-10-23 15:29:11Z ertai $
cd `dirname $0`/..
set -ex
#!/bin/sh
-# $Id: fastworld.sh,v 1.3.4.2 2009/06/02 09:37:47 doligez Exp $
+# $Id: fastworld.sh 9283 2009-06-02 09:37:47Z doligez $
cd `dirname $0`
set -e
if [ -e ocamlbuild_mixed_mode ]; then
# #
#########################################################################
-# $Id: install.sh,v 1.11.2.1 2009/06/04 11:32:46 doligez Exp $
+# $Id: install.sh 9289 2009-06-04 11:32:46Z doligez $
set -e
#!/bin/sh
-# $Id: mkconfig.sh,v 1.3 2007/11/06 15:16:56 frisch Exp $
+# $Id: mkconfig.sh 8477 2007-11-06 15:16:56Z frisch $
cd `dirname $0`/..
# #
#########################################################################
-# $Id: mkmyocamlbuild_config.sh,v 1.10 2008/01/11 16:13:16 doligez Exp $
+# $Id: mkmyocamlbuild_config.sh 8768 2008-01-11 16:13:18Z doligez $
cd `dirname $0`/..
#!/bin/sh
-# $Id: mkruntimedef.sh,v 1.2 2007/10/08 14:19:34 doligez Exp $
+# $Id: mkruntimedef.sh 8416 2007-10-08 14:19:34Z doligez $
echo 'let builtin_exceptions = [|'; \
sed -n -e 's|.*/\* \("[A-Za-z_]*"\) \*/$| \1;|p' byterun/fail.h | \
sed -e '$s/;$//'; \
#!/bin/sh
-# $Id: myocamlbuild.sh,v 1.3 2007/10/08 14:19:34 doligez Exp $
+# $Id: myocamlbuild.sh 8416 2007-10-08 14:19:34Z doligez $
cd `dirname $0`/..
set -xe
if [ ! -x _build/ocamlbuild/ocamlbuildlight.byte ]; then
#!/bin/sh
-# $Id: ocamlbuild-byte-only.sh,v 1.3.4.1 2008/10/23 15:29:11 ertai Exp $
+# $Id: ocamlbuild-byte-only.sh 9099 2008-10-23 15:29:11Z ertai $
set -e
cd `dirname $0`/..
. build/targets.sh
#!/bin/sh
-# $Id: ocamlbuild-native-only.sh,v 1.3.4.1 2008/10/23 15:29:11 ertai Exp $
+# $Id: ocamlbuild-native-only.sh 9099 2008-10-23 15:29:11Z ertai $
set -e
cd `dirname $0`/..
. build/targets.sh
#!/bin/sh
-# $Id: ocamlbuildlib-native-only.sh,v 1.2.4.1 2008/10/23 15:29:11 ertai Exp $
+# $Id: ocamlbuildlib-native-only.sh 9099 2008-10-23 15:29:11Z ertai $
set -e
cd `dirname $0`/..
. build/targets.sh
#!/bin/sh
-# $Id: otherlibs-targets.sh,v 1.4.4.1 2009/05/26 12:49:16 ertai Exp $
+# $Id: otherlibs-targets.sh 9281 2009-05-26 12:50:41Z ertai $
OTHERLIBS_BYTE=""
OTHERLIBS_NATIVE=""
OTHERLIBS_UNIX_NATIVE=""
# #
#########################################################################
-# $Id: partial-install.sh,v 1.9 2008/01/11 16:13:16 doligez Exp $
+# $Id: partial-install.sh 8768 2008-01-11 16:13:18Z doligez $
######################################
######### Copied from build/install.sh
# #
#########################################################################
-# $Id: targets.sh,v 1.5 2008/01/11 16:13:16 doligez Exp $
+# $Id: targets.sh 8768 2008-01-11 16:13:18Z doligez $
. config/config.sh
. build/otherlibs-targets.sh
#!/bin/sh
-# $Id: world.all.sh,v 1.3 2007/10/08 14:19:34 doligez Exp $
+# $Id: world.all.sh 8416 2007-10-08 14:19:34Z doligez $
set -e
cd `dirname $0`/..
. build/targets.sh
#!/bin/sh
-# $Id: world.byte.sh,v 1.3 2007/10/08 14:19:34 doligez Exp $
+# $Id: world.byte.sh 8416 2007-10-08 14:19:34Z doligez $
set -e
cd `dirname $0`/..
. build/targets.sh
#!/bin/sh
-# $Id: world.native.sh,v 1.3 2007/10/08 14:19:34 doligez Exp $
+# $Id: world.native.sh 8416 2007-10-08 14:19:34Z doligez $
set -e
cd `dirname $0`/..
. build/targets.sh
#!/bin/sh
-# $Id: world.sh,v 1.3.4.2 2009/06/02 09:37:47 doligez Exp $
+# $Id: world.sh 9283 2009-06-02 09:37:47Z doligez $
cd `dirname $0`
set -e
if [ -e ocamlbuild_mixed_mode ]; then
(* *)
(***********************************************************************)
-(* $Id: bytegen.ml,v 1.72.2.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: bytegen.ml 9221 2009-04-02 09:06:33Z xclerc $ *)
(* bytegen.ml : translation of lambda terms to lists of instructions. *)
(* *)
(***********************************************************************)
-(* $Id: bytegen.mli,v 1.6 1999/11/17 18:56:59 xleroy Exp $ *)
+(* $Id: bytegen.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Generation of bytecode from lambda terms *)
(* *)
(***********************************************************************)
-(* $Id: bytelibrarian.ml,v 1.19 2006/05/11 15:50:53 xleroy Exp $ *)
+(* $Id: bytelibrarian.ml 7422 2006-05-11 15:50:53Z xleroy $ *)
(* Build libraries of .cmo files *)
(* *)
(***********************************************************************)
-(* $Id: bytelibrarian.mli,v 1.6 2000/03/06 22:11:06 weis Exp $ *)
+(* $Id: bytelibrarian.mli 2908 2000-03-06 22:12:09Z weis $ *)
(* Build libraries of .cmo files *)
(* *)
(***********************************************************************)
-(* $Id: bytelink.ml,v 1.95 2007/11/15 15:18:28 frisch Exp $ *)
+(* $Id: bytelink.ml 9500 2009-12-28 13:13:23Z doligez $ *)
(* Link a set of .cmo files and produce a bytecode executable. *)
end
done
+(* Output a debug stub *)
+
+let output_cds_file outfile =
+ Misc.remove_file outfile;
+ let outchan =
+ open_out_gen [Open_wronly; Open_trunc; Open_creat; Open_binary]
+ 0o777 outfile in
+ try
+ Bytesections.init_record outchan;
+ (* The map of global identifiers *)
+ Symtable.output_global_map outchan;
+ Bytesections.record outchan "SYMB";
+ (* Debug info *)
+ output_debug_info outchan;
+ Bytesections.record outchan "DBUG";
+ (* The table of contents and the trailer *)
+ Bytesections.write_toc_and_trailer outchan;
+ close_out outchan
+ with x ->
+ close_out outchan;
+ remove_file outfile;
+ raise x
+
(* Output a bytecode executable as a C file *)
let link_bytecode_as_c tolink outfile =
let outchan = open_out outfile in
- try
+ begin try
(* The bytecode *)
- output_string outchan "#include <caml/mlvalues.h>\n";
output_string outchan "\
-CAMLextern void caml_startup_code(
- code_t code, asize_t code_size,
- char *data, asize_t data_size,
- char *section_table, asize_t section_table_size,
+#ifdef __cplusplus\n\
+extern \"C\" {\n\
+#endif\n\
+#include <caml/mlvalues.h>\n\
+CAMLextern void caml_startup_code(\n\
+ code_t code, asize_t code_size,\n\
+ char *data, asize_t data_size,\n\
+ char *section_table, asize_t section_table_size,\n\
char **argv);\n";
output_string outchan "static int caml_code[] = {\n";
Symtable.init();
Consistbl.clear crc_interfaces;
- let output_fun = output_code_string outchan
- and currpos_fun () = 0 in
+ let currpos = ref 0 in
+ let output_fun code =
+ output_code_string outchan code;
+ currpos := !currpos + String.length code
+ and currpos_fun () = !currpos in
List.iter (link_file output_fun currpos_fun) tolink;
(* The final STOP instruction *)
Printf.fprintf outchan "\n0x%x};\n\n" Opcodes.opSTOP;
(* The table of primitives *)
Symtable.output_primitive_table outchan;
(* The entry point *)
- output_string outchan "\n
-void caml_startup(char ** argv)
-{
- caml_startup_code(caml_code, sizeof(caml_code),
- caml_data, sizeof(caml_data),
- caml_sections, sizeof(caml_sections),
- argv);
-}\n";
+ output_string outchan "\n\
+void caml_startup(char ** argv)\n\
+{\n\
+ caml_startup_code(caml_code, sizeof(caml_code),\n\
+ caml_data, sizeof(caml_data),\n\
+ caml_sections, sizeof(caml_sections),\n\
+ argv);\n\
+}\n\
+#ifdef __cplusplus\n\
+}\n\
+#endif\n";
close_out outchan
with x ->
close_out outchan;
raise x
+ end;
+ if !Clflags.debug then
+ output_cds_file ((Filename.chop_extension outfile) ^ ".cds")
(* Build a custom runtime *)
let build_custom_runtime prim_name exec_name =
- Ccomp.call_linker Ccomp.Exe exec_name
+ Ccomp.call_linker Ccomp.Exe exec_name
([prim_name] @ List.rev !Clflags.ccobjs @ ["-lcamlrun"])
- Config.bytecomp_c_libraries
+ (Clflags.std_include_flag "-I" ^ " " ^ Config.bytecomp_c_libraries)
let append_bytecode_and_cleanup bytecode_name exec_name prim_name =
let oc = open_out_gen [Open_wronly; Open_append; Open_binary] 0 exec_name in
try
link_bytecode tolink bytecode_name false;
let poc = open_out prim_name in
+ output_string poc "\
+ #ifdef __cplusplus\n\
+ extern \"C\" {\n\
+ #endif\n\
+ #ifdef _WIN64\n\
+ typedef __int64 value;\n\
+ #else\n\
+ typedef long value;\n\
+ #endif\n";
Symtable.output_primitive_table poc;
+ output_string poc "\
+ #ifdef __cplusplus\n\
+ }\n\
+ #endif\n";
close_out poc;
let exec_name = fix_exec_name output_name in
if not (build_custom_runtime prim_name exec_name)
(* *)
(***********************************************************************)
-(* $Id: bytelink.mli,v 1.12 2006/05/11 15:50:53 xleroy Exp $ *)
+(* $Id: bytelink.mli 7422 2006-05-11 15:50:53Z xleroy $ *)
(* Link .cmo files and produce a bytecode executable. *)
(* *)
(***********************************************************************)
-(* $Id: bytepackager.ml,v 1.6.10.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: bytepackager.ml 9221 2009-04-02 09:06:33Z xclerc $ *)
(* "Package" a set of .cmo files into one .cmo file having the
original compilation units as sub-modules. *)
(* *)
(***********************************************************************)
-(* $Id: bytepackager.mli,v 1.1 2002/02/08 16:55:42 xleroy Exp $ *)
+(* $Id: bytepackager.mli 4367 2002-02-08 16:55:44Z xleroy $ *)
(* "Package" a set of .cmo files into one .cmo file having the
original compilation units as sub-modules. *)
(* *)
(***********************************************************************)
-(* $Id: bytesections.ml,v 1.3 2004/02/22 15:07:50 xleroy Exp $ *)
+(* $Id: bytesections.ml 6130 2004-02-22 15:07:51Z xleroy $ *)
(* Handling of sections in bytecode executable files *)
(* *)
(***********************************************************************)
-(* $Id: bytesections.mli,v 1.3 2004/02/22 15:07:50 xleroy Exp $ *)
+(* $Id: bytesections.mli 6130 2004-02-22 15:07:51Z xleroy $ *)
(* Handling of sections in bytecode executable files *)
(* *)
(***********************************************************************)
-(* $Id: cmo_format.mli,v 1.1 2006/05/11 15:50:53 xleroy Exp $ *)
+(* $Id: cmo_format.mli 7422 2006-05-11 15:50:53Z xleroy $ *)
(* Symbol table information for .cmo and .cma files *)
(* *)
(***********************************************************************)
-(* $Id: dll.ml,v 1.13.14.1 2009/05/01 01:46:50 garrigue Exp $ *)
+(* $Id: dll.ml 9249 2009-05-01 01:46:50Z garrigue $ *)
(* Handling of dynamically-linked libraries *)
(* *)
(***********************************************************************)
-(* $Id: dll.mli,v 1.6 2006/09/28 21:36:38 xleroy Exp $ *)
+(* $Id: dll.mli 7656 2006-09-28 21:36:38Z xleroy $ *)
(* Handling of dynamically-linked libraries *)
(* *)
(***********************************************************************)
-(* $Id: emitcode.ml,v 1.34 2008/07/24 05:35:22 frisch Exp $ *)
+(* $Id: emitcode.ml 8930 2008-07-24 05:35:22Z frisch $ *)
(* Generation of bytecode + relocation information *)
(* *)
(***********************************************************************)
-(* $Id: emitcode.mli,v 1.15 2006/05/11 15:50:53 xleroy Exp $ *)
+(* $Id: emitcode.mli 7422 2006-05-11 15:50:53Z xleroy $ *)
(* Generation of bytecode for .cmo files *)
(* *)
(***********************************************************************)
-(* $Id: instruct.ml,v 1.22.20.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: instruct.ml 9221 2009-04-02 09:06:33Z xclerc $ *)
open Lambda
(* *)
(***********************************************************************)
-(* $Id: instruct.mli,v 1.22.20.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: instruct.mli 9221 2009-04-02 09:06:33Z xclerc $ *)
(* The type of the instructions of the abstract machine *)
(* *)
(***********************************************************************)
-(* $Id: lambda.ml,v 1.48 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: lambda.ml 8974 2008-08-01 16:57:10Z mauny $ *)
open Misc
open Path
(* *)
(***********************************************************************)
-(* $Id: lambda.mli,v 1.46 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: lambda.mli 8974 2008-08-01 16:57:10Z mauny $ *)
(* The "lambda" intermediate code *)
(* *)
(***********************************************************************)
-(* $Id: matching.ml,v 1.71 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: matching.ml 8974 2008-08-01 16:57:10Z mauny $ *)
(* Compilation of pattern matching *)
(* *)
(***********************************************************************)
-(* $Id: matching.mli,v 1.13 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: matching.mli 8974 2008-08-01 16:57:10Z mauny $ *)
(* Compilation of pattern-matching *)
(* *)
(***********************************************************************)
-(* $Id: meta.ml,v 1.13 2004/04/16 13:46:20 starynke Exp $ *)
+(* $Id: meta.ml 6224 2004-04-16 13:46:43Z starynke $ *)
external global_data : unit -> Obj.t array = "caml_get_global_data"
external realloc_global_data : int -> unit = "caml_realloc_global"
(* *)
(***********************************************************************)
-(* $Id: meta.mli,v 1.13 2004/04/16 13:46:27 starynke Exp $ *)
+(* $Id: meta.mli 6224 2004-04-16 13:46:43Z starynke $ *)
(* To control the runtime system and bytecode interpreter *)
(* *)
(***********************************************************************)
-(* $Id: printinstr.ml,v 1.23 2005/08/25 15:35:16 doligez Exp $ *)
+(* $Id: printinstr.ml 7031 2005-08-25 15:35:16Z doligez $ *)
(* Pretty-print lists of instructions *)
(* *)
(***********************************************************************)
-(* $Id: printinstr.mli,v 1.5 2000/03/06 22:11:08 weis Exp $ *)
+(* $Id: printinstr.mli 2908 2000-03-06 22:12:09Z weis $ *)
(* Pretty-print lists of instructions *)
(* *)
(***********************************************************************)
-(* $Id: printlambda.ml,v 1.55 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: printlambda.ml 8974 2008-08-01 16:57:10Z mauny $ *)
open Format
open Asttypes
(* *)
(***********************************************************************)
-(* $Id: printlambda.mli,v 1.5 2000/03/06 22:11:10 weis Exp $ *)
+(* $Id: printlambda.mli 2908 2000-03-06 22:12:09Z weis $ *)
open Lambda
(* *)
(***********************************************************************)
-(* $Id: runtimedef.mli,v 1.4 1999/11/17 18:57:01 xleroy Exp $ *)
+(* $Id: runtimedef.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Values and functions known and/or provided by the runtime system *)
(* *)
(***********************************************************************)
-(* $Id: simplif.ml,v 1.25 2008/03/19 10:26:56 maranget Exp $ *)
+(* $Id: simplif.ml 8850 2008-03-19 10:26:56Z maranget $ *)
(* Elimination of useless Llet(Alias) bindings.
Also transform let-bound references into variables. *)
(* *)
(***********************************************************************)
-(* $Id: simplif.mli,v 1.3 1999/11/17 18:57:01 xleroy Exp $ *)
+(* $Id: simplif.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Elimination of useless Llet(Alias) bindings *)
(* *)
(***********************************************************************)
-(* $Id: symtable.ml,v 1.39 2006/05/11 15:50:53 xleroy Exp $ *)
+(* $Id: symtable.ml 9347 2009-09-23 14:31:18Z xleroy $ *)
(* To assign numbers to globals and primitives *)
let output_primitive_table outchan =
let prim = all_primitives() in
- fprintf outchan "\
- #ifdef __cplusplus\n\
- extern \"C\" {\n\
- #endif\n";
for i = 0 to Array.length prim - 1 do
- fprintf outchan "extern long %s();\n" prim.(i)
+ fprintf outchan "extern value %s();\n" prim.(i)
done;
- fprintf outchan "typedef long (*primitive)();\n";
+ fprintf outchan "typedef value (*primitive)();\n";
fprintf outchan "primitive caml_builtin_cprim[] = {\n";
for i = 0 to Array.length prim - 1 do
fprintf outchan " %s,\n" prim.(i)
for i = 0 to Array.length prim - 1 do
fprintf outchan " \"%s\",\n" prim.(i)
done;
- fprintf outchan " (char *) 0 };\n";
- fprintf outchan "\
- #ifdef __cplusplus\n\
- }\n\
- #endif\n"
+ fprintf outchan " (char *) 0 };\n"
(* Initialization for batch linking *)
(* *)
(***********************************************************************)
-(* $Id: symtable.mli,v 1.15 2006/05/11 15:50:53 xleroy Exp $ *)
+(* $Id: symtable.mli 7422 2006-05-11 15:50:53Z xleroy $ *)
(* Assign locations and numbers to globals and primitives *)
(* *)
(***********************************************************************)
-(* $Id: translclass.ml,v 1.43.4.1 2008/10/08 13:07:13 doligez Exp $ *)
+(* $Id: translclass.ml 9079 2008-10-08 13:09:39Z doligez $ *)
open Misc
open Asttypes
(* *)
(***********************************************************************)
-(* $Id: translclass.mli,v 1.12 2006/04/05 02:28:12 garrigue Exp $ *)
+(* $Id: translclass.mli 7372 2006-04-05 02:28:13Z garrigue $ *)
open Typedtree
open Lambda
(* *)
(***********************************************************************)
-(* $Id: translcore.ml,v 1.110 2008/08/27 10:23:21 garrigue Exp $ *)
+(* $Id: translcore.ml 8992 2008-08-27 10:23:21Z garrigue $ *)
(* Translation from typed abstract syntax to lambda terms,
for the core language *)
(* *)
(***********************************************************************)
-(* $Id: translcore.mli,v 1.19 2007/05/16 08:21:40 doligez Exp $ *)
+(* $Id: translcore.mli 8232 2007-05-16 08:21:41Z doligez $ *)
(* Translation from typed abstract syntax to lambda terms,
for the core language *)
(* *)
(***********************************************************************)
-(* $Id: translmod.ml,v 1.56 2008/07/24 05:35:22 frisch Exp $ *)
+(* $Id: translmod.ml 8930 2008-07-24 05:35:22Z frisch $ *)
(* Translation from typed abstract syntax to lambda terms,
for the module language *)
(* *)
(***********************************************************************)
-(* $Id: translmod.mli,v 1.14 2008/07/24 05:35:22 frisch Exp $ *)
+(* $Id: translmod.mli 8930 2008-07-24 05:35:22Z frisch $ *)
(* Translation from typed abstract syntax to lambda terms,
for the module language *)
(* *)
(***********************************************************************)
-(* $Id: translobj.ml,v 1.9.26.1 2008/10/08 13:07:13 doligez Exp $ *)
+(* $Id: translobj.ml 9079 2008-10-08 13:09:39Z doligez $ *)
open Misc
open Primitive
(* *)
(***********************************************************************)
-(* $Id: translobj.mli,v 1.6.26.1 2008/10/08 13:07:13 doligez Exp $ *)
+(* $Id: translobj.mli 9079 2008-10-08 13:09:39Z doligez $ *)
open Lambda
(* *)
(***********************************************************************)
-(* $Id: typeopt.ml,v 1.13 2008/02/29 14:21:22 doligez Exp $ *)
+(* $Id: typeopt.ml 9334 2009-09-16 09:44:33Z xleroy $ *)
(* Auxiliaries for type-based optimizations, e.g. array kinds *)
open Typedtree
open Lambda
+let scrape env ty =
+ (Ctype.repr (Ctype.expand_head_opt env (Ctype.correct_levels ty))).desc
+
let has_base_type exp base_ty_path =
- let exp_ty =
- Ctype.expand_head_opt exp.exp_env (Ctype.correct_levels exp.exp_type) in
- match Ctype.repr exp_ty with
- {desc = Tconstr(p, _, _)} -> Path.same p base_ty_path
+ match scrape exp.exp_env exp.exp_type with
+ | Tconstr(p, _, _) -> Path.same p base_ty_path
| _ -> false
let maybe_pointer exp =
- let exp_ty =
- Ctype.expand_head_opt exp.exp_env (Ctype.correct_levels exp.exp_type) in
- match (Ctype.repr exp_ty).desc with
- Tconstr(p, args, abbrev) ->
+ match scrape exp.exp_env exp.exp_type with
+ | Tconstr(p, args, abbrev) ->
not (Path.same p Predef.path_int) &&
not (Path.same p Predef.path_char) &&
begin try
| _ -> true
let array_element_kind env ty =
- let ty = Ctype.repr (Ctype.expand_head_opt env ty) in
- match ty.desc with
- Tvar | Tunivar ->
+ match scrape env ty with
+ | Tvar | Tunivar ->
Pgenarray
| Tconstr(p, args, abbrev) ->
if Path.same p Predef.path_int || Path.same p Predef.path_char then
Paddrarray
let array_kind_gen ty env =
- let array_ty = Ctype.expand_head_opt env (Ctype.correct_levels ty) in
- match (Ctype.repr array_ty).desc with
- Tconstr(p, [elt_ty], _) | Tpoly({desc = Tconstr(p, [elt_ty], _)}, _)
+ match scrape env ty with
+ | Tconstr(p, [elt_ty], _) | Tpoly({desc = Tconstr(p, [elt_ty], _)}, _)
when Path.same p Predef.path_array ->
array_element_kind env elt_ty
| _ ->
let array_pattern_kind pat = array_kind_gen pat.pat_type pat.pat_env
-let bigarray_decode_type ty tbl dfl =
- match (Ctype.repr ty).desc with
- Tconstr(Pdot(Pident mod_id, type_name, _), [], _)
+let bigarray_decode_type env ty tbl dfl =
+ match scrape env ty with
+ | Tconstr(Pdot(Pident mod_id, type_name, _), [], _)
when Ident.name mod_id = "Bigarray" ->
begin try List.assoc type_name tbl with Not_found -> dfl end
| _ ->
"fortran_layout", Pbigarray_fortran_layout]
let bigarray_kind_and_layout exp =
- let ty = Ctype.repr (Ctype.expand_head_opt exp.exp_env exp.exp_type) in
- match ty.desc with
- Tconstr(p, [caml_type; elt_type; layout_type], abbrev) ->
- (bigarray_decode_type elt_type kind_table Pbigarray_unknown,
- bigarray_decode_type layout_type layout_table Pbigarray_unknown_layout)
+ match scrape exp.exp_env exp.exp_type with
+ | Tconstr(p, [caml_type; elt_type; layout_type], abbrev) ->
+ (bigarray_decode_type exp.exp_env elt_type kind_table Pbigarray_unknown,
+ bigarray_decode_type exp.exp_env layout_type layout_table Pbigarray_unknown_layout)
| _ ->
(Pbigarray_unknown, Pbigarray_unknown_layout)
(* *)
(***********************************************************************)
-(* $Id: typeopt.mli,v 1.4 2000/02/28 15:45:50 xleroy Exp $ *)
+(* $Id: typeopt.mli 2873 2000-02-28 15:45:50Z xleroy $ *)
(* Auxiliaries for type-based optimizations, e.g. array kinds *)
*.[sd]obj
*.lib
.gdb_history
+*.so
+*.a
# #
#########################################################################
-# $Id: Makefile,v 1.64.2.5 2009/05/25 12:25:25 doligez Exp $
+# $Id: Makefile 9280 2009-05-25 12:25:25Z doligez $
include Makefile.common
# #
#########################################################################
-# $Id: Makefile.common,v 1.6.2.1 2009/05/25 12:25:25 doligez Exp $
+# $Id: Makefile.common 9280 2009-05-25 12:25:25Z doligez $
include ../config/Makefile
# #
#########################################################################
-# $Id: Makefile.nt,v 1.48.2.1 2008/11/26 13:26:53 xleroy Exp $
+# $Id: Makefile.nt 9142 2008-11-26 13:26:53Z xleroy $
include Makefile.common
/* */
/***********************************************************************/
-/* $Id: alloc.c,v 1.29 2007/02/09 13:31:15 doligez Exp $ */
+/* $Id: alloc.c 7849 2007-02-09 13:31:15Z doligez $ */
/* 1. Allocation functions doing the same work as the macros in the
case where [Setup_for_gc] and [Restore_after_gc] are no-ops.
/* */
/***********************************************************************/
-/* $Id: alloc.h,v 1.18 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: alloc.h 7064 2005-09-22 14:21:50Z xleroy $ */
#ifndef CAML_ALLOC_H
#define CAML_ALLOC_H
/* */
/***********************************************************************/
-/* $Id: array.c,v 1.26 2008/09/08 09:43:28 frisch Exp $ */
+/* $Id: array.c 8995 2008-09-08 09:43:28Z frisch $ */
/* Operations on arrays */
/* */
/***********************************************************************/
-/* $Id: backtrace.c,v 1.25 2008/03/14 13:47:24 xleroy Exp $ */
+/* $Id: backtrace.c 9300 2009-06-18 11:17:16Z xclerc $ */
/* Stack backtrace for uncaught exceptions */
CAMLexport int caml_backtrace_pos = 0;
CAMLexport code_t * caml_backtrace_buffer = NULL;
CAMLexport value caml_backtrace_last_exn = Val_unit;
+CAMLexport char * caml_cds_file = NULL;
#define BACKTRACE_BUFFER_SIZE 1024
/* Location of fields in the Instruct.debug_event record */
uint32 num_events, orig, i;
value evl, l;
- exec_name = caml_exe_name;
+ if (caml_cds_file != NULL) {
+ exec_name = caml_cds_file;
+ } else {
+ exec_name = caml_exe_name;
+ }
fd = caml_attempt_open(&exec_name, &trail, 1);
if (fd < 0) CAMLreturn(Val_false);
caml_read_section_descriptors(fd, &trail);
/* */
/***********************************************************************/
-/* $Id: backtrace.h,v 1.8 2008/03/14 13:47:24 xleroy Exp $ */
+/* $Id: backtrace.h 9300 2009-06-18 11:17:16Z xclerc $ */
#ifndef CAML_BACKTRACE_H
#define CAML_BACKTRACE_H
CAMLextern int caml_backtrace_pos;
CAMLextern code_t * caml_backtrace_buffer;
CAMLextern value caml_backtrace_last_exn;
+CAMLextern char * caml_cds_file;
CAMLprim value caml_record_backtrace(value vflag);
#ifndef NATIVE_CODE
/* */
/***********************************************************************/
-/* $Id: callback.c,v 1.24 2006/09/11 12:12:24 doligez Exp $ */
+/* $Id: callback.c 7596 2006-09-11 12:12:24Z doligez $ */
/* Callbacks from C to Caml */
/* */
/***********************************************************************/
-/* $Id: callback.h,v 1.14 2006/09/11 12:12:24 doligez Exp $ */
+/* $Id: callback.h 7596 2006-09-11 12:12:24Z doligez $ */
/* Callbacks from C to Caml */
/* */
/***********************************************************************/
-/* $Id: compact.c,v 1.26 2008/02/29 12:56:15 doligez Exp $ */
+/* $Id: compact.c 8822 2008-02-29 12:56:15Z doligez $ */
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: compact.h,v 1.7 2003/12/31 14:20:35 doligez Exp $ */
+/* $Id: compact.h 6044 2003-12-31 14:20:40Z doligez $ */
#ifndef CAML_COMPACT_H
#define CAML_COMPACT_H
/* */
/***********************************************************************/
-/* $Id: compare.c,v 1.39 2008/01/11 16:13:16 doligez Exp $ */
+/* $Id: compare.c 8768 2008-01-11 16:13:18Z doligez $ */
#include <string.h>
#include <stdlib.h>
/* */
/***********************************************************************/
-/* $Id: compare.h,v 1.2 2003/12/31 14:20:35 doligez Exp $ */
+/* $Id: compare.h 6044 2003-12-31 14:20:40Z doligez $ */
#ifndef CAML_COMPARE_H
#define CAML_COMPARE_H
/* */
/***********************************************************************/
-/* $Id: compatibility.h,v 1.17 2008/07/28 11:59:55 doligez Exp $ */
+/* $Id: compatibility.h 8953 2008-07-28 11:59:55Z doligez $ */
/* definitions for compatibility with old identifiers */
/* */
/***********************************************************************/
-/* $Id: config.h,v 1.42.4.1 2008/11/02 14:30:05 xleroy Exp $ */
+/* $Id: config.h 9117 2008-11-02 14:30:05Z xleroy $ */
#ifndef CAML_CONFIG_H
#define CAML_CONFIG_H
/* */
/***********************************************************************/
-/* $Id: custom.c,v 1.15 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: custom.c 7064 2005-09-22 14:21:50Z xleroy $ */
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: custom.h,v 1.13 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: custom.h 7064 2005-09-22 14:21:50Z xleroy $ */
#ifndef CAML_CUSTOM_H
#define CAML_CUSTOM_H
/* */
/***********************************************************************/
-/* $Id: debugger.c,v 1.31 2008/07/29 08:31:41 xleroy Exp $ */
+/* $Id: debugger.c 8955 2008-07-29 08:31:41Z xleroy $ */
/* Interface with the debugger */
/* */
/***********************************************************************/
-/* $Id: debugger.h,v 1.10 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: debugger.h 7064 2005-09-22 14:21:50Z xleroy $ */
/* Interface with the debugger */
/* */
/***********************************************************************/
-/* $Id: dynlink.c,v 1.18 2008/04/22 12:24:10 frisch Exp $ */
+/* $Id: dynlink.c 8873 2008-04-22 12:24:10Z frisch $ */
/* Dynamic loading of C primitives. */
/* */
/***********************************************************************/
-/* $Id: dynlink.h,v 1.8 2004/02/22 15:07:51 xleroy Exp $ */
+/* $Id: dynlink.h 6130 2004-02-22 15:07:51Z xleroy $ */
/* Dynamic loading of C primitives. */
/* */
/***********************************************************************/
-/* $Id: exec.h,v 1.14 2004/06/01 12:36:34 xleroy Exp $ */
+/* $Id: exec.h 6359 2004-06-01 12:36:34Z xleroy $ */
/* exec.h : format of executable bytecode files */
/* */
/***********************************************************************/
-/* $Id: extern.c,v 1.64 2008/08/04 11:45:58 xleroy Exp $ */
+/* $Id: extern.c 8978 2008-08-04 11:45:58Z xleroy $ */
/* Structured output */
/* */
/***********************************************************************/
-/* $Id: fail.c,v 1.32 2008/09/18 11:23:28 xleroy Exp $ */
+/* $Id: fail.c 9030 2008-09-18 11:23:28Z xleroy $ */
/* Raising exceptions from C. */
/* */
/***********************************************************************/
-/* $Id: fail.h,v 1.27 2008/09/18 11:23:28 xleroy Exp $ */
+/* $Id: fail.h 9030 2008-09-18 11:23:28Z xleroy $ */
#ifndef CAML_FAIL_H
#define CAML_FAIL_H
/* */
/***********************************************************************/
-/* $Id: finalise.c,v 1.23.2.1 2009/05/18 09:37:46 doligez Exp $ */
+/* $Id: finalise.c 9259 2009-05-18 09:37:46Z doligez $ */
/* Handling of finalised values. */
/* */
/***********************************************************************/
-/* $Id: finalise.h,v 1.5 2004/01/02 19:23:21 doligez Exp $ */
+/* $Id: finalise.h 6047 2004-01-02 19:23:29Z doligez $ */
#ifndef CAML_FINALISE_H
#define CAML_FINALISE_H
/* */
/***********************************************************************/
-/* $Id: fix_code.c,v 1.31 2004/05/26 11:10:51 garrigue Exp $ */
+/* $Id: fix_code.c 6331 2004-05-26 11:10:52Z garrigue $ */
/* Handling of blocks of bytecode (endianness switch, threading). */
/* */
/***********************************************************************/
-/* $Id: fix_code.h,v 1.17 2004/01/02 19:23:21 doligez Exp $ */
+/* $Id: fix_code.h 6047 2004-01-02 19:23:29Z doligez $ */
/* Handling of blocks of bytecode (endianness switch, threading). */
/* */
/***********************************************************************/
-/* $Id: floats.c,v 1.50 2008/08/02 11:02:28 xleroy Exp $ */
+/* $Id: floats.c 8976 2008-08-02 11:02:28Z xleroy $ */
/* The interface of this file is in "mlvalues.h" and "alloc.h" */
/* */
/***********************************************************************/
-/* $Id: freelist.c,v 1.20.4.1 2008/11/18 10:24:42 doligez Exp $ */
+/* $Id: freelist.c 9131 2008-11-18 10:24:43Z doligez $ */
#define FREELIST_DEBUG 0
#if FREELIST_DEBUG
/* */
/***********************************************************************/
-/* $Id: freelist.h,v 1.13.4.1 2008/11/18 10:24:43 doligez Exp $ */
+/* $Id: freelist.h 9131 2008-11-18 10:24:43Z doligez $ */
/* Free lists of heap blocks. */
/* */
/***********************************************************************/
-/* $Id: gc.h,v 1.15 2004/07/19 13:20:06 xleroy Exp $ */
+/* $Id: gc.h 6557 2004-07-19 13:20:06Z xleroy $ */
#ifndef CAML_GC_H
#define CAML_GC_H
/* */
/***********************************************************************/
-/* $Id: gc_ctrl.c,v 1.53.4.2 2008/11/20 18:33:13 doligez Exp $ */
+/* $Id: gc_ctrl.c 9409 2009-11-04 12:24:35Z doligez $ */
#include "alloc.h"
#include "compact.h"
caml_stat_compactions = 0,
caml_stat_heap_chunks = 0;
-extern asize_t caml_major_heap_increment; /* bytes; see major_gc.c */
+extern uintnat caml_major_heap_increment; /* bytes; see major_gc.c */
extern uintnat caml_percent_free; /* see major_gc.c */
extern uintnat caml_percent_max; /* see compact.c */
extern uintnat caml_allocation_policy; /* see freelist.c */
fp = 100.0 * caml_fl_cur_size
/ (Wsize_bsize (caml_stat_heap_size) - caml_fl_cur_size);
- if (fp > 1000000.0) fp = 1000000.0;
+ if (fp > 999999.0) fp = 999999.0;
caml_gc_message (0x200, "Estimated overhead (lower bound) = %"
ARCH_INTNAT_PRINTF_FORMAT "u%%\n",
(uintnat) fp);
/* */
/***********************************************************************/
-/* $Id: gc_ctrl.h,v 1.16 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: gc_ctrl.h 7064 2005-09-22 14:21:50Z xleroy $ */
#ifndef CAML_GC_CTRL_H
#define CAML_GC_CTRL_H
/* */
/***********************************************************************/
-/* $Id: globroots.c,v 1.11.2.1 2009/03/28 15:26:37 xleroy Exp $ */
+/* $Id: globroots.c 9195 2009-03-28 15:26:37Z xleroy $ */
/* Registration of global memory roots */
/* */
/***********************************************************************/
-/* $Id: globroots.h,v 1.5 2008/03/10 19:56:39 xleroy Exp $ */
+/* $Id: globroots.h 8828 2008-03-10 19:56:39Z xleroy $ */
/* Registration of global memory roots */
/* */
/***********************************************************************/
-/* $Id: hash.c,v 1.26 2008/08/01 14:10:36 xleroy Exp $ */
+/* $Id: hash.c 8970 2008-08-01 14:10:36Z xleroy $ */
/* The generic hashing primitive */
/* */
/***********************************************************************/
-/* $Id: instrtrace.c,v 1.22 2008/01/03 09:37:09 xleroy Exp $ */
+/* $Id: instrtrace.c 8743 2008-01-03 09:37:10Z xleroy $ */
/* Trace the instructions executed */
/* */
/***********************************************************************/
-/* $Id: instrtrace.h,v 1.9 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: instrtrace.h 7064 2005-09-22 14:21:50Z xleroy $ */
/* Trace the instructions executed */
/* */
/***********************************************************************/
-/* $Id: instruct.h,v 1.20 2004/05/26 11:10:51 garrigue Exp $ */
+/* $Id: instruct.h 6331 2004-05-26 11:10:52Z garrigue $ */
/* The instruction set. */
/* */
/***********************************************************************/
-/* $Id: int64_emul.h,v 1.5.18.1 2009/03/28 18:34:19 xleroy Exp $ */
+/* $Id: int64_emul.h 9202 2009-03-28 18:34:19Z xleroy $ */
/* Software emulation of 64-bit integer arithmetic, for C compilers
that do not support it. */
/* */
/***********************************************************************/
-/* $Id: int64_format.h,v 1.2 2003/12/15 18:10:47 doligez Exp $ */
+/* $Id: int64_format.h 6021 2003-12-15 18:10:51Z doligez $ */
/* printf-like formatting of 64-bit integers, in case the C library
printf() function does not support them. */
/* */
/***********************************************************************/
-/* $Id: int64_native.h,v 1.5.18.1 2009/03/28 18:34:19 xleroy Exp $ */
+/* $Id: int64_native.h 9202 2009-03-28 18:34:19Z xleroy $ */
/* Wrapper macros around native 64-bit integer arithmetic,
so that it has the same interface as the software emulation
/* */
/***********************************************************************/
-/* $Id: intern.c,v 1.61 2008/01/11 16:13:16 doligez Exp $ */
+/* $Id: intern.c 8768 2008-01-11 16:13:18Z doligez $ */
/* Structured input, compact format */
/* */
/***********************************************************************/
-/* $Id: interp.c,v 1.97.2.1 2009/05/25 08:02:16 xleroy Exp $ */
+/* $Id: interp.c 9279 2009-05-25 08:03:14Z xleroy $ */
/* The bytecode interpreter */
#include <stdio.h>
/* */
/***********************************************************************/
-/* $Id: interp.h,v 1.13 2004/04/26 14:08:22 basile Exp $ */
+/* $Id: interp.h 6257 2004-04-26 14:08:22Z basile $ */
/* The bytecode interpreter */
/* */
/***********************************************************************/
-/* $Id: intext.h,v 1.32 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: intext.h 7064 2005-09-22 14:21:50Z xleroy $ */
/* Structured input/output */
/* */
/***********************************************************************/
-/* $Id: ints.c,v 1.51.4.2 2009/03/28 18:43:08 xleroy Exp $ */
+/* $Id: ints.c 9203 2009-03-28 18:43:08Z xleroy $ */
#include <stdio.h>
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: io.c,v 1.77 2007/02/25 12:38:36 xleroy Exp $ */
+/* $Id: io.c 7919 2007-02-25 12:38:36Z xleroy $ */
/* Buffered input/output. */
/* */
/***********************************************************************/
-/* $Id: io.h,v 1.32 2008/09/27 21:16:29 weis Exp $ */
+/* $Id: io.h 9041 2008-09-27 21:16:29Z weis $ */
/* Buffered input/output */
/* */
/***********************************************************************/
-/* $Id: lexing.c,v 1.27 2004/01/01 16:42:36 doligez Exp $ */
+/* $Id: lexing.c 6045 2004-01-01 16:42:43Z doligez $ */
/* The table-driven automaton for lexers generated by camllex. */
/* */
/***********************************************************************/
-/* $Id: main.c,v 1.37 2008/02/29 12:56:15 doligez Exp $ */
+/* $Id: main.c 8822 2008-02-29 12:56:15Z doligez $ */
/* Main entry point (can be overridden by a user-provided main()
function that calls caml_main() later). */
/* */
/***********************************************************************/
-/* $Id: major_gc.c,v 1.62.2.1 2008/11/12 12:53:07 doligez Exp $ */
+/* $Id: major_gc.c 9409 2009-11-04 12:24:35Z doligez $ */
#include <limits.h>
#include "weak.h"
uintnat caml_percent_free;
-intnat caml_major_heap_increment;
+uintnat caml_major_heap_increment;
CAMLexport char *caml_heap_start;
char *caml_gc_sweep_hp;
int caml_gc_phase; /* always Phase_mark, Phase_sweep, or Phase_idle */
/* */
/***********************************************************************/
-/* $Id: major_gc.h,v 1.23 2008/01/11 11:55:36 doligez Exp $ */
+/* $Id: major_gc.h 8766 2008-01-11 11:55:36Z doligez $ */
#ifndef CAML_MAJOR_GC_H
#define CAML_MAJOR_GC_H
/* */
/***********************************************************************/
-/* $Id: md5.c,v 1.20 2006/04/16 23:28:21 doligez Exp $ */
+/* $Id: md5.c 7382 2006-04-16 23:28:22Z doligez $ */
#include <string.h>
#include "alloc.h"
/* */
/***********************************************************************/
-/* $Id: md5.h,v 1.13 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: md5.h 7064 2005-09-22 14:21:50Z xleroy $ */
/* MD5 message digest */
/* */
/***********************************************************************/
-/* $Id: memory.c,v 1.46.4.1 2008/11/02 14:30:05 xleroy Exp $ */
+/* $Id: memory.c 9117 2008-11-02 14:30:05Z xleroy $ */
#include <stdlib.h>
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: memory.h,v 1.59.4.1 2008/11/02 14:30:05 xleroy Exp $ */
+/* $Id: memory.h 9117 2008-11-02 14:30:05Z xleroy $ */
/* Allocation macros and functions */
/* */
/***********************************************************************/
-/* $Id: meta.c,v 1.33 2008/01/31 09:13:19 frisch Exp $ */
+/* $Id: meta.c 8800 2008-01-31 09:13:19Z frisch $ */
/* Primitives for the toplevel */
/* */
/***********************************************************************/
-/* $Id: minor_gc.c,v 1.47 2008/07/28 12:03:55 doligez Exp $ */
+/* $Id: minor_gc.c 8954 2008-07-28 12:03:55Z doligez $ */
#include <string.h>
#include "config.h"
/* */
/***********************************************************************/
-/* $Id: minor_gc.h,v 1.18 2007/05/04 14:05:13 doligez Exp $ */
+/* $Id: minor_gc.h 8211 2007-05-04 14:05:13Z doligez $ */
#ifndef CAML_MINOR_GC_H
#define CAML_MINOR_GC_H
/* */
/***********************************************************************/
-/* $Id: misc.c,v 1.29 2008/02/29 12:56:15 doligez Exp $ */
+/* $Id: misc.c 8822 2008-02-29 12:56:15Z doligez $ */
#include <stdio.h>
#include "config.h"
/* */
/***********************************************************************/
-/* $Id: misc.h,v 1.33 2008/02/29 12:56:15 doligez Exp $ */
+/* $Id: misc.h 8822 2008-02-29 12:56:15Z doligez $ */
/* Miscellaneous macros and variables. */
/* */
/***********************************************************************/
-/* $Id: mlvalues.h,v 1.58 2008/08/01 14:10:36 xleroy Exp $ */
+/* $Id: mlvalues.h 8970 2008-08-01 14:10:36Z xleroy $ */
#ifndef CAML_MLVALUES_H
#define CAML_MLVALUES_H
/* */
/***********************************************************************/
-/* $Id: obj.c,v 1.42 2008/01/29 13:11:15 doligez Exp $ */
+/* $Id: obj.c 9350 2009-09-24 09:12:51Z doligez $ */
/* Operations on objects */
return Val_unit;
}
+CAMLprim value caml_obj_add_offset (value v, value offset)
+{
+ return v + Int32_val (offset);
+}
/* The following functions are used in stdlib/lazy.ml.
They are not written in O'Caml because they must be atomic with respect
/* */
/***********************************************************************/
-/* $Id: osdeps.h,v 1.12 2008/04/22 12:24:10 frisch Exp $ */
+/* $Id: osdeps.h 8873 2008-04-22 12:24:10Z frisch $ */
/* Operating system - specific stuff */
/* */
/***********************************************************************/
-/* $Id: parsing.c,v 1.21 2008/08/06 09:38:25 xleroy Exp $ */
+/* $Id: parsing.c 8983 2008-08-06 09:38:25Z xleroy $ */
/* The PDA automaton for parsers generated by camlyacc */
/* */
/***********************************************************************/
-/* $Id: prims.h,v 1.10 2004/02/22 15:07:51 xleroy Exp $ */
+/* $Id: prims.h 6130 2004-02-22 15:07:51Z xleroy $ */
/* Interface with C primitives. */
/* */
/***********************************************************************/
-/* $Id: printexc.c,v 1.17 2007/01/29 12:11:15 xleroy Exp $ */
+/* $Id: printexc.c 7812 2007-01-29 12:11:18Z xleroy $ */
/* Print an uncaught exception and abort */
/* */
/***********************************************************************/
-/* $Id: printexc.h,v 1.5 2004/01/01 16:42:37 doligez Exp $ */
+/* $Id: printexc.h 6045 2004-01-01 16:42:43Z doligez $ */
#ifndef CAML_PRINTEXC_H
#define CAML_PRINTEXC_H
/* */
/***********************************************************************/
-/* $Id: reverse.h,v 1.12 2003/12/15 18:10:48 doligez Exp $ */
+/* $Id: reverse.h 6021 2003-12-15 18:10:51Z doligez $ */
/* Swap byte-order in 16, 32, and 64-bit integers or floats */
/* */
/***********************************************************************/
-/* $Id: roots.c,v 1.30 2008/03/10 19:56:39 xleroy Exp $ */
+/* $Id: roots.c 8828 2008-03-10 19:56:39Z xleroy $ */
/* To walk the memory roots for garbage collection */
/* */
/***********************************************************************/
-/* $Id: roots.h,v 1.19 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: roots.h 7064 2005-09-22 14:21:50Z xleroy $ */
#ifndef CAML_ROOTS_H
#define CAML_ROOTS_H
/* */
/***********************************************************************/
-/* $Id: signals.c,v 1.53 2007/02/23 09:29:45 xleroy Exp $ */
+/* $Id: signals.c 7904 2007-02-23 09:29:45Z xleroy $ */
/* Signal handling, code common to the bytecode and native systems */
/* */
/***********************************************************************/
-/* $Id: signals.h,v 1.27 2007/02/23 09:29:45 xleroy Exp $ */
+/* $Id: signals.h 7904 2007-02-23 09:29:45Z xleroy $ */
#ifndef CAML_SIGNALS_H
#define CAML_SIGNALS_H
/* */
/***********************************************************************/
-/* $Id: signals_byt.c,v 1.1 2007/02/23 09:29:45 xleroy Exp $ */
+/* $Id: signals_byt.c 7904 2007-02-23 09:29:45Z xleroy $ */
/* Signal handling, code specific to the bytecode interpreter */
/* */
/***********************************************************************/
-/* $Id: signals_machdep.h,v 1.3 2007/02/23 09:43:14 xleroy Exp $ */
+/* $Id: signals_machdep.h 7905 2007-02-23 09:43:14Z xleroy $ */
/* Processor-specific operation: atomic "read and clear" */
/* */
/***********************************************************************/
-/* $Id: stacks.c,v 1.22 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: stacks.c 7064 2005-09-22 14:21:50Z xleroy $ */
/* To initialize and resize the stacks */
/* */
/***********************************************************************/
-/* $Id: stacks.h,v 1.14 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: stacks.h 7064 2005-09-22 14:21:50Z xleroy $ */
/* structure of the stacks */
/* */
/***********************************************************************/
-/* $Id: startup.c,v 1.70.2.1 2008/11/18 10:24:43 doligez Exp $ */
+/* $Id: startup.c 9300 2009-06-18 11:17:16Z xclerc $ */
/* Start-up code */
char **argv)
{
value res;
+ char* cds_file;
caml_init_ieee_floats();
caml_init_custom_operations();
#ifdef DEBUG
caml_verb_gc = 63;
#endif
+ cds_file = getenv("CAML_DEBUG_FILE");
+ if (cds_file != NULL) {
+ caml_cds_file = caml_stat_alloc(strlen(cds_file) + 1);
+ strcpy(caml_cds_file, cds_file);
+ }
parse_camlrunparam();
caml_external_raise = NULL;
/* Initialize the abstract machine */
init_atoms();
/* Initialize the interpreter */
caml_interprete(NULL, 0);
+ /* Initialize the debugger, if needed */
+ caml_debugger_init();
/* Load the code */
caml_start_code = code;
+ caml_code_size = code_size;
+ if (caml_debugger_in_use) {
+ int len, i;
+ len = code_size / sizeof(opcode_t);
+ caml_saved_code = (unsigned char *) caml_stat_alloc(len);
+ for (i = 0; i < len; i++) caml_saved_code[i] = caml_start_code[i];
+ }
#ifdef THREADED_CODE
caml_thread_code(caml_start_code, code_size);
#endif
/* Record the sections (for caml_get_section_table in meta.c) */
caml_section_table = section_table;
caml_section_table_size = section_table_size;
- /* Run the code */
+ /* Initialize system libraries */
caml_init_exceptions();
caml_sys_init("", argv);
- res = caml_interprete(caml_start_code, code_size);
- if (Is_exception_result(res))
- caml_fatal_uncaught_exception(Extract_exception(res));
+ /* Execute the program */
+ caml_debugger(PROGRAM_START);
+ res = caml_interprete(caml_start_code, caml_code_size);
+ if (Is_exception_result(res)) {
+ caml_exn_bucket = Extract_exception(res);
+ if (caml_debugger_in_use) {
+ caml_extern_sp = &caml_exn_bucket; /* The debugger needs the
+ exception value.*/
+ caml_debugger(UNCAUGHT_EXC);
+ }
+ caml_fatal_uncaught_exception(caml_exn_bucket);
+ }
}
/* */
/***********************************************************************/
-/* $Id: startup.h,v 1.5 2004/02/22 15:07:51 xleroy Exp $ */
+/* $Id: startup.h 6130 2004-02-22 15:07:51Z xleroy $ */
#ifndef CAML_STARTUP_H
#define CAML_STARTUP_H
/* */
/***********************************************************************/
-/* $Id: str.c,v 1.28 2007/01/30 09:52:08 xleroy Exp $ */
+/* $Id: str.c 7819 2007-01-30 09:52:08Z xleroy $ */
/* Operations on strings */
/* */
/***********************************************************************/
-/* $Id: sys.c,v 1.83 2007/03/01 13:37:39 xleroy Exp $ */
+/* $Id: sys.c 7944 2007-03-01 13:37:39Z xleroy $ */
/* Basic system calls */
/* */
/***********************************************************************/
-/* $Id: sys.h,v 1.16 2007/02/25 12:38:36 xleroy Exp $ */
+/* $Id: sys.h 7919 2007-02-25 12:38:36Z xleroy $ */
#ifndef CAML_SYS_H
#define CAML_SYS_H
/* */
/***********************************************************************/
-/* $Id: terminfo.c,v 1.23 2004/01/01 16:42:38 doligez Exp $ */
+/* $Id: terminfo.c 6045 2004-01-01 16:42:43Z doligez $ */
/* Read and output terminal commands */
/* */
/***********************************************************************/
-/* $Id: ui.h,v 1.5 2003/12/15 18:10:49 doligez Exp $ */
+/* $Id: ui.h 6021 2003-12-15 18:10:51Z doligez $ */
/* Function declarations for non-Unix user interfaces */
/* */
/***********************************************************************/
-/* $Id: unix.c,v 1.35.2.1 2008/12/03 12:39:44 xleroy Exp $ */
+/* $Id: unix.c 9147 2008-12-03 12:39:44Z xleroy $ */
/* Unix-specific stuff */
/* */
/***********************************************************************/
-/* $Id: weak.c,v 1.29 2008/09/17 14:55:30 doligez Exp $ */
+/* $Id: weak.c 9028 2008-09-17 14:55:30Z doligez $ */
/* Operations on weak arrays */
/* */
/***********************************************************************/
-/* $Id: weak.h,v 1.7 2004/01/01 16:42:38 doligez Exp $ */
+/* $Id: weak.h 6045 2004-01-01 16:42:43Z doligez $ */
/* Operations on weak arrays */
/* */
/***********************************************************************/
-/* $Id: win32.c,v 1.36 2008/04/22 12:24:10 frisch Exp $ */
+/* $Id: win32.c 8873 2008-04-22 12:24:10Z frisch $ */
/* Win32-specific stuff */
let () =
!options.ocaml_Flags ^= "-w Ale -warn-error Ale"^^
- (if getenv "DTYPES" "" <> "" then "-dtypes"
+ (if getenv "DTYPES" "" <> "" then "-annot"
else "");
!options.ocaml_P4 := camlp4boot_may_debug may_define_unix;
!options.ocaml_P4_opt := camlp4boot_may_debug ("-D OPT" :: may_define_unix);
# #
#########################################################################
-# $Id: Makefile-templ,v 1.31 2007/10/30 12:37:16 xleroy Exp $
+# $Id: Makefile-templ 9313 2009-07-15 12:13:31Z xleroy $
### Compile-time configuration
# Under FreeBSD:
#CPP=cpp -P
+### Magic declarations for ocamlbuild -- leave unchanged
+#ml let syslib x = "-l"^x;;
+#ml let mklib out files opts = Printf.sprintf "ar rc %s %s %s; ranlib %s" out opts files out;;
+
### How to invoke ranlib
-# BSD-style:
-#RANLIB=ranlib
-#RANLIBCMD=ranlib
+RANLIB=ranlib
+RANLIBCMD=ranlib
+
# If ranlib is not needed:
#RANLIB=ar rs
#RANLIBCMD=
# #
#########################################################################
-# $Id: Makefile.mingw,v 1.27.2.1 2008/11/09 09:44:24 xleroy Exp $
+# $Id: Makefile.mingw 9124 2008-11-09 09:44:24Z xleroy $
# Configuration for Windows, Mingw compiler
# #
#########################################################################
-# $Id: Makefile.msvc,v 1.30.2.1 2008/11/10 15:24:51 xleroy Exp $
+# $Id: Makefile.msvc 9126 2008-11-10 15:24:51Z xleroy $
# Configuration for Windows, Visual C++ compiler
# #
#########################################################################
-# $Id: Makefile.msvc64,v 1.13 2008/07/29 08:31:41 xleroy Exp $
+# $Id: Makefile.msvc64 8955 2008-07-29 08:31:41Z xleroy $
# Configuration for Windows, Visual C++ compiler
/* */
/***********************************************************************/
-/* $Id: align.c,v 1.7 2001/12/07 13:39:41 xleroy Exp $ */
+/* $Id: align.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <stdio.h>
#include <signal.h>
/* */
/***********************************************************************/
-/* $Id: async_io.c,v 1.8 2003/02/11 14:05:36 xleroy Exp $ */
+/* $Id: async_io.c 5393 2003-02-11 14:05:36Z xleroy $ */
#include <stdio.h>
#include <fcntl.h>
/* */
/***********************************************************************/
-/* $Id: bytecopy.c,v 1.7 2001/12/07 13:39:43 xleroy Exp $ */
+/* $Id: bytecopy.c 4144 2001-12-07 13:41:02Z xleroy $ */
char buffer[27];
/* */
/***********************************************************************/
-/* $Id: dblalign.c,v 1.9 2001/12/07 13:39:43 xleroy Exp $ */
+/* $Id: dblalign.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <stdio.h>
#include <signal.h>
/* */
/***********************************************************************/
-/* $Id: divmod.c,v 1.3 2003/12/30 23:59:47 doligez Exp $ */
+/* $Id: divmod.c 6043 2003-12-31 00:00:57Z doligez $ */
/* Test semantics of division and modulus for negative arguments */
/* */
/***********************************************************************/
-/* $Id: elf.c,v 1.4 2001/12/07 13:39:43 xleroy Exp $ */
+/* $Id: elf.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <stdio.h>
/* */
/***********************************************************************/
-/* $Id: endian.c,v 1.8 2001/12/07 13:39:43 xleroy Exp $ */
+/* $Id: endian.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include "m.h"
/* */
/***********************************************************************/
-/* $Id: getgroups.c,v 1.8 2001/12/07 13:39:43 xleroy Exp $ */
+/* $Id: getgroups.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <sys/types.h>
#include <limits.h>
/* */
/***********************************************************************/
-/* $Id: gethostbyaddr.c,v 1.2 2002/05/06 08:29:52 xleroy Exp $ */
+/* $Id: gethostbyaddr.c 4771 2002-05-06 08:29:52Z xleroy $ */
#ifndef _REENTRANT
/* This helps detection on Digital Unix... */
/* */
/***********************************************************************/
-/* $Id: gethostbyname.c,v 1.2 2002/05/06 08:29:52 xleroy Exp $ */
+/* $Id: gethostbyname.c 4771 2002-05-06 08:29:52Z xleroy $ */
#ifndef _REENTRANT
/* This helps detection on Digital Unix... */
/* */
/***********************************************************************/
-/* $Id: ia32sse2.c,v 1.2 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: ia32sse2.c 6824 2005-03-24 17:20:54Z doligez $ */
/* Test whether IA32 assembler supports SSE2 instructions */
/* */
/***********************************************************************/
-/* $Id: int64align.c,v 1.2 2001/12/07 13:39:43 xleroy Exp $ */
+/* $Id: int64align.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <stdio.h>
#include <signal.h>
/* */
/***********************************************************************/
-/* $Id: longlong.c,v 1.4 2002/05/25 08:33:26 xleroy Exp $ */
+/* $Id: longlong.c 4833 2002-05-25 08:33:26Z xleroy $ */
#include <stdio.h>
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: schar.c,v 1.8 2001/12/07 13:39:44 xleroy Exp $ */
+/* $Id: schar.c 4144 2001-12-07 13:41:02Z xleroy $ */
char foo[]="\377";
/* */
/***********************************************************************/
-/* $Id: schar2.c,v 1.8 2001/12/07 13:39:44 xleroy Exp $ */
+/* $Id: schar2.c 4144 2001-12-07 13:41:02Z xleroy $ */
signed char foo[]="\377";
/* */
/***********************************************************************/
-/* $Id: sighandler.c,v 1.7 2001/12/07 13:39:44 xleroy Exp $ */
+/* $Id: sighandler.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <signal.h>
/* */
/***********************************************************************/
-/* $Id: signals.c,v 1.7 2001/12/07 13:39:44 xleroy Exp $ */
+/* $Id: signals.c 4144 2001-12-07 13:41:02Z xleroy $ */
/* To determine the semantics of signal handlers
(System V: signal is reset to default behavior on entrance to the handler
/* */
/***********************************************************************/
-/* $Id: sizes.c,v 1.9 2001/12/07 13:39:44 xleroy Exp $ */
+/* $Id: sizes.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <stdio.h>
/* */
/***********************************************************************/
-/* $Id: stackov.c,v 1.5 2008/01/11 16:13:16 doligez Exp $ */
+/* $Id: stackov.c 8768 2008-01-11 16:13:18Z doligez $ */
#include <stdio.h>
#include <signal.h>
/* */
/***********************************************************************/
-/* $Id: m-nt.h,v 1.12 2006/05/09 16:01:26 xleroy Exp $ */
+/* $Id: m-nt.h 7408 2006-05-09 16:02:09Z xleroy $ */
/* Machine configuration, Intel x86 processors, Win32,
Visual C++ or Mingw compiler */
/* */
/***********************************************************************/
-/* $Id: m-templ.h,v 1.15 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: m-templ.h 7064 2005-09-22 14:21:50Z xleroy $ */
/* Processor dependencies */
/* */
/***********************************************************************/
-/* $Id: s-nt.h,v 1.12 2002/06/18 13:00:55 xleroy Exp $ */
+/* $Id: s-nt.h 4933 2002-06-18 13:01:53Z xleroy $ */
/* Operating system dependencies, Intel x86 processors, Windows NT */
/* */
/***********************************************************************/
-/* $Id: s-templ.h,v 1.22 2004/05/18 08:50:22 xleroy Exp $ */
+/* $Id: s-templ.h 6304 2004-05-18 08:50:22Z xleroy $ */
/* Operating system and standard library dependencies. */
# #
#########################################################################
-# $Id: configure,v 1.266.2.5 2009/05/20 15:33:09 weis Exp $
+# $Id: configure 9414 2009-11-17 13:28:44Z weis $
configure_options="$*"
prefix=/usr/local
pthread_wanted=no;;
-no-tk|--no-tk)
tk_wanted=no;;
+ -partialld|--partialld)
+ partialld="$2"; shift;;
-tkdefs*|--tkdefs*)
tk_defs=$2; shift;;
-tklibs*|--tklibs*)
gcc*,*-*-cygwin*)
bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32"
dllccompopts="-D_WIN32 -DCAML_DLL"
- flexlink="flexlink -chain cygwin -merge-manifest"
- flexdir=`$flexlink -where | dos2unix`
- if test -z "$flexdir"; then
- echo "flexlink not found: native shared libraries won't be available"
- withsharedlibs=no
- else
- iflexdir="-I\"$flexdir\""
- mkexe="$flexlink -exe"
+ if test $withsharedlibs = yes; then
+ flexlink="flexlink -chain cygwin -merge-manifest"
+ flexdir=`$flexlink -where | dos2unix`
+ if test -z "$flexdir"; then
+ echo "flexlink not found: native shared libraries won't be available"
+ withsharedlibs=no
+ else
+ iflexdir="-I\"$flexdir\""
+ mkexe="$flexlink -exe"
+ fi
fi
exe=".exe"
ostype="Cygwin";;
../parsing/longident.cmx ../typing/ident.cmx ../typing/env.cmx \
dynlink.cmx ../typing/ctype.cmx ../utils/config.cmx loadprinter.cmi
main.cmo: unix_tools.cmi ../otherlibs/unix/unix.cmi time_travel.cmi \
- show_information.cmi question.cmi program_management.cmi parameters.cmi \
- ../utils/misc.cmi input_handling.cmi frames.cmi exec.cmi \
+ show_information.cmi question.cmi program_management.cmi primitives.cmi \
+ parameters.cmi ../utils/misc.cmi input_handling.cmi frames.cmi exec.cmi \
../typing/env.cmi debugger_config.cmi ../utils/config.cmi \
command_line.cmi ../utils/clflags.cmi checkpoints.cmi
main.cmx: unix_tools.cmx ../otherlibs/unix/unix.cmx time_travel.cmx \
- show_information.cmx question.cmx program_management.cmx parameters.cmx \
- ../utils/misc.cmx input_handling.cmx frames.cmx exec.cmx \
+ show_information.cmx question.cmx program_management.cmx primitives.cmx \
+ parameters.cmx ../utils/misc.cmx input_handling.cmx frames.cmx exec.cmx \
../typing/env.cmx debugger_config.cmx ../utils/config.cmx \
command_line.cmx ../utils/clflags.cmx checkpoints.cmx
parameters.cmo: primitives.cmi envaux.cmi debugger_config.cmi \
debugger_config.cmx breakpoints.cmx program_management.cmi
question.cmo: primitives.cmi lexer.cmi input_handling.cmi question.cmi
question.cmx: primitives.cmx lexer.cmx input_handling.cmx question.cmi
-show_information.cmo: symbols.cmi show_source.cmi printval.cmi \
+show_information.cmo: symbols.cmi source.cmi show_source.cmi printval.cmi \
../utils/misc.cmi ../bytecomp/instruct.cmi frames.cmi events.cmi \
debugcom.cmi checkpoints.cmi breakpoints.cmi show_information.cmi
-show_information.cmx: symbols.cmx show_source.cmx printval.cmx \
+show_information.cmx: symbols.cmx source.cmx show_source.cmx printval.cmx \
../utils/misc.cmx ../bytecomp/instruct.cmx frames.cmx events.cmx \
debugcom.cmx checkpoints.cmx breakpoints.cmx show_information.cmi
show_source.cmo: source.cmi primitives.cmi parameters.cmi \
../utils/config.cmi source.cmi
source.cmx: primitives.cmx ../utils/misc.cmx debugger_config.cmx \
../utils/config.cmx source.cmi
-symbols.cmo: ../bytecomp/symtable.cmi ../bytecomp/instruct.cmi events.cmi \
- debugger_config.cmi debugcom.cmi checkpoints.cmi \
- ../bytecomp/bytesections.cmi symbols.cmi
-symbols.cmx: ../bytecomp/symtable.cmx ../bytecomp/instruct.cmx events.cmx \
- debugger_config.cmx debugcom.cmx checkpoints.cmx \
- ../bytecomp/bytesections.cmx symbols.cmi
+symbols.cmo: ../bytecomp/symtable.cmi program_loading.cmi \
+ ../bytecomp/instruct.cmi events.cmi debugger_config.cmi debugcom.cmi \
+ checkpoints.cmi ../bytecomp/bytesections.cmi symbols.cmi
+symbols.cmx: ../bytecomp/symtable.cmx program_loading.cmx \
+ ../bytecomp/instruct.cmx events.cmx debugger_config.cmx debugcom.cmx \
+ checkpoints.cmx ../bytecomp/bytesections.cmx symbols.cmi
time_travel.cmo: trap_barrier.cmi symbols.cmi question.cmi \
program_loading.cmi primitives.cmi ../utils/misc.cmi int64ops.cmi \
../bytecomp/instruct.cmi input_handling.cmi exec.cmi events.cmi \
# #
#########################################################################
-# $Id: Makefile,v 1.33 2008/07/29 08:31:41 xleroy Exp $
+# $Id: Makefile 8955 2008-07-29 08:31:41Z xleroy $
UNIXDIR=../otherlibs/unix
include Makefile.shared
# #
#########################################################################
-# $Id: Makefile.nt,v 1.1 2008/07/29 08:31:41 xleroy Exp $
+# $Id: Makefile.nt 8955 2008-07-29 08:31:41Z xleroy $
UNIXDIR=../otherlibs/win32unix
include Makefile.shared
# #
#########################################################################
-# $Id: Makefile.shared,v 1.1 2008/07/29 08:31:41 xleroy Exp $
+# $Id: Makefile.shared 9300 2009-06-18 11:17:16Z xclerc $
include ../config/Makefile
pos.cmo \
checkpoints.cmo \
events.cmo \
+ program_loading.cmo \
symbols.cmo \
breakpoints.cmo \
trap_barrier.cmo \
history.cmo \
- program_loading.cmo \
printval.cmo \
show_source.cmo \
time_travel.cmo \
frames.cmo \
eval.cmo \
show_information.cmo \
- loadprinter.cmo \
+ loadprinter.cmo \
parser.cmo \
command_line.cmo \
main.cmo
(* *)
(***********************************************************************)
-(* $Id: breakpoints.ml,v 1.13.18.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: breakpoints.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(******************************* Breakpoints ***************************)
(* *)
(***********************************************************************)
-(* $Id: breakpoints.mli,v 1.2 1999/11/17 18:57:22 xleroy Exp $ *)
+(* $Id: breakpoints.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(******************************* Breakpoints ***************************)
(* *)
(***********************************************************************)
-(* $Id: checkpoints.ml,v 1.4 2002/10/29 17:53:23 doligez Exp $ *)
+(* $Id: checkpoints.ml 5200 2002-10-29 17:53:24Z doligez $ *)
(*************************** Checkpoints *******************************)
(* *)
(***********************************************************************)
-(* $Id: checkpoints.mli,v 1.4 2002/10/29 17:53:23 doligez Exp $ *)
+(* $Id: checkpoints.mli 5200 2002-10-29 17:53:24Z doligez $ *)
(***************************** Checkpoints *****************************)
(* *)
(***********************************************************************)
-(* $Id: command_line.ml,v 1.25.2.2 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: command_line.ml 9299 2009-06-17 08:15:39Z xclerc $ *)
(************************ Reading and executing commands ***************)
let instr_list ppf lexbuf =
let (mo, beg, e) = list_arguments_eol Lexer.lexeme lexbuf in
- let (curr_mod, point) =
+ let (curr_mod, line, column) =
try
selected_point ()
with
| Not_found ->
- ("", -1)
+ ("", -1, -1)
in
let mdle = convert_module (module_of_longident mo) in
let pos = Lexing.dummy_pos in
+ let buffer =
+ try get_buffer pos mdle with
+ | Not_found -> error ("No source file for " ^ mdle ^ ".") in
+ let point =
+ if column <> -1 then
+ (point_of_coord buffer line 1) + column
+ else
+ -1 in
let beginning =
match beg with
- | None when (mo <> None) || (point = -1) ->
+ | None when (mo <> None) || (line = -1) ->
1
| None ->
- let buffer =
- try get_buffer pos mdle with
- | Not_found -> error ("No source file for " ^ mdle ^ ".")
- in
begin try
- max 1 ((snd (line_of_pos buffer point)) - 10)
+ max 1 (line - 10)
with Out_of_range ->
1
end
print_endline " Address Characters Kind Repr.";
List.iter
(function ev ->
- Printf.printf
+ let start_char, end_char =
+ try
+ let buffer = get_buffer (Events.get_pos ev) ev.ev_module in
+ (snd (start_and_cnum buffer ev.ev_loc.Location.loc_start)),
+ (snd (start_and_cnum buffer ev.ev_loc.Location.loc_end))
+ with _ ->
+ ev.ev_loc.Location.loc_start.Lexing.pos_cnum,
+ ev.ev_loc.Location.loc_end.Lexing.pos_cnum in
+ Printf.printf
"%10d %6d-%-6d %10s %10s\n"
ev.ev_pos
- ev.ev_loc.Location.loc_start.Lexing.pos_cnum
- ev.ev_loc.Location.loc_end.Lexing.pos_cnum
+ start_char
+ end_char
((match ev.ev_kind with
Event_before -> "before"
| Event_after _ -> "after"
(* *)
(***********************************************************************)
-(* $Id: command_line.mli,v 1.4 2000/03/07 18:22:14 weis Exp $ *)
+(* $Id: command_line.mli 2919 2000-03-07 18:22:19Z weis $ *)
(************************ Reading and executing commands ***************)
(* *)
(***********************************************************************)
-(* $Id: debugcom.ml,v 1.13 2008/07/29 08:31:41 xleroy Exp $ *)
+(* $Id: debugcom.ml 8955 2008-07-29 08:31:41Z xleroy $ *)
(* Low-level communication with the debuggee *)
(* *)
(***********************************************************************)
-(* $Id: debugcom.mli,v 1.8 2002/10/29 17:53:23 doligez Exp $ *)
+(* $Id: debugcom.mli 5200 2002-10-29 17:53:24Z doligez $ *)
(* Low-level communication with the debuggee *)
(* *)
(***********************************************************************)
-(* $Id: debugger_config.ml,v 1.11.2.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: debugger_config.ml 9221 2009-04-02 09:06:33Z xclerc $ *)
(**************************** Configuration file ***********************)
(* *)
(***********************************************************************)
-(* $Id: debugger_config.mli,v 1.5.28.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: debugger_config.mli 9221 2009-04-02 09:06:33Z xclerc $ *)
(********************** Configuration file *****************************)
(* *)
(***********************************************************************)
-(* $Id: dynlink.ml,v 1.2.14.1 2009/04/02 09:21:20 xclerc Exp $ *)
+(* $Id: dynlink.ml 9222 2009-04-02 09:21:20Z xclerc $ *)
(* Dynamic loading of .cmo files *)
(* *)
(***********************************************************************)
-(* $Id: dynlink.mli,v 1.1.14.1 2009/04/02 09:21:20 xclerc Exp $ *)
+(* $Id: dynlink.mli 9222 2009-04-02 09:21:20Z xclerc $ *)
(** Dynamic loading of object files. *)
(* *)
(***********************************************************************)
-(* $Id: envaux.ml,v 1.7.38.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: envaux.ml 9221 2009-04-02 09:06:33Z xclerc $ *)
open Misc
open Types
(* *)
(***********************************************************************)
-(* $Id: envaux.mli,v 1.5 2000/03/06 22:11:20 weis Exp $ *)
+(* $Id: envaux.mli 2908 2000-03-06 22:12:09Z weis $ *)
open Format
(* *)
(***********************************************************************)
-(* $Id: eval.ml,v 1.30.4.5 2009/04/19 08:42:43 xleroy Exp $ *)
+(* $Id: eval.ml 9236 2009-04-19 08:42:43Z xleroy $ *)
open Misc
open Path
(* *)
(***********************************************************************)
-(* $Id: eval.mli,v 1.6 2000/03/06 22:11:21 weis Exp $ *)
+(* $Id: eval.mli 2908 2000-03-06 22:12:09Z weis $ *)
open Types
open Parser_aux
(* *)
(***********************************************************************)
-(* $Id: events.ml,v 1.6.18.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: events.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(********************************* Events ******************************)
(* *)
(***********************************************************************)
-(* $Id: events.mli,v 1.4 2005/08/25 15:35:16 doligez Exp $ *)
+(* $Id: events.mli 7031 2005-08-25 15:35:16Z doligez $ *)
open Instruct
(* *)
(***********************************************************************)
-(* $Id: exec.ml,v 1.5 2008/07/29 08:31:41 xleroy Exp $ *)
+(* $Id: exec.ml 8955 2008-07-29 08:31:41Z xleroy $ *)
(* Handling of keyboard interrupts *)
(* *)
(***********************************************************************)
-(* $Id: exec.mli,v 1.4 1999/11/17 18:57:24 xleroy Exp $ *)
+(* $Id: exec.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Handling of keyboard interrupts *)
(* *)
(***********************************************************************)
-(* $Id: frames.ml,v 1.10.18.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: frames.ml 9299 2009-06-17 08:15:39Z xclerc $ *)
(***************************** Frames **********************************)
None ->
raise Not_found
| Some ev ->
- (ev.ev_module, (Events.get_pos ev).Lexing.pos_cnum)
+ (ev.ev_module,
+ (Events.get_pos ev).Lexing.pos_lnum,
+ (Events.get_pos ev).Lexing.pos_cnum - (Events.get_pos ev).Lexing.pos_bol)
let selected_event_is_before () =
match !selected_event with
(* *)
(***********************************************************************)
-(* $Id: frames.mli,v 1.3 1999/11/17 18:57:24 xleroy Exp $ *)
+(* $Id: frames.mli 9299 2009-06-17 08:15:39Z xclerc $ *)
(****************************** Frames *********************************)
(* Event at selected position. *)
val selected_event : debug_event option ref
-(* Selected position in source. *)
+(* Selected position in source (module, line, column). *)
(* Raise `Not_found' if not on an event. *)
-val selected_point : unit -> string * int
+val selected_point : unit -> string * int * int
val selected_event_is_before : unit -> bool
(* *)
(***********************************************************************)
-(* $Id: history.ml,v 1.5.28.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: history.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
open Int64ops
open Checkpoints
(* *)
(***********************************************************************)
-(* $Id: history.mli,v 1.4 2002/10/29 17:53:24 doligez Exp $ *)
+(* $Id: history.mli 5200 2002-10-29 17:53:24Z doligez $ *)
val empty_history : unit -> unit
(* *)
(***********************************************************************)
-(* $Id: input_handling.ml,v 1.5.14.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: input_handling.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(**************************** Input control ****************************)
(* *)
(***********************************************************************)
-(* $Id: input_handling.mli,v 1.3 2006/12/09 13:49:10 ertai Exp $ *)
+(* $Id: input_handling.mli 7767 2006-12-09 13:49:10Z ertai $ *)
(***************************** Input control ***************************)
(* *)
(***********************************************************************)
-(* $Id: int64ops.ml,v 1.1 2002/10/29 17:53:24 doligez Exp $ *)
+(* $Id: int64ops.ml 5200 2002-10-29 17:53:24Z doligez $ *)
(****************** arithmetic operators for Int64 *********************)
(* *)
(***********************************************************************)
-(* $Id: int64ops.mli,v 1.1 2002/10/29 17:53:24 doligez Exp $ *)
+(* $Id: int64ops.mli 5200 2002-10-29 17:53:24Z doligez $ *)
(****************** arithmetic operators for Int64 *********************)
(* *)
(***********************************************************************)
-(* $Id: lexer.mli,v 1.1 2004/06/13 12:46:11 xleroy Exp $ *)
+(* $Id: lexer.mli 6394 2004-06-13 12:46:11Z xleroy $ *)
val line: Lexing.lexbuf -> string
val lexeme: Lexing.lexbuf -> Parser.token
(* *)
(***********************************************************************)
-(* $Id: lexer.mll,v 1.8.28.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: lexer.mll 9226 2009-04-02 09:44:21Z xclerc $ *)
{
(* *)
(***********************************************************************)
-(* $Id: loadprinter.ml,v 1.19.20.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: loadprinter.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(* Loading and installation of user-defined printer functions *)
(* *)
(***********************************************************************)
-(* $Id: loadprinter.mli,v 1.4 2000/03/07 18:22:15 weis Exp $ *)
+(* $Id: loadprinter.mli 2919 2000-03-07 18:22:19Z weis $ *)
(* Loading and installation of user-defined printer functions *)
(* *)
(***********************************************************************)
-(* $Id: main.ml,v 1.21.2.2 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: main.ml 9310 2009-07-08 14:30:05Z xclerc $ *)
open Input_handling
open Question
open Frames
open Show_information
open Format
+open Primitives
let line_buffer = Lexing.from_function read_user_input
kill_program ();
raise x
-let toplevel_loop () = protect Format.std_formatter loop loop
+let execute_file_if_any () =
+ let buffer = Buffer.create 128 in
+ begin
+ try
+ let base = ".ocamldebug" in
+ let file =
+ if Sys.file_exists base then
+ base
+ else
+ Filename.concat (Sys.getenv "HOME") base in
+ let ch = open_in file in
+ fprintf Format.std_formatter "Executing file %s@." file;
+ while true do
+ let line = string_trim (input_line ch) in
+ if line <> "" && line.[0] <> '#' then begin
+ Buffer.add_string buffer line;
+ Buffer.add_char buffer '\n'
+ end
+ done;
+ with _ -> ()
+ end;
+ let len = Buffer.length buffer in
+ if len > 0 then
+ let commands = Buffer.sub buffer 0 (pred len) in
+ line_loop Format.std_formatter (Lexing.from_string commands)
+
+let toplevel_loop () =
+ interactif := false;
+ current_prompt := "";
+ execute_file_if_any ();
+ interactif := true;
+ current_prompt := debugger_prompt;
+ protect Format.std_formatter loop loop
(* Parsing of command-line arguments *)
arguments := !arguments ^ " " ^ (Filename.quote Sys.argv.(j))
done
end;
- current_prompt := debugger_prompt;
printf "\tObjective Caml Debugger version %s@.@." Config.version;
Config.load_path := !default_load_path;
Clflags.recursive_types := true; (* Allow recursive types. *)
(* *)
(***********************************************************************)
-(* $Id: parameters.ml,v 1.3.28.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: parameters.ml 9221 2009-04-02 09:06:33Z xclerc $ *)
(* Miscellaneous parameters *)
(* *)
(***********************************************************************)
-(* $Id: parameters.mli,v 1.2.40.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: parameters.mli 9221 2009-04-02 09:06:33Z xclerc $ *)
(* Miscellaneous parameters *)
/* */
/***********************************************************************/
-/* $Id: parser.mly,v 1.7.28.4 2009/05/23 14:42:57 xclerc Exp $ */
+/* $Id: parser.mly 9275 2009-05-23 14:42:57Z xclerc $ */
%{
(* *)
(***********************************************************************)
-(* $Id: parser_aux.mli,v 1.4.40.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: parser_aux.mli 9221 2009-04-02 09:06:33Z xclerc $ *)
(*open Globals*)
(* *)
(***********************************************************************)
-(* $Id: pattern_matching.ml,v 1.4 2000/12/28 13:03:41 weis Exp $ *)
+(* $Id: pattern_matching.ml 3359 2000-12-28 13:07:42Z weis $ *)
(************************ Simple pattern matching **********************)
(* *)
(***********************************************************************)
-(* $Id: pattern_matching.mli,v 1.2 1999/11/17 18:57:26 xleroy Exp $ *)
+(* $Id: pattern_matching.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(************************ Simple pattern matching **********************)
(* *)
(***********************************************************************)
-(* $Id: pos.ml,v 1.3 2006/12/09 13:49:10 ertai Exp $ *)
+(* $Id: pos.ml 7767 2006-12-09 13:49:10Z ertai $ *)
open Instruct;;
open Lexing;;
(* *)
(***********************************************************************)
-(* $Id: pos.mli,v 1.1 2003/11/21 16:10:57 doligez Exp $ *)
+(* $Id: pos.mli 5966 2003-11-21 16:10:57Z doligez $ *)
val get_desc : Instruct.debug_event -> string;;
(* *)
(***********************************************************************)
-(* $Id: primitives.ml,v 1.6.28.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: primitives.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(*********************** Basic functions and types *********************)
(* *)
(***********************************************************************)
-(* $Id: primitives.mli,v 1.2.40.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: primitives.mli 9226 2009-04-02 09:44:21Z xclerc $ *)
(********************* Basic functions and types ***********************)
(* *)
(***********************************************************************)
-(* $Id: printval.ml,v 1.21.28.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: printval.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(* To print values *)
(* *)
(***********************************************************************)
-(* $Id: printval.mli,v 1.10 2001/07/03 11:04:09 xleroy Exp $ *)
+(* $Id: printval.mli 3566 2001-07-03 11:04:10Z xleroy $ *)
open Format
(* *)
(***********************************************************************)
-(* $Id: program_loading.ml,v 1.8.2.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: program_loading.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(* Program loading *)
(* *)
(***********************************************************************)
-(* $Id: program_loading.mli,v 1.3 1999/11/17 18:57:27 xleroy Exp $ *)
+(* $Id: program_loading.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(*** Debugging. ***)
(* *)
(***********************************************************************)
-(* $Id: program_management.ml,v 1.13.2.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: program_management.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(* Manage the loading of the program *)
(* *)
(***********************************************************************)
-(* $Id: program_management.mli,v 1.2 1999/11/17 18:57:27 xleroy Exp $ *)
+(* $Id: program_management.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(*** Program loading and initializations. ***)
(* *)
(***********************************************************************)
-(* $Id: show_information.ml,v 1.13.18.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: show_information.ml 9299 2009-06-17 08:15:39Z xclerc $ *)
open Instruct
open Format
open Events
open Symbols
open Frames
+open Source
open Show_source
open Breakpoints
(* Display short information about one frame. *)
let show_one_frame framenum ppf event =
+ let pos = Events.get_pos event in
+ let cnum =
+ try
+ let buffer = get_buffer pos event.ev_module in
+ snd (start_and_cnum buffer pos)
+ with _ -> pos.Lexing.pos_cnum in
fprintf ppf "#%i Pc : %i %s char %i@."
framenum event.ev_pos event.ev_module
- (Events.get_pos event).Lexing.pos_cnum
+ cnum
(* Display information about the current frame. *)
(* --- `select frame' must have succeded before calling this function. *)
(* *)
(***********************************************************************)
-(* $Id: show_information.mli,v 1.3 2000/03/06 22:11:25 weis Exp $ *)
+(* $Id: show_information.mli 2908 2000-03-06 22:12:09Z weis $ *)
open Format;;
(* *)
(***********************************************************************)
-(* $Id: show_source.ml,v 1.14.14.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: show_source.ml 9299 2009-06-17 08:15:39Z xclerc $ *)
open Debugger_config
open Instruct
let before = (ev.ev_kind = Event_before) in
if !emacs && selected then
begin try
+ let buffer = get_buffer (Events.get_pos ev) mdle in
let source = source_of_module ev.ev_loc.Location.loc_start mdle in
printf "\026\026M%s:%i:%i" source
- ev.ev_loc.Location.loc_start.Lexing.pos_cnum
- ev.ev_loc.Location.loc_end.Lexing.pos_cnum;
+ (snd (start_and_cnum buffer ev.ev_loc.Location.loc_start))
+ (snd (start_and_cnum buffer ev.ev_loc.Location.loc_end));
printf "%s\n" (if before then ":before" else ":after")
with
- Not_found -> (* get_buffer *)
+ Out_of_range -> (* point_of_coord *)
+ prerr_endline "Position out of range."
+ | Not_found -> (* Events.get_pos || get_buffer *)
prerr_endline ("No source file for " ^ mdle ^ ".");
show_no_point ()
end
begin try
let pos = Events.get_pos ev in
let buffer = get_buffer pos mdle in
- let point = pos.Lexing.pos_cnum in
- let (start, line_number) = line_of_pos buffer point in
- ignore(print_line buffer line_number start point before)
+ let start, point = start_and_cnum buffer pos in
+ ignore(print_line buffer pos.Lexing.pos_lnum start point before)
with
- Out_of_range -> (* line_of_pos *)
+ Out_of_range -> (* point_of_coord *)
prerr_endline "Position out of range."
| Not_found -> (* Events.get_pos || get_buffer *)
prerr_endline ("No source file for " ^ mdle ^ ".")
(* *)
(***********************************************************************)
-(* $Id: show_source.mli,v 1.5 2006/12/09 13:49:10 ertai Exp $ *)
+(* $Id: show_source.mli 7767 2006-12-09 13:49:10Z ertai $ *)
(* Print the line containing the point *)
val show_point : Instruct.debug_event -> bool -> unit;;
(* *)
(***********************************************************************)
-(* $Id: source.ml,v 1.8.14.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: source.ml 9299 2009-06-17 08:15:39Z xclerc $ *)
(************************ Source management ****************************)
(* --- The first line and column are line 1 and column 1. *)
let point_of_coord buffer line column =
fst (pos_of_line buffer line) + (pred column)
+
+let start_and_cnum buffer pos =
+ let line_number = pos.Lexing.pos_lnum in
+ let start = point_of_coord buffer line_number 1 in
+ start, start + (pos.Lexing.pos_cnum - pos.Lexing.pos_bol)
(* *)
(***********************************************************************)
-(* $Id: source.mli,v 1.3 2006/12/09 13:49:10 ertai Exp $ *)
+(* $Id: source.mli 9299 2009-06-17 08:15:39Z xclerc $ *)
(************************ Source management ****************************)
(* Convert a coordinate (line / column) into a position. *)
(* --- The first line and column are line 1 and column 1. *)
val point_of_coord : buffer -> int -> int -> int
+
+(* Return the offsets of both line start and cnum for the passed position. *)
+val start_and_cnum : buffer -> Lexing.position -> (int * int)
(* *)
(***********************************************************************)
-(* $Id: symbols.ml,v 1.18.18.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: symbols.ml 9300 2009-06-18 11:17:16Z xclerc $ *)
(* Handling of symbol tables (globals and events) *)
open Instruct
open Debugger_config (* Toplevel *)
+open Program_loading
let modules =
ref ([] : string list)
List.iter (relocate_event orig) evl;
eventlists := evl :: !eventlists
done;
+ begin try
+ ignore (Bytesections.seek_section ic "CODE")
+ with Not_found ->
+ (* The file contains only debugging info, loading mode is forced to "manual" *)
+ set_launching_function (List.assoc "manual" loading_modes)
+ end;
close_in_noerr ic;
!eventlists
(* *)
(***********************************************************************)
-(* $Id: symbols.mli,v 1.7 2005/08/25 15:35:16 doligez Exp $ *)
+(* $Id: symbols.mli 7031 2005-08-25 15:35:16Z doligez $ *)
(* Modules used by the program. *)
val modules : string list ref
(* *)
(***********************************************************************)
-(* $Id: time_travel.ml,v 1.21.14.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: time_travel.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(**************************** Time travel ******************************)
(* *)
(***********************************************************************)
-(* $Id: time_travel.mli,v 1.6 2006/11/20 10:29:45 ertai Exp $ *)
+(* $Id: time_travel.mli 7745 2006-11-20 10:29:45Z ertai $ *)
(**************************** Time travel ******************************)
(* *)
(***********************************************************************)
-(* $Id: trap_barrier.ml,v 1.3 1999/11/17 18:57:29 xleroy Exp $ *)
+(* $Id: trap_barrier.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
(************************** Trap barrier *******************************)
(* *)
(***********************************************************************)
-(* $Id: trap_barrier.mli,v 1.2 1999/11/17 18:57:29 xleroy Exp $ *)
+(* $Id: trap_barrier.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(************************* Trap barrier ********************************)
(* *)
(***********************************************************************)
-(* $Id: unix_tools.ml,v 1.9.2.1 2009/04/02 09:44:21 xclerc Exp $ *)
+(* $Id: unix_tools.ml 9226 2009-04-02 09:44:21Z xclerc $ *)
(****************** Tools for Unix *************************************)
(* *)
(***********************************************************************)
-(* $Id: unix_tools.mli,v 1.4 2002/11/02 22:36:45 doligez Exp $ *)
+(* $Id: unix_tools.mli 5232 2002-11-02 22:36:46Z doligez $ *)
(**************************** Tools for Unix ***************************)
(* *)
(***********************************************************************)
-(* $Id: compile.ml,v 1.61 2008/10/06 13:53:54 doligez Exp $ *)
+(* $Id: compile.ml 9074 2008-10-06 13:53:54Z doligez $ *)
(* The batch compiler *)
(* *)
(***********************************************************************)
-(* $Id: compile.mli,v 1.8 2004/06/13 12:46:41 xleroy Exp $ *)
+(* $Id: compile.mli 6395 2004-06-13 12:46:41Z xleroy $ *)
(* Compile a .ml or .mli file *)
(* *)
(***********************************************************************)
-(* $Id: errors.ml,v 1.27 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: errors.ml 8705 2007-12-04 13:38:58Z doligez $ *)
(* WARNING: if you change something in this file, you must look at
opterrors.ml and ocamldoc/odoc_analyse.ml
(* *)
(***********************************************************************)
-(* $Id: errors.mli,v 1.5 2000/03/06 22:11:31 weis Exp $ *)
+(* $Id: errors.mli 2908 2000-03-06 22:12:09Z weis $ *)
(* Error report *)
open Format
(* *)
(***********************************************************************)
-(* $Id: main.ml,v 1.71.2.2 2009/01/14 13:19:32 doligez Exp $ *)
+(* $Id: main.ml 9164 2009-01-14 13:19:32Z doligez $ *)
open Config
open Clflags
(* *)
(***********************************************************************)
-(* $Id: main.mli,v 1.1 2000/01/07 16:03:04 doligez Exp $ *)
+(* $Id: main.mli 2740 2000-01-07 16:03:04Z doligez $ *)
(*
this "empty" file is here to speed up garbage collection in ocamlc.opt
(* *)
(***********************************************************************)
-(* $Id: main_args.ml,v 1.50 2007/05/16 08:21:40 doligez Exp $ *)
+(* $Id: main_args.ml 8232 2007-05-16 08:21:41Z doligez $ *)
module Make_options (F :
sig
(* *)
(***********************************************************************)
-(* $Id: main_args.mli,v 1.27 2007/05/16 08:21:40 doligez Exp $ *)
+(* $Id: main_args.mli 8232 2007-05-16 08:21:41Z doligez $ *)
module Make_options (F :
sig
(* *)
(***********************************************************************)
-(* $Id: optcompile.ml,v 1.56.2.2 2008/10/17 14:01:35 doligez Exp $ *)
+(* $Id: optcompile.ml 9094 2008-10-17 14:01:35Z doligez $ *)
(* The batch compiler *)
(* *)
(***********************************************************************)
-(* $Id: optcompile.mli,v 1.8 2004/06/13 12:46:41 xleroy Exp $ *)
+(* $Id: optcompile.mli 6395 2004-06-13 12:46:41Z xleroy $ *)
(* Compile a .ml or .mli file *)
(* *)
(***********************************************************************)
-(* $Id: opterrors.ml,v 1.20 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: opterrors.ml 8705 2007-12-04 13:38:58Z doligez $ *)
(* WARNING: if you change something in this file, you must look at
errors.ml to see if you need to make the same changes there.
(* *)
(***********************************************************************)
-(* $Id: opterrors.mli,v 1.5 2000/03/07 05:02:32 garrigue Exp $ *)
+(* $Id: opterrors.mli 2910 2000-03-07 05:02:33Z garrigue $ *)
(* Error report *)
(* *)
(***********************************************************************)
-(* $Id: optmain.ml,v 1.98.2.1 2008/10/15 08:48:51 xleroy Exp $ *)
+(* $Id: optmain.ml 9084 2008-10-15 08:48:51Z xleroy $ *)
open Config
open Clflags
(* *)
(***********************************************************************)
-(* $Id: optmain.mli,v 1.1 2000/01/07 16:03:04 doligez Exp $ *)
+(* $Id: optmain.mli 2740 2000-01-07 16:03:04Z doligez $ *)
(*
this "empty" file is here to speed up garbage collection in ocamlopt.opt
(* *)
(***********************************************************************)
-(* $Id: pparse.ml,v 1.3 2004/06/16 16:58:46 doligez Exp $ *)
+(* $Id: pparse.ml 6415 2004-06-16 16:58:46Z doligez $ *)
open Format
(* *)
(***********************************************************************)
-(* $Id: pparse.mli,v 1.1 2002/02/08 10:14:31 ddr Exp $ *)
+(* $Id: pparse.mli 4365 2002-02-08 10:14:31Z ddr $ *)
open Format
# #
#########################################################################
-# $Id: Makefile,v 1.17 2004/08/20 17:04:35 doligez Exp $
+# $Id: Makefile 6612 2004-08-20 17:04:35Z doligez $
include ../config/Makefile
- O'Caml emacs mode, snapshot of $Date: 2008/01/11 16:13:16 $
+ O'Caml emacs mode, snapshot of $Date: 2008-01-11 17:13:18 +0100 (Fri, 11 Jan 2008) $
The files in this archive define a caml-mode for emacs, for editing
Objective Caml and Objective Label programs, as well as an
;(* *)
;(***********************************************************************)
-;(* $Id: caml-compat.el,v 1.3 2004/08/20 17:04:35 doligez Exp $ *)
+;(* $Id: caml-compat.el 6612 2004-08-20 17:04:35Z doligez $ *)
;; function definitions for old versions of emacs
;(* *)
;(***********************************************************************)
-;(* $Id: caml-emacs.el,v 1.7 2004/08/20 17:04:35 doligez Exp $ *)
+;(* $Id: caml-emacs.el 6612 2004-08-20 17:04:35Z doligez $ *)
;; for caml-help.el
(defalias 'caml-info-other-window 'info-other-window)
;(* *)
;(***********************************************************************)
-;(* $Id: caml-font-old.el,v 1.2 2008/01/11 16:13:16 doligez Exp $ *)
+;(* $Id: caml-font-old.el 8768 2008-01-11 16:13:18Z doligez $ *)
;; useful colors
;(* *)
;(***********************************************************************)
-;(* $Id: caml-help.el,v 1.17 2004/08/20 17:04:35 doligez Exp $ *)
+;(* $Id: caml-help.el 6612 2004-08-20 17:04:35Z doligez $ *)
;; caml-info.el --- contextual completion and help to caml-mode
;(* *)
;(***********************************************************************)
-;(* $Id: caml-hilit.el,v 1.9 2004/08/20 17:04:35 doligez Exp $ *)
+;(* $Id: caml-hilit.el 6612 2004-08-20 17:04:35Z doligez $ *)
; Highlighting patterns for hilit19 under caml-mode
;(* *)
;(***********************************************************************)
-;(* $Id: caml-types.el,v 1.38 2008/07/29 15:49:31 doligez Exp $ *)
+;(* $Id: caml-types.el 9364 2009-10-02 12:31:37Z doligez $ *)
; An emacs-lisp complement to the "-annot" option of ocamlc and ocamlopt.
(let* ((loc-re (concat caml-types-position-re " "
caml-types-position-re))
(end-re (concat caml-types-position-re " --"))
- (def-re (concat "def \\([^ ]\\)* " loc-re))
- (def-end-re (concat "def \\([^ ]\\)* " end-re))
- (internal-re (concat "int_ref \\([^ ]\\)* " loc-re))
+ (def-re (concat "def \\([^ ]*\\) " loc-re))
+ (def-end-re (concat "def \\([^ ]*\\) " end-re))
+ (internal-re (concat "int_ref \\([^ ]*\\) " loc-re))
(external-re "ext_ref \\(.*\\)"))
(cond
((string-match def-re kind)
(expand-file-name "_build" project-dir)))))
(if (equal project-dir (parent-dir project-dir))
(error (concat "No annotation file. "
- "You should compile with option \"-dtypes\".")))
+ "You should compile with option \"-annot\".")))
(setq project-dir (parent-dir project-dir)))
type-path))))
;(* *)
;(***********************************************************************)
-;(* $Id: caml-xemacs.el,v 1.7 2005/03/24 17:20:53 doligez Exp $ *)
+;(* $Id: caml-xemacs.el 6824 2005-03-24 17:20:54Z doligez $ *)
(require 'overlay)
;(* *)
;(***********************************************************************)
-;(* $Id: caml.el,v 1.44.2.2 2008/12/03 16:16:43 doligez Exp $ *)
+;(* $Id: caml.el 9150 2008-12-03 16:16:43Z doligez $ *)
;;; caml.el --- O'Caml code editing commands for Emacs
;(* *)
;(***********************************************************************)
-;(* $Id: camldebug.el,v 1.11 2005/10/26 13:23:12 doligez Exp $ *)
+;(* $Id: camldebug.el 7169 2005-10-26 13:23:12Z doligez $ *)
;;; Run camldebug under Emacs
;;; Derived from gdb.el.
;(* *)
;(***********************************************************************)
-;(* $Id: inf-caml.el,v 1.11 2004/08/20 17:04:35 doligez Exp $ *)
+;(* $Id: inf-caml.el 6612 2004-08-20 17:04:35Z doligez $ *)
;;; inf-caml.el --- run the Caml toplevel in an Emacs buffer
;(* *)
;(***********************************************************************)
-;(* $Id: ocamltags.in,v 1.6 2004/08/20 17:04:35 doligez Exp $ *)
+;(* $Id: ocamltags.in 6612 2004-08-20 17:04:35Z doligez $ *)
;; Copyright (C) 1998 Ian Zimmerman <itz@transbay.net>
;; This program is free software; you can redistribute it and/or
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
-;; $Id: ocamltags.in,v 1.6 2004/08/20 17:04:35 doligez Exp $
+;; $Id: ocamltags.in 6612 2004-08-20 17:04:35Z doligez $
(require 'caml)
# #
#########################################################################
-# $Id: Makefile,v 1.19 2004/11/29 14:49:24 doligez Exp $
+# $Id: Makefile 6708 2004-11-29 14:49:24Z doligez $
# The lexer generator
CAMLC=../boot/ocamlrun ../boot/ocamlc -nostdlib -I ../boot
# #
#########################################################################
-# $Id: Makefile.nt,v 1.9 2003/01/06 14:57:22 xleroy Exp $
+# $Id: Makefile.nt 5372 2003-01-06 14:57:22Z xleroy $
# The lexer generator
(* *)
(***********************************************************************)
-(* $Id: compact.ml,v 1.7 2002/10/28 16:46:49 maranget Exp $ *)
+(* $Id: compact.ml 5193 2002-10-28 16:46:50Z maranget $ *)
(* Compaction of an automata *)
(* *)
(***********************************************************************)
-(* $Id: compact.mli,v 1.4 2002/10/28 16:46:49 maranget Exp $ *)
+(* $Id: compact.mli 5193 2002-10-28 16:46:50Z maranget $ *)
(* Compaction of an automata *)
type lex_tables =
(* *)
(***********************************************************************)
-(* $Id: cset.ml,v 1.3 2004/04/29 11:12:49 maranget Exp $ *)
+(* $Id: cset.ml 6269 2004-04-29 11:12:49Z maranget $ *)
exception Bad
(* *)
(***********************************************************************)
-(* $Id: cset.mli,v 1.3 2004/04/29 11:12:49 maranget Exp $ *)
+(* $Id: cset.mli 6269 2004-04-29 11:12:49Z maranget $ *)
(* Set of characters encoded as list of intervals *)
(* *)
(***********************************************************************)
-(* $Id: lexer.mli,v 1.6 2004/04/21 23:26:05 doligez Exp $ *)
+(* $Id: lexer.mli 6244 2004-04-21 23:26:06Z doligez $ *)
val main: Lexing.lexbuf -> Parser.token
(* *)
(***********************************************************************)
-(* $Id: lexer.mll,v 1.22 2006/01/04 16:55:49 doligez Exp $ *)
+(* $Id: lexer.mll 7307 2006-01-04 16:55:50Z doligez $ *)
(* The lexical analyzer for lexer definitions. Bootstrapped! *)
(* *)
(***********************************************************************)
-(* $Id: lexgen.ml,v 1.21 2008/03/07 15:24:48 maranget Exp $ *)
+(* $Id: lexgen.ml 8827 2008-03-07 15:24:48Z maranget $ *)
(* Compiling a lexer definition *)
(* *)
(***********************************************************************)
-(* $Id: lexgen.mli,v 1.6 2007/01/29 16:44:16 maranget Exp $ *)
+(* $Id: lexgen.mli 7815 2007-01-29 16:44:16Z maranget $ *)
(* raised when there are too many bindings (>= 254 memory cells) *)
(* *)
(***********************************************************************)
-(* $Id: main.ml,v 1.22 2004/08/20 17:04:35 doligez Exp $ *)
+(* $Id: main.ml 6612 2004-08-20 17:04:35Z doligez $ *)
(* The lexer generator. Command-line parsing. *)
(* *)
(***********************************************************************)
-(* $Id: output.ml,v 1.26 2007/01/29 16:44:16 maranget Exp $ *)
+(* $Id: output.ml 7815 2007-01-29 16:44:16Z maranget $ *)
(* Output the DFA tables and its entry points *)
(* *)
(***********************************************************************)
-(* $Id: output.mli,v 1.8 2002/12/09 10:44:46 maranget Exp $ *)
+(* $Id: output.mli 5323 2002-12-09 10:44:46Z maranget $ *)
(* Output the DFA tables and its entry points *)
(* *)
(***********************************************************************)
-(* $Id: outputbis.ml,v 1.6 2007/01/29 16:44:16 maranget Exp $ *)
+(* $Id: outputbis.ml 7815 2007-01-29 16:44:16Z maranget $ *)
(* Output the DFA tables and its entry points *)
(* *)
(***********************************************************************)
-(* $Id: outputbis.mli,v 1.3 2002/12/09 10:44:46 maranget Exp $ *)
+(* $Id: outputbis.mli 5323 2002-12-09 10:44:46Z maranget $ *)
val output_lexdef :
string ->
in_channel ->
/* */
/***********************************************************************/
-/* $Id: parser.mly,v 1.23 2007/01/29 16:44:16 maranget Exp $ */
+/* $Id: parser.mly 7815 2007-01-29 16:44:16Z maranget $ */
/* The grammar for lexer definitions */
(* *)
(***********************************************************************)
-(* $Id: syntax.ml,v 1.9 2007/01/29 16:44:16 maranget Exp $ *)
+(* $Id: syntax.ml 7815 2007-01-29 16:44:16Z maranget $ *)
(* This apparently useless implmentation file is in fact required
by the pa_ocamllex syntax extension *)
(* *)
(***********************************************************************)
-(* $Id: syntax.mli,v 1.9 2007/01/29 16:44:16 maranget Exp $ *)
+(* $Id: syntax.mli 7815 2007-01-29 16:44:16Z maranget $ *)
(* The shallow abstract syntax *)
# #
#########################################################################
-# $Id: Makefile,v 1.3 2002/04/24 09:09:35 xleroy Exp $
+# $Id: Makefile 4733 2002-04-24 09:09:35Z xleroy $
include ../config/Makefile
-\" $Id: ocaml.m,v 1.10.2.1 2009/01/13 15:17:09 doligez Exp $
+\" $Id: ocaml.m 9162 2009-01-13 15:17:09Z doligez $
.TH OCAML 1
-\" $Id: ocamlc.m,v 1.12.2.1 2008/10/29 12:38:52 doligez Exp $
+\" $Id: ocamlc.m 9111 2008-10-29 12:38:52Z doligez $
.TH OCAMLC 1
-\" $Id: ocamlcp.m,v 1.4 2008/09/15 14:05:30 doligez Exp $
+\" $Id: ocamlcp.m 9025 2008-09-15 14:05:30Z doligez $
.TH OCAMLCP 1
-\" $Id: ocamldebug.m,v 1.2 2008/09/15 14:05:30 doligez Exp $
+\" $Id: ocamldebug.m 9025 2008-09-15 14:05:30Z doligez $
.TH OCAMLDEBUG 1
-\" $Id: ocamldep.m,v 1.6 2008/09/15 14:12:56 doligez Exp $
+\" $Id: ocamldep.m 9026 2008-09-15 14:12:56Z doligez $
.TH OCAMLDEP 1
-\" $Id: ocamldoc.m,v 1.5.2.1 2009/05/27 14:35:27 doligez Exp $
+\" $Id: ocamldoc.m 9282 2009-05-27 14:35:27Z doligez $
.TH OCAMLDOC 1
-\" $Id: ocamllex.m,v 1.5 2008/09/15 14:12:56 doligez Exp $
+\" $Id: ocamllex.m 9026 2008-09-15 14:12:56Z doligez $
.TH OCAMLLEX 1
.SH NAME
-\" $Id: ocamlmktop.m,v 1.3 2008/09/15 14:12:56 doligez Exp $
+\" $Id: ocamlmktop.m 9026 2008-09-15 14:12:56Z doligez $
.TH OCAMLMKTOP 1
.SH NAME
-\" $Id: ocamlopt.m,v 1.10.2.1 2008/10/29 12:38:52 doligez Exp $
+\" $Id: ocamlopt.m 9111 2008-10-29 12:38:52Z doligez $
.TH OCAMLOPT 1
.SH NAME
-\" $Id: ocamlprof.m,v 1.6 2008/09/15 14:25:42 doligez Exp $
+\" $Id: ocamlprof.m 9027 2008-09-15 14:25:42Z doligez $
.TH OCAMLPROF 1
.SH NAME
-\" $Id: ocamlrun.m,v 1.6.2.1 2008/11/18 10:41:17 doligez Exp $
+\" $Id: ocamlrun.m 9133 2008-11-18 10:41:17Z doligez $
.TH OCAMLRUN 1
.SH NAME
-\" $Id: ocamlyacc.m,v 1.4 2008/09/15 14:12:56 doligez Exp $
+\" $Id: ocamlyacc.m 9026 2008-09-15 14:12:56Z doligez $
.TH OCAMLYACC 1
.SH NAME
(* *)
(***********************************************************************)
-(* $Id: myocamlbuild.ml,v 1.23.2.7 2009/06/04 11:33:21 doligez Exp $ *)
+(* $Id: myocamlbuild.ml 9290 2009-06-04 11:33:21Z doligez $ *)
open Ocamlbuild_plugin
open Command
val ext_dll : string
val o : string
val a : string
+val so : string
val toolchain : string
val ccomptype : string
val extralibs : string
# OCamlbuild tags file
true: debug
-<*.ml> or <*.mli>: warn_A, warn_error_A, warn_e, dtypes
+<*.ml> or <*.mli>: warn_A, warn_error_A, warn_e, annot
"discard_printf.ml": rectypes
"ocamlbuildlib.cma" or "ocamlbuildlightlib.cma": linkall
<*.byte> or <*.native> or <*.top>: use_unix
| Some _ -> false :: acc_res, acc_exn
end ([], None) konts
in match opt_exn with
- | Some(exn) -> Some(res, exn)
+ | Some(exn) -> Some(List.rev res, exn)
| None -> None
else
My_unix.execute_many ~ticker ?max_jobs ~display konts
begin fun env _build ->
let c = env "%.c" in
let o = env x_o in
- let cc = Cmd(S[!Options.ocamlc; T(tags_of_pathname c++"c"++"compile"); A"-c"; Px c]) in
+ let comp = if Tags.mem "native" (tags_of_pathname c) then !Options.ocamlopt else !Options.ocamlc in
+ let cc = Cmd(S[comp; T(tags_of_pathname c++"c"++"compile"); A"-c"; Px c]) in
if Pathname.dirname o = Pathname.current_dir_name then cc
else Seq[cc; mv (Pathname.basename o) o]
end;;
flag ["ocaml"; "doc"; "thread"] (S[A"-I"; A"+threads"]);;
flag ["ocaml"; "link"; "thread"; "native"; "program"] (S[A "threads.cmxa"; A "-thread"]);;
flag ["ocaml"; "link"; "thread"; "byte"; "program"] (S[A "threads.cma"; A "-thread"]);;
+flag ["ocaml"; "link"; "thread"; "native"; "toplevel"] (S[A "threads.cmxa"; A "-thread"]);;
+flag ["ocaml"; "link"; "thread"; "byte"; "toplevel"] (S[A "threads.cma"; A "-thread"]);;
flag ["ocaml"; "compile"; "nopervasives"] (A"-nopervasives");;
flag ["ocaml"; "compile"; "nolabels"] (A"-nolabels");;
end;
match dir with
| None -> ()
- | Some dir -> flag ["ocaml"; tag_name; "compile"] (S[A"-I"; P dir])
+ | Some dir ->
+ List.iter
+ (fun x -> flag ["ocaml"; tag_name; x] (S[A"-I"; P dir]))
+ ["compile"; "doc"; "infer_interface"]
let cmi_of = Pathname.update_extensions "cmi"
end
code_tags do
: "funny.ml": rectypes
- ~<**/*.ml*>~: warn_A, warn_error_A, debug, dtypes
+ ~<**/*.ml*>~: warn_A, warn_error_A, debug, annot
"foo.ml" or "bar.ml": warn_v, warn_error_v
"vendor.ml": -warn_A, -warn_error_A
<main.{byte,native}>: use_unix
type builder = Pathname.t list list -> (Pathname.t, exn) Ocamlbuild_pack.My_std.Outcome.t list
type action = env -> builder -> Command.t
let rule = Rule.rule
+let clear_rules = Rule.clear_rules
let dep = Command.dep
let copy_rule = Rule.copy_rule
let ocaml_lib = Ocamlbuild_pack.Ocaml_utils.ocaml_lib
Unix.isatty Unix.stdout
let execute_many =
+ let exit i = raise (My_std.Exit_with_code i) in
let exit = function
| Ocamlbuild_executor.Subcommand_failed -> exit Exit_codes.rc_executor_subcommand_failed
| Ocamlbuild_executor.Subcommand_got_signal -> exit Exit_codes.rc_executor_subcommand_got_signal
let must_clean = ref false
let show_documentation = ref false
let recursive = ref false
-let ext_lib = ref "a"
-let ext_obj = ref "o"
-let ext_dll = ref "so"
+let ext_lib = ref Ocamlbuild_Myocamlbuild_config.a
+let ext_obj = ref Ocamlbuild_Myocamlbuild_config.o
+let ext_dll = ref Ocamlbuild_Myocamlbuild_config.so
+let exe = ref Ocamlbuild_Myocamlbuild_config.exe
let targets_internal = ref []
let ocaml_libs_internal = ref []
let we_have_a_config_file = sys_file_exists plugin_config_file
let we_need_a_plugin = !Options.plugin && sys_file_exists plugin_file
- let we_have_a_plugin = sys_file_exists (!Options.build_dir/plugin)
+ let we_have_a_plugin = sys_file_exists ((!Options.build_dir/plugin)^(!Options.exe))
let we_have_a_config_file_interface = sys_file_exists plugin_config_file_interface
let up_to_date_or_copy fn =
() (* Up to date *)
(* FIXME: remove ocamlbuild_config.ml in _build/ if removed in parent *)
else begin
+ if !Options.native_plugin
+ && not (sys_file_exists ((!Ocamlbuild_where.libdir)/"ocamlbuildlib.cmxa")) then
+ begin
+ Options.native_plugin := false;
+ eprintf "Warning: Won't be able to compile a native plugin"
+ end;
let plugin_config =
if we_have_a_config_file then
if we_have_a_config_file_interface then
let cmd =
Cmd(S[compiler; A"-I"; P dir; libs; more_options;
P(dir/ocamlbuildlib); plugin_config; P plugin_file;
- P(dir/ocamlbuild); A"-o"; Px plugin])
+ P(dir/ocamlbuild); A"-o"; Px (plugin^(!Options.exe))])
in
Shell.chdir !Options.build_dir;
- Shell.rm_f plugin;
+ Shell.rm_f (plugin^(!Options.exe));
Command.execute cmd
end
rebuild_plugin_if_needed ();
Shell.chdir Pathname.pwd;
if not !Options.just_plugin then
- let spec = S[!Options.ocamlrun; P(!Options.build_dir/plugin);
+ let runner = if !Options.native_plugin then N else !Options.ocamlrun in
+ let spec = S[runner; P(!Options.build_dir/plugin^(!Options.exe));
A"-no-plugin"; atomize (List.tl (Array.to_list Sys.argv))] in
let () = Log.finish () in
raise (Exit_silently_with_code (sys_command (Command.string_of_command_spec spec)))
then thunk ()
else List.iter (fun x -> Resource.Cache.suspend_resource x action.command thunk r.prods) r.prods
-let (get_rules, add_rule) =
+let (get_rules, add_rule, clear_rules) =
let rules = ref [] in
(fun () -> !rules),
begin fun pos r ->
List.fold_right begin fun x acc ->
if x.name = s then r :: x :: acc else x :: acc
end !rules []
- end
+ end,
+ (fun () -> rules := [])
let rule name ?(tags=[]) ?(prods=[]) ?(deps=[]) ?prod ?dep ?stamp ?(insert = `bottom) code =
let res_add import xs xopt =
val print_rule_contents : 'a rule_printer
val get_rules : unit -> rule_scheme list
+val clear_rules : unit -> unit
val call : builder -> rule -> unit
val ext_obj : string ref
val ext_lib : string ref
val ext_dll : string ref
+ val exe : string ref
end
module type ARCH = sig
?insert:[`top | `before of string | `after of string | `bottom] ->
string -> string -> unit
+ (** Empties the list of rules of the ocamlbuild engine. *)
+ val clear_rules : unit -> unit
+
(** [dep tags deps] Will build [deps] when all [tags] will be activated. *)
val dep : Tags.elt list -> Pathname.t list -> unit
test_stdlib
test_latex
test
+*.a
#(* *)
#(***********************************************************************)
-# $Id: Makefile,v 1.66.4.1 2009/04/09 13:56:38 guesdon Exp $
+# $Id: Makefile 9229 2009-04-09 13:56:38Z guesdon $
include ../config/Makefile
#(* *)
#(***********************************************************************)
-# $Id: Makefile.nt,v 1.27.4.2 2009/05/20 12:07:05 doligez Exp $
+# $Id: Makefile.nt 9272 2009-05-20 12:07:05Z doligez $
include ../config/Makefile
(* *)
(***********************************************************************)
-(* $Id: odoc.ml,v 1.9.14.1 2009/04/09 13:56:38 guesdon Exp $ *)
+(* $Id: odoc.ml 9371 2009-10-16 12:40:04Z doligez $ *)
(** Main module for bytecode. *)
prerr_endline (Odoc_messages.load_file_error file "Not_found");
exit 1
| Sys_error s
- | Failure s ->
+ | Failure s ->
prerr_endline (Odoc_messages.load_file_error file s);
exit 1
-let _ = print_DEBUG "Fin du chargement dynamique éventuel"
+let _ = print_DEBUG "Fin du chargement dynamique eventuel"
let default_html_generator = new Odoc_html.html
let default_latex_generator = new Odoc_latex.latex
exit 0
-(* eof $Id: odoc.ml,v 1.9.14.1 2009/04/09 13:56:38 guesdon Exp $ *)
+(* eof $Id: odoc.ml 9371 2009-10-16 12:40:04Z doligez $ *)
(* *)
(***********************************************************************)
-(* $Id: odoc_analyse.ml,v 1.15 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: odoc_analyse.ml 8705 2007-12-04 13:38:58Z doligez $ *)
(** Analysis of source files. This module is strongly inspired from
driver/main.ml :-) *)
(* *)
(***********************************************************************)
-(* $Id: odoc_analyse.mli,v 1.4 2004/08/20 17:04:35 doligez Exp $ *)
+(* $Id: odoc_analyse.mli 6612 2004-08-20 17:04:35Z doligez $ *)
(** Analysis of source files. *)
(* *)
(***********************************************************************)
-(* cvsid $Id: odoc_args.ml,v 1.22.2.1 2009/04/09 13:56:38 guesdon Exp $ *)
+(* cvsid $Id: odoc_args.ml 9229 2009-04-09 13:56:38Z guesdon $ *)
(** Command-line arguments. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_args.mli,v 1.17.2.1 2009/04/09 13:56:38 guesdon Exp $ *)
+(* $Id: odoc_args.mli 9229 2009-04-09 13:56:38Z guesdon $ *)
(** Analysis of the command line arguments. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_ast.ml,v 1.32 2008/07/25 13:28:23 guesdon Exp $ *)
+(* $Id: odoc_ast.ml 9371 2009-10-16 12:40:04Z doligez $ *)
(** Analysis of implementation files. *)
open Misc
in
(new_param, func_body2)
| _ ->
- print_DEBUG3 "Pas le bon filtre pour le paramètre optionnel avec valeur par défaut.";
+ print_DEBUG3 "Pas le bon filtre pour le parametre optionnel avec valeur par defaut.";
(parameter, func_body)
)
)
in
(new_param, body2)
| _ ->
- print_DEBUG3 "Pas le bon filtre pour le paramètre optionnel avec valeur par défaut.";
+ print_DEBUG3 "Pas le bon filtre pour le parametre optionnel avec valeur par defaut.";
(parameter, body)
)
)
(* *)
(***********************************************************************)
-(* $Id: odoc_ast.mli,v 1.4 2003/11/24 10:39:29 starynke Exp $ *)
+(* $Id: odoc_ast.mli 5973 2003-11-24 10:44:07Z starynke $ *)
(** The module for analysing the typed abstract syntax tree and source code and creating modules, classes, ..., elements.*)
(* *)
(***********************************************************************)
-(* $Id: odoc_class.ml,v 1.5 2004/03/26 15:57:02 guesdon Exp $ *)
+(* $Id: odoc_class.ml 6174 2004-03-26 15:57:03Z guesdon $ *)
(** Representation and manipulation of classes and class types.*)
None
-(* eof $Id: odoc_class.ml,v 1.5 2004/03/26 15:57:02 guesdon Exp $ *)
+(* eof $Id: odoc_class.ml 6174 2004-03-26 15:57:03Z guesdon $ *)
(* *)
(***********************************************************************)
-(* $Id: odoc_comments.ml,v 1.6 2006/09/20 11:14:36 doligez Exp $ *)
+(* $Id: odoc_comments.ml 7619 2006-09-20 11:14:37Z doligez $ *)
(** Analysis of comments. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_comments.mli,v 1.5 2006/09/20 11:14:36 doligez Exp $ *)
+(* $Id: odoc_comments.mli 7619 2006-09-20 11:14:37Z doligez $ *)
(** Analysis of comments. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_comments_global.ml,v 1.2 2003/11/24 10:39:30 starynke Exp $ *)
+(* $Id: odoc_comments_global.ml 5973 2003-11-24 10:44:07Z starynke $ *)
(** The global variables used by the special comment parser.*)
return_value := None ;
customs := []
-(* eof $Id: odoc_comments_global.ml,v 1.2 2003/11/24 10:39:30 starynke Exp $ *)
+(* eof $Id: odoc_comments_global.ml 5973 2003-11-24 10:44:07Z starynke $ *)
(* *)
(***********************************************************************)
-(* $Id: odoc_comments_global.mli,v 1.2 2003/11/24 10:39:30 starynke Exp $ *)
+(* $Id: odoc_comments_global.mli 5973 2003-11-24 10:44:07Z starynke $ *)
(** The global variables used by the special comment parser.*)
(* *)
(***********************************************************************)
-(* $Id: odoc_config.ml,v 1.2 2007/10/08 14:19:34 doligez Exp $ *)
+(* $Id: odoc_config.ml 8416 2007-10-08 14:19:34Z doligez $ *)
let custom_generators_path =
Filename.concat Config.standard_library
(* *)
(***********************************************************************)
-(* $Id: odoc_config.mli,v 1.2 2007/10/08 14:19:34 doligez Exp $ *)
+(* $Id: odoc_config.mli 8416 2007-10-08 14:19:34Z doligez $ *)
(** Ocamldoc configuration contants. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_control.ml,v 1.2 2003/11/24 10:39:30 starynke Exp $ *)
+(* $Id: odoc_control.ml 5973 2003-11-24 10:44:07Z starynke $ *)
(* *)
(***********************************************************************)
-(* $Id: odoc_cross.ml,v 1.18 2007/10/09 10:29:36 weis Exp $ *)
+(* $Id: odoc_cross.ml 8418 2007-10-09 10:29:37Z weis $ *)
(** Cross referencing. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_cross.mli,v 1.3 2006/09/20 11:14:36 doligez Exp $ *)
+(* $Id: odoc_cross.mli 7619 2006-09-20 11:14:37Z doligez $ *)
(** Cross-referencing. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_dag2html.ml,v 1.4 2004/12/03 14:42:09 guesdon Exp $ *)
+(* $Id: odoc_dag2html.ml 6723 2004-12-03 14:42:09Z guesdon $ *)
(** The types and functions to create a html table representing a dag. Thanks to Daniel De Rauglaudre. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_dag2html.mli,v 1.3 2003/11/24 10:39:31 starynke Exp $ *)
+(* $Id: odoc_dag2html.mli 5973 2003-11-24 10:44:07Z starynke $ *)
(** The types and functions to create a html table representing a dag.
Thanks to Daniel de Rauglaudre. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_dep.ml,v 1.7 2007/10/09 10:29:36 weis Exp $ *)
+(* $Id: odoc_dep.ml 8418 2007-10-09 10:29:37Z weis $ *)
(** Top modules dependencies. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_dot.ml,v 1.7 2006/09/20 11:14:36 doligez Exp $ *)
+(* $Id: odoc_dot.ml 7619 2006-09-20 11:14:37Z doligez $ *)
(** Definition of a class which outputs a dot file showing
top modules dependencies.*)
(* *)
(***********************************************************************)
-(* $Id: odoc_env.ml,v 1.7 2004/06/12 08:55:46 xleroy Exp $ *)
+(* $Id: odoc_env.ml 6386 2004-06-12 08:55:49Z xleroy $ *)
(** Environment for finding complete names from relative names. *)
in
iter t
-(* eof $Id: odoc_env.ml,v 1.7 2004/06/12 08:55:46 xleroy Exp $ *)
+(* eof $Id: odoc_env.ml 6386 2004-06-12 08:55:49Z xleroy $ *)
(* *)
(***********************************************************************)
-(* $Id: odoc_env.mli,v 1.3 2003/11/24 10:39:31 starynke Exp $ *)
+(* $Id: odoc_env.mli 5973 2003-11-24 10:44:07Z starynke $ *)
(** Environment for finding complete names from relative names. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_exception.ml,v 1.3 2003/11/24 10:39:31 starynke Exp $ *)
+(* $Id: odoc_exception.ml 5973 2003-11-24 10:44:07Z starynke $ *)
(** Representation and manipulation of exceptions. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_global.ml,v 1.3 2003/11/24 10:41:03 starynke Exp $ *)
+(* $Id: odoc_global.ml 5973 2003-11-24 10:44:07Z starynke $ *)
(** Global variables. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_global.mli,v 1.2 2003/11/24 10:41:03 starynke Exp $ *)
+(* $Id: odoc_global.mli 5973 2003-11-24 10:44:07Z starynke $ *)
(** Global variables. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_html.ml,v 1.64.2.1 2008/11/10 13:03:55 guesdon Exp $ *)
+(* $Id: odoc_html.ml 9125 2008-11-10 13:03:55Z guesdon $ *)
(** Generation of html documentation.*)
(* *)
(***********************************************************************)
-(* $Id: odoc_info.ml,v 1.24 2007/10/08 14:19:34 doligez Exp $ *)
+(* $Id: odoc_info.ml 8416 2007-10-08 14:19:34Z doligez $ *)
(** Interface for analysing documented OCaml source files and to the collected information. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_info.mli,v 1.45 2008/07/25 13:28:23 guesdon Exp $ *)
+(* $Id: odoc_info.mli 8932 2008-07-25 13:28:23Z guesdon $ *)
(** Interface to the information collected in source files. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_inherit.ml,v 1.2 2003/11/24 10:41:04 starynke Exp $ *)
+(* $Id: odoc_inherit.ml 5973 2003-11-24 10:44:07Z starynke $ *)
(* *)
(***********************************************************************)
-(* $Id: odoc_latex.ml,v 1.41 2007/10/09 10:29:36 weis Exp $ *)
+(* $Id: odoc_latex.ml 8418 2007-10-09 10:29:37Z weis $ *)
(** Generation of LaTeX documentation. *)
(** The content of the LaTeX style to generate when generating LaTeX code. *)
-(* $Id: odoc_latex_style.ml,v 1.5 2004/06/11 14:25:50 guesdon Exp $ *)
+(* $Id: odoc_latex_style.ml 6378 2004-06-11 14:25:50Z guesdon $ *)
let content ="
%% Support macros for LaTeX documentation generated by ocamldoc.
(* *)
(***********************************************************************)
-(* $Id: odoc_lexer.mll,v 1.5 2008/07/23 11:14:22 guesdon Exp $ *)
+(* $Id: odoc_lexer.mll 8928 2008-07-23 11:14:22Z guesdon $ *)
(** The lexer for special comments. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_man.ml,v 1.28.2.1 2008/10/29 11:58:35 guesdon Exp $ *)
+(* $Id: odoc_man.ml 9109 2008-10-29 11:58:35Z guesdon $ *)
(** The man pages generator. *)
open Odoc_info
(* *)
(***********************************************************************)
-(* $Id: odoc_merge.ml,v 1.13 2007/10/09 10:29:36 weis Exp $ *)
+(* $Id: odoc_merge.ml 8418 2007-10-09 10:29:37Z weis $ *)
(** Merge of information from [.ml] and [.mli] for a module.*)
(* *)
(***********************************************************************)
-(* $Id: odoc_merge.mli,v 1.3 2003/11/24 10:41:05 starynke Exp $ *)
+(* $Id: odoc_merge.mli 5973 2003-11-24 10:44:07Z starynke $ *)
(** Merge of information from [.ml] and [.mli] for a module.*)
(* *)
(***********************************************************************)
-(* $Id: odoc_messages.ml,v 1.32.2.1 2009/04/09 13:56:38 guesdon Exp $ *)
+(* $Id: odoc_messages.ml 9229 2009-04-09 13:56:38Z guesdon $ *)
(** The messages of the application. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_misc.ml,v 1.21 2006/07/06 07:19:06 pouillar Exp $ *)
+(* $Id: odoc_misc.ml 7470 2006-07-06 07:19:06Z pouillar $ *)
let no_blanks s =
let len = String.length s in
(* *)
(***********************************************************************)
-(* $Id: odoc_misc.mli,v 1.13 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: odoc_misc.mli 7307 2006-01-04 16:55:50Z doligez $ *)
(** Miscelaneous functions *)
(* *)
(***********************************************************************)
-(* $Id: odoc_module.ml,v 1.12 2006/09/20 11:14:37 doligez Exp $ *)
+(* $Id: odoc_module.ml 7619 2006-09-20 11:14:37Z doligez $ *)
(** Representation and manipulation of modules and module types. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_name.ml,v 1.10.14.1 2009/03/12 18:21:08 doligez Exp $ *)
+(* $Id: odoc_name.ml 9185 2009-03-12 18:21:08Z doligez $ *)
(** Representation of element names. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_name.mli,v 1.4 2004/03/26 09:09:50 guesdon Exp $ *)
+(* $Id: odoc_name.mli 6173 2004-03-26 09:09:50Z guesdon $ *)
(** Representation of element names. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_ocamlhtml.mll,v 1.10.4.1 2008/11/10 13:03:55 guesdon Exp $ *)
+(* $Id: odoc_ocamlhtml.mll 9125 2008-11-10 13:03:55Z guesdon $ *)
(** Generation of html code to display OCaml code. *)
open Lexing
(* *)
(***********************************************************************)
-(* $Id: odoc_parameter.ml,v 1.8 2004/04/02 15:10:57 guesdon Exp $ *)
+(* $Id: odoc_parameter.ml 6185 2004-04-02 15:10:58Z guesdon $ *)
(** Representation and manipulation of method / function / class parameters. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_parser.mly,v 1.3 2003/11/24 10:43:11 starynke Exp $ *)
+(* $Id: odoc_parser.mly 5973 2003-11-24 10:44:07Z starynke $ *)
open Odoc_types
open Odoc_comments_global
(* *)
(***********************************************************************)
-(* $Id: odoc_print.ml,v 1.3 2004/05/18 13:28:00 garrigue Exp $ *)
+(* $Id: odoc_print.ml 6307 2004-05-18 13:28:00Z garrigue $ *)
open Format
(* *)
(***********************************************************************)
-(* $Id: odoc_print.mli,v 1.2 2004/03/26 09:09:50 guesdon Exp $ *)
+(* $Id: odoc_print.mli 6173 2004-03-26 09:09:50Z guesdon $ *)
(** Printing functions. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_scan.ml,v 1.3 2003/11/24 10:43:11 starynke Exp $ *)
+(* $Id: odoc_scan.ml 5973 2003-11-24 10:44:07Z starynke $ *)
(** Scanning of modules and elements.
(* *)
(***********************************************************************)
-(* $Id: odoc_search.ml,v 1.7 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: odoc_search.ml 7307 2006-01-04 16:55:50Z doligez $ *)
(** Research of elements through modules. *)
Res_section (_,t) -> t
| _ -> assert false
-(* eof $Id: odoc_search.ml,v 1.7 2006/01/04 16:55:50 doligez Exp $ *)
+(* eof $Id: odoc_search.ml 7307 2006-01-04 16:55:50Z doligez $ *)
(* *)
(***********************************************************************)
-(* $Id: odoc_search.mli,v 1.4 2003/11/24 10:43:12 starynke Exp $ *)
+(* $Id: odoc_search.mli 5973 2003-11-24 10:44:07Z starynke $ *)
(** Research of elements through modules. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_see_lexer.mll,v 1.3 2003/11/24 10:43:12 starynke Exp $ *)
+(* $Id: odoc_see_lexer.mll 5973 2003-11-24 10:44:07Z starynke $ *)
let print_DEBUG2 s = print_string s ; print_newline ()
(* *)
(***********************************************************************)
-(* $Id: odoc_sig.ml,v 1.41 2008/07/23 08:55:36 guesdon Exp $ *)
+(* $Id: odoc_sig.ml 8927 2008-07-23 08:55:36Z guesdon $ *)
(** Analysis of interface files. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_sig.mli,v 1.6 2004/11/03 09:31:19 guesdon Exp $ *)
+(* $Id: odoc_sig.mli 6661 2004-11-03 09:31:19Z guesdon $ *)
(** The module for analysing a signature and source code and creating modules, classes, ..., elements.*)
(* *)
(***********************************************************************)
-(* $Id: odoc_str.ml,v 1.13 2008/07/23 08:55:36 guesdon Exp $ *)
+(* $Id: odoc_str.ml 8927 2008-07-23 08:55:36Z guesdon $ *)
(** The functions to get a string from different kinds of elements (types, modules, ...). *)
None -> ""
| Some i -> Odoc_misc.string_of_info i)
-(* eof $Id: odoc_str.ml,v 1.13 2008/07/23 08:55:36 guesdon Exp $ *)
+(* eof $Id: odoc_str.ml 8927 2008-07-23 08:55:36Z guesdon $ *)
(* *)
(***********************************************************************)
-(* $Id: odoc_str.mli,v 1.6 2004/08/20 17:04:35 doligez Exp $ *)
+(* $Id: odoc_str.mli 6612 2004-08-20 17:04:35Z doligez $ *)
(** The functions to get a string from different kinds of elements (types, modules, ...). *)
(* *)
(***********************************************************************)
-(* $Id: odoc_test.ml,v 1.1 2004/02/20 16:28:27 guesdon Exp $ *)
+(* $Id: odoc_test.ml 6127 2004-02-20 16:28:27Z guesdon $ *)
(** Custom generator to perform test on ocamldoc. *)
(* under the terms of the Q Public License version 1.0. *)
(***********************************************************************)
-(* $Id: odoc_texi.ml,v 1.24 2008/07/23 08:55:36 guesdon Exp $ *)
+(* $Id: odoc_texi.ml 8927 2008-07-23 08:55:36Z guesdon $ *)
(** Generation of Texinfo documentation. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_text.ml,v 1.6 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: odoc_text.ml 7307 2006-01-04 16:55:50Z doligez $ *)
exception Text_syntax of int * int * string (* line, char, string *)
(* *)
(***********************************************************************)
-(* $Id: odoc_text.mli,v 1.3 2003/11/24 21:20:51 guesdon Exp $ *)
+(* $Id: odoc_text.mli 5974 2003-11-24 21:20:51Z guesdon $ *)
(** A module with a function to parse strings to obtain a [Odoc_types.text] value. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_text_lexer.mll,v 1.9 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: odoc_text_lexer.mll 7307 2006-01-04 16:55:50Z doligez $ *)
(** The lexer for string to build text structures. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_text_parser.mly,v 1.5 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: odoc_text_parser.mly 7307 2006-01-04 16:55:50Z doligez $ *)
open Odoc_types
(* *)
(***********************************************************************)
-(* $Id: odoc_to_text.ml,v 1.17 2008/07/23 08:55:36 guesdon Exp $ *)
+(* $Id: odoc_to_text.ml 8927 2008-07-23 08:55:36Z guesdon $ *)
(** Text generation.
(* *)
(***********************************************************************)
-(* $Id: odoc_type.ml,v 1.7 2008/05/21 05:56:39 guesdon Exp $ *)
+(* $Id: odoc_type.ml 8883 2008-05-21 05:56:39Z guesdon $ *)
(** Representation and manipulation of a type, but not class nor module type.*)
(* *)
(***********************************************************************)
-(* $Id: odoc_types.ml,v 1.9 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: odoc_types.ml 7307 2006-01-04 16:55:50Z doligez $ *)
type ref_kind =
RK_module
(* *)
(***********************************************************************)
-(* $Id: odoc_types.mli,v 1.6 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: odoc_types.mli 7307 2006-01-04 16:55:50Z doligez $ *)
(** Types for the information collected in comments. *)
(* *)
(***********************************************************************)
-(* $Id: odoc_value.ml,v 1.7 2008/07/23 08:55:36 guesdon Exp $ *)
+(* $Id: odoc_value.ml 8927 2008-07-23 08:55:36Z guesdon $ *)
(** Representation and manipulation of values, class attributes and class methods. *)
#(* *)
#(***********************************************************************)
-# $Id: remove_DEBUG,v 1.3 2004/04/15 16:18:52 doligez Exp $
+# $Id: remove_DEBUG 9312 2009-07-09 17:09:48Z doligez $
# usage: remove_DEBUG <file>
# remove from <file> every line that contains the string "DEBUG",
# respecting the cpp # line annotation conventions
echo "# 1 \"$1\""
-LC_ALL=C sed -e '/DEBUG/s/.*//' "$1"
+LC_ALL=C sed -e '/DEBUG/c\
+(* DEBUG statement removed *)' "$1"
#!/bin/sh
-# $Id: runocamldoc,v 1.6 2002/07/23 14:11:53 doligez Exp $
+# $Id: runocamldoc 5029 2002-07-23 14:12:03Z doligez $
case "$1" in
true) shift
# #
#########################################################################
-# $Id: Makefile,v 1.4 2007/11/08 09:17:47 frisch Exp $
+# $Id: Makefile 8489 2007-11-08 09:17:48Z frisch $
# Common Makefile for otherlibs on the Unix ports
# #
#########################################################################
-# $Id: Makefile.nt,v 1.3 2007/11/08 09:17:48 frisch Exp $
+# $Id: Makefile.nt 8489 2007-11-08 09:17:48Z frisch $
# Common Makefile for otherlibs on the Win32/MinGW ports
# #
#########################################################################
-# $Id: Makefile.shared,v 1.3 2008/07/15 15:31:32 frisch Exp $
+# $Id: Makefile.shared 8916 2008-07-15 15:31:32Z frisch $
# Common Makefile for otherlibs
*.o
*.x
so_locations
+*.so
+*.a
# #
#########################################################################
-# $Id: Makefile,v 1.25 2008/01/04 09:52:27 xleroy Exp $
+# $Id: Makefile 8748 2008-01-04 09:52:27Z xleroy $
LIBNAME=bigarray
EXTRACFLAGS=-I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE
# #
#########################################################################
-# $Id: Makefile.nt,v 1.13 2008/01/04 15:01:48 xleroy Exp $
+# $Id: Makefile.nt 8754 2008-01-04 15:01:48Z xleroy $
LIBNAME=bigarray
EXTRACFLAGS=-I../win32unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE
/* */
/***********************************************************************/
-/* $Id: bigarray.h,v 1.9.14.1 2008/11/09 09:03:50 xleroy Exp $ */
+/* $Id: bigarray.h 9123 2008-11-09 09:03:51Z xleroy $ */
#ifndef CAML_BIGARRAY_H
#define CAML_BIGARRAY_H
(* *)
(***********************************************************************)
-(* $Id: bigarray.ml,v 1.20 2008/07/14 09:09:53 xleroy Exp $ *)
+(* $Id: bigarray.ml 8911 2008-07-14 09:09:53Z xleroy $ *)
(* Module [Bigarray]: large, multi-dimensional, numerical arrays *)
(* *)
(***********************************************************************)
-(* $Id: bigarray.mli,v 1.27.2.1 2008/10/08 13:07:13 doligez Exp $ *)
+(* $Id: bigarray.mli 9079 2008-10-08 13:09:39Z doligez $ *)
(** Large, multi-dimensional, numerical arrays.
/* */
/***********************************************************************/
-/* $Id: bigarray_stubs.c,v 1.23.4.1 2008/11/09 09:03:51 xleroy Exp $ */
+/* $Id: bigarray_stubs.c 9123 2008-11-09 09:03:51Z xleroy $ */
#include <stddef.h>
#include <stdarg.h>
/* */
/***********************************************************************/
-/* $Id: mmap_unix.c,v 1.11 2008/01/04 15:01:48 xleroy Exp $ */
+/* $Id: mmap_unix.c 8754 2008-01-04 15:01:48Z xleroy $ */
#include <stddef.h>
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: mmap_win32.c,v 1.12 2008/01/15 14:55:15 frisch Exp $ */
+/* $Id: mmap_win32.c 8773 2008-01-15 14:55:15Z frisch $ */
#include <stddef.h>
#include <stdio.h>
# #
#########################################################################
-# $Id: Makefile,v 1.26.4.1 2009/03/31 11:33:25 xleroy Exp $
+# $Id: Makefile 9214 2009-03-31 11:33:25Z xleroy $
# Makefile for the ndbm library
/* */
/***********************************************************************/
-/* $Id: cldbm.c,v 1.8 2003/07/08 13:50:31 xleroy Exp $ */
+/* $Id: cldbm.c 5670 2003-07-08 13:50:31Z xleroy $ */
#include <string.h>
#include <fcntl.h>
(* *)
(***********************************************************************)
-(* $Id: dbm.ml,v 1.10 2001/12/07 13:39:51 xleroy Exp $ *)
+(* $Id: dbm.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
type t
(* *)
(***********************************************************************)
-(* $Id: dbm.mli,v 1.15 2001/12/07 13:39:51 xleroy Exp $ *)
+(* $Id: dbm.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(** Interface to the NDBM database. *)
# #
#########################################################################
-# $Id: Makefile,v 1.34 2008/04/16 06:50:31 frisch Exp $
+# $Id: Makefile 8868 2008-04-16 06:50:31Z frisch $
# Makefile for the dynamic link library
# #
#########################################################################
-# $Id: Makefile.nt,v 1.17 2007/11/06 15:16:56 frisch Exp $
+# $Id: Makefile.nt 8477 2007-11-06 15:16:56Z frisch $
# Makefile for the dynamic link library
(* *)
(***********************************************************************)
-(* $Id: dynlink.ml,v 1.36 2008/04/22 12:24:10 frisch Exp $ *)
+(* $Id: dynlink.ml 8873 2008-04-22 12:24:10Z frisch $ *)
(* Dynamic loading of .cmo files *)
(* *)
(***********************************************************************)
-(* $Id: dynlink.mli,v 1.23 2008/04/22 12:24:10 frisch Exp $ *)
+(* $Id: dynlink.mli 8873 2008-04-22 12:24:10Z frisch $ *)
(** Dynamic loading of object files. *)
(* *)
(***********************************************************************)
-(* $Id: extract_crc.ml,v 1.10 2004/04/09 13:26:41 xleroy Exp $ *)
+(* $Id: extract_crc.ml 6195 2004-04-09 13:26:41Z xleroy $ *)
(* Print the digests of unit interfaces *)
(* *)
(***********************************************************************)
-(* $Id: natdynlink.ml,v 1.6 2008/08/28 22:17:51 frisch Exp $ *)
+(* $Id: natdynlink.ml 8993 2008-08-28 22:17:51Z frisch $ *)
(* Dynamic loading of .cmx files *)
# #
#########################################################################
-# $Id: Makefile,v 1.42 2007/11/08 09:23:06 frisch Exp $
+# $Id: Makefile 8490 2007-11-08 09:23:06Z frisch $
# Makefile for the portable graphics library
/* */
/***********************************************************************/
-/* $Id: color.c,v 1.18 2004/05/17 17:10:00 doligez Exp $ */
+/* $Id: color.c 6299 2004-05-17 17:10:00Z doligez $ */
#include "libgraph.h"
#include <X11/Xatom.h>
/* */
/***********************************************************************/
-/* $Id: draw.c,v 1.19 2004/05/30 14:11:41 xleroy Exp $ */
+/* $Id: draw.c 6351 2004-05-30 14:11:41Z xleroy $ */
#include "libgraph.h"
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: dump_img.c,v 1.11 2004/03/24 15:02:04 starynke Exp $ */
+/* $Id: dump_img.c 6171 2004-03-24 15:02:06Z starynke $ */
#include "libgraph.h"
#include "image.h"
/* */
/***********************************************************************/
-/* $Id: events.c,v 1.18 2005/08/13 20:59:37 doligez Exp $ */
+/* $Id: events.c 7019 2005-08-13 20:59:37Z doligez $ */
#include <signal.h>
#include "libgraph.h"
/* */
/***********************************************************************/
-/* $Id: fill.c,v 1.14 2004/05/30 14:11:41 xleroy Exp $ */
+/* $Id: fill.c 6351 2004-05-30 14:11:41Z xleroy $ */
#include "libgraph.h"
#include <memory.h>
(* *)
(***********************************************************************)
-(* $Id: graphics.ml,v 1.26 2005/08/13 20:59:37 doligez Exp $ *)
+(* $Id: graphics.ml 7019 2005-08-13 20:59:37Z doligez $ *)
exception Graphic_failure of string
(* *)
(***********************************************************************)
-(* $Id: graphics.mli,v 1.37 2005/08/13 20:59:37 doligez Exp $ *)
+(* $Id: graphics.mli 7019 2005-08-13 20:59:37Z doligez $ *)
(** Machine-independent graphics primitives. *)
(* *)
(***********************************************************************)
-(* $Id: graphicsX11.ml,v 1.3 2004/03/24 15:02:06 starynke Exp $ *)
+(* $Id: graphicsX11.ml 6171 2004-03-24 15:02:06Z starynke $ *)
(* Module [GraphicsX11]: additional graphics primitives for the X Windows system *)
(* *)
(***********************************************************************)
-(* $Id: graphicsX11.mli,v 1.4 2001/12/07 13:39:54 xleroy Exp $ *)
+(* $Id: graphicsX11.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(** Additional graphics primitives for the X Windows system. *)
/* */
/***********************************************************************/
-/* $Id: image.c,v 1.13 2004/03/24 15:02:05 starynke Exp $ */
+/* $Id: image.c 6171 2004-03-24 15:02:06Z starynke $ */
#include "libgraph.h"
#include "image.h"
return Val_unit;
}
-/* eof $Id: image.c,v 1.13 2004/03/24 15:02:05 starynke Exp $ */
+/* eof $Id: image.c 6171 2004-03-24 15:02:06Z starynke $ */
/* */
/***********************************************************************/
-/* $Id: image.h,v 1.8 2004/03/24 15:02:06 starynke Exp $ */
+/* $Id: image.h 6171 2004-03-24 15:02:06Z starynke $ */
struct grimage {
int width, height; /* Dimensions of the image */
/* */
/***********************************************************************/
-/* $Id: libgraph.h,v 1.23 2004/05/30 10:25:08 xleroy Exp $ */
+/* $Id: libgraph.h 6350 2004-05-30 10:25:08Z xleroy $ */
#include <stdio.h>
#include <X11/Xlib.h>
/* */
/***********************************************************************/
-/* $Id: make_img.c,v 1.13 2004/03/24 15:02:05 starynke Exp $ */
+/* $Id: make_img.c 6171 2004-03-24 15:02:06Z starynke $ */
#include "libgraph.h"
#include "image.h"
/* */
/***********************************************************************/
-/* $Id: open.c,v 1.34 2005/08/13 20:59:37 doligez Exp $ */
+/* $Id: open.c 7019 2005-08-13 20:59:37Z doligez $ */
#include <string.h>
#include <fcntl.h>
/* */
/***********************************************************************/
-/* $Id: point_col.c,v 1.8 2004/03/24 15:02:05 starynke Exp $ */
+/* $Id: point_col.c 6171 2004-03-24 15:02:06Z starynke $ */
#include "libgraph.h"
/* */
/***********************************************************************/
-/* $Id: sound.c,v 1.9 2004/03/24 15:02:05 starynke Exp $ */
+/* $Id: sound.c 6171 2004-03-24 15:02:06Z starynke $ */
#include "libgraph.h"
/* */
/***********************************************************************/
-/* $Id: subwindow.c,v 1.6 2004/03/24 15:02:05 starynke Exp $ */
+/* $Id: subwindow.c 6171 2004-03-24 15:02:06Z starynke $ */
#include "libgraph.h"
/* */
/***********************************************************************/
-/* $Id: text.c,v 1.15 2004/03/24 15:02:06 starynke Exp $ */
+/* $Id: text.c 6171 2004-03-24 15:02:06Z starynke $ */
#include "libgraph.h"
#include <alloc.h>
(* *)
(*************************************************************************)
-(* $Id: dummyUnix.mli,v 1.4 2003/12/29 22:15:01 doligez Exp $ *)
+(* $Id: dummyUnix.mli 6041 2003-12-29 22:15:02Z doligez $ *)
module Mutex : sig
type t
(* *)
(*************************************************************************)
-(* $Id: dummyWin.mli,v 1.2 2001/12/07 13:39:55 xleroy Exp $ *)
+(* $Id: dummyWin.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(* *)
(*************************************************************************)
-(* $Id: editor.ml,v 1.41 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: editor.ml 7307 2006-01-04 16:55:50Z doligez $ *)
open StdLabels
open Tk
(* *)
(*************************************************************************)
-(* $Id: editor.mli,v 1.5 2001/12/07 13:39:57 xleroy Exp $ *)
+(* $Id: editor.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: fileselect.ml,v 1.21 2005/01/28 16:13:11 doligez Exp $ *)
+(* $Id: fileselect.ml 6757 2005-01-28 16:13:11Z doligez $ *)
(* file selection box *)
(* *)
(*************************************************************************)
-(* $Id: fileselect.mli,v 1.7 2002/04/26 12:15:33 furuse Exp $ *)
+(* $Id: fileselect.mli 4745 2002-04-26 12:16:26Z furuse $ *)
val f :
title:string ->
(* *)
(*************************************************************************)
-(* $Id: jg_bind.ml,v 1.7 2001/12/07 13:39:57 xleroy Exp $ *)
+(* $Id: jg_bind.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open Tk
(* *)
(*************************************************************************)
-(* $Id: jg_bind.mli,v 1.5 2001/12/07 13:39:57 xleroy Exp $ *)
+(* $Id: jg_bind.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: jg_box.ml,v 1.8 2001/12/07 13:39:58 xleroy Exp $ *)
+(* $Id: jg_box.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open Tk
(* *)
(*************************************************************************)
-(* $Id: jg_button.ml,v 1.8 2001/12/07 13:39:58 xleroy Exp $ *)
+(* $Id: jg_button.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open Tk
(* *)
(*************************************************************************)
-(* $Id: jg_completion.ml,v 1.10 2001/12/07 13:39:58 xleroy Exp $ *)
+(* $Id: jg_completion.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
let lt_string ?(nocase=false) s1 s2 =
if nocase then String.lowercase s1 < String.lowercase s2 else s1 < s2
(* *)
(*************************************************************************)
-(* $Id: jg_completion.mli,v 1.6 2001/12/07 13:39:58 xleroy Exp $ *)
+(* $Id: jg_completion.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
val lt_string : ?nocase:bool -> string -> string -> bool
(* *)
(*************************************************************************)
-(* $Id: jg_config.ml,v 1.10 2001/12/07 13:39:58 xleroy Exp $ *)
+(* $Id: jg_config.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open StdLabels
open Jg_tk
(* *)
(*************************************************************************)
-(* $Id: jg_config.mli,v 1.5 2001/12/07 13:39:58 xleroy Exp $ *)
+(* $Id: jg_config.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
val init: unit -> unit
(* *)
(*************************************************************************)
-(* $Id: jg_entry.ml,v 1.7 2001/12/07 13:39:58 xleroy Exp $ *)
+(* $Id: jg_entry.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open Tk
(* *)
(*************************************************************************)
-(* $Id: jg_memo.ml,v 1.8 2001/12/07 13:39:58 xleroy Exp $ *)
+(* $Id: jg_memo.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
type ('a, 'b) assoc_list =
Nil
(* *)
(*************************************************************************)
-(* $Id: jg_memo.mli,v 1.7 2001/12/07 13:39:59 xleroy Exp $ *)
+(* $Id: jg_memo.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
val fast : f:('a -> 'b) -> 'a -> 'b
(* "fast" memoizer: uses a List.assq like function *)
(* *)
(*************************************************************************)
-(* $Id: jg_menu.ml,v 1.9 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: jg_menu.ml 7307 2006-01-04 16:55:50Z doligez $ *)
open Tk
(* *)
(*************************************************************************)
-(* $Id: jg_message.ml,v 1.18 2002/07/26 00:04:05 garrigue Exp $ *)
+(* $Id: jg_message.ml 5045 2002-07-26 00:04:05Z garrigue $ *)
open StdLabels
open Tk
(* *)
(*************************************************************************)
-(* $Id: jg_message.mli,v 1.10 2002/07/26 00:04:05 garrigue Exp $ *)
+(* $Id: jg_message.mli 5045 2002-07-26 00:04:05Z garrigue $ *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: jg_multibox.ml,v 1.11 2001/12/07 13:39:59 xleroy Exp $ *)
+(* $Id: jg_multibox.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open StdLabels
(* *)
(*************************************************************************)
-(* $Id: jg_multibox.mli,v 1.6 2001/12/07 13:39:59 xleroy Exp $ *)
+(* $Id: jg_multibox.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
class c :
cols:int -> texts:string list ->
(* *)
(*************************************************************************)
-(* $Id: jg_text.ml,v 1.11 2002/08/09 10:34:44 garrigue Exp $ *)
+(* $Id: jg_text.ml 5094 2002-08-09 10:34:44Z garrigue $ *)
open StdLabels
open Tk
(* *)
(*************************************************************************)
-(* $Id: jg_text.mli,v 1.7 2001/12/07 13:40:00 xleroy Exp $ *)
+(* $Id: jg_text.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: jg_tk.ml,v 1.7 2001/12/07 13:40:00 xleroy Exp $ *)
+(* $Id: jg_tk.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open Tk
(* *)
(*************************************************************************)
-(* $Id: jg_toplevel.ml,v 1.8 2001/12/07 13:40:00 xleroy Exp $ *)
+(* $Id: jg_toplevel.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open Tk
(* *)
(*************************************************************************)
-(* $Id: lexical.ml,v 1.15.32.1 2009/06/08 04:43:32 garrigue Exp $ *)
+(* $Id: lexical.ml 9293 2009-06-08 04:43:32Z garrigue $ *)
open StdLabels
open Tk
(* *)
(*************************************************************************)
-(* $Id: lexical.mli,v 1.6 2001/12/07 13:40:00 xleroy Exp $ *)
+(* $Id: lexical.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: list2.ml,v 1.9 2001/12/07 13:40:00 xleroy Exp $ *)
+(* $Id: list2.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open StdLabels
(* *)
(*************************************************************************)
-(* $Id: main.ml,v 1.34 2006/04/16 23:28:21 doligez Exp $ *)
+(* $Id: main.ml 7382 2006-04-16 23:28:22Z doligez $ *)
open StdLabels
module Unix = UnixLabels
(* *)
(*************************************************************************)
-(* $Id: mytypes.mli,v 1.7 2007/05/16 08:21:40 doligez Exp $ *)
+(* $Id: mytypes.mli 8232 2007-05-16 08:21:41Z doligez $ *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: searchid.ml,v 1.25 2008/07/09 14:03:08 mauny Exp $ *)
+(* $Id: searchid.ml 8907 2008-07-09 14:03:08Z mauny $ *)
open StdLabels
open Location
(* *)
(*************************************************************************)
-(* $Id: searchid.mli,v 1.6 2002/07/25 22:51:47 garrigue Exp $ *)
+(* $Id: searchid.mli 5044 2002-07-25 22:51:47Z garrigue $ *)
val start_env : Env.t ref
val module_list : string list ref
(* *)
(*************************************************************************)
-(* $Id: searchpos.ml,v 1.52 2008/07/09 14:03:08 mauny Exp $ *)
+(* $Id: searchpos.ml 8907 2008-07-09 14:03:08Z mauny $ *)
open StdLabels
open Support
(* *)
(*************************************************************************)
-(* $Id: searchpos.mli,v 1.13 2007/05/16 08:21:40 doligez Exp $ *)
+(* $Id: searchpos.mli 8232 2007-05-16 08:21:41Z doligez $ *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: setpath.ml,v 1.16 2002/04/26 12:15:34 furuse Exp $ *)
+(* $Id: setpath.ml 4745 2002-04-26 12:16:26Z furuse $ *)
open StdLabels
open Tk
(* *)
(*************************************************************************)
-(* $Id: setpath.mli,v 1.6 2001/12/07 13:40:02 xleroy Exp $ *)
+(* $Id: setpath.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: shell.ml,v 1.41 2006/01/18 13:26:03 garrigue Exp $ *)
+(* $Id: shell.ml 7327 2006-01-18 13:26:03Z garrigue $ *)
open StdLabels
module Unix = UnixLabels
(* *)
(*************************************************************************)
-(* $Id: shell.mli,v 1.8 2002/07/25 22:51:47 garrigue Exp $ *)
+(* $Id: shell.mli 5044 2002-07-25 22:51:47Z garrigue $ *)
class ['a] history :
unit ->
(* *)
(*************************************************************************)
-(* $Id: typecheck.ml,v 1.16.6.1 2009/06/08 04:43:32 garrigue Exp $ *)
+(* $Id: typecheck.ml 9293 2009-06-08 04:43:32Z garrigue $ *)
open StdLabels
open Tk
(* *)
(*************************************************************************)
-(* $Id: typecheck.mli,v 1.5 2001/12/07 13:40:02 xleroy Exp $ *)
+(* $Id: typecheck.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
open Widget
open Mytypes
(* *)
(*************************************************************************)
-(* $Id: useunix.ml,v 1.13 2002/08/09 10:34:44 garrigue Exp $ *)
+(* $Id: useunix.ml 5094 2002-08-09 10:34:44Z garrigue $ *)
open StdLabels
open UnixLabels
(* *)
(*************************************************************************)
-(* $Id: useunix.mli,v 1.6 2002/08/09 10:34:44 garrigue Exp $ *)
+(* $Id: useunix.mli 5094 2002-08-09 10:34:44Z garrigue $ *)
(* Unix utilities *)
(* *)
(*************************************************************************)
-(* $Id: viewer.ml,v 1.33 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: viewer.ml 7307 2006-01-04 16:55:50Z doligez $ *)
open StdLabels
open Tk
(* *)
(*************************************************************************)
-(* $Id: viewer.mli,v 1.7 2002/07/11 13:49:51 garrigue Exp $ *)
+(* $Id: viewer.mli 4990 2002-07-11 13:49:51Z garrigue $ *)
(* Module viewer *)
open Widget
(* *)
(*************************************************************************)
-(* $Id: LICENSE,v 1.2 2001/12/07 13:40:03 xleroy Exp $ *)
+(* $Id: LICENSE 4144 2001-12-07 13:41:02Z xleroy $ *)
All the files in this directory are subject to the above copyright notice.
\ No newline at end of file
(* *)
(***********************************************************************)
-(* $Id: compile.ml,v 1.32 2005/01/28 16:13:11 doligez Exp $ *)
+(* $Id: compile.ml 6757 2005-01-28 16:13:11Z doligez $ *)
open StdLabels
open Tables
(* *)
(***********************************************************************)
-(* $Id: intf.ml,v 1.20 2002/07/23 14:11:55 doligez Exp $ *)
+(* $Id: intf.ml 5029 2002-07-23 14:12:03Z doligez $ *)
open StdLabels
(* *)
(***********************************************************************)
-(* $Id: lexer.mll,v 1.14 2002/07/23 14:11:55 doligez Exp $ *)
+(* $Id: lexer.mll 5029 2002-07-23 14:12:03Z doligez $ *)
{
open StdLabels
(* *)
(***********************************************************************)
-(* $Id: maincompile.ml,v 1.20 2005/01/28 16:13:11 doligez Exp $ *)
+(* $Id: maincompile.ml 6757 2005-01-28 16:13:11Z doligez $ *)
open StdLabels
open Support
/* */
/***********************************************************************/
-/* $Id: parser.mly,v 1.9 2003/03/27 15:04:44 furuse Exp $ */
+/* $Id: parser.mly 5464 2003-03-27 15:04:44Z furuse $ */
%{
(* *)
(***********************************************************************)
-(* $Id: tables.ml,v 1.20 2002/04/26 12:15:48 furuse Exp $ *)
+(* $Id: tables.ml 4745 2002-04-26 12:16:26Z furuse $ *)
open StdLabels
open Support
(* *)
(***********************************************************************)
-(* $Id: tsort.ml,v 1.12 2002/04/26 12:15:48 furuse Exp $ *)
+(* $Id: tsort.ml 4745 2002-04-26 12:16:26Z furuse $ *)
open StdLabels
-$Id: README,v 1.2 2002/04/26 12:15:57 furuse Exp $
+$Id: README 4745 2002-04-26 12:16:26Z furuse $
Some examples for LablTk.
They are written in classic mode, except testris.ml which uses label
(* *)
(***********************************************************************)
-(* $Id: calc.ml,v 1.3 2002/10/11 18:56:18 doligez Exp $ *)
+(* $Id: calc.ml 5175 2002-10-11 19:01:19Z doligez $ *)
(* A simple calculator demonstrating OO programming with O'Labl
and LablTk.
(* *)
(***********************************************************************)
-(* $Id: clock.ml,v 1.2 2002/04/26 12:15:58 furuse Exp $ *)
+(* $Id: clock.ml 4745 2002-04-26 12:16:26Z furuse $ *)
(* Clock/V, a simple clock.
Reverts every time you push the right button.
(* *)
(***********************************************************************)
-(* $Id: demo.ml,v 1.2 2002/04/26 12:15:58 furuse Exp $ *)
+(* $Id: demo.ml 4745 2002-04-26 12:16:26Z furuse $ *)
(* Some CamlTk4 Demonstration by JPF *)
(* *)
(***********************************************************************)
-(* $Id: eyes.ml,v 1.2 2002/04/26 12:15:58 furuse Exp $ *)
+(* $Id: eyes.ml 4745 2002-04-26 12:16:26Z furuse $ *)
open Tk
(* *)
(***********************************************************************)
-(* $Id: hello.ml,v 1.2 2002/04/26 12:15:58 furuse Exp $ *)
+(* $Id: hello.ml 4745 2002-04-26 12:16:26Z furuse $ *)
(* LablTk4 Demonstration by JPF *)
(* *)
(***********************************************************************)
-(* $Id: taquin.ml,v 1.2 2002/04/26 12:15:59 furuse Exp $ *)
+(* $Id: taquin.ml 4745 2002-04-26 12:16:26Z furuse $ *)
open Tk;;
(* *)
(***********************************************************************)
-(* $Id: tetris.ml,v 1.4 2004/06/12 03:20:00 garrigue Exp $ *)
+(* $Id: tetris.ml 6385 2004-06-12 03:20:00Z garrigue $ *)
(* A Tetris game for LablTk *)
(* written by Jun P. Furuse *)
(***********************************************************************)
open Camltk
-let version = "$Id: frx_entry.ml,v 1.2 2002/04/26 12:16:02 furuse Exp $"
+let version = "$Id: frx_entry.ml 4745 2002-04-26 12:16:26Z furuse $"
(*
* Tk 4.0 has emacs bindings for entry widgets
(***********************************************************************)
open Camltk
-let version = "$Id: frx_fileinput.ml,v 1.2 2002/04/26 12:16:03 furuse Exp $"
+let version = "$Id: frx_fileinput.ml 4745 2002-04-26 12:16:26Z furuse $"
(*
* Simple spooling for fileinput callbacks
open Camltk
open Widget
-let version = "$Id: frx_font.ml,v 1.3 2002/07/23 14:11:56 doligez Exp $"
+let version = "$Id: frx_font.ml 5029 2002-07-23 14:12:03Z doligez $"
(*
* Finding fonts. Inspired by code in Ical by Sanjay Ghemawat.
open Widget
-let version = "$Id: frx_lbutton.ml,v 1.2 2002/04/26 12:16:05 furuse Exp $"
+let version = "$Id: frx_lbutton.ml 4745 2002-04-26 12:16:26Z furuse $"
(*
* Simulate a button with a bitmap AND a label
(***********************************************************************)
open Camltk
-let version = "$Id: frx_listbox.ml,v 1.3 2002/07/23 14:11:56 doligez Exp $"
+let version = "$Id: frx_listbox.ml 5029 2002-07-23 14:12:03Z doligez $"
(*
* Link a scrollbar and a listbox
* jargon).
*)
-let version = "$Id: frx_req.ml,v 1.3 2002/07/23 14:11:58 doligez Exp $"
+let version = "$Id: frx_req.ml 5029 2002-07-23 14:12:03Z doligez $"
(*
* Simple requester
(***********************************************************************)
open Camltk
-let version = "$Id: frx_text.ml,v 1.3 2002/07/23 14:11:58 doligez Exp $"
+let version = "$Id: frx_text.ml 5029 2002-07-23 14:12:03Z doligez $"
(*
* convert an integer to an absolute index
open Camltk
open Widget
-let version = "$Id: frx_widget.ml,v 1.2 2002/04/26 12:16:10 furuse Exp $"
+let version = "$Id: frx_widget.ml 4745 2002-04-26 12:16:26Z furuse $"
(* Make a window (toplevel widget) resizeable *)
let resizeable t =
update_idletasks(); (* wait until layout is computed *)
(* *)
(***********************************************************************)
-(* $Id: balloon.ml,v 1.15 2002/04/26 12:16:12 furuse Exp $ *)
+(* $Id: balloon.ml 4745 2002-04-26 12:16:26Z furuse $ *)
open StdLabels
(* *)
(***********************************************************************)
-(* $Id: balloon.mli,v 1.7 2002/04/26 12:16:12 furuse Exp $ *)
+(* $Id: balloon.mli 4745 2002-04-26 12:16:26Z furuse $ *)
(* easy balloon help facility *)
open Widget
(* *)
(***********************************************************************)
-(* $Id: balloontest.ml,v 1.8 2002/04/26 12:16:12 furuse Exp $ *)
+(* $Id: balloontest.ml 4745 2002-04-26 12:16:26Z furuse $ *)
open Tk
open Widget
(* *)
(***********************************************************************)
-(* $Id: fileselect.ml,v 1.21 2005/01/28 16:13:11 doligez Exp $ *)
+(* $Id: fileselect.ml 6757 2005-01-28 16:13:11Z doligez $ *)
(* file selection box *)
(* *)
(***********************************************************************)
-(* $Id: fileselect.mli,v 1.7 2002/04/26 12:16:12 furuse Exp $ *)
+(* $Id: fileselect.mli 4745 2002-04-26 12:16:26Z furuse $ *)
(* This file selecter works only under the OS with the full unix support.
For the portability, Tk.getOpenFile and Tk.getSaveFile are recommended. *)
modules
labltk.cma
labltk.cmxa
-
+*.a
/* */
/*************************************************************************/
-/* $Id: camltk.h,v 1.13 2008/09/26 07:35:24 garrigue Exp $ */
+/* $Id: camltk.h 9036 2008-09-26 07:35:24Z garrigue $ */
#if defined(_WIN32) && defined(CAML_DLL) && defined(IN_CAMLTKSUPPORT)
#define CAMLTKextern CAMLexport
/* */
/***********************************************************************/
-/* $Id: cltkCaml.c,v 1.10 2008/09/26 07:35:24 garrigue Exp $ */
+/* $Id: cltkCaml.c 9036 2008-09-26 07:35:24Z garrigue $ */
#include <tcl.h>
#include <tk.h>
/* */
/*************************************************************************/
-/* $Id: cltkDMain.c,v 1.7 2008/07/01 09:55:52 weis Exp $ */
+/* $Id: cltkDMain.c 8899 2008-07-01 09:55:52Z weis $ */
#include <unistd.h>
#include <fcntl.h>
/* */
/***********************************************************************/
-/* $Id: cltkEval.c,v 1.15 2008/07/01 09:55:52 weis Exp $ */
+/* $Id: cltkEval.c 8899 2008-07-01 09:55:52Z weis $ */
#include <stdlib.h>
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: cltkEvent.c,v 1.8 2002/04/26 12:16:17 furuse Exp $ */
+/* $Id: cltkEvent.c 4745 2002-04-26 12:16:26Z furuse $ */
#include <tcl.h>
#include <tk.h>
/* */
/***********************************************************************/
-/* $Id: cltkFile.c,v 1.12 2002/04/26 12:16:17 furuse Exp $ */
+/* $Id: cltkFile.c 4745 2002-04-26 12:16:26Z furuse $ */
#ifdef __CYGWIN__
#define _WIN32
/* */
/***********************************************************************/
-/* $Id: cltkMain.c,v 1.15 2008/07/01 09:55:52 weis Exp $ */
+/* $Id: cltkMain.c 8899 2008-07-01 09:55:52Z weis $ */
#include <string.h>
#include <tcl.h>
/* */
/***********************************************************************/
-/* $Id: cltkMisc.c,v 1.10 2002/07/23 14:11:59 doligez Exp $ */
+/* $Id: cltkMisc.c 5029 2002-07-23 14:12:03Z doligez $ */
#include <string.h>
#include <tcl.h>
/* */
/***********************************************************************/
-/* $Id: cltkTimer.c,v 1.9 2002/04/26 12:16:19 furuse Exp $ */
+/* $Id: cltkTimer.c 4745 2002-04-26 12:16:26Z furuse $ */
#include <tcl.h>
#include <tk.h>
/* */
/***********************************************************************/
-/* $Id: cltkUtf.c,v 1.2 2002/04/26 12:16:19 furuse Exp $ */
+/* $Id: cltkUtf.c 4745 2002-04-26 12:16:26Z furuse $ */
#include <stdlib.h>
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: cltkVar.c,v 1.9 2002/07/23 14:11:59 doligez Exp $ */
+/* $Id: cltkVar.c 5029 2002-07-23 14:12:03Z doligez $ */
/* Alternative to tkwait variable */
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: cltkWait.c,v 1.9 2002/07/23 14:11:59 doligez Exp $ */
+/* $Id: cltkWait.c 5029 2002-07-23 14:12:03Z doligez $ */
#include <tcl.h>
#include <tk.h>
(* *)
(***********************************************************************)
-(* $Id: fileevent.ml,v 1.12 2002/04/26 12:16:19 furuse Exp $ *)
+(* $Id: fileevent.ml 4745 2002-04-26 12:16:26Z furuse $ *)
open Unix
open Support
(* *)
(***********************************************************************)
-(* $Id: fileevent.mli,v 1.7 2002/04/26 12:16:20 furuse Exp $ *)
+(* $Id: fileevent.mli 4745 2002-04-26 12:16:26Z furuse $ *)
open Unix
(* *)
(***********************************************************************)
-(* $Id: protocol.ml,v 1.21 2005/12/21 05:29:08 garrigue Exp $ *)
+(* $Id: protocol.ml 7283 2005-12-21 05:29:08Z garrigue $ *)
open Support
open Widget
(* *)
(***********************************************************************)
-(* $Id: protocol.mli,v 1.12 2005/12/21 05:29:08 garrigue Exp $ *)
+(* $Id: protocol.mli 7283 2005-12-21 05:29:08Z garrigue $ *)
open Widget
(* *)
(***********************************************************************)
-(* $Id: rawwidget.ml,v 1.3 2002/07/23 14:11:59 doligez Exp $ *)
+(* $Id: rawwidget.ml 5029 2002-07-23 14:12:03Z doligez $ *)
open Support
(* *)
(***********************************************************************)
-(* $Id: rawwidget.mli,v 1.2 2002/04/26 12:16:20 furuse Exp $ *)
+(* $Id: rawwidget.mli 4745 2002-04-26 12:16:26Z furuse $ *)
(* Support for widget manipulations *)
(* *)
(***********************************************************************)
-(* $Id: slave.ml,v 1.5 2002/04/26 12:16:21 furuse Exp $ *)
+(* $Id: slave.ml 4745 2002-04-26 12:16:26Z furuse $ *)
(* The code run on initialisation, in addition to normal Tk code
* NOTE: camltk has not fully been initialised yet
(* *)
(***********************************************************************)
-(* $Id: support.ml,v 1.9 2002/04/26 12:16:21 furuse Exp $ *)
+(* $Id: support.ml 4745 2002-04-26 12:16:26Z furuse $ *)
(* Parsing results of Tcl *)
(* List.split a string according to char_sep predicate *)
(* *)
(***********************************************************************)
-(* $Id: support.mli,v 1.8 2002/04/26 12:16:21 furuse Exp $ *)
+(* $Id: support.mli 4745 2002-04-26 12:16:26Z furuse $ *)
val split_str : pred:(char -> bool) -> string -> string list
val may : ('a -> 'b) -> 'a option -> 'b option
(* *)
(***********************************************************************)
-(* $Id: textvariable.ml,v 1.16 2002/07/23 14:11:59 doligez Exp $ *)
+(* $Id: textvariable.ml 5029 2002-07-23 14:12:03Z doligez $ *)
open Support
open Protocol
(* *)
(***********************************************************************)
-(* $Id: textvariable.mli,v 1.10 2002/04/26 12:16:21 furuse Exp $ *)
+(* $Id: textvariable.mli 4745 2002-04-26 12:16:26Z furuse $ *)
(* Support for Tk -textvariable option *)
open Widget
(* *)
(***********************************************************************)
-(* $Id: timer.ml,v 1.10 2002/09/12 10:12:26 furuse Exp $ *)
+(* $Id: timer.ml 5128 2002-09-12 10:12:26Z furuse $ *)
(* Timers *)
open Support
(* *)
(***********************************************************************)
-(* $Id: timer.mli,v 1.8 2002/04/26 12:16:21 furuse Exp $ *)
+(* $Id: timer.mli 4745 2002-04-26 12:16:26Z furuse $ *)
type t
(* *)
(***********************************************************************)
-(* $Id: tkthread.ml,v 1.3 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: tkthread.ml 8768 2008-01-11 16:13:18Z doligez $ *)
let jobs : (unit -> unit) Queue.t = Queue.create ()
let m = Mutex.create ()
(* *)
(***********************************************************************)
-(* $Id: tkthread.mli,v 1.4 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: tkthread.mli 8768 2008-01-11 16:13:18Z doligez $ *)
(* Helper functions for using LablTk with threads.
To use, add tkthread.cmo or tkthread.cmx to your command line *)
(* *)
(***********************************************************************)
-(* $Id: tkwait.ml,v 1.7 2002/04/26 12:16:21 furuse Exp $ *)
+(* $Id: tkwait.ml 4745 2002-04-26 12:16:26Z furuse $ *)
external internal_tracevis : string -> string -> unit
= "camltk_wait_vis"
(* *)
(***********************************************************************)
-(* $Id: widget.ml,v 1.16 2002/04/26 12:16:22 furuse Exp $ *)
+(* $Id: widget.ml 4745 2002-04-26 12:16:26Z furuse $ *)
(* Hack to permit having the different data type with the same name
[widget] for CamlTk and LablTk. *)
(* *)
(***********************************************************************)
-(* $Id: widget.mli,v 1.7 2002/04/26 12:16:22 furuse Exp $ *)
+(* $Id: widget.mli 4745 2002-04-26 12:16:26Z furuse $ *)
(* Support for widget manipulations *)
gifanimtest
gifanimtest-static
+*.so
+*.a
libnums.x
*.c.x
so_locations
+*.so
+*.a
# #
#########################################################################
-# $Id: Makefile,v 1.37 2008/09/10 16:10:43 weis Exp $
+# $Id: Makefile 9021 2008-09-10 16:10:43Z weis $
# Makefile for the "num" (exact rational arithmetic) library
# #
#########################################################################
-# $Id: Makefile.nt,v 1.22 2007/11/06 15:16:56 frisch Exp $
+# $Id: Makefile.nt 8477 2007-11-06 15:16:56Z frisch $
# Makefile for the "num" (exact rational arithmetic) library
(* *)
(***********************************************************************)
-(* $Id: arith_flags.ml,v 1.4 2001/12/07 13:40:14 xleroy Exp $ *)
+(* $Id: arith_flags.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
let error_when_null_denominator_flag = ref true;;
(* *)
(***********************************************************************)
-(* $Id: arith_flags.mli,v 1.5 2001/12/07 13:40:14 xleroy Exp $ *)
+(* $Id: arith_flags.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
val error_when_null_denominator_flag : bool ref
val normalize_ratio_flag : bool ref
(* *)
(***********************************************************************)
-(* $Id: arith_status.ml,v 1.4 2001/12/07 13:40:14 xleroy Exp $ *)
+(* $Id: arith_status.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
open Arith_flags;;
(* *)
(***********************************************************************)
-(* $Id: arith_status.mli,v 1.6 2001/12/07 13:40:14 xleroy Exp $ *)
+(* $Id: arith_status.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(** Flags that control rational arithmetic. *)
(* *)
(***********************************************************************)
-(* $Id: big_int.ml,v 1.24.2.2 2009/05/24 19:46:44 xleroy Exp $ *)
+(* $Id: big_int.ml 9277 2009-05-24 19:46:44Z xleroy $ *)
open Int_misc
open Nat
(* *)
(***********************************************************************)
-(* $Id: big_int.mli,v 1.11 2008/01/04 13:15:52 xleroy Exp $ *)
+(* $Id: big_int.mli 8751 2008-01-04 13:15:52Z xleroy $ *)
(** Operations on arbitrary-precision integers.
/* */
/***********************************************************************/
-/* $Id: bng.c,v 1.4 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: bng.c 7064 2005-09-22 14:21:50Z xleroy $ */
#include "bng.h"
#include "config.h"
/* */
/***********************************************************************/
-/* $Id: bng.h,v 1.3 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: bng.h 7064 2005-09-22 14:21:50Z xleroy $ */
#include <string.h>
#include "config.h"
/* */
/***********************************************************************/
-/* $Id: bng_alpha.c,v 1.1 2003/10/24 09:17:32 xleroy Exp $ */
+/* $Id: bng_alpha.c 5880 2003-10-24 09:18:01Z xleroy $ */
/* Code specific to the Alpha architecture. */
/* */
/***********************************************************************/
-/* $Id: bng_amd64.c,v 1.1 2003/10/24 09:17:33 xleroy Exp $ */
+/* $Id: bng_amd64.c 5880 2003-10-24 09:18:01Z xleroy $ */
/* Code specific to the AMD x86_64 architecture. */
/* */
/***********************************************************************/
-/* $Id: bng_digit.c,v 1.1 2003/10/24 09:17:33 xleroy Exp $ */
+/* $Id: bng_digit.c 5880 2003-10-24 09:18:01Z xleroy $ */
/**** Generic operations on digits ****/
/* */
/***********************************************************************/
-/* $Id: bng_ia32.c,v 1.4 2005/08/13 20:59:37 doligez Exp $ */
+/* $Id: bng_ia32.c 7019 2005-08-13 20:59:37Z doligez $ */
/* Code specific to the Intel IA32 (x86) architecture. */
/* */
/***********************************************************************/
-/* $Id: bng_mips.c,v 1.1 2003/10/24 09:17:33 xleroy Exp $ */
+/* $Id: bng_mips.c 5880 2003-10-24 09:18:01Z xleroy $ */
/* Code specific to the MIPS architecture. */
/* */
/***********************************************************************/
-/* $Id: bng_ppc.c,v 1.3 2006/05/31 08:16:34 xleroy Exp $ */
+/* $Id: bng_ppc.c 7430 2006-05-31 08:16:34Z xleroy $ */
/* Code specific to the PowerPC architecture. */
/* */
/***********************************************************************/
-/* $Id: bng_sparc.c,v 1.1 2003/10/24 09:17:34 xleroy Exp $ */
+/* $Id: bng_sparc.c 5880 2003-10-24 09:18:01Z xleroy $ */
/* Code specific to the SPARC (V8 and above) architecture. */
(* *)
(***********************************************************************)
-(* $Id: int_misc.ml,v 1.6 2002/05/27 12:06:49 weis Exp $ *)
+(* $Id: int_misc.ml 4845 2002-05-27 12:06:49Z weis $ *)
(* Some extra operations on integers *)
(* *)
(***********************************************************************)
-(* $Id: int_misc.mli,v 1.4 2001/12/07 13:40:15 xleroy Exp $ *)
+(* $Id: int_misc.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Some extra operations on integers *)
/* */
/***********************************************************************/
-/* $Id: nat.h,v 1.6 2003/10/24 09:17:34 xleroy Exp $ */
+/* $Id: nat.h 5880 2003-10-24 09:18:01Z xleroy $ */
/* Nats are represented as unstructured blocks with tag Custom_tag. */
(* *)
(***********************************************************************)
-(* $Id: nat.ml,v 1.16 2008/01/04 13:15:52 xleroy Exp $ *)
+(* $Id: nat.ml 8751 2008-01-04 13:15:52Z xleroy $ *)
open Int_misc
(* *)
(***********************************************************************)
-(* $Id: nat.mli,v 1.12 2008/01/04 13:15:52 xleroy Exp $ *)
+(* $Id: nat.mli 8751 2008-01-04 13:15:52Z xleroy $ *)
(* Module [Nat]: operations on natural numbers *)
/* */
/***********************************************************************/
-/* $Id: nat_stubs.c,v 1.18 2008/01/11 16:13:16 doligez Exp $ */
+/* $Id: nat_stubs.c 9320 2009-07-22 15:36:28Z doligez $ */
#include "alloc.h"
#include "config.h"
#if defined(ARCH_SIXTYFOUR) && defined(ARCH_BIG_ENDIAN)
{ uint32 * p;
mlsize_t i;
- for (i = len, p = dst; i > 0; i -= 2, p += 2) {
+ for (i = len, p = dst; i > 1; i -= 2, p += 2) {
p[1] = deserialize_uint_4(); /* low 32 bits of 64-bit digit */
p[0] = deserialize_uint_4(); /* high 32 bits of 64-bit digit */
}
+ if (i > 0){
+ p[1] = deserialize_uint_4(); /* low 32 bits of 64-bit digit */
+ p[0] = 0; /* high 32 bits of 64-bit digit */
+ ++ len;
+ }
}
#else
deserialize_block_4(dst, len);
+#if defined(ARCH_SIXTYFOUR)
+ if (len & 1){
+ ((uint32 *) dst)[len] = 0;
+ ++ len;
+ }
+#endif
#endif
return len * 4;
}
-
(* *)
(***********************************************************************)
-(* $Id: num.ml,v 1.8 2008/09/10 16:12:05 weis Exp $ *)
+(* $Id: num.ml 9022 2008-09-10 16:12:05Z weis $ *)
open Int_misc
open Nat
(* *)
(***********************************************************************)
-(* $Id: num.mli,v 1.8 2001/12/28 23:15:23 guesdon Exp $ *)
+(* $Id: num.mli 4199 2001-12-28 23:15:23Z guesdon $ *)
(** Operation on arbitrary-precision numbers.
(* *)
(***********************************************************************)
-(* $Id: ratio.mli,v 1.4 2001/12/07 13:40:16 xleroy Exp $ *)
+(* $Id: ratio.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Module [Ratio]: operations on rational numbers *)
# #
#########################################################################
-# $Id: Makefile,v 1.13 2008/09/10 16:02:52 weis Exp $
+# $Id: Makefile 9019 2008-09-10 16:02:52Z weis $
include ../../../config/Makefile
# #
#########################################################################
-# $Id: Makefile.nt,v 1.9 2004/04/01 13:10:12 xleroy Exp $
+# $Id: Makefile.nt 6180 2004-04-01 13:10:12Z xleroy $
include ../../../config/Makefile
/* */
/***********************************************************************/
-/* $Id: test_bng.c,v 1.2 2003/11/07 07:59:10 xleroy Exp $ */
+/* $Id: test_bng.c 5900 2003-11-07 07:59:10Z xleroy $ */
/* Test harness for the BNG primitives. Use BigNum as a reference. */
libstr.x
*.c.x
so_locations
+*.so
+*.a
# #
#########################################################################
-# $Id: Makefile,v 1.35 2007/11/06 15:16:56 frisch Exp $
+# $Id: Makefile 8477 2007-11-06 15:16:56Z frisch $
# Makefile for the str library
# #
#########################################################################
-# $Id: Makefile.nt,v 1.16 2007/11/06 15:16:56 frisch Exp $
+# $Id: Makefile.nt 8477 2007-11-06 15:16:56Z frisch $
# Makefile for the str library
(* *)
(***********************************************************************)
-(* $Id: str.ml,v 1.22.2.1 2008/12/12 08:54:15 xleroy Exp $ *)
+(* $Id: str.ml 9157 2008-12-12 08:54:15Z xleroy $ *)
(** String utilities *)
(* *)
(***********************************************************************)
-(* $Id: str.mli,v 1.24 2005/03/24 17:20:53 doligez Exp $ *)
+(* $Id: str.mli 6824 2005-03-24 17:20:54Z doligez $ *)
(** Regular expressions and high-level string processing *)
/* */
/***********************************************************************/
-/* $Id: strstubs.c,v 1.27 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: strstubs.c 7064 2005-09-22 14:21:50Z xleroy $ */
#include <string.h>
#include <ctype.h>
*.x
thread.ml
so_locations
+*.so
+*.a
# #
#########################################################################
-# $Id: Makefile,v 1.44 2008/07/15 15:31:32 frisch Exp $
+# $Id: Makefile 8916 2008-07-15 15:31:32Z frisch $
include ../../config/Makefile
# #
#########################################################################
-# $Id: Makefile.nt,v 1.31 2007/11/06 15:16:56 frisch Exp $
+# $Id: Makefile.nt 8477 2007-11-06 15:16:56Z frisch $
include ../../config/Makefile
(* *)
(***********************************************************************)
-(* $Id: condition.ml,v 1.6 2001/12/07 13:40:18 xleroy Exp $ *)
+(* $Id: condition.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
type t
external create: unit -> t = "caml_condition_new"
(* *)
(***********************************************************************)
-(* $Id: condition.mli,v 1.6 2001/12/07 13:40:19 xleroy Exp $ *)
+(* $Id: condition.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(** Condition variables to synchronize between threads.
(* *)
(***********************************************************************)
-(* $Id: event.ml,v 1.9 2001/12/07 13:40:19 xleroy Exp $ *)
+(* $Id: event.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Events *)
type 'a basic_event =
(* *)
(***********************************************************************)
-(* $Id: event.mli,v 1.10 2006/01/12 03:24:56 garrigue Exp $ *)
+(* $Id: event.mli 7322 2006-01-12 03:24:56Z garrigue $ *)
(** First-class synchronous communication.
(* *)
(***********************************************************************)
-(* $Id: mutex.ml,v 1.4 2001/12/07 13:40:19 xleroy Exp $ *)
+(* $Id: mutex.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
type t
external create: unit -> t = "caml_mutex_new"
(* *)
(***********************************************************************)
-(* $Id: mutex.mli,v 1.6 2001/12/07 13:40:19 xleroy Exp $ *)
+(* $Id: mutex.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(** Locks for mutual exclusion.
/* */
/***********************************************************************/
-/* $Id: posix.c,v 1.58.2.2 2009/03/28 17:35:59 xleroy Exp $ */
+/* $Id: posix.c 9201 2009-03-28 17:35:59Z xleroy $ */
/* Thread interface for POSIX 1003.1c threads */
(* *)
(***********************************************************************)
-(* $Id: thread.mli,v 1.21 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: thread.mli 8768 2008-01-11 16:13:18Z doligez $ *)
(** Lightweight threads for Posix [1003.1c] and Win32. *)
(* *)
(***********************************************************************)
-(* $Id: threadUnix.ml,v 1.8 2001/12/07 13:40:20 xleroy Exp $ *)
+(* $Id: threadUnix.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Module [ThreadUnix]: thread-compatible system calls *)
(* *)
(***********************************************************************)
-(* $Id: threadUnix.mli,v 1.19 2002/06/26 09:48:00 xleroy Exp $ *)
+(* $Id: threadUnix.mli 4951 2002-06-26 09:48:00Z xleroy $ *)
(** Thread-compatible system calls.
(* *)
(***********************************************************************)
-(* $Id: thread_posix.ml,v 1.10 2005/07/31 12:32:41 xleroy Exp $ *)
+(* $Id: thread_posix.ml 7000 2005-07-31 12:32:41Z xleroy $ *)
(* User-level threads *)
(* *)
(***********************************************************************)
-(* $Id: thread_win32.ml,v 1.9 2005/07/31 12:32:41 xleroy Exp $ *)
+(* $Id: thread_win32.ml 7000 2005-07-31 12:32:41Z xleroy $ *)
(* User-level threads *)
/* */
/***********************************************************************/
-/* $Id: win32.c,v 1.45 2007/10/31 09:12:29 xleroy Exp $ */
+/* $Id: win32.c 8468 2007-10-31 09:12:29Z xleroy $ */
/* Thread interface for Win32 threads */
marshal.mli
pervasives.mli
unix.mli
+*.so
+*.a
# #
#########################################################################
-# $Id: Makefile,v 1.61.2.1 2008/10/08 13:07:13 doligez Exp $
+# $Id: Makefile 9079 2008-10-08 13:09:39Z doligez $
include ../../config/Makefile
(* *)
(***********************************************************************)
-(* $Id: condition.ml,v 1.8 2001/12/07 13:40:21 xleroy Exp $ *)
+(* $Id: condition.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
type t = { mutable waiting: Thread.t list }
(* *)
(***********************************************************************)
-(* $Id: condition.mli,v 1.13 2001/12/07 13:40:21 xleroy Exp $ *)
+(* $Id: condition.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(** Condition variables to synchronize between threads.
(* *)
(***********************************************************************)
-(* $Id: event.ml,v 1.14 2001/12/07 13:40:21 xleroy Exp $ *)
+(* $Id: event.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Events *)
type 'a basic_event =
(* *)
(***********************************************************************)
-(* $Id: event.mli,v 1.15 2006/01/12 03:24:56 garrigue Exp $ *)
+(* $Id: event.mli 7322 2006-01-12 03:24:56Z garrigue $ *)
(** First-class synchronous communication.
(* *)
(***********************************************************************)
-(* $Id: marshal.ml,v 1.9 2004/05/27 15:28:05 doligez Exp $ *)
+(* $Id: marshal.ml 6338 2004-05-27 15:28:05Z doligez $ *)
type extern_flags =
No_sharing
(* *)
(***********************************************************************)
-(* $Id: mutex.ml,v 1.8 2001/12/07 13:40:22 xleroy Exp $ *)
+(* $Id: mutex.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
type t = { mutable locked: bool; mutable waiting: Thread.t list }
(* *)
(***********************************************************************)
-(* $Id: mutex.mli,v 1.11 2001/12/07 13:40:22 xleroy Exp $ *)
+(* $Id: mutex.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
(** Locks for mutual exclusion.
(* *)
(***********************************************************************)
-(* $Id: pervasives.ml,v 1.52 2007/02/25 12:37:30 xleroy Exp $ *)
+(* $Id: pervasives.ml 7918 2007-02-25 12:37:30Z xleroy $ *)
(* Same as ../../stdlib/pervasives.ml, except that I/O functions have
been redefined to not block the whole process, but only the calling
/* */
/***********************************************************************/
-/* $Id: scheduler.c,v 1.60 2005/09/22 14:21:50 xleroy Exp $ */
+/* $Id: scheduler.c 7064 2005-09-22 14:21:50Z xleroy $ */
/* The thread scheduler */
(* *)
(***********************************************************************)
-(* $Id: thread.ml,v 1.23 2003/03/20 16:23:04 xleroy Exp $ *)
+(* $Id: thread.ml 5445 2003-03-20 16:23:04Z xleroy $ *)
(* User-level threads *)
(* *)
(***********************************************************************)
-(* $Id: thread.mli,v 1.28 2004/07/13 12:25:13 xleroy Exp $ *)
+(* $Id: thread.mli 6553 2004-07-13 12:25:21Z xleroy $ *)
(** Lightweight threads. *)
(* *)
(***********************************************************************)
-(* $Id: threadUnix.ml,v 1.19 2004/07/13 12:25:13 xleroy Exp $ *)
+(* $Id: threadUnix.ml 6553 2004-07-13 12:25:21Z xleroy $ *)
(* Module [ThreadUnix]: thread-compatible system calls *)
(* *)
(***********************************************************************)
-(* $Id: threadUnix.mli,v 1.22 2004/07/13 12:25:14 xleroy Exp $ *)
+(* $Id: threadUnix.mli 6553 2004-07-13 12:25:21Z xleroy $ *)
(** Thread-compatible system calls.
(* *)
(***********************************************************************)
-(* $Id: unix.ml,v 1.22 2008/08/01 16:29:44 mauny Exp $ *)
+(* $Id: unix.ml 8972 2008-08-01 16:29:44Z mauny $ *)
(* An alternate implementation of the Unix module from ../unix
which is safe in conjunction with bytecode threads. *)
# #
#########################################################################
-# $Id: Makefile,v 1.46 2007/11/06 15:16:56 frisch Exp $
+# $Id: Makefile 8477 2007-11-06 15:16:56Z frisch $
# Makefile for the Unix interface library
/* */
/***********************************************************************/
-/* $Id: accept.c,v 1.13 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: accept.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: access.c,v 1.12 2008/01/11 16:13:16 doligez Exp $ */
+/* $Id: access.c 8768 2008-01-11 16:13:18Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: addrofstr.c,v 1.11 2004/04/09 13:25:20 xleroy Exp $ */
+/* $Id: addrofstr.c 6193 2004-04-09 13:25:23Z xleroy $ */
#include <mlvalues.h>
#include <fail.h>
/* */
/***********************************************************************/
-/* $Id: alarm.c,v 1.8 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: alarm.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: bind.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: bind.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: chdir.c,v 1.8 2001/12/07 13:40:24 xleroy Exp $ */
+/* $Id: chdir.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: chmod.c,v 1.9 2001/12/07 13:40:26 xleroy Exp $ */
+/* $Id: chmod.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <sys/types.h>
#include <sys/stat.h>
/* */
/***********************************************************************/
-/* $Id: chown.c,v 1.8 2001/12/07 13:40:26 xleroy Exp $ */
+/* $Id: chown.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: chroot.c,v 1.8 2001/12/07 13:40:26 xleroy Exp $ */
+/* $Id: chroot.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: close.c,v 1.10 2001/12/07 13:40:26 xleroy Exp $ */
+/* $Id: close.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: closedir.c,v 1.9 2004/02/14 10:21:22 xleroy Exp $ */
+/* $Id: closedir.c 6113 2004-02-14 10:21:23Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: connect.c,v 1.12 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: connect.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: cst2constr.c,v 1.7 2001/12/07 13:40:26 xleroy Exp $ */
+/* $Id: cst2constr.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <fail.h>
/* */
/***********************************************************************/
-/* $Id: cst2constr.h,v 1.7 2004/04/09 13:25:21 xleroy Exp $ */
+/* $Id: cst2constr.h 6193 2004-04-09 13:25:23Z xleroy $ */
extern value cst_to_constr(int n, int * tbl, int size, int deflt);
/* */
/***********************************************************************/
-/* $Id: cstringv.c,v 1.7 2001/12/07 13:40:27 xleroy Exp $ */
+/* $Id: cstringv.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <memory.h>
/* */
/***********************************************************************/
-/* $Id: dup.c,v 1.8 2001/12/07 13:40:27 xleroy Exp $ */
+/* $Id: dup.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: dup2.c,v 1.9 2001/12/07 13:40:27 xleroy Exp $ */
+/* $Id: dup2.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: envir.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: envir.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: errmsg.c,v 1.12 2004/05/23 15:53:50 xleroy Exp $ */
+/* $Id: errmsg.c 6315 2004-05-23 15:53:50Z xleroy $ */
#include <errno.h>
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: execv.c,v 1.8 2001/12/07 13:40:27 xleroy Exp $ */
+/* $Id: execv.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <memory.h>
/* */
/***********************************************************************/
-/* $Id: execve.c,v 1.8 2001/12/07 13:40:27 xleroy Exp $ */
+/* $Id: execve.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <memory.h>
/* */
/***********************************************************************/
-/* $Id: execvp.c,v 1.8 2001/12/07 13:40:27 xleroy Exp $ */
+/* $Id: execvp.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <memory.h>
/* */
/***********************************************************************/
-/* $Id: exit.c,v 1.9 2001/12/07 13:40:28 xleroy Exp $ */
+/* $Id: exit.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: fchmod.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: fchmod.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <sys/types.h>
#include <sys/stat.h>
/* */
/***********************************************************************/
-/* $Id: fchown.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: fchown.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: fcntl.c,v 1.12 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: fcntl.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: fork.c,v 1.8 2001/12/07 13:40:28 xleroy Exp $ */
+/* $Id: fork.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: ftruncate.c,v 1.11 2007/02/09 13:31:15 doligez Exp $ */
+/* $Id: ftruncate.c 7849 2007-02-09 13:31:15Z doligez $ */
#include <sys/types.h>
#include <fail.h>
/* */
/***********************************************************************/
-/* $Id: getaddrinfo.c,v 1.3 2005/08/13 20:59:37 doligez Exp $ */
+/* $Id: getaddrinfo.c 7019 2005-08-13 20:59:37Z doligez $ */
#include <string.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: getcwd.c,v 1.15 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getcwd.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: getegid.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getegid.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: geteuid.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: geteuid.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: getgid.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getgid.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: getgr.c,v 1.12 2001/12/07 13:40:29 xleroy Exp $ */
+/* $Id: getgr.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <fail.h>
/* */
/***********************************************************************/
-/* $Id: getgroups.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getgroups.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: gethost.c,v 1.27 2006/09/20 11:14:37 doligez Exp $ */
+/* $Id: gethost.c 7619 2006-09-20 11:14:37Z doligez $ */
#include <string.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: gethostname.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: gethostname.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: getlogin.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getlogin.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: getnameinfo.c,v 1.2 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getnameinfo.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <string.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: getpeername.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getpeername.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: getpid.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getpid.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: getppid.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getppid.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: getproto.c,v 1.13 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getproto.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: getpw.c,v 1.12 2001/12/07 13:40:30 xleroy Exp $ */
+/* $Id: getpw.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: getserv.c,v 1.14 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getserv.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: getsockname.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getsockname.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: gettimeofday.c,v 1.8 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: gettimeofday.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: getuid.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getuid.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: gmtime.c,v 1.17 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: gmtime.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: isatty.c,v 1.1 2006/09/21 13:54:26 xleroy Exp $ */
+/* $Id: isatty.c 7632 2006-09-21 13:54:26Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: itimer.c,v 1.14 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: itimer.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: kill.c,v 1.10 2001/12/07 13:40:31 xleroy Exp $ */
+/* $Id: kill.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <fail.h>
/* */
/***********************************************************************/
-/* $Id: link.c,v 1.8 2001/12/07 13:40:31 xleroy Exp $ */
+/* $Id: link.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: listen.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: listen.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: lockf.c,v 1.14 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: lockf.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <errno.h>
#include <fcntl.h>
/* */
/***********************************************************************/
-/* $Id: lseek.c,v 1.10 2002/03/02 09:16:36 xleroy Exp $ */
+/* $Id: lseek.c 4474 2002-03-02 09:16:39Z xleroy $ */
#include <errno.h>
#include <sys/types.h>
/* */
/***********************************************************************/
-/* $Id: mkdir.c,v 1.9 2001/12/07 13:40:31 xleroy Exp $ */
+/* $Id: mkdir.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <sys/types.h>
#include <sys/stat.h>
/* */
/***********************************************************************/
-/* $Id: mkfifo.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: mkfifo.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <sys/types.h>
#include <sys/stat.h>
/* */
/***********************************************************************/
-/* $Id: nice.c,v 1.11 2008/08/01 13:14:36 xleroy Exp $ */
+/* $Id: nice.c 8967 2008-08-01 13:14:36Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: open.c,v 1.12 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: open.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: opendir.c,v 1.9 2004/02/14 10:21:22 xleroy Exp $ */
+/* $Id: opendir.c 6113 2004-02-14 10:21:23Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: pipe.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: pipe.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: putenv.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: putenv.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <stdlib.h>
#include <string.h>
/* */
/***********************************************************************/
-/* $Id: read.c,v 1.13 2001/12/07 13:40:32 xleroy Exp $ */
+/* $Id: read.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <string.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: readdir.c,v 1.12 2004/02/14 10:21:23 xleroy Exp $ */
+/* $Id: readdir.c 6113 2004-02-14 10:21:23Z xleroy $ */
#include <mlvalues.h>
#include <fail.h>
/* */
/***********************************************************************/
-/* $Id: readlink.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: readlink.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: rename.c,v 1.10 2001/12/07 13:40:33 xleroy Exp $ */
+/* $Id: rename.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <stdio.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: rewinddir.c,v 1.12 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: rewinddir.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: rmdir.c,v 1.9 2001/12/07 13:40:33 xleroy Exp $ */
+/* $Id: rmdir.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: select.c,v 1.22 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: select.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: sendrecv.c,v 1.19 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: sendrecv.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <string.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: setgid.c,v 1.8 2001/12/07 13:40:33 xleroy Exp $ */
+/* $Id: setgid.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: setsid.c,v 1.6 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: setsid.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: setuid.c,v 1.8 2001/12/07 13:40:33 xleroy Exp $ */
+/* $Id: setuid.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: shutdown.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: shutdown.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: signals.c,v 1.11 2008/01/11 16:13:16 doligez Exp $ */
+/* $Id: signals.c 8768 2008-01-11 16:13:18Z doligez $ */
#include <errno.h>
#include <signal.h>
/* */
/***********************************************************************/
-/* $Id: sleep.c,v 1.9 2001/12/07 13:40:35 xleroy Exp $ */
+/* $Id: sleep.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <signals.h>
/* */
/***********************************************************************/
-/* $Id: socket.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: socket.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: socketaddr.c,v 1.23 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: socketaddr.c 9377 2009-10-18 09:36:13Z xleroy $ */
#include <string.h>
#include <mlvalues.h>
adr->s_inet6.sin6_family = AF_INET6;
adr->s_inet6.sin6_addr = GET_INET6_ADDR(Field(mladr, 0));
adr->s_inet6.sin6_port = htons(Int_val(Field(mladr, 1)));
+#ifdef SIN6_LEN
+ adr->s_inet6.sin6_len = sizeof(struct sockaddr_in6);
+#endif
*adr_len = sizeof(struct sockaddr_in6);
break;
}
adr->s_inet.sin_family = AF_INET;
adr->s_inet.sin_addr = GET_INET_ADDR(Field(mladr, 0));
adr->s_inet.sin_port = htons(Int_val(Field(mladr, 1)));
+#ifdef SIN6_LEN
+ adr->s_inet.sin_len = sizeof(struct sockaddr_in);
+#endif
*adr_len = sizeof(struct sockaddr_in);
break;
}
/* */
/***********************************************************************/
-/* $Id: socketaddr.h,v 1.16 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: socketaddr.h 6824 2005-03-24 17:20:54Z doligez $ */
#include <misc.h>
#include <sys/types.h>
/* */
/***********************************************************************/
-/* $Id: socketpair.c,v 1.12 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: socketpair.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: sockopt.c,v 1.21 2008/08/01 13:46:08 xleroy Exp $ */
+/* $Id: sockopt.c 8968 2008-08-01 13:46:08Z xleroy $ */
#include <mlvalues.h>
#include <memory.h>
/* */
/***********************************************************************/
-/* $Id: stat.c,v 1.15 2003/05/05 14:20:58 xleroy Exp $ */
+/* $Id: stat.c 5540 2003-05-05 14:20:58Z xleroy $ */
#include <errno.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: strofaddr.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: strofaddr.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: symlink.c,v 1.9 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: symlink.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: termios.c,v 1.15 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: termios.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: time.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: time.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <time.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: times.c,v 1.16 2006/04/16 23:28:21 doligez Exp $ */
+/* $Id: times.c 7382 2006-04-16 23:28:22Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: truncate.c,v 1.11 2007/02/09 13:31:15 doligez Exp $ */
+/* $Id: truncate.c 7849 2007-02-09 13:31:15Z doligez $ */
#include <sys/types.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: umask.c,v 1.9 2001/12/07 13:40:37 xleroy Exp $ */
+/* $Id: umask.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <sys/types.h>
#include <sys/stat.h>
(* *)
(***********************************************************************)
-(* $Id: unix.ml,v 1.68 2008/08/01 13:46:08 xleroy Exp $ *)
+(* $Id: unix.ml 8968 2008-08-01 13:46:08Z xleroy $ *)
type error =
E2BIG
(* *)
(***********************************************************************)
-(* $Id: unix.mli,v 1.89.2.1 2009/03/28 16:58:56 xleroy Exp $ *)
+(* $Id: unix.mli 9200 2009-03-28 16:58:56Z xleroy $ *)
(** Interface to the Unix system *)
(* *)
(***********************************************************************)
-(* $Id: unixLabels.ml,v 1.3 2001/12/07 13:40:38 xleroy Exp $ *)
+(* $Id: unixLabels.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Module [UnixLabels]: labelled Unix module *)
(* *)
(***********************************************************************)
-(* $Id: unixLabels.mli,v 1.19 2008/08/01 13:46:08 xleroy Exp $ *)
+(* $Id: unixLabels.mli 8968 2008-08-01 13:46:08Z xleroy $ *)
(** Interface to the Unix system.
To use as replacement to default {!Unix} module,
/* */
/***********************************************************************/
-/* $Id: unixsupport.c,v 1.18 2005/09/06 12:38:32 doligez Exp $ */
+/* $Id: unixsupport.c 7045 2005-09-06 12:38:32Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: unixsupport.h,v 1.8 2005/09/06 12:38:32 doligez Exp $ */
+/* $Id: unixsupport.h 7045 2005-09-06 12:38:32Z doligez $ */
#ifdef HAS_UNISTD
#include <unistd.h>
/* */
/***********************************************************************/
-/* $Id: unlink.c,v 1.8 2001/12/07 13:40:39 xleroy Exp $ */
+/* $Id: unlink.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: utimes.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: utimes.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <fail.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: wait.c,v 1.19 2005/04/17 08:23:51 xleroy Exp $ */
+/* $Id: wait.c 6845 2005-04-17 08:23:51Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: write.c,v 1.14 2004/07/13 12:25:15 xleroy Exp $ */
+/* $Id: write.c 6553 2004-07-13 12:25:21Z xleroy $ */
#include <errno.h>
#include <string.h>
# #
#########################################################################
-# $Id: Makefile.nt,v 1.8 2007/11/06 15:16:56 frisch Exp $
+# $Id: Makefile.nt 8477 2007-11-06 15:16:56Z frisch $
LIBNAME=graphics
COBJS=open.$(O) draw.$(O) events.$(O) dib.$(O)
/* */
/***********************************************************************/
-/* $Id: dib.c,v 1.3 2002/07/23 14:12:00 doligez Exp $ */
+/* $Id: dib.c 5029 2002-07-23 14:12:03Z doligez $ */
//-----------------------------------------------------------------------------
// DIB.C
/* */
/***********************************************************************/
-/* $Id: draw.c,v 1.11 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: draw.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <math.h>
#include "mlvalues.h"
/* */
/***********************************************************************/
-/* $Id: events.c,v 1.2 2004/07/13 12:25:15 xleroy Exp $ */
+/* $Id: events.c 6553 2004-07-13 12:25:21Z xleroy $ */
#include "mlvalues.h"
#include "alloc.h"
/* */
/***********************************************************************/
-/* $Id: libgraph.h,v 1.9 2004/07/13 12:25:15 xleroy Exp $ */
+/* $Id: libgraph.h 6553 2004-07-13 12:25:21Z xleroy $ */
#include <stdio.h>
#include <windows.h>
/* */
/***********************************************************************/
-/* $Id: open.c,v 1.12 2007/11/06 15:16:56 frisch Exp $ */
+/* $Id: open.c 8477 2007-11-06 15:16:56Z frisch $ */
#include <fcntl.h>
#include <signal.h>
# #
#########################################################################
-# $Id: Makefile.nt,v 1.37 2008/07/29 08:31:41 xleroy Exp $
+# $Id: Makefile.nt 8955 2008-07-29 08:31:41Z xleroy $
# Files in this directory
WIN_FILES = accept.c bind.c channels.c close.c \
/* */
/***********************************************************************/
-/* $Id: accept.c,v 1.21 2006/10/18 08:26:54 xleroy Exp $ */
+/* $Id: accept.c 7697 2006-10-18 08:26:54Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: bind.c,v 1.10 2002/04/30 15:00:45 xleroy Exp $ */
+/* $Id: bind.c 4765 2002-04-30 15:00:48Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: channels.c,v 1.12 2006/09/21 09:41:04 xleroy Exp $ */
+/* $Id: channels.c 9450 2009-12-07 10:39:54Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
CAMLprim value win_handle_fd(value vfd)
{
int crt_fd = Int_val(vfd);
- value res = win_alloc_handle_or_socket((HANDLE) _get_osfhandle(crt_fd));
+ /* PR#4750: do not use the _or_socket variant as it can cause performance
+ degradation and this function is only used with the standard
+ handles 0, 1, 2, which are not sockets. */
+ value res = win_alloc_handle((HANDLE) _get_osfhandle(crt_fd));
CRT_fd_val(res) = crt_fd;
return res;
}
/* */
/***********************************************************************/
-/* $Id: close.c,v 1.5 2002/04/30 15:00:46 xleroy Exp $ */
+/* $Id: close.c 4765 2002-04-30 15:00:48Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: close_on.c,v 1.8 2001/12/07 13:40:43 xleroy Exp $ */
+/* $Id: close_on.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include <windows.h>
/* */
/***********************************************************************/
-/* $Id: connect.c,v 1.13 2006/10/18 08:26:54 xleroy Exp $ */
+/* $Id: connect.c 7697 2006-10-18 08:26:54Z xleroy $ */
#include <mlvalues.h>
#include <signals.h>
/* */
/***********************************************************************/
-/* $Id: createprocess.c,v 1.14.4.1 2009/06/02 13:12:53 xleroy Exp $ */
+/* $Id: createprocess.c 9284 2009-06-02 13:12:53Z xleroy $ */
#include <windows.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: dup.c,v 1.6 2002/04/30 15:00:46 xleroy Exp $ */
+/* $Id: dup.c 4765 2002-04-30 15:00:48Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: dup2.c,v 1.9 2006/09/21 09:43:58 xleroy Exp $ */
+/* $Id: dup2.c 7630 2006-09-21 09:43:58Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: errmsg.c,v 1.5 2003/12/31 00:00:14 doligez Exp $ */
+/* $Id: errmsg.c 6043 2003-12-31 00:00:57Z doligez $ */
#include <stdio.h>
#include <errno.h>
/* */
/***********************************************************************/
-/* $Id: getpeername.c,v 1.10 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getpeername.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: getpid.c,v 1.4 2001/12/07 13:40:44 xleroy Exp $ */
+/* $Id: getpid.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: getsockname.c,v 1.8 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: getsockname.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: gettimeofday.c,v 1.7 2007/03/01 13:51:24 xleroy Exp $ */
+/* $Id: gettimeofday.c 7946 2007-03-01 13:51:24Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: link.c,v 1.3 2001/12/07 13:40:44 xleroy Exp $ */
+/* $Id: link.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <windows.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: listen.c,v 1.9 2002/04/30 15:00:46 xleroy Exp $ */
+/* $Id: listen.c 4765 2002-04-30 15:00:48Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: lockf.c,v 1.7.2.1 2008/10/08 13:05:42 xleroy Exp $ */
+/* $Id: lockf.c 9078 2008-10-08 13:05:48Z xleroy $ */
#include <errno.h>
#include <fcntl.h>
/* */
/***********************************************************************/
-/* $Id: lseek.c,v 1.7 2005/02/02 15:52:26 xleroy Exp $ */
+/* $Id: lseek.c 6774 2005-02-02 15:52:26Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: mkdir.c,v 1.5 2001/12/07 13:40:45 xleroy Exp $ */
+/* $Id: mkdir.c 4144 2001-12-07 13:41:02Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
-/***********************************************************************/\r
-/* */\r
-/* Objective Caml */\r
-/* */\r
-/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */\r
-/* */\r
-/* Copyright 2002 Institut National de Recherche en Informatique et */\r
-/* en Automatique. All rights reserved. This file is distributed */\r
-/* under the terms of the GNU Library General Public License, with */\r
-/* the special exception on linking described in file ../../LICENSE. */\r
-/* */\r
-/***********************************************************************/\r
-\r
-/* $Id: nonblock.c,v 1.1 2003/01/06 16:44:21 xleroy Exp $ */\r
-\r
-#include <mlvalues.h>\r
-#include <signals.h>\r
-#include "unixsupport.h"\r
-\r
-CAMLprim value unix_set_nonblock(socket)\r
- value socket;\r
-{\r
- u_long non_block = 1;\r
-\r
- if (ioctlsocket(Socket_val(socket), FIONBIO, &non_block) != 0) {\r
- win32_maperr(WSAGetLastError());\r
- uerror("unix_set_nonblock", Nothing);\r
- }\r
- return Val_unit;\r
-}\r
-\r
-CAMLprim value unix_clear_nonblock(socket)\r
- value socket;\r
-{\r
- u_long non_block = 0;\r
-\r
- if (ioctlsocket(Socket_val(socket), FIONBIO, &non_block) != 0) {\r
- win32_maperr(WSAGetLastError());\r
- uerror("unix_clear_nonblock", Nothing);\r
- }\r
- return Val_unit;\r
-}\r
+/***********************************************************************/
+/* */
+/* Objective Caml */
+/* */
+/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
+/* */
+/* Copyright 2002 Institut National de Recherche en Informatique et */
+/* en Automatique. All rights reserved. This file is distributed */
+/* under the terms of the GNU Library General Public License, with */
+/* the special exception on linking described in file ../../LICENSE. */
+/* */
+/***********************************************************************/
+
+/* $Id: nonblock.c 5375 2003-01-06 16:44:21Z xleroy $ */
+
+#include <mlvalues.h>
+#include <signals.h>
+#include "unixsupport.h"
+
+CAMLprim value unix_set_nonblock(socket)
+ value socket;
+{
+ u_long non_block = 1;
+
+ if (ioctlsocket(Socket_val(socket), FIONBIO, &non_block) != 0) {
+ win32_maperr(WSAGetLastError());
+ uerror("unix_set_nonblock", Nothing);
+ }
+ return Val_unit;
+}
+
+CAMLprim value unix_clear_nonblock(socket)
+ value socket;
+{
+ u_long non_block = 0;
+
+ if (ioctlsocket(Socket_val(socket), FIONBIO, &non_block) != 0) {
+ win32_maperr(WSAGetLastError());
+ uerror("unix_clear_nonblock", Nothing);
+ }
+ return Val_unit;
+}
/* */
/***********************************************************************/
-/* $Id: open.c,v 1.10 2008/01/11 16:13:16 doligez Exp $ */
+/* $Id: open.c 8768 2008-01-11 16:13:18Z doligez $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: pipe.c,v 1.7.28.1 2009/03/28 15:30:08 xleroy Exp $ */
+/* $Id: pipe.c 9196 2009-03-28 15:30:08Z xleroy $ */
#include <mlvalues.h>
#include <memory.h>
/* */
/***********************************************************************/
-/* $Id: read.c,v 1.9 2006/10/18 08:26:54 xleroy Exp $ */
+/* $Id: read.c 7697 2006-10-18 08:26:54Z xleroy $ */
#include <string.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: rename.c,v 1.3 2004/07/13 12:25:15 xleroy Exp $ */
+/* $Id: rename.c 6553 2004-07-13 12:25:21Z xleroy $ */
#include <stdio.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: select.c,v 1.14.2.2 2008/11/26 13:27:21 xleroy Exp $ */
+/* $Id: select.c 9143 2008-11-26 13:27:21Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: sendrecv.c,v 1.21 2006/10/18 08:26:54 xleroy Exp $ */
+/* $Id: sendrecv.c 7697 2006-10-18 08:26:54Z xleroy $ */
#include <mlvalues.h>
#include <alloc.h>
/* */
/***********************************************************************/
-/* $Id: shutdown.c,v 1.9 2002/04/30 15:00:47 xleroy Exp $ */
+/* $Id: shutdown.c 4765 2002-04-30 15:00:48Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: sleep.c,v 1.5 2002/06/07 09:49:41 xleroy Exp $ */
+/* $Id: sleep.c 4899 2002-06-07 09:49:45Z xleroy $ */
#include <mlvalues.h>
#include <signals.h>
/* */
/***********************************************************************/
-/* $Id: socket.c,v 1.12 2002/04/30 15:00:47 xleroy Exp $ */
+/* $Id: socket.c 4765 2002-04-30 15:00:48Z xleroy $ */
#include <mlvalues.h>
#include "unixsupport.h"
/* */
/***********************************************************************/
-/* $Id: socketaddr.h,v 1.8 2005/03/24 17:20:53 doligez Exp $ */
+/* $Id: socketaddr.h 6824 2005-03-24 17:20:54Z doligez $ */
#include <misc.h>
/* */
/***********************************************************************/
-/* $Id: sockopt.c,v 1.19 2008/08/01 13:46:08 xleroy Exp $ */
+/* $Id: sockopt.c 8968 2008-08-01 13:46:08Z xleroy $ */
#include <errno.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: stat.c,v 1.3.14.1 2009/03/28 16:39:50 xleroy Exp $ */
+/* $Id: stat.c 9199 2009-03-28 16:39:50Z xleroy $ */
#include <errno.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: system.c,v 1.9 2006/09/21 08:03:56 xleroy Exp $ */
+/* $Id: system.c 7626 2006-09-21 08:03:56Z xleroy $ */
#include <mlvalues.h>
#include <memory.h>
(* *)
(***********************************************************************)
-(* $Id: unix.ml,v 1.48 2008/08/01 13:46:08 xleroy Exp $ *)
+(* $Id: unix.ml 8968 2008-08-01 13:46:08Z xleroy $ *)
(* Initialization *)
/* */
/***********************************************************************/
-/* $Id: unixsupport.c,v 1.21.12.1 2009/05/19 12:32:36 xleroy Exp $ */
+/* $Id: unixsupport.c 9450 2009-12-07 10:39:54Z xleroy $ */
#include <stddef.h>
#include <mlvalues.h>
return res;
}
+#if 0
+/* PR#4750: this function is no longer used */
value win_alloc_handle_or_socket(HANDLE h)
{
value res = win_alloc_handle(h);
Descr_kind_val(res) = KIND_SOCKET;
return res;
}
+#endif
/* Mapping of Windows error codes to POSIX error codes */
/* */
/***********************************************************************/
-/* $Id: unixsupport.h,v 1.19 2007/02/07 14:45:46 doligez Exp $ */
+/* $Id: unixsupport.h 9450 2009-12-07 10:39:54Z xleroy $ */
#define WIN32_LEAN_AND_MEAN
#include <wtypes.h>
#define Descr_kind_val(v) (((struct filedescr *) Data_custom_val(v))->kind)
#define CRT_fd_val(v) (((struct filedescr *) Data_custom_val(v))->crt_fd)
-extern value win_alloc_handle_or_socket(HANDLE);
+/* extern value win_alloc_handle_or_socket(HANDLE); */
extern value win_alloc_handle(HANDLE);
extern value win_alloc_socket(SOCKET);
extern int win_CRT_fd_of_filedescr(value handle);
/* */
/***********************************************************************/
-/* $Id: windbug.c,v 1.2.2.2 2008/11/26 13:41:01 xleroy Exp $ */
+/* $Id: windbug.c 9144 2008-11-26 13:41:01Z xleroy $ */
#include <windows.h>
#include <stdio.h>
/* */
/***********************************************************************/
-/* $Id: windbug.h,v 1.2.2.1 2008/11/26 13:27:21 xleroy Exp $ */
+/* $Id: windbug.h 9143 2008-11-26 13:27:21Z xleroy $ */
/*#define DBUG*/
/* */
/***********************************************************************/
-/* $Id: windir.c,v 1.13 2002/07/23 14:12:01 doligez Exp $ */
+/* $Id: windir.c 5029 2002-07-23 14:12:03Z doligez $ */
#include <mlvalues.h>
#include <memory.h>
/* */
/***********************************************************************/
-/* $Id: winlist.c,v 1.2 2008/07/31 12:09:18 xleroy Exp $ */
+/* $Id: winlist.c 8961 2008-07-31 12:09:18Z xleroy $ */
/* Basic list function in C. */
/* */
/***********************************************************************/
-/* $Id: winlist.h,v 1.2 2008/07/31 12:09:18 xleroy Exp $ */
+/* $Id: winlist.h 8961 2008-07-31 12:09:18Z xleroy $ */
#ifndef _WINLIST_H
#define _WINLIST_H
/* */
/***********************************************************************/
-/* $Id: winwait.c,v 1.20 2008/01/11 16:13:16 doligez Exp $ */
+/* $Id: winwait.c 8768 2008-01-11 16:13:18Z doligez $ */
#include <windows.h>
#include <mlvalues.h>
/* */
/***********************************************************************/
-/* $Id: winworker.c,v 1.2.2.2 2008/11/26 13:41:01 xleroy Exp $ */
+/* $Id: winworker.c 9144 2008-11-26 13:41:01Z xleroy $ */
#include "winworker.h"
#include "winlist.h"
/* */
/***********************************************************************/
-/* $Id: winworker.h,v 1.2 2008/07/31 12:09:18 xleroy Exp $ */
+/* $Id: winworker.h 8961 2008-07-31 12:09:18Z xleroy $ */
#ifndef _WINWORKER_H
#define _WINWORKER_H
/* */
/***********************************************************************/
-/* $Id: write.c,v 1.11 2006/10/18 08:26:54 xleroy Exp $ */
+/* $Id: write.c 9315 2009-07-15 12:19:12Z xleroy $ */
#include <errno.h>
#include <string.h>
intnat ofs, len, written;
DWORD numbytes, numwritten;
char iobuf[UNIX_BUFFER_SIZE];
- DWORD err;
+ DWORD err = 0;
Begin_root (buf);
ofs = Long_val(vofs);
(* *)
(***********************************************************************)
-(* $Id: asttypes.mli,v 1.9 2003/04/25 12:27:30 xleroy Exp $ *)
+(* $Id: asttypes.mli 5510 2003-04-25 12:27:31Z xleroy $ *)
(* Auxiliary a.s.t. types used by parsetree and typedtree. *)
(* *)
(***********************************************************************)
-(* $Id: lexer.mli,v 1.14 2003/11/21 16:01:13 xleroy Exp $ *)
+(* $Id: lexer.mli 5961 2003-11-21 16:01:13Z xleroy $ *)
(* The lexical analyzer *)
(* *)
(***********************************************************************)
-(* $Id: lexer.mll,v 1.73.24.1 2008/10/08 13:07:13 doligez Exp $ *)
+(* $Id: lexer.mll 9079 2008-10-08 13:09:39Z doligez $ *)
(* The lexer definition *)
(* *)
(***********************************************************************)
-(* $Id: linenum.mli,v 1.2 1999/11/17 18:58:17 xleroy Exp $ *)
+(* $Id: linenum.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* An auxiliary lexer for determining the line number corresponding to
a file position, honoring the directives # linenum "filename" *)
(* *)
(***********************************************************************)
-(* $Id: linenum.mll,v 1.7 1999/11/17 18:58:17 xleroy Exp $ *)
+(* $Id: linenum.mll 2553 1999-11-17 18:59:06Z xleroy $ *)
(* An auxiliary lexer for determining the line number corresponding to
a file position, honoring the directives # linenum "filename" *)
(* *)
(***********************************************************************)
-(* $Id: location.ml,v 1.50 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: location.ml 8768 2008-01-11 16:13:18Z doligez $ *)
open Lexing
(* *)
(***********************************************************************)
-(* $Id: location.mli,v 1.17 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: location.mli 8705 2007-12-04 13:38:58Z doligez $ *)
(* Source code locations (ranges of positions), used in parsetree. *)
(* *)
(***********************************************************************)
-(* $Id: longident.ml,v 1.4 2000/03/25 18:55:44 xleroy Exp $ *)
+(* $Id: longident.ml 2990 2000-03-25 18:55:45Z xleroy $ *)
type t =
Lident of string
(* *)
(***********************************************************************)
-(* $Id: longident.mli,v 1.7 2000/03/25 18:55:44 xleroy Exp $ *)
+(* $Id: longident.mli 2990 2000-03-25 18:55:45Z xleroy $ *)
(* Long identifiers, used in parsetree. *)
(* *)
(***********************************************************************)
-(* $Id: parse.ml,v 1.15 2002/11/01 17:06:46 doligez Exp $ *)
+(* $Id: parse.ml 5224 2002-11-01 17:06:47Z doligez $ *)
(* Entry points in the parser *)
(* *)
(***********************************************************************)
-(* $Id: parse.mli,v 1.6 1999/11/17 18:58:19 xleroy Exp $ *)
+(* $Id: parse.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Entry points in the parser *)
/* */
/***********************************************************************/
-/* $Id: parser.mly,v 1.131 2008/07/14 09:09:53 xleroy Exp $ */
+/* $Id: parser.mly 9412 2009-11-09 11:42:39Z weis $ */
/* The parser definition */
| MINUS INT32 { Const_int32(Int32.neg $2) }
| MINUS INT64 { Const_int64(Int64.neg $2) }
| MINUS NATIVEINT { Const_nativeint(Nativeint.neg $2) }
+ | PLUS INT { Const_int $2 }
+ | PLUS FLOAT { Const_float $2 }
+ | PLUS INT32 { Const_int32 $2 }
+ | PLUS INT64 { Const_int64 $2 }
+ | PLUS NATIVEINT { Const_nativeint $2 }
;
+
/* Identifiers and long identifiers */
ident:
(* *)
(***********************************************************************)
-(* $Id: parsetree.mli,v 1.45 2008/07/09 13:03:37 mauny Exp $ *)
+(* $Id: parsetree.mli 8906 2008-07-09 13:03:38Z mauny $ *)
(* Abstract syntax tree produced by parsing *)
(* *)
(***********************************************************************)
-(* $Id: printast.ml,v 1.34 2008/07/09 13:03:37 mauny Exp $ *)
+(* $Id: printast.ml 8906 2008-07-09 13:03:38Z mauny $ *)
open Asttypes;;
open Format;;
(* *)
(***********************************************************************)
-(* $Id: printast.mli,v 1.2 2000/03/06 22:11:39 weis Exp $ *)
+(* $Id: printast.mli 2908 2000-03-06 22:12:09Z weis $ *)
open Parsetree;;
open Format;;
(* *)
(***********************************************************************)
-(* $Id: syntaxerr.ml,v 1.9 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: syntaxerr.ml 8705 2007-12-04 13:38:58Z doligez $ *)
(* Auxiliary type for reporting syntax errors *)
(* *)
(***********************************************************************)
-(* $Id: syntaxerr.mli,v 1.4 2000/03/06 22:11:40 weis Exp $ *)
+(* $Id: syntaxerr.mli 2908 2000-03-06 22:12:09Z weis $ *)
(* Auxiliary type for reporting syntax errors *)
complex.cmi:
digest.cmi:
filename.cmi:
-format.cmi: buffer.cmi
+format.cmi: pervasives.cmi buffer.cmi
gc.cmi:
genlex.cmi: stream.cmi
hashtbl.cmi:
moreLabels.cmx: set.cmx map.cmx hashtbl.cmx moreLabels.cmi
nativeint.cmo: sys.cmi pervasives.cmi nativeint.cmi
nativeint.cmx: sys.cmx pervasives.cmx nativeint.cmi
-obj.cmo: marshal.cmi obj.cmi
-obj.cmx: marshal.cmx obj.cmi
+obj.cmo: marshal.cmi array.cmi obj.cmi
+obj.cmx: marshal.cmx array.cmx obj.cmi
oo.cmo: camlinternalOO.cmi oo.cmi
oo.cmx: camlinternalOO.cmx oo.cmi
parsing.cmo: obj.cmi lexing.cmi array.cmi parsing.cmi
pervasives.cmx: pervasives.cmi
printexc.cmo: printf.cmi obj.cmi buffer.cmi array.cmi printexc.cmi
printexc.cmx: printf.cmx obj.cmx buffer.cmx array.cmx printexc.cmi
-printf.cmo: string.cmi obj.cmi list.cmi char.cmi buffer.cmi array.cmi \
- printf.cmi
-printf.cmx: string.cmx obj.cmx list.cmx char.cmx buffer.cmx array.cmx \
- printf.cmi
+printf.cmo: string.cmi pervasives.cmi obj.cmi list.cmi char.cmi buffer.cmi \
+ array.cmi printf.cmi
+printf.cmx: string.cmx pervasives.cmx obj.cmx list.cmx char.cmx buffer.cmx \
+ array.cmx printf.cmi
queue.cmo: obj.cmi queue.cmi
queue.cmx: obj.cmx queue.cmi
random.cmo: string.cmi pervasives.cmi nativeint.cmi int64.cmi int32.cmi \
# #
#########################################################################
-# $Id: Compflags,v 1.5 2004/11/25 00:04:15 doligez Exp $
+# $Id: Compflags 6694 2004-11-25 00:06:06Z doligez $
case $1 in
pervasives.cm[iox]|pervasives.p.cmx) echo ' -nopervasives';;
# #
#########################################################################
-# $Id: Makefile,v 1.91 2008/07/24 05:18:31 frisch Exp $
+# $Id: Makefile 8929 2008-07-24 05:18:31Z frisch $
include Makefile.shared
# #
#########################################################################
-# $Id: Makefile.nt,v 1.46 2008/07/24 05:18:31 frisch Exp $
+# $Id: Makefile.nt 8929 2008-07-24 05:18:31Z frisch $
include Makefile.shared
# #
#########################################################################
-# $Id: Makefile.shared,v 1.2 2008/08/01 16:57:10 mauny Exp $
+# $Id: Makefile.shared 8974 2008-08-01 16:57:10Z mauny $
include ../config/Makefile
RUNTIME=../boot/ocamlrun
# This file lists all standard library modules. -*- Makefile -*-
# It is used in particular to know what to expunge in toplevels.
-# $Id: StdlibModules,v 1.4 2008/08/01 16:57:10 mauny Exp $
+# $Id: StdlibModules 8974 2008-08-01 16:57:10Z mauny $
STDLIB_MODULES=\
arg \
(* *)
(***********************************************************************)
-(* $Id: arg.ml,v 1.36 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: arg.ml 8768 2008-01-11 16:13:18Z doligez $ *)
type key = string
type doc = string
(* *)
(***********************************************************************)
-(* $Id: arg.mli,v 1.37 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: arg.mli 8768 2008-01-11 16:13:18Z doligez $ *)
(** Parsing of command line arguments.
(* *)
(***********************************************************************)
-(* $Id: array.ml,v 1.24 2005/04/11 16:43:19 doligez Exp $ *)
+(* $Id: array.ml 6834 2005-04-11 16:44:26Z doligez $ *)
(* Array operations *)
(* *)
(***********************************************************************)
-(* $Id: array.mli,v 1.40 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: array.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Array operations. *)
(* *)
(***********************************************************************)
-(* $Id: arrayLabels.ml,v 1.3 2001/12/07 13:40:49 xleroy Exp $ *)
+(* $Id: arrayLabels.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Module [ArrayLabels]: labelled Array module *)
(* *)
(***********************************************************************)
-(* $Id: arrayLabels.mli,v 1.12 2007/01/22 08:06:09 garrigue Exp $ *)
+(* $Id: arrayLabels.mli 7805 2007-01-22 08:06:09Z garrigue $ *)
(** Array operations. *)
(* *)
(***********************************************************************)
-(* $Id: buffer.ml,v 1.19 2008/09/09 08:50:39 weis Exp $ *)
+(* $Id: buffer.ml 9340 2009-09-16 15:52:46Z xclerc $ *)
(* Extensible buffers *)
end
;;
+let blit src srcoff dst dstoff len =
+ if len < 0 || srcoff < 0 || srcoff > src.position - len
+ || dstoff < 0 || dstoff > (String.length dst) - len
+ then invalid_arg "Buffer.blit"
+ else
+ String.blit src.buffer srcoff dst dstoff len
+;;
+
let nth b ofs =
if ofs < 0 || ofs >= b.position then
invalid_arg "Buffer.nth"
(* *)
(***********************************************************************)
-(* $Id: buffer.mli,v 1.21 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: buffer.mli 9340 2009-09-16 15:52:46Z xclerc $ *)
(** Extensible string buffers.
[len] bytes. May raise [Invalid_argument] if out of bounds request. The
buffer itself is unaffected. *)
+val blit : t -> int -> string -> int -> int -> unit
+(** [Buffer.blit src srcoff dst dstoff len] copies [len] characters from
+ the current contents of the buffer [src], starting at offset [srcoff]
+ to string [dst], starting at character [dstoff].
+
+ Raise [Invalid_argument] if [srcoff] and [len] do not designate a valid
+ substring of [src], or if [dstoff] and [len] do not designate a valid
+ substring of [dst]. *)
+
val nth : t -> int -> char
(** get the n-th character of the buffer. Raise [Invalid_argument] if
index out of bounds *)
(* *)
(***********************************************************************)
-(* $Id: callback.ml,v 1.5 2003/12/31 14:20:39 doligez Exp $ *)
+(* $Id: callback.ml 6044 2003-12-31 14:20:40Z doligez $ *)
(* Registering Caml values with the C runtime for later callbacks *)
(* *)
(***********************************************************************)
-(* $Id: callback.mli,v 1.6 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: callback.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Registering Caml values with the C runtime.
(* *)
(***********************************************************************)
-(* $Id: camlinternalLazy.ml,v 1.1 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: camlinternalLazy.ml 8974 2008-08-01 16:57:10Z mauny $ *)
(* Internals of forcing lazy values. *)
(* *)
(***********************************************************************)
-(* $Id: camlinternalLazy.mli,v 1.1 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: camlinternalLazy.mli 8974 2008-08-01 16:57:10Z mauny $ *)
(* Internals of forcing lazy values *)
(* *)
(***********************************************************************)
-(* $Id: camlinternalMod.ml,v 1.6 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: camlinternalMod.ml 8768 2008-01-11 16:13:18Z doligez $ *)
type shape =
| Function
(* *)
(***********************************************************************)
-(* $Id: camlinternalMod.mli,v 1.1 2004/08/12 12:57:00 xleroy Exp $ *)
+(* $Id: camlinternalMod.mli 6586 2004-08-12 12:57:00Z xleroy $ *)
type shape =
| Function
(* *)
(***********************************************************************)
-(* $Id: camlinternalOO.ml,v 1.16 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: camlinternalOO.ml 8768 2008-01-11 16:13:18Z doligez $ *)
open Obj
(* *)
(***********************************************************************)
-(* $Id: camlinternalOO.mli,v 1.10 2006/04/05 02:28:13 garrigue Exp $ *)
+(* $Id: camlinternalOO.mli 7372 2006-04-05 02:28:13Z garrigue $ *)
(** Run-time support for objects and classes.
All functions in this module are for system use only, not for the
(* *)
(***********************************************************************)
-(* $Id: char.ml,v 1.14 2007/04/16 11:06:51 weis Exp $ *)
+(* $Id: char.ml 8189 2007-04-16 11:06:51Z weis $ *)
(* Character operations *)
(* *)
(***********************************************************************)
-(* $Id: char.mli,v 1.17 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: char.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Character operations. *)
(* *)
(***********************************************************************)
-(* $Id: complex.ml,v 1.6 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: complex.ml 7164 2005-10-25 18:34:07Z doligez $ *)
(* Complex numbers *)
(* *)
(***********************************************************************)
-(* $Id: complex.mli,v 1.4 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: complex.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Complex numbers.
(* *)
(***********************************************************************)
-(* $Id: digest.ml,v 1.10 2003/12/31 14:20:39 doligez Exp $ *)
+(* $Id: digest.ml 6044 2003-12-31 14:20:40Z doligez $ *)
(* Message digest (MD5) *)
(* *)
(***********************************************************************)
-(* $Id: digest.mli,v 1.17 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: digest.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** MD5 message digest.
(* *)
(***********************************************************************)
-(* $Id: filename.ml,v 1.41.12.1 2008/11/20 18:36:52 doligez Exp $ *)
+(* $Id: filename.ml 9339 2009-09-16 14:24:11Z xclerc $ *)
let generic_quote quotequote s =
let l = String.length s in
let prng = Random.State.make_self_init ();;
-let temp_file_name prefix suffix =
+let temp_file_name temp_dir prefix suffix =
let rnd = (Random.State.bits prng) land 0xFFFFFF in
- concat temp_dir_name (Printf.sprintf "%s%06x%s" prefix rnd suffix)
+ concat temp_dir (Printf.sprintf "%s%06x%s" prefix rnd suffix)
;;
-let temp_file prefix suffix =
+let temp_file ?(temp_dir=temp_dir_name) prefix suffix =
let rec try_name counter =
- let name = temp_file_name prefix suffix in
+ let name = temp_file_name temp_dir prefix suffix in
try
close_desc(open_desc name [Open_wronly; Open_creat; Open_excl] 0o600);
name
if counter >= 1000 then raise e else try_name (counter + 1)
in try_name 0
-let open_temp_file ?(mode = [Open_text]) prefix suffix =
+let open_temp_file ?(mode = [Open_text]) ?(temp_dir=temp_dir_name) prefix suffix =
let rec try_name counter =
- let name = temp_file_name prefix suffix in
+ let name = temp_file_name temp_dir prefix suffix in
try
(name,
open_out_gen (Open_wronly::Open_creat::Open_excl::mode) 0o600 name)
(* *)
(***********************************************************************)
-(* $Id: filename.mli,v 1.35 2007/01/09 13:42:17 doligez Exp $ *)
+(* $Id: filename.mli 9339 2009-09-16 14:24:11Z xclerc $ *)
(** Operations on file names. *)
(** The conventional name for the parent of the current directory
(e.g. [..] in Unix). *)
+val dir_sep : string
+(** The directory separator (e.g. [/] in Unix). *)
+
val concat : string -> string -> string
(** [concat dir file] returns a file name that designates file
[file] in directory [dir]. *)
val dirname : string -> string
(** See {!Filename.basename}. *)
-val temp_file : string -> string -> string
+val temp_file : ?temp_dir: string -> string -> string -> string
(** [temp_file prefix suffix] returns the name of a
fresh temporary file in the temporary directory.
The base name of the temporary file is formed by concatenating
[prefix], then a suitably chosen integer number, then [suffix].
+ The optional argument [temp_dir] indicates the temporary directory
+ to use, defaulting to {!Filename.temp_dir_name}.
The temporary file is created empty, with permissions [0o600]
(readable and writable only by the file owner). The file is
guaranteed to be different from any other file that existed when
*)
val open_temp_file :
- ?mode: open_flag list -> string -> string -> string * out_channel
+ ?mode: open_flag list -> ?temp_dir: string -> string -> string -> string * out_channel
(** Same as {!Filename.temp_file}, but returns both the name of a fresh
temporary file, and an output channel opened (atomically) on
this file. This function is more secure than [temp_file]: there
(* *)
(***********************************************************************)
-(* $Id: format.ml,v 1.74.2.1 2009/04/29 18:33:31 weis Exp $ *)
+(* $Id: format.ml 9244 2009-04-29 18:33:31Z weis $ *)
(* A pretty-printing facility and definition of formatters for ``parallel''
(i.e. unrelated or independent) pretty-printing on multiple out channels. *)
(* *)
(***********************************************************************)
-(* $Id: format.mli,v 1.74 2006/11/17 08:37:07 weis Exp $ *)
+(* $Id: format.mli 9420 2009-11-19 10:17:41Z weis $ *)
(** Pretty printing.
the evaluation order of printing commands.
*)
-
(** {6 Boxes} *)
val open_box : int -> unit;;
val print_bool : bool -> unit;;
(** Prints a boolean in the current box. *)
-
(** {6 Break hints} *)
val print_space : unit -> unit;;
has just been split. Otherwise, ignore the next formatting
command. *)
-
(** {6 Margin} *)
val set_margin : int -> unit;;
val get_margin : unit -> int;;
(** Returns the position of the right margin. *)
-
(** {6 Maximum indentation limit} *)
val set_max_indent : int -> unit;;
val over_max_boxes : unit -> bool;;
(** Tests if the maximum number of boxes allowed have already been opened. *)
-
(** {6 Advanced formatting} *)
val open_hbox : unit -> unit;;
When a new line is printed in the box, [d] is added to the
current indentation. *)
-
(** {6 Tabulations} *)
val open_tbox : unit -> unit;;
(** Sets a tabulation mark at the current insertion point. *)
val print_tab : unit -> unit;;
-(** [print_tab ()] is equivalent to [print_tbreak (0,0)]. *)
-
+(** [print_tab ()] is equivalent to [print_tbreak 0 0]. *)
(** {6 Ellipsis} *)
val get_ellipsis_text : unit -> string;;
(** Return the text of the ellipsis. *)
-
-(** {6 Tags} *)
+(** {6 Semantics Tags} *)
type tag = string;;
-(** Tags are used to decorate printed entities for user's defined
- purposes, e.g. setting font and giving size indications for a
- display device, or marking delimitations of semantics entities
+(** {i Semantics tags} (or simply {e tags}) are used to decorate printed
+ entities for user's defined purposes, e.g. setting font and giving size
+ indications for a display device, or marking delimitation of semantics entities
(e.g. HTML or TeX elements or terminal escape sequences).
By default, those tags do not influence line breaking calculation:
material or richer decorated output depending on the treatment of
tags. By default, tags are not active, hence the output is not
decorated with tag information. Once [set_tags] is set to [true],
- the pretty printer engine honors tags and decorates the output
+ the pretty printer engine honours tags and decorates the output
accordingly.
When a tag has been opened (or closed), it is both and successively
val get_mark_tags : unit -> bool;;
(** Return the current status of tags printing and tags marking. *)
+(** {6 Redirecting the standard formatter output} *)
-(** {6 Redirecting formatter output} *)
-
-val set_formatter_out_channel : out_channel -> unit;;
+val set_formatter_out_channel : Pervasives.out_channel -> unit;;
(** Redirect the pretty-printer output to the given channel. *)
val set_formatter_output_functions :
(** [set_formatter_output_functions out flush] redirects the
pretty-printer output to the functions [out] and [flush].
- The [out] function performs the pretty-printer output. It is called
+ The [out] function performs the pretty-printer string output. It is called
with a string [s], a start position [p], and a number of characters
[n]; it is supposed to output characters [p] to [p + n - 1] of
[s]. The [flush] function is called whenever the pretty-printer is
- flushed using [print_flush] or [print_newline]. *)
+ flushed (via conversion [%!], pretty-printing indications [@?] or [@.],
+ or using low level function [print_flush] or [print_newline]). *)
val get_formatter_output_functions :
unit -> (string -> int -> int -> unit) * (unit -> unit);;
(** Return the current output functions of the pretty-printer. *)
-(** {6 Changing the meaning of printing tags} *)
+(** {6 Changing the meaning of standard formatter pretty printing} *)
+
+(** The [Format] module is versatile enough to let you completely redefine
+ the meaning of pretty printing: you may provide your own functions to define
+ how to handle indentation, line breaking, and even printing of all the
+ characters that have to be printed! *)
+
+val set_all_formatter_output_functions :
+ out:(string -> int -> int -> unit) ->
+ flush:(unit -> unit) ->
+ newline:(unit -> unit) ->
+ spaces:(int -> unit) ->
+ unit;;
+(** [set_all_formatter_output_functions out flush outnewline outspace]
+ redirects the pretty-printer output to the functions [out] and
+ [flush] as described in [set_formatter_output_functions]. In
+ addition, the pretty-printer function that outputs a newline is set
+ to the function [outnewline] and the function that outputs
+ indentation spaces is set to the function [outspace].
+
+ This way, you can change the meaning of indentation (which can be
+ something else than just printing space characters) and the
+ meaning of new lines opening (which can be connected to any other
+ action needed by the application at hand). The two functions
+ [outspace] and [outnewline] are normally connected to [out] and
+ [flush]: respective default values for [outspace] and [outnewline]
+ are [out (String.make n ' ') 0 n] and [out "\n" 0 1]. *)
+
+val get_all_formatter_output_functions :
+ unit ->
+ (string -> int -> int -> unit) *
+ (unit -> unit) *
+ (unit -> unit) *
+ (int -> unit);;
+(** Return the current output functions of the pretty-printer,
+ including line breaking and indentation functions. Useful to record the
+ current setting and restore it afterwards. *)
+
+(** {6 Changing the meaning of printing semantics tags} *)
type formatter_tag_functions = {
mark_open_tag : tag -> string;
unit -> formatter_tag_functions;;
(** Return the current tag functions of the pretty-printer. *)
-(** {6 Changing the meaning of pretty printing (indentation, line breaking,
- and printing material)} *)
-
-val set_all_formatter_output_functions :
- out:(string -> int -> int -> unit) ->
- flush:(unit -> unit) ->
- newline:(unit -> unit) ->
- spaces:(int -> unit) ->
- unit;;
-(** [set_all_formatter_output_functions out flush outnewline outspace]
- redirects the pretty-printer output to the functions [out] and
- [flush] as described in [set_formatter_output_functions]. In
- addition, the pretty-printer function that outputs a newline is set
- to the function [outnewline] and the function that outputs
- indentation spaces is set to the function [outspace].
-
- This way, you can change the meaning of indentation (which can be
- something else than just printing space characters) and the
- meaning of new lines opening (which can be connected to any other
- action needed by the application at hand). The two functions
- [outspace] and [outnewline] are normally connected to [out] and
- [flush]: respective default values for [outspace] and [outnewline]
- are [out (String.make n ' ') 0 n] and [out "\n" 0 1]. *)
-
-val get_all_formatter_output_functions :
- unit ->
- (string -> int -> int -> unit) *
- (unit -> unit) *
- (unit -> unit) *
- (int -> unit);;
-(** Return the current output functions of the pretty-printer,
- including line breaking and indentation functions. *)
-
-
(** {6 Multiple formatted output} *)
type formatter;;
(** Abstract data type corresponding to a pretty-printer (also called a
- formatter) and all its machinery.
- Defining new pretty-printers permits the output of
- material in parallel on several channels.
- Parameters of a pretty-printer are local to this pretty-printer:
- margin, maximum indentation limit, maximum number of boxes
- simultaneously opened, ellipsis, and so on, are specific to
- each pretty-printer and may be fixed independently.
- Given an output channel [oc], a new formatter writing to
- that channel is obtained by calling [formatter_of_out_channel oc].
- Alternatively, the [make_formatter] function allocates a new
- formatter with explicit output and flushing functions
- (convenient to output material to strings for instance). *)
+ formatter) and all its machinery.
+ Defining new pretty-printers permits the output of
+ material in parallel on several channels.
+ Parameters of a pretty-printer are local to this pretty-printer:
+ margin, maximum indentation limit, maximum number of boxes
+ simultaneously opened, ellipsis, and so on, are specific to
+ each pretty-printer and may be fixed independently.
+ Given an output channel [oc], a new formatter writing to
+ that channel is obtained by calling [formatter_of_out_channel oc].
+ Alternatively, the [make_formatter] function allocates a new
+ formatter with explicit output and flushing functions
+ (convenient to output material to strings for instance). *)
val formatter_of_out_channel : out_channel -> formatter;;
(** [formatter_of_out_channel oc] returns a new formatter that
(* *)
(***********************************************************************)
-(* $Id: gc.ml,v 1.20.24.1 2008/11/18 10:24:43 doligez Exp $ *)
+(* $Id: gc.ml 9131 2008-11-18 10:24:43Z doligez $ *)
type stat = {
minor_words : float;
(* *)
(***********************************************************************)
-(* $Id: gc.mli,v 1.44.4.1 2008/11/18 10:24:43 doligez Exp $ *)
+(* $Id: gc.mli 9131 2008-11-18 10:24:43Z doligez $ *)
(** Memory management control and statistics; finalised values. *)
(* *)
(***********************************************************************)
-(* $Id: genlex.ml,v 1.9 2002/04/18 07:27:42 garrigue Exp $ *)
+(* $Id: genlex.ml 4694 2002-04-18 07:27:47Z garrigue $ *)
type token =
Kwd of string
(* *)
(***********************************************************************)
-(* $Id: genlex.mli,v 1.9 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: genlex.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** A generic lexical analyzer.
(* *)
(***********************************************************************)
-(* $Id: hashtbl.ml,v 1.27 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: hashtbl.ml 7164 2005-10-25 18:34:07Z doligez $ *)
(* Hash tables *)
(* *)
(***********************************************************************)
-(* $Id: hashtbl.mli,v 1.39 2005/05/04 13:36:47 doligez Exp $ *)
+(* $Id: hashtbl.mli 6854 2005-05-04 13:36:47Z doligez $ *)
(** Hash tables and hash functions.
/* */
/***********************************************************************/
-/* $Id: header.c,v 1.17 2001/12/07 13:40:52 xleroy Exp $ */
+/* $Id: header.c 4144 2001-12-07 13:41:02Z xleroy $ */
/* The launcher for bytecode executables (if #! is not working) */
/* */
/***********************************************************************/
-/* $Id: headernt.c,v 1.20 2007/02/07 10:31:36 ertai Exp $ */
+/* $Id: headernt.c 7829 2007-02-07 10:31:36Z ertai $ */
#define STRICT
#define WIN32_LEAN_AND_MEAN
(* *)
(***********************************************************************)
-(* $Id: int32.ml,v 1.10 2007/01/30 09:34:36 xleroy Exp $ *)
+(* $Id: int32.ml 7818 2007-01-30 09:34:36Z xleroy $ *)
(* Module [Int32]: 32-bit integers *)
(* *)
(***********************************************************************)
-(* $Id: int32.mli,v 1.19 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: int32.mli 8768 2008-01-11 16:13:18Z doligez $ *)
(** 32-bit integers.
(* *)
(***********************************************************************)
-(* $Id: int64.ml,v 1.12 2007/01/30 09:34:36 xleroy Exp $ *)
+(* $Id: int64.ml 7818 2007-01-30 09:34:36Z xleroy $ *)
(* Module [Int64]: 64-bit integers *)
(* *)
(***********************************************************************)
-(* $Id: int64.mli,v 1.20 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: int64.mli 8768 2008-01-11 16:13:18Z doligez $ *)
(** 64-bit integers.
(* *)
(***********************************************************************)
-(* $Id: lazy.ml,v 1.13 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: lazy.ml 8974 2008-08-01 16:57:10Z mauny $ *)
(* Module [Lazy]: deferred computations *)
(* *)
(***********************************************************************)
-(* $Id: lazy.mli,v 1.11 2008/08/01 16:57:10 mauny Exp $ *)
+(* $Id: lazy.mli 8974 2008-08-01 16:57:10Z mauny $ *)
(** Deferred computations. *)
(* *)
(***********************************************************************)
-(* $Id: lexing.ml,v 1.25 2008/01/22 16:27:53 doligez Exp $ *)
+(* $Id: lexing.ml 8787 2008-01-22 16:27:53Z doligez $ *)
(* The run-time library for lexers generated by camllex *)
(* *)
(***********************************************************************)
-(* $Id: lexing.mli,v 1.33.4.1 2008/10/08 13:07:13 doligez Exp $ *)
+(* $Id: lexing.mli 9079 2008-10-08 13:09:39Z doligez $ *)
(** The run-time library for lexers generated by [ocamllex]. *)
(* *)
(***********************************************************************)
-(* $Id: list.ml,v 1.33 2006/09/11 12:18:00 doligez Exp $ *)
+(* $Id: list.ml 7597 2006-09-11 12:18:00Z doligez $ *)
(* List operations *)
(* *)
(***********************************************************************)
-(* $Id: list.mli,v 1.47 2006/09/11 12:18:00 doligez Exp $ *)
+(* $Id: list.mli 7597 2006-09-11 12:18:00Z doligez $ *)
(** List operations.
(* *)
(***********************************************************************)
-(* $Id: listLabels.ml,v 1.3 2001/12/07 13:40:54 xleroy Exp $ *)
+(* $Id: listLabels.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Module [ListLabels]: labelled List module *)
(* *)
(***********************************************************************)
-(* $Id: listLabels.mli,v 1.12 2007/01/22 08:06:09 garrigue Exp $ *)
+(* $Id: listLabels.mli 7805 2007-01-22 08:06:09Z garrigue $ *)
(** List operations.
(* *)
(***********************************************************************)
-(* $Id: map.ml,v 1.17 2005/08/13 20:59:37 doligez Exp $ *)
+(* $Id: map.ml 7019 2005-08-13 20:59:37Z doligez $ *)
module type OrderedType =
sig
(* *)
(***********************************************************************)
-(* $Id: map.mli,v 1.33.18.1 2009/03/21 16:35:48 xleroy Exp $ *)
+(* $Id: map.mli 9190 2009-03-21 16:35:48Z xleroy $ *)
(** Association tables over ordered types.
(* *)
(***********************************************************************)
-(* $Id: marshal.ml,v 1.9 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: marshal.ml 7164 2005-10-25 18:34:07Z doligez $ *)
type extern_flags =
No_sharing
(* *)
(***********************************************************************)
-(* $Id: marshal.mli,v 1.14 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: marshal.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Marshaling of data structures.
(* *)
(***********************************************************************)
-(* $Id: moreLabels.ml,v 1.2 2001/12/07 13:40:55 xleroy Exp $ *)
+(* $Id: moreLabels.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Module [MoreLabels]: meta-module for compatibility labelled libraries *)
(* *)
(***********************************************************************)
-(* $Id: moreLabels.mli,v 1.12 2004/04/23 10:01:34 xleroy Exp $ *)
+(* $Id: moreLabels.mli 6250 2004-04-23 10:01:34Z xleroy $ *)
(** Extra labeled libraries.
(* *)
(***********************************************************************)
-(* $Id: nativeint.ml,v 1.11 2007/01/30 09:34:36 xleroy Exp $ *)
+(* $Id: nativeint.ml 7818 2007-01-30 09:34:36Z xleroy $ *)
(* Module [Nativeint]: processor-native integers *)
(* *)
(***********************************************************************)
-(* $Id: nativeint.mli,v 1.18 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: nativeint.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Processor-native integers.
(* *)
(***********************************************************************)
-(* $Id: obj.ml,v 1.24 2008/01/29 13:11:15 doligez Exp $ *)
+(* $Id: obj.ml 9482 2009-12-22 13:32:12Z doligez $ *)
(* Operations on internal representations of values *)
external size : t -> int = "%obj_size"
external field : t -> int -> t = "%obj_field"
external set_field : t -> int -> t -> unit = "%obj_set_field"
+let double_field x i = Array.get (obj x : float array) i
+let set_double_field x i v = Array.set (obj x : float array) i v
external new_block : int -> int -> t = "caml_obj_block"
external dup : t -> t = "caml_obj_dup"
external truncate : t -> int -> unit = "caml_obj_truncate"
+external add_offset : t -> int -> t = "caml_obj_add_offset"
let marshal (obj : t) =
Marshal.to_string obj []
(* *)
(***********************************************************************)
-(* $Id: obj.mli,v 1.30 2008/01/29 13:11:15 doligez Exp $ *)
+(* $Id: obj.mli 9482 2009-12-22 13:32:12Z doligez $ *)
(** Operations on internal representations of values.
external tag : t -> int = "caml_obj_tag"
external set_tag : t -> int -> unit = "caml_obj_set_tag"
external size : t -> int = "%obj_size"
-external truncate : t -> int -> unit = "caml_obj_truncate"
external field : t -> int -> t = "%obj_field"
external set_field : t -> int -> t -> unit = "%obj_set_field"
+val double_field : t -> int -> float
+val set_double_field : t -> int -> float -> unit
external new_block : int -> int -> t = "caml_obj_block"
external dup : t -> t = "caml_obj_dup"
+external truncate : t -> int -> unit = "caml_obj_truncate"
+external add_offset : t -> int -> t = "caml_obj_add_offset"
val lazy_tag : int
val closure_tag : int
(* *)
(***********************************************************************)
-(* $Id: oo.ml,v 1.27 2004/05/26 11:10:52 garrigue Exp $ *)
+(* $Id: oo.ml 6331 2004-05-26 11:10:52Z garrigue $ *)
let copy = CamlinternalOO.copy
external id : < .. > -> int = "%field1"
(* *)
(***********************************************************************)
-(* $Id: oo.mli,v 1.28 2004/05/26 11:10:52 garrigue Exp $ *)
+(* $Id: oo.mli 6331 2004-05-26 11:10:52Z garrigue $ *)
(** Operations on objects *)
(* *)
(***********************************************************************)
-(* $Id: parsing.ml,v 1.19.2.1 2009/01/13 15:17:51 doligez Exp $ *)
+(* $Id: parsing.ml 9163 2009-01-13 15:17:51Z doligez $ *)
(* The parsing engine *)
(* *)
(***********************************************************************)
-(* $Id: parsing.mli,v 1.19 2008/08/06 09:38:21 xleroy Exp $ *)
+(* $Id: parsing.mli 8983 2008-08-06 09:38:25Z xleroy $ *)
(** The run-time library for parsers generated by [ocamlyacc]. *)
(* *)
(***********************************************************************)
-(* $Id: pervasives.ml,v 1.81 2006/11/17 08:34:01 weis Exp $ *)
+(* $Id: pervasives.ml 9412 2009-11-09 11:42:39Z weis $ *)
(* type 'a option = None | Some of 'a *)
external decr: int ref -> unit = "%decr"
(* Formats *)
-type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
+type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
('f, 'b, 'c, 'e, 'g, 'h) format6 ->
('a, 'b, 'c, 'd, 'g, 'h) format6) =
fun fmt1 fmt2 ->
- string_to_format (format_to_string fmt1 ^ format_to_string fmt2);;
+ string_to_format (format_to_string fmt1 ^ "%," ^ format_to_string fmt2)
+;;
let string_of_format fmt =
let s = format_to_string fmt in
(* *)
(***********************************************************************)
-(* $Id: pervasives.mli,v 1.113.2.2 2009/04/30 09:05:57 weis Exp $ *)
+(* $Id: pervasives.mli 9352 2009-09-24 09:17:01Z doligez $ *)
(** The initially opened module.
The ordering is compatible with [(=)]. As in the case
of [(=)], mutable structures are compared by contents.
Comparison between functional values raises [Invalid_argument].
- Comparison between cyclic structures does not terminate. *)
+ Comparison between cyclic structures may not terminate. *)
external compare : 'a -> 'a -> int = "%compare"
(** [compare x y] returns [0] if [x] is equal to [y],
the {!List.sort} and {!Array.sort} functions. *)
val min : 'a -> 'a -> 'a
-(** Return the smaller of the two arguments. *)
+(** Return the smaller of the two arguments.
+ The result is unspecified if one of the arguments contains
+ the float value [nan]. *)
val max : 'a -> 'a -> 'a
-(** Return the greater of the two arguments. *)
+(** Return the greater of the two arguments.
+ The result is unspecified if one of the arguments contains
+ the float value [nan]. *)
external ( == ) : 'a -> 'a -> bool = "%eq"
(** [e1 == e2] tests for physical equality of [e1] and [e2].
[neg_infinity] for [-1.0 /. 0.0], and [nan] (``not a number'')
for [0.0 /. 0.0]. These special numbers then propagate through
floating-point computations as expected: for instance,
- [1.0 /. infinity] is [0.0], and any operation with [nan] as
- argument returns [nan] as result.
+ [1.0 /. infinity] is [0.0], and any arithmetic operation with [nan]
+ as argument returns [nan] as result.
*)
external ( ~-. ) : float -> float = "%negfloat"
(* *)
(***********************************************************************)
-(* $Id: printexc.ml,v 1.19 2008/03/14 13:47:24 xleroy Exp $ *)
+(* $Id: printexc.ml 9335 2009-09-16 13:34:57Z xclerc $ *)
open Printf;;
+let printers = ref []
+
let locfmt = format_of_string "File \"%s\", line %d, characters %d-%d: %s";;
let field x i =
| Assert_failure(file, line, char) ->
sprintf locfmt file line char (char+6) "Assertion failed"
| x ->
- let x = Obj.repr x in
- let constructor = (Obj.magic(Obj.field (Obj.field x 0) 0) : string) in
- constructor ^ (fields x)
+ let rec conv = function
+ | hd :: tl ->
+ (match try hd x with _ -> None with
+ | Some s -> s
+ | None -> conv tl)
+ | [] ->
+ let x = Obj.repr x in
+ let constructor = (Obj.magic(Obj.field (Obj.field x 0) 0) : string) in
+ constructor ^ (fields x) in
+ conv !printers
;;
let print fct arg =
external record_backtrace: bool -> unit = "caml_record_backtrace"
external backtrace_status: unit -> bool = "caml_backtrace_status"
+let register_printer fn =
+ printers := fn :: !printers
(* *)
(***********************************************************************)
-(* $Id: printexc.mli,v 1.13 2008/03/14 13:47:24 xleroy Exp $ *)
+(* $Id: printexc.mli 9335 2009-09-16 13:34:57Z xclerc $ *)
(** Facilities for printing exceptions. *)
val backtrace_status: unit -> bool
(** [Printexc.backtrace_status()] returns [true] if exception
backtraces are currently recorded, [false] if not. *)
+
+val register_printer : (exn -> string option) -> unit
+(** [Printexc.register_printer fn] registers [fn] as an exception printer.
+ The printer should return [None] if it does not know how to convert
+ the passed exception, and [Some s] with [s] the resulting string if
+ it can convert the passed exception.
+ When converting an exception into a string, the printers will be invoked
+ in the reverse order of their registrations, until a printer returns
+ a [Some s] value (if no such printer exists, the runtime will use a
+ generic printer). *)
(* *)
(***********************************************************************)
-(* $Id: printf.ml,v 1.58.2.2 2009/04/29 19:02:05 weis Exp $ *)
+(* $Id: printf.ml 9412 2009-11-09 11:42:39Z weis $ *)
external format_float: string -> float -> string
= "caml_format_float"
let add_int_index i idx = index_of_int (i + int_of_index idx);;
let succ_index = add_int_index 1;;
- (* Litteral position are one-based (hence pred p instead of p). *)
- let index_of_litteral_position p = index_of_int (pred p);;
+ (* Literal position are one-based (hence pred p instead of p). *)
+ let index_of_literal_position p = index_of_int (pred p);;
external length : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int
= "%string_length"
let skip_positional_spec start =
match Sformat.unsafe_get fmt start with
| '0'..'9' ->
- let rec skip_int_litteral i =
+ let rec skip_int_literal i =
match Sformat.unsafe_get fmt i with
- | '0'..'9' -> skip_int_litteral (succ i)
+ | '0'..'9' -> skip_int_literal (succ i)
| '$' -> succ i
| _ -> start in
- skip_int_litteral (succ start)
+ skip_int_literal (succ start)
| _ -> start in
let start = skip_positional_spec (succ start) in
let b = Buffer.create (stop - start + 10) in
let i = skip_positional_spec (succ i) in
fill_format i t
| ('*', []) ->
- assert false (* should not happen *)
+ assert false (* Should not happen since this is ill-typed. *)
| (c, _) ->
Buffer.add_char b c;
fill_format (succ i) widths in
let sfmt = extract_format fmt start stop widths in
match conv with
| 'F' ->
- sfmt.[String.length sfmt - 1] <- 'f';
+ sfmt.[String.length sfmt - 1] <- 'g';
sfmt
| _ -> sfmt
;;
(* Returns the position of the next character following the meta format
string, starting from position [i], inside a given format [fmt].
According to the character [conv], the meta format string is
- enclosed by the delimitors %{ and %} (when [conv = '{']) or %( and
+ enclosed by the delimiters %{ and %} (when [conv = '{']) or %( and
%) (when [conv = '(']). Hence, [sub_format] returns the index of
the character following the [')'] or ['}'] that ends the meta format,
according to the character [conv]. *)
and scan_conv skip i =
if i > lim then incomplete_format fmt else
match Sformat.unsafe_get fmt i with
- | '%' | '!' -> succ i
+ | '%' | '!' | ',' -> succ i
| 's' | 'S' | '[' -> add_conv skip i 's'
| 'c' | 'C' -> add_conv skip i 'c'
| 'd' | 'i' |'o' | 'u' | 'x' | 'X' | 'N' -> add_conv skip i 'i'
let count_arguments_of_format fmt =
let ac = ac_of_format fmt in
+ (* For printing only regular arguments have to be counted. *)
ac.ac_rglr
;;
Unfortunately, the type of a parameter specified via a [*$] positional
specification should be the type of the corresponding argument to
- [printf], hence this sould be the type of the $n$-th argument to [printf]
+ [printf], hence this should be the type of the $n$-th argument to [printf]
with $n$ being the {\em value} of the integer argument defining [*]; we
clearly cannot statically guess the value of this parameter in the general
case. Put it another way: this means type dependency, which is completely
let scan_positional_spec fmt got_spec n i =
match Sformat.unsafe_get fmt i with
| '0'..'9' as d ->
- let rec get_int_litteral accu j =
+ let rec get_int_literal accu j =
match Sformat.unsafe_get fmt j with
| '0'..'9' as d ->
- get_int_litteral (10 * accu + (int_of_char d - 48)) (succ j)
+ get_int_literal (10 * accu + (int_of_char d - 48)) (succ j)
| '$' ->
if accu = 0 then
failwith "printf: bad positional specification (0)." else
- got_spec (Spec_index (Sformat.index_of_litteral_position accu)) (succ j)
+ got_spec (Spec_index (Sformat.index_of_literal_position accu)) (succ j)
(* Not a positional specification: tell so the caller, and go back to
scanning the format from the original [i] position we were called at
first. *)
| _ -> got_spec Spec_none i in
- get_int_litteral (int_of_char d - 48) (succ i)
+ get_int_literal (int_of_char d - 48) (succ i)
(* No positional specification: tell so the caller, and go back to scanning
the format from the original [i] position. *)
| _ -> got_spec Spec_none i
| Spec_index p -> p
;;
-(* Format a float argument as a valid Caml lexem. *)
-let format_float_lexem =
- let valid_float_lexem sfmt s =
+(* Format a float argument as a valid Caml lexeme. *)
+let format_float_lexeme =
+ let valid_float_lexeme sfmt s =
let l = String.length s in
if l = 0 then "nan" else
- let add_dot sfmt s =
- if s.[0] = ' ' || s.[0] = '+' || s.[0] = '0'
- then String.sub s 1 (l - 1) ^ "."
- else String.sub s 0 (l - 1) ^ "." in
+ let add_dot sfmt s = s ^ "." in
let rec loop i =
if i >= l then add_dot sfmt s else
(fun sfmt x ->
let s = format_float sfmt x in
match classify_float x with
- | FP_normal | FP_subnormal | FP_zero -> valid_float_lexem sfmt s
+ | FP_normal | FP_subnormal | FP_zero -> valid_float_lexeme sfmt s
| FP_nan | FP_infinite -> s)
;;
(* Note: here, rather than test explicitly against [Sformat.length fmt]
to detect the end of the format, we use [Sformat.unsafe_get] and
- rely on the fact that we'll get a "nul" character if we access
- one past the end of the string. These "nul" characters are then
+ rely on the fact that we'll get a "null" character if we access
+ one past the end of the string. These "null" characters are then
caught by the [_ -> bad_conversion] clauses below.
Don't do this at home, kids. *)
let scan_format fmt args n pos cont_s cont_a cont_t cont_f cont_m =
let (x : string) = get_arg spec n in
let x = if conv = 's' then x else "\"" ^ String.escaped x ^ "\"" in
let s =
- (* optimize for common case %s *)
+ (* Optimize for common case %s *)
if i = succ pos then x else
format_string (extract_format fmt pos i widths) x in
cont_s (next_index spec n) s (succ i)
| 'F' as conv ->
let (x : float) = get_arg spec n in
let s =
- format_float_lexem (extract_format_float conv fmt pos i widths) x in
+ if widths = [] then Pervasives.string_of_float x else
+ format_float_lexeme (extract_format_float conv fmt pos i widths) x in
cont_s (next_index spec n) s (succ i)
| 'B' | 'b' ->
let (x : bool) = get_arg spec n in
let s = format_int (extract_format_int 'n' fmt pos i widths) x in
cont_s (next_index spec n) s (succ i)
end
+ | ',' -> cont_s n "" (succ i)
| '!' -> cont_f n (succ i)
| '{' | '(' as conv (* ')' '}' *) ->
let (xf : ('a, 'b, 'c, 'd, 'e, 'f) format6) = get_arg spec n in
(* *)
(***********************************************************************)
-(* $Id: printf.mli,v 1.57 2008/09/27 20:50:01 weis Exp $ *)
+(* $Id: printf.mli 9421 2009-11-19 10:21:42Z weis $ *)
(** Formatted output functions. *)
type as [fmt].
- [!]: take no argument and flush the output.
- [%]: take no argument and output one [%] character.
+ - [,]: the no-op delimiter for conversion specifications.
The optional [flags] are:
- [-]: left-justify the output (default is right justification).
(* *)
(***********************************************************************)
-(* $Id: queue.ml,v 1.10 2005/08/26 12:10:47 doligez Exp $ *)
+(* $Id: queue.ml 7032 2005-08-26 12:10:47Z doligez $ *)
exception Empty
(* *)
(***********************************************************************)
-(* $Id: queue.mli,v 1.16 2002/06/27 08:48:26 xleroy Exp $ *)
+(* $Id: queue.mli 4956 2002-06-27 08:48:26Z xleroy $ *)
(** First-in first-out queues.
(* *)
(***********************************************************************)
-(* $Id: random.ml,v 1.22 2003/12/16 18:09:43 doligez Exp $ *)
+(* $Id: random.ml 6023 2003-12-16 18:09:44Z doligez $ *)
(* "Linear feedback shift register" pseudo-random number generator. *)
(* References: Robert Sedgewick, "Algorithms", Addison-Wesley *)
(* *)
(***********************************************************************)
-(* $Id: random.mli,v 1.17 2007/02/09 13:31:15 doligez Exp $ *)
+(* $Id: random.mli 7849 2007-02-09 13:31:15Z doligez $ *)
(** Pseudo-random number generators (PRNG). *)
(* *)
(***********************************************************************)
-(* $Id: scanf.ml,v 1.80.2.2 2009/04/29 18:27:37 weis Exp $ *)
+(* $Id: scanf.ml 9417 2009-11-19 09:46:46Z weis $ *)
(* The run-time library for scanners. *)
input buffer has reached an end of file, the function raises exception
[End_of_file]. *)
-val store_char : scanbuf -> char -> int -> int;;
-(* [Scanning.store_char ib c lim] adds [c] to the token buffer
+val store_char : int -> scanbuf -> char -> int;;
+(* [Scanning.store_char lim ib c] adds [c] to the token buffer
of the scanning buffer. It also advances the scanning buffer for one
character and returns [lim - 1], indicating the new limit
for the length of the current token. *)
-val skip_char : scanbuf -> int -> int;;
-(* [Scanning.skip_char ib lim] ignores the current character. *)
+val skip_char : int -> scanbuf -> int;;
+(* [Scanning.skip_char lim ib] ignores the current character. *)
-val ignore_char : scanbuf -> int -> int;;
+val ignore_char : int -> scanbuf -> int;;
(* [Scanning.ignore_char ib lim] ignores the current character and
decrements the limit. *)
let token_count ib = ib.token_count;;
-let skip_char ib max =
+let skip_char max ib =
invalidate_current_char ib;
max
;;
-let ignore_char ib max = skip_char ib (max - 1);;
+let ignore_char max ib = skip_char (max - 1) ib;;
-let store_char ib c max =
+let store_char max ib c =
Buffer.add_char ib.tokbuf c;
- ignore_char ib max
+ ignore_char max ib
;;
let default_token_buffer_size = 1024;;
(Sformat.to_string fmt))
;;
-let bad_float () = bad_input "no dot or exponent part found in
-float token"
+let bad_float () =
+ bad_input "no dot or exponent part found in float token"
;;
let character_mismatch_err c ci =
In this case, the character c has been explicitely specified in the
format as being mandatory in the input; hence we should fail with
End_of_file in case of end_of_input.
- That's why we use checked_peek_char here. *)
-let check_char ib c =
+ That's why we use checked_peek_char here.
+ We are also careful to treat "\r\n" in the input as a end of line marker: it
+ always matches a '\n' specification in the input format string.
+ *)
+let rec check_char ib c =
let ci = Scanning.checked_peek_char ib in
- if ci = c then Scanning.invalidate_current_char ib else
- character_mismatch c ci
+ if ci = c then Scanning.invalidate_current_char ib else begin
+ match ci with
+ | '\r' when c = '\n' ->
+ Scanning.invalidate_current_char ib; check_char ib '\n'
+ | _ -> character_mismatch c ci
+ end
;;
(* Checks that the current char is indeed one of the stopper characters,
if Scanning.eof ib then max else
match c with
| '0' .. '9' as c ->
- let max = Scanning.store_char ib c max in
+ let max = Scanning.store_char max ib c in
scan_decimal_digits max ib
| '_' ->
- let max = Scanning.ignore_char ib max in
+ let max = Scanning.ignore_char max ib in
scan_decimal_digits max ib
| _ -> max
;;
let c = Scanning.checked_peek_char ib in
match c with
| '0' .. '9' ->
- let max = Scanning.store_char ib c max in
+ let max = Scanning.store_char max ib c in
scan_decimal_digits max ib
| c -> bad_input_char c
;;
if Scanning.eof ib then max else
match c with
| c when digitp c ->
- let max = Scanning.store_char ib c max in
+ let max = Scanning.store_char max ib c in
scan_digits max
| '_' ->
- let max = Scanning.ignore_char ib max in
+ let max = Scanning.ignore_char max ib in
scan_digits max
| _ -> max in
let c = Scanning.checked_peek_char ib in
if digitp c then
- let max = Scanning.store_char ib c max in
+ let max = Scanning.store_char max ib c in
scan_digits max
else bad_input_char c
;;
let scan_sign max ib =
let c = Scanning.checked_peek_char ib in
match c with
- | '+' -> Scanning.store_char ib c max
- | '-' -> Scanning.store_char ib c max
+ | '+' -> Scanning.store_char max ib c
+ | '-' -> Scanning.store_char max ib c
| c -> max
;;
let scan_unsigned_int max ib =
match Scanning.checked_peek_char ib with
| '0' as c ->
- let max = Scanning.store_char ib c max in
+ let max = Scanning.store_char max ib c in
if max = 0 then max else
let c = Scanning.peek_char ib in
if Scanning.eof ib then max else
begin match c with
- | 'x' | 'X' -> scan_hexadecimal_int (Scanning.store_char ib c max) ib
- | 'o' -> scan_octal_int (Scanning.store_char ib c max) ib
- | 'b' -> scan_binary_int (Scanning.store_char ib c max) ib
+ | 'x' | 'X' -> scan_hexadecimal_int (Scanning.store_char max ib c) ib
+ | 'o' -> scan_octal_int (Scanning.store_char max ib c) ib
+ | 'b' -> scan_binary_int (Scanning.store_char max ib c) ib
| c -> scan_decimal_digits max ib end
| c -> scan_unsigned_decimal_int max ib
;;
if Scanning.eof ib then max else
match c with
| '0' .. '9' as c ->
- scan_decimal_digits (Scanning.store_char ib c max) ib
+ scan_decimal_digits (Scanning.store_char max ib c) ib
| _ -> max
;;
if Scanning.eof ib then max else
match c with
| 'e' | 'E' as c ->
- scan_optionally_signed_decimal_int (Scanning.store_char ib c max) ib
+ scan_optionally_signed_decimal_int (Scanning.store_char max ib c) ib
| _ -> max
;;
if Scanning.eof ib then max else
match c with
| '.' ->
- let max = Scanning.store_char ib c max in
+ let max = Scanning.store_char max ib c in
let max = scan_frac_part max ib in
scan_exp_part max ib
| c -> scan_exp_part max ib
if Scanning.eof ib then bad_float () else
match c with
| '.' ->
- let max = Scanning.store_char ib c max in
+ let max = Scanning.store_char max ib c in
let max = scan_frac_part max ib in
scan_exp_part max ib
| 'e' | 'E' ->
if stp = [] then
match c with
| ' ' | '\t' | '\n' | '\r' -> max
- | c -> loop (Scanning.store_char ib c max) else
- if List.memq c stp then Scanning.skip_char ib max else
- loop (Scanning.store_char ib c max) in
+ | c -> loop (Scanning.store_char max ib c) else
+ if List.memq c stp then Scanning.skip_char max ib else
+ loop (Scanning.store_char max ib c) in
loop max
;;
(* Scan a char: peek strictly one character in the input, whatsoever. *)
let scan_char max ib =
- Scanning.store_char ib (Scanning.checked_peek_char ib) max
+ Scanning.store_char max ib (Scanning.checked_peek_char ib)
;;
let char_for_backslash = function
(* The integer value corresponding to the facial value of a valid
decimal digit character. *)
-let int_value_of_char c = int_of_char c - 48;;
+let decimal_value_of_char c = int_of_char c - int_of_char '0';;
let char_for_decimal_code c0 c1 c2 =
let c =
- 100 * int_value_of_char c0 +
- 10 * int_value_of_char c1 +
- int_value_of_char c2 in
+ 100 * decimal_value_of_char c0 +
+ 10 * decimal_value_of_char c1 +
+ decimal_value_of_char c2 in
if c < 0 || c > 255
then bad_input (Printf.sprintf "bad char \\%c%c%c" c0 c1 c2)
else char_of_int c
;;
+(* The integer value corresponding to the facial value of a valid
+ hexadecimal digit character. *)
+let hexadecimal_value_of_char c =
+ let d = int_of_char c in
+ (* Could also be:
+ if d <= int_of_char '9' then d - int_of_char '0' else
+ if d <= int_of_char 'F' then 10 + d - int_of_char 'A' else
+ if d <= int_of_char 'f' then 10 + d - int_of_char 'a' else assert false
+ *)
+ if d >= int_of_char 'a' then
+ d - 87 (* 10 + int_of_char c - int_of_char 'a' *) else
+ if d >= int_of_char 'A' then
+ d - 55 (* 10 + int_of_char c - int_of_char 'A' *) else
+ d - int_of_char '0'
+;;
+
+let char_for_hexadecimal_code c1 c2 =
+ let c =
+ 16 * hexadecimal_value_of_char c1 +
+ hexadecimal_value_of_char c2 in
+ if c < 0 || c > 255
+ then bad_input (Printf.sprintf "bad char \\%c%c" c1 c2)
+ else char_of_int c
+;;
+
(* Called when encountering '\\' as starter of a char.
Stops before the corresponding '\''. *)
-let scan_backslash_char max ib =
- if max = 0 then bad_input "a char" else
+let check_next_char message max ib =
+ if max = 0 then bad_input message else
let c = Scanning.peek_char ib in
- if Scanning.eof ib then bad_input "a char" else
- match c with
- | '\\' | '\'' | '"' | 'n' | 't' | 'b' | 'r' (* '"' helping Emacs *) ->
- Scanning.store_char ib (char_for_backslash c) max
+ if Scanning.eof ib then bad_input message else c
+;;
+
+let check_next_char_for_char = check_next_char "a char";;
+let check_next_char_for_string = check_next_char "a string";;
+
+let scan_backslash_char max ib =
+ match check_next_char_for_char max ib with
+ | '\\' | '\'' | '\"' | 'n' | 't' | 'b' | 'r' as c ->
+ Scanning.store_char max ib (char_for_backslash c)
| '0' .. '9' as c ->
let get_digit () =
let c = Scanning.next_char ib in
let c0 = c in
let c1 = get_digit () in
let c2 = get_digit () in
- Scanning.store_char ib (char_for_decimal_code c0 c1 c2) (max - 2)
+ Scanning.store_char (max - 2) ib (char_for_decimal_code c0 c1 c2)
+ | 'x' ->
+ let get_digit () =
+ let c = Scanning.next_char ib in
+ match c with
+ | '0' .. '9' | 'A' .. 'F' | 'a' .. 'f' as c -> c
+ | c -> bad_input_escape c in
+ let c1 = get_digit () in
+ let c2 = get_digit () in
+ Scanning.store_char (max - 2) ib (char_for_hexadecimal_code c1 c2)
| c -> bad_input_char c
;;
let scan_Char max ib =
- let rec loop s max =
- if max = 0 then bad_input "a char" else
- let c = Scanning.checked_peek_char ib in
- if Scanning.eof ib then bad_input "a char" else
- match c, s with
- (* Looking for the '\'' at the beginning of the delimited char. *)
- | '\'', 3 -> loop 2 (Scanning.ignore_char ib max)
- (* Looking for the '\'' at the end of the delimited char. *)
- | '\'', 1 -> Scanning.ignore_char ib max
- (* Any other char at the beginning or end of the delimited char should be
- '\''. *)
- | c, (3 | 1) -> character_mismatch '\'' c
- (* Found a '\\': check and read this escape char. *)
- | '\\', 2 -> loop 1 (scan_backslash_char (Scanning.ignore_char ib max) ib)
- (* The regular case, remember the char, then look for the terminal '\\'. *)
- | c, 2 -> loop 1 (Scanning.store_char ib c max)
- (* Any other case is an error, *)
- | c, _ -> bad_input_char c in
- loop 3 max
+
+ let rec find_start max =
+ match check_next_char_for_char max ib with
+ | '\'' -> find_char (Scanning.ignore_char max ib)
+ | c -> character_mismatch '\'' c
+
+ and find_char max =
+ match check_next_char_for_char max ib with
+ | '\\' -> find_stop (scan_backslash_char (Scanning.ignore_char max ib) ib)
+ | c -> find_stop (Scanning.store_char max ib c)
+
+ and find_stop max =
+ match check_next_char_for_char max ib with
+ | '\'' -> Scanning.ignore_char max ib
+ | c -> character_mismatch '\'' c in
+
+ find_start max
;;
let scan_String max ib =
- let rec loop s max =
- if max = 0 then bad_input "a string" else
- let c = Scanning.checked_peek_char ib in
- if Scanning.eof ib then bad_input "a string" else
- match c, s with
- | '"', true (* '"' helping Emacs *) ->
- loop false (Scanning.ignore_char ib max)
- | '"', false (* '"' helping Emacs *) ->
- Scanning.ignore_char ib max
- | '\\', false ->
- skip_spaces true (Scanning.ignore_char ib max)
- | c, false -> loop false (Scanning.store_char ib c max)
- | c, _ -> bad_input_char c
- and skip_spaces s max =
- if max = 0 then bad_input "a string" else
- let c = Scanning.checked_peek_char ib in
- if Scanning.eof ib then bad_input "a string" else
- match c, s with
- | '\n', true
- | ' ', false ->
- skip_spaces false (Scanning.ignore_char ib max)
- | c, false -> loop false max
- | _, _ -> loop false (scan_backslash_char (max - 1) ib) in
- loop true max
+
+ let rec find_start max =
+ match check_next_char_for_string max ib with
+ | '\"' -> find_stop (Scanning.ignore_char max ib)
+ | c -> character_mismatch '\"' c
+
+ and find_stop max =
+ match check_next_char_for_string max ib with
+ | '\"' -> Scanning.ignore_char max ib
+ | '\\' -> scan_backslash (Scanning.ignore_char max ib)
+ | c -> find_stop (Scanning.store_char max ib c)
+
+ and scan_backslash max =
+ match check_next_char_for_string max ib with
+ | '\r' -> skip_newline (Scanning.ignore_char max ib)
+ | '\n' -> skip_spaces (Scanning.ignore_char max ib)
+ | c -> find_stop (scan_backslash_char max ib)
+
+ and skip_newline max =
+ match check_next_char_for_string max ib with
+ | '\n' -> skip_spaces (Scanning.ignore_char max ib)
+ | _ -> find_stop (Scanning.store_char max ib '\r')
+
+ and skip_spaces max =
+ match check_next_char_for_string max ib with
+ | ' ' -> skip_spaces (Scanning.ignore_char max ib)
+ | _ -> find_stop max in
+
+ find_start max
;;
let scan_bool max ib =
let c = Scanning.peek_char ib in
if Scanning.eof ib then max else
if c == cp1
- then loop_pos1 cp1 (Scanning.store_char ib c max)
+ then loop_pos1 cp1 (Scanning.store_char max ib c)
else max
and loop_pos2 cp1 cp2 max =
if max = 0 then max else
let c = Scanning.peek_char ib in
if Scanning.eof ib then max else
if c == cp1 || c == cp2
- then loop_pos2 cp1 cp2 (Scanning.store_char ib c max)
+ then loop_pos2 cp1 cp2 (Scanning.store_char max ib c)
else max
and loop_pos3 cp1 cp2 cp3 max =
if max = 0 then max else
let c = Scanning.peek_char ib in
if Scanning.eof ib then max else
if c == cp1 || c == cp2 || c == cp3
- then loop_pos3 cp1 cp2 cp3 (Scanning.store_char ib c max)
+ then loop_pos3 cp1 cp2 cp3 (Scanning.store_char max ib c)
else max
and loop_neg1 cp1 max =
if max = 0 then max else
let c = Scanning.peek_char ib in
if Scanning.eof ib then max else
if c != cp1
- then loop_neg1 cp1 (Scanning.store_char ib c max)
+ then loop_neg1 cp1 (Scanning.store_char max ib c)
else max
and loop_neg2 cp1 cp2 max =
if max = 0 then max else
let c = Scanning.peek_char ib in
if Scanning.eof ib then max else
if c != cp1 && c != cp2
- then loop_neg2 cp1 cp2 (Scanning.store_char ib c max)
+ then loop_neg2 cp1 cp2 (Scanning.store_char max ib c)
else max
and loop_neg3 cp1 cp2 cp3 max =
if max = 0 then max else
let c = Scanning.peek_char ib in
if Scanning.eof ib then max else
if c != cp1 && c != cp2 && c != cp3
- then loop_neg3 cp1 cp2 cp3 (Scanning.store_char ib c max)
+ then loop_neg3 cp1 cp2 cp3 (Scanning.store_char max ib c)
else max
and loop setp max =
if max = 0 then max else
let c = Scanning.peek_char ib in
if Scanning.eof ib then max else
if setp c == 1
- then loop setp (Scanning.store_char ib c max)
+ then loop setp (Scanning.store_char max ib c)
else max in
let max =
if ir > limr then assert false else
let token = Obj.magic rv.(ir) ib in
scan_fmt (succ ir) (stack f token) (succ i)
- | 'l' | 'n' | 'L' as conv ->
+ | 'l' | 'n' | 'L' as conv0 ->
let i = succ i in
- if i > lim then scan_fmt ir (stack f (get_count conv ib)) i else begin
+ if i > lim then scan_fmt ir (stack f (get_count conv0 ib)) i else begin
match Sformat.get fmt i with
(* This is in fact an integer conversion (e.g. %ld, %ni, or %Lo). *)
- | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' as conv ->
- let _x = scan_int_conv conv max ib in
+ | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' as conv1 ->
+ let _x = scan_int_conv conv1 max ib in
(* Look back to the character that triggered the integer conversion
- (this character is either 'l', 'n' or 'L'), to find the
+ (this character is either 'l', 'n' or 'L') to find the
conversion to apply to the integer token read. *)
- begin match Sformat.get fmt (i - 1) with
- | 'l' -> scan_fmt ir (stack f (token_int32 conv ib)) (succ i)
- | 'n' -> scan_fmt ir (stack f (token_nativeint conv ib)) (succ i)
- | _ -> scan_fmt ir (stack f (token_int64 conv ib)) (succ i) end
+ begin match conv0 with
+ | 'l' -> scan_fmt ir (stack f (token_int32 conv1 ib)) (succ i)
+ | 'n' -> scan_fmt ir (stack f (token_nativeint conv1 ib)) (succ i)
+ | _ -> scan_fmt ir (stack f (token_int64 conv1 ib)) (succ i) end
(* This is not an integer conversion, but a regular %l, %n or %L. *)
- | _ -> scan_fmt ir (stack f (get_count conv ib)) i end
+ | _ -> scan_fmt ir (stack f (get_count conv0 ib)) i end
| '!' ->
if Scanning.end_of_input ib then scan_fmt ir f (succ i)
else bad_input "end of input not found"
+ | ',' ->
+ scan_fmt ir f (succ i)
| '_' ->
if i > lim then incomplete_format fmt else
scan_conversion true max ir f (succ i)
if i > lim then accu, i else
match Sformat.get fmt i with
| '0' .. '9' as c ->
- let accu = 10 * accu + int_value_of_char c in
+ let accu = 10 * accu + decimal_value_of_char c in
read_width accu (succ i)
| _ -> accu, i in
- let max, i = read_width (int_value_of_char conv) (succ i) in
+ let max, i = read_width (decimal_value_of_char conv) (succ i) in
if i > lim then incomplete_format fmt else begin
match Sformat.get fmt i with
| '.' ->
(* *)
(***********************************************************************)
-(* $Id: scanf.mli,v 1.79 2008/09/27 20:45:05 weis Exp $ *)
+(* $Id: scanf.mli 9421 2009-11-19 10:21:42Z weis $ *)
(** Formatted input functions. *)
However, it is also largely different, simpler, and yet more powerful:
the formatted input functions are higher-order functionals and the
parameter passing mechanism is just the regular function application not
- the variable assigment based mechanism which is typical for formatted
+ the variable assignment based mechanism which is typical for formatted
input in imperative languages; the Caml format strings also feature
useful additions to easily define complex tokens; as expected within a
functional programming language, the formatted input functions also
(** {7 The space character in format strings} *)
(** As mentioned above, a plain character in the format string is just
- matched with the characters of the input; however, one character is a
- special exception to this simple rule: the space character (ASCII code
- 32) does not match a single space character, but any amount of
+ matched with the next character of the input; however, two characters are
+ special exceptions to this rule: the space character ([' '] or ASCII code
+ 32) and the line feed character (['\n'] or ASCII code 10).
+ A space does not match a single space character, but any amount of
``whitespace'' in the input. More precisely, a space inside the format
string matches {e any number} of tab, space, line feed and carriage
- return characters.
+ return characters. Similarly, a line feed character in the format string
+ matches either a single line feed or a carriage return followed by a line
+ feed.
Matching {e any} amount of whitespace, a space in the format string
also matches no amount of whitespace at all; hence, the call [bscanf ib
- "Price = %d $" (fun p -> p)] succeds and returns [1] when reading an
+ "Price = %d $" (fun p -> p)] succeeds and returns [1] when reading an
input with various whitespace in it, such as [Price = 1 $],
[Price = 1 $], or even [Price=1$]. *)
- [N] or [L]: returns the number of tokens read so far.
- [!]: matches the end of input condition.
- [%]: matches one [%] character in the input.
+ - [,]: the no-op delimiter for conversion specifications.
Following the [%] character that introduces a conversion, there may be
the special flag [_]: the conversion that follows occurs as usual,
Notes:
- - as mentioned above, a [%s] convertion always succeeds, even if there is
+ - as mentioned above, a [%s] conversion always succeeds, even if there is
nothing to read in the input: it simply returns [""].
- in addition to the relevant digits, ['_'] characters may appear
[End_of_file]: if the end of input is reached the conversion succeeds and
simply returns the characters read so far, or [""] if none were read. *)
-(** {6 Specialized formatted input functions} *)
+(** {6 Specialised formatted input functions} *)
val fscanf : in_channel -> ('a, 'b, 'c, 'd) scanner;;
(** Same as {!Scanf.bscanf}, but reads from the given channel.
primitives on the channel (reading characters, seeking the reading
position, and so on).
- As a consequence, never mixt direct low level reading and high level
+ As a consequence, never mix direct low level reading and high level
scanning from the same input channel. *)
val sscanf : string -> ('a, 'b, 'c, 'd) scanner;;
val bscanf_format :
Scanning.scanbuf -> ('a, 'b, 'c, 'd, 'e, 'f) format6 ->
(('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g) -> 'g;;
-(** [bscanf_format ib fmt f] reads a format string token from the scannning
+(** [bscanf_format ib fmt f] reads a format string token from the scanning
buffer [ib], according to the given format string [fmt], and applies [f] to
the resulting format string value.
Raise [Scan_failure] if the format string value read does not have the
(* *)
(***********************************************************************)
-(* $Id: set.ml,v 1.19 2004/11/25 00:04:15 doligez Exp $ *)
+(* $Id: set.ml 6694 2004-11-25 00:06:06Z doligez $ *)
(* Sets over ordered types *)
(* *)
(***********************************************************************)
-(* $Id: set.mli,v 1.33 2005/07/21 14:52:45 doligez Exp $ *)
+(* $Id: set.mli 6974 2005-07-21 14:52:45Z doligez $ *)
(** Sets over ordered types.
(* *)
(***********************************************************************)
-(* $Id: sort.ml,v 1.10 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: sort.ml 7164 2005-10-25 18:34:07Z doligez $ *)
(* Merging and sorting *)
(* *)
(***********************************************************************)
-(* $Id: sort.mli,v 1.14 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: sort.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Sorting and merging lists.
(* *)
(***********************************************************************)
-(* $Id: stack.ml,v 1.9 2002/06/27 08:48:26 xleroy Exp $ *)
+(* $Id: stack.ml 4956 2002-06-27 08:48:26Z xleroy $ *)
type 'a t = { mutable c : 'a list }
(* *)
(***********************************************************************)
-(* $Id: stack.mli,v 1.19 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: stack.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Last-in first-out stacks.
(* *)
(***********************************************************************)
-(* $Id: stdLabels.ml,v 1.3 2001/12/07 13:40:59 xleroy Exp $ *)
+(* $Id: stdLabels.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Module [StdLabels]: meta-module for labelled libraries *)
(* *)
(***********************************************************************)
-(* $Id: stdLabels.mli,v 1.13 2004/11/25 00:04:15 doligez Exp $ *)
+(* $Id: stdLabels.mli 6694 2004-11-25 00:06:06Z doligez $ *)
(** Standard labeled libraries.
(* *)
(***********************************************************************)
-(* $Id: std_exit.ml,v 1.5 2001/12/07 13:40:59 xleroy Exp $ *)
+(* $Id: std_exit.ml 4144 2001-12-07 13:41:02Z xleroy $ *)
(* Ensure that [at_exit] functions are called at the end of every program *)
-# This file lists all standard library modules.
+# This file lists all standard library modules
+# (in the same order as Makefile.shared).
# It is used in particular to know what to expunge in toplevels.
-# $Id: stdlib.mllib,v 1.2 2008/08/01 16:57:10 mauny Exp $
+# $Id: stdlib.mllib 9353 2009-09-24 09:17:39Z doligez $
Pervasives
-Arg
Array
-ArrayLabels
-Buffer
-Callback
-CamlinternalLazy
-CamlinternalMod
-CamlinternalOO
+List
Char
-Complex
-Digest
-Filename
-Format
-Gc
-Genlex
+String
+Sys
Hashtbl
+Sort
+Marshal
+Obj
Int32
Int64
-Lazy
-Lexing
-List
-ListLabels
-Map
-Marshal
-MoreLabels
Nativeint
-Obj
-Oo
+Lexing
Parsing
-Printexc
-Printf
-Queue
-Random
-Scanf
Set
-Sort
+Map
Stack
-StdLabels
+Queue
+CamlinternalLazy
+Lazy
Stream
-String
-StringLabels
-Sys
+Buffer
+Printf
+Format
+Scanf
+Arg
+Printexc
+Gc
+Digest
+Random
+Callback
+CamlinternalOO
+Oo
+CamlinternalMod
+Genlex
Weak
+Filename
+Complex
+ArrayLabels
+ListLabels
+StringLabels
+MoreLabels
+StdLabels
(* *)
(***********************************************************************)
-(* $Id: stream.ml,v 1.14 2008/06/18 15:35:02 mauny Exp $ *)
+(* $Id: stream.ml 8893 2008-06-18 15:35:02Z mauny $ *)
(* The fields of type t are not mutable to preserve polymorphism of
the empty stream. This is type safe because the empty stream is never
(* *)
(***********************************************************************)
-(* $Id: stream.mli,v 1.25 2005/10/25 18:34:07 doligez Exp $ *)
+(* $Id: stream.mli 7164 2005-10-25 18:34:07Z doligez $ *)
(** Streams and parsers. *)
(* *)
(***********************************************************************)
-(* $Id: string.ml,v 1.28.2.1 2008/11/12 10:53:47 doligez Exp $ *)
+(* $Id: string.ml 9128 2008-11-12 10:55:15Z doligez $ *)
(* String operations *)
(* *)
(***********************************************************************)
-(* $Id: string.mli,v 1.37.20.1 2008/10/08 13:07:13 doligez Exp $ *)
+(* $Id: string.mli 9079 2008-10-08 13:09:39Z doligez $ *)
(** String operations.
Given a string [s] of length [l], we call character number in [s]
(* *)
(***********************************************************************)
-(* $Id: stringLabels.ml,v 1.4 2004/01/03 22:08:38 doligez Exp $ *)
+(* $Id: stringLabels.ml 6054 2004-01-03 22:08:38Z doligez $ *)
(* Module [StringLabels]: labelled String module *)
(* *)
(***********************************************************************)
-(* $Id: stringLabels.mli,v 1.11 2007/01/22 08:06:09 garrigue Exp $ *)
+(* $Id: stringLabels.mli 7805 2007-01-22 08:06:09Z garrigue $ *)
(** String operations. *)
(* *)
(***********************************************************************)
-(* $Id: sys.mli,v 1.49 2007/02/26 14:21:57 xleroy Exp $ *)
+(* $Id: sys.mli 7927 2007-02-26 14:21:57Z xleroy $ *)
(** System interface. *)
(* *)
(***********************************************************************)
-(* $Id: sys.mlp,v 1.2 2007/02/26 14:21:57 xleroy Exp $ *)
+(* $Id: sys.mlp 7927 2007-02-26 14:21:57Z xleroy $ *)
(* WARNING: sys.ml is generated from sys.mlp. DO NOT EDIT sys.ml or
your changes will be lost.
(* *)
(***********************************************************************)
-(* $Id: weak.ml,v 1.17 2008/02/29 14:21:22 doligez Exp $ *)
+(* $Id: weak.ml 8823 2008-02-29 14:21:22Z doligez $ *)
(** Weak array operations *)
(* *)
(***********************************************************************)
-(* $Id: weak.mli,v 1.16.2.1 2008/11/13 10:39:46 doligez Exp $ *)
+(* $Id: weak.mli 9130 2008-11-13 10:39:46Z doligez $ *)
(** Arrays of weak pointers and hash tables of weak pointers. *)
# Characters
-# $Id: Characters,v 1.3 1999/11/29 19:04:21 doligez Exp $
+# $Id: Characters 2629 1999-11-29 19:04:21Z doligez $
# Usage:
# Characters n1 to n2
# DoMake
-# $Id: DoMake,v 1.5 1999/11/29 19:04:23 doligez Exp $
+# $Id: DoMake 2630 1999-11-29 19:04:23Z doligez $
# Execute the output of "Make -f Makefile.Mac -f Makefile.Mac.depend"
# or "Make -f Makefile -f Makefile.depend" if "Makefile.Mac" does not exist
# MakeDepend
-# $Id: MakeDepend,v 1.3 1999/11/29 19:04:25 doligez Exp $
+# $Id: MakeDepend 2631 1999-11-29 19:04:25Z doligez $
# Usage: MakeDepend fileÉ
# #
#########################################################################
-# $Id: Makefile,v 1.66 2007/11/22 22:14:43 doligez Exp $
+# $Id: Makefile 8616 2007-11-22 22:14:43Z doligez $
include Makefile.shared
# #
#########################################################################
-# $Id: Makefile.nt,v 1.26 2007/11/07 10:14:21 frisch Exp $
+# $Id: Makefile.nt 8485 2007-11-07 10:14:21Z frisch $
include Makefile.shared
# #
#########################################################################
-# $Id: Makefile.shared,v 1.5 2007/11/22 22:14:43 doligez Exp $
+# $Id: Makefile.shared 8616 2007-11-22 22:14:43Z doligez $
include ../config/Makefile
-(* $Id: addlabels.ml,v 1.12 2008/07/09 13:03:37 mauny Exp $ *)
+(* $Id: addlabels.ml 8906 2008-07-09 13:03:38Z mauny $ *)
open StdLabels
open Asttypes
/* */
/***********************************************************************/
-/* $Id: checkstack.c,v 1.3 2006/04/16 23:28:21 doligez Exp $ */
+/* $Id: checkstack.c 7382 2006-04-16 23:28:22Z doligez $ */
#include <stdio.h>
#include <stdlib.h>
(* *)
(***********************************************************************)
-(* $Id: cvt_emit.mll,v 1.4 2000/10/02 14:17:55 maranget Exp $ *)
+(* $Id: cvt_emit.mll 3304 2000-10-02 14:18:05Z maranget $ *)
{
let first_item = ref false
(* *)
(***********************************************************************)
-(* $Id: depend.ml,v 1.13 2008/07/09 13:03:37 mauny Exp $ *)
+(* $Id: depend.ml 8906 2008-07-09 13:03:38Z mauny $ *)
open Format
open Location
(* *)
(***********************************************************************)
-(* $Id: depend.mli,v 1.2 2002/04/18 07:27:43 garrigue Exp $ *)
+(* $Id: depend.mli 4694 2002-04-18 07:27:47Z garrigue $ *)
(** Module dependencies. *)
(* *)
(***********************************************************************)
-(* $Id: dumpapprox.ml,v 1.15 2003/03/06 16:00:16 xleroy Exp $ *)
+(* $Id: dumpapprox.ml 5423 2003-03-06 16:00:16Z xleroy $ *)
(* Dump a .cmx file *)
(* *)
(***********************************************************************)
-(* $Id: dumpobj.ml,v 1.38 2008/09/10 12:53:05 doligez Exp $ *)
+(* $Id: dumpobj.ml 9015 2008-09-10 12:53:05Z doligez $ *)
(* Disassembler for executable and .cmo object files *)
/* */
/***********************************************************************/
-/* $Id: keywords.r,v 1.3 2001/12/07 13:41:01 xleroy Exp $ */
+/* $Id: keywords.r 4144 2001-12-07 13:41:02Z xleroy $ */
type 'Odds' {
longint; /* resource ID of corresponding 'Sods' */
(* *)
(***********************************************************************)
-(* $Id: lexer299.mll,v 1.4 2005/06/22 13:52:36 doligez Exp $ *)
+(* $Id: lexer299.mll 6924 2005-06-22 13:52:36Z doligez $ *)
(* The lexer definition *)
(* *)
(***********************************************************************)
-(* $Id: lexer301.mll,v 1.5 2004/11/30 18:57:04 doligez Exp $ *)
+(* $Id: lexer301.mll 6720 2004-11-30 18:57:04Z doligez $ *)
(* The lexer definition *)
# #
#########################################################################
-# $Id: make-package-macosx,v 1.16.4.1 2008/10/16 15:57:00 doligez Exp $
+# $Id: make-package-macosx 9093 2008-10-16 15:57:00Z doligez $
cd package-macosx
rm -rf ocaml.pkg ocaml-rw.dmg
(* *)
(***********************************************************************)
-(* $Id: objinfo.ml,v 1.11 2006/07/05 12:09:18 pouillar Exp $ *)
+(* $Id: objinfo.ml 7469 2006-07-05 12:09:18Z pouillar $ *)
(* Dump a compilation unit description *)
# #
#########################################################################
-# $Id: ocaml-objcopy-macosx,v 1.2 2006/01/04 16:55:50 doligez Exp $
+# $Id: ocaml-objcopy-macosx 7307 2006-01-04 16:55:50Z doligez $
TMP="${TMPDIR=/tmp}"
(* *)
(***********************************************************************)
-(* $Id: ocaml299to3.ml,v 1.6 2001/10/03 01:34:05 garrigue Exp $ *)
+(* $Id: ocaml299to3.ml 3838 2001-10-03 01:34:05Z garrigue $ *)
open Lexer299
(* *)
(***********************************************************************)
-(* $Id: ocamlcp.ml,v 1.41 2007/05/16 08:21:40 doligez Exp $ *)
+(* $Id: ocamlcp.ml 8232 2007-05-16 08:21:41Z doligez $ *)
open Printf
(* *)
(***********************************************************************)
-(* $Id: ocamldep.ml,v 1.44 2008/08/01 09:02:55 xleroy Exp $ *)
+(* $Id: ocamldep.ml 8963 2008-08-01 09:02:55Z xleroy $ *)
open Format
open Location
(* *)
(***********************************************************************)
-(* $Id: ocamlmklib.mlp,v 1.16 2008/01/08 15:39:47 doligez Exp $ *)
+(* $Id: ocamlmklib.mlp 9365 2009-10-02 12:32:45Z doligez $ *)
open Printf
open Myocamlbuild_config
done;
List.iter
(fun r -> r := List.rev !r)
- [ bytecode_objs; native_objs; c_objs; caml_libs; caml_opts;
+ [ bytecode_objs; native_objs; caml_libs; caml_opts;
c_libs; c_objs; c_opts; ld_opts; rpath ];
- (* On retourne deux fois c_objs ?? -- AF *)
if !output_c = "" then output_c := !output
else flag ^ String.concat ":" (make_set !rpath)
let make_rpath_ccopt flag =
- if !rpath = [] || flag = ""
+ if !rpath = [] || flag = ""
then ""
else "-ccopt " ^ flag ^ String.concat ":" (make_set !rpath)
let transl_path s =
match Sys.os_type with
| "Win32" ->
- let rec aux i =
- if i = String.length s || s.[i] = ' ' then s
- else (if s.[i] = '/' then s.[i] <- '\\'; aux (i + 1))
- in aux 0
+ let rec aux i =
+ if i = String.length s || s.[i] = ' ' then s
+ else (if s.[i] = '/' then s.[i] <- '\\'; aux (i + 1))
+ in aux 0
| _ -> s
let build_libs () =
(* *)
(***********************************************************************)
-(* $Id: ocamlmktop.ml,v 1.6 2003/03/24 15:27:01 xleroy Exp $ *)
+(* $Id: ocamlmktop.ml 5454 2003-03-24 15:27:01Z xleroy $ *)
let _ =
let args = Ccomp.quote_files (List.tl (Array.to_list Sys.argv)) in
# #
#########################################################################
-# $Id: ocamlmktop.tpl,v 1.5 2004/02/22 14:52:50 xleroy Exp $
+# $Id: ocamlmktop.tpl 6128 2004-02-22 14:52:50Z xleroy $
exec %%BINDIR%%/ocamlc -linkall toplevellib.cma "$@" topstart.cmo
(* *)
(***********************************************************************)
-(* $Id: ocamlprof.ml,v 1.42 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: ocamlprof.ml 8705 2007-12-04 13:38:58Z doligez $ *)
open Printf
(* *)
(***********************************************************************)
-(* $Id: primreq.ml,v 1.5 2006/07/05 12:09:18 pouillar Exp $ *)
+(* $Id: primreq.ml 7469 2006-07-05 12:09:18Z pouillar $ *)
(* Determine the set of C primitives required by the given .cmo and .cma
files *)
(* *)
(***********************************************************************)
-(* $Id: profiling.ml,v 1.8 2006/11/28 15:59:35 doligez Exp $ *)
+(* $Id: profiling.ml 7762 2006-11-28 15:59:35Z doligez $ *)
(* Run-time library for profiled programs *)
(* *)
(***********************************************************************)
-(* $Id: profiling.mli,v 1.6 2005/03/24 17:20:54 doligez Exp $ *)
+(* $Id: profiling.mli 6824 2005-03-24 17:20:54Z doligez $ *)
(* Run-time library for profiled programs *)
(* *)
(***********************************************************************)
-(* $Id: scrapelabels.ml,v 1.6 2001/10/04 01:55:02 garrigue Exp $ *)
+(* $Id: scrapelabels.ml 3850 2001-10-04 01:55:02Z garrigue $ *)
open StdLabels
open Lexer301
(* *)
(***********************************************************************)
-(* $Id: expunge.ml,v 1.16 2004/01/16 15:24:03 doligez Exp $ *)
+(* $Id: expunge.ml 6074 2004-01-16 15:24:03Z doligez $ *)
(* "Expunge" a toplevel by removing compiler modules from the global List.map.
Usage: expunge <source file> <dest file> <names of modules to keep> *)
(* *)
(***********************************************************************)
-(* $Id: genprintval.ml,v 1.39 2007/10/09 10:29:37 weis Exp $ *)
+(* $Id: genprintval.ml 8418 2007-10-09 10:29:37Z weis $ *)
(* To print values *)
(* *)
(***********************************************************************)
-(* $Id: genprintval.mli,v 1.10 2002/04/18 07:27:44 garrigue Exp $ *)
+(* $Id: genprintval.mli 4694 2002-04-18 07:27:47Z garrigue $ *)
(* Printing of values *)
(* *)
(***********************************************************************)
-(* $Id: opttopdirs.ml,v 1.2.4.1 2008/11/19 02:35:40 garrigue Exp $ *)
+(* $Id: opttopdirs.ml 9134 2008-11-19 02:35:40Z garrigue $ *)
(* Toplevel directives *)
(* *)
(***********************************************************************)
-(* $Id: opttopdirs.mli,v 1.2 2007/11/06 15:16:56 frisch Exp $ *)
+(* $Id: opttopdirs.mli 8477 2007-11-06 15:16:56Z frisch $ *)
(* The toplevel directives. *)
(* *)
(***********************************************************************)
-(* $Id: opttoploop.ml,v 1.3 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: opttoploop.ml 8705 2007-12-04 13:38:58Z doligez $ *)
(* The interactive toplevel loop *)
(* *)
(***********************************************************************)
-(* $Id: opttoploop.mli,v 1.3 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: opttoploop.mli 8705 2007-12-04 13:38:58Z doligez $ *)
open Format
(* *)
(***********************************************************************)
-(* $Id: opttopmain.ml,v 1.2 2007/11/06 15:16:56 frisch Exp $ *)
+(* $Id: opttopmain.ml 8477 2007-11-06 15:16:56Z frisch $ *)
open Clflags
(* *)
(***********************************************************************)
-(* $Id: opttopmain.mli,v 1.2 2007/11/06 15:16:56 frisch Exp $ *)
+(* $Id: opttopmain.mli 8477 2007-11-06 15:16:56Z frisch $ *)
(* Start the [ocaml] toplevel loop *)
(* *)
(***********************************************************************)
-(* $Id: opttopstart.ml,v 1.2 2007/11/06 15:16:56 frisch Exp $ *)
+(* $Id: opttopstart.ml 8477 2007-11-06 15:16:56Z frisch $ *)
let _ = Opttopmain.main()
(* *)
(***********************************************************************)
-(* $Id: topdirs.ml,v 1.66.14.1 2008/11/19 02:35:40 garrigue Exp $ *)
+(* $Id: topdirs.ml 9134 2008-11-19 02:35:40Z garrigue $ *)
(* Toplevel directives *)
(* *)
(***********************************************************************)
-(* $Id: topdirs.mli,v 1.12 2002/04/18 07:27:44 garrigue Exp $ *)
+(* $Id: topdirs.mli 4694 2002-04-18 07:27:47Z garrigue $ *)
(* The toplevel directives. *)
(* *)
(***********************************************************************)
-(* $Id: toploop.ml,v 1.95 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: toploop.ml 8705 2007-12-04 13:38:58Z doligez $ *)
(* The interactive toplevel loop *)
(* *)
(***********************************************************************)
-(* $Id: toploop.mli,v 1.26 2007/12/04 13:38:58 doligez Exp $ *)
+(* $Id: toploop.mli 8705 2007-12-04 13:38:58Z doligez $ *)
open Format
(* *)
(***********************************************************************)
-(* $Id: topmain.ml,v 1.39 2005/01/28 17:52:58 doligez Exp $ *)
+(* $Id: topmain.ml 6758 2005-01-28 17:52:58Z doligez $ *)
open Clflags
(* *)
(***********************************************************************)
-(* $Id: topmain.mli,v 1.1 2002/04/24 08:02:51 xleroy Exp $ *)
+(* $Id: topmain.mli 4731 2002-04-24 08:02:51Z xleroy $ *)
(* Start the [ocaml] toplevel loop *)
(* *)
(***********************************************************************)
-(* $Id: topstart.ml,v 1.1 2002/04/24 08:02:51 xleroy Exp $ *)
+(* $Id: topstart.ml 4731 2002-04-24 08:02:51Z xleroy $ *)
let _ = Topmain.main()
(* *)
(***********************************************************************)
-(* $Id: trace.ml,v 1.20 2001/04/19 08:34:20 garrigue Exp $ *)
+(* $Id: trace.ml 3490 2001-04-19 08:34:21Z garrigue $ *)
(* The "trace" facility *)
(* *)
(***********************************************************************)
-(* $Id: trace.mli,v 1.9 2000/03/06 22:11:55 weis Exp $ *)
+(* $Id: trace.mli 2908 2000-03-06 22:12:09Z weis $ *)
(* The "trace" facility *)
(* *)
(***********************************************************************)
-(* $Id: annot.mli,v 1.2 2008/07/29 15:42:44 doligez Exp $ *)
+(* $Id: annot.mli 8958 2008-07-29 15:42:44Z doligez $ *)
(* Data types for annotations (Stypes.ml) *)
(* *)
(***********************************************************************)
-(* $Id: btype.ml,v 1.42 2008/07/19 02:13:09 garrigue Exp $ *)
+(* $Id: btype.ml 8922 2008-07-19 02:13:09Z garrigue $ *)
(* Basic operations on core types *)
(* *)
(***********************************************************************)
-(* $Id: btype.mli,v 1.20 2008/07/19 02:13:09 garrigue Exp $ *)
+(* $Id: btype.mli 8922 2008-07-19 02:13:09Z garrigue $ *)
(* Basic operations on core types *)
(* *)
(***********************************************************************)
-(* $Id: ctype.ml,v 1.216.2.5 2009/05/19 05:51:03 garrigue Exp $ *)
+(* $Id: ctype.ml 9453 2009-12-07 13:04:54Z garrigue $ *)
(* Operations on core types *)
let nondep_type_decl env mid id is_covariant decl =
try
let params = List.map (nondep_type_rec env mid) decl.type_params in
- let decl =
- { type_params = params;
- type_arity = decl.type_arity;
- type_kind =
- begin try
- match decl.type_kind with
- Type_abstract ->
- Type_abstract
- | Type_variant cstrs ->
- Type_variant(List.map
- (fun (c, tl) -> (c, List.map (nondep_type_rec env mid) tl))
- cstrs)
- | Type_record(lbls, rep) ->
- Type_record(
- List.map
- (fun (c, mut, t) -> (c, mut, nondep_type_rec env mid t))
- lbls,
- rep)
- with Not_found when is_covariant ->
- Type_abstract
- end;
- type_manifest =
- begin try
- match decl.type_manifest with
- None -> None
- | Some ty ->
- Some (unroll_abbrev id params (nondep_type_rec env mid ty))
- with Not_found when is_covariant ->
- None
- end;
- type_private = decl.type_private;
- type_variance = decl.type_variance;
- }
+ let tk =
+ try match decl.type_kind with
+ Type_abstract ->
+ Type_abstract
+ | Type_variant cstrs ->
+ Type_variant
+ (List.map
+ (fun (c, tl) -> (c, List.map (nondep_type_rec env mid) tl))
+ cstrs)
+ | Type_record(lbls, rep) ->
+ Type_record
+ (List.map
+ (fun (c, mut, t) -> (c, mut, nondep_type_rec env mid t))
+ lbls,
+ rep)
+ with Not_found when is_covariant -> Type_abstract
+ and tm =
+ try match decl.type_manifest with
+ None -> None
+ | Some ty ->
+ Some (unroll_abbrev id params (nondep_type_rec env mid ty))
+ with Not_found when is_covariant ->
+ None
in
cleanup_types ();
List.iter unmark_type decl.type_params;
None -> ()
| Some ty -> unmark_type ty
end;
- decl
+ let priv =
+ match tm with
+ | Some ty when Btype.has_constr_row ty -> Private
+ | _ -> decl.type_private
+ in
+ { type_params = params;
+ type_arity = decl.type_arity;
+ type_kind = tk;
+ type_manifest = tm;
+ type_private = priv;
+ type_variance = decl.type_variance;
+ }
with Not_found ->
cleanup_types ();
raise Not_found
(* *)
(***********************************************************************)
-(* $Id: ctype.mli,v 1.55.4.2 2009/02/13 05:05:36 garrigue Exp $ *)
+(* $Id: ctype.mli 9168 2009-02-13 05:05:36Z garrigue $ *)
(* Operations on core types *)
(* *)
(***********************************************************************)
-(* $Id: datarepr.ml,v 1.13 2003/07/02 09:14:32 xleroy Exp $ *)
+(* $Id: datarepr.ml 5643 2003-07-02 09:14:35Z xleroy $ *)
(* Compute constructor and label descriptions from type declarations,
determining their representation. *)
(* *)
(***********************************************************************)
-(* $Id: datarepr.mli,v 1.9 2003/07/02 09:14:32 xleroy Exp $ *)
+(* $Id: datarepr.mli 5643 2003-07-02 09:14:35Z xleroy $ *)
(* Compute constructor and label descriptions from type declarations,
determining their representation. *)
(* *)
(***********************************************************************)
-(* $Id: env.ml,v 1.66.2.1 2009/04/28 05:11:54 garrigue Exp $ *)
+(* $Id: env.ml 9240 2009-04-28 05:11:54Z garrigue $ *)
(* Environment handling *)
(* *)
(***********************************************************************)
-(* $Id: env.mli,v 1.35 2008/10/06 13:53:54 doligez Exp $ *)
+(* $Id: env.mli 9074 2008-10-06 13:53:54Z doligez $ *)
(* Environment handling *)
(* *)
(***********************************************************************)
-(* $Id: ident.ml,v 1.23 2004/01/04 14:32:34 doligez Exp $ *)
+(* $Id: ident.ml 6055 2004-01-04 14:32:34Z doligez $ *)
open Format
(* *)
(***********************************************************************)
-(* $Id: ident.mli,v 1.17 2004/01/04 14:32:34 doligez Exp $ *)
+(* $Id: ident.mli 6055 2004-01-04 14:32:34Z doligez $ *)
(* Identifiers (unique names) *)
(* *)
(***********************************************************************)
-(* $Id: includeclass.ml,v 1.8.16.1 2009/04/19 08:42:43 xleroy Exp $ *)
+(* $Id: includeclass.ml 9236 2009-04-19 08:42:43Z xleroy $ *)
(* Inclusion checks for the class language *)
(* *)
(***********************************************************************)
-(* $Id: includeclass.mli,v 1.3 2000/03/06 22:11:58 weis Exp $ *)
+(* $Id: includeclass.mli 2908 2000-03-06 22:12:09Z weis $ *)
(* Inclusion checks for the class language *)
(* *)
(***********************************************************************)
-(* $Id: includecore.ml,v 1.35.4.2 2008/10/16 03:05:26 garrigue Exp $ *)
+(* $Id: includecore.ml 9298 2009-06-13 10:26:05Z garrigue $ *)
(* Inclusion checks for the core language *)
let private_flags decl1 decl2 =
match decl1.type_private, decl2.type_private with
| Private, Public ->
- decl2.type_kind = Type_abstract && decl2.type_manifest = None
+ decl2.type_kind = Type_abstract &&
+ (decl2.type_manifest = None || decl1.type_kind <> Type_abstract)
| _, _ -> true
(* Inclusion between manifest types (particularly for private row types) *)
(* *)
(***********************************************************************)
-(* $Id: includecore.mli,v 1.10 1999/11/17 18:58:54 xleroy Exp $ *)
+(* $Id: includecore.mli 2553 1999-11-17 18:59:06Z xleroy $ *)
(* Inclusion checks for the core language *)
(* *)
(***********************************************************************)
-(* $Id: includemod.ml,v 1.39 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: includemod.ml 8768 2008-01-11 16:13:18Z doligez $ *)
(* Inclusion checks for the module language *)
(* *)
(***********************************************************************)
-(* $Id: includemod.mli,v 1.13 2006/09/20 11:14:37 doligez Exp $ *)
+(* $Id: includemod.mli 7619 2006-09-20 11:14:37Z doligez $ *)
(* Inclusion checks for the module language *)
(* *)
(***********************************************************************)
-(* $Id: mtype.ml,v 1.28.4.1 2009/06/08 02:35:15 garrigue Exp $ *)
+(* $Id: mtype.ml 9291 2009-06-08 02:35:15Z garrigue $ *)
(* Operations on module types *)
(* *)
(***********************************************************************)
-(* $Id: mtype.mli,v 1.10 2004/04/09 13:32:28 xleroy Exp $ *)
+(* $Id: mtype.mli 6196 2004-04-09 13:32:28Z xleroy $ *)
(* Operations on module types *)
(* *)
(***********************************************************************)
-(* $Id: oprint.ml,v 1.26.4.1 2008/10/08 13:07:14 doligez Exp $ *)
+(* $Id: oprint.ml 9079 2008-10-08 13:09:39Z doligez $ *)
open Format
open Outcometree
(* *)
(***********************************************************************)
-(* $Id: oprint.mli,v 1.2 2002/04/18 07:27:45 garrigue Exp $ *)
+(* $Id: oprint.mli 4694 2002-04-18 07:27:47Z garrigue $ *)
open Format
open Outcometree
(* *)
(***********************************************************************)
-(* $Id: outcometree.mli,v 1.15 2006/04/05 02:28:13 garrigue Exp $ *)
+(* $Id: outcometree.mli 7372 2006-04-05 02:28:13Z garrigue $ *)
(* Module [Outcometree]: results displayed by the toplevel *)
(* *)
(***********************************************************************)
-(* $Id: parmatch.ml,v 1.76.2.2 2009/03/16 04:24:05 garrigue Exp $ *)
+(* $Id: parmatch.ml 9187 2009-03-16 04:24:05Z garrigue $ *)
(* Detection of partial matches and unused match cases. *)
(* *)
(***********************************************************************)
-(* $Id: parmatch.mli,v 1.12 2008/07/09 13:03:37 mauny Exp $ *)
+(* $Id: parmatch.mli 8906 2008-07-09 13:03:38Z mauny $ *)
(* Detection of partial matches and unused match cases. *)
open Types
(* *)
(***********************************************************************)
-(* $Id: path.ml,v 1.9 2003/07/01 13:05:43 xleroy Exp $ *)
+(* $Id: path.ml 5640 2003-07-01 13:05:43Z xleroy $ *)
type t =
Pident of Ident.t
(* *)
(***********************************************************************)
-(* $Id: path.mli,v 1.8 2003/07/01 13:05:43 xleroy Exp $ *)
+(* $Id: path.mli 5640 2003-07-01 13:05:43Z xleroy $ *)
(* Access paths *)
(* *)
(***********************************************************************)
-(* $Id: predef.ml,v 1.32 2007/10/09 10:29:37 weis Exp $ *)
+(* $Id: predef.ml 8418 2007-10-09 10:29:37Z weis $ *)
(* Predefined type constructors (with special typing rules in typecore) *)
(* *)
(***********************************************************************)
-(* $Id: predef.mli,v 1.16 2006/10/24 20:54:58 weis Exp $ *)
+(* $Id: predef.mli 7702 2006-10-24 20:54:58Z weis $ *)
(* Predefined type constructors (with special typing rules in typecore) *)
(* *)
(***********************************************************************)
-(* $Id: primitive.ml,v 1.9 2008/07/24 05:35:22 frisch Exp $ *)
+(* $Id: primitive.ml 8930 2008-07-24 05:35:22Z frisch $ *)
(* Description of primitive functions *)
(* *)
(***********************************************************************)
-(* $Id: primitive.mli,v 1.8 2008/07/24 05:35:22 frisch Exp $ *)
+(* $Id: primitive.mli 8930 2008-07-24 05:35:22Z frisch $ *)
(* Description of primitive functions *)
(* *)
(***********************************************************************)
-(* $Id: printtyp.ml,v 1.147 2008/07/19 02:13:09 garrigue Exp $ *)
+(* $Id: printtyp.ml 8922 2008-07-19 02:13:09Z garrigue $ *)
(* Printing functions *)
(* *)
(***********************************************************************)
-(* $Id: printtyp.mli,v 1.27 2006/04/16 23:28:22 doligez Exp $ *)
+(* $Id: printtyp.mli 7382 2006-04-16 23:28:22Z doligez $ *)
(* Printing functions *)
(* *)
(***********************************************************************)
-(* $Id: stypes.ml,v 1.11 2008/07/29 15:42:44 doligez Exp $ *)
+(* $Id: stypes.ml 8958 2008-07-29 15:42:44Z doligez $ *)
(* Recording and dumping (partial) type information *)
(* *)
(***********************************************************************)
-(* $Id: stypes.mli,v 1.5 2008/07/29 15:42:44 doligez Exp $ *)
+(* $Id: stypes.mli 8958 2008-07-29 15:42:44Z doligez $ *)
(* Recording and dumping (partial) type information *)
(* *)
(***********************************************************************)
-(* $Id: subst.ml,v 1.52.4.1 2009/04/02 09:06:32 xclerc Exp $ *)
+(* $Id: subst.ml 9221 2009-04-02 09:06:33Z xclerc $ *)
(* Substitutions *)
(* *)
(***********************************************************************)
-(* $Id: subst.mli,v 1.13.4.1 2009/04/02 09:06:33 xclerc Exp $ *)
+(* $Id: subst.mli 9221 2009-04-02 09:06:33Z xclerc $ *)
(* Substitutions *)
(* *)
(***********************************************************************)
-(* $Id: typeclass.ml,v 1.93.4.1 2009/04/19 08:42:43 xleroy Exp $ *)
+(* $Id: typeclass.ml 9236 2009-04-19 08:42:43Z xleroy $ *)
open Misc
open Parsetree
(* *)
(***********************************************************************)
-(* $Id: typeclass.mli,v 1.19 2006/04/05 02:28:13 garrigue Exp $ *)
+(* $Id: typeclass.mli 7372 2006-04-05 02:28:13Z garrigue $ *)
open Asttypes
open Types
(* *)
(***********************************************************************)
-(* $Id: typecore.ml,v 1.199.2.3 2009/04/19 09:21:08 xleroy Exp $ *)
+(* $Id: typecore.ml 9412 2009-11-09 11:42:39Z weis $ *)
(* Typechecking for the core language *)
and scan_conversion i j =
if j >= len then incomplete_format fmt else
match fmt.[j] with
- | '%' | '!' -> scan_format (j + 1)
+ | '%' | '!' | ',' -> scan_format (j + 1)
| 's' | 'S' -> conversion j Predef.type_string
| '[' ->
let j = range_closing_index fmt j in
(* *)
(***********************************************************************)
-(* $Id: typecore.mli,v 1.41 2008/01/11 16:13:16 doligez Exp $ *)
+(* $Id: typecore.mli 8768 2008-01-11 16:13:18Z doligez $ *)
(* Type inference for the core language *)
(* *)
(***********************************************************************)
-(* $Id: typedecl.ml,v 1.82.2.3 2009/06/08 04:08:14 garrigue Exp $ *)
+(* $Id: typedecl.ml 9292 2009-06-08 04:08:14Z garrigue $ *)
(**** Typing of type definitions ****)
(* *)
(***********************************************************************)
-(* $Id: typedecl.mli,v 1.31.4.1 2009/06/08 04:08:14 garrigue Exp $ *)
+(* $Id: typedecl.mli 9292 2009-06-08 04:08:14Z garrigue $ *)
(* Typing of type definitions and primitive definitions *)
(* *)
(***********************************************************************)
-(* $Id: typedtree.ml,v 1.39 2008/07/09 13:03:38 mauny Exp $ *)
+(* $Id: typedtree.ml 8906 2008-07-09 13:03:38Z mauny $ *)
(* Abstract syntax tree after typing *)
(* *)
(***********************************************************************)
-(* $Id: typedtree.mli,v 1.37 2008/07/09 13:03:38 mauny Exp $ *)
+(* $Id: typedtree.mli 8906 2008-07-09 13:03:38Z mauny $ *)
(* Abstract syntax tree after typing *)
(* *)
(***********************************************************************)
-(* $Id: typemod.ml,v 1.86.2.1 2008/10/08 13:07:14 doligez Exp $ *)
+(* $Id: typemod.ml 9079 2008-10-08 13:09:39Z doligez $ *)
(* Type-checking of the module language *)
(* *)
(***********************************************************************)
-(* $Id: typemod.mli,v 1.27 2007/05/16 08:21:40 doligez Exp $ *)
+(* $Id: typemod.mli 8232 2007-05-16 08:21:41Z doligez $ *)
(* Type-checking of the module language *)
(* *)
(***********************************************************************)
-(* $Id: types.ml,v 1.29 2008/07/19 02:13:09 garrigue Exp $ *)
+(* $Id: types.ml 8922 2008-07-19 02:13:09Z garrigue $ *)
(* Representation of types and declarations *)
(* *)
(***********************************************************************)
-(* $Id: types.mli,v 1.29 2008/07/19 02:13:09 garrigue Exp $ *)
+(* $Id: types.mli 8922 2008-07-19 02:13:09Z garrigue $ *)
(* Representation of types and declarations *)
| Variant_tags of string * string
| Invalid_variable_name of string
| Cannot_quantify of string * type_expr
+ | Repeated_method_label of string
exception Error of Location.t * error
end;
constr
| Ptyp_object fields ->
- newobj (transl_fields env policy fields)
+ newobj (transl_fields env policy [] fields)
| Ptyp_class(lid, stl, present) ->
let (path, decl, is_variant) =
try
unify_var env (newvar()) ty';
ty'
-and transl_fields env policy =
+and transl_fields env policy seen =
function
[] ->
newty Tnil
| {pfield_desc = Pfield_var}::_ ->
if policy = Univars then new_pre_univar () else newvar ()
- | {pfield_desc = Pfield(s, e)}::l ->
+ | {pfield_desc = Pfield(s, e); pfield_loc = loc}::l ->
+ if List.mem s seen then raise (Error (loc, Repeated_method_label s));
let ty1 = transl_type env policy e in
- let ty2 = transl_fields env policy l in
+ let ty2 = transl_fields env policy (s::seen) l in
newty (Tfield (s, Fpresent, ty1, ty2))
(if v.desc = Tvar then "it escapes this scope" else
if v.desc = Tunivar then "it is aliased to another variable"
else "it is not a variable")
+ | Repeated_method_label s ->
+ fprintf ppf "@[This is the second method `%s' of this object type.@ %s@]"
+ s "Multiple occurences are not allowed."
(* *)
(***********************************************************************)
-(* $Id: typetexp.mli,v 1.19 2003/05/19 09:21:17 garrigue Exp $ *)
+(* $Id: typetexp.mli 9297 2009-06-12 12:40:55Z garrigue $ *)
(* Typechecking of type expressions for the core language *)
| Variant_tags of string * string
| Invalid_variable_name of string
| Cannot_quantify of string * Types.type_expr
+ | Repeated_method_label of string
exception Error of Location.t * error
(* *)
(***********************************************************************)
-(* $Id: unused_var.ml,v 1.7 2008/07/09 13:03:38 mauny Exp $ *)
+(* $Id: unused_var.ml 8906 2008-07-09 13:03:38Z mauny $ *)
open Parsetree
(* *)
(***********************************************************************)
-(* $Id: unused_var.mli,v 1.2 2006/01/04 16:55:50 doligez Exp $ *)
+(* $Id: unused_var.mli 7307 2006-01-04 16:55:50Z doligez $ *)
val warn : Format.formatter -> Parsetree.structure -> Parsetree.structure;;
(* Warn on unused variables; return the second argument. *)
(* *)
(***********************************************************************)
-(* $Id: ccomp.ml,v 1.28.4.2 2008/10/16 15:57:00 doligez Exp $ *)
+(* $Id: ccomp.ml 9093 2008-10-16 15:57:00Z doligez $ *)
(* Compiling C files and building C libraries *)
(* *)
(***********************************************************************)
-(* $Id: ccomp.mli,v 1.16 2008/01/11 16:13:18 doligez Exp $ *)
+(* $Id: ccomp.mli 8768 2008-01-11 16:13:18Z doligez $ *)
(* Compiling C files and building C libraries *)
(* *)
(***********************************************************************)
-(* $Id: clflags.ml,v 1.53.2.1 2008/10/15 08:48:51 xleroy Exp $ *)
+(* $Id: clflags.ml 9084 2008-10-15 08:48:51Z xleroy $ *)
(* Command-line parameters *)
(* *)
(***********************************************************************)
-(* $Id: clflags.mli,v 1.4.2.1 2008/10/15 08:48:51 xleroy Exp $ *)
+(* $Id: clflags.mli 9084 2008-10-15 08:48:51Z xleroy $ *)
val objfiles : string list ref
val ccobjs : string list ref
(* *)
(***********************************************************************)
-(* $Id: config.mlbuild,v 1.3.4.4 2009/05/19 14:41:21 doligez Exp $ *)
+(* $Id: config.mlbuild 9266 2009-05-19 14:41:21Z doligez $ *)
(***********************************************************************)
(** **)
(* *)
(***********************************************************************)
-(* $Id: config.mli,v 1.41 2008/04/16 06:50:31 frisch Exp $ *)
+(* $Id: config.mli 8868 2008-04-16 06:50:31Z frisch $ *)
(* System configuration *)
(* *)
(***********************************************************************)
-(* $Id: config.mlp,v 1.208.2.2 2009/05/18 09:38:16 doligez Exp $ *)
+(* $Id: config.mlp 9260 2009-05-18 09:38:16Z doligez $ *)
(***********************************************************************)
(** **)
(* *)
(***********************************************************************)
-(* $Id: consistbl.ml,v 1.2 2002/11/18 10:41:26 xleroy Exp $ *)
+(* $Id: consistbl.ml 5275 2002-11-18 10:41:26Z xleroy $ *)
(* Consistency tables: for checking consistency of module CRCs *)
(* *)
(***********************************************************************)
-(* $Id: consistbl.mli,v 1.2 2002/11/18 10:41:26 xleroy Exp $ *)
+(* $Id: consistbl.mli 5275 2002-11-18 10:41:26Z xleroy $ *)
(* Consistency tables: for checking consistency of module CRCs *)
(* *)
(***********************************************************************)
-(* $Id: misc.ml,v 1.35 2007/02/23 13:44:51 ertai Exp $ *)
+(* $Id: misc.ml 7909 2007-02-23 13:44:51Z ertai $ *)
(* Errors *)
(* *)
(***********************************************************************)
-(* $Id: misc.mli,v 1.26 2007/02/23 13:44:51 ertai Exp $ *)
+(* $Id: misc.mli 7909 2007-02-23 13:44:51Z ertai $ *)
(* Miscellaneous useful types and functions *)
(* *)
(***********************************************************************)
-(* $Id: tbl.ml,v 1.13.22.1 2009/04/02 09:06:33 xclerc Exp $ *)
+(* $Id: tbl.ml 9221 2009-04-02 09:06:33Z xclerc $ *)
type ('a, 'b) t =
Empty
(* *)
(***********************************************************************)
-(* $Id: tbl.mli,v 1.7.44.1 2009/04/02 09:06:33 xclerc Exp $ *)
+(* $Id: tbl.mli 9221 2009-04-02 09:06:33Z xclerc $ *)
(* Association tables from any ordered type to any type.
We use the generic ordering to compare keys. *)
(* *)
(***********************************************************************)
-(* $Id: terminfo.ml,v 1.6 2004/01/01 16:42:42 doligez Exp $ *)
+(* $Id: terminfo.ml 6045 2004-01-01 16:42:43Z doligez $ *)
(* Basic interface to the terminfo database *)
(* *)
(***********************************************************************)
-(* $Id: terminfo.mli,v 1.7 2004/01/01 16:42:43 doligez Exp $ *)
+(* $Id: terminfo.mli 6045 2004-01-01 16:42:43Z doligez $ *)
(* Basic interface to the terminfo database *)
(* *)
(***********************************************************************)
-(* $Id: warnings.ml,v 1.28 2008/10/06 13:53:54 doligez Exp $ *)
+(* $Id: warnings.ml 9074 2008-10-06 13:53:54Z doligez $ *)
(* Please keep them in alphabetical order *)
(* *)
(***********************************************************************)
-(* $Id: warnings.mli,v 1.19 2008/10/06 13:53:54 doligez Exp $ *)
+(* $Id: warnings.mli 9074 2008-10-06 13:53:54Z doligez $ *)
open Format
# #
#########################################################################
-# $Id: Makefile,v 1.12 2007/11/15 13:21:15 frisch Exp $
+# $Id: Makefile 8521 2007-11-15 13:21:15Z frisch $
include ../config/Makefile
int LineCount;
struct tagLineList *Lines;
BOOL isCorrect;
-} EditBuffer;\r
-\r
-BOOL editbuffer_addline (EditBuffer* edBuf, char* line);\r
-BOOL editbuffer_updateline (EditBuffer* edBuf, int idx, char* line);\r
-BOOL editbuffer_updateoraddline (EditBuffer* edBuf, int idx, char* line);\r
-BOOL editbuffer_removeline (EditBuffer* edBuf, int idx);\r
-char* editbuffer_getasline (EditBuffer* edBuf);\r
-char* editbuffer_getasbuffer (EditBuffer* edBuf);\r
-char* editbuffer_lastline (EditBuffer* edBuf);\r
-EditBuffer* editbuffer_copy (EditBuffer* edBuf);\r
-void editbuffer_destroy (EditBuffer* edBuf);\r
-EditBuffer* editbuffer_new (void);\r
-\r
+} EditBuffer;
+
+BOOL editbuffer_addline (EditBuffer* edBuf, char* line);
+BOOL editbuffer_updateline (EditBuffer* edBuf, int idx, char* line);
+BOOL editbuffer_updateoraddline (EditBuffer* edBuf, int idx, char* line);
+BOOL editbuffer_removeline (EditBuffer* edBuf, int idx);
+char* editbuffer_getasline (EditBuffer* edBuf);
+char* editbuffer_getasbuffer (EditBuffer* edBuf);
+char* editbuffer_lastline (EditBuffer* edBuf);
+EditBuffer* editbuffer_copy (EditBuffer* edBuf);
+void editbuffer_destroy (EditBuffer* edBuf);
+EditBuffer* editbuffer_new (void);
+
#endif
/* */
/***********************************************************************/
-/* $Id: inria.h,v 1.6.4.1 2008/10/08 13:07:14 doligez Exp $ */
+/* $Id: inria.h 9079 2008-10-08 13:09:39Z doligez $ */
/*------------------------------------------------------------------------
Module: D:\lcc\inria\inria.h
/* */
/***********************************************************************/
-/* $Id: libgraph.h,v 1.3 2002/07/23 14:12:02 doligez Exp $ */
+/* $Id: libgraph.h 5029 2002-07-23 14:12:03Z doligez $ */
#include <stdio.h>
#include <windows.h>
/* Began 14 Sept 2003 - watford@uiuc.edu */
/***********************************************************************/
-/* $Id: menu.c,v 1.8 2006/05/09 16:03:48 xleroy Exp $ */
+/* $Id: menu.c 7411 2006-05-09 16:03:48Z xleroy $ */
#include <stdio.h>
#include <windows.h>
------------------------------------------------------------------------*/
static void Add_Clipboard_To_Queue(void)
{
- if (IsClipboardFormatAvailable(CF_TEXT) && OpenClipboard(hwndMain))\r
- {\r
- HANDLE hClipData = GetClipboardData(CF_TEXT);\r
-\r
- if (hClipData != NULL)\r
- {\r
- char *str = GlobalLock(hClipData);\r
-\r
- if (str != NULL)\r
- {\r
- while ((*str) != 0)\r
- {\r
- if (*str != '\r')\r
- Add_Char_To_Queue(*str);\r
-\r
- str++;\r
- }\r
-\r
- // added to fix odd errors\r
- RefreshCurrentEditBuffer();\r
- }\r
-\r
- GlobalUnlock(hClipData);\r
- }\r
-\r
- CloseClipboard();\r
- }\r
+ if (IsClipboardFormatAvailable(CF_TEXT) && OpenClipboard(hwndMain))
+ {
+ HANDLE hClipData = GetClipboardData(CF_TEXT);
+
+ if (hClipData != NULL)
+ {
+ char *str = GlobalLock(hClipData);
+
+ if (str != NULL)
+ {
+ while ((*str) != 0)
+ {
+ if (*str != '\r')
+ Add_Char_To_Queue(*str);
+
+ str++;
+ }
+
+ // added to fix odd errors
+ RefreshCurrentEditBuffer();
+ }
+
+ GlobalUnlock(hClipData);
+ }
+
+ CloseClipboard();
+ }
}
/*------------------------------------------------------------------------
/* Began 14 Sept 2003 - watford@uiuc.edu */
/***********************************************************************/
-/* $Id: ocaml.c,v 1.9 2006/05/09 16:03:48 xleroy Exp $ */
+/* $Id: ocaml.c 7411 2006-05-09 16:03:48Z xleroy $ */
/*@@ Wedit generated application. Written Sat Jun 02 18:22:38 2001
@@header: D:\lcc\inria\inriares.h
-// Microsoft Visual C++ generated resource script.\r
-//\r
-#include "resource.h"\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#define APSTUDIO_HIDDEN_SYMBOLS\r
-#include "windows.h"\r
-#undef APSTUDIO_HIDDEN_SYMBOLS\r
-#include "inriares.h"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// English (U.S.) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-#ifdef _WIN32\r
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Icon\r
-//\r
-\r
-// Icon with lowest ID value placed first to ensure application icon\r
-// remains consistent on all systems.\r
-1000 ICON "ocaml.ico"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Menu\r
-//\r
-\r
-IDMAINMENU MENU \r
-BEGIN\r
- POPUP "&File"\r
- BEGIN\r
- MENUITEM "&Open...", IDM_OPEN\r
- MENUITEM "&Save ML...", IDM_SAVE\r
- MENUITEM "Save &Transcript...", IDM_SAVEAS\r
- MENUITEM SEPARATOR\r
- MENUITEM "&Print", IDM_PRINT, GRAYED\r
- MENUITEM "P&rint Setup...", IDM_PRINTSU, GRAYED\r
- MENUITEM SEPARATOR\r
- MENUITEM "E&xit", IDM_EXIT\r
- END\r
- POPUP "&Edit"\r
- BEGIN\r
- MENUITEM "&Undo\tAlt+BkSp", IDM_EDITUNDO\r
- MENUITEM SEPARATOR\r
- MENUITEM "Cu&t\t Shift+Del", IDM_EDITCUT\r
- MENUITEM "&Copy\tCtrl+Ins", IDM_EDITCOPY\r
- MENUITEM "&Paste\tShift+Ins", IDM_EDITPASTE\r
- END\r
- POPUP "Workspace"\r
- BEGIN\r
- MENUITEM "&Font...", IDM_FONT\r
- MENUITEM "Text &Color...", IDM_COLORTEXT\r
- MENUITEM "&Background Color...", IDM_BACKCOLOR\r
- MENUITEM SEPARATOR\r
- MENUITEM "&History...", IDM_HISTORY\r
- MENUITEM "&Garbage Collect", IDM_GC\r
- MENUITEM "&Interrupt", IDCTRLC\r
- END\r
- POPUP "&Window", GRAYED\r
- BEGIN\r
- MENUITEM "&Tile", IDM_WINDOWTILE, INACTIVE\r
- MENUITEM "&Cascade", IDM_WINDOWCASCADE, INACTIVE\r
- MENUITEM "Arrange &Icons", IDM_WINDOWICONS, INACTIVE\r
- MENUITEM "Close &All", IDM_WINDOWCLOSEALL, INACTIVE\r
- END\r
- POPUP "&Help"\r
- BEGIN\r
- MENUITEM "&About...", IDM_ABOUT\r
- END\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Accelerator\r
-//\r
-\r
-BARMDI ACCELERATORS \r
-BEGIN\r
- "Q", IDM_EXIT, VIRTKEY, CONTROL\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_ABOUT DIALOGEX 7, 29, 236, 81\r
-STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | \r
- WS_SYSMENU\r
-EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE\r
-CAPTION "About OCamlWinPlus"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- LTEXT "Objective Caml for Windows",101,75,7,90,12\r
- LTEXT "New Windows Interface 1.9RC4",102,68,15,104,12\r
- CTEXT "Copyright 1996-2001\nUpdated 2003",103,88,25,66,23\r
- CTEXT "Institut National de Recherche en Informatique et Automatique",\r
- 104,16,46,211,10\r
- CTEXT "Réalisé par Jacob Navia 2001. Updated by Chris Watford 2003.\nwatford@uiuc.edu",\r
- 105,18,54,207,19\r
-END\r
-\r
-IDD_HISTORY DIALOGEX 6, 18, 261, 184\r
-STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | \r
- WS_SYSMENU | WS_THICKFRAME\r
-EXSTYLE WS_EX_TOOLWINDOW\r
-CAPTION "Session History"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- LISTBOX IDLIST,7,7,247,173,LBS_USETABSTOPS | WS_VSCROLL | \r
- WS_HSCROLL | WS_TABSTOP\r
-END\r
-\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-\r
-1 TEXTINCLUDE \r
-BEGIN\r
- "resource.h\0"\r
-END\r
-\r
-2 TEXTINCLUDE \r
-BEGIN\r
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
- "#include ""windows.h""\r\n"\r
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
- "#include ""inriares.h""\r\n"\r
- "\0"\r
-END\r
-\r
-3 TEXTINCLUDE \r
-BEGIN\r
- "\r\n"\r
- "\0"\r
-END\r
-\r
-#endif // APSTUDIO_INVOKED\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// String Table\r
-//\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 3010 "Switches to "\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 2000 "Create, open, save, or print documents"\r
- 2010 "Get help"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 500 "Displays information about this application"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 440 "Closes all open windows"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 420 "Arranges windows as overlapping tiles"\r
- 430 "Arranges minimized window icons"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 410 "Arranges windows as non-overlapping tiles"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 340 "Inserts the clipboard contents at the insertion point"\r
- 350 "Removes the selection without putting it on the clipboard"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 320 "Cuts the selection and puts it on the clipboard"\r
- 330 "Copies the selection and puts it on the clipboard"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 310 "Reverses the last action"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 260 "Changes the printer selection or configuration"\r
- 270 "Quits this application"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 240 "Closes the active document"\r
- 250 "Prints the active document"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 230 "Saves the active document under a different name"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 210 "Opens an existing document"\r
- 220 "Saves the active document"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- 200 "Creates a new session"\r
-END\r
-\r
-#endif // English (U.S.) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif // not APSTUDIO_INVOKED\r
-\r
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+#include "inriares.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+1000 ICON "ocaml.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDMAINMENU MENU
+BEGIN
+ POPUP "&File"
+ BEGIN
+ MENUITEM "&Open...", IDM_OPEN
+ MENUITEM "&Save ML...", IDM_SAVE
+ MENUITEM "Save &Transcript...", IDM_SAVEAS
+ MENUITEM SEPARATOR
+ MENUITEM "&Print", IDM_PRINT, GRAYED
+ MENUITEM "P&rint Setup...", IDM_PRINTSU, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "E&xit", IDM_EXIT
+ END
+ POPUP "&Edit"
+ BEGIN
+ MENUITEM "&Undo\tAlt+BkSp", IDM_EDITUNDO
+ MENUITEM SEPARATOR
+ MENUITEM "Cu&t\t Shift+Del", IDM_EDITCUT
+ MENUITEM "&Copy\tCtrl+Ins", IDM_EDITCOPY
+ MENUITEM "&Paste\tShift+Ins", IDM_EDITPASTE
+ END
+ POPUP "Workspace"
+ BEGIN
+ MENUITEM "&Font...", IDM_FONT
+ MENUITEM "Text &Color...", IDM_COLORTEXT
+ MENUITEM "&Background Color...", IDM_BACKCOLOR
+ MENUITEM SEPARATOR
+ MENUITEM "&History...", IDM_HISTORY
+ MENUITEM "&Garbage Collect", IDM_GC
+ MENUITEM "&Interrupt", IDCTRLC
+ END
+ POPUP "&Window", GRAYED
+ BEGIN
+ MENUITEM "&Tile", IDM_WINDOWTILE, INACTIVE
+ MENUITEM "&Cascade", IDM_WINDOWCASCADE, INACTIVE
+ MENUITEM "Arrange &Icons", IDM_WINDOWICONS, INACTIVE
+ MENUITEM "Close &All", IDM_WINDOWCLOSEALL, INACTIVE
+ END
+ POPUP "&Help"
+ BEGIN
+ MENUITEM "&About...", IDM_ABOUT
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+BARMDI ACCELERATORS
+BEGIN
+ "Q", IDM_EXIT, VIRTKEY, CONTROL
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUT DIALOGEX 7, 29, 236, 81
+STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
+CAPTION "About OCamlWinPlus"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ LTEXT "Objective Caml for Windows",101,75,7,90,12
+ LTEXT "New Windows Interface 1.9RC4",102,68,15,104,12
+ CTEXT "Copyright 1996-2001\nUpdated 2003",103,88,25,66,23
+ CTEXT "Institut National de Recherche en Informatique et Automatique",
+ 104,16,46,211,10
+ CTEXT "Réalisé par Jacob Navia 2001. Updated by Chris Watford 2003.\nwatford@uiuc.edu",
+ 105,18,54,207,19
+END
+
+IDD_HISTORY DIALOGEX 6, 18, 261, 184
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU | WS_THICKFRAME
+EXSTYLE WS_EX_TOOLWINDOW
+CAPTION "Session History"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ LISTBOX IDLIST,7,7,247,173,LBS_USETABSTOPS | WS_VSCROLL |
+ WS_HSCROLL | WS_TABSTOP
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""inriares.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+ 3010 "Switches to "
+END
+
+STRINGTABLE
+BEGIN
+ 2000 "Create, open, save, or print documents"
+ 2010 "Get help"
+END
+
+STRINGTABLE
+BEGIN
+ 500 "Displays information about this application"
+END
+
+STRINGTABLE
+BEGIN
+ 440 "Closes all open windows"
+END
+
+STRINGTABLE
+BEGIN
+ 420 "Arranges windows as overlapping tiles"
+ 430 "Arranges minimized window icons"
+END
+
+STRINGTABLE
+BEGIN
+ 410 "Arranges windows as non-overlapping tiles"
+END
+
+STRINGTABLE
+BEGIN
+ 340 "Inserts the clipboard contents at the insertion point"
+ 350 "Removes the selection without putting it on the clipboard"
+END
+
+STRINGTABLE
+BEGIN
+ 320 "Cuts the selection and puts it on the clipboard"
+ 330 "Copies the selection and puts it on the clipboard"
+END
+
+STRINGTABLE
+BEGIN
+ 310 "Reverses the last action"
+END
+
+STRINGTABLE
+BEGIN
+ 260 "Changes the printer selection or configuration"
+ 270 "Quits this application"
+END
+
+STRINGTABLE
+BEGIN
+ 240 "Closes the active document"
+ 250 "Prints the active document"
+END
+
+STRINGTABLE
+BEGIN
+ 230 "Saves the active document under a different name"
+END
+
+STRINGTABLE
+BEGIN
+ 210 "Opens an existing document"
+ 220 "Saves the active document"
+END
+
+STRINGTABLE
+BEGIN
+ 200 "Creates a new session"
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
-//{{NO_DEPENDENCIES}}\r
-// Microsoft Visual C++ generated include file.\r
-// Used by ocaml.rc\r
-//\r
-\r
-// Next default values for new objects\r
-// \r
-#ifdef APSTUDIO_INVOKED\r
-#ifndef APSTUDIO_READONLY_SYMBOLS\r
-#define _APS_NO_MFC 1\r
-#define _APS_NEXT_RESOURCE_VALUE 101\r
-#define _APS_NEXT_COMMAND_VALUE 40001\r
-#define _APS_NEXT_CONTROL_VALUE 1000\r
-#define _APS_NEXT_SYMED_VALUE 101\r
-#endif\r
-#endif\r
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by ocaml.rc
+//
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
/* Began 14 Sept 2003 - watford@uiuc.edu */
/***********************************************************************/
-/* $Id: startocaml.c,v 1.11 2005/03/24 17:20:54 doligez Exp $ */
+/* $Id: startocaml.c 6824 2005-03-24 17:20:54Z doligez $ */
#include <windows.h>
#include <stdio.h>
# #
#########################################################################
-# $Id: Makefile,v 1.10 2007/02/07 14:49:42 doligez Exp $
+# $Id: Makefile 7833 2007-02-07 14:49:42Z doligez $
# Makefile for the parser generator.
# #
#########################################################################
-# $Id: Makefile.nt,v 1.11 2007/11/15 13:21:15 frisch Exp $
+# $Id: Makefile.nt 8521 2007-11-15 13:21:15Z frisch $
# Makefile for the parser generator.
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: closure.c,v 1.9 2001/07/12 12:54:22 doligez Exp $ */
+/* $Id: closure.c 3573 2001-07-12 12:54:24Z doligez $ */
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: defs.h,v 1.22 2004/04/21 23:26:05 doligez Exp $ */
+/* $Id: defs.h 6244 2004-04-21 23:26:06Z doligez $ */
#include <assert.h>
#include <ctype.h>
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: error.c,v 1.15 2004/11/02 10:48:14 doligez Exp $ */
+/* $Id: error.c 6654 2004-11-02 10:48:14Z doligez $ */
/* routines for printing error messages */
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: lalr.c,v 1.8 2001/07/12 12:54:23 doligez Exp $ */
+/* $Id: lalr.c 3573 2001-07-12 12:54:24Z doligez $ */
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: lr0.c,v 1.8 2001/07/12 12:54:23 doligez Exp $ */
+/* $Id: lr0.c 3573 2001-07-12 12:54:24Z doligez $ */
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: main.c,v 1.20 2006/04/16 23:28:22 doligez Exp $ */
+/* $Id: main.c 7382 2006-04-16 23:28:22Z doligez $ */
#include <signal.h>
#include <string.h>
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: mkpar.c,v 1.11 2001/07/12 12:54:23 doligez Exp $ */
+/* $Id: mkpar.c 3573 2001-07-12 12:54:24Z doligez $ */
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: output.c,v 1.14 2002/11/02 22:36:46 doligez Exp $ */
+/* $Id: output.c 5232 2002-11-02 22:36:46Z doligez $ */
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: reader.c,v 1.32.18.1 2009/05/20 11:58:43 doligez Exp $ */
+/* $Id: reader.c 9271 2009-05-20 11:58:43Z doligez $ */
#include <string.h>
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: skeleton.c,v 1.13 2005/08/13 20:59:37 doligez Exp $ */
+/* $Id: skeleton.c 7019 2005-08-13 20:59:37Z doligez $ */
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: symtab.c,v 1.8 2001/07/12 12:54:23 doligez Exp $ */
+/* $Id: symtab.c 3573 2001-07-12 12:54:24Z doligez $ */
#include <string.h>
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: verbose.c,v 1.9 2001/07/12 12:54:23 doligez Exp $ */
+/* $Id: verbose.c 3573 2001-07-12 12:54:24Z doligez $ */
#include "defs.h"
/* Based on public-domain code from Berkeley Yacc */
-/* $Id: warshall.c,v 1.8 2001/07/12 12:54:23 doligez Exp $ */
+/* $Id: warshall.c 3573 2001-07-12 12:54:24Z doligez $ */
#include "defs.h"