diff options
47 files changed, 913 insertions, 184 deletions
@@ -1,5 +1,30 @@ -Objective Caml 3.08: --------------------- +Objective Caml 3.08.1: +---------------------- + +Licence: +- The emacs files are now under GPL +- Slightly relaxed some conditions of the QPL + +Bug fixes: +- ld.conf now generated at compile-time instead of install-time +- fixed -pack on Windows XP (PR#2935) +- fixed Obj.tag (PR#2946) +- added support for multiple dlopen in Darwin +- run ranlib when installing camlp4 libraries (PR#2944) +- link camlp4opt with -linkall (PR#2949) +- camlp4 parsing of patterns now conforms to normal parsing (PR#3015) +- install camlp4 *.cmx files (PR#2955) +- fixed handling of linefeed in string constants in camlp4 (PR#3074) +- ocamldoc: fixed display of class parameters in HTML and LaTeX (PR#2994) +- ocamldoc: fixed display of link to class page in html (PR#2994) +- Windows toplevel GUI: assorted fixes (including PR#2932) + +Misc: +- added -v option to ocamllex +- ocamldoc: new -intf and -impl options supported (PR#3036) + +Objective Caml 3.08.0: +---------------------- (Changes that can break existing programs are marked with a "*" ) @@ -1,17 +1,26 @@ In the following, "the Library" refers to all files marked "Copyright INRIA" in the following directories and their sub-directories: - asmrun, byterun, camlp4, config, maccaml, otherlibs, stdlib, win32caml + asmrun, byterun, camlp4, config, otherlibs, stdlib, win32caml and "the Compiler" refers to all files marked "Copyright INRIA" in the -other directories and their sub-directories. +following directories and their sub-directories: + + asmcomp, boot, bytecomp, debugger, driver, lex, ocamldoc, parsing, + tools, toplevel, typing, utils, yacc The Compiler is distributed under the terms of the Q Public License -version 1.0 (included below). +version 1.0 with a change to choice of law (included below). The Library is distributed under the terms of the GNU Library General Public License version 2 (included below). +As a special exception to the Q Public Licence, you may develop +application programs, reusable components and other software items +that link with the original or modified versions of the Compiler +and are not made available to the general public, without any of the +additional requirements listed in clause 6c of the Q Public licence. + As a special exception to the GNU Library General Public License, you may link, statically or dynamically, a "work that uses the Library" with a publicly distributed version of the Library to produce an @@ -129,8 +138,7 @@ 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. +This license is governed by the Laws of France. ---------------------------------------------------------------------- @@ -234,14 +234,12 @@ opt.opt: checkstack core ocaml opt-core ocamlc.opt otherlibraries camlp4out \ install: FORCE if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi if test -d $(LIBDIR); then : ; else $(MKDIR) $(LIBDIR); fi - if test -d $(STUBLIBDIR); then : ; else $(MKDIR) $(LIBDIR)/stublibs; fi + if test -d $(STUBLIBDIR); then : ; else $(MKDIR) $(STUBLIBDIR); fi if test -d $(MANDIR)/man$(MANEXT); then : ; else $(MKDIR) $(MANDIR)/man$(MANEXT); fi cd $(LIBDIR); rm -f dllbigarray.so dlllabltk.so dllnums.so \ dllthreads.so dllunix.so dllgraphics.so dllmldbm.so dllstr.so \ dlltkanim.so cd byterun; $(MAKE) install - echo "$(STUBLIBDIR)" > $(LIBDIR)/ld.conf - echo "$(LIBDIR)" >> $(LIBDIR)/ld.conf cp ocamlc $(BINDIR)/ocamlc$(EXE) cp ocaml $(BINDIR)/ocaml$(EXE) cd stdlib; $(MAKE) install diff --git a/asmcomp/asmpackager.ml b/asmcomp/asmpackager.ml index 58e4447d6..10ac15c5f 100644 --- a/asmcomp/asmpackager.ml +++ b/asmcomp/asmpackager.ml @@ -122,6 +122,13 @@ let prefix_symbol p s = "caml" ^ p ^ "__" ^ String.sub s 4 (String.length s - 4) end +(* Strip leading _ from a low-level ident *) + +let strip_underscore s = + if String.length s > 0 && s.[0] = '_' + then String.sub s 1 (String.length s - 1) + else s + (* return the list of symbols to rename in low-level form (with the leading "_caml" or "caml") *) @@ -261,8 +268,10 @@ let build_package_cmx members target symbols_to_rename cmxfile = List.fold_left map_id Tbl.empty symbols_to_rename in let mapping_lbl = - List.fold_left (fun tbl s -> Tbl.add s (prefix_symbol target s) tbl) - Tbl.empty symbols_to_rename in + List.fold_left + (fun tbl s -> + let s = strip_underscore s in Tbl.add s (prefix_symbol target s) tbl) + Tbl.empty symbols_to_rename in let member_defines m = match m.pm_kind with PM_intf -> [] | PM_impl info -> info.ui_defines in let defines = diff --git a/byterun/.cvsignore b/byterun/.cvsignore index 351addb41..895cec3f5 100644 --- a/byterun/.cvsignore +++ b/byterun/.cvsignore @@ -4,6 +4,7 @@ prims.c opnames.h ocamlrun ocamlrund +ld.conf libcamlrun.x libcamlrun-gui.x *.c.x diff --git a/byterun/Makefile b/byterun/Makefile index 34d024961..0d366d3ed 100644 --- a/byterun/Makefile +++ b/byterun/Makefile @@ -37,7 +37,7 @@ PRIMS=alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c \ PUBLIC_INCLUDES=alloc.h callback.h config.h custom.h fail.h intext.h \ memory.h misc.h mlvalues.h signals.h compatibility.h -all: ocamlrun$(EXE) +all: ocamlrun$(EXE) ld.conf ocamlrun$(EXE): libcamlrun.a prims.o $(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o ocamlrun$(EXE) \ @@ -55,6 +55,11 @@ install: for i in $(PUBLIC_INCLUDES); do \ sed -f ../tools/cleanup-header $$i > $(LIBDIR)/caml/$$i; \ done + cp ld.conf $(LIBDIR)/ld.conf + +ld.conf: + echo "$(STUBLIBDIR)" >ld.conf + echo "$(LIBDIR)" >>ld.conf libcamlrun.a: $(OBJS) ar rc libcamlrun.a $(OBJS) @@ -66,7 +71,7 @@ libcamlrund.a: $(DOBJS) clean: rm -f ocamlrun$(EXE) ocamlrund$(EXE) *.o lib*.a - rm -f primitives prims.c opnames.h jumptbl.h + rm -f primitives prims.c opnames.h jumptbl.h ld.conf primitives : $(PRIMS) sed -n -e "s/CAMLprim value \([a-z0-9_][a-z0-9_]*\).*/\1/p" \ diff --git a/byterun/obj.c b/byterun/obj.c index 97fd4e986..83ec42e1a 100644 --- a/byterun/obj.c +++ b/byterun/obj.c @@ -242,5 +242,3 @@ value caml_cache_public_method2 (value *meths, value tag, value *cache) } } #endif /*CAML_JIT*/ - -/* eof $Id$ */ diff --git a/camlp4/etc/pa_o.ml b/camlp4/etc/pa_o.ml index be34d6cd2..e54aeeaa5 100644 --- a/camlp4/etc/pa_o.ml +++ b/camlp4/etc/pa_o.ml @@ -554,7 +554,7 @@ EXTEND <:expr< let module $m$ = $mb$ in $e$ >> | "function"; OPT "|"; l = LIST1 match_case SEP "|" -> <:expr< fun [ $list:l$ ] >> - | "fun"; p = patt LEVEL "simple"; e = fun_def -> + | "fun"; p = simple_patt; e = fun_def -> <:expr< fun [$p$ -> $e$] >> | "match"; e = SELF; "with"; OPT "|"; l = LIST1 match_case SEP "|" -> <:expr< match $e$ with [ $list:l$ ] >> @@ -715,7 +715,7 @@ EXTEND ; fun_binding: [ RIGHTA - [ p = patt LEVEL "simple"; e = SELF -> <:expr< fun $p$ -> $e$ >> + [ p = simple_patt; e = SELF -> <:expr< fun $p$ -> $e$ >> | "="; e = expr -> <:expr< $e$ >> | ":"; t = ctyp; "="; e = expr -> <:expr< ($e$ : $t$) >> ] ] ; @@ -738,7 +738,7 @@ EXTEND ; fun_def: [ RIGHTA - [ p = patt LEVEL "simple"; e = SELF -> <:expr< fun $p$ -> $e$ >> + [ p = simple_patt; e = SELF -> <:expr< fun $p$ -> $e$ >> | "->"; e = expr -> <:expr< $e$ >> ] ] ; expr_ident: @@ -789,7 +789,11 @@ EXTEND | LEFTA [ p1 = SELF; "."; p2 = SELF -> <:patt< $p1$ . $p2$ >> ] | "simple" - [ s = LIDENT -> <:patt< $lid:s$ >> + [ p = simple_patt -> p ] ] + ; + + simple_patt: + [ [ s = LIDENT -> <:patt< $lid:s$ >> | s = UIDENT -> <:patt< $uid:s$ >> | s = INT -> <:patt< $int:s$ >> | s = INT32 -> MLast.PaInt32 loc s @@ -814,9 +818,11 @@ EXTEND | "{"; lpl = lbl_patt_list; "}" -> <:patt< { $list:lpl$ } >> | "("; ")" -> <:patt< () >> | "("; op = operator_rparen -> <:patt< $lid:op$ >> - | "("; p = SELF; ":"; t = ctyp; ")" -> <:patt< ($p$ : $t$) >> - | "("; p = SELF; ")" -> <:patt< $p$ >> + | "("; p = patt; ":"; t = ctyp; ")" -> <:patt< ($p$ : $t$) >> + | "("; p = patt; ")" -> <:patt< $p$ >> | "_" -> <:patt< _ >> + | "`"; s = ident -> <:patt< ` $s$ >> + | "#"; t = mod_ident -> <:patt< # $list:t$ >> | x = LOCATE -> let x = try @@ -841,6 +847,7 @@ EXTEND in Pcaml.handle_patt_quotation loc x ] ] ; + patt_semi_list: [ [ p = patt; ";"; pl = SELF -> [p :: pl] | p = patt; ";" -> [p] @@ -981,7 +988,7 @@ EXTEND [ [ "="; ce = class_expr -> ce | ":"; ct = class_type; "="; ce = class_expr -> <:class_expr< ($ce$ : $ct$) >> - | p = patt LEVEL "simple"; cfb = SELF -> + | p = simple_patt; cfb = SELF -> <:class_expr< fun $p$ -> $cfb$ >> ] ] ; class_type_parameters: @@ -989,11 +996,11 @@ EXTEND | "["; tpl = LIST1 type_parameter SEP ","; "]" -> (loc, tpl) ] ] ; class_fun_def: - [ [ p = patt LEVEL "simple"; "->"; ce = class_expr -> + [ [ p = simple_patt; "->"; ce = class_expr -> <:class_expr< fun $p$ -> $ce$ >> | p = labeled_patt; "->"; ce = class_expr -> <:class_expr< fun $p$ -> $ce$ >> - | p = patt LEVEL "simple"; cfd = SELF -> + | p = simple_patt; cfd = SELF -> <:class_expr< fun $p$ -> $cfd$ >> | p = labeled_patt; cfd = SELF -> <:class_expr< fun $p$ -> $cfd$ >> ] ] @@ -1215,12 +1222,8 @@ EXTEND fun_binding: [ [ p = labeled_patt; e = SELF -> <:expr< fun $p$ -> $e$ >> ] ] ; - patt: LEVEL "simple" - [ [ "`"; s = ident -> <:patt< ` $s$ >> - | "#"; t = mod_ident -> <:patt< # $list:t$ >> ] ] - ; labeled_patt: - [ [ i = LABEL; p = patt LEVEL "simple" -> + [ [ i = LABEL; p = simple_patt -> <:patt< ~ $i$ : $p$ >> | i = TILDEIDENT -> <:patt< ~ $i$ >> diff --git a/camlp4/lib/plexer.ml b/camlp4/lib/plexer.ml index 1aaa1bd01..81994ddd8 100644 --- a/camlp4/lib/plexer.ml +++ b/camlp4/lib/plexer.ml @@ -317,7 +317,7 @@ value next_token_fun dfa ssd find_kwd fname lnum bolpos glexr = parser [ [: `'"' :] -> len | [: `'\\'; `c; s :] ep -> string bp (store (store len '\\') c) s - | [: `'\010'; s :] ep -> do { bolpos.val := ep; incr lnum; string bp len s } + | [: `'\010'; s :] ep -> do { bolpos.val := ep; incr lnum; string bp (store len '\010') s } | [: `'\013'; s :] ep -> let (len, ep) = match Stream.peek s with diff --git a/camlp4/ocaml_src/camlp4/Makefile b/camlp4/ocaml_src/camlp4/Makefile index 94363f41d..d77606597 100644 --- a/camlp4/ocaml_src/camlp4/Makefile +++ b/camlp4/ocaml_src/camlp4/Makefile @@ -31,7 +31,7 @@ $(CAMLP4): $(OBJS) ../odyl/odyl.cmo $(OCAMLC) -linkall -o $@ $(OBJS) $(CAMLP4M) ../odyl/odyl.cmo $(CAMLP4OPT): $(OBJS:.cma=.cmxa) ../odyl/odyl.cmx - $(OCAMLOPT) -o $@ $(OBJS:.cma=.cmxa) $(CAMLP4M) ../odyl/odyl.cmx + $(OCAMLOPT) -linkall -o $@ $(OBJS:.cma=.cmxa) $(CAMLP4M) ../odyl/odyl.cmx $(OTOP)/utils/config.cmx: $(OTOP)/utils/config.ml $(OCAMLOPT) -I $(OTOP)/utils -c $(OTOP)/utils/config.ml @@ -75,8 +75,15 @@ install: cp mLast.mli quotation.mli ast2pt.mli pcaml.mli spretty.mli "$(LIBDIR)/camlp4/." cp mLast.cmi quotation.cmi ast2pt.cmi pcaml.cmi spretty.cmi "$(LIBDIR)/camlp4/." cp camlp4.cma $(LIBDIR)/camlp4/. - for f in camlp4.$(A) camlp4.p.$(A) camlp4.cmxa camlp4.p.cmxa; do \ - test -f $$f && cp $$f "$(LIBDIR)/camlp4/." || true; \ + for f in camlp4.$(A) camlp4.p.$(A) ; do \ + if test -f $$f ; then \ + cp $$f "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$f ) ; \ + fi ; \ + done + for f in camlp4.cmxa camlp4.p.cmxa ; do \ + if test -f $$f ; then \ + cp $$f "$(LIBDIR)/camlp4/." ; \ + fi ; \ done include .depend diff --git a/camlp4/ocaml_src/lib/Makefile b/camlp4/ocaml_src/lib/Makefile index 722430e1f..37fa4fbb1 100644 --- a/camlp4/ocaml_src/lib/Makefile +++ b/camlp4/ocaml_src/lib/Makefile @@ -48,11 +48,13 @@ install: test -f $(TARGET:.cma=.cmxa) && $(MAKE) installopt LIBDIR="$(LIBDIR)" || true installopt: - for f in $(TARGET:.cma=.cmxa) $(TARGET:.cma=.p.cmxa) ; do \ + for f in $(TARGET:.cma=.cmxa) $(TARGET:.cma=.p.cmxa) *.cmx ; do \ test -f $$f && cp $$f "$(LIBDIR)/camlp4/." || true ; \ done # Special treatment for this one: some versions of make don't like $(A) in $(TARGET:.cma=.$(A)) - target="`echo $(TARGET) | sed -e 's/\.cma$$/.$(A))/'`" ; \ - test -f $$target && cp $$target "$(LIBDIR)/camlp4/." || true + target="`echo $(TARGET) | sed -e 's/\.cma$$/.$(A)/'`" ; \ + if test -f $$target ; then \ + cp $$target "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$target ) \ + fi include .depend diff --git a/camlp4/ocaml_src/lib/plexer.ml b/camlp4/ocaml_src/lib/plexer.ml index e10448089..163929bd4 100644 --- a/camlp4/ocaml_src/lib/plexer.ml +++ b/camlp4/ocaml_src/lib/plexer.ml @@ -448,7 +448,7 @@ let next_token_fun dfa ssd find_kwd fname lnum bolpos glexr = Stream.junk strm__; let s = strm__ in let ep = Stream.count strm__ in - bolpos := ep; incr lnum; string bp len s + bolpos := ep; incr lnum; string bp (store len '\010') s | Some '\013' -> Stream.junk strm__; let s = strm__ in diff --git a/camlp4/ocaml_src/meta/Makefile b/camlp4/ocaml_src/meta/Makefile index d0b3cd519..a66dcd751 100644 --- a/camlp4/ocaml_src/meta/Makefile +++ b/camlp4/ocaml_src/meta/Makefile @@ -49,7 +49,10 @@ install: cp camlp4r$(EXE) "$(BINDIR)/." if test -f camlp4r.opt; then \ cp camlp4r.opt "$(BINDIR)/camlp4r.opt$(EXE)" ;\ - cp $(OBJSX) $(OBJSX:.cmx=.$(O)) "$(LIBDIR)/camlp4/."; \ + cp $(OBJSX) "$(LIBDIR)/camlp4/."; \ + for file in $(OBJSX); do \ + cp "`echo $$file | sed -e 's/\.cmx$$/.$(O)/'`" "$(LIBDIR)/camlp4/."; \ + done ; \ fi include .depend diff --git a/camlp4/ocaml_src/odyl/.depend b/camlp4/ocaml_src/odyl/.depend index c09099d3e..3f125b7d3 100644 --- a/camlp4/ocaml_src/odyl/.depend +++ b/camlp4/ocaml_src/odyl/.depend @@ -1,4 +1,4 @@ -odyl_main.cmo: odyl_config.cmo odyl_main.cmi -odyl_main.cmx: odyl_config.cmx odyl_main.cmi odyl.cmo: odyl_config.cmo odyl_main.cmi odyl.cmx: odyl_config.cmx odyl_main.cmx +odyl_main.cmo: odyl_config.cmo odyl_main.cmi +odyl_main.cmx: odyl_config.cmx odyl_main.cmi diff --git a/camlp4/ocaml_src/odyl/Makefile b/camlp4/ocaml_src/odyl/Makefile index 07d5c6b26..d165e6923 100644 --- a/camlp4/ocaml_src/odyl/Makefile +++ b/camlp4/ocaml_src/odyl/Makefile @@ -68,8 +68,15 @@ compare: install: -$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)" cp odyl.cmo odyl.cma odyl_main.cmi $(LIBDIR)/camlp4/. - for f in odyl.$(A) odyl.p.$(A) odyl.cmx odyl.o odyl.p.cmx odyl.p.o odyl.cmxa odyl.p.cmxa ; do \ - test -f $$f && cp $$f "$(LIBDIR)/camlp4/." || true; \ + for f in odyl.$(A) odyl.p.$(A) ; do \ + if test -f $$f ; then \ + cp $$f "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$f ) ; \ + fi ; \ + done + for f in odyl.cmx odyl.o odyl.p.cmx odyl.p.o odyl.cmxa odyl.p.cmxa ; do \ + if test -f $$f ; then \ + cp $$f "$(LIBDIR)/camlp4/." ; \ + fi ; \ done include .depend @@ -284,10 +284,10 @@ case "$bytecc,$host" in *,alpha*-*-unicos*) # For the Cray T3E bytecccompopts="-DUMK";; - gcc*,powerpc-*-aix4.3*) + gcc*,powerpc-*-aix*) # Avoid name-space pollution by requiring Unix98-conformant includes bytecccompopts="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";; - *,powerpc-*-aix4.3*) + *,powerpc-*-aix*) bytecccompopts="-D_XOPEN_SOURCE=500";; gcc*,*-*-cygwin*) bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32" diff --git a/emacs/COPYING b/emacs/COPYING new file mode 100644 index 000000000..5b6e7c66c --- /dev/null +++ b/emacs/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 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. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, 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 software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, 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 redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +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 give any other recipients of the Program a copy of this License +along with the Program. + +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 Program or any portion +of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +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 Program, 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 Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) 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; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, 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 executable. 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. + +If distribution of executable or 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 counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program 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. + + 5. 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 Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program 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. + + 7. 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 Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program 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 Program. + +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. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program 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. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 Program +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 Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, 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 + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. 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 program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; 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. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/emacs/Makefile b/emacs/Makefile index d6c57f79e..4f3aa3784 100644 --- a/emacs/Makefile +++ b/emacs/Makefile @@ -1,3 +1,15 @@ +######################################################################### +# # +# Objective Caml # +# # +# Xavier Leroy, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1997 Institut National de Recherche en Informatique et # +# en Automatique. All rights reserved. This file is distributed # +# under the terms of the GNU General Public License. # +# # +######################################################################### + # $Id$ include ../config/Makefile diff --git a/emacs/caml-compat.el b/emacs/caml-compat.el index 63b4a480f..3a48449b2 100644 --- a/emacs/caml-compat.el +++ b/emacs/caml-compat.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +;(* *) +;(* Copyright 1998 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ;; function definitions for old versions of emacs ;; indent-line-to diff --git a/emacs/caml-emacs.el b/emacs/caml-emacs.el index 5f35c2451..d034ff304 100644 --- a/emacs/caml-emacs.el +++ b/emacs/caml-emacs.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Didier Remy, projet Cristal, INRIA Rocquencourt *) +;(* *) +;(* Copyright 2003 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ;; for caml-help.el (defalias 'caml-info-other-window 'info-other-window) diff --git a/emacs/caml-font.el b/emacs/caml-font.el index 628a757e5..a04d5c94e 100644 --- a/emacs/caml-font.el +++ b/emacs/caml-font.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Jacques Garrigue and Ian T Zimmerman *) +;(* *) +;(* Copyright 1997 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ;; useful colors (cond diff --git a/emacs/caml-help.el b/emacs/caml-help.el index ea082bf24..92735acac 100644 --- a/emacs/caml-help.el +++ b/emacs/caml-help.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Didier Remy, projet Cristal, INRIA Rocquencourt *) +;(* *) +;(* Copyright 2001 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ;; caml-info.el --- contextual completion and help to caml-mode ;; Didier Remy, November 2001. diff --git a/emacs/caml-hilit.el b/emacs/caml-hilit.el index 7b48a8119..697e58173 100644 --- a/emacs/caml-hilit.el +++ b/emacs/caml-hilit.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Jacques Garrigue and Ian T Zimmerman *) +;(* *) +;(* Copyright 1997 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ; Highlighting patterns for hilit19 under caml-mode ; defined also in caml.el diff --git a/emacs/caml-types.el b/emacs/caml-types.el index 743dd2f8e..ac2197a85 100644 --- a/emacs/caml-types.el +++ b/emacs/caml-types.el @@ -6,7 +6,7 @@ ;(* *) ;(* Copyright 2003 Institut National de Recherche en Informatique et *) ;(* en Automatique. All rights reserved. This file is distributed *) -;(* under the terms of the Q Public License version 1.0. *) +;(* under the terms of the GNU General Public License. *) ;(* *) ;(***********************************************************************) diff --git a/emacs/caml-xemacs.el b/emacs/caml-xemacs.el index ff4939157..8f40fb9a9 100644 --- a/emacs/caml-xemacs.el +++ b/emacs/caml-xemacs.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Didier Remy, projet Cristal, INRIA Rocquencourt *) +;(* *) +;(* Copyright 2003 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + (require 'overlay) ;; for caml-help.el diff --git a/emacs/caml.el b/emacs/caml.el index 8e6da6a25..adde1f3eb 100644 --- a/emacs/caml.el +++ b/emacs/caml.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Jacques Garrigue and Ian T Zimmerman *) +;(* *) +;(* Copyright 1997 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ;;; caml.el --- O'Caml code editing commands for Emacs ;; Xavier Leroy, july 1993. diff --git a/emacs/camldebug.el b/emacs/camldebug.el index c66343a4e..32846bbef 100644 --- a/emacs/camldebug.el +++ b/emacs/camldebug.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Jacques Garrigue and Ian T Zimmerman *) +;(* *) +;(* Copyright 1997 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ;;; Run camldebug under Emacs ;;; Derived from gdb.el. ;;; gdb.el is Copyright (C) 1988 Free Software Foundation, Inc, and is part diff --git a/emacs/inf-caml.el b/emacs/inf-caml.el index f24a7a71f..a213ee4f5 100644 --- a/emacs/inf-caml.el +++ b/emacs/inf-caml.el @@ -1,3 +1,17 @@ +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Xavier Leroy and Jacques Garrigue *) +;(* *) +;(* Copyright 1997 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ;;; inf-caml.el --- run the Caml toplevel in an Emacs buffer ;; Xavier Leroy, july 1993. diff --git a/emacs/ocamltags.in b/emacs/ocamltags.in index a67565394..aa3f8df1d 100644 --- a/emacs/ocamltags.in +++ b/emacs/ocamltags.in @@ -1,5 +1,19 @@ ":" ; @EMACS@ -batch -l $0 "$@" ; status=$? ; : '--*-Emacs-Lisp-*--' <<';' +;(***********************************************************************) +;(* *) +;(* Objective Caml *) +;(* *) +;(* Jacques Garrigue and Ian T Zimmerman *) +;(* *) +;(* Copyright 1998 Institut National de Recherche en Informatique et *) +;(* en Automatique. All rights reserved. This file is distributed *) +;(* under the terms of the GNU General Public License. *) +;(* *) +;(***********************************************************************) + +;(* $Id$ *) + ;; Copyright (C) 1998 Ian Zimmerman <itz@transbay.net> ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as diff --git a/lex/main.ml b/lex/main.ml index 03b9ac91e..280537ca1 100644 --- a/lex/main.ml +++ b/lex/main.ml @@ -23,12 +23,19 @@ let output_name = ref None let usage = "usage: ocamlex [options] sourcefile" +let print_version_string () = + print_string "The Objective Caml lexer generator, version "; + print_string Sys.ocaml_version ; print_newline(); + exit 0 + let specs = ["-ml", Arg.Set ml_automata, " Output code that does not use the Lexing module built-in automata interpreter"; "-o", Arg.String (fun x -> output_name := Some x), " <file> Set output file name to <file>"; "-q", Arg.Set Common.quiet_mode, " Do not display informational messages"; + "-v", Arg.Unit print_version_string, " Print version and exit"; + "-version", Arg.Unit print_version_string, " Print version and exit"; ] let _ = diff --git a/ocamldoc/Changes.txt b/ocamldoc/Changes.txt index e4b6bfe5b..e7f1045b5 100644 --- a/ocamldoc/Changes.txt +++ b/ocamldoc/Changes.txt @@ -4,7 +4,13 @@ TODO: - utilisation nouvelles infos de Xavier: "début de rec", etc. ===== -Release 3.08: +Release 3.08.1: + - add: new -intf and -impl options supported (PR#3036) + - fix: display of class parameters in HTML and LaTeX (PR#2994) + - fix: display of link to class page in html (PR#2994) + +===== +Release 3.08.0: - fix: method parameters names in signature are now retrieved correctly (fix of Odoc_value.parameter_list_from_arrows to handle Tpoly for methods) - ajout à la doc de Module_list et Index_list (utilisé dans le html seulement) diff --git a/ocamldoc/odoc_analyse.ml b/ocamldoc/odoc_analyse.ml index 0ef95ee9b..0bdf74ce3 100644 --- a/ocamldoc/odoc_analyse.ml +++ b/ocamldoc/odoc_analyse.ml @@ -21,6 +21,7 @@ open Misc open Format open Typedtree + (** Initialize the search path. The current directory is always searched first, then the directories specified with the -I option (in command-line order), @@ -194,45 +195,49 @@ let process_error exn = let process_file ppf sourcefile = if !Odoc_args.verbose then ( - print_string (Odoc_messages.analysing sourcefile) ; + let f = match sourcefile with Odoc_args.Impl_file f | Odoc_args.Intf_file f -> f in + print_string (Odoc_messages.analysing f) ; print_newline (); ); - if Filename.check_suffix sourcefile "ml" then - ( - try - let (parsetree_typedtree_opt, input_file) = process_implementation_file ppf sourcefile in - match parsetree_typedtree_opt with - None -> + match sourcefile with + Odoc_args.Impl_file file -> + ( + try + let (parsetree_typedtree_opt, input_file) = process_implementation_file ppf file in + match parsetree_typedtree_opt with + None -> + None + | Some (parsetree, typedtree) -> + let file_module = Ast_analyser.analyse_typed_tree file + !Location.input_name parsetree typedtree + in + file_module.Odoc_module.m_top_deps <- Odoc_dep.impl_dependencies parsetree ; + + if !Odoc_args.verbose then + ( + print_string Odoc_messages.ok; + print_newline () + ); + remove_preprocessed input_file; + Some file_module + with + | Sys_error s + | Failure s -> + prerr_endline s ; + incr Odoc_global.errors ; None - | Some (parsetree, typedtree) -> - let file_module = Ast_analyser.analyse_typed_tree sourcefile !Location.input_name parsetree typedtree in - - file_module.Odoc_module.m_top_deps <- Odoc_dep.impl_dependencies parsetree ; - - if !Odoc_args.verbose then - ( - print_string Odoc_messages.ok; - print_newline () - ); - remove_preprocessed input_file; - Some file_module - with - | Sys_error s - | Failure s -> - prerr_endline s ; - incr Odoc_global.errors ; - None - | e -> - process_error e ; - incr Odoc_global.errors ; - None - ) - else - if Filename.check_suffix sourcefile "mli" then + | e -> + process_error e ; + incr Odoc_global.errors ; + None + ) + | Odoc_args.Intf_file file -> ( try - let (ast, signat, input_file) = process_interface_file ppf sourcefile in - let file_module = Sig_analyser.analyse_signature sourcefile !Location.input_name ast signat in + let (ast, signat, input_file) = process_interface_file ppf file in + let file_module = Sig_analyser.analyse_signature file + !Location.input_name ast signat + in file_module.Odoc_module.m_top_deps <- Odoc_dep.intf_dependencies ast ; @@ -254,10 +259,6 @@ let process_file ppf sourcefile = incr Odoc_global.errors ; None ) - else - ( - raise (Failure (Odoc_messages.unknown_extension sourcefile)) - ) (** Remove the class elements after the stop special comment. *) let rec remove_class_elements_after_stop eles = diff --git a/ocamldoc/odoc_analyse.mli b/ocamldoc/odoc_analyse.mli index b1da2aeb1..636a04046 100644 --- a/ocamldoc/odoc_analyse.mli +++ b/ocamldoc/odoc_analyse.mli @@ -19,7 +19,7 @@ *) val analyse_files : ?init: Odoc_module.t_module list -> - string list -> + Odoc_args.source_file list -> Odoc_module.t_module list (** Dump of a list of modules into a file. diff --git a/ocamldoc/odoc_args.ml b/ocamldoc/odoc_args.ml index 7b8554305..903a4c3dc 100644 --- a/ocamldoc/odoc_args.ml +++ b/ocamldoc/odoc_args.ml @@ -17,6 +17,10 @@ open Clflags module M = Odoc_messages +type source_file = + Impl_file of string + | Intf_file of string + let include_dirs = Clflags.include_dirs let bytecode_mode = ref true @@ -207,6 +211,8 @@ let options = ref [ "-v", Arg.Unit (fun () -> verbose := true), M.verbose_mode ; "-I", Arg.String (fun s -> include_dirs := (Misc.expand_directory Config.standard_library s) :: !include_dirs), M.include_dirs ; "-pp", Arg.String (fun s -> preprocessor := Some s), M.preprocess ; + "-impl", Arg.String (fun s -> files := !files @ [Impl_file s]), M.option_impl ; + "-intf", Arg.String (fun s -> files := !files @ [Intf_file s]), M.option_intf ; "-rectypes", Arg.Set recursive_types, M.rectypes ; "-nolabels", Arg.Unit (fun () -> classic := true), M.nolabels ; "-warn-error", Arg.Set Odoc_global.warn_error, M.werr ; @@ -302,19 +308,28 @@ let add_option o = options := iter !options let parse ~html_generator ~latex_generator ~texi_generator ~man_generator ~dot_generator = + let anonymous f = + let sf = + if Filename.check_suffix f "ml" then + Impl_file f + else + if Filename.check_suffix f "mli" then + Intf_file f + else + failwith (Odoc_messages.unknown_extension f) + in + files := !files @ [sf] + in default_html_generator := Some html_generator ; default_latex_generator := Some latex_generator ; default_texi_generator := Some texi_generator ; default_man_generator := Some man_generator ; default_dot_generator := Some dot_generator ; let _ = Arg.parse !options - (fun s -> files := !files @ [s]) + anonymous (M.usage^M.options_are) in (* we sort the hidden modules by name, to be sure that for example, A.B is before A, so we will match against A.B before A in Odoc_name.hide_modules.*) hidden_modules := List.sort (fun a -> fun b -> - (compare a b)) !hidden_modules - - -(* eof $Id$ *) diff --git a/ocamldoc/odoc_args.mli b/ocamldoc/odoc_args.mli index 889f09ce5..3dc639969 100644 --- a/ocamldoc/odoc_args.mli +++ b/ocamldoc/odoc_args.mli @@ -13,6 +13,11 @@ (** Analysis of the command line arguments. *) +(** The kind of source file in arguments. *) +type source_file = + Impl_file of string + | Intf_file of string + (** The include_dirs in the OCaml compiler. *) val include_dirs : string list ref @@ -161,7 +166,7 @@ val man_suffix : string ref val man_mini : bool ref (** The files to be analysed. *) -val files : string list ref +val files : source_file list ref (** To set the documentation generator. *) val set_doc_generator : doc_generator option -> unit diff --git a/ocamldoc/odoc_html.ml b/ocamldoc/odoc_html.ml index 98fb090ee..a691679ad 100644 --- a/ocamldoc/odoc_html.ml +++ b/ocamldoc/odoc_html.ml @@ -653,15 +653,6 @@ let newline_to_indented_br s = done; Buffer.contents b -let remove_last_newline s = - let len = String.length s in - if len <= 0 then - s - else - match s.[len-1] with - '\n' -> String.sub s 0 (len-1) - | _ -> s - (** This class is used to create objects which can generate a simple html documentation. *) class html = object (self) @@ -1060,7 +1051,7 @@ class html = (** Print html code to display a [Types.type_expr]. *) method html_of_type_expr b m_name t = - let s = remove_last_newline (Odoc_info.string_of_type_expr t) in + let s = Odoc_info.remove_ending_newline (Odoc_info.string_of_type_expr t) in let s2 = newline_to_indented_br s in bs b "<code class=\"type\">"; bs b (self#create_fully_qualified_idents_links m_name s2); @@ -1086,6 +1077,14 @@ class html = bs b (self#create_fully_qualified_idents_links m_name s2); bs b "]</code>" + method html_of_class_parameter_list b father c = + let s = Odoc_info.string_of_class_params c in + let s = Odoc_info.remove_ending_newline s in + let s2 = newline_to_indented_br s in + bs b "<code class=\"type\">"; + bs b (self#create_fully_qualified_idents_links father s2); + bs b "</code>" + (** Print html code to display a list of type parameters for the given type.*) method html_of_type_expr_param_list b m_name t = let s = Odoc_info.string_of_type_param_list t in @@ -1096,7 +1095,7 @@ class html = (** Print html code to display a [Types.module_type]. *) method html_of_module_type b ?code m_name t = - let s = remove_last_newline (Odoc_info.string_of_module_type ?code t) in + let s = Odoc_info.remove_ending_newline (Odoc_info.string_of_module_type ?code t) in bs b "<code class=\"type\">"; bs b (self#create_fully_qualified_module_idents_links m_name s); bs b "</code>" @@ -1216,12 +1215,12 @@ class html = (** Generate a file containing the module type in the given file name. *) method output_module_type in_title file mtyp = - let s = remove_last_newline (Odoc_info.string_of_module_type ~complete: true mtyp) in + let s = Odoc_info.remove_ending_newline (Odoc_info.string_of_module_type ~complete: true mtyp) in self#output_code in_title file s (** Generate a file containing the class type in the given file name. *) method output_class_type in_title file ctyp = - let s = remove_last_newline(Odoc_info.string_of_class_type ~complete: true ctyp) in + let s = Odoc_info.remove_ending_newline (Odoc_info.string_of_class_type ~complete: true ctyp) in self#output_code in_title file s (** Print html code for a value. *) @@ -1696,8 +1695,9 @@ class html = self#html_of_class_type_param_expr_list b father l; bs b " " ); - self#html_of_text b - [Code (self#create_fully_qualified_idents_links father cco.cco_name)] + bs b "<code class=\"type\">"; + bs b (self#create_fully_qualified_idents_links father cco.cco_name); + bs b "</code>" | Class_constraint (ck, ctk) -> self#html_of_text b [Code "( "] ; @@ -1716,8 +1716,9 @@ class html = self#html_of_class_type_param_expr_list b father l; bs b " " ); - self#html_of_text b - [Code (self#create_fully_qualified_idents_links father cta.cta_name)] + bs b "<code class=\"type\">"; + bs b (self#create_fully_qualified_idents_links father cta.cta_name); + bs b "</code>" | Class_signature (inh, eles) -> self#html_of_text b [Code "object"]; @@ -1737,16 +1738,6 @@ class html = ); self#html_of_text b [Code "end"] - method html_of_class_parameter b father p = - self#html_of_type_expr b father (Parameter.typ p) - - method html_of_class_parameter_list b father params = - List.iter - (fun p -> - self#html_of_class_parameter b father p; - bs b " -> ") - params - (** Print html code for a class. *) method html_of_class b ?(complete=true) ?(with_link=true) c = let father = Name.father c.cl_name in @@ -1783,7 +1774,7 @@ class html = ); bs b " : " ; - self#html_of_class_parameter_list b father c.cl_parameters ; + self#html_of_class_parameter_list b father c ; self#html_of_class_kind b father ~cl: c c.cl_kind; bs b "</pre>" ; print_DEBUG "html#html_of_class : info" ; @@ -2436,7 +2427,3 @@ class html = Buffer.contents b ) end - - - -(* eof $Id$ *) diff --git a/ocamldoc/odoc_info.ml b/ocamldoc/odoc_info.ml index 97dc7b2b0..d379c35c8 100644 --- a/ocamldoc/odoc_info.ml +++ b/ocamldoc/odoc_info.ml @@ -118,6 +118,8 @@ let string_of_variance t (co,cn) = Odoc_str.string_of_variance t (co, cn) let string_of_type_expr t = Odoc_print.string_of_type_expr t +let string_of_class_params = Odoc_str.string_of_class_params + let string_of_type_list ?par sep type_list = Odoc_str.string_of_type_list ?par sep type_list let string_of_type_param_list t = Odoc_str.string_of_type_param_list t @@ -148,10 +150,14 @@ let first_sentence_and_rest_of_text = Odoc_misc.first_sentence_and_rest_of_text let text_no_title_no_list = Odoc_misc.text_no_title_no_list +let text_concat = Odoc_misc.text_concat + let get_titles_in_text = Odoc_misc.get_titles_in_text let create_index_lists = Odoc_misc.create_index_lists +let remove_ending_newline = Odoc_misc.remove_ending_newline + let remove_option = Odoc_misc.remove_option let is_optional = Odoc_misc.is_optional diff --git a/ocamldoc/odoc_info.mli b/ocamldoc/odoc_info.mli index 1c724dd45..4175a7842 100644 --- a/ocamldoc/odoc_info.mli +++ b/ocamldoc/odoc_info.mli @@ -580,26 +580,6 @@ module Module : val module_type_comments : ?trans:bool-> t_module_type -> text list end -(** Analysis of the given source files. - @param init is the list of modules already known from a previous analysis. - @return the list of analysed top modules. *) -val analyse_files : - ?merge_options:Odoc_types.merge_option list -> - ?include_dirs:string list -> - ?labels:bool -> - ?sort_modules:bool -> - ?no_stop:bool -> - ?init: Odoc_module.t_module list -> - string list -> - Module.t_module list - -(** Dump of a list of modules into a file. - @raise Failure if an error occurs.*) -val dump_modules : string -> Odoc_module.t_module list -> unit - -(** Load of a list of modules from a file. - @raise Failure if an error occurs.*) -val load_modules : string -> Odoc_module.t_module list (** {3 Getting strings from values} *) @@ -619,6 +599,10 @@ val string_of_variance : Type.t_type -> (bool * bool) -> string (** This function returns a string representing a Types.type_expr. *) val string_of_type_expr : Types.type_expr -> string +(** @return a string to display the parameters of the given class, + in the same form as the compiler. *) +val string_of_class_params : Class.t_class -> string + (** This function returns a string to represent the given list of types, with a given separator. *) val string_of_type_list : ?par: bool -> string -> Types.type_expr list -> string @@ -685,6 +669,10 @@ val first_sentence_and_rest_of_text : text -> text * text (** Return the given [text] without any title or list. *) val text_no_title_no_list : text -> text +(** [concat sep l] concats the given list of text [l], each separated with + the text [sep]. *) +val text_concat : Odoc_types.text -> Odoc_types.text list -> Odoc_types.text + (** Return the list of titles in a [text]. A title is a title level, an optional label and a text.*) val get_titles_in_text : text -> (int * string option * text) list @@ -765,6 +753,8 @@ val info_string_of_info : info -> string *) val info_of_comment_file : string -> info +(** [remove_ending_newline s] returns [s] without the optional ending newline. *) +val remove_ending_newline : string -> string (** Research in elements *) module Search : @@ -925,6 +915,11 @@ module Dep : (** You can use this module to create custom generators.*) module Args : sig + (** The kind of source file in arguments. *) + type source_file = + Impl_file of string + | Intf_file of string + (** The class type of documentation generators. *) class type doc_generator = object method generate : Module.t_module list -> unit end @@ -1036,7 +1031,7 @@ module Args : val man_mini : bool ref (** The files to be analysed. *) - val files : string list ref + val files : source_file list ref (** To set the documentation generator. *) val set_doc_generator : doc_generator option -> unit @@ -1044,3 +1039,24 @@ module Args : (** Add an option specification. *) val add_option : string * Arg.spec * string -> unit end + +(** Analysis of the given source files. + @param init is the list of modules already known from a previous analysis. + @return the list of analysed top modules. *) +val analyse_files : + ?merge_options:Odoc_types.merge_option list -> + ?include_dirs:string list -> + ?labels:bool -> + ?sort_modules:bool -> + ?no_stop:bool -> + ?init: Odoc_module.t_module list -> + Args.source_file list -> + Module.t_module list + +(** Dump of a list of modules into a file. + @raise Failure if an error occurs.*) +val dump_modules : string -> Odoc_module.t_module list -> unit + +(** Load of a list of modules from a file. + @raise Failure if an error occurs.*) +val load_modules : string -> Odoc_module.t_module list diff --git a/ocamldoc/odoc_latex.ml b/ocamldoc/odoc_latex.ml index 2363ea127..09f73dac2 100644 --- a/ocamldoc/odoc_latex.ml +++ b/ocamldoc/odoc_latex.ml @@ -456,6 +456,10 @@ class latex = print_concat fmt ", " print_one t.ty_parameters; ps fmt ")" + method latex_of_class_parameter_list fmt father c = + self#latex_of_text fmt + (self#text_of_class_params father c) + (** Print LaTeX code for a type. *) method latex_of_type fmt t = let s_name = Name.simple t.ty_name in @@ -633,16 +637,6 @@ class latex = (* TODO: on affiche quoi ? *) self#latex_of_module_kind fmt father k - method latex_of_class_parameter fmt father p = - ps fmt (self#normal_type father (Parameter.typ p)) - - method latex_of_class_parameter_list fmt father params = - List.iter - (fun p -> - self#latex_of_class_parameter fmt father p; - ps fmt " -> ") - params - method latex_of_class_kind fmt father kind = match kind with Class_structure (inh, eles) -> @@ -881,12 +875,23 @@ class latex = ] in self#latex_of_text fmt t; - self#latex_of_class_parameter_list fmt father c.cl_parameters; + self#latex_of_class_parameter_list fmt father c; + (* avoid a big gap if the kind is a consrt *) + ( + match c.cl_kind with + Class.Class_constr _ -> + self#latex_of_class_kind fmt father c.cl_kind + | _ -> + () + ); self#latex_of_text fmt [ Latex "\\end{ocamldoccode}\n" ]; self#latex_for_class_label fmt c; self#latex_for_class_index fmt c; p fmt "@[<h 4>"; - self#latex_of_class_kind fmt father c.cl_kind; + (match c.cl_kind with + Class.Class_constr _ -> () + | _ -> self#latex_of_class_kind fmt father c.cl_kind + ); self#latex_of_text fmt [Newline]; self#latex_of_info fmt ~block: true c.cl_info; p fmt "@]" @@ -1124,5 +1129,3 @@ class latex = prerr_endline s ; incr Odoc_info.errors end - -(* eof $Id$ *) diff --git a/ocamldoc/odoc_messages.ml b/ocamldoc/odoc_messages.ml index bb5d73d42..f7e5be1f0 100644 --- a/ocamldoc/odoc_messages.ml +++ b/ocamldoc/odoc_messages.ml @@ -36,6 +36,8 @@ let verbose_mode = "\t\tverbose mode" let include_dirs = "<dir>\tAdd <dir> to the list of include directories" let rectypes = "\tAllow arbitrary recursive types" let preprocess = "<command>\tPipe sources through preprocessor <command>" +let option_impl ="<file>\tConsider <file> as a .ml file" +let option_intf ="<file>\tConsider <file> as a .mli file" let display_custom_generators_dir = "\tDisplay custom generators standard directory and exit" let add_load_dir = "<dir>\tAdd the given directory to the search path for custom\n"^ "\t\tgenerators "^bytecode_only diff --git a/ocamldoc/odoc_misc.ml b/ocamldoc/odoc_misc.ml index f0868afba..28f06ee1c 100644 --- a/ocamldoc/odoc_misc.ml +++ b/ocamldoc/odoc_misc.ml @@ -297,6 +297,13 @@ let get_titles_in_text t = iter_text t; List.rev !l +let text_concat (sep : Odoc_types.text) l = + let rec iter = function + [] -> [] + | [last] -> last + | h :: q -> h @ sep @ (iter q) + in + iter l (*********************************************************) let rec get_before_dot s = @@ -384,6 +391,15 @@ let first_sentence_and_rest_of_text t = let (_,t1, t2) = first_sentence_text t in (t1, t2) +let remove_ending_newline s = + let len = String.length s in + if len <= 0 then + s + else + match s.[len-1] with + '\n' -> String.sub s 0 (len-1) + | _ -> s + (*********************************************************) let create_index_lists elements string_of_ele = @@ -415,17 +431,8 @@ let label_name = Btype.label_name let remove_option typ = let rec iter t = match t with - | Types.Tconstr (p,tlist,_) -> - ( - match p with - Path.Pident id when Ident.name id = "option" -> - ( - match tlist with - [t2] -> t2.Types.desc - | _ -> t - ) - | _ -> t - ) + | Types.Tconstr(path, [ty], _) when Path.same path Predef.path_option -> ty.Types.desc + | Types.Tconstr _ | Types.Tvar | Types.Tunivar | Types.Tpoly _ diff --git a/ocamldoc/odoc_misc.mli b/ocamldoc/odoc_misc.mli index 982def9db..2acedb2cb 100644 --- a/ocamldoc/odoc_misc.mli +++ b/ocamldoc/odoc_misc.mli @@ -75,6 +75,10 @@ val first_sentence_and_rest_of_text : (** Return the given [text] without any title or list. *) val text_no_title_no_list : Odoc_types.text -> Odoc_types.text +(** [concat sep l] concats the given list of text [l], each separated with + the text [sep]. *) +val text_concat : Odoc_types.text -> Odoc_types.text list -> Odoc_types.text + (** Return the list of titles in a [text]. A title is a title level, an optional label and a text.*) val get_titles_in_text : Odoc_types.text -> (int * string option * Odoc_types.text) list @@ -86,6 +90,9 @@ val get_titles_in_text : Odoc_types.text -> (int * string option * Odoc_types.te begin with a letter should be in the first returned list.*) val create_index_lists : 'a list -> ('a -> string) -> 'a list list +(** [remove_ending_newline s] returns [s] without the optional ending newline. *) +val remove_ending_newline : string -> string + (** Take a type and remove the option top constructor. This is useful when printing labels, we we then remove the top option contructor for optional labels.*) diff --git a/ocamldoc/odoc_str.ml b/ocamldoc/odoc_str.ml index de82a9e46..c36d4b957 100644 --- a/ocamldoc/odoc_str.ml +++ b/ocamldoc/odoc_str.ml @@ -115,6 +115,30 @@ let string_of_class_type_param_list l = ) (if par then "]" else "") +let string_of_class_params c = + let b = Buffer.create 256 in + let rec iter = function + Types.Tcty_fun (label, t, ctype) -> + Printf.bprintf b "%s%s -> " + ( + match label with + "" -> "" + | s -> s^":" + ) + (Odoc_print.string_of_type_expr + (if Odoc_misc.is_optional label then + Odoc_misc.remove_option t + else + t + ) + ); + iter ctype + | Types.Tcty_signature _ + | Types.Tcty_constr _ -> () + in + iter c.Odoc_class.cl_type; + Buffer.contents b + let string_of_type t = let module M = Odoc_type in "type "^ diff --git a/ocamldoc/odoc_str.mli b/ocamldoc/odoc_str.mli index 6c9fa820c..442837812 100644 --- a/ocamldoc/odoc_str.mli +++ b/ocamldoc/odoc_str.mli @@ -34,6 +34,10 @@ val string_of_class_type_param_list : Types.type_expr list -> string (** @return a string to describe the given type. *) val string_of_type : Odoc_type.t_type -> string +(** @return a string to display the parameters of the given class, + in the same form as the compiler. *) +val string_of_class_params : Odoc_class.t_class -> string + (** @return a string to describe the given exception. *) val string_of_exception : Odoc_exception.t_exception -> string diff --git a/ocamldoc/odoc_to_text.ml b/ocamldoc/odoc_to_text.ml index 057b0d89f..1e5717b6b 100644 --- a/ocamldoc/odoc_to_text.ml +++ b/ocamldoc/odoc_to_text.ml @@ -206,24 +206,30 @@ class virtual to_text = (** Get a string for a [Types.class_type] where all idents are relative. *) method normal_class_type m_name t = - (self#relative_idents m_name (Odoc_info.string_of_class_type t)) + self#relative_idents m_name (Odoc_info.string_of_class_type t) (** Get a string for a [Types.module_type] where all idents are relative. *) method normal_module_type ?code m_name t = - (self#relative_module_idents m_name (Odoc_info.string_of_module_type ?code t)) + self#relative_module_idents m_name (Odoc_info.string_of_module_type ?code t) (** Get a string for a type where all idents are relative. *) method normal_type m_name t = - (self#relative_idents m_name (Odoc_info.string_of_type_expr t)) + self#relative_idents m_name (Odoc_info.string_of_type_expr t) (** Get a string for a list of types where all idents are relative. *) method normal_type_list ?par m_name sep t = - (self#relative_idents m_name (Odoc_info.string_of_type_list ?par sep t)) + self#relative_idents m_name (Odoc_info.string_of_type_list ?par sep t) (** Get a string for a list of class or class type type parameters where all idents are relative. *) method normal_class_type_param_list m_name t = - (self#relative_idents m_name (Odoc_info.string_of_class_type_param_list t)) + self#relative_idents m_name (Odoc_info.string_of_class_type_param_list t) + + (** Get a string for the parameters of a class (with arrows) where all idents are relative. *) + method normal_class_params m_name c = + let s = Odoc_info.string_of_class_params c in + self#relative_idents m_name + (Odoc_info.remove_ending_newline s) (** @return [text] value to represent a [Types.type_expr].*) method text_of_type_expr module_name t = @@ -250,6 +256,17 @@ class virtual to_text = method text_of_class_type_param_expr_list module_name l = [ Code (self#normal_class_type_param_list module_name l) ] + (** @return [text] value to represent parameters of a class (with arraows).*) + method text_of_class_params module_name c = + let t = Odoc_info.text_concat + [Newline] + (List.map + (fun s -> [Code s]) + (Str.split (Str.regexp "\n") + (self#normal_class_params module_name c)) + ) + in + t (** @return [text] value to represent a [Types.module_type]. *) method text_of_module_type t = diff --git a/stdlib/sys.ml b/stdlib/sys.ml index 9554a82a1..b1f48779b 100644 --- a/stdlib/sys.ml +++ b/stdlib/sys.ml @@ -78,4 +78,4 @@ let catch_break on = (* OCaml version string, must be in the format described in sys.mli. *) -let ocaml_version = "3.09+dev0 (2004-07-13)";; +let ocaml_version = "3.09+dev1 (2004-08-21)";; diff --git a/win32caml/ocaml.c b/win32caml/ocaml.c index 0a4e5b481..df5a305cf 100644 --- a/win32caml/ocaml.c +++ b/win32caml/ocaml.c @@ -951,13 +951,17 @@ Output: Errors: -------------------------------------------------------------------------- Edit History: + 7 Aug 2004 - Chris Watford christopher.watford@gmail.com + - Fixed error where SendLastEditBuffer sent waaaay too many + newlines which completely broke the underlying connection to the + ocaml.exe pipe 15 Sept 2003 - Chris Watford watford@uiuc.edu - Sends line to the pipe and adds newline to the end ------------------------------------------------------------------------*/ void SendLastEditBuffer(HWND hwndChild) { char* line = editbuffer_getasbuffer(CurrentEditBuffer); - int l = strlen(line); + int l = strlen(line) - 1; char* linebuffer = (char*)SafeMalloc(l+2); // save current edit buffer to history and create a new blank edit buffer @@ -967,10 +971,15 @@ void SendLastEditBuffer(HWND hwndChild) CurrentEditBuffer->LineCount = 0; CurrentEditBuffer->Lines = NULL; - // add the newline to the end - strncpy(linebuffer, line, l); - linebuffer[l] = '\n'; - linebuffer[l+1] = '\0'; + // trim and add the newline to the end + strncpy(linebuffer, line, l+1); + while((linebuffer[l] == '\n' || linebuffer[l] == '\r') && (l >= 0)) + { + linebuffer[l--] = '\0'; + } + + linebuffer[l+1] = '\n'; + linebuffer[l+2] = '\0'; // save line to the pipe WriteToPipe(linebuffer); @@ -985,6 +994,10 @@ Output: None explicit Errors: None -------------------------------------------------------------------------- Edit History: + 7 Aug 2004 - Chris Watford christopher.watford@gmail.com + - Fixed bug #2932 where many carraige returns were sent and it came + back with a null pointer error due to a fault of not checking if + the line returned was NULL 13 Oct 2003 - Chris Watford watford@uiuc.edu - Solved the error when you have a malformed comment in the buffer ------------------------------------------------------------------------*/ @@ -992,7 +1005,16 @@ BOOL SendingFullCommand(void) { // if there is a ;; on the line, return true char *line = editbuffer_getasline(CurrentEditBuffer); - char *firstComment = strstr(line, "(*"), *firstSemiColonSemiColon = strstr(line, ";;"); + char *firstComment, *firstSemiColonSemiColon, *firstQuote; + + if(line == NULL) + { + return FALSE; + } + + firstComment = strstr(line, "(*"); + firstSemiColonSemiColon = strstr(line, ";;"); + firstQuote = strstr(line, "\""); // easy case :D if(firstSemiColonSemiColon == NULL) @@ -1004,9 +1026,51 @@ BOOL SendingFullCommand(void) // if there are no comments if(firstComment == NULL) { - BOOL r = (firstSemiColonSemiColon != NULL); - free(line); - return r; + // if there are no quotations used + if(firstQuote == NULL) + { + BOOL r = (firstSemiColonSemiColon != NULL); + free(line); + return r; + } else { + // we need to first check if the ;; is before the \", since the \" + // won't matter if its before the semicolonsemicolon + if(firstQuote < firstSemiColonSemiColon) + { + // the quote is before the ;;, we need to make sure its terminated + // also we have to check for escaped quotes, le sigh! + char *c = firstQuote+1; + BOOL in_quote = TRUE; + + // in-quote determiner loop + while(c[0] != '\0') + { + // are we a backslash? + if(c[0] == '\\') + { + // ignore the next character + c++; + } + else + { + // are we a quote? + if(c[0] == '"') + { + in_quote = !in_quote; + } + } + + c++; + } + + free(line); + return !in_quote; + } else { + BOOL r = (firstSemiColonSemiColon != NULL); + free(line); + return r; + } + } } else { // we have to search through finding all comments |