Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add efuns-017+5 as is. It was found on http://pauillac.inria.fr/cdrom…

  • Loading branch information...
commit 78b21d9dff45b7eec764c63132c7a564f5367c30 1 parent 12d4756
Vasili Pupkin authored
Showing with 97,347 additions and 0 deletions.
  1. +49 −0 .Makefile.config
  2. +15 −0 .cache
  3. +17 −0 .cache.default
  4. +4 −0 .cvsignore
  5. +22 −0 CVS/Entries
  6. +1 −0  CVS/Repository
  7. +1 −0  CVS/Root
  8. +52 −0 Changes
  9. +300 −0 INSTALL
  10. +600 −0 LICENSE
  11. +214 −0 Makefile
  12. +80 −0 Makefile.config
  13. +34 −0 Makefile.rules
  14. +3 −0  common/.cvsignore
  15. +17 −0 common/.depend
  16. +19 −0 common/CVS/Entries
  17. +1 −0  common/CVS/Repository
  18. +1 −0  common/CVS/Root
  19. +79 −0 common/Makefile
  20. +1 −0  common/compat_run.ml
  21. +46 −0 common/compat_run.mli
  22. +1 −0  common/instructs.ml
  23. +14 −0 common/lexers.mli
  24. +32 −0 common/lexers.mll
  25. +66 −0 common/log.ml
  26. +3 −0  common/ocamlrun
  27. +442 −0 common/options.ml
  28. +87 −0 common/options.mli
  29. +51 −0 common/parse_file.ml
  30. +11 −0 common/parsers.mli
  31. +50 −0 common/parsers.mly
  32. +25 −0 common/str2.ml
  33. +38 −0 common/time.ml
  34. +502 −0 common/utils.ml
  35. +56 −0 common/utils.mli
  36. +20 −0 common/version.mli
  37. +11 −0 common/version.mlv
  38. 0  concur/.depend
  39. +4 −0 concur/CVS/Entries
  40. +1 −0  concur/CVS/Repository
  41. +1 −0  concur/CVS/Root
  42. +38 −0 concur/Makefile
  43. +83 −0 concur/concur.mli
  44. +2 −0  concur/nothreads/.depend
  45. +5 −0 concur/nothreads/CVS/Entries
  46. +1 −0  concur/nothreads/CVS/Repository
  47. +1 −0  concur/nothreads/CVS/Root
  48. +35 −0 concur/nothreads/Makefile
  49. +181 −0 concur/nothreads/concur.ml
  50. +16 −0 concur/nothreads/dummy.c
  51. +128 −0 concur/nothreads/select.c
  52. 0  concur/threads/.depend
  53. +3 −0  concur/threads/CVS/Entries
  54. +1 −0  concur/threads/CVS/Repository
  55. +1 −0  concur/threads/CVS/Root
  56. +53 −0 concur/threads/Makefile
  57. +90 −0 concur/threads/concur.ml
  58. +364 −0 configure
  59. +9 −0 doc/CVS/Entries
  60. +1 −0  doc/CVS/Repository
  61. +1 −0  doc/CVS/Root
  62. +29 −0 doc/Makefile
  63. +210 −0 doc/ProgGuide.txt
  64. +25 −0 doc/efuns-users-help.txt
  65. +4,356 −0 doc/encoding.txt
  66. +9 −0 doc/figs/CVS/Entries
  67. +1 −0  doc/figs/CVS/Repository
  68. +1 −0  doc/figs/CVS/Root
  69. +3,507 −0 doc/figs/bar.eps
  70. +9,439 −0 doc/figs/browser.eps
  71. +8,421 −0 doc/figs/graphics.eps
  72. +430 −0 doc/figs/hello.eps
  73. +8,893 −0 doc/figs/notebook.eps
  74. +11,693 −0 doc/figs/panel.eps
  75. +6,701 −0 doc/figs/table.eps
  76. +2,027 −0 doc/figs/tree.eps
  77. +950 −0 doc/gwml.tex
  78. +11 −0 doc/html/CVS/Entries
  79. +1 −0  doc/html/CVS/Repository
  80. +1 −0  doc/html/CVS/Root
  81. BIN  doc/html/hello.gif
  82. +631 −0 doc/html/wxlib.html
  83. BIN  doc/html/wxlib001.gif
  84. BIN  doc/html/wxlib002.gif
  85. BIN  doc/html/wxlib003.gif
  86. BIN  doc/html/wxlib004.gif
  87. BIN  doc/html/wxlib005.gif
  88. BIN  doc/html/wxlib006.gif
  89. BIN  doc/html/wxlib007.gif
  90. BIN  doc/html/wxlib008.gif
  91. +15,444 −0 doc/proto.txt
  92. +722 −0 doc/wxlib.tex
  93. +5 −0 dynlink/.cvsignore
  94. +26 −0 dynlink/.depend
  95. +14 −0 dynlink/CVS/Entries
  96. +1 −0  dynlink/CVS/Repository
  97. +1 −0  dynlink/CVS/Root
  98. +67 −0 dynlink/Makefile
  99. +49 −0 dynlink/README
  100. +121 −0 dynlink/bytecompat.c
  101. +1 −0  dynlink/cmos
  102. +107 −0 dynlink/dyneval.ml
  103. +257 −0 dynlink/dynlink.ml_
  104. +1 −0  dynlink/dynlink.mli
  105. +83 −0 dynlink/example.ml
  106. +79 −0 dynlink/getglobal.c
  107. +1,454 −0 dynlink/interp.ml
  108. +261 −0 dynlink/linker.ml
  109. +7 −0 dynlink/other/CVS/Entries
  110. +1 −0  dynlink/other/CVS/Repository
  111. +1 −0  dynlink/other/CVS/Root
  112. +1,399 −0 dynlink/other/interp1.ml
  113. +777 −0 dynlink/other/interp2.ml
  114. +1,349 −0 dynlink/other/interp3.ml
  115. +1,403 −0 dynlink/other/interp4.ml
  116. +731 −0 dynlink/other/interp_noeff.ml
  117. +629 −0 dynlink/other/interp_term.ml
  118. +6 −0 dynlink/patchs/CVS/Entries
  119. +1 −0  dynlink/patchs/CVS/Repository
  120. +1 −0  dynlink/patchs/CVS/Root
  121. +205 −0 dynlink/patchs/array.c
  122. +301 −0 dynlink/patchs/asmlink.ml
  123. +1,145 −0 dynlink/patchs/cmmgen.ml
  124. +26 −0 dynlink/patchs/cmmgen.mli
  125. +190 −0 dynlink/patchs/fail.c
  126. +32 −0 dynlink/test.ml
  127. +106 −0 efuns.spec
  128. +17 −0 efuns/.cvsignore
  129. +346 −0 efuns/.depend
  130. +31 −0 efuns/AFAIRE
  131. +58 −0 efuns/CVS/Entries
  132. +1 −0  efuns/CVS/Repository
  133. +1 −0  efuns/CVS/Root
  134. +320 −0 efuns/Changes.efuns
  135. 0  efuns/FAQ.efuns
  136. +120 −0 efuns/Makefile
  137. +165 −0 efuns/abbrevs.ml
  138. +58 −0 efuns/abbrevs_mode.ml
  139. +216 −0 efuns/accents_mode.ml
  140. +902 −0 efuns/c_mode.mll
  141. +200 −0 efuns/compil.ml
  142. +400 −0 efuns/complex.ml
  143. +179 −0 efuns/dired.ml
  144. +403 −0 efuns/ebuffer.ml
  145. +47 −0 efuns/ebuffer.mli
  146. BIN  efuns/efuns.gif
  147. +460 −0 efuns/efuns.ml
  148. +36 −0 efuns/efuns_client.ml
  149. +133 −0 efuns/efuns_filebrowser.ml
  150. +120 −0 efuns/efuns_texbrowser.ml
  151. +14 −0 efuns/efunsrc.ml
  152. +95 −0 efuns/eval.ml
  153. +42 −0 efuns/fill_mode.ml
  154. +627 −0 efuns/frame.ml
  155. +48 −0 efuns/frame.mli
  156. +271 −0 efuns/html_mode.mll
  157. +66 −0 efuns/interactive.ml
  158. +154 −0 efuns/keymap.ml
  159. +48 −0 efuns/lexpath.mll
  160. +566 −0 efuns/lisp_mode.mll
  161. +76 −0 efuns/local.ml
  162. +32 −0 efuns/local.mli
  163. +121 −0 efuns/main.ml
  164. +113 −0 efuns/makefile_mode.ml
  165. +108 −0 efuns/minibuffer.ml
  166. +42 −0 efuns/minor_mode_sample.ml
  167. +84 −0 efuns/multi_frames.ml
  168. 0  efuns/ocaml_compat.mli
  169. 0  efuns/ocaml_dynlink.ml
  170. +178 −0 efuns/ocaml_mode.mli
  171. +1,490 −0 efuns/ocaml_mode.mll
  172. +258 −0 efuns/ocaml_toplevel.ml
  173. +35 −0 efuns/paren_mode.ml
  174. +309 −0 efuns/search.ml
  175. +34 −0 efuns/search.mli
Sorry, we could not display the entire diff because too many files (1,233) changed.
View
49 .Makefile.config
@@ -0,0 +1,49 @@
+#####################################################################
+#
+# DO NOT MODIFY BELOW THIS LINE, UNLESS REALLY SURE
+# Do not modify this file. Modify .Makefile.config instead.
+#
+#####################################################################
+
+OCAMLCI=$(OCAMLC)
+OCAMLDEP=ocamldep
+OCAMLLEX=ocamllex
+OCAMLYACC=ocamlyacc
+OFLAGS=
+RANLIB=ranlib
+
+
+EFUNS_VERSION=$(VERSION)
+GWML_VERSION=$(VERSION)
+EFUNSLIB=$(EFUNSDIR)/$(OCAMLVERSION)-$(VERSION)
+GWMLLIB=$(GWMLDIR)/$(OCAMLVERSION)-$(VERSION)
+INSTALLDIR=$(XLIBDIR)/$(OCAMLVERSION)-$(VERSION)
+
+OCAMLCL=$(OCAMLC) -custom
+
+THREADS_CMA= -thread threads.cma
+
+LIBDIR= -I ../concur -I $(CURDIR)/xlib -I $(CURDIR)/common
+
+BYTE_LINK_UNIX=-cclib -lunix unix.cma
+BYTE_LINK_CCR= -cclib $(CURDIR)/concur/libconcur.a $(CURDIR)/concur/concur.cma
+BYTE_LINK_X= $(CURDIR)/xlib/xlib.cma
+BYTE_LINK_COM= $(CURDIR)/common/common.cma
+BYTE_LINK_STR= -cclib -lstr str.cma
+
+OPT_LINK_UNIX= -cclib -lunix unix.cmxa
+OPT_LINK_CCR= -cclib $(CURDIR)/concur/libconcurnat.a $(CURDIR)/concur/concur.cmxa
+OPT_LINK_X= $(CURDIR)/xlib/xlib.cmxa
+OPT_LINK_COM= $(CURDIR)/common/common.cmxa
+OPT_LINK_STR= -cclib -lstr str.cmxa
+
+BYTE_ALL_X= $(BYTE_LINK_UNIX) $(BYTE_LINK_STR) $(BYTE_LINK_COM) $(BYTE_LINK_CCR) $(BYTE_LINK_X)
+OPT_ALL_X= $(OPT_LINK_UNIX) $(OPT_LINK_STR) $(OPT_LINK_COM) $(OPT_LINK_CCR) $(OPT_LINK_X)
+
+BYTE_DEP_CCR= $(CURDIR)/concur/concur.cma $(CURDIR)/concur/libconcur.a
+BYTE_DEP_X= $(CURDIR)/xlib/xlib.cma
+BYTE_DEP_COM= $(CURDIR)/common/common.cma
+
+OPT_DEP_CCR= $(CURDIR)/concur/libconcurnat.a $(CURDIR)/concur/concur.cmxa
+OPT_DEP_X= $(CURDIR)/xlib/xlib.cmxa
+OPT_DEP_COM= $(CURDIR)/common/common.cmxa
View
15 .cache
@@ -0,0 +1,15 @@
+
+prefix=/usr/local
+bindir=/usr/local/bin
+efunsdir=/usr/local/lib/efuns
+gwmldir=/usr/local/lib/gwml
+xlibdir=/usr/local/lib/xlib
+srcdir=.
+byte_threads=nothreads
+opt_threads=nothreads
+efunsdyn=dynlink
+gwmldyn=dynlink
+cc=gcc
+do_depend=no
+use_imlib=yes
+use_esd=yes
View
17 .cache.default
@@ -0,0 +1,17 @@
+efuns_release=0.17.5.0
+efuns_version=017+5
+prefix=/usr/local
+efunsdir=/usr/local/lib/efuns
+gwmldir=/usr/local/lib/gwml
+xlibdir=/usr/local/lib/xlib
+srcdir=.
+byte_threads=nothreads
+opt_threads=nothreads
+efunsdyn=toplevel
+gwmldyn=toplevel
+cc=gcc
+ocamlc=ocamlc.opt
+ocamlopt=ocamlopt.opt
+do_depend=yes
+use_imlib=yes
+use_esd=yes
View
4 .cvsignore
@@ -0,0 +1,4 @@
+version.ml
+.cache
+Makefile.config
+.depend
View
22 CVS/Entries
@@ -0,0 +1,22 @@
+/.Makefile.config/1.15/Wed Jul 26 16:50:40 2000//
+/.cvsignore/1.3/Thu Jan 27 10:09:23 2000//
+/Changes/1.9/Thu Apr 20 12:07:54 2000//
+/INSTALL/1.20/Fri Jan 21 15:08:22 2000//
+/LICENSE/1.1/Thu Feb 24 11:00:22 2000//
+/efuns.spec/1.8/Thu Feb 24 10:15:48 2000//
+D/common////
+D/concur////
+D/doc////
+D/dynlink////
+D/efuns////
+D/gwml////
+D/inliner////
+D/ocamlsrc////
+D/toolkit////
+D/toplevel////
+D/xlib////
+D/tools////
+/.cache.default/1.7/Fri Jan 19 14:15:31 2001//
+/Makefile/1.47/Fri Jan 19 15:15:15 2001//
+/Makefile.rules/1.11/Fri Jan 19 15:10:34 2001//
+/configure/1.30/Fri Mar 9 13:20:27 2001//
View
1  CVS/Repository
@@ -0,0 +1 @@
+devel/efuns
View
1  CVS/Root
@@ -0,0 +1 @@
+beaune:/home/beaune/moscova/lefessan/cvs_repository
View
52 Changes
@@ -0,0 +1,52 @@
+(***********************************************************************)
+(* *)
+(* Efuns Package *)
+(* *)
+(* Fabrice Le Fessant, projet Para/SOR, INRIA Rocquencourt *)
+(* *)
+(* Copyright 1999 Institut National de Recherche en Informatique et *)
+(* Automatique. Distributed only by permission. *)
+(* *)
+(***********************************************************************)
+
+Version 018:
+-----------
+* Compatibility with Ocaml 2.99+18 pre 3.00
+
+Version 017:
+-----------
+* Added detection of Imlib for GwML in configure.
+* Integrated bug fix from Hendrik Tews
+
+Version 016:
+-----------
+* Added a configure script
+* Move examples to xlib/examples and toolkit/examples
+* New ocamlsrc directory to build the Objective-Caml compiler library.
+* Added a *beta* optimizer for i386 assembly code in inliner (can only be
+ used with a patch applied to ocaml 2.02).
+* Compatibility with Olabl added.
+
+Version 015:
+-----------
+* Added new library WXlib, toolkit of X widgets.
+
+Version 006:
+-----------
+* Added new library Toplevel, to compile and load toplevel phrases in native
+ code and bytecode programs (using Dynlink).
+
+Version 005:
+-----------
+* Added new program Gwml, Generic Window-manager in ML.
+
+Version 002:
+-----------
+* Added new library Dynlink, to dynamically load bytecode modules in native
+ code programs.
+
+Version 001:
+-----------
+* Program Efuns, editor clone of Emacs.
+* Library Xlib, implementing the X protocol.
+* Demo programs.
View
300 INSTALL
@@ -0,0 +1,300 @@
+(***********************************************************************)
+(* *)
+(* EFUNS PACKAGE *)
+(* *)
+(* Fabrice Le Fessant, projet Para/SOR, INRIA Rocquencourt *)
+(* *)
+(* Copyright 1999 Institut National de Recherche en Informatique et *)
+(* Automatique. Distributed only by permission. *)
+(* *)
+(***********************************************************************)
+
+|-----------------|
+| RELEASE NOTES |
+|-----------------|
+
+I'm pleased to release the new version 017 of the Efuns package.
+
+The Efuns package contains:
+ - The Xlib library for Ocaml (complete emulation of the C Xlib library)
+ - The Dynlink library for native code (allow you to dynamically load
+ cmo files in native programs).
+ - The Toplevel library (allow you to evaluate ocaml expressions inside
+ any program as in the toplevel).
+ - The Gwml Generic Window-Manager (a wm configurable in Ocaml).
+ - The Efuns Emacs clone editor (an editor configurable in Ocaml).
+ - The wXtoolkit (a toolkit of widgets based on Xlib)
+
+ Changes:
+
+ The BIG change in this new release is the almost complete configurability
+of efuns and gwml using a .efunsrc and .gwmlrc file with very simple syntax
+to define many options (colors, fonts, key bindings, gwml decorations, efuns
+abbreviations, etc ... ) Each file is created the first time the
+corresponding program is run, and options can be modified and saved from the
+program.
+
+ In GwML, you can now use images, load themes from WindowMaker or Afterstep, and
+add funny decorations to your windows (try the /usr/local/share/GwML/... decos).
+
+The package is available on:
+
+ http://pauillac.inria.fr/para/cdrom/prog/unix/efuns
+
+Mailing-lists:
+
+ efuns-talk@talbot.inria.fr
+ gwml-talk@talbot.inria.fr
+
+Note: I use Efuns for editing my Ocaml files every day, and Gwml as my
+current window-manager. These programs can be improved a lot. Just try
+it. I'm available to help everyone wanting to use or improve these
+libraries and programs.
+
+|----------------|
+| REQUIREMENTS |
+|----------------|
+
+You need Objective-Caml installed, at least version 2.01.
+This package was released for Objective-Caml 2.04. For later versions,
+you may check at the URL specified in the RELEASE NOTES.
+
+To compile GwML with image support, you need to have Imlib installed.
+This is normally done on Linux systems where Gnome is installed, but you can also
+download it from ftp.gnome.org.
+
+|----------------|
+| INSTALLATION |
+|----------------|
+
+1. Execute the ./configure script. Default options values for this script are
+in .cache.default . When an option has been set once, other calls to
+configure will keep this option, unless you specify a new value or remove
+the .cache file.
+
+-srcdir: Where the sources of Ocaml are. This is only required if you want to
+ compile the Toplevel library. This automatically forces Efuns and GwML to
+ use the toplevel library.
+-help: all options.
+-prefix: set the directory prefix (/usr,/usr/local,~/local, etc ...)
+ for the installation.
+-libdir: directory where Ocaml is installed, and where some libraries
+ will be installed. This directory is found automatically using "ocamlc -v".
+-bindir: directory where "efuns" and "gwml" executables will be installed.
+ (def: /usr/local/bin)
+-efunsdir: directory where Efuns files will be installed
+ (def: /usr/local/lib/efuns)
+-gwmldir: directory where Gwml files will be installed
+ (def: /usr/local/lib/gwml)
+-byte_threads: should the bytecode version use threads (safe is not).
+-opt_threads: should the native code version usr threads (safe is not).
+-efunsdyn: Which library should be used to build Efuns (dynlink or toplevel).
+-gwmldyn: Which library should be used to build Gwml (dynlink or toplevel).
+
+ The configure script will verify your version of Ocaml, and create some
+links in some directories.
+
+2. Build dependencies: "make depend" (done automatically by the
+ configure script).
+3. Compile in bytecode: "make byte"
+4. Compile in native code: "make opt" (or "make all" for byte and opt)
+5. Install the bytecode version: "make install"
+6. Install the native version: "make installopt"
+7. cd gwml; make install-themes
+
+|-----------------|
+| CONFIGURATION |
+|-----------------|
+
+ Normally, sources are installed in the $PREFIX/lib/gwml and
+$PREFIX/lib/efuns directories, so that you can modify these files, and
+compile them again (using "gwml -c" or "efuns -c" to avoid clashes between
+the versions of ocaml currently installed and the one used to compile the
+package.
+
+ GwML is configured by modifying the gwmlrc.ml file, and recompiling it
+(in your own .gwml-$(VERSION)) directory (.gwml-16+1 for example). You can
+also modify the ~/.gwmlrc.ml file (without recompiling), but you cannot
+change a lot of things that way.
+ Efuns is configured by modifying the efunsrc.ml file, and recompiling it.
+
+ GwML can also be configured by modifying the .Xdefaults (see doc/gwml.tex)
+or the ~/.gwmlrc created the first time it is started.
+
+|-----------------|
+| DOCUMENTATION |
+|-----------------|
+
+ For now, few documentation is provided in the doc/ directory. The best way
+(for now) to learn how to use them is to look at the sources. In particular,
+efuns/xlib/examples and efuns/toolkit/examples contain several demos of Xlib
+and WXlib applications. You can also send e-mails to:
+
+efuns-talk@talbot.inria.fr
+gwml-talk@talbot.inria.fr
+
+ You can also subscribe to these mailing-lists by sending a mail to:
+
+mailing-list@talbot.inria.fr
+
+ with the names of the list to which you want to subscribe or unsubscribe.
+These lists are not moderated, thus, if you notice some spams, send a mail to
+the previous address and the list will become moderated.
+
+ In the doc/ directory, you can find documentation for:
+- Efuns: ProGuide.txt et efuns-users-help.txt
+- Gwml: gwml.tex (use "make gwml.ps" to create the postscript version).
+- wXlib: wxlib.tex (use "make wxlib.ps" to create the postscript version).
+- xlib: encoding.txt et proto.txt (for the X protocol).
+
+ Here is a small documentation for all libraries and programs:
+
+ * Xlib:
+ =======
+ This library is an implementation of the C Xlib in Objective-Caml.
+This library doesn't use any C code. It performs all the operations
+in Objective-Caml (TCP connection with the server, translation of
+requests into X protocol packets, translation of reply/events packets
+to Ocaml events). All useful types are in the Xtypes module.
+X protocol requests are in the X module, while other useful functions
+are in the Xlib module. Other modules are more specialized (Icccm for ICCCM
+compliance, XA for atoms, XC for cursors, XK for keysyms, Shape for the
+shape extension, Xpm for pixmaps, Xrm for ressources, Zpixmap for
+Zpixmap images, Xtext for text functions, KeyBind for Key functions).
+
+ In extension, it contains a Graphics module providing the same interface
+as the Graphics module of the standard library. Thus, programs designed
+for this library are allowed to use all X powerful functions.
+
+ All useful types are in xlib/xtypes.ml. Useful constants are in
+xlib/xtypes.ml, xlib/xA.ml (atoms), xlib/xK.ml (keysyms) and xC.ml
+(cursors).. The X protocol is implemented in three modules: X (calls with
+replies are synchronous, calls with no reply are asynchronous), Xsync (all
+calls are synchronous, and errors are raised immediately), and Xasync (all
+calls are asynchronous, and tokens(Jeton.t) are given to retrieve results and
+errors later).
+
+ Functions names are quite similar to the C functions. For example,
+XCreateWindow -> X.createWindow (or Xsync or Xasync). Parameters may appear
+in different orders (have a look at xlib/x.mli for their exact types, or
+xlib/x.ml for their meanings).
+
+ Other useful functions are implemented in other modules, such as Xlib
+(openDisplay, nextEvent, ...), Xutils (raiseWindow, textExtents, ...), Xrm
+(ressources management), Xpm (pixmaps and bitmaps), Shape (shape extension),
+XA (atoms), XC (Cursors) and XK (keysyms), KeyBind (lookupString,
+keycodeToKeysym, ...) and Icccm (ICCCM protocol).
+
+ * AsmDynlink:
+ =============
+ This library provide the same functionnalities as
+ the bytecode version (ie to load bytecode modules in executables),
+ and has the same interface. The library contains an interpreter for
+ Ocaml bytecode and a linker. It is about 3/4 times slower than the
+ C interpreter.
+
+ * Efuns:
+ ========
+ A clone of Emacs with lot of key bindings (C-h K) and several
+editing modes (tex_mode, ocaml_mode, makefile_mode, etc ...). Try it by
+editing efuns/simple.ml for example.
+
+ Usage: efuns -help
+
+ Efuns always tries to load "efunsrc.cmo" at startup. This file is searched
+in the following path $HOME:$HOME/.efuns/:$CAMLDIR:$EFUNSPATH where CAMLDIR
+is an envirronment variable for the Objective Caml installation directory and
+EFUNSPATH an envirronment variable for a path to find Efuns files.
+
+ * Gwml:
+ =======
+ Gwml is a window-manager, inspired from GWM, the Generic Window Manager. It
+is configurable in Ocaml Have a look at gwml/config/gwmlrc.ml for my config
+(based on the Std*.ml default config). You can even do a "make" in
+gwml/config to install this config in ~/.gwml-???. GwML starts by loading the
+gwmlrc.cmo file in ~/.gwml-??? where ??? is the version (016 for example).
+
+ * Toplevel:
+ ===========
+ A library to evaluate ocaml strings in a program (even native).
+Look at toplevel/dyneval.mli for its interface. (Note that the dynlink
+library is included in the toplevel library). To try it, build Gwml with
+GWML_DYNLINK=toplevel and try "gwml -talk".
+
+|--------------|
+| KNOWN BUGS |
+|--------------|
+
+* Xlib
+ 1. Shape extension not tested yet.
+
+* Efuns
+ 1. Bad indentation of function call parameters in Ocaml mode.
+ 2. A second cursor can appear on a frame (use M-x to remove it).
+ 3. Selection by mouse is difficult when scrolling is used or for
+ multiple lines line.
+
+* Gwml
+ 1. Wobs borderwidths are not taken into account.
+ 2. Shaped windows are not well decorated.
+ 3. If a menu is present when a new window is created, it stays on screen
+ (click on it with a button to destroy it)
+ 4. Imlib uses a different connection to the X server. This means that,
+ if the server is grabbed, any call to Imlib will be blocked.
+
+* WXlib
+ 1. Not multithreaded
+
+* Dynlink:
+ 1. C functions must be added through the
+ Linker.Prims.insert_one: string -> ('a -> 'b) -> unit
+ function, which doesn't exist on the bytecode version.
+ (we should ask ocamlopt to generate the same table as ocamlc).
+
+* Toplevel:
+ 1. Segfault when running ocamlc (modules of ocamlc are loaded
+ dynamically) on big files (> 100Kb).
+
+|-------------|
+| TODO LIST |
+|-------------|
+
+* Efuns:
+ 1. Add "print-buffer" function, and maybe a dialog box for configuration ?
+ 2. Add minor mode "flyspell"
+ 3. Simplify the use of local variables:
+ 3.1 Add local variables to modes:
+ Search sort: buffer, minor modes, major mode, location
+ 3.2 Add new functions to modify or print variable values:
+set-local-variable (current buffer)
+set-<minor-mode>-variable (minor modes, all buffers)
+set-major-variable (major modes, all buffers)
+set-global-variable (all buffers)
+ 3.3 Set local variables from buffer comments when buffer is loaded.
+ EFUNS_START
+set-local variable value;
+add-local variable value;
+ EFUNS_END
+ 3.4 Set local variable from files in the filesystem tree:
+.efuns_vars (in local directory or parents with depth load-vars-depth)
+
+* Gwml
+ 1. Use WXlib widgets instead of proprietary widgets
+
+|-------------------------------|
+| PROBLEMS/ COMMENTS/ CONTACT |
+|-------------------------------|
+
+See the DOCUMENTATION section for mailing-lists. You can also directly send
+a mail to:
+
+Fabrice LE FESSANT
+Moscova/Para/Sor Projects
+INRIA Rocquencourt, FRANCE
+
+Email: fabrice.le_fessant@inria.fr
+
+http://pauillac.inria.fr/~lefessan
+http://pauillac.inria.fr/efuns
+http://pauillac.inria.fr/gwml
+http://pauillac.inria.fr/~lefessan/src
View
600 LICENSE
@@ -0,0 +1,600 @@
+All files marked "Copyright INRIA" in the following directories and
+their sub-directories are distributed under the terms of the GNU
+Library General Public License (included below):
+
+ common, concur, dynlink, ocamlsrc, toolkit, toplevel, xlib
+
+All files marked "Copyright INRIA" in the other directories and their
+sub-directories are distributed under the terms of the Q Public
+License version 1.0 (included below).
+
+----------------------------------------------------------------------
+
+ THE Q PUBLIC LICENSE version 1.0
+
+ Copyright (C) 1999 Troll Tech AS, Norway.
+ Everyone is permitted to copy and
+ distribute this license document.
+
+The intent of this license is to establish freedom to share and change
+the software regulated by this license under the open source model.
+
+This license applies to any software containing a notice placed by the
+copyright holder saying that it may be distributed under the terms of
+the Q Public License version 1.0. Such software is herein referred to
+as the Software. This license covers modification and distribution of
+the Software, use of third-party application programs based on the
+Software, and development of free software which uses the Software.
+
+ Granted Rights
+
+1. You are granted the non-exclusive rights set forth in this license
+provided you agree to and comply with any and all conditions in this
+license. Whole or partial distribution of the Software, or software
+items that link with the Software, in any form signifies acceptance of
+this license.
+
+2. You may copy and distribute the Software in unmodified form
+provided that the entire package, including - but not restricted to -
+copyright, trademark notices and disclaimers, as released by the
+initial developer of the Software, is distributed.
+
+3. You may make modifications to the Software and distribute your
+modifications, in a form that is separate from the Software, such as
+patches. The following restrictions apply to modifications:
+
+ a. Modifications must not alter or remove any copyright notices
+ in the Software.
+
+ b. When modifications to the Software are released under this
+ license, a non-exclusive royalty-free right is granted to the
+ initial developer of the Software to distribute your
+ modification in future versions of the Software provided such
+ versions remain available under these terms in addition to any
+ other license(s) of the initial developer.
+
+4. You may distribute machine-executable forms of the Software or
+machine-executable forms of modified versions of the Software,
+provided that you meet these restrictions:
+
+ a. You must include this license document in the distribution.
+
+ b. You must ensure that all recipients of the machine-executable
+ forms are also able to receive the complete machine-readable
+ source code to the distributed Software, including all
+ modifications, without any charge beyond the costs of data
+ transfer, and place prominent notices in the distribution
+ explaining this.
+
+ c. You must ensure that all modifications included in the
+ machine-executable forms are available under the terms of this
+ license.
+
+5. You may use the original or modified versions of the Software to
+compile, link and run application programs legally developed by you or
+by others.
+
+6. You may develop application programs, reusable components and other
+software items that link with the original or modified versions of the
+Software. These items, when distributed, are subject to the following
+requirements:
+
+ a. You must ensure that all recipients of machine-executable
+ forms of these items are also able to receive and use the
+ complete machine-readable source code to the items without any
+ charge beyond the costs of data transfer.
+
+ b. You must explicitly license all recipients of your items to
+ use and re-distribute original and modified versions of the
+ items in both machine-executable and source code forms. The
+ recipients must be able to do so without any charges whatsoever,
+ and they must be able to re-distribute to anyone they choose.
+
+ c. If the items are not available to the general public, and the
+ initial developer of the Software requests a copy of the items,
+ then you must supply one.
+
+ Limitations of Liability
+
+In no event shall the initial developers or copyright holders be
+liable for any damages whatsoever, including - but not restricted to -
+lost revenue or profits or other direct, indirect, special, incidental
+or consequential damages, even if they have been advised of the
+possibility of such damages, except to the extent invariable law, if
+any, provides otherwise.
+
+ No Warranty
+
+The Software and this license document are provided AS IS with NO
+WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ Choice of Law
+
+This license is governed by the Laws of France. Disputes shall be
+settled by the Court of Versailles.
+
+----------------------------------------------------------------------
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
View
214 Makefile
@@ -0,0 +1,214 @@
+include Makefile.config
+
+
+DISTRIB=$(HOME)/public_html/src/efuns
+FTP_DIR=/net/pauillac/infosystems/www/para/cdrom/ftp/efuns
+EFUNS_TAR=efuns-$(VERSION).src.tar.gz
+
+ALLLIBS=tools.opt common.opt concur.opt xlib.opt wXlib.opt dynlink.opt $(DYNLINK).opt \
+ $(GWML_DYNLINK).opt gwml.opt $(EFUNS_DYNLINK).opt efuns.opt
+GWMLLIBS=common.opt concur.opt xlib.opt $(GWML_DYNLINK).opt gwml.opt
+EFUNSLIBS=common.opt concur.opt xlib.opt wXlib.opt $(EFUNS_DYNLINK).opt efuns.opt
+
+all: byte opt
+byte: $(ALLLIBS:.opt=.byte)
+opt: $(ALLLIBS)
+install: installbyte installopt
+installbyte: $(ALLLIBS:.opt=.installbyte)
+installopt: $(ALLLIBS:.opt=.installopt)
+
+gwml: $(GWMLLIBS)
+efuns: $(EFUNSLIBS)
+install-gwml: $(GWMLLIBS:.opt=.installopt)
+ $(MAKE) install-icons install-themes
+install-efuns: $(EFUNSLIBS:.opt=.installopt)
+
+
+tools.opt:
+ (cd tools; $(MAKE) opt)
+tools.byte:
+ (cd tools; $(MAKE) byte)
+tools.installbyte:
+ (cd tools; $(MAKE) install)
+tools.installopt:
+ (cd tools; $(MAKE) installopt)
+
+common.opt:
+ (cd ocamlsrc/version/include; $(MAKE))
+ (cd common; $(MAKE) opt)
+common.byte:
+ (cd ocamlsrc/version/include; $(MAKE))
+ (cd common; $(MAKE) byte)
+common.installbyte:
+ (cd common; $(MAKE) install)
+common.installopt:
+ (cd common; $(MAKE) installopt)
+
+
+
+
+concur.opt:
+ (cd concur; $(MAKE) opt)
+concur.byte:
+ (cd concur; $(MAKE) byte)
+concur.installbyte:
+ (cd concur; $(MAKE) install)
+concur.installopt:
+ (cd concur; $(MAKE) installopt)
+
+
+
+
+xlib.opt:
+ (cd xlib; $(MAKE) opt)
+xlib.byte:
+ (cd xlib; $(MAKE) byte)
+xlib.installbyte:
+ (cd xlib; $(MAKE) install)
+xlib.installopt:
+ (cd xlib; $(MAKE) installopt)
+
+
+
+
+wXlib.opt:
+ (cd toolkit; $(MAKE) opt)
+wXlib.byte:
+ (cd toolkit; $(MAKE) byte)
+wXlib.installbyte:
+ (cd toolkit; $(MAKE) install)
+wXlib.installopt:
+ (cd toolkit; $(MAKE) installopt)
+
+
+
+
+dynlink.opt:
+ (cd dynlink; $(MAKE) opt)
+dynlink.byte:
+ (cd dynlink; $(MAKE) byte)
+dynlink.installopt:
+ (cd dynlink; $(MAKE) installopt)
+dynlink.installbyte:
+ (cd dynlink; $(MAKE) install)
+
+
+
+
+toplevel.opt:
+ (cd ocamlsrc; $(MAKE) top.opt)
+ (cd toplevel; $(MAKE) opt)
+toplevel.byte:
+ (cd ocamlsrc; $(MAKE) top.byte)
+ (cd toplevel; $(MAKE) byte)
+toplevel.installopt:
+ (cd ocamlsrc; $(MAKE) installopt)
+ (cd toplevel; $(MAKE) installopt)
+toplevel.installbyte:
+ (cd ocamlsrc; $(MAKE) installbyte)
+ (cd toplevel; $(MAKE) install)
+
+
+
+gwml.opt:
+ (cd gwml; $(MAKE) opt)
+gwml.byte:
+ (cd gwml; $(MAKE) byte)
+gwml.installopt:
+ (cd gwml; $(MAKE) installopt install-icons install-themes)
+gwml.installbyte:
+ (cd gwml; $(MAKE) installopt install-icons install-themes)
+
+
+efuns.opt:
+ (cd efuns; $(MAKE) opt)
+efuns.byte:
+ (cd efuns; $(MAKE) byte)
+efuns.installopt:
+ (cd efuns; $(MAKE) installopt)
+efuns.installbyte:
+ (cd efuns; $(MAKE) install)
+
+
+commit:
+ cvs commit -m "Version $(VERSION)"
+
+update:
+ cvs update; $(MAKE) depend
+
+demos.byte:
+ (cd xlib; $(MAKE) demos.byte)
+ (cd toolkit; $(MAKE) demos.byte)
+demos.opt:
+ (cd xlib; $(MAKE) demos.opt)
+ (cd toolkit; $(MAKE) demos.opt)
+
+demos: demos.byte demos.opt
+
+tar:
+ rm -rf $(HOME)/distrib/efuns
+ rm -rf $(HOME)/distrib/efuns-$(VERSION)
+ (cd $(HOME)/distrib; cvs co efuns; mv efuns efuns-$(VERSION); tar zcf $(EFUNS_TAR) efuns)
+ rm -f $(FTP_DIR)/$(EFUNS_TAR)
+ rm -f $(FTP_DIR)/efuns.src.tar.gz
+ cp $(HOME)/distrib/efuns-$(VERSION).tar.gz $(FTP_DIR)/$(EFUNS_TAR)
+ ln -s $(EFUNS_TAR) $(FTP_DIR)/efuns.src.tar.gz
+
+distrib: commit
+ mkdir -p $(HOME)/distrib/test
+ (cd $(HOME)/distrib/test;rm -rf efuns;cvs co efuns;cd efuns;$(MAKE) byte opt)
+ (cd $(HOME)/distrib;rm -rf efuns;cvs co efuns)
+ (cd $(HOME)/distrib;tar zcf $(DISTRIB)/efuns-$(VERSION).src.tar.gz efuns)
+ ln -sf efuns-$(VERSION).src.tar.gz $(DISTRIB)/efuns.tar.gz
+
+specialix: commit
+ (cd $(HOME)/specialix/devel/efuns;cvs update)
+
+depend:
+ (cd tools; make versionpatch)
+ (cd ocamlsrc/version/include; $(MAKE) depend)
+ (cd concur; $(MAKE) depend)
+ (cd xlib; $(MAKE) depend)
+ (cd common; $(MAKE) depend)
+ (cd toolkit; $(MAKE) depend)
+ (cd dynlink; $(MAKE) depend)
+ (cd $(DYNLINK); $(MAKE) depend)
+ (cd efuns; $(MAKE) depend)
+ (cd gwml; $(MAKE) depend)
+
+clean:
+ rm -f *~ core version.ml
+ (cd tools; $(MAKE) clean)
+ (cd ocamlsrc; $(MAKE) topclean)
+ (cd concur; $(MAKE) clean)
+ (cd xlib; $(MAKE) clean)
+ (cd dynlink; $(MAKE) clean)
+ (cd toplevel; $(MAKE) clean)
+ (cd common; $(MAKE) clean)
+ (cd efuns; $(MAKE) clean)
+ (cd gwml; $(MAKE) clean)
+ (cd toolkit; $(MAKE) clean)
+ (cd ocamlsrc/version/include; $(MAKE) clean)
+
+fullclean: clean
+ rm -f .cache Makefile.config
+ (cd ocamlsrc; rm -f asmcomp config tools utils driver toplevel version asmcomp ocamlc boot ocamlopt bytecomp compat_comp.ml parsing byterun stdlib typing .depend)
+ rm -f inliner/perf/.depend common/.depend inliner/perf/Moretest/.depend concur/.depend inliner/tests/.depend concur/nothreads/.depend concur/threads/.depend toolkit/.depend dynlink/.depend toolkit/examples/.depend efuns/.depend toplevel/.depend gwml/.depend xlib/.depend inliner/.depend xlib/examples/.depend
+ rm -f efuns/common/compat_run.ml efuns/dynlink/dynlink.mli efuns/toplevel/dynlink.mli
+
+SOURCES=/usr/src/redhat/SOURCES/efuns-$(RELEASE)
+
+rpm.src:
+ rm -rf $(SOURCES)
+ cp -dpR . $(SOURCES)
+
+rpm.clean:
+ (cd $(SOURCES);$(MAKE) fullclean;rm -rf `find . -name CVS -print`)
+
+rpm.tar:
+ (cd /usr/src/redhat/SOURCES; tar zcf efuns-$(VERSION).src.tar.gz efuns-$(RELEASE))
+
+rpm.build:
+ rpm -ba efuns.spec
+
+rpm: rpm.src rpm.clean rpm.tar rpm.build
View
80 Makefile.config
@@ -0,0 +1,80 @@
+
+RELEASE=0.17.5.0
+VERSION=017+5
+CURDIR=/home/cremant/lefessan/devel/efuns
+PREFIX=/usr/local
+OCAMLLIB=/usr/local/lib/ocaml-3.01/lib
+OCAMLVERSION=3.01
+INSTALLBIN=/usr/local/bin
+EFUNSDIR=/usr/local/lib/efuns
+GWMLDIR=/usr/local/lib/gwml
+XLIBDIR=/usr/local/lib/xlib
+BYTE_THREADS=nothreads
+OPT_THREADS=nothreads
+DYNLINK=dynlink
+OCAMLSRC=.
+EFUNS_DYNLINK=dynlink
+GWML_DYNLINK=dynlink
+CC=gcc
+OCAMLC=/usr/local/bin/ocaml/ocamlc.opt
+OCAMLRUN=ocamlrun
+OCAMLOPT=ocamlopt.opt
+IMLIB_COBJS=imlib_stubs.o
+IMLIB_CFLAGS=-ccopt "-I/usr/X11R6/include"
+IMLIB_CLINK=-cclib "-L/usr/lib -lImlib -ljpeg -ltiff -lungif -lpng -lz -lm -lXext -L/usr/X11R6/lib -lSM -lICE -lXext -lX11"
+ESD_COBJS=esd_stubs.o
+ESD_CFLAGS=
+ESD_CLINK=-cclib "-L/usr/lib -lesd -laudiofile -lm"
+EFUNS_BYTE_DYN_LINK=
+EFUNS_OPT_DYN_LINK=
+GWML_BYTE_DYN_LINK=
+GWML_OPT_DYN_LINK=
+#####################################################################
+#
+# DO NOT MODIFY BELOW THIS LINE, UNLESS REALLY SURE
+# Do not modify this file. Modify .Makefile.config instead.
+#
+#####################################################################
+
+OCAMLCI=$(OCAMLC)
+OCAMLDEP=ocamldep
+OCAMLLEX=ocamllex
+OCAMLYACC=ocamlyacc
+OFLAGS=
+RANLIB=ranlib
+
+
+EFUNS_VERSION=$(VERSION)
+GWML_VERSION=$(VERSION)
+EFUNSLIB=$(EFUNSDIR)/$(OCAMLVERSION)-$(VERSION)
+GWMLLIB=$(GWMLDIR)/$(OCAMLVERSION)-$(VERSION)
+INSTALLDIR=$(XLIBDIR)/$(OCAMLVERSION)-$(VERSION)
+
+OCAMLCL=$(OCAMLC) -custom
+
+THREADS_CMA= -thread threads.cma
+
+LIBDIR= -I ../concur -I $(CURDIR)/xlib -I $(CURDIR)/common
+
+BYTE_LINK_UNIX=-cclib -lunix unix.cma
+BYTE_LINK_CCR= -cclib $(CURDIR)/concur/libconcur.a $(CURDIR)/concur/concur.cma
+BYTE_LINK_X= $(CURDIR)/xlib/xlib.cma
+BYTE_LINK_COM= $(CURDIR)/common/common.cma
+BYTE_LINK_STR= -cclib -lstr str.cma
+
+OPT_LINK_UNIX= -cclib -lunix unix.cmxa
+OPT_LINK_CCR= -cclib $(CURDIR)/concur/libconcurnat.a $(CURDIR)/concur/concur.cmxa
+OPT_LINK_X= $(CURDIR)/xlib/xlib.cmxa
+OPT_LINK_COM= $(CURDIR)/common/common.cmxa
+OPT_LINK_STR= -cclib -lstr str.cmxa
+
+BYTE_ALL_X= $(BYTE_LINK_UNIX) $(BYTE_LINK_STR) $(BYTE_LINK_COM) $(BYTE_LINK_CCR) $(BYTE_LINK_X)
+OPT_ALL_X= $(OPT_LINK_UNIX) $(OPT_LINK_STR) $(OPT_LINK_COM) $(OPT_LINK_CCR) $(OPT_LINK_X)
+
+BYTE_DEP_CCR= $(CURDIR)/concur/concur.cma $(CURDIR)/concur/libconcur.a
+BYTE_DEP_X= $(CURDIR)/xlib/xlib.cma
+BYTE_DEP_COM= $(CURDIR)/common/common.cma
+
+OPT_DEP_CCR= $(CURDIR)/concur/libconcurnat.a $(CURDIR)/concur/concur.cmxa
+OPT_DEP_X= $(CURDIR)/xlib/xlib.cmxa
+OPT_DEP_COM= $(CURDIR)/common/common.cmxa
View
34 Makefile.rules
@@ -0,0 +1,34 @@
+fclean:
+ rm -f *.cm[iaxo] *.[ao] *.cmxa core *.mlg *.opt *.byte *.log *.out *.exe *~ $(TMPFILES)
+
+fdepend: $(TMPFILES)
+ $(OCAMLDEP) $(INCLUDES) *.ml *.mli > .depend
+
+.SUFFIXES: .mli .ml .cmx .cmo .o .c .cmi .out .exe .mll .mly .ml_
+
+.mli.cmi :
+ $(OCAMLCI) $(OFLAGS) $(INCLUDES) -c $<
+
+.ml.cmi :
+ $(OCAMLC) $(OFLAGS) $(INCLUDES) -c $<
+
+.ml.cmx :
+ $(OCAMLOPT) $(OFLAGS) $(INCLUDES) -c $<
+
+.ml.cmo :
+ $(OCAMLC) $(OFLAGS) $(INCLUDES) -c $<
+
+.mll.ml :
+ ocamllex $<
+
+.mly.ml :
+ ocamlyacc $<
+
+.mly.mli:
+ ocamlyacc $<
+
+.c.o :
+ $(OCAMLC) -o $*.o $(CFLAGS) -c $<
+
+.ml_.ml:
+ $(CURDIR)/tools/versionpatch $(OCAMLVERSION) $<
View
3  common/.cvsignore
@@ -0,0 +1,3 @@
+lexers.ml
+parsers.ml
+version.ml
View
17 common/.depend
@@ -0,0 +1,17 @@
+compat_run.cmo: compat_run.cmi
+compat_run.cmx: compat_run.cmi
+lexers.cmo: parsers.cmi lexers.cmi
+lexers.cmx: parsers.cmx lexers.cmi
+log.cmo: utils.cmi
+log.cmx: utils.cmx
+options.cmo: log.cmo utils.cmi options.cmi
+options.cmx: log.cmx utils.cmx options.cmi
+parse_file.cmo: lexers.cmi parsers.cmi utils.cmi
+parse_file.cmx: lexers.cmx parsers.cmx utils.cmx
+parsers.cmo: parsers.cmi
+parsers.cmx: parsers.cmi
+utils.cmo: lexers.cmi utils.cmi
+utils.cmx: lexers.cmx utils.cmi
+version.cmo: version.cmi
+version.cmx: version.cmi
+lexers.cmi: parsers.cmi
View
19 common/CVS/Entries
@@ -0,0 +1,19 @@
+/.cvsignore/1.2/Tue Mar 2 16:41:39 1999//
+/Makefile/1.22/Mon May 22 08:54:39 2000//
+/compat_run.mli/1.3/Mon May 22 09:14:10 2000//
+/lexers.mli/1.2/Mon Sep 20 13:46:52 1999//
+/lexers.mll/1.2/Mon Sep 20 13:46:52 1999//
+/log.ml/1.3/Wed Jan 12 08:11:13 2000//
+/ocamlrun/1.1/Sat Feb 12 14:48:07 2000//
+/options.ml/1.5/Mon Feb 7 09:55:12 2000//
+/options.mli/1.4/Mon Jan 24 14:48:41 2000//
+/parse_file.ml/1.1/Fri Mar 12 13:35:30 1999//
+/parsers.mly/1.1/Tue Feb 23 12:32:32 1999//
+/str2.ml/1.1/Tue Feb 23 12:32:33 1999//
+/time.ml/1.1/Tue Feb 23 12:32:33 1999//
+/utils.ml/1.15/Fri Jan 21 15:05:20 2000//
+/utils.mli/1.5/Fri Jan 21 15:05:20 2000//
+/version.mli/1.3/Thu Jan 20 16:33:51 2000//
+/version.mlv/1.1/Mon Mar 1 08:17:06 1999//
+/parsers.mli/1.1/Fri Mar 9 13:22:03 2001//
+D
View
1  common/CVS/Repository
@@ -0,0 +1 @@
+devel/efuns/common
View
1  common/CVS/Root
@@ -0,0 +1 @@
+beaune:/home/beaune/moscova/lefessan/cvs_repository
View
79 common/Makefile
@@ -0,0 +1,79 @@
+include ../Makefile.config
+
+all: byte
+
+
+OFLAGS=-I ../ocamlsrc/version/include
+LIBDIR=
+OBJS=str2.cmo time.cmo lexers.cmo parsers.cmo utils.cmo version.cmo log.cmo parse_file.cmo compat_run.cmo instructs.cmo options.cmo
+
+TMPFILES=version.ml parsers.ml lexers.ml
+
+######################### standard rules
+lexers.ml: lexers.mll
+
+version.ml: ../Makefile.config version.mlv
+ cat version.mlv > version.ml
+ echo let ocamllib = \"$(OCAMLLIB)\" >> version.ml
+ echo >> version.ml
+ echo let installdir = \"$(INSTALLDIR)\" >> version.ml
+ echo >> version.ml
+ echo let builder = \"$$USER\" >> version.ml
+ echo >> version.ml
+ echo let date = \"`date`\" >> version.ml
+ echo >> version.ml
+ echo let efuns_version = \"$(EFUNS_VERSION)\" >> version.ml
+ echo >> version.ml
+ echo let efuns_lib = \"$(EFUNSLIB)\" >> version.ml
+ echo >> version.ml
+ echo let gwml_version = \"$(GWML_VERSION)\" >> version.ml
+ echo >> version.ml
+ echo let gwml_lib = \"$(GWMLLIB)\" >> version.ml
+ echo >> version.ml
+ echo let src_dir = \"$(CURDIR)\" >> version.ml
+ echo >> version.ml
+
+tmpfiles: $(TMPFILES)
+
+byte: common.cma tmpfiles
+
+opt: common.cmxa tmpfiles
+
+top:
+ ocamlmktop -custom -o top unix.cma str.cma -cclib "-lunix -lstr"
+
+common.cma: $(OBJS)
+ $(OCAMLC) -a -o common.cma $(OBJS)
+
+common.cmxa: $(OBJS:.cmo=.cmx)
+ $(OCAMLOPT) -a -o common.cmxa $(OBJS:.cmo=.cmx)
+
+install:
+ mkdir -p $(installroot)$(INSTALLDIR)
+ mkdir -p $(installroot)$(INSTALLDIR)/sources
+ cp *.cmi common.cma $(installroot)$(INSTALLDIR)
+ cp *.mli $(installroot)$(INSTALLDIR)/sources
+ cp $(OCAMLLIB)/*.cmi $(installroot)$(INSTALLDIR)
+ cp $(OCAMLLIB)/*.cma $(installroot)$(INSTALLDIR)
+ cp $(OCAMLRUN) $(installroot)$(INSTALLDIR)/ocamlrun
+ cp $(OCAMLC) $(installroot)$(INSTALLDIR)/ocamlc
+
+installopt:
+ mkdir -p $(installroot)$(INSTALLDIR)
+ cp *.cm[ix] common.cmxa common.a $(installroot)$(INSTALLDIR)
+ cp -f *.mli $(installroot)$(INSTALLDIR)/sources
+ (for i in $(OBJS:.cmo=.ml); do \
+ if [ -e "$$i"l ]; then \
+ cp "$$i"l $(installroot)$(INSTALLDIR)/sources; \
+ elif [ -e "$$i"y ]; then \
+ cp "$$i"y $(installroot)$(INSTALLDIR)/sources; \
+ else \
+ cp "$$i" $(installroot)$(INSTALLDIR)/sources; fi; done)
+
+clean:
+ rm -f *.cm? *.mlg *.o *~ *.output core *.s $(TMPFILES) top *.cma *.cmxa *.a
+
+depend: fdepend
+
+include .depend
+include ../Makefile.rules
View
1  common/compat_run.ml
View
46 common/compat_run.mli
@@ -0,0 +1,46 @@
+module My_Obj :
+ sig
+ type t = A of int | B of float | C of string
+ external repr : 'a -> t = "%identity"
+ external obj : t -> 'a = "%identity"
+ external magic : 'a -> 'b = "%identity"
+ external is_block : t -> bool = "obj_is_block"
+ external tag : t -> int = "obj_tag"
+ external size : t -> int = "%obj_size"
+ external field : t -> int -> t = "%obj_field"
+ external set_field : t -> int -> t -> unit = "%obj_set_field"
+ external new_block : int -> int -> t = "obj_block"
+ external dup : t -> t = "obj_dup"
+ external truncate : t -> int -> unit = "obj_truncate"
+ end
+val not_implemented : string -> 'a -> 'b
+val translate : int -> int
+val isint : int -> bool
+module My_Config :
+ sig
+ val exec_magic_number : string
+ val cmi_magic_number : string
+ val cmo_magic_number : string
+ val cma_magic_number : string
+ val cmx_magic_number : string
+ val cmxa_magic_number : string
+ val ast_impl_magic_number : string
+ val ast_intf_magic_number : string
+ end
+module My_Ident :
+ sig
+ val name : Ident.t -> string
+ end
+module Dumpobj : sig val inputu : in_channel -> int end
+module My_Emitcode :
+ sig
+ val transl_const : Lambda.structured_constant -> My_Obj.t
+ end
+module Objinfo :
+ sig
+ val print_digest : string -> unit
+ val print_info : Emitcode.compilation_unit -> unit
+ end
+module Misc : sig val find_in_path : string list -> string -> string end
+val input_library_units : in_channel -> Emitcode.compilation_unit list
+module Externals : sig val caml_primitives : (string * My_Obj.t) list end
View
1  common/instructs.ml
View
14 common/lexers.mli
@@ -0,0 +1,14 @@
+(***********************************************************************)
+(* *)
+(* xlib for Ocaml *)
+(* *)
+(* Fabrice Le Fessant, projet Para/SOR, INRIA Rocquencourt *)
+(* *)
+(* Copyright 1998 Institut National de Recherche en Informatique et *)
+(* Automatique. Distributed only by permission. *)
+(* *)
+(***********************************************************************)
+
+val lexer_passwd: Lexing.lexbuf -> Parsers.token
+val lexer_filename: Lexing.lexbuf -> Parsers.token
+val lexer_glob: Lexing.lexbuf -> string
View
32 common/lexers.mll
@@ -0,0 +1,32 @@
+{
+ open Lexing
+ open Parsers
+}
+
+rule lexer_passwd = parse
+ eof { EOF }
+| '\n' { EOL }
+| ':' { SEP }
+| [^ '\n' ':'] * { IDENT (lexeme lexbuf) }
+
+and lexer_filename = parse
+ eof { EOF }
+| '~' { TILDE }
+| '/' { SEP }
+| [^ '~' '/'] + { IDENT (lexeme lexbuf) }
+
+and lexer_glob = parse
+ "\*" { "\*" }
+ | "\?" { "\?" }
+ | "." { "\." }
+ | "*" { ".*" }
+ | "?" { "." }
+ | "{" { "\\(" }
+ | "}" { "\\)" }
+ | "," { "\\|" }
+ | eof { "" }
+ | _ { lexeme lexbuf }
+
+{
+
+}
View
66 common/log.ml
@@ -0,0 +1,66 @@
+(***********************************************************************)
+(* *)
+(* xlib for Ocaml *)
+(* *)
+(* Fabrice Le Fessant, projet Para/SOR, INRIA Rocquencourt *)
+(* *)
+(* Copyright 1999 Institut National de Recherche en Informatique et *)
+(* Automatique. Distributed only by permission. *)
+(* *)
+(***********************************************************************)
+
+(*
+let lock = ref false
+let discard = ref true
+let list = ref []
+
+let enable () = discard := false
+let disable () = discard := true
+let unlock () =
+ lock := false;
+ let rec iter l =
+ match l with
+ [] -> list := []
+ | s :: tail -> print_string s; iter tail
+ in
+ iter (List.rev !list);
+ flush stdout
+
+let p s =
+ if !discard then () else
+ if !lock then list := s :: !list
+ else print_string s; flush stdout
+
+let lock () = lock := true
+ *)
+
+let logp = ref false
+let log_name = ref ((Filename.basename Sys.argv.(0))^".log")
+
+let outc = ref None
+let outc () =
+ match !outc with
+ None ->
+ let oc = open_out !log_name in
+ outc := Some oc; oc
+ | Some outc -> outc
+
+let printf f x =
+ if !logp then
+ let oc = outc () in
+ Printf.fprintf oc f x;
+ flush oc
+
+let exn f e =
+ if !logp then
+ let oc = outc () in
+ Printf.fprintf oc f (Utils.printexn e);
+ flush oc
+
+let catch format f =
+ try f () with e -> exn format e
+
+let watch format f =
+ try f () with e -> exn format e; raise e
+
+
View
3  common/ocamlrun
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+$*
View
442 common/options.ml
@@ -0,0 +1,442 @@
+(***********************************************************************)
+(* *)
+(* GwML *)
+(* *)
+(* Fabrice Le Fessant, projet Para/SOR, INRIA Rocquencourt *)
+(* *)
+(* Copyright 1999 Institut National de Recherche en Informatique et *)
+(* Automatique. Distributed only by permission. *)
+(* *)
+(***********************************************************************)
+
+
+ (* Simple options:
+ This will enable very simple configuration, by a mouse-based configurator.
+ Options will be defined by a special function, which will also check
+ if a value has been provided by the user in its .gwmlrc file.
+ The .gwmlrc will be created by a dedicated tool, which could be used
+ to generate both .gwmlrc and .efunsrc files.
+
+Note: this is redundant, since such options could also be better set
+in the .Xdefaults file (using Xrm to load them). Maybe we should merge
+both approaches in a latter release.
+
+ *)
+
+type option_value =
+ Module of option_module
+| Value of string
+| List of option_value list
+| SmallList of option_value list
+
+and option_module =
+ (string * option_value) list
+
+type 'a option_class = {
+ class_name : string;
+ from_value : option_value -> 'a;
+ to_value : 'a -> option_value;
+ mutable class_hooks : ('a option_record -> unit) list;
+ }
+
+and 'a option_record = {
+ option_name : string list;
+ option_class : 'a option_class;
+ mutable option_value : 'a;
+ option_help : string;
+ mutable option_hooks : (unit -> unit) list;
+ }
+
+let define_option_class
+ (class_name : string)
+ (from_value : option_value -> 'a)
+ (to_value : 'a -> option_value) =
+ let c = {
+ class_name = class_name;
+ from_value = from_value;
+ to_value = to_value;
+ class_hooks = [];
+ } in
+(* classes := (Obj.magic c : Obj.t option_class) :: !classes; *)
+ c
+
+
+let filename = ref (Filename.concat Utils.homedir
+ ("." ^ (Filename.basename Sys.argv.(0)) ^ "rc"))
+let gwmlrc = ref []
+
+let options = ref []
+
+let rec find_value list m =
+ match list with
+ [] -> raise Not_found
+ | name :: tail ->
+ let m = List.assoc name m in
+ match m, tail with
+ _, [] -> m
+ | Module m, _ :: _ -> find_value tail m
+ | _ -> raise Not_found
+
+let define_option
+ (option_name : string list)
+ (option_help : string)
+ (option_class : 'a option_class)
+ (default_value : 'a)
+ =
+ let o = {
+ option_name = option_name;
+ option_help = option_help;
+ option_class = option_class;
+ option_value = default_value;
+ option_hooks = [];
+ } in
+
+ options := (Obj.magic o : Obj.t option_record) :: !options;
+
+ (* is this option already loaded ??? *)
+ o.option_value <- (try
+ o.option_class.from_value
+ (find_value option_name !gwmlrc)
+ with e ->
+ Log.printf "Options.define_option, for option %s: "
+ (match option_name with [] -> "???" | name :: _ -> name);
+ Log.exn "%s\n" e;
+ default_value);
+ o
+
+
+open Genlex
+
+let lexer = make_lexer [ "=" ; "{" ; "}"; "["; "]"; ";" ; "("; ")"; ","; "."]
+
+let rec parse_gwmlrc = parser
+ [< id = parse_id; 'Kwd "="; v = parse_option ;
+ eof = parse_gwmlrc >] -> (id, v) :: eof
+| [< >] -> []
+
+and parse_option = parser
+| [< 'Kwd "{"; v = parse_gwmlrc; 'Kwd "}" >] -> Module v
+| [< 'Ident s >] -> Value s
+| [< 'String s >] -> Value s
+| [< 'Int i >] -> Value (string_of_int i)
+| [< 'Float f >] -> Value (string_of_float f)
+| [< 'Char c >] -> Value (let s = String.create 1 in s.[0] <- c; s)
+| [< 'Kwd "["; v = parse_list >] -> List v
+| [< 'Kwd "("; v = parse_list >] -> List v
+
+and parse_id = parser
+ [< 'Ident s >] -> s
+| [< 'String s >] -> s
+
+and parse_list = parser
+ [< 'Kwd ";"; v = parse_list >] -> v
+| [< 'Kwd ","; v = parse_list >] -> v
+| [< 'Kwd "."; v = parse_list >] -> v
+| [< v = parse_option; t = parse_list >] -> v :: t
+| [< 'Kwd "]" >] -> []
+| [< 'Kwd ")" >] -> []
+
+let exec_hooks o =
+ List.iter (fun f -> try f () with _ -> ()) o.option_hooks
+
+let exec_chooks o =
+ List.iter (fun f -> try f o with _ -> ()) o.option_class.class_hooks
+
+let really_load filename =
+ let ic = open_in filename in
+ let s = Stream.of_channel ic in
+ try
+ let stream = lexer s in
+ let list = try parse_gwmlrc stream with
+ e ->
+ Printf.printf "At pos %d/%d" (Stream.count s) (Stream.count stream);
+ print_newline ();
+ raise e in
+ List.iter (fun o ->
+ try
+ o.option_value <- o.option_class.from_value
+ (find_value o.option_name list);
+ exec_chooks o;
+ exec_hooks o;
+ with _ -> () (* no error if option is not defined here *)
+ ) !options;
+ list
+ with e ->
+ Printf.printf "Error %s in %s" (Printexc.to_string e) filename;
+ print_newline ();
+ []
+
+let load () =
+ try
+ gwmlrc := really_load !filename
+ with Not_found ->
+ Printf.printf "No %s found" !filename; print_newline ()
+
+let append filename =
+ try
+ gwmlrc := (really_load filename) @ !gwmlrc
+ with Not_found ->
+ Printf.printf "No %s found" filename; print_newline ()
+
+let init () = load ()
+
+let (!!) o = o.option_value
+let (=:=) o v =
+ o.option_value <- v;
+ exec_chooks o;
+ exec_hooks o
+
+let value_to_string v =
+ match v with Value s -> s | _ -> raise Not_found
+let string_to_value s = Value s
+
+let value_to_int v =
+ match v with Value s -> int_of_string s | _ -> raise Not_found
+let int_to_value i = Value (string_of_int i)
+
+(* The Pervasives version is too restrictive *)
+let bool_of_string s = match String.lowercase s with
+ | "true" -> true
+ | "false" -> false
+ | "yes" -> true
+ | "no" -> false
+ | "1" -> true
+ | "0" -> false
+ | _ -> invalid_arg "bool_of_string"
+
+let value_to_bool v =
+ match v with Value s -> bool_of_string s | _ -> raise Not_found
+let bool_to_value i = Value (string_of_bool i)
+
+let value_to_float v =
+ match v with Value s -> float_of_string s | _ -> raise Not_found
+let float_to_value i = Value (string_of_float i)
+
+let value_to_string2 v =
+ match v with List [Value s1; Value s2] -> s1,s2 | _ -> raise Not_found
+let string2_to_value (s1,s2) = SmallList [Value s1; Value s2]
+
+let value_to_list v2c v =
+ match v with List l -> List.map v2c l | _ -> raise Not_found
+
+let list_to_value c2v l = List (
+ List.fold_right (fun v list ->
+ try (c2v v) :: list with _ -> list
+ ) l [])
+
+let smalllist_to_value c2v l = SmallList (
+ List.fold_right (fun v list ->
+ try (c2v v) :: list with _ -> list
+ ) l [])
+
+let value_to_path v =
+ List.map Utils.string_to_filename
+ (match v with Value s -> Utils.string_to_path s
+ | List l -> List.map (fun v -> match v with
+ Value s -> Utils.string_to_filename s | _ -> raise Not_found) l
+ | _ -> raise Not_found)
+
+let path_to_value list = Value (Utils.path_to_string
+ (List.map Utils.filename_to_string list))
+
+let string_option = define_option_class "String"
+ value_to_string string_to_value
+let color_option = define_option_class "Color" value_to_string string_to_value
+let font_option = define_option_class "Font" value_to_string string_to_value
+let int_option = define_option_class "Int" value_to_int int_to_value
+let bool_option = define_option_class "Bool" value_to_bool bool_to_value
+let float_option = define_option_class "Float" value_to_float float_to_value
+let path_option = define_option_class "Path" value_to_path path_to_value
+
+let string2_option = define_option_class "String2"
+ value_to_string2 string2_to_value
+
+let list_option cl = define_option_class (cl.class_name ^ " List")
+ (value_to_list cl.from_value) (list_to_value cl.to_value)
+
+let smalllist_option cl = define_option_class (cl.class_name ^ " List")
+ (value_to_list cl.from_value) (smalllist_to_value cl.to_value)
+
+let to_value cl = cl.to_value
+let from_value cl = cl.from_value
+
+let value_to_sum l v =
+ match v with
+ Value s -> List.assoc s l | _ -> raise Not_found
+
+let sum_to_value l v = Value (List.assq v l)
+
+let sum_option l =
+ let ll = List.map (fun (a1,a2) -> a2,a1) l in
+ define_option_class "Sum" (value_to_sum l) (sum_to_value ll)
+
+let exit_exn = Exit
+let safe_string s =
+ if s = "" then "\"\"" else
+ try
+ match s.[0] with
+ 'a' .. 'z' | 'A' .. 'Z' ->
+ for i = 1 to String.length s - 1 do
+ match s.[i] with
+ 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' -> ()
+ | _ -> raise exit_exn
+ done; s
+ | '0' .. '9' ->
+ for i = 1 to String.length s - 1 do
+ match s.[i] with
+ '0' .. '9' | '.' -> ()
+ | _ -> raise exit_exn
+ done; s
+ | _ -> raise exit_exn
+ with _ ->
+ Printf.sprintf "\"%s\"" (String.escaped s)
+
+let with_help = ref false
+
+let rec save_module indent oc list =
+ let subm = ref [] in
+ List.iter (fun (name, help, value) ->
+ match name with
+ [] -> assert false
+ | [ name ] ->
+ if !with_help && help <> "" then
+ Printf.fprintf oc "(* %s *)\n" help;
+ Printf.fprintf oc "%s %s = " indent (safe_string name);
+ save_value indent oc value;
+ Printf.fprintf oc "\n";
+ | m :: tail ->
+ let p = try List.assoc m !subm
+ with _ ->
+ let p = ref [] in
+ subm := (m, p) :: !subm;
+ p in
+ p := (tail, help, value) :: !p) list;
+ List.iter (fun (m, p) ->
+ Printf.fprintf oc "%s %s = {\n" indent (safe_string m);
+ save_module (indent ^ " ") oc !p;
+ Printf.fprintf oc "%s}\n" indent
+ ) !subm
+
+and save_list indent oc list =
+ match list with
+ [] -> ()
+ | [v] -> save_value indent oc v;
+ | v :: tail ->
+ save_value indent oc v;
+ Printf.fprintf oc ", ";
+ save_list indent oc tail
+
+and save_list_nl indent oc list =
+ match list with
+ [] -> ()
+ | [v] ->
+ Printf.fprintf oc "\n%s" indent;
+ save_value indent oc v;
+ | v :: tail ->
+ Printf.fprintf oc "\n%s" indent;
+ save_value indent oc v;
+ Printf.fprintf oc ";";
+ save_list_nl indent oc tail
+
+and save_value indent oc v =
+ match v with
+ Value s ->
+ Printf.fprintf oc "%s" (safe_string s)
+ | List l ->
+ Printf.fprintf oc "[";
+ save_list_nl (indent ^ " ") oc l;
+ Printf.fprintf oc "]";
+ | SmallList l ->
+ Printf.fprintf oc "(";
+ save_list (indent ^ " ") oc l;
+ Printf.fprintf oc ")";
+ | Module _ ->
+ Printf.fprintf oc "\"\""
+
+let save () =
+ let oc = open_out !filename in
+ save_module "" oc (List.map (fun o ->
+ o.option_name, o.option_help,
+ try o.option_class.to_value o.option_value with e ->
+ Printf.printf "Error while saving option \"%s\": %s"
+ (try List.hd o.option_name with _ -> "???") (Utils.printexn e);
+ print_newline ();
+ Value "")
+ (List.rev !options));
+ (* Save unknown options from gwmlrc *)
+ List.iter (fun (name, value) ->
+ try
+ List.iter (fun o ->
+ match o.option_name with
+ n :: _ -> if n = name then raise Exit
+ | _ -> ())
+ !options;
+ Printf.fprintf oc "%s = " (safe_string name);
+ save_value " " oc value;
+ Printf.fprintf oc "\n";
+ with _ -> ()
+ ) !gwmlrc;
+ close_out oc
+
+let save_with_help () =
+ with_help := true;
+ (try save () with _ -> ());
+ with_help := false
+
+let option_hook option f =
+ option.option_hooks <- f :: option.option_hooks
+
+let class_hook option_class f =
+ option_class.class_hooks <- f :: option_class.class_hooks
+
+let rec iter_order f list =
+ match list with [] -> () | v :: tail -> f v; iter_order f tail
+
+let help oc =
+ List.iter (fun o ->
+ Printf.fprintf oc"OPTION \"";
+ (match o.option_name with
+ [] -> Printf.fprintf oc "???"
+ | [name] -> Printf.fprintf oc "%s" name
+ | name :: tail ->
+ Printf.fprintf oc "%s" name;
+ iter_order (fun name ->
+ Printf.fprintf oc ":%s" name
+ ) o.option_name);
+ Printf.fprintf oc "\" (TYPE \"%s\"): %s\n CURRENT: \n"
+ o.option_class.class_name o.option_help;
+ (try save_value "" oc (o.option_class.to_value o.option_value)
+ with _ -> ());
+ Printf.fprintf oc "\n"
+ ) !options;
+ flush oc
+
+
+let tuple2_to_value (c1,c2) (a1,a2) =
+ SmallList [to_value c1 a1; to_value c2 a2]
+let value_to_tuple2 (c1,c2) v = match v with
+ List [v1;v2] -> (from_value c1 v1, from_value c2 v2)
+ | _ -> raise Not_found
+let tuple2_option p = define_option_class "tuple2_option"
+ (value_to_tuple2 p) (tuple2_to_value p)
+
+let tuple3_to_value (c1,c2,c3) (a1,a2,a3) =
+ SmallList [to_value c1 a1; to_value c2 a2; to_value c3 a3]
+let value_to_tuple3 (c1,c2,c3) v = match v with
+ List [v1;v2;v3] -> (from_value c1 v1, from_value c2 v2, from_value c3 v3)
+ | _ -> raise Not_found
+let tuple3_option p = define_option_class "tuple3_option"
+ (value_to_tuple3 p) (tuple3_to_value p)
+
+
+let value_to_filename v = Utils.string_to_filename (match v with
+ Value s -> s | _ -> raise Not_found)
+
+let filename_to_value v = Value (Utils.filename_to_string v)
+
+let filename_option = define_option_class "Filename" value_to_filename filename_to_value
+
+let shortname o = String.concat ":" o.option_name
+let get_class o = o.option_class
+let get_help o = let help = o.option_help in
+ if help = "" then "No Help Available" else help