Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: ben

ben (0.7.7ubuntu1) artful; urgency=medium * Merge from Debian Sid. Remaining changes: - Show Ubuntu logo. - Allow configs to request the Packages/Sources files are not redownloaded (so that we can download once and for all at the start). - Add an Ubuntu template. - Tolerate templates with buildds or critical_bugs entries that return None. -- Simon Quigley <tsimonq2@ubuntu.com> Sat, 05 Aug 2017 00:11:18 -0500

Modifications :
  1. Download patch media/revamp.css

    --- 0.7.7/media/revamp.css 2017-07-21 14:06:34.000000000 +0000 +++ 0.7.7ubuntu1/media/revamp.css 2017-08-05 05:11:18.000000000 +0000 @@ -16,7 +16,7 @@ body { } body.debian { - background: #fff url('debian.png') no-repeat 10px 7px; + background: #fff url('ubuntu.png') no-repeat 10px 7px; } a:link { color: #0755d7; text-decoration: underline; }
  2. Download patch debian/control

    --- 0.7.7/debian/control 2017-07-21 21:21:50.000000000 +0000 +++ 0.7.7ubuntu1/debian/control 2017-08-05 05:11:18.000000000 +0000 @@ -1,6 +1,7 @@ Source: ben Priority: optional -Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> Uploaders: Stéphane Glondu <glondu@debian.org>, Mehdi Dogguy <mehdi@debian.org> @@ -30,8 +31,10 @@ Build-Depends: Standards-Version: 4.0.0 Section: devel Homepage: https://ben.debian.net -Vcs-Browser: https://anonscm.debian.org/git/collab-maint/ben.git -Vcs-Git: https://anonscm.debian.org/git/collab-maint/ben.git +XS-Debian-Vcs-Browser: https://anonscm.debian.org/git/collab-maint/ben.git +XS-Debian-Vcs-Git: https://anonscm.debian.org/git/collab-maint/ben.git +Vcs-Browser: https://code.launchpad.net/~ubuntu-transition-trackers/ubuntu-transition-tracker/ben +Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-transition-trackers/ubuntu-transition-tracker/ben Package: libben-ocaml-dev Section: ocaml
  3. Download patch frontends/ben_monitor.ml

    --- 0.7.7/frontends/ben_monitor.ml 2017-07-21 14:06:34.000000000 +0000 +++ 0.7.7ubuntu1/frontends/ben_monitor.ml 2017-08-05 05:11:18.000000000 +0000 @@ -302,7 +302,9 @@ let changelog t ver dir src = let generated_on_text () = [ pcdata "Page generated by "; a_link ben_webpage "Ben"; - pcdata (Printf.sprintf " on %s" (Benl_core.get_rfc2822_date ())) + pcdata (Printf.sprintf " on %s" (Benl_core.get_rfc2822_date ())); + pcdata "; bzr branch "; + a_link "https://code.launchpad.net/+branch/ubuntu-transition-tracker" "lp:ubuntu-transition-tracker" ] module SS = Set.Make(String)
  4. Download patch lib/query.ml

    --- 0.7.7/lib/query.ml 2017-07-21 14:06:34.000000000 +0000 +++ 0.7.7ubuntu1/lib/query.ml 2017-08-05 05:11:18.000000000 +0000 @@ -73,7 +73,7 @@ let rec to_string_b ?(escape = true) las | EMatch (f, ERegexp r) -> sprintf ".%s ~ %s" f (string_of_regexp r) | ENot e -> - sprintf "!%s" (to_string_b "!" e) + sprintf "!%s" (to_string_b last_op e) | Etrue -> sprintf "true" | Efalse -> sprintf "false" | EAnd (e1, e2) ->
  5. Download patch frontends/ben_tracker.ml

    --- 0.7.7/frontends/ben_tracker.ml 2017-07-21 14:06:34.000000000 +0000 +++ 0.7.7ubuntu1/frontends/ben_tracker.ml 2017-08-05 05:11:18.000000000 +0000 @@ -32,6 +32,7 @@ let global_config = ref (FilePath.concat let lock = ref "ben.lock" let clean = ref true let tconfig = ref None +let redownload = ref true open Benl_types open Benl_modules @@ -79,6 +80,8 @@ let read_global_config () = Ben_monitor.baseurl := url | "template", (EString template) -> Benl_templates.load_template template; + | "redownload", Efalse -> + redownload := false | item, _ -> warn (Unknown_configuration_item item) ) @@ -146,7 +149,7 @@ let is_packages_file name = let clear_cache () = let cached = !cache_dir in let cachef = !cache_file in - let test_cond = Or (Basename_is cachef, Custom is_packages_file) in + let test_cond = Basename_is cachef in let pkgs = find test_cond cached (fun x y -> y ::x) [] in rm ~force:Force pkgs @@ -157,7 +160,7 @@ let update_test () = let read_cache architectures = if update_test () then begin - if not !Benl_data.use_projectb then begin + if !redownload && not !Benl_data.use_projectb then begin clear_cache (); Ben_download.download_all architectures; end;
  6. Download patch templates/ubuntu.ml

    --- 0.7.7/templates/ubuntu.ml 1970-01-01 00:00:00.000000000 +0000 +++ 0.7.7ubuntu1/templates/ubuntu.ml 2017-08-05 05:11:18.000000000 +0000 @@ -0,0 +1,47 @@ +open Printf +open Html5.M + +let href uri = + a_href (uri_of_string uri) + +let a_link url text = + a ~a:[a_href (uri_of_string url)] [pcdata text] + +let page ~title ~subtitle ~headers ~body ~footer = + let headers = + (meta + ~a:[a_charset "utf-8"] + ()) + :: + (link ~rel:[`Stylesheet] ~href:"media/revamp.css" ()) + :: + (link ~rel:[`Stylesheet] ~href:"media/styles.css" ()) + :: + headers in + html ~a:[a_xmlns `W3_org_1999_xhtml] + (head + (Html5.M.title (pcdata title)) + headers + ) + (Html5.M.body ~a:[a_class ["debian"]] [ + h1 ~a:[a_id "title"] [pcdata "Ubuntu Release Management"]; + h2 ~a:[a_id "subtitle"] subtitle; + div ~a:[a_id "body"] body; + div ~a:[a_id "footer"] footer + ]) + +open Template + +let () = + Benl_templates.register_template { + name = "Ubuntu"; + page; + intro = []; + pts = (fun ~src -> sprintf "https://launchpad.net/ubuntu/+source/%s" src); + changelog = (fun ~letter ~src ~ver -> sprintf "http://changelogs.ubuntu.com/changelogs/%s/%s_%s/changelog" letter src ver); + buildd = (fun ~src ~ver -> sprintf "https://launchpad.net/ubuntu/+source/%s/%s" src ver); + buildds = (fun ~srcs -> None); + bugs = (fun ~src -> sprintf "https://bugs.launchpad.net/ubuntu/+source/%s" src); + critical_bugs = (fun ~srcs -> None); + msg_id = (fun ~mid -> sprintf "http://mid.gmane.org/%s" mid); + }

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: mldonkey

mldonkey (3.1.6-0ubuntu1) artful; urgency=medium * New upstream release -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 03 Jul 2017 18:05:21 +0100 mldonkey (3.1.5-3.1build1) artful; urgency=high * No change rebuild against ocaml 4.04. -- Dimitri John Ledkov <xnox@ubuntu.com> Fri, 30 Jun 2017 14:52:16 +0100

Modifications :
  1. Download patch src/utils/bitstring/bitstring.ml.in

    --- 3.1.5-3.1/src/utils/bitstring/bitstring.ml.in 2010-08-29 20:17:57.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/bitstring/bitstring.ml.in 2017-01-23 01:54:46.000000000 +0000 @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring.ml.in,v 1.1 2010/08/29 20:17:57 spiralvoice Exp $ + * $Id$ *) open Printf
  2. Download patch src/networks/fasttrack/fasttrackProto.ml
  3. Download patch distrib/ChangeLog

    --- 3.1.5-3.1/distrib/ChangeLog 2014-03-22 11:09:35.000000000 +0000 +++ 3.1.6-0ubuntu1/distrib/ChangeLog 2017-01-23 01:54:46.000000000 +0000 @@ -14,6 +14,9 @@ http://mldonkey.sourceforge.net/Windows# ChangeLog ========= +2017/01/22: ygrek +Changes after 3.1.5 are in CHANGES file in the project root directory + 2014/03/22: version 3.1.5 = tag release-3-1-5 8415: Revert patch #8328 to fix GTK2 gui's compilation (ygrek)
  4. Download patch src/networks/fasttrack/fst_crypt.h

    --- 3.1.5-3.1/src/networks/fasttrack/fst_crypt.h 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fst_crypt.h 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * + * Copyright (C) 2003 giFT-FastTrack project + * http://developer.berlios.de/projects/gift-fasttrack + * + * 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, 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. + */ + +#ifndef _CRYPT_H_ +#define _CRYPT_H_ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +/*****************************************************************************/ + +typedef struct +{ + int pos; + unsigned int wrapcount; + unsigned int add_to_lookup; + unsigned int enc_type; + unsigned char pad[63]; + unsigned char lookup[256]; + unsigned int pad16[20]; + unsigned int seed; +} FSTCipher; + +/*****************************************************************************/ + +/* allocate and init cipher */ +FSTCipher *fst_cipher_create(); + +/* free cipher */ +void fst_cipher_free (FSTCipher *cipher); + +/* initialize cipher state */ +/* returns FALSE if enc_type is not supported, TRUE otherwise */ +int fst_cipher_init (FSTCipher *cipher, unsigned int seed, unsigned int enc_type); + +/* encrypt / decrypt a byte of data with cipher */ +unsigned char fst_cipher_clock (FSTCipher *cipher); + +/* encrypt / decrypt a block of data with cipher */ +void fst_cipher_crypt (FSTCipher *cipher, unsigned char *data, int len); + +/*****************************************************************************/ + +/* returns encrypted or decrypted enc_type */ +unsigned int fst_cipher_mangle_enc_type (unsigned int seed, unsigned int enc_type); + +/*****************************************************************************/ + +#endif
  5. Download patch src/networks/bittorrent/bTTorrent.ml

    --- 3.1.5-3.1/src/networks/bittorrent/bTTorrent.ml 2011-01-23 15:20:26.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/bittorrent/bTTorrent.ml 2017-01-23 01:54:46.000000000 +0000 @@ -416,7 +416,7 @@ let make_torrent announce filename comme Unix32.flush_fd t; let length = Unix32.getsize64 t in let npieces = 1+ Int64.to_int ((length -- one) // chunk_size) in - let pieces = Array.create npieces Sha1.null in + let pieces = Array.make npieces Sha1.null in for i = 0 to npieces - 1 do let begin_pos = chunk_size *.. i in
  6. Download patch src/networks/bittorrent/bTGlobals.ml

    --- 3.1.5-3.1/src/networks/bittorrent/bTGlobals.ml 2012-07-27 17:46:38.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/bittorrent/bTGlobals.ml 2017-01-23 01:54:46.000000000 +0000 @@ -165,8 +165,8 @@ let bt_upload_counter = ref Int64.zero let log_prefix = "[BT]" -let lprintf_nl fmt = - lprintf_nl2 log_prefix fmt +let lprintf_nl ?exn fmt = + lprintf_nl2 ?exn log_prefix fmt let lprintf_n fmt = lprintf2 log_prefix fmt
  7. Download patch .pc/0001-Use-usr-bin-see-as-default-previewer.patch/src/daemon/common/commonOptions.ml

    --- 3.1.5-3.1/.pc/0001-Use-usr-bin-see-as-default-previewer.patch/src/daemon/common/commonOptions.ml 2013-07-07 11:07:13.000000000 +0000 +++ 3.1.6-0ubuntu1/.pc/0001-Use-usr-bin-see-as-default-previewer.patch/src/daemon/common/commonOptions.ml 2017-01-23 01:54:46.000000000 +0000 @@ -1046,7 +1046,7 @@ let web_infos = define_option current_se web_infos = [ (\"server.met\", 0, \"http://www.gruk.org/server.met.gz\"); (\"hublist\", 0, \"http://dchublist.com/hublist.xml.bz2\"); - (\"guarding.p2p\", 96, \"http://www.bluetack.co.uk/config/level1.gz\"); + (\"guarding.p2p\", 96, \"http://upd.emule-security.org/ipfilter.zip\"); (\"ocl\", 24, \"http://members.lycos.co.uk/appbyhp2/FlockHelpApp/contact-files/contact.ocl\"); (\"contact.dat\", 168, \"http://download.overnet.org/contact.dat\"); (\"geoip.dat\", 168, \"http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz\"); @@ -1055,7 +1055,7 @@ let web_infos = define_option current_se (list_option (tuple3_option (string_option, int_option, string_option))) [ ("guarding.p2p", 96, - "http://www.bluetack.co.uk/config/level1.gz"); + "http://upd.emule-security.org/ipfilter.zip"); ("server.met", 0, "http://www.gruk.org/server.met.gz"); ("geoip.dat", 0, @@ -1670,7 +1670,7 @@ let max_displayed_results = define_exper let options_version = define_expert_option current_section ["options_version"] ~internal: true "(internal option)" - int_option 22 + int_option 23 let max_comments_per_file = define_expert_option current_section ["max_comments_per_file"] "Maximum number of comments per file" @@ -2274,4 +2274,9 @@ let rec update_options () = enable_overnet =:= false; update 22 + | 22 -> + web_infos_remove "http://www.bluetack.co.uk/config/level1.gz"; + web_infos_add "guarding.p2p" 0 "http://upd.emule-security.org/ipfilter.zip"; + update 23 + | _ -> ()
  8. Download patch src/networks/donkey/donkeyTypes.ml

    --- 3.1.5-3.1/src/networks/donkey/donkeyTypes.ml 2010-10-23 18:25:14.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/donkey/donkeyTypes.ml 2017-01-23 01:54:46.000000000 +0000 @@ -26,8 +26,8 @@ open Printf2 let log_prefix = "[EDK]" -let lprintf_nl fmt = - lprintf_nl2 log_prefix fmt +let lprintf_nl ?exn fmt = + lprintf_nl2 ?exn log_prefix fmt let lprintf_n fmt = lprintf2 log_prefix fmt
  9. Download patch src/gtk2/gui/guiCom.ml

    --- 3.1.5-3.1/src/gtk2/gui/guiCom.ml 2007-11-03 22:04:51.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk2/gui/guiCom.ml 2017-01-23 01:54:46.000000000 +0000 @@ -44,9 +44,9 @@ let when_disconnected (gui : gui) = gui.clear () -let to_gui_protocol_used = Array.create (to_gui_last_opcode+1) +let to_gui_protocol_used = Array.make (to_gui_last_opcode+1) GuiProto.best_gui_version -let from_gui_protocol_used = Array.create +let from_gui_protocol_used = Array.make (from_gui_last_opcode+1) GuiProto.best_gui_version
  10. Download patch src/daemon/driver/driverCommands.ml

    --- 3.1.5-3.1/src/daemon/driver/driverCommands.ml 2014-03-22 11:04:27.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/driver/driverCommands.ml 2017-01-23 01:54:46.000000000 +0000 @@ -2970,20 +2970,39 @@ let _ = (* *) (*************************************************************************) -let _ = +(* TODO richer condition language *) +let parse_filter args = + match args with + | ["where";"priority";(">"|"<"|">="|"<="|"="|"<>" as op);n] -> + let n = int_of_string n in + let op = match op with + | ">" -> (>) + | "<" -> (<) + | ">=" -> (>=) + | "<=" -> (<=) + | "=" -> (=) + | "<>" -> (<>) + | _ -> assert false + in + `Filter (fun file -> op (file_priority file) n) + | ["all"] -> `All + | l -> `Files (List.map int_of_string l) + +let filter_files args k = + match parse_filter args with + | `All -> List.iter k !!files + | `Filter filter -> List.iter (fun file -> if filter file then k file) !!files + | `Files l -> List.iter begin fun num -> + match try Some (file_find num) with _ -> None with + | None -> () + | Some file -> k file + end l + +let () = let resume_alias s = s, Arg_multiple (fun args o -> - if args = ["all"] && user2_is_admin o.conn_user.ui_user then - List.iter (fun file -> - file_resume file (admin_user ()) - ) !!files - else - List.iter (fun num -> - let num = int_of_string num in - List.iter (fun file -> - if (as_file_impl file).impl_file_num = num then - file_resume file o.conn_user.ui_user - ) !!files) args; "" - ), "<num|all> :\t\t\tresume a paused download (use arg 'all' for all files)" + filter_files args (fun file -> file_resume file o.conn_user.ui_user); + "" + ), "<nums|all|where filter> :\t\t\tresume a paused download (use arg 'all' for all files)" in register_commands "Driver/Downloads" [ @@ -2994,24 +3013,20 @@ let _ = p :: files -> let absolute, p = if String2.check_prefix p "=" then true, int_of_string (String2.after p 1) - else false, int_of_string p in - List.iter (fun arg -> - try - let file = file_find (int_of_string arg) in - let priority = if absolute then p - else (file_priority file) + p in - let priority = if priority < -100 then -100 else - if priority > 100 then 100 else priority in - set_file_priority file priority; - Printf.bprintf buf "Setting priority of %s to %d\n" - (file_best_name file) (file_priority file); - with _ -> failwith (Printf.sprintf "No file number %s" arg) - ) files; + else false, int_of_string p + in + filter_files files begin fun file -> + let priority = if absolute then p else file_priority file + p in + let priority = max (-100) (min 100 priority) in + set_file_priority file priority; + Printf.bprintf buf "Setting priority of %s to %d\n" + (file_best_name file) (file_priority file) + end; force_download_quotas (); _s "done" | [] -> "Bad number of args" - ), "<priority> <files numbers> :\tchange file priorities"; + ), "<priority> <nums|all|where filter> :\tchange file priorities"; "download_order", Arg_two (fun num v o -> try @@ -3141,23 +3156,9 @@ let _ = ), "<num|all> :\t\t\tverify chunks of file <num> (use 'all' for all files)"; "pause", Arg_multiple (fun args o -> - let filter = - match args with (* TODO richer condition language *) - | ["where";"priority";(">"|"<" as op);n] -> - let n = int_of_string n in - let op = if op = ">" then (>) else (<) in - (fun file -> op (file_priority file) n) - | ["all"] -> (fun _ -> true) - | l -> - let l = List.map int_of_string l in - (fun file -> List.mem (file_num file) l) - in - List.iter begin fun file -> - if filter file then - file_pause file o.conn_user.ui_user - end !!files; + filter_files args (fun file -> file_pause file o.conn_user.ui_user); "" - ), "<num|all|where priority < prio> :\t\t\tpause a download (use arg 'all' for all files)"; + ), "<nums|all|where priority < prio> :\t\t\tpause a download (use arg 'all' for all files)"; resume_alias "resume"; resume_alias "unpause"; @@ -3255,7 +3256,7 @@ let _ = let num = int_of_string arg in try let file = file_find num in - set_file_best_name file new_name "" 0; + set_file_best_name file new_name 0; Printf.sprintf (_b "Download %d renamed to %s") num (file_best_name file) with e -> Printf.sprintf (_b "No file number %d, error %s") num (Printexc2.to_string e) ), "<num> \"<new name>\" :\t\tchange name of download <num> to <new name>";
  11. Download patch src/gtk2/gui/guiNetHtmlScanner.mll

    --- 3.1.5-3.1/src/gtk2/gui/guiNetHtmlScanner.mll 2005-10-31 18:34:02.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk2/gui/guiNetHtmlScanner.mll 2017-01-23 01:54:46.000000000 +0000 @@ -1,4 +1,4 @@ -(* $Id: guiNetHtmlScanner.mll,v 1.1 2005/10/31 18:34:02 spiralvoice Exp $ +(* $Id$ * ---------------------------------------------------------------------- * *) @@ -135,7 +135,7 @@ and scan_element = parse (* ====================================================================== * History: * - * $Log: guiNetHtmlScanner.mll,v $ + * $Log$ * Revision 1.1 2005/10/31 18:34:02 spiralvoice * patch #4583 *
  12. Download patch src/gtk2/gui/guiNetHtml.mli

    --- 3.1.5-3.1/src/gtk2/gui/guiNetHtml.mli 2005-10-31 18:34:02.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk2/gui/guiNetHtml.mli 2017-01-23 01:54:46.000000000 +0000 @@ -1,4 +1,4 @@ -(* $Id: guiNetHtml.mli,v 1.1 2005/10/31 18:34:02 spiralvoice Exp $ +(* $Id$ * ---------------------------------------------------------------------- * *)
  13. Download patch src/gtk2/gui/graphTypes.ml

    --- 3.1.5-3.1/src/gtk2/gui/graphTypes.ml 2006-08-16 19:10:34.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk2/gui/graphTypes.ml 2017-01-23 01:54:46.000000000 +0000 @@ -156,7 +156,7 @@ module GStack = struct if q.gstack_empty then [||] else begin - let r = Array.create (q.gstack_inpos - q.gstack_outpos) (f(Array.unsafe_get q.gstack_queue q.gstack_outpos)) in + let r = Array.make (q.gstack_inpos - q.gstack_outpos) (f(Array.unsafe_get q.gstack_queue q.gstack_outpos)) in for i = q.gstack_outpos to q.gstack_inpos - 1 do Array.unsafe_set r (i - q.gstack_outpos) (f(Array.unsafe_get q.gstack_queue i)) done; @@ -167,7 +167,7 @@ module GStack = struct if q.gstack_empty then [||] else begin - let r = Array.create (q.gstack_inpos - q.gstack_outpos) (f(Array.unsafe_get q.gstack_queue (q.gstack_inpos - 1))) in + let r = Array.make (q.gstack_inpos - q.gstack_outpos) (f(Array.unsafe_get q.gstack_queue (q.gstack_inpos - 1))) in for i = q.gstack_inpos - 1 downto q.gstack_outpos do Array.unsafe_set r (i - q.gstack_outpos) (f(Array.unsafe_get q.gstack_queue i)) done; @@ -178,7 +178,7 @@ module GStack = struct if q.gstack_empty then [||] else begin - let r = Array.create (q.gstack_inpos - q.gstack_outpos) (f 0 (Array.unsafe_get q.gstack_queue q.gstack_outpos)) in + let r = Array.make (q.gstack_inpos - q.gstack_outpos) (f 0 (Array.unsafe_get q.gstack_queue q.gstack_outpos)) in for i = q.gstack_outpos to q.gstack_inpos - 1 do Array.unsafe_set r (i - q.gstack_outpos) (f (i - q.gstack_outpos) (Array.unsafe_get q.gstack_queue i)) done; @@ -189,7 +189,7 @@ module GStack = struct if q.gstack_empty then [||] else begin - let r = Array.create (q.gstack_inpos - q.gstack_outpos) (f 0 (Array.unsafe_get q.gstack_queue (q.gstack_inpos - 1))) in + let r = Array.make (q.gstack_inpos - q.gstack_outpos) (f 0 (Array.unsafe_get q.gstack_queue (q.gstack_inpos - 1))) in for i = q.gstack_inpos - 1 downto q.gstack_outpos do Array.unsafe_set r (i - q.gstack_outpos) (f (i - q.gstack_outpos) (Array.unsafe_get q.gstack_queue i)) done;
  14. Download patch src/networks/soulseek/slskProtocol.ml

    --- 3.1.5-3.1/src/networks/soulseek/slskProtocol.ml 2005-09-06 11:25:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/soulseek/slskProtocol.ml 2017-01-23 01:54:46.000000000 +0000 @@ -321,8 +321,8 @@ module S2C = struct (* let nrooms = get_int s 0 in - let room_names = Array.create nrooms "" in - let room_nusers = Array.create nrooms 0 in + let room_names = Array.make nrooms "" in + let room_nusers = Array.make nrooms 0 in let rec iter_names nleft pos = if nleft = 0 then pos else let name, pos = get_string s pos in
  15. Download patch src/networks/donkey/donkeyClient.ml

    --- 3.1.5-3.1/src/networks/donkey/donkeyClient.ml 2010-10-24 12:04:24.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/donkey/donkeyClient.ml 2017-01-23 01:54:46.000000000 +0000 @@ -46,19 +46,14 @@ open TcpBufferedSocket open DonkeyOptions open CommonOptions open DonkeyComplexOptions +open DonkeyThieves open DonkeyGlobals open DonkeyStats -open DonkeyTypes +open DonkeyTypes open DonkeyReliability -open DonkeyThieves module VB = VerificationBitmap -let log_prefix = "[EDK]" - -let lprintf_nl fmt = - lprintf_nl2 log_prefix fmt - module Udp = DonkeyProtoUdp (* Lifetime of a socket after sending interesting messages *) @@ -289,8 +284,7 @@ let disconnect_client c reason = c.client_file_queue <- []; c.client_session_downloaded <- 0L; - with e -> lprintf_nl "Exception %s in disconnect_client" - (Printexc2.to_string e)); + with exn -> lprintf_nl ~exn "disconnect_client"); set_client_disconnected c reason; DonkeySources.source_disconnected c.client_source @@ -1325,9 +1319,8 @@ let client_to_client for_files c t sock c.client_all_files <- Some !list; client_must_update c - with e -> - lprintf_nl "Exception in ViewFilesReply %s" - (Printexc2.to_string e); + with exn -> + lprintf_nl ~exn "ViewFilesReply" end; | M.AvailableSlotReq _ -> @@ -1511,13 +1504,12 @@ other one for unlimited sockets. *) try let file = find_file t.Q.md4 in received_client_bitmap c file t.Q.chunks - with e -> + with exn -> client_send c (M.NoSuchFileReq t.Q.md4); - if !verbose then lprintf_nl - "QueryChunksReply: Client (%s) asked for file_md4 %s, Exception %s" + if !verbose then lprintf_nl ~exn + "QueryChunksReply: Client (%s) asked for file_md4 %s" (full_client_identifier c) (Md4.to_string t.Q.md4) - (Printexc2.to_string e) end | M.QueryChunkMd4ReplyReq t -> @@ -1783,9 +1775,8 @@ is checked for the file. if !verbose_unexpected_messages then lprintf_nl "donkeyClient: QueryFileReq: Client %s queried unpublished file %s" (full_client_identifier c) (Md4.to_string md4) - | e -> - lprintf_nl "Exception %s in QueryFileReq" - (Printexc.to_string e) + | exn -> + lprintf_nl ~exn "QueryFileReq" end | M.EmuleSignatureReq t -> @@ -2509,11 +2500,11 @@ can be increased by AvailableSlotReq, Bl (Ip.to_string ip) port; set_client_disconnected c (Closed_connect_failed); DonkeySources.source_disconnected c.client_source - | e -> - lprintf_nl "Exception %s in client connection to IP %s:%d" - (Printexc2.to_string e) (Ip.to_string ip) port; + | exn -> + lprintf_nl ~exn "client connection to IP %s:%d" + (Ip.to_string ip) port; (* connection_failed c.client_connection_control; *) - set_client_disconnected c (Closed_for_exception e); + set_client_disconnected c (Closed_for_exception exn); DonkeySources.source_disconnected c.client_source ) in @@ -2628,12 +2619,10 @@ let client_connection_handler overnet t (DonkeyProtoCom.client_handler2 c (read_first_message overnet is_connecting_server cc) (client_to_client [])); - with e -> lprintf_nl "Exception %s in init_connection" - (Printexc2.to_string e); + with exn -> lprintf_nl ~exn "init_connection" ); - with e -> - lprintf_nl "Exception %s in client_connection_handler" - (Printexc2.to_string e); + with exn -> + lprintf_nl ~exn "client_connection_handler"; Unix.close s) end else @@ -2689,9 +2678,9 @@ let _ = M.QueryChunksReq file.file_md4); ignore (DonkeySources.add_request c.client_source file.file_sources (last_time ())) - with e -> + with exn -> if !verbose then - lprintf_nl "query_source: exception %s" (Printexc2.to_string e) + lprintf_nl ~exn "query_source" ); DonkeySources.functions.DonkeySources.function_connect <- @@ -2707,9 +2696,9 @@ let _ = if Ip.reachable server_ip then query_id server_ip server_port id; - with e -> + with exn -> if !verbose then begin - lprintf_nl "connect_source: exception %s" (Printexc2.to_string e); + lprintf_nl "connect_source" end ); @@ -2743,9 +2732,9 @@ a FIFO from where they are removed after with | Not_found -> () - | e -> + | exn -> if !verbose then - lprintf_nl "add_location: exception %s" (Printexc2.to_string e) + lprintf_nl ~exn "add_location" ); DonkeySources.functions.DonkeySources.function_remove_location <- (fun @@ -2758,8 +2747,8 @@ a FIFO from where they are removed after with | Not_found -> () - | e -> + | exn -> if !verbose then - lprintf_nl "remove_location for file_md4 %s: exception %s" - file_uid (Printexc2.to_string e) + lprintf_nl ~exn "remove_location for file_md4 %s" + file_uid )
  16. Download patch config/Makefile.in

    --- 3.1.5-3.1/config/Makefile.in 2012-07-01 17:47:41.000000000 +0000 +++ 3.1.6-0ubuntu1/config/Makefile.in 2017-01-23 01:54:46.000000000 +0000 @@ -148,9 +148,9 @@ CDK_SRCS += $(CDK)/zlib.ml $(CDK)/zip.m CDK_SRCS += $(LIB)/autoconf.ml -CDK_SRCS+= $(LIB)/fifo.ml $(CDK)/arg2.ml $(LIB)/syslog.ml $(CDK)/printf2.ml \ - $(CDK)/heap.ml \ - $(CDK)/printexc2.ml $(CDK)/genlex2.ml \ +CDK_SRCS+= $(LIB)/fifo.ml $(CDK)/arg2.ml $(LIB)/syslog.ml \ + $(CDK)/printexc2.ml $(CDK)/printf2.ml \ + $(CDK)/heap.ml $(CDK)/genlex2.ml \ $(CDK)/filepath.ml $(CDK)/string2.ml \ $(CDK)/filename2.ml $(CDK)/array2.ml $(CDK)/hashtbl2.ml \ $(CDK)/unix2.ml $(CDK)/file.ml \
  17. Download patch src/utils/bitstring/bitstring_c.c

    --- 3.1.5-3.1/src/utils/bitstring/bitstring_c.c 2010-08-29 20:17:57.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/bitstring/bitstring_c.c 2017-01-23 01:54:46.000000000 +0000 @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring_c.c,v 1.1 2010/08/29 20:17:57 spiralvoice Exp $ + * $Id$ */ /* This file contains hand-coded, optimized C implementations of
  18. Download patch src/gtk/gpattern/gpattern.ml

    --- 3.1.5-3.1/src/gtk/gpattern/gpattern.ml 2004-03-07 09:34:25.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk/gpattern/gpattern.ml 2017-01-23 01:54:46.000000000 +0000 @@ -318,9 +318,9 @@ class virtual ['a] filtered_plist method private add_hidden_item i = if nitems = Array.length items then begin let nis = nitems * 2 + 8 in - let is = Array.create nis i in + let is = Array.make nis i in Array.blit items 0 is 0 nitems; - contents <- Array.create nis dummy_line; + contents <- Array.make nis dummy_line; items <- is end else begin items.(nitems) <- i; @@ -604,11 +604,11 @@ class virtual ['a] filtered_ptree ) l; let length = Array.length !array_of_children in let new_nitems = nitems + length in - let new_items = Array.create new_nitems {data = i.data; children = []} in + let new_items = Array.make new_nitems {data = i.data; children = []} in Array.blit items 0 new_items 0 (row + 1); Array.blit !array_of_children 0 new_items (row + 1) length; Array.blit items (row + 1) new_items (row + length + 1) (nitems - row - 1); - let new_contents = Array.create new_nitems dummy_line in + let new_contents = Array.make new_nitems dummy_line in Array.blit contents 0 new_contents 0 (row + 1); Array.blit contents row new_contents (row + length + 1) (nitems - row - 1); nitems <- new_nitems; @@ -631,10 +631,10 @@ class virtual ['a] filtered_ptree let (row, _) = self#find (get_key i) in let length = List.assoc (get_key i) is_expanded in let new_nitems = nitems - length in - let new_items = Array.create new_nitems {data = i.data; children = []} in + let new_items = Array.make new_nitems {data = i.data; children = []} in Array.blit items 0 new_items 0 (row + 1); Array.blit items (row + length + 1) new_items (row + 1) (nitems - row - length - 1); - let new_contents = Array.create new_nitems dummy_line in + let new_contents = Array.make new_nitems dummy_line in Array.blit contents 0 new_contents 0 (row + 1); Array.blit contents (row + length + 1) new_contents (row + 1) (nitems - row - length - 1); nitems <- new_nitems; @@ -822,9 +822,9 @@ class virtual ['a] filtered_ptree method private add_hidden_item i = if nitems = Array.length items then begin let nis = nitems * 2 + 8 in - let is = Array.create nis i in + let is = Array.make nis i in Array.blit items 0 is 0 nitems; - contents <- Array.create nis dummy_line; + contents <- Array.make nis dummy_line; items <- is end else begin items.(nitems) <- i;
  19. Download patch src/daemon/common/commonInteractive.ml

    --- 3.1.5-3.1/src/daemon/common/commonInteractive.ml 2014-03-10 16:51:45.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonInteractive.ml 2017-01-23 01:54:46.000000000 +0000 @@ -135,7 +135,7 @@ let send_dirfull_warning dir full line1 let file_committed_name incoming_dir file = (try Unix2.safe_mkdir incoming_dir with _ -> ()); - let fs = Unix32.filesystem incoming_dir in + let fs = Unix32.filesystem_type incoming_dir in let namemax = match Unix32.fnamelen incoming_dir with | None -> 0 @@ -157,7 +157,7 @@ let file_committed_name incoming_dir fil in iter 1 else new_name in - set_file_best_name file (file_best_name file) fs namemax; + set_file_best_name file (file_best_name file) ~fs namemax; Filename.concat incoming_dir new_name let script_for_file file incoming new_name =
  20. Download patch src/networks/bittorrent/bTUdpTracker.mlp

    --- 3.1.5-3.1/src/networks/bittorrent/bTUdpTracker.mlp 2014-02-23 18:11:38.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/bittorrent/bTUdpTracker.mlp 2017-01-23 01:54:46.000000000 +0000 @@ -22,7 +22,7 @@ let connect_response s exp_txn = | { 0l : 32 ; txn : 32 ; conn_id : 64 } -> if txn = exp_txn then conn_id else fail "error connect_response txn %ld expected %ld" txn exp_txn | { :error_response } -> fail "error connect_response txn %ld : %s" txn msg - | { } -> fail "error connect_response : %s" (AnyEndian.dump_hex_s s) + | { } -> fail "error connect_response (expected txn %ld) : %s" exp_txn (AnyEndian.dump_hex_s s) (** announce *) let announce_request conn txn ~info_hash ~peer_id (downloaded,left,uploaded) event ?(ip=0l) ?(key=0l) ~numwant port = @@ -56,4 +56,4 @@ let announce_response s exp_txn = else fail "error announce_response txn %ld expected %ld" txn exp_txn | { :error_response } -> fail "error announce_response txn %ld : %s" txn msg - | { } -> fail "error announce_response : %s" (AnyEndian.dump_hex_s s) + | { } -> fail "error announce_response (expected txn %ld) : %s" exp_txn (AnyEndian.dump_hex_s s)
  21. Download patch src/daemon/driver/driverInterface.ml

    --- 3.1.5-3.1/src/daemon/driver/driverInterface.ml 2011-01-23 15:20:26.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/driver/driverInterface.ml 2017-01-23 01:54:46.000000000 +0000 @@ -533,9 +533,9 @@ let gui_reader (gui: gui_record) t _ = | GuiProtocol version -> let version = min GuiProto.best_gui_version version in - gui.gui_proto_to_gui_version <- Array.create + gui.gui_proto_to_gui_version <- Array.make (to_gui_last_opcode + 1) version; - gui.gui_proto_from_gui_version <- Array.create + gui.gui_proto_from_gui_version <- Array.make (from_gui_last_opcode + 1) version; if not !verbose_no_login then lprintf_nl "GUI protocol %d" version @@ -831,7 +831,7 @@ let gui_reader (gui: gui_record) t _ = | P.SaveFile (num, name) -> let file = file_find num in - set_file_best_name file name "" 0; + set_file_best_name file name 0; (match file_state file with FileDownloaded -> file_save_as file name; @@ -888,7 +888,7 @@ let gui_reader (gui: gui_record) t _ = | P.RenameFile (num, new_name) -> let file = file_find num in - set_file_best_name file new_name "" 0; + set_file_best_name file new_name 0; addevent gui.gui_events.gui_files num true | P.ConnectFriend num @@ -1159,8 +1159,8 @@ let new_gui gui_send gui_auth sock gui_t gui_sock = sock; gui_search_nums = []; gui_events = gui_events (); - gui_proto_to_gui_version = Array.create (to_gui_last_opcode+1) 0; - gui_proto_from_gui_version = Array.create (from_gui_last_opcode+1) 0; + gui_proto_to_gui_version = Array.make (to_gui_last_opcode+1) 0; + gui_proto_from_gui_version = Array.make (from_gui_last_opcode+1) 0; gui_num = !gui_counter; gui_auth = gui_auth; gui_poll = false;
  22. Download patch src/utils/bitstring/bitstring_persistent.mli

    --- 3.1.5-3.1/src/utils/bitstring/bitstring_persistent.mli 2010-08-29 20:17:57.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/bitstring/bitstring_persistent.mli 2017-01-23 01:54:46.000000000 +0000 @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring_persistent.mli,v 1.1 2010/08/29 20:17:57 spiralvoice Exp $ + * $Id$ *) (**
  23. Download patch src/networks/fileTP/fileTPGlobals.ml

    --- 3.1.5-3.1/src/networks/fileTP/fileTPGlobals.ml 2011-10-25 17:33:22.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fileTP/fileTPGlobals.ml 2017-01-23 01:54:46.000000000 +0000 @@ -43,8 +43,8 @@ open FileTPOptions let log_prefix = "[FileTP]" -let lprintf_nl fmt = - lprintf_nl2 log_prefix fmt +let lprintf_nl ?exn fmt = + lprintf_nl2 ?exn log_prefix fmt let lprintf_n fmt = lprintf2 log_prefix fmt
  24. Download patch src/networks/fasttrack/enc_type_1.c
  25. Download patch config/configure

    --- 3.1.5-3.1/config/configure 2014-03-22 11:12:25.000000000 +0000 +++ 3.1.6-0ubuntu1/config/configure 2017-01-23 02:15:14.000000000 +0000 @@ -722,6 +722,7 @@ RANLIB CUT STAT SVNVERSION +GIT GREP SED host_os @@ -759,6 +760,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -864,6 +866,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1116,6 +1119,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1253,7 +1265,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1406,6 +1418,7 @@ Fine tuning of the installation director --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2379,7 +2392,7 @@ cd config MAJOR_VERSION=3 MINOR_VERSION=1 -SUB_VERSION=5 # range 0-7 due to eMule limitations +SUB_VERSION=6 # range 0-7 due to eMule limitations # ********** ********** # ********** check for C compiler ********** @@ -3674,6 +3687,65 @@ ARCH=$arch # ********** Parse checkout date (CVS) or revision (SVN) if available ********** # ********** ********** +if test -d ../.git; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking git revision" >&5 +$as_echo "$as_me: checking git revision" >&6;} + # Extract the first word of "git", so it can be a program name with args. +set dummy git; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GIT"; then + ac_cv_prog_GIT="$GIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GIT="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GIT=$ac_cv_prog_GIT +if test -n "$GIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +$as_echo "$GIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + SUB_VERSION3="git" + if test "$ac_cv_prog_GIT" = "yes"; then + GIT_BRANCH=`git symbolic-ref -q --short HEAD` + GIT_COMMIT=`git describe --always --tags` + case "$GIT_BRANCH" in + ""|"master") + SCM_VERSION="${GIT_COMMIT}" + ;; + *) + SCM_VERSION="${GIT_COMMIT}-${GIT_BRANCH}" + ;; + esac + else + { $as_echo "$as_me:${as_lineno-$LINENO}: cannot determine git revision" >&5 +$as_echo "$as_me: cannot determine git revision" >&6;} + SCM_VERSION="" + fi +fi + if test -d .svn; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking SVN revision" >&5 $as_echo "$as_me: checking SVN revision" >&6;} @@ -3717,7 +3789,8 @@ fi if test "$ac_cv_prog_SVNVERSION" = "svnversion"; then SUB_VERSION3="SVN" SCM_VERSION=`svnversion -n .` - else { $as_echo "$as_me:${as_lineno-$LINENO}: cannot checking SVN revision... no SVNVERSION" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: cannot checking SVN revision... no SVNVERSION" >&5 $as_echo "$as_me: cannot checking SVN revision... no SVNVERSION" >&6;} SCM_VERSION="cannot find out SVN revision (no SVNVERSION)" fi @@ -5523,7 +5596,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5569,7 +5642,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5593,7 +5666,7 @@ rm -f core conftest.err conftest.$ac_obj We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5638,7 +5711,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5662,7 +5735,7 @@ rm -f core conftest.err conftest.$ac_obj We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1];
  26. Download patch src/networks/fileTP/fileTPHTTP.ml

    --- 3.1.5-3.1/src/networks/fileTP/fileTPHTTP.ml 2011-07-16 08:59:27.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fileTP/fileTPHTTP.ml 2017-01-23 01:54:46.000000000 +0000 @@ -46,14 +46,6 @@ open FileTPProtocol open FileTPClients -let log_prefix = "[FileTP]" - -let lprintf_nl fmt = - lprintf_nl2 log_prefix fmt - -let lprintf_n fmt = - lprintf2 log_prefix fmt - (*************************************************************************) (* *) (* MAIN *)
  27. Download patch src/networks/fasttrack/fasttrackClients.mlt

    --- 3.1.5-3.1/src/networks/fasttrack/fasttrackClients.mlt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fasttrackClients.mlt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,4 @@ +#where "gnutella_" = "fasttrack_" +#where "_gnutella" = "_fasttrack" +#where "Gnutella" = "Fasttrack" +#include "src/networks/gnutella/gnutellaClients.ml"
  28. Download patch src/daemon/driver/driverInteractive.ml

    --- 3.1.5-3.1/src/daemon/driver/driverInteractive.ml 2013-07-07 10:58:32.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/driver/driverInteractive.ml 2017-01-23 01:54:46.000000000 +0000 @@ -364,7 +364,7 @@ let print_table_text buf alignments titl if len > !max_cols then max_cols := len ) lines; let ncols = !max_cols in - let cols = Array.create ncols 0 in + let cols = Array.make ncols 0 in List.iter (fun line -> let len = Array.length line in for i = 0 to len-1 do @@ -377,7 +377,7 @@ let print_table_text buf alignments titl Buffer.add_string buf col_sep; ) titles; Buffer.add_char buf '\n'; - let aligns = Array.create ncols Align_Center in + let aligns = Array.make ncols Align_Center in Array.iteri (fun i al -> aligns.(i) <- al) alignments; List.iter (fun line -> let len = Array.length line in
  29. Download patch src/daemon/common/commonFile.ml

    --- 3.1.5-3.1/src/daemon/common/commonFile.ml 2011-10-25 17:33:21.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonFile.ml 2017-01-23 01:54:46.000000000 +0000 @@ -323,7 +323,7 @@ let file_best_name (file : file) = let file = as_file_impl file in file.impl_file_best_name -let set_file_best_name file name fs namemax = +let set_file_best_name file name ?(fs=`Unknown) namemax = let file = as_file_impl file in let old_name = file.impl_file_best_name in let real_name = Filename2.filesystem_compliant name fs namemax in @@ -1265,13 +1265,13 @@ let impl_file_info impl = T.file_release = impl.impl_file_release; } -let lprintf_file_nl file fmt = - lprintf_nl2 ("[" ^ (file_network file).network_shortname ^ +let lprintf_file_nl ?exn file fmt = + lprintf_nl2 ?exn ("[" ^ (file_network file).network_shortname ^ "] [file_num " ^ (string_of_int (file_num file)) ^ "]" ^ "[temp " ^ (file_disk_name file) ^ "]") fmt let concat_file dir filename = - let fs = Unix32.filesystem dir in + let fs = Unix32.filesystem_type dir in let namemax = match Unix32.fnamelen dir with | None -> 0
  30. Download patch src/utils/cdk/arg2.ml

    --- 3.1.5-3.1/src/utils/cdk/arg2.ml 2007-02-19 21:35:48.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/cdk/arg2.ml 2017-01-23 01:54:46.000000000 +0000 @@ -11,7 +11,7 @@ (* *) (***********************************************************************) -(* $Id: arg2.ml,v 1.6 2007/02/19 21:35:48 spiralvoice Exp $ *) +(* $Id$ *) type spec = | Unit of (unit -> unit) (* Call the function with unit argument *)
  31. Download patch src/networks/fasttrack/fst_crypt_ml.c

    --- 3.1.5-3.1/src/networks/fasttrack/fst_crypt_ml.c 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fst_crypt_ml.c 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,180 @@ +/* Copyright 2001, 2002 b8_bavard, b8_fee_carabine, INRIA */ +/* + This file is part of mldonkey. + + mldonkey 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. + + mldonkey 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 mldonkey; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "fst_crypt.h" + +#include <sys/types.h> +#include <unistd.h> + +#include "caml/mlvalues.h" +#include "caml/fail.h" + +#if defined(__MINGW32__) +typedef unsigned int uint; +#include <winsock.h> +#else +#include <netinet/in.h> +#endif +/************************************************************************/ + + +/* Functions for MLdonkey */ + + +/************************************************************************/ + +value ml_create_cipher(value unit) +{ + return (value) fst_cipher_create(); +} + +value ml_apply_cipher(value cipher_v, value s_v, value pos_v, value len_v) +{ + FSTCipher* cipher = (FSTCipher*) cipher_v; + char *s = String_val(s_v); + int pos = Int_val(pos_v); + int len = Int_val(len_v); + +/* printf("Apply cipher %X on %d [from %d]\n", cipher, len, pos); */ + + fst_cipher_crypt(cipher, s+pos, len); + + return Val_unit; +} + +value ml_init_cipher(value cipher_v) +{ + FSTCipher* cipher = (FSTCipher*) cipher_v; + fst_cipher_init(cipher, cipher->seed, cipher->enc_type); + + return Val_unit; +} + +value ml_set_cipher(value cipher_v, value seed_v, value encode_v) +{ + FSTCipher* cipher = (FSTCipher*) cipher_v; + unsigned int seed = Int32_val(seed_v); + unsigned int encode = Int_val(encode_v); + +/* printf("ml_set_cipher %X seed:%X enc_type: %X\n", cipher, seed, encode); */ + + cipher->enc_type = encode; + cipher->seed = seed; + + return Val_unit; +} + +value ml_cipher_packet_get(value s_v, value pos_v, value in_cipher_v) +{ + FSTCipher* in_cipher = (FSTCipher*) in_cipher_v; + char *s = String_val(s_v); + int pos = Int_val(pos_v); + unsigned int seed; + unsigned int enc_type; + +/* + printf("ml_cipher_packet_get IN:%X OUT:%X pos %d\n", in_cipher, out_cipher, pos); + + printf("out seed:%X enc_type: %X\n", out_cipher->seed, out_cipher->enc_type); +*/ + + seed = htonl (((unsigned int*)(s+pos))[0]); + enc_type = htonl (((unsigned int*)(s+pos+4))[0]); + enc_type = fst_cipher_mangle_enc_type (seed, enc_type); + + in_cipher->seed = seed; + in_cipher->enc_type = enc_type; +/* printf("in seed:%X enc_type: %X\n", seed, out_cipher->enc_type); */ + +/* if(enc_type > 0x29) failwith ("ERROR: unsupported encryption"); */ + + return Val_unit; +} + +value ml_xor_ciphers(value out_cipher_v, value in_cipher_v){ + FSTCipher* in_cipher = (FSTCipher*) in_cipher_v; + FSTCipher* out_cipher = (FSTCipher*) out_cipher_v; + + out_cipher->seed ^= in_cipher->seed; /* xor send cipher with received seed */ + + /* the correct behaviour here is to use the enc_type the supernode sent + * us for out_cipher too. + */ + out_cipher->enc_type = in_cipher->enc_type; + + return Val_unit; +} + +value ml_xor_ciphers2(value out_cipher_v, value in_cipher_v){ + FSTCipher* in_cipher = (FSTCipher*) in_cipher_v; + FSTCipher* out_cipher = (FSTCipher*) out_cipher_v; + unsigned int seed = out_cipher->seed; + + out_cipher->seed ^= in_cipher->seed; /* xor send cipher with received seed */ + in_cipher->seed ^= seed; + fst_cipher_init(out_cipher, out_cipher->seed, out_cipher->enc_type); + + return Val_unit; +} + + +value ml_cipher_packet_set(value cipher_v, value s_v, value pos_v) +{ + FSTCipher* cipher = (FSTCipher*) cipher_v; + char *s = String_val(s_v); + int pos = Int_val(pos_v); + + ((unsigned int*)(s+pos))[0] = htonl(cipher->seed); + ((unsigned int*)(s+pos+4))[0] = htonl( + fst_cipher_mangle_enc_type(cipher->seed, cipher->enc_type)); + + return Val_unit; +} + +value ml_cipher_enc_type(value cipher_v) +{ + FSTCipher* cipher = (FSTCipher*) cipher_v; + + return Val_int(cipher->enc_type); +} + +value ml_cipher_packet_set_xored(value cipher_v, value s_v, value pos_v, value xor_cipher_v) +{ + FSTCipher* cipher = (FSTCipher*) cipher_v; + FSTCipher* xor_cipher = (FSTCipher*) xor_cipher_v; + char *s = String_val(s_v); + int pos = Int_val(pos_v); + unsigned int seed = cipher->seed; + + seed ^= xor_cipher->seed; + ((unsigned int*)(s+pos))[0] = htonl(seed); + ((unsigned int*)(s+pos+4))[0] = htonl( + fst_cipher_mangle_enc_type(cipher->seed, cipher->enc_type)); + + return Val_unit; +} + + +value ml_cipher_free(value cipher_v) +{ + FSTCipher* cipher = (FSTCipher*) cipher_v; + fst_cipher_free(cipher); + + return Val_unit; +}
  32. Download patch src/networks/fasttrack/enc_type_2.c
  33. Download patch debian/control

    --- 3.1.5-3.1/debian/control 2015-10-14 08:04:53.000000000 +0000 +++ 3.1.6-0ubuntu1/debian/control 2017-06-30 13:52:16.000000000 +0000 @@ -1,7 +1,8 @@ Source: mldonkey Section: net Priority: optional -Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> Uploaders: Samuel Mimram <smimram@debian.org>, Mehdi Dogguy <mehdi@debian.org>
  34. Download patch src/networks/donkey/donkeyGlobals.ml

    --- 3.1.5-3.1/src/networks/donkey/donkeyGlobals.ml 2011-10-25 17:33:21.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/donkey/donkeyGlobals.ml 2017-01-23 01:54:46.000000000 +0000 @@ -44,8 +44,8 @@ open CommonOptions let log_prefix = "[EDK]" -let lprintf_nl fmt = - lprintf_nl2 log_prefix fmt +let lprintf_nl ?exn fmt = + lprintf_nl2 ?exn log_prefix fmt (************************************************************* @@ -324,7 +324,7 @@ let update_best_name file = match impl.impl_file_probable_name with None -> () | Some best_name -> - set_file_best_name file best_name "" 0 + set_file_best_name file best_name 0 with Not_found -> () let new_file file_diskname file_state md4 file_size filename writable user group = @@ -781,7 +781,6 @@ let set_client_name c name md4 = c.client_md4 <- md4; end -exception ClientFound of client let find_client_by_name name = try H.iter (fun c ->
  35. Download patch src/config/unix/os_stubs_c.c

    --- 3.1.5-3.1/src/config/unix/os_stubs_c.c 2010-07-16 13:56:35.000000000 +0000 +++ 3.1.6-0ubuntu1/src/config/unix/os_stubs_c.c 2017-01-23 01:54:46.000000000 +0000 @@ -66,7 +66,7 @@ ssize_t os_read(OS_FD fd, char *buf, siz void os_ftruncate(OS_FD fd, OFF_T len, /* bool */ int sparse) { - int64 cursize; + int64_t cursize; if(!fd) failwith("ftruncate32: file is closed"); cursize = os_getfdsize(fd); @@ -109,7 +109,7 @@ int os_getdtablesize() *******************************************************************/ -int64 os_getfdsize(OS_FD fd) +int64_t os_getfdsize(OS_FD fd) { struct stat buf; @@ -127,7 +127,7 @@ int64 os_getfdsize(OS_FD fd) *******************************************************************/ -int64 os_getfilesize(char *path) +int64_t os_getfilesize(char *path) { struct stat buf;
  36. Download patch src/daemon/common/commonUploads.ml

    --- 3.1.5-3.1/src/daemon/common/commonUploads.ml 2010-07-16 13:57:39.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonUploads.ml 2017-01-23 01:54:46.000000000 +0000 @@ -399,7 +399,7 @@ let flatten_tiger_array array = let unflatten_tiger_array s = let len = String.length s / TigerTree.length in - let array = Array.create len TigerTree.null in + let array = Array.make len TigerTree.null in for i = 0 to len - 1 do array.(i) <- TigerTree.direct_of_string (String.sub s (i * TigerTree.length) TigerTree.length) @@ -409,7 +409,7 @@ let unflatten_tiger_array s = let make_tiger_tree array = let len = Array.length array in let pos, list = tiger_pos2 len in - let s = Array.create (pos + len) TigerTree.null in + let s = Array.make (pos + len) TigerTree.null in for i = 0 to len - 1 do s.(pos+i) <- array.(i) done;
  37. Download patch src/daemon/common/commonGlobals.ml

    --- 3.1.5-3.1/src/daemon/common/commonGlobals.ml 2013-07-07 11:04:11.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonGlobals.ml 2017-01-23 01:54:46.000000000 +0000 @@ -592,7 +592,7 @@ let update_upload_history () = done let update_h_download_history () = - if (!history_h_step = history_size * history_step) or ( (Fifo.length download_history) <= (!history_size_for_h_graph+1)) then + if (!history_h_step = history_size * history_step) || ( (Fifo.length download_history) <= (!history_size_for_h_graph+1)) then Fifo.put download_h_history ((List.fold_left (+) 0 (Fifo.to_list download_history)) / ((Fifo.length download_history))) else Fifo.put download_h_history ((List.fold_left (+) 0 @@ -606,7 +606,7 @@ let update_h_download_history () = let update_h_upload_history () = (* Fifo.put upload_h_history ((Fifo.length upload_history) / 720); *) - if (!history_h_step = history_size * history_step) or ((Fifo.length upload_history) <= (!history_size_for_h_graph+1)) then + if (!history_h_step = history_size * history_step) || ((Fifo.length upload_history) <= (!history_size_for_h_graph+1)) then Fifo.put upload_h_history ((List.fold_left (+) 0 (Fifo.to_list upload_history)) / ((Fifo.length upload_history))) else Fifo.put upload_h_history ((List.fold_left (+) 0
  38. Download patch src/config/mingw/os_stubs_c.c

    --- 3.1.5-3.1/src/config/mingw/os_stubs_c.c 2010-07-16 13:56:35.000000000 +0000 +++ 3.1.6-0ubuntu1/src/config/mingw/os_stubs_c.c 2017-01-23 01:54:46.000000000 +0000 @@ -110,13 +110,13 @@ int os_getdtablesize() *******************************************************************/ -int64 os_getfdsize(OS_FD fd) +int64_t os_getfdsize(OS_FD fd) { long len_high; - int64 ret; + int64_t ret; ret = GetFileSize(fd, &len_high); - return ((int64) len_high << 32 | ret); + return ((int64_t) len_high << 32 | ret); } /******************************************************************* @@ -127,7 +127,7 @@ int64 os_getfdsize(OS_FD fd) *******************************************************************/ -int64 os_getfilesize(char *path) +int64_t os_getfilesize(char *path) { OS_FD fd = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, @@ -137,7 +137,7 @@ int64 os_getfilesize(char *path) if (fd != INVALID_HANDLE_VALUE){ ret = GetFileSize(fd, &len_high); CloseHandle(fd); - return ((int64) len_high << 32 | ret); + return ((int64_t) len_high << 32 | ret); } else { long err = GetLastError(); if (err != NO_ERROR) {
  39. Download patch docs/uri.txt

    --- 3.1.5-3.1/docs/uri.txt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/docs/uri.txt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1 @@ +Get that document here: http://www.faqs.org/rfcs/rfc2396.html \ No newline at end of file
  40. Download patch src/networks/gnutella/gnutellaClients.ml

    --- 3.1.5-3.1/src/networks/gnutella/gnutellaClients.ml 2007-05-26 23:21:49.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/gnutella/gnutellaClients.ml 2017-01-23 01:54:46.000000000 +0000 @@ -231,7 +231,7 @@ save it on disk in the next version. *) lprintf "[TTR] ttr loaded\n"; let ttr = Buffer.contents buf in let tiger_pos = CommonUploads.tiger_pos nblocks in - let array = Array.create nblocks TigerTree.null in + let array = Array.make nblocks TigerTree.null in for i = 0 to nblocks - 1 do array.(i) <- TigerTree.direct_of_string (String.sub ttr ((tiger_pos + i) * 24) 24)
  41. Download patch src/networks/fileTP/fileTPFTP.ml

    --- 3.1.5-3.1/src/networks/fileTP/fileTPFTP.ml 2013-07-07 11:00:53.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fileTP/fileTPFTP.ml 2017-01-23 01:54:46.000000000 +0000 @@ -103,8 +103,8 @@ end_pos !counter_pos b.len to_read; if new_downloaded = file_size file then download_finished file; - with e -> - lprintf_nl "Exception %s in CommonSwarming.received" (Printexc2.to_string e) + with exn -> + lprintf_nl ~exn "CommonSwarming.received" end; c.client_failed_attempts <- 0; c.client_reconnect <- true; @@ -260,8 +260,8 @@ let ftp_send_range_request c (x,y) sock | _ -> lprintf_nl "Cannot read ip address [%s]\n" line; close sock Closed_by_user) - with e -> - lprintf_nl "Error %s in reader" (Printexc.to_string e); + with exn -> + lprintf_nl ~exn "reader"; close sock Closed_by_user) | "350 " -> let reqs = [Printf.sprintf "RETR %s" (snd (get_path_components file))] in
  42. Download patch src/networks/fasttrack/fasttrackHandler.ml
  43. Download patch src/networks/bittorrent/bTComplexOptions.ml

    --- 3.1.5-3.1/src/networks/bittorrent/bTComplexOptions.ml 2011-01-23 15:20:26.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/bittorrent/bTComplexOptions.ml 2017-01-23 01:54:46.000000000 +0000 @@ -314,12 +314,33 @@ let save _ = let guptime () = !!guptime - !diff_time -let _ = +let rec update_options () = + let update v = + lprintf_nl "Updating options to version %i" v; + options_version =:= v; + update_options () + in + + match !!options_version with + | 0 -> + let present = ref false in + (* drop obsolete addresses, add new *) + dht_bootstrap_nodes =:= List.filter (function + | "router.utorrent.com", 6881 -> false + | "router.transmission.com", 6881 -> false + | "router.bittorrent.com", 8991 -> present := true; true + | _ -> true) !!dht_bootstrap_nodes; + if not !present then + dht_bootstrap_nodes =:= ("router.bittorrent.com", 8991) :: !!dht_bootstrap_nodes; + update 1 + | _ -> () + +let () = network.op_network_file_of_option <- value_to_file; file_ops.op_file_to_option <- file_to_value; (* Shut up message "Network.save/load_complex_options not implemented by BitTorrent" *) network.op_network_load_complex_options <- load; network.op_network_save_complex_options <- save; - network.op_network_update_options <- (fun _ -> ()); + network.op_network_update_options <- update_options; network.op_network_save_sources <- (fun _ -> ())
  44. Download patch src/gtk/gui/gui_com.ml

    --- 3.1.5-3.1/src/gtk/gui/gui_com.ml 2005-04-13 21:52:25.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk/gui/gui_com.ml 2017-01-23 01:54:46.000000000 +0000 @@ -41,9 +41,9 @@ let when_disconnected gui = G.clear () -let to_gui_protocol_used = Array.create (to_gui_last_opcode+1) +let to_gui_protocol_used = Array.make (to_gui_last_opcode+1) GuiProto.best_gui_version -let from_gui_protocol_used = Array.create +let from_gui_protocol_used = Array.make (from_gui_last_opcode+1) GuiProto.best_gui_version
  45. Download patch ChangeLog

    --- 3.1.5-3.1/ChangeLog 2002-05-18 07:53:04.000000000 +0000 +++ 3.1.6-0ubuntu1/ChangeLog 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -See the distrib/ChangeLog file. - -See also the distrib/TODO file :)
  46. Download patch src/networks/gnutella2/g2Proto.ml

    --- 3.1.5-3.1/src/networks/gnutella2/g2Proto.ml 2007-06-17 02:08:16.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/gnutella2/g2Proto.ml 2017-01-23 01:54:46.000000000 +0000 @@ -1088,7 +1088,7 @@ let parse_udp_packet ip port buf = if nCount > 1 then begin let my_part = (get_uint8 buf 6)-1 in (* lprintf "part %d on %d\n" my_part nCount; *) - let needed = Array.create nCount None in + let needed = Array.make nCount None in Fifo.iter (fun (p_ip, p_port, nSeq, nPart, nFlags, data) -> if p_port = port && nSeq = nSequence && p_ip = ip then needed.(nPart) <- Some data @@ -1505,7 +1505,7 @@ let create_qrt_table2 words table_size = if !verbose then lprintf "table_length %d\n" table_length; - let array = Array.create table_length 0 in + let array = Array.make table_length 0 in List.iter (fun w -> let pos = bloom_hash w table_size in let pos = Int64.to_int pos in
  47. Download patch src/daemon/common/commonBlocking.ml

    --- 3.1.5-3.1/src/daemon/common/commonBlocking.ml 2009-02-24 18:35:46.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonBlocking.ml 2017-01-23 01:54:46.000000000 +0000 @@ -29,7 +29,7 @@ let ip_blocking_list = ref Ip_set.bl_emp let web_ip_blocking_list = ref Ip_set.bl_empty let country_blocking_block = ref false let country_blocking_list = - Array.create (Array.length Geoip.country_code_array) false + Array.make (Array.length Geoip.country_code_array) false (* Keep a copy of valid values from !!ip_blocking_countries to check if geoip_hit needs really to compute the country code.
  48. Download patch .pc/0004-Fix-compilation-with-OCaml-4.02.patch/src/utils/net/terminal.ml
  49. Download patch .pc/applied-patches

    --- 3.1.5-3.1/.pc/applied-patches 2017-07-03 19:12:09.021390275 +0000 +++ 3.1.6-0ubuntu1/.pc/applied-patches 2017-07-03 19:12:08.009362595 +0000 @@ -1,4 +1,3 @@ 0001-Use-usr-bin-see-as-default-previewer.patch 0002-Remove-bashisms.patch 0003-Fix-tiger-tree-corruption.patch -0004-Fix-compilation-with-OCaml-4.02.patch
  50. Download patch src/networks/bittorrent/bTClients.ml

    --- 3.1.5-3.1/src/networks/bittorrent/bTClients.ml 2014-02-23 18:13:22.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/bittorrent/bTClients.ml 2017-01-23 01:54:46.000000000 +0000 @@ -134,7 +134,7 @@ let talk_to_udp_tracker host port args f let set_reader f = set_reader socket begin fun _ -> try f () with exn -> - lprintf_nl "udpt interact exn %s" (Printexc2.to_string exn); + lprintf_nl ~exn "udpt interact with %s" host; close socket (Closed_for_exception exn) end in @@ -202,7 +202,7 @@ let talk_to_udp_tracker host port args f Ip.async_ip host (fun ip -> (* lprintf_nl "udpt resolved %s to ip %s" host (Ip.to_string ip); *) if not (Ip.equal Ip.localhost ip) then - try interact ip with exn -> lprintf_nl "udpt interact exn %s" (Printexc2.to_string exn) + try interact ip with exn -> lprintf_nl ~exn "udpt interact with %s" host else if !verbose_msg_servers then lprintf_nl "udpt ignoring tracker %s (resolves to localhost)" host) (fun () -> @@ -210,7 +210,7 @@ let talk_to_udp_tracker host port args f lprintf_nl "udpt failed to resolve %s" host) with exn -> - lprintf_nl "udpt start exn %s" (Printexc2.to_string exn) + lprintf_nl ~exn "udpt start" end (* include *) @@ -768,10 +768,10 @@ let rec client_parse_header counter cc i if !verbose_unexpected_messages then lprintf_nl "Client %s:%d requested a file that is not shared [%s]" (Ip.to_string ip) port (Sha1.to_hexa file_id) - | e -> - lprintf_nl "Exception %s in client_parse_header" (Printexc2.to_string e); - close sock (Closed_for_exception e); - raise e + | exn -> + lprintf_nl ~exn "client_parse_header"; + close sock (Closed_for_exception exn); + raise exn (** Update the bitmap of a client. Unclear if it is still useful. @@ -1537,10 +1537,9 @@ let connect_client c = set_bt_sock sock !verbose_msg_clients (BTHeader (client_parse_header !counter (ref ((Some c), c.client_country_code)) true)) end - with e -> - lprintf_nl "Exception %s while connecting to client" - (Printexc2.to_string e); - disconnect_client c (Closed_for_exception e) + with exn -> + lprintf_nl ~exn "connecting to client"; + disconnect_client c (Closed_for_exception exn) ); (*Since this is a pending connection put ConnectionWaiting in client_sock @@ -1628,10 +1627,9 @@ let listen () = ) in listen_sock := Some s; () - with e -> + with exn -> if !verbose_connect then - lprintf_nl "Exception %s while init bittorrent server" - (Printexc2.to_string e) + lprintf_nl ~exn "init bittorrent server" (** This function send keepalive messages to all connected clients @@ -1672,9 +1670,9 @@ let resume_clients file = else print_control c.client_connection_control with _ -> ()) - with e -> + with exn -> if !verbose_connect then - lprintf_file_nl (as_file file) "Exception %s in resume_clients" (Printexc2.to_string e) + lprintf_file_nl ~exn (as_file file) "resume_clients" ) file.file_clients let () = @@ -1929,9 +1927,9 @@ let rec iter_upload sock c = (* lprintf "sending piece\n"; *) send_client c (Piece (num, pos, upload_buffer, 0, len)); iter_upload sock c - with e -> + with exn -> if !verbose then - lprintf_nl "Exception %s in iter_upload" (Printexc2.to_string e) + lprintf_nl ~exn "iter_upload" end else begin (* lprintf "client is waiting for another piece\n"; *)
  51. Download patch src/daemon/common/commonSources.ml

    --- 3.1.5-3.1/src/daemon/common/commonSources.ml 2010-11-01 17:09:28.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonSources.ml 2017-01-23 01:54:46.000000000 +0000 @@ -115,7 +115,7 @@ let queue_name = [| let nqueues = Array.length queue_name -let queue_period = Array.create nqueues 600 +let queue_period = Array.make nqueues 600 let () = queue_period.(new_sources_queue) <- 0; @@ -527,10 +527,10 @@ module Make(M: let list_sum = List.fold_left (+) 0 in - let nsources_per_queue = Array.create nqueues 0 in - let nready_per_queue = Array.create nqueues 0 in - let nindirect_per_queue = Array.create nqueues 0 in - let ninvalid_per_queue = Array.create nqueues 0 in + let nsources_per_queue = Array.make nqueues 0 in + let nready_per_queue = Array.make nqueues 0 in + let nindirect_per_queue = Array.make nqueues 0 in + let ninvalid_per_queue = Array.make nqueues 0 in let nall = ref 0 in let naact = ref 0 in let naneed = ref 0 in @@ -2015,8 +2015,8 @@ connected if needed *) let () = Heap.add_memstat M.module_name (fun level buf -> - let nsources_per_queue = Array.create nqueues 0 in - let nready_per_queue = Array.create nqueues 0 in + let nsources_per_queue = Array.make nqueues 0 in + let nready_per_queue = Array.make nqueues 0 in List.iter (fun m -> for i = 0 to nqueues -1 do let q = m.manager_sources.(i) in
  52. Download patch src/utils/bitstring/pa_bitstring.mlt

    --- 3.1.5-3.1/src/utils/bitstring/pa_bitstring.mlt 2010-08-29 20:17:57.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/bitstring/pa_bitstring.mlt 2017-01-23 01:54:46.000000000 +0000 @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: pa_bitstring.mlt,v 1.1 2010/08/29 20:17:57 spiralvoice Exp $ + * $Id$ *) open Printf
  53. Download patch src/networks/fasttrack/enc_type_80.c
  54. Download patch src/networks/bittorrent/bTOptions.ml

    --- 3.1.5-3.1/src/networks/bittorrent/bTOptions.ml 2011-03-20 17:59:46.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/bittorrent/bTOptions.ml 2017-01-23 01:54:46.000000000 +0000 @@ -177,7 +177,6 @@ let dht_bootstrap_nodes = define_option (list_option addr_option) [ "service.ygrek.org.ua",6881; - "router.utorrent.com",6881; - "router.transmission.com",6881; + "router.bittorrent.com", 8991; ]
  55. Download patch src/networks/bittorrent/bT_DHT.ml

    --- 3.1.5-3.1/src/networks/bittorrent/bT_DHT.ml 2011-07-16 08:59:27.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/bittorrent/bT_DHT.ml 2017-01-23 01:54:46.000000000 +0000 @@ -13,9 +13,7 @@ let secret_timeout = minutes 10 let alpha = 3 let log_prefix = "[dht]" -let lprintf_nl ?exn fmt = ksprintf (fun s -> - let exn = match exn with Some exn -> " : exn "^Printexc.to_string exn | None -> "" in - Printf2.lprintf_nl2 log_prefix "%s%s" s exn) fmt +let lprintf_nl ?exn fmt = Printf2.lprintf_nl2 ?exn log_prefix fmt let catch f x = try `Ok (f x) with e -> `Exn e let (&) f x = f x
  56. Download patch CHANGES

    --- 3.1.5-3.1/CHANGES 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/CHANGES 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,22 @@ +Bugs mentioned as #<N> are referencing github issues +at https://github.com/ygrek/mldonkey/issues + +Changelog +========= + +3.1.6 - 2017/01/22 +------------------ + +* BT: better diagnostics of wrong udp tracker reply +* BT/DHT: update public router addresses +* fix buffer overflows in DNS resolution +* update default blocklist url (Closes #4) +* fix build with OCaml 4.02 (closes #6) ++ extend command conditions (pause, resume, priority) (ref #9) +* Fix compilation errors with gcc5 (closes #12) (Christopher Meng) +* BT: relaxed parsing of bencoded numbers +* fix build with libminiupnpc 1.9 (closes #13) +* escape filename based on filesystem, not OS type +* Fix compilation with OCaml 4.03.0 (Bastien Dejean) + +See distrib/ChangeLog for older entries
  57. Download patch docs/uri-res.txt
  58. Download patch src/networks/fasttrack/fasttrackFunctions.mlt

    --- 3.1.5-3.1/src/networks/fasttrack/fasttrackFunctions.mlt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fasttrackFunctions.mlt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,2 @@ +#where "Gnutella" = "Fasttrack" +#include "src/networks/gnutella/gnutellaFunctions.ml"
  59. Download patch src/networks/donkey/donkeyInteractive.ml

    --- 3.1.5-3.1/src/networks/donkey/donkeyInteractive.ml 2014-03-10 16:51:45.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/donkey/donkeyInteractive.ml 2017-01-23 01:54:46.000000000 +0000 @@ -615,7 +615,7 @@ let parse_donkey_url url user group = let md4 = if String.length md4 > 32 then String.sub md4 0 32 else md4 in let name = - let name2 = Filename2.filesystem_compliant name "" 0 in + let name2 = Filename2.filesystem_compliant name `Unknown 0 in if name2 = "" then Printf.sprintf "urn_ed2k_%s" md4 else @@ -1297,7 +1297,7 @@ let _ = let _ = file_ops.op_file_save_as <- (fun file name -> add_file_filenames (as_file file) name; - set_file_best_name (as_file file) name "" 0 + set_file_best_name (as_file file) name 0 ); file_ops.op_file_shared <- (fun file -> match file.file_shared with
  60. Download patch docs/soulseek_protocol.html

    --- 3.1.5-3.1/docs/soulseek_protocol.html 2003-04-02 05:52:24.000000000 +0000 +++ 3.1.6-0ubuntu1/docs/soulseek_protocol.html 2017-01-23 01:54:46.000000000 +0000 @@ -19,7 +19,7 @@ <a name="versionHistory"></a><h2>Version History</h2> 2003-01-26: Added peer messages and login sequence, had revelation about reusing existing peer socket from search result for file request, <a href="http://sourceforge.net/users/brienigma/">BriEnigma</a><br> 2003-01-20: Initial revision, <a href="http://sourceforge.net/users/brienigma/">BriEnigma</a><br> -CVS version ID: $Id: soulseek_protocol.html,v 1.1 2003/04/02 05:52:24 simon_mld Exp $<br> +CVS version ID: $Id$<br> Mental Note: When updating this document, remember to upload the latest version to the <a href="http://sourceforge.net/docman/?group_id=69129">SourceForge project documentation web page</a>.
  61. Download patch src/networks/fasttrack/fasttrackComplexOptions.mlt

    --- 3.1.5-3.1/src/networks/fasttrack/fasttrackComplexOptions.mlt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fasttrackComplexOptions.mlt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,5 @@ +#where "gnutella_" = "fasttrack_" +#where "_gnutella" = "_fasttrack" +#where "Gnutella" = "Fasttrack" +#where "GNUT" = "FT" +#include "src/networks/gnutella/gnutellaComplexOptions.ml"
  62. Download patch src/daemon/common/guiEncoding.ml

    --- 3.1.5-3.1/src/daemon/common/guiEncoding.ml 2010-05-23 09:12:14.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/guiEncoding.ml 2017-01-23 01:54:46.000000000 +0000 @@ -1324,7 +1324,7 @@ let _ = for best_gui_version = best_gui_version downto 24 do (* lprintf "best_gui_version: %d\n" best_gui_version; *) - let proto = Array.create (to_gui_last_opcode+1) best_gui_version in + let proto = Array.make (to_gui_last_opcode+1) best_gui_version in let to_gui = to_gui proto in let check_to_gui = check to_gui (GuiDecoding.to_gui proto) in
  63. Download patch src/networks/gnutella/gnutellaProto.ml

    --- 3.1.5-3.1/src/networks/gnutella/gnutellaProto.ml 2007-06-17 02:08:15.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/gnutella/gnutellaProto.ml 2017-01-23 01:54:46.000000000 +0000 @@ -815,8 +815,8 @@ let create_qrt_table words table_size = lprintf "create_qrt_table\n"; let infinity = 7 in let table_length = 1 lsl table_size in - let old_array = Array.create table_length infinity in - let array = Array.create table_length infinity in + let old_array = Array.make table_length infinity in + let array = Array.make table_length infinity in List.iter (fun w -> let pos = bloom_hash w table_size in if !verbose then
  64. Download patch src/networks/fasttrack/fasttrackInteractive.mlt

    --- 3.1.5-3.1/src/networks/fasttrack/fasttrackInteractive.mlt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fasttrackInteractive.mlt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,7 @@ +#where "_gnutella" = "_fasttrack" +#where "gnutella_" = "fasttrack_" +#where "gstats" = "ftstats" +#where "Gnutella" = "Fasttrack" +#where "gN" = "fT" +#where "gnut:" = "ft:" +#include "src/networks/gnutella/gnutellaInteractive.ml"
  65. Download patch src/networks/bittorrent/bencode.ml

    --- 3.1.5-3.1/src/networks/bittorrent/bencode.ml 2010-11-07 15:02:57.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/bittorrent/bencode.ml 2017-01-23 01:54:46.000000000 +0000 @@ -19,46 +19,6 @@ open Printf2 -(* - { - "announce" = "http://sucs.org:6969/announce"; - "info" = { - "files" = [ - { - "length" = 682164224; - "path" = [ - "Mandrake91-cd1-inst.i586.iso"; - ] - ; - } - ; - { - "length" = 681279488; - "path" = [ - "Mandrake91-cd2-ext.i586.iso"; - ] - ; - } - ; - { - "length" = 681574400; - "path" = [ - "Mandrake91-cd3-i18n.i586.iso"; - ] - ; - } - ; - ] - ; - "name" = "mandrake9.1"; - "piece length" = 262144; - "pieces" = "[EAd\155g۠f\134ʫ\025\016͵,1U\150 -\132\147\n%\\,\012C\008Gd!uL!\134\016\152&\017\008d\0293\031\134#\025\137=.\019\138.\151O\137,&\019ۢç\156.\150<E\153\018\145\149d\147[+J=\155l\139\028dV\000-\017Ť\013\154>A5It\007\020\014O1\152U\026K\021^5Ϳ\026\149\131q\024\015]\027&\148\\-\028WM5..."; - } - ; - } - -*) type value = | String of string | Int of int64 @@ -89,7 +49,8 @@ let decode s = | _ -> iter_i s (pos+1) len in let end_pos = iter_i s (pos+1) len in - (Int (Int64.of_string (String.sub s (pos+1) (end_pos-pos-1)))), + let number = String.sub s (pos+1) (end_pos-pos-1) in + (Int (try Int64.of_string number with _ -> Int64.of_float (float_of_string number))), (end_pos+1) | 'l' -> let rec iter s pos len list =
  66. Download patch src/networks/fasttrack/fasttrackTypes.mlt

    --- 3.1.5-3.1/src/networks/fasttrack/fasttrackTypes.mlt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fasttrackTypes.mlt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,4 @@ +#where "gnutella_" = "fasttrack_" +#where "_gnutella" = "_fasttrack" +#where "Gnutella" = "Fasttrack" +#include "src/networks/gnutella/gnutellaTypes.ml"
  67. Download patch src/networks/donkey/donkeyOvernet.ml

    --- 3.1.5-3.1/src/networks/donkey/donkeyOvernet.ml 2010-11-01 17:06:16.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/donkey/donkeyOvernet.ml 2017-01-23 01:54:46.000000000 +0000 @@ -1446,25 +1446,20 @@ let compute_to_ping () = (* start max three searches for sources *) let start_max_source_searches () = + let current_files2 = ref [] in + while (List.length !overnet_searches) < 3 && !current_files <> [] do + match !current_files with + | [] -> assert false + | (file, start, last) :: tl -> + current_files := tl; + if file_state file = FileDownloading && (last + 900) < last_time () then begin - let current_files2 = ref [] in - (try - while (List.length !overnet_searches) < 3 && !current_files <> [] do - let (file, start, last) = List.hd !current_files in - current_files := List.tl !current_files; - if file_state file = FileDownloading && - (last + 900) < last_time () then begin - ignore (create_search (FileSearch file) file.file_md4); - current_files2 := (file, start, last_time ()) :: !current_files2; - end else - current_files2 := (file, start, last) :: !current_files2; - done; - with Failure "hd" -> () - | Failure "tl" -> (); ); - List.iter (fun (file, start, last) -> - current_files := (file, start, last) :: !current_files - ) !current_files2; - end + ignore (create_search (FileSearch file) file.file_md4); + current_files2 := (file, start, last_time ()) :: !current_files2; + end else + current_files2 := (file, start, last) :: !current_files2; + done; + List.iter (fun (file, start, last) -> current_files := (file, start, last) :: !current_files) !current_files2 let enable () = if !!enable_overnet && not !is_enabled then begin
  68. Download patch debian/watch

    --- 3.1.5-3.1/debian/watch 2015-10-14 08:04:20.000000000 +0000 +++ 3.1.6-0ubuntu1/debian/watch 2017-07-03 17:01:41.000000000 +0000 @@ -1,2 +1,5 @@ -version=3 -http://sf.net/mldonkey/mldonkey-([\d\.]+)\.tar\.bz2 +version=4 +opts="filenamemangle=s%(?:.*?)?mldonkey-(\d[\d.]*)\.tar\.bz2%mldonkey-$1.tar.bz2%" \ + https://github.com/ygrek/mldonkey/releases \ + (?:.*?/)?mldonkey-(\d[\d.]*)\.tar\.bz2 debian uupdate +
  69. Download patch debian/patches/series

    --- 3.1.5-3.1/debian/patches/series 2015-10-14 08:04:20.000000000 +0000 +++ 3.1.6-0ubuntu1/debian/patches/series 2017-07-03 17:03:12.000000000 +0000 @@ -1,4 +1,3 @@ 0001-Use-usr-bin-see-as-default-previewer.patch 0002-Remove-bashisms.patch 0003-Fix-tiger-tree-corruption.patch -0004-Fix-compilation-with-OCaml-4.02.patch
  70. Download patch src/utils/cdk/arg2.mli

    --- 3.1.5-3.1/src/utils/cdk/arg2.mli 2007-02-19 21:35:48.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/cdk/arg2.mli 2017-01-23 01:54:46.000000000 +0000 @@ -11,7 +11,7 @@ (* *) (***********************************************************************) -(* $Id: arg2.mli,v 1.6 2007/02/19 21:35:48 spiralvoice Exp $ *) +(* $Id$ *) (** Parsing of command line arguments.
  71. Download patch src/networks/donkey/donkeyProtoClient.ml

    --- 3.1.5-3.1/src/networks/donkey/donkeyProtoClient.ml 2010-10-23 18:25:14.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/donkey/donkeyProtoClient.ml 2017-01-23 01:54:46.000000000 +0000 @@ -446,7 +446,7 @@ module QueryChunkMd4Reply = struct (* Re let md4 = get_md4 s 1 in let nchunks = get_int16 s 17 in (* lprintf "nchunks : %d" nchunks; lprint_newline (); *) - let chunks = Array.create nchunks md4 in + let chunks = Array.make nchunks md4 in for i = 0 to nchunks - 1 do chunks.(i) <- get_md4 s (19 + i * 16) done; @@ -1035,7 +1035,7 @@ module EmuleRequestSourcesReply = struct if ncount = 0 then [||] else let slen = (len - 19) / ncount in (* lprintf "PER SOURCES LEN: %d\n" slen; *) - let sources = Array.create ncount dummy_source in + let sources = Array.make ncount dummy_source in let rec iter pos i = if i < ncount then let ss =
  72. Download patch src/gtk/newgui/gui_main.ml

    --- 3.1.5-3.1/src/gtk/newgui/gui_main.ml 2006-10-31 15:40:05.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk/newgui/gui_main.ml 2017-01-23 01:54:46.000000000 +0000 @@ -40,20 +40,17 @@ let chmod_config () = let save_config = base_config^".old" in - begin - if Sys.file_exists base_config then - Printexc2.catch2 "Unix.chmod" Unix.chmod base_config 0o600 - else - () - end; - begin - if Sys.file_exists save_config then - Printexc2.catch2 "Unix.chmod" Unix.chmod save_config 0o600 - else - () - end - -let _ = + let chmod file = + if Sys.file_exists file then + try + Unix.chmod file 0o600 + with + exn -> lprintf "Exception: chmod %s 0600 : %s\n" file (Printexc2.to_string exn) + in + chmod base_config; + chmod save_config + +let () = (try Options.load O.mldonkey_gui_ini with Sys_error _ -> (try Options.save O.mldonkey_gui_ini with _ -> ()) @@ -70,7 +67,7 @@ let _ = Arg.parse args (Arg.usage args) "mlgui: the GUI to use with mldonkey" (* Check bindings *) -let _ = +let () = if !!O.keymap_global = [] then ( let a = O.add_binding O.keymap_global in @@ -625,6 +622,6 @@ let main () = never_connected := false ) -let _ = +let () = CommonGlobals.gui_included := true; main ()
  73. Download patch src/networks/fasttrack/fasttrackMain.mlt

    --- 3.1.5-3.1/src/networks/fasttrack/fasttrackMain.mlt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fasttrackMain.mlt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,4 @@ +#where "_gnutella" = "_fasttrack" +#where "gnutella_" = "fasttrack_" + +#include "src/networks/gnutella/gnutellaMain.ml" where "Gnutella" = "Fasttrack"
  74. Download patch src/utils/bitstring/bitstring_persistent.mlc4

    --- 3.1.5-3.1/src/utils/bitstring/bitstring_persistent.mlc4 2010-08-29 20:17:57.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/bitstring/bitstring_persistent.mlc4 2017-01-23 01:54:46.000000000 +0000 @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring_persistent.mlc4,v 1.1 2010/08/29 20:17:57 spiralvoice Exp $ + * $Id$ *) open Printf
  75. Download patch src/networks/fasttrack/fasttrackGlobals.ml
  76. Download patch src/daemon/common/commonSwarming.ml

    --- 3.1.5-3.1/src/daemon/common/commonSwarming.ml 2011-01-31 17:17:04.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonSwarming.ml 2017-01-23 01:54:46.000000000 +0000 @@ -710,11 +710,11 @@ let create_swarmer file_name file_size = s_priorities_bitmap = String.make nblocks priority_zero; s_priorities_intervals = [(zero, 1)]; (* JAVE init all prios to 1, thus all chunks will be downloaded as usual *) s_disk_allocated = Bitv.create ndiskblocks false; - s_blocks = Array.create nblocks EmptyBlock ; - s_block_pos = Array.create nblocks zero; - s_availability = Array.create nblocks 0; - s_nuploading = Array.create nblocks 0; -(* s_last_seen = Array.create nblocks 0; *) + s_blocks = Array.make nblocks EmptyBlock ; + s_block_pos = Array.make nblocks zero; + s_availability = Array.make nblocks 0; + s_nuploading = Array.make nblocks 0; +(* s_last_seen = Array.make nblocks 0; *) } in swarmer_recompute_priorities_bitmap s; @@ -838,13 +838,13 @@ let split_blocks s chunk_size = if Array2.exists ((<>) 0) s.s_nuploading then lprintf_nl "WARNING: splitting a swarmer beging uploaded to"; - s.s_blocks <- Array.create nblocks EmptyBlock; + s.s_blocks <- Array.make nblocks EmptyBlock; s.s_verified_bitmap <- VB.create nblocks VB.State_missing; s.s_priorities_bitmap <- String.make nblocks priority_zero; - s.s_block_pos <- Array.create nblocks zero; - s.s_availability <- Array.create nblocks 0; (* not preserved ? *) - s.s_nuploading <- Array.create nblocks 0; (* not preserved ? *) -(* s.s_last_seen <- Array.create nblocks 0; *) + s.s_block_pos <- Array.make nblocks zero; + s.s_availability <- Array.make nblocks 0; (* not preserved ? *) + s.s_nuploading <- Array.make nblocks 0; (* not preserved ? *) +(* s.s_last_seen <- Array.make nblocks 0; *) let rec iter i list = match list with @@ -894,9 +894,9 @@ let associate is_primary t s = t.t_s <- s; t.t_converted_verified_bitmap <- VB.create t.t_nchunks VB.State_missing; - t.t_last_seen <- Array.create t.t_nchunks 0; + t.t_last_seen <- Array.make t.t_nchunks 0; t.t_chunk_of_block <- [||]; - t.t_blocks_of_chunk <- Array.create t.t_nchunks []; + t.t_blocks_of_chunk <- Array.make t.t_nchunks []; (* invariant: primary frontend is at the head of swarmer's [s_networks], and is the first associated with the swarmer *) @@ -934,8 +934,8 @@ the t_chunk_of_block and t_blocks_of_chu (* For all networks, adjust the chunks and mappings *) List.iter (fun t -> let nchunks = VB.length t.t_converted_verified_bitmap in - t.t_chunk_of_block <- Array.create nblocks 0; - t.t_blocks_of_chunk <- Array.create nchunks []; + t.t_chunk_of_block <- Array.make nblocks 0; + t.t_blocks_of_chunk <- Array.make nchunks []; let chunk_size = t.t_chunk_size in for i = 0 to nblocks - 1 do @@ -983,13 +983,13 @@ let create ss file chunk_size = t_nverified_chunks = 0; t_converted_verified_bitmap = VB.create nchunks VB.State_missing; - t_last_seen = Array.create nchunks 0; + t_last_seen = Array.make nchunks 0; t_verifier = NoVerification; t_verified = (fun _ _ -> ()); t_chunk_of_block = [||]; - t_blocks_of_chunk = Array.create nchunks []; + t_blocks_of_chunk = Array.make nchunks []; } in HT.add frontends_by_num t;
  77. Download patch src/daemon/common/commonOptions.ml

    --- 3.1.5-3.1/src/daemon/common/commonOptions.ml 2017-07-03 19:12:09.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonOptions.ml 2017-07-03 19:12:07.000000000 +0000 @@ -1046,7 +1046,7 @@ let web_infos = define_option current_se web_infos = [ (\"server.met\", 0, \"http://www.gruk.org/server.met.gz\"); (\"hublist\", 0, \"http://dchublist.com/hublist.xml.bz2\"); - (\"guarding.p2p\", 96, \"http://www.bluetack.co.uk/config/level1.gz\"); + (\"guarding.p2p\", 96, \"http://upd.emule-security.org/ipfilter.zip\"); (\"ocl\", 24, \"http://members.lycos.co.uk/appbyhp2/FlockHelpApp/contact-files/contact.ocl\"); (\"contact.dat\", 168, \"http://download.overnet.org/contact.dat\"); (\"geoip.dat\", 168, \"http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz\"); @@ -1055,7 +1055,7 @@ let web_infos = define_option current_se (list_option (tuple3_option (string_option, int_option, string_option))) [ ("guarding.p2p", 96, - "http://www.bluetack.co.uk/config/level1.gz"); + "http://upd.emule-security.org/ipfilter.zip"); ("server.met", 0, "http://www.gruk.org/server.met.gz"); ("geoip.dat", 0, @@ -1670,7 +1670,7 @@ let max_displayed_results = define_exper let options_version = define_expert_option current_section ["options_version"] ~internal: true "(internal option)" - int_option 22 + int_option 23 let max_comments_per_file = define_expert_option current_section ["max_comments_per_file"] "Maximum number of comments per file" @@ -2274,4 +2274,9 @@ let rec update_options () = enable_overnet =:= false; update 22 + | 22 -> + web_infos_remove "http://www.bluetack.co.uk/config/level1.gz"; + web_infos_add "guarding.p2p" 0 "http://upd.emule-security.org/ipfilter.zip"; + update 23 + | _ -> ()
  78. Download patch config/configure.in

    --- 3.1.5-3.1/config/configure.in 2014-03-22 11:09:35.000000000 +0000 +++ 3.1.6-0ubuntu1/config/configure.in 2017-01-23 01:54:46.000000000 +0000 @@ -22,7 +22,7 @@ cd config MAJOR_VERSION=3 MINOR_VERSION=1 -SUB_VERSION=5 # range 0-7 due to eMule limitations +SUB_VERSION=6 # range 0-7 due to eMule limitations # ********** ********** # ********** check for C compiler ********** @@ -220,15 +220,37 @@ ARCH=$arch # ********** Parse checkout date (CVS) or revision (SVN) if available ********** # ********** ********** +if test -d ../.git; then + AC_MSG_NOTICE(checking git revision) + AC_CHECK_PROG(GIT,git,yes) + SUB_VERSION3="git" + if test "$ac_cv_prog_GIT" = "yes"; then + GIT_BRANCH=`git symbolic-ref -q --short HEAD` + GIT_COMMIT=`git describe --always --tags` + case "$GIT_BRANCH" in + ""|"master") + SCM_VERSION="${GIT_COMMIT}" + ;; + *) + SCM_VERSION="${GIT_COMMIT}-${GIT_BRANCH}" + ;; + esac + else + AC_MSG_NOTICE(cannot determine git revision) + SCM_VERSION="" + fi +fi + if test -d .svn; then AC_MSG_NOTICE(checking SVN revision) AC_CHECK_PROG(SVNVERSION,svnversion,svnversion) if test "$ac_cv_prog_SVNVERSION" = "svnversion"; then SUB_VERSION3="SVN" SCM_VERSION=`svnversion -n .` - else AC_MSG_NOTICE(cannot checking SVN revision... no SVNVERSION) - SCM_VERSION="cannot find out SVN revision (no SVNVERSION)" - fi + else + AC_MSG_NOTICE(cannot checking SVN revision... no SVNVERSION) + SCM_VERSION="cannot find out SVN revision (no SVNVERSION)" + fi fi if test -f ./CVS/Entries ; then
  79. Download patch src/gtk/gui/gui_queries_base.ml

    --- 3.1.5-3.1/src/gtk/gui/gui_queries_base.ml 2003-05-11 16:06:34.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk/gui/gui_queries_base.ml 2017-01-23 01:54:46.000000000 +0000 @@ -1,85 +0,0 @@ -class box () = - let vbox = GPack.vbox ~homogeneous:false () in - let wtool1 = - GButton.toolbar ~orientation:`HORIZONTAL ~style:`BOTH ~space_style:`EMPTY - ~tooltips:true ~button_relief:`NORMAL - ~packing:(vbox#pack ~expand:false ~fill:true) () - in - let wtool2 = - GButton.toolbar ~orientation:`HORIZONTAL ~style:`BOTH ~space_style:`EMPTY - ~tooltips:true ~button_relief:`NORMAL - ~packing:(vbox#pack ~expand:false ~fill:true) () - in - let box_fields = - GPack.vbox ~homogeneous:false - ~packing:(vbox#pack ~expand:false ~fill:true) () - in - let _anonymous_container_1 = - GPack.hbox ~homogeneous:false - ~packing:(vbox#pack ~expand:false ~fill:true) () - in - let _ = - GMisc.label ~text:"Network : " - ~justify:`LEFT ~line_wrap:true - ~packing:(_anonymous_container_1#pack ~expand:false ~fill:true) () - in - let (nets, nets_wcombo) = Gui_global.networks_combo true in - let _ = - _anonymous_container_1#pack nets_wcombo#coerce ~padding: 1 - in - let _anonymous_container_2 = - GPack.hbox ~homogeneous:false - ~packing:(vbox#pack ~expand:false ~fill:true) () - in - let _ = - GMisc.label ~text:(Gettext.gettext Gui_messages.max_hits ^ " : ") - ~justify:`LEFT ~line_wrap:true - ~packing:(_anonymous_container_2#pack ~expand:false ~fill:true) () - in - let we_max_hits = - GEdit.entry ~text:"200" ~visibility:true ~editable:true - ~packing:(_anonymous_container_2#pack ~expand:false ~fill:true) () - in - let hbox_show = - GPack.hbox ~homogeneous:false - ~packing:(vbox#pack ~expand:false ~fill:true) () - in - let wchk_show = - GButton.check_button ~active:false ~draw_indicator:true - ~packing:(hbox_show#pack ~expand:false ~fill:true) () - in - let _ = - GMisc.label ~text:(Gettext.gettext Gui_messages.show_hidden_fields) - ~justify:`LEFT ~line_wrap:true ~xpad:2 - ~packing:(hbox_show#pack ~expand:false ~fill:true) () - in - object - val vbox = vbox - val wtool1 = wtool1 - val wtool2 = wtool2 - val box_fields = box_fields - val we_max_hits = we_max_hits - val hbox_show = hbox_show - val wchk_show = wchk_show - val nets = nets - val nets_wcombo = nets_wcombo - method vbox = vbox - method wtool1 = wtool1 - method wtool2 = wtool2 - method box_fields = box_fields - method we_max_hits = we_max_hits - method hbox_show = hbox_show - method wchk_show = wchk_show - method coerce = vbox#coerce - end -class paned () = - let wnote_queries = - GPack.notebook ~tab_pos:`LEFT ~show_tabs:true ~homogeneous_tabs:true - ~show_border:true ~scrollable:true ~popup:true () - in - object - val wnote_queries = wnote_queries - method wnote_queries = wnote_queries - method coerce = wnote_queries#coerce - end -
  80. Download patch src/gtk/newgui/gui_com.ml

    --- 3.1.5-3.1/src/gtk/newgui/gui_com.ml 2005-04-13 21:52:26.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk/newgui/gui_com.ml 2017-01-23 01:54:46.000000000 +0000 @@ -47,9 +47,9 @@ let when_disconnected (gui : gui) = G.clear () -let to_gui_protocol_used = Array.create (to_gui_last_opcode+1) +let to_gui_protocol_used = Array.make (to_gui_last_opcode+1) GuiProto.best_gui_version -let from_gui_protocol_used = Array.create +let from_gui_protocol_used = Array.make (from_gui_last_opcode+1) GuiProto.best_gui_version
  81. Download patch src/daemon/common/commonComplexOptions.ml

    --- 3.1.5-3.1/src/daemon/common/commonComplexOptions.ml 2010-12-19 10:10:24.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonComplexOptions.ml 2017-01-23 01:54:46.000000000 +0000 @@ -154,7 +154,7 @@ module FileOption = struct set_file_state file file_state; (try - set_file_best_name file filename "" 0 + set_file_best_name file filename 0 with _ -> ()); (try
  82. Download patch Makefile

    --- 3.1.5-3.1/Makefile 2014-03-22 11:12:25.000000000 +0000 +++ 3.1.6-0ubuntu1/Makefile 2017-01-23 02:16:37.000000000 +0000 @@ -148,9 +148,9 @@ CDK_SRCS += $(CDK)/zlib.ml $(CDK)/zip.m CDK_SRCS += $(LIB)/autoconf.ml -CDK_SRCS+= $(LIB)/fifo.ml $(CDK)/arg2.ml $(LIB)/syslog.ml $(CDK)/printf2.ml \ - $(CDK)/heap.ml \ - $(CDK)/printexc2.ml $(CDK)/genlex2.ml \ +CDK_SRCS+= $(LIB)/fifo.ml $(CDK)/arg2.ml $(LIB)/syslog.ml \ + $(CDK)/printexc2.ml $(CDK)/printf2.ml \ + $(CDK)/heap.ml $(CDK)/genlex2.ml \ $(CDK)/filepath.ml $(CDK)/string2.ml \ $(CDK)/filename2.ml $(CDK)/array2.ml $(CDK)/hashtbl2.ml \ $(CDK)/unix2.ml $(CDK)/file.ml \
  83. Download patch src/networks/fasttrack/enc_type_20.c
  84. Download patch src/networks/donkey/donkeyMftp.ml

    --- 3.1.5-3.1/src/networks/donkey/donkeyMftp.ml 2007-01-15 21:32:56.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/donkey/donkeyMftp.ml 2017-01-23 01:54:46.000000000 +0000 @@ -167,7 +167,7 @@ let get_tag (names_of_tag : (string * fi Uint16 v, pos2 + 2 | 9 -> let v = get_uint8 s pos2 in Uint8 v, pos2 + 1 - | _ when t >= 0x11 & t <= 0x20 -> let v = String.sub s pos2 (t-0x10) in + | _ when t >= 0x11 && t <= 0x20 -> let v = String.sub s pos2 (t-0x10) in String v, pos2 + t - 0x10 | _ -> if !verbose_unknown_messages then
  85. Download patch src/networks/fasttrack/fasttrackNetwork.ml

    --- 3.1.5-3.1/src/networks/fasttrack/fasttrackNetwork.ml 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fasttrackNetwork.ml 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,135 @@ +(* Copyright 2001, 2002 b8_bavard, b8_fee_carabine, INRIA *) +(* + This file is part of mldonkey. + + mldonkey 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. + + mldonkey 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 mldonkey; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*) + +open Int64ops +open BasicSocket +open AnyEndian +open Printf2 +open Options +open Md4 +open TcpBufferedSocket + +open CommonGlobals +open CommonTypes +open CommonOptions +open CommonHosts + + +(* any = 0 *) +let name_of_tag = + [ + Field_KNOWN "any", 0; + Field_KNOWN "year", 1; + Field_Filename, 2; + Field_Uid, 3; + Field_Title, 4; + Field_KNOWN "time", 5; + Field_Artist, 6; + Field_Album, 8; + Field_KNOWN "language", 0x0A; + Field_KNOWN "keywords", 0x0C; + Field_KNOWN "resolution", 0x0D; + Field_KNOWN "genre", 0x0E; + Field_KNOWN "OS", 0x10; + Field_KNOWN "bitdepth", 0x11; + Field_Type, 0x12; + Field_KNOWN "quality", 0x15; + Field_KNOWN "version", 0x18; + Field_KNOWN "comment", 0x1A; + Field_Codec, 0x1C; (* "divx" *) + Field_KNOWN "rating", 0x1D; + Field_Size, 0x21; + Field_Type, 0x22; (* "movie", "video clip",... *) + Field_KNOWN "49", 49; + Field_KNOWN "53", 53; + ] + +type cipher + +type ciphers = { + in_cipher : cipher; + out_cipher : cipher; + + mutable in_xinu : int64; + mutable out_xinu : int64; + } + +type query_key = unit + +type query_operator = +| Equals +| Approx +| AtMost +| AtLeast +| Substring + +type query_term = query_operator * tag + +type search_extension = string * query_term list +type search_uid = int +type file_uid = Md5Ext.t +type file_uri = string + +external create_cipher : unit -> cipher = "ml_create_cipher" +external apply_cipher : cipher -> string -> int -> int -> unit + = "ml_apply_cipher" +external init_cipher : cipher -> unit = "ml_init_cipher" +external set_cipher : cipher -> int32 -> int -> unit = "ml_set_cipher" +external get_cipher_from_packet : string -> int -> cipher -> unit + = "ml_cipher_packet_get" +external xor_ciphers : cipher -> cipher -> unit = "ml_xor_ciphers" +external xor_ciphers2 : cipher -> cipher -> unit = "ml_xor_ciphers2" + +external cipher_packet_set : cipher -> string -> int -> unit + = "ml_cipher_packet_set" +external cipher_packet_set_xored : cipher -> string -> int -> cipher -> unit + = "ml_cipher_packet_set_xored" +external cipher_free : cipher -> unit = "ml_cipher_free" +external cipher_enc_type : cipher -> int = "ml_cipher_enc_type" + +let network_name = "KaZaA" + +let port = 1214 +let config_file = "fasttrack.ini" +let options_prefix = "FT-" +let max_known_peers_default = 20 + +(* Useless *) +let redirectors = [] +let has_accept = false +let accept_header = "" + +let accept_ed2kuid = false +let accept_bitprint = false +let accept_md5ext = true + + let max_queued_ranges = 1 + +(* This is the typical reply of a busy FT client. +ascii:[ +HTTP/1.0 503 Service Unavailable +Retry-After: 300 +X-Kazaa-Username: K++_www.kazaaKPP.com +X-Kazaa-Network: KaZaA +X-Kazaa-IP: 80.56.???.???:3223 +X-Kazaa-SupernodeIP: 80.57.???.???:1070 +*) + +let value_to_index _ = () +let index_to_value _ = []
  86. Download patch src/networks/fasttrack/fasttrackOptions.mlt

    --- 3.1.5-3.1/src/networks/fasttrack/fasttrackOptions.mlt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/fasttrack/fasttrackOptions.mlt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1,4 @@ +#where "_gnutella" = "_fasttrack" +#where "gnutella_" = "fasttrack_" +#where "Gnutella" = "Fasttrack" +#include "src/networks/gnutella/gnutellaOptions.ml"
  87. Download patch docs/http-1.1.txt

    --- 3.1.5-3.1/docs/http-1.1.txt 1970-01-01 00:00:00.000000000 +0000 +++ 3.1.6-0ubuntu1/docs/http-1.1.txt 2017-01-23 01:54:46.000000000 +0000 @@ -0,0 +1 @@ +Get that document here: http://www.w3.org/Protocols/rfc2616/rfc2616.html \ No newline at end of file
  88. Download patch src/utils/cdk/filename2.ml

    --- 3.1.5-3.1/src/utils/cdk/filename2.ml 2012-06-24 07:59:41.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/cdk/filename2.ml 2017-01-23 01:54:46.000000000 +0000 @@ -138,7 +138,7 @@ let basename filename = in iter (path_of_filename filename) filename -let filesystem_compliant name fs namemax = +let filesystem_compliant name fstype namemax = (* replace all illegal characters with a valid one. assumes all filesystems accept '_'s in filenames *) let escape_chars p filename = @@ -200,12 +200,12 @@ let filesystem_compliant name fs namemax escape_chars macosx_filter name in let sys_checked_name = - if Autoconf.windows then - windows_compliant name - else if Autoconf.system = "macos" then - macosx_compliant name - else - posix_compliant name in + match fstype with + | `Win -> windows_compliant name + | `Mac -> macosx_compliant name + | `Posix + | `Unknown -> posix_compliant name + in let fs_checked_name = let remove_last_spaces s = @@ -221,9 +221,10 @@ let filesystem_compliant name fs namemax else String.sub s 0 last_space in (* FAT filesystems do not allow files with space as last char *) - match fs with - "msdos" -> remove_last_spaces sys_checked_name - | _ -> sys_checked_name in + match fstype with + | `Win -> remove_last_spaces sys_checked_name + | _ -> sys_checked_name + in let length_checked_name = if namemax < 1 || String.length sys_checked_name < namemax then
  89. Download patch src/networks/fasttrack/fasttrackPandora.ml
  90. Download patch src/gtk2/gui/guiMain.ml

    --- 3.1.5-3.1/src/gtk2/gui/guiMain.ml 2011-03-10 19:17:01.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk2/gui/guiMain.ml 2017-01-23 01:54:46.000000000 +0000 @@ -53,18 +53,15 @@ let chmod_config () = let save_config = base_config ^ ".old" in - begin - if Sys.file_exists base_config then - Printexc2.catch2 "Unix.chmod" Unix.chmod base_config 0o600 - else - () - end; - begin - if Sys.file_exists save_config then - Printexc2.catch2 "Unix.chmod" Unix.chmod save_config 0o600 - else - () - end + let chmod file = + if Sys.file_exists file then + try + Unix.chmod file 0o600 + with + exn -> lprintf' "Exception: chmod %s 0600 : %s\n" file (Printexc2.to_string exn) + in + chmod base_config; + chmod save_config (* {2 Handling core messages} *)
  91. Download patch src/networks/fasttrack/fasttrackProtocol.ml
  92. Download patch src/gtk2/gui/guiNetHtml.ml

    --- 3.1.5-3.1/src/gtk2/gui/guiNetHtml.ml 2005-10-31 18:34:02.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk2/gui/guiNetHtml.ml 2017-01-23 01:54:46.000000000 +0000 @@ -1,4 +1,4 @@ -(* $Id: guiNetHtml.ml,v 1.1 2005/10/31 18:34:02 spiralvoice Exp $ +(* $Id$ * ---------------------------------------------------------------------- * *)
  93. Download patch src/gtk/newgui/gui_graph.ml

    --- 3.1.5-3.1/src/gtk/newgui/gui_graph.ml 2005-12-14 21:22:07.000000000 +0000 +++ 3.1.6-0ubuntu1/src/gtk/newgui/gui_graph.ml 2017-01-23 01:54:46.000000000 +0000 @@ -78,25 +78,25 @@ they will be merged further with the pix call pixmap_from_xpm_d *) let set_downloads_pixmap_headers w h col1 col2 = let header = - Array.create 1 (Printf.sprintf "%d %d 3 1" w h) in + Array.make 1 (Printf.sprintf "%d %d 3 1" w h) in let color_none = - Array.create 1 (Printf.sprintf ". c None") in + Array.make 1 (Printf.sprintf ". c None") in let color1 = - Array.create 1 ((Printf.sprintf "a c ") ^ col1) in + Array.make 1 ((Printf.sprintf "a c ") ^ col1) in let color2 = - Array.create 1 ((Printf.sprintf "b c ") ^ col2) in + Array.make 1 ((Printf.sprintf "b c ") ^ col2) in downloads_pixmap_headers := Some (Array.concat [header;color_none;color1;color2]) let set_uploads_pixmap_headers w h col1 col2 = let header = - Array.create 1 (Printf.sprintf "%d %d 3 1" w h) in + Array.make 1 (Printf.sprintf "%d %d 3 1" w h) in let color_none = - Array.create 1 (Printf.sprintf ". c None") in + Array.make 1 (Printf.sprintf ". c None") in let color1 = - Array.create 1 ((Printf.sprintf "a c ") ^ col1) in + Array.make 1 ((Printf.sprintf "a c ") ^ col1) in let color2 = - Array.create 1 ((Printf.sprintf "b c ") ^ col2) in + Array.make 1 ((Printf.sprintf "b c ") ^ col2) in uploads_pixmap_headers := Some (Array.concat [header;color_none;color1;color2]) @@ -501,7 +501,7 @@ class box () = download_rate_range := d; download_timeout := (!download_time_range * 1000 / !width ); downloads_pixmap := - Some (Array.create !height (String.make !width '.')) (*; + Some (Array.make !height (String.make !width '.')) (*; Printf.printf "DOWNLOADS GRAPH PROPERTIES HAVE CHANGED\ndownload_timeout : %d\n" !download_timeout; flush stdout*) @@ -516,7 +516,7 @@ class box () = upload_rate_range := d; upload_timeout := (!upload_time_range * 1000 / !width ); uploads_pixmap := - Some (Array.create !height (String.make !width '.')) (*; + Some (Array.make !height (String.make !width '.')) (*; Printf.printf "UPLOADS GRAPH PROPERTIES HAVE CHANGED\nupload_timeout : %d\n" !upload_timeout; flush stdout*) @@ -530,14 +530,14 @@ class box () = match !downloads_pixmap with None -> downloads_pixmap := - Some (Array.create !height (String.make !width '.')); + Some (Array.make !height (String.make !width '.')); | _ -> () in let () = match !uploads_pixmap with None -> uploads_pixmap := - Some (Array.create !height (String.make !width '.')); + Some (Array.make !height (String.make !width '.')); | _ -> () in draw_downloads ();
  94. Download patch config/Makefile.config.in

    --- 3.1.5-3.1/config/Makefile.config.in 2014-02-23 18:18:46.000000000 +0000 +++ 3.1.6-0ubuntu1/config/Makefile.config.in 2017-01-23 01:54:46.000000000 +0000 @@ -9,9 +9,9 @@ CXX=@CXX@ FIX_BROKEN_CPP=@FIX_BROKEN_CPP@ CONFIG_INCLUDES=@CONFIG_INCLUDES@ -OCAMLC=@OCAMLC@ +OCAMLC=@OCAMLC@ -w -3 OCAMLLIB=@OCAMLLIB@ -OCAMLOPT=@OCAMLOPT@ -inline 10 +OCAMLOPT=@OCAMLOPT@ -inline 10 -w -3 OCAMLLEX=@OCAMLLEX@ OCAMLDEP=@OCAMLDEP@ @OCAMLDEP_OPTIONS@ OCAMLDEP_OPTIONS=@OCAMLDEP_OPTIONS@
  95. Download patch src/networks/fasttrack/fasttrackServers.ml
  96. Download patch debian/patches/0004-Fix-compilation-with-OCaml-4.02.patch

    --- 3.1.5-3.1/debian/patches/0004-Fix-compilation-with-OCaml-4.02.patch 2015-10-14 08:04:20.000000000 +0000 +++ 3.1.6-0ubuntu1/debian/patches/0004-Fix-compilation-with-OCaml-4.02.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -From: Stephane Glondu <steph@glondu.net> -Date: Tue, 16 Jun 2015 09:58:51 +0200 -Subject: Fix compilation with OCaml 4.02 - ---- - src/utils/net/terminal.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/utils/net/terminal.ml b/src/utils/net/terminal.ml -index 44a96f4..30650ed 100644 ---- a/src/utils/net/terminal.ml -+++ b/src/utils/net/terminal.ml -@@ -185,7 +185,7 @@ module Output = struct - let canal = List.assoc chan !chanmap in - etat.chan <- Some (chan, canal); - info (sprintf "connecte au canal '%s'" chan); -- (* {| canal ALL } *) -+ (* canal ALL *) - with Not_found -> (* pas encore de recepteur pour ce canal *) - try (* on en cree un *) - let serveur = nsrecord.get_loc chan in ---
  97. Download patch src/daemon/common/commonFile.mli

    --- 3.1.5-3.1/src/daemon/common/commonFile.mli 2014-02-23 18:16:11.000000000 +0000 +++ 3.1.6-0ubuntu1/src/daemon/common/commonFile.mli 2017-01-23 01:54:46.000000000 +0000 @@ -92,7 +92,7 @@ val set_file_release : CommonTypes.file val file_release : CommonTypes.file -> bool val set_file_state : CommonTypes.file -> CommonTypes.file_state -> unit val file_best_name : CommonTypes.file -> string -val set_file_best_name : CommonTypes.file -> string -> string -> int -> unit +val set_file_best_name : CommonTypes.file -> string -> ?fs:Unix32.fstype -> int -> unit val add_file_filenames : CommonTypes.file -> string -> unit val shorten_all_file_filenames : int -> unit val set_file_format : CommonTypes.file -> CommonTypes.format -> unit @@ -155,7 +155,7 @@ val set_file_owner : CommonTypes.file -> val file_owner : CommonTypes.file -> CommonTypes.userdb val set_file_group : CommonTypes.file -> CommonTypes.groupdb option -> unit val file_group : CommonTypes.file -> CommonTypes.groupdb option -val lprintf_file_nl : CommonTypes.file -> ('a, unit, string, unit) Pervasives.format4 -> 'a +val lprintf_file_nl : ?exn:exn -> CommonTypes.file -> ('a, unit, string, unit) Pervasives.format4 -> 'a (** [concat_file dir filename] sanitizes [filename] and appends it to [dir] *) val concat_file : string -> string -> string
  98. Download patch src/networks/fasttrack/fst_crypt.c
  99. Download patch src/utils/bitstring/bitstring.mli

    --- 3.1.5-3.1/src/utils/bitstring/bitstring.mli 2010-08-29 20:17:57.000000000 +0000 +++ 3.1.6-0ubuntu1/src/utils/bitstring/bitstring.mli 2017-01-23 01:54:46.000000000 +0000 @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring.mli,v 1.1 2010/08/29 20:17:57 spiralvoice Exp $ + * $Id$ *) (**
  100. Download patch src/networks/donkey/donkeyComplexOptions.ml

    --- 3.1.5-3.1/src/networks/donkey/donkeyComplexOptions.ml 2007-08-03 22:12:58.000000000 +0000 +++ 3.1.6-0ubuntu1/src/networks/donkey/donkeyComplexOptions.ml 2017-01-23 01:54:46.000000000 +0000 @@ -276,7 +276,7 @@ let value_to_file file_size file_state u (try set_file_best_name (as_file file) - (get_value "file_filename" value_to_string) "" 0 + (get_value "file_filename" value_to_string) 0 with _ -> update_best_name file); let md4s = try get_value "file_md4s" (value_to_array value_to_md4)
  101. ...

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: ocaml

ocaml (4.04.0-2ubuntu4) artful; urgency=medium * SECURITY UPDATE: Privilege escalation - debian/patches/CVE-2017-9772.patch: Fix using secure_getenv in setuid binaries - CVE-2017-9772 -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 09 Oct 2017 10:06:24 +0100 ocaml (4.04.0-2ubuntu3) artful; urgency=medium * Mark certain symbols as .hidden in arm64 codegen, fixing FTBFS with binutils 2.29. (Closes: #868860). LP: #1704399. -- Matthias Klose <doko@ubuntu.com> Mon, 31 Jul 2017 12:41:45 +0200 ocaml (4.04.0-2ubuntu2) artful; urgency=medium * Cherrypick upstream fix for a regression in 4.04 on s390x. -- Dimitri John Ledkov <xnox@ubuntu.com> Fri, 14 Jul 2017 16:10:15 +0100 ocaml (4.04.0-2ubuntu1) artful; urgency=medium * Merge with Debian experimental: - Pass --hash-style=both --as-needed --build-id to the linker. - Keep -fPIC patch. -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 26 Jun 2017 12:25:27 +0100

Modifications :
  1. Download patch .pc/CVE-2017-9772.patch/asmrun/.depend
  2. Download patch byterun/sys.c

    --- 4.04.0-2/byterun/sys.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/sys.c 2017-10-10 12:10:52.000000000 +0000 @@ -26,7 +26,7 @@ #include <time.h> #include <sys/types.h> #include <sys/stat.h> -#if _WIN32 +#ifdef _WIN32 #include <io.h> /* for isatty */ #else #include <sys/wait.h> @@ -314,7 +314,7 @@ CAMLprim value caml_sys_getcwd(value uni return caml_copy_string(buff); } -CAMLprim value caml_sys_getenv(value var) +CAMLprim value caml_sys_unsafe_getenv(value var) { char * res; @@ -324,6 +324,16 @@ CAMLprim value caml_sys_getenv(value var return caml_copy_string(res); } +CAMLprim value caml_sys_getenv(value var) +{ + char * res; + + if (! caml_string_is_c_safe(var)) caml_raise_not_found(); + res = caml_secure_getenv(String_val(var)); + if (res == 0) caml_raise_not_found(); + return caml_copy_string(res); +} + char * caml_exe_name; char ** caml_main_argv; @@ -602,7 +612,7 @@ void caml_load_plugin(char *plugin) void caml_cplugins_load(char *env_variable) { - char *plugins = getenv(env_variable); + char *plugins = caml_secure_getenv(env_variable); if(plugins != NULL){ char* curs = plugins; while(*curs != 0){
  3. Download patch .pc/pie-on-amd64.diff/configure
  4. Download patch .pc/linker-flags.patch/configure
  5. Download patch debian/patches/CVE-2017-9772.patch
  6. Download patch .pc/CVE-2017-9772.patch/otherlibs/raw_spacetime_lib/.depend

    --- 4.04.0-2/.pc/CVE-2017-9772.patch/otherlibs/raw_spacetime_lib/.depend 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.0-2ubuntu4/.pc/CVE-2017-9772.patch/otherlibs/raw_spacetime_lib/.depend 2016-11-04 16:08:24.000000000 +0000 @@ -0,0 +1,42 @@ +aProf.cmi : +camlinternalAProf.cmi : +aProf.cmo : aProf.cmi +aProf.cmx : aProf.cmi +camlinternalAProf.cmo : camlinternalAProf.cmi +camlinternalAProf.cmx : camlinternalAProf.cmi +aProf.cmi : +camlinternalAProf.cmi : +aProf.cmo : camlinternalAProf.cmi aProf.cmi +aProf.cmx : camlinternalAProf.cmx aProf.cmi +camlinternalAProf.cmo : camlinternalAProf.cmi +camlinternalAProf.cmx : camlinternalAProf.cmi +aProf.cmi : +rawAProf.cmi : +aProf.cmo : aProf.cmi +aProf.cmx : aProf.cmi +rawAProf.cmo : rawAProf.cmi +rawAProf.cmx : rawAProf.cmi +aProf.cmo : rawAProf.cmi aProf.cmi +aProf.cmx : rawAProf.cmx aProf.cmi +aProf.cmi : +rawAProf.cmo : rawAProf.cmi +rawAProf.cmx : rawAProf.cmi +rawAProf.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +spacetime_lib.cmo : raw_spacetime_lib.cmi spacetime_lib.cmi +spacetime_lib.cmx : raw_spacetime_lib.cmx spacetime_lib.cmi +spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi :
  7. Download patch debian/patches/linker-flags.patch

    --- 4.04.0-2/debian/patches/linker-flags.patch 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.0-2ubuntu4/debian/patches/linker-flags.patch 2017-06-26 11:29:15.000000000 +0000 @@ -0,0 +1,23 @@ +--- a/configure ++++ b/configure +@@ -402,7 +402,9 @@ + if cc="$bytecc" sh ./hasgot -mieee; then + bytecccompopts="-mieee $bytecccompopts"; + fi +- bytecclinkopts="-Wl,--no-relax";; ++ bytecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id -Wl,--no-relax";; ++ gcc,*-*-linux*) ++ bytecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id";; + *,mips-*-irix6*) + # Turn off warning "unused library" + bytecclinkopts="-n32 -Wl,-woff,84";; +@@ -923,7 +925,8 @@ + case "$arch,$nativecc,$system,$model" in + *,*,nextstep,*) nativecclinkopts="-posix";; + *,*,rhapsody,*) if $arch64; then partialld="ld -r -arch ppc64"; fi;; +- alpha,gcc*,linux*,*) nativecclinkopts="-Wl,--no-relax";; ++ alpha,gcc*,linux*,*) nativecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id -Wl,--no-relax";; ++ *,gcc*,linux*,*) nativecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id";; + amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";; + amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";; + power,gcc*,elf,ppc) partialld="ld -r -m elf32ppclinux";;
  8. Download patch byterun/debugger.c

    --- 4.04.0-2/byterun/debugger.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/debugger.c 2017-10-10 12:10:52.000000000 +0000 @@ -27,6 +27,7 @@ #include "caml/config.h" #include "caml/debugger.h" #include "caml/misc.h" +#include "caml/osdeps.h" int caml_debugger_in_use = 0; uintnat caml_event_count; @@ -172,7 +173,7 @@ void caml_debugger_init(void) Store_field(marshal_flags, 0, Val_int(1)); /* Marshal.Closures */ Store_field(marshal_flags, 1, Val_emptylist); - address = getenv("CAML_DEBUG_SOCKET"); + address = caml_secure_getenv("CAML_DEBUG_SOCKET"); if (address == NULL) return; dbg_addr = address;
  9. Download patch .pc/CVE-2017-9772.patch/otherlibs/win32unix/unix.ml
  10. Download patch byterun/startup.c

    --- 4.04.0-2/byterun/startup.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/startup.c 2017-10-10 12:10:52.000000000 +0000 @@ -372,7 +372,7 @@ CAMLexport void caml_main(char **argv) caml_sys_init(exe_name, argv + pos); #ifdef _WIN32 /* Start a thread to handle signals */ - if (getenv("CAMLSIGPIPE")) + if (caml_secure_getenv("CAMLSIGPIPE")) _beginthread(caml_signal_thread, 4096, NULL); #endif /* Execute the program */ @@ -410,7 +410,7 @@ CAMLexport void caml_startup_code( #ifdef DEBUG caml_verb_gc = 63; #endif - cds_file = getenv("CAML_DEBUG_FILE"); + cds_file = caml_secure_getenv("CAML_DEBUG_FILE"); if (cds_file != NULL) { caml_cds_file = caml_strdup(cds_file); }
  11. Download patch otherlibs/win32unix/unix.ml

    --- 4.04.0-2/otherlibs/win32unix/unix.ml 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/otherlibs/win32unix/unix.ml 2017-10-10 12:10:52.000000000 +0000 @@ -122,6 +122,7 @@ let handle_unix_error f arg = external environment : unit -> string array = "unix_environment" external getenv: string -> string = "caml_sys_getenv" +(* external unsafe_getenv: string -> string = "caml_sys_unsafe_getenv" *) external putenv: string -> string -> unit = "unix_putenv" type process_status =
  12. Download patch debian/patches/0001-PR-7405-s390x-Fix-address-of-caml_raise_exn-in-nativ.patch

    --- 4.04.0-2/debian/patches/0001-PR-7405-s390x-Fix-address-of-caml_raise_exn-in-nativ.patch 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.0-2ubuntu4/debian/patches/0001-PR-7405-s390x-Fix-address-of-caml_raise_exn-in-nativ.patch 2017-07-14 15:10:14.000000000 +0000 @@ -0,0 +1,23 @@ +From 7020a0b682524b4a63bdeb395db12b72389d01da Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" <rjones@redhat.com> +Date: Wed, 9 Nov 2016 11:01:15 -0500 +Subject: [PATCH] PR#7405: s390x: Fix address of caml_raise_exn in native + dynlink modules. + +This commit started as Fedora patch e732c39340e86939530a087744caa8d8f1247878. +--- + Changes | 5 +++++ + asmcomp/s390x/emit.mlp | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- a/asmcomp/s390x/emit.mlp ++++ b/asmcomp/s390x/emit.mlp +@@ -611,7 +611,7 @@ + | Lraise k -> + begin match k with + | Cmm.Raise_withtrace -> +- ` brasl %r14, {emit_symbol "caml_raise_exn"}\n`; ++ ` {emit_call "caml_raise_exn"}\n`; + let lbl = record_frame Reg.Set.empty true i.dbg in + `{emit_label lbl}:\n` + | Cmm.Raise_notrace ->
  13. Download patch .pc/CVE-2017-9772.patch/byterun/debugger.c
  14. Download patch byterun/dynlink.c

    --- 4.04.0-2/byterun/dynlink.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/dynlink.c 2017-10-10 12:10:52.000000000 +0000 @@ -81,8 +81,8 @@ static char * parse_ld_conf(void) struct stat st; int ldconf, nread; - stdlib = getenv("OCAMLLIB"); - if (stdlib == NULL) stdlib = getenv("CAMLLIB"); + stdlib = caml_secure_getenv("OCAMLLIB"); + if (stdlib == NULL) stdlib = caml_secure_getenv("CAMLLIB"); if (stdlib == NULL) stdlib = OCAML_STDLIB_DIR; ldconfname = caml_strconcat(3, stdlib, "/", LD_CONF_NAME); if (stat(ldconfname, &st) == -1) { @@ -150,7 +150,7 @@ void caml_build_primitive_table(char * l - directories specified in the executable - directories specified in the file <stdlib>/ld.conf */ tofree1 = caml_decompose_path(&caml_shared_libs_path, - getenv("CAML_LD_LIBRARY_PATH")); + caml_secure_getenv("CAML_LD_LIBRARY_PATH")); if (lib_path != NULL) for (p = lib_path; *p != 0; p += strlen(p) + 1) caml_ext_table_add(&caml_shared_libs_path, p);
  15. Download patch debian/control

    --- 4.04.0-2/debian/control 2017-03-03 15:59:58.000000000 +0000 +++ 4.04.0-2ubuntu4/debian/control 2017-06-26 11:25:21.000000000 +0000 @@ -1,7 +1,8 @@ Source: ocaml Section: ocaml Priority: optional -Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> Uploaders: Samuel Mimram <smimram@debian.org>, Ralf Treinen <treinen@debian.org>,
  16. Download patch .pc/CVE-2017-9772.patch/byterun/win32.c
  17. Download patch .pc/CVE-2017-9772.patch/byterun/unix.c
  18. Download patch .pc/CVE-2017-9772.patch/otherlibs/unix/unixLabels.mli
  19. Download patch byterun/win32.c

    --- 4.04.0-2/byterun/win32.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/win32.c 2017-10-10 12:10:52.000000000 +0000 @@ -437,7 +437,8 @@ void caml_signal_thread(void * lpParam) char *endptr; HANDLE h; /* Get an hexa-code raw handle through the environment */ - h = (HANDLE) (uintptr_t) strtol(getenv("CAMLSIGPIPE"), &endptr, 16); + h = (HANDLE) (uintptr_t) + strtol(caml_secure_getenv("CAMLSIGPIPE"), &endptr, 16); while (1) { DWORD numread; BOOL ret; @@ -674,3 +675,9 @@ int caml_snprintf(char * buf, size_t siz return len; } #endif + +char *caml_secure_getenv (char const *var) +{ + /* Win32 doesn't have a notion of setuid bit, so getenv is safe. */ + return CAML_SYS_GETENV (var); +}
  20. Download patch debian/control.in

    --- 4.04.0-2/debian/control.in 2017-03-03 15:59:13.000000000 +0000 +++ 4.04.0-2ubuntu4/debian/control.in 2017-06-26 11:25:21.000000000 +0000 @@ -1,7 +1,8 @@ Source: ocaml Section: ocaml Priority: optional -Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> Uploaders: Samuel Mimram <smimram@debian.org>, Ralf Treinen <treinen@debian.org>,
  21. Download patch .pc/applied-patches

    --- 4.04.0-2/.pc/applied-patches 2017-10-10 12:10:51.768574074 +0000 +++ 4.04.0-2ubuntu4/.pc/applied-patches 2017-10-10 12:10:52.372590813 +0000 @@ -7,3 +7,8 @@ 0008-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch 0009-Skip-native-tests.patch 0010-arm-default-PIC.patch +linker-flags.patch +pie-on-amd64.diff +0001-PR-7405-s390x-Fix-address-of-caml_raise_exn-in-nativ.patch +0011-arm64-hide-symbols-for-stricter-binutils.patch +CVE-2017-9772.patch
  22. Download patch .pc/CVE-2017-9772.patch/byterun/caml/osdeps.h

    --- 4.04.0-2/.pc/CVE-2017-9772.patch/byterun/caml/osdeps.h 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.0-2ubuntu4/.pc/CVE-2017-9772.patch/byterun/caml/osdeps.h 2016-11-04 16:08:24.000000000 +0000 @@ -0,0 +1,90 @@ +/**************************************************************************/ +/* */ +/* OCaml */ +/* */ +/* Xavier Leroy, 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 Lesser General Public License version 2.1, with the */ +/* special exception on linking described in the file LICENSE. */ +/* */ +/**************************************************************************/ + +/* Operating system - specific stuff */ + +#ifndef CAML_OSDEPS_H +#define CAML_OSDEPS_H + +#ifdef CAML_INTERNALS + +#include "misc.h" + +/* Read at most [n] bytes from file descriptor [fd] into buffer [buf]. + [flags] indicates whether [fd] is a socket + (bit [CHANNEL_FLAG_FROM_SOCKET] is set in this case, see [io.h]). + (This distinction matters for Win32, but not for Unix.) + Return number of bytes read. + In case of error, raises [Sys_error] or [Sys_blocked_io]. */ +extern int caml_read_fd(int fd, int flags, void * buf, int n); + +/* Write at most [n] bytes from buffer [buf] onto file descriptor [fd]. + [flags] indicates whether [fd] is a socket + (bit [CHANNEL_FLAG_FROM_SOCKET] is set in this case, see [io.h]). + (This distinction matters for Win32, but not for Unix.) + Return number of bytes written. + In case of error, raises [Sys_error] or [Sys_blocked_io]. */ +extern int caml_write_fd(int fd, int flags, void * buf, int n); + +/* Decompose the given path into a list of directories, and add them + to the given table. Return the block to be freed later. */ +extern char * caml_decompose_path(struct ext_table * tbl, char * path); + +/* Search the given file in the given list of directories. + If not found, return a copy of [name]. Result is allocated with + [caml_stat_alloc]. */ +extern char * caml_search_in_path(struct ext_table * path, char * name); + +/* Same, but search an executable name in the system path for executables. */ +CAMLextern char * caml_search_exe_in_path(char * name); + +/* Same, but search a shared library in the given path. */ +extern char * caml_search_dll_in_path(struct ext_table * path, char * name); + +/* Open a shared library and return a handle on it. + If [for_execution] is true, perform full symbol resolution and + execute initialization code so that functions from the shared library + can be called. If [for_execution] is false, functions from this + shared library will not be called, but just checked for presence, + so symbol resolution can be skipped. + If [global] is true, symbols from the shared library can be used + to resolve for other libraries to be opened later on. + Return [NULL] on error. */ +extern void * caml_dlopen(char * libname, int for_execution, int global); + +/* Close a shared library handle */ +extern void caml_dlclose(void * handle); + +/* Look up the given symbol in the given shared library. + Return [NULL] if not found, or symbol value if found. */ +extern void * caml_dlsym(void * handle, char * name); + +extern void * caml_globalsym(char * name); + +/* Return an error message describing the most recent dynlink failure. */ +extern char * caml_dlerror(void); + +/* Add to [contents] the (short) names of the files contained in + the directory named [dirname]. No entries are added for [.] and [..]. + Return 0 on success, -1 on error; set errno in the case of error. */ +extern int caml_read_directory(char * dirname, struct ext_table * contents); + +/* Recover executable name if possible (/proc/sef/exe under Linux, + GetModuleFileName under Windows). */ +extern int caml_executable_name(char * name, int name_len); + +#endif /* CAML_INTERNALS */ + +#endif /* CAML_OSDEPS_H */
  23. Download patch asmrun/.depend

    --- 4.04.0-2/asmrun/.depend 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/asmrun/.depend 2017-10-10 12:10:52.000000000 +0000 @@ -64,7 +64,7 @@ custom.o: custom.c ../byterun/caml/alloc debugger.o: debugger.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/debugger.h + ../byterun/caml/debugger.h ../byterun/caml/osdeps.h dynlink.o: dynlink.c ../byterun/caml/config.h \ ../byterun/caml/../../config/m.h ../byterun/caml/../../config/s.h \ ../byterun/caml/alloc.h ../byterun/caml/misc.h \ @@ -224,7 +224,8 @@ misc.o: misc.c ../byterun/caml/config.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/version.h + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/version.h natdynlink.o: natdynlink.c ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ @@ -292,8 +293,9 @@ spacetime.o: spacetime.c ../byterun/caml ../byterun/caml/io.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/memory.h \ ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/roots.h ../byterun/caml/signals.h \ - ../byterun/caml/stack.h ../byterun/caml/sys.h spacetime.h + ../byterun/caml/osdeps.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h spacetime.h spacetime_offline.o: spacetime_offline.c ../byterun/caml/alloc.h \ ../byterun/caml/misc.h ../byterun/caml/config.h \ ../byterun/caml/../../config/m.h ../byterun/caml/../../config/s.h \ @@ -335,7 +337,8 @@ startup_aux.o: startup_aux.c ../byterun/ ../byterun/caml/misc.h ../byterun/caml/exec.h ../byterun/caml/memory.h \ ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/startup_aux.h + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/startup_aux.h str.o: str.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ @@ -436,7 +439,7 @@ custom.p.o: custom.c ../byterun/caml/all debugger.p.o: debugger.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/debugger.h + ../byterun/caml/debugger.h ../byterun/caml/osdeps.h dynlink.p.o: dynlink.c ../byterun/caml/config.h \ ../byterun/caml/../../config/m.h ../byterun/caml/../../config/s.h \ ../byterun/caml/alloc.h ../byterun/caml/misc.h \ @@ -596,7 +599,8 @@ misc.p.o: misc.c ../byterun/caml/config. ../byterun/caml/memory.h ../byterun/caml/gc.h \ ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/version.h + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/version.h natdynlink.p.o: natdynlink.c ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ @@ -664,8 +668,9 @@ spacetime.p.o: spacetime.c ../byterun/ca ../byterun/caml/io.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/memory.h \ ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/roots.h ../byterun/caml/signals.h \ - ../byterun/caml/stack.h ../byterun/caml/sys.h spacetime.h + ../byterun/caml/osdeps.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h spacetime.h spacetime_offline.p.o: spacetime_offline.c ../byterun/caml/alloc.h \ ../byterun/caml/misc.h ../byterun/caml/config.h \ ../byterun/caml/../../config/m.h ../byterun/caml/../../config/s.h \ @@ -707,7 +712,8 @@ startup_aux.p.o: startup_aux.c ../byteru ../byterun/caml/misc.h ../byterun/caml/exec.h ../byterun/caml/memory.h \ ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/startup_aux.h + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/startup_aux.h str.p.o: str.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ @@ -808,7 +814,7 @@ custom.d.o: custom.c ../byterun/caml/all debugger.d.o: debugger.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/debugger.h + ../byterun/caml/debugger.h ../byterun/caml/osdeps.h dynlink.d.o: dynlink.c ../byterun/caml/config.h \ ../byterun/caml/../../config/m.h ../byterun/caml/../../config/s.h \ ../byterun/caml/alloc.h ../byterun/caml/misc.h \ @@ -968,7 +974,8 @@ misc.d.o: misc.c ../byterun/caml/config. ../byterun/caml/memory.h ../byterun/caml/gc.h \ ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/version.h + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/version.h natdynlink.d.o: natdynlink.c ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ @@ -1036,8 +1043,9 @@ spacetime.d.o: spacetime.c ../byterun/ca ../byterun/caml/io.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/memory.h \ ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/roots.h ../byterun/caml/signals.h \ - ../byterun/caml/stack.h ../byterun/caml/sys.h spacetime.h + ../byterun/caml/osdeps.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h spacetime.h spacetime_offline.d.o: spacetime_offline.c ../byterun/caml/alloc.h \ ../byterun/caml/misc.h ../byterun/caml/config.h \ ../byterun/caml/../../config/m.h ../byterun/caml/../../config/s.h \ @@ -1079,7 +1087,8 @@ startup_aux.d.o: startup_aux.c ../byteru ../byterun/caml/misc.h ../byterun/caml/exec.h ../byterun/caml/memory.h \ ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/startup_aux.h + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/startup_aux.h str.d.o: str.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ @@ -1180,7 +1189,7 @@ custom.i.o: custom.c ../byterun/caml/all debugger.i.o: debugger.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/debugger.h + ../byterun/caml/debugger.h ../byterun/caml/osdeps.h dynlink.i.o: dynlink.c ../byterun/caml/config.h \ ../byterun/caml/../../config/m.h ../byterun/caml/../../config/s.h \ ../byterun/caml/alloc.h ../byterun/caml/misc.h \ @@ -1340,7 +1349,8 @@ misc.i.o: misc.c ../byterun/caml/config. ../byterun/caml/memory.h ../byterun/caml/gc.h \ ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/version.h + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/version.h natdynlink.i.o: natdynlink.c ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \ @@ -1408,8 +1418,9 @@ spacetime.i.o: spacetime.c ../byterun/ca ../byterun/caml/io.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/memory.h \ ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/roots.h ../byterun/caml/signals.h \ - ../byterun/caml/stack.h ../byterun/caml/sys.h spacetime.h + ../byterun/caml/osdeps.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h spacetime.h spacetime_offline.i.o: spacetime_offline.c ../byterun/caml/alloc.h \ ../byterun/caml/misc.h ../byterun/caml/config.h \ ../byterun/caml/../../config/m.h ../byterun/caml/../../config/s.h \ @@ -1451,7 +1462,8 @@ startup_aux.i.o: startup_aux.c ../byteru ../byterun/caml/misc.h ../byterun/caml/exec.h ../byterun/caml/memory.h \ ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/startup_aux.h + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/startup_aux.h str.i.o: str.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ ../byterun/caml/config.h ../byterun/caml/../../config/m.h \ ../byterun/caml/../../config/s.h ../byterun/caml/mlvalues.h \
  24. Download patch asmcomp/compilenv.ml

    --- 4.04.0-2/asmcomp/compilenv.ml 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/asmcomp/compilenv.ml 2017-10-10 12:10:52.000000000 +0000 @@ -161,7 +161,6 @@ let make_symbol ?(unitname = current_uni let symbol_in_current_unit name = let prefix = "caml" ^ current_unit.ui_symbol in - name = prefix || (let lp = String.length prefix in String.length name >= 2 + lp && String.sub name 0 lp = prefix
  25. Download patch .pc/CVE-2017-9772.patch/byterun/sys.c
  26. Download patch otherlibs/unix/unixLabels.mli

    --- 4.04.0-2/otherlibs/unix/unixLabels.mli 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/otherlibs/unix/unixLabels.mli 2017-10-10 12:10:52.000000000 +0000 @@ -126,6 +126,20 @@ val getenv : string -> string environment. Raise [Not_found] if the variable is unbound. (This function is identical to [Sys.getenv].) *) +(* +val unsafe_getenv : string -> string +(** Return the value associated to a variable in the process + environment. + + Unlike {!getenv}, this function returns the value even if the + process has special privileges. It is considered unsafe because the + programmer of a setuid program must be careful to prevent execution + of arbitrary commands through manipulation of the environment + variables. + + @raise Not_found if the variable is unbound. *) +*) + val putenv : string -> string -> unit (** [Unix.putenv name value] sets the value associated to a variable in the process environment.
  27. Download patch configure

    --- 4.04.0-2/configure 2017-10-10 12:10:51.000000000 +0000 +++ 4.04.0-2ubuntu4/configure 2017-10-10 12:10:52.000000000 +0000 @@ -402,7 +402,9 @@ case "$bytecc,$target" in if cc="$bytecc" sh ./hasgot -mieee; then bytecccompopts="-mieee $bytecccompopts"; fi - bytecclinkopts="-Wl,--no-relax";; + bytecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id -Wl,--no-relax";; + gcc,*-*-linux*) + bytecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id";; *,mips-*-irix6*) # Turn off warning "unused library" bytecclinkopts="-n32 -Wl,-woff,84";; @@ -923,7 +925,8 @@ nativeccrpath="$byteccrpath" case "$arch,$nativecc,$system,$model" in *,*,nextstep,*) nativecclinkopts="-posix";; *,*,rhapsody,*) if $arch64; then partialld="ld -r -arch ppc64"; fi;; - alpha,gcc*,linux*,*) nativecclinkopts="-Wl,--no-relax";; + alpha,gcc*,linux*,*) nativecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id -Wl,--no-relax";; + *,gcc*,linux*,*) nativecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id";; amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";; amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";; power,gcc*,elf,ppc) partialld="ld -r -m elf32ppclinux";; @@ -1041,6 +1044,10 @@ else echo "HASHBANGSCRIPTS=false" >> Makefile fi +case "$arch,$system" in + amd64,linux) nativecccompopts="$nativecccompopts -fPIC";; +esac + # Use 64-bit file offset if possible bytecccompopts="$bytecccompopts -D_FILE_OFFSET_BITS=64" @@ -1083,6 +1090,16 @@ if sh ./hasgot times; then echo "#define HAS_TIMES" >> s.h fi +if sh ./hasgot2 -D_GNU_SOURCE -i stdlib.h secure_getenv; then + inf "secure_getenv() found." + echo "#define HAS_SECURE_GETENV" >> s.h +fi + +if sh ./hasgot -i unistd.h issetugid; then + inf "issetugid() found." + echo "#define HAS_ISSETUGID" >> s.h +fi + # For the terminfo module if test "$with_curses" = "yes"; then
  28. Download patch .pc/CVE-2017-9772.patch/otherlibs/unix/unix.mli
  29. Download patch asmcomp/arm64/emit.mlp

    --- 4.04.0-2/asmcomp/arm64/emit.mlp 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/asmcomp/arm64/emit.mlp 2017-10-10 12:10:52.000000000 +0000 @@ -328,6 +328,7 @@ let emit_literals() = let emit_load_symbol_addr dst s = if (not !Clflags.dlcode) || Compilenv.symbol_in_current_unit s then begin + ` .hidden {emit_symbol s}\n`; ` adrp {emit_reg dst}, {emit_symbol s}\n`; ` add {emit_reg dst}, {emit_reg dst}, #:lo12:{emit_symbol s}\n` end else begin @@ -579,6 +580,7 @@ let emit_instr i = ` fmov {emit_reg i.res.(0)}, #{emit_printf "0x%Lx" f}\n` else begin let lbl = float_literal f in + ` .hidden {emit_label lbl}\n`; ` adrp {emit_reg reg_tmp1}, {emit_label lbl}\n`; ` ldr {emit_reg i.res.(0)}, [{emit_reg reg_tmp1}, #:lo12:{emit_label lbl}]\n` end @@ -613,6 +615,7 @@ let emit_instr i = match addr with | Iindexed _ -> i.arg.(0) | Ibased(s, ofs) -> + ` .hidden {emit_symbol s}\n`; ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; reg_tmp1 in begin match size with @@ -640,6 +643,7 @@ let emit_instr i = match addr with | Iindexed _ -> i.arg.(1) | Ibased(s, ofs) -> + ` .hidden {emit_symbol s}\n`; ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; reg_tmp1 in begin match size with
  30. Download patch debian/patches/pie-on-amd64.diff

    --- 4.04.0-2/debian/patches/pie-on-amd64.diff 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.0-2ubuntu4/debian/patches/pie-on-amd64.diff 2017-06-26 11:29:25.000000000 +0000 @@ -0,0 +1,13 @@ +--- a/configure ++++ b/configure +@@ -1044,6 +1044,10 @@ + echo "HASHBANGSCRIPTS=false" >> Makefile + fi + ++case "$arch,$system" in ++ amd64,linux) nativecccompopts="$nativecccompopts -fPIC";; ++esac ++ + # Use 64-bit file offset if possible + + bytecccompopts="$bytecccompopts -D_FILE_OFFSET_BITS=64"
  31. Download patch byterun/caml/osdeps.h

    --- 4.04.0-2/byterun/caml/osdeps.h 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/caml/osdeps.h 2017-10-10 12:10:52.000000000 +0000 @@ -85,6 +85,11 @@ extern int caml_read_directory(char * di GetModuleFileName under Windows). */ extern int caml_executable_name(char * name, int name_len); +/* Secure version of [getenv]: returns NULL if the process has special + privileges (setuid bit or capabilities). +*/ +extern char *caml_secure_getenv(char const *var); + #endif /* CAML_INTERNALS */ #endif /* CAML_OSDEPS_H */
  32. Download patch otherlibs/raw_spacetime_lib/.depend

    --- 4.04.0-2/otherlibs/raw_spacetime_lib/.depend 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/otherlibs/raw_spacetime_lib/.depend 2017-10-10 12:10:52.000000000 +0000 @@ -40,3 +40,9 @@ raw_spacetime_lib.cmi : raw_spacetime_lib.cmo : raw_spacetime_lib.cmi raw_spacetime_lib.cmx : raw_spacetime_lib.cmi raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi :
  33. Download patch debian/patches/series

    --- 4.04.0-2/debian/patches/series 2017-03-03 21:33:34.000000000 +0000 +++ 4.04.0-2ubuntu4/debian/patches/series 2017-10-09 09:03:27.000000000 +0000 @@ -7,3 +7,8 @@ 0008-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch 0009-Skip-native-tests.patch 0010-arm-default-PIC.patch +linker-flags.patch +pie-on-amd64.diff +0001-PR-7405-s390x-Fix-address-of-caml_raise_exn-in-nativ.patch +0011-arm64-hide-symbols-for-stricter-binutils.patch +CVE-2017-9772.patch
  34. Download patch .pc/0011-arm64-hide-symbols-for-stricter-binutils.patch/asmcomp/arm64/emit.mlp
  35. Download patch byterun/misc.c

    --- 4.04.0-2/byterun/misc.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/misc.c 2017-10-10 12:10:52.000000000 +0000 @@ -21,6 +21,7 @@ #include "caml/config.h" #include "caml/misc.h" #include "caml/memory.h" +#include "caml/osdeps.h" #include "caml/version.h" caml_timing_hook caml_major_slice_begin_hook = NULL; @@ -242,7 +243,7 @@ void CAML_INSTR_ATEXIT (void) FILE *f = NULL; char *fname; - fname = getenv ("OCAML_INSTR_FILE"); + fname = caml_secure_getenv ("OCAML_INSTR_FILE"); if (fname != NULL){ char *mode = "a"; char buf [1000];
  36. Download patch .pc/0011-arm64-hide-symbols-for-stricter-binutils.patch/asmcomp/compilenv.ml
  37. Download patch otherlibs/unix/unix.mli

    --- 4.04.0-2/otherlibs/unix/unix.mli 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/otherlibs/unix/unix.mli 2017-10-10 12:10:52.000000000 +0000 @@ -125,10 +125,25 @@ val environment : unit -> string array val getenv : string -> string (** Return the value associated to a variable in the process + environment, unless the process has special privileges. + @raise Not_found if the variable is unbound or the process has + special privileges. + + (This function is identical to {!Sys.getenv}. *) + +(* +val unsafe_getenv : string -> string +(** Return the value associated to a variable in the process environment. - @raise Not_found if the variable is unbound. - (This function is identical to {!Sys.getenv}.) *) + Unlike {!getenv}, this function returns the value even if the + process has special privileges. It is considered unsafe because the + programmer of a setuid program must be careful to prevent execution + of arbitrary commands through manipulation of the environment + variables. + + @raise Not_found if the variable is unbound. *) +*) val putenv : string -> string -> unit (** [Unix.putenv name value] sets the value associated to a
  38. Download patch .pc/CVE-2017-9772.patch/byterun/startup.c
  39. Download patch .pc/CVE-2017-9772.patch/byterun/.depend
  40. Download patch byterun/startup_aux.c

    --- 4.04.0-2/byterun/startup_aux.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/startup_aux.c 2017-10-10 12:10:52.000000000 +0000 @@ -21,6 +21,7 @@ #include <stdio.h> #include "caml/backtrace.h" #include "caml/memory.h" +#include "caml/osdeps.h" #include "caml/startup_aux.h" @@ -73,10 +74,10 @@ static void scanmult (char *opt, uintnat void caml_parse_ocamlrunparam(void) { - char *opt = getenv ("OCAMLRUNPARAM"); + char *opt = caml_secure_getenv ("OCAMLRUNPARAM"); uintnat p; - if (opt == NULL) opt = getenv ("CAMLRUNPARAM"); + if (opt == NULL) opt = caml_secure_getenv ("CAMLRUNPARAM"); if (opt != NULL){ while (*opt != '\0'){
  41. Download patch byterun/.depend

    --- 4.04.0-2/byterun/.depend 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/.depend 2017-10-10 12:10:52.000000000 +0000 @@ -40,10 +40,10 @@ custom.o: custom.c caml/alloc.h caml/com caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h debugger.o: debugger.c caml/alloc.h caml/compatibility.h caml/misc.h \ caml/config.h caml/../../config/m.h caml/../../config/s.h \ - caml/mlvalues.h caml/debugger.h caml/fail.h caml/fix_code.h \ - caml/instruct.h caml/intext.h caml/io.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/sys.h + caml/mlvalues.h caml/debugger.h caml/osdeps.h caml/fail.h \ + caml/fix_code.h caml/instruct.h caml/intext.h caml/io.h caml/stacks.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/sys.h dynlink.o: dynlink.c caml/config.h caml/../../config/m.h \ caml/../../config/s.h caml/compatibility.h caml/alloc.h caml/misc.h \ caml/mlvalues.h caml/dynlink.h caml/fail.h caml/memory.h caml/gc.h \ @@ -152,7 +152,7 @@ minor_gc.o: minor_gc.c caml/custom.h cam misc.o: misc.c caml/config.h caml/../../config/m.h caml/../../config/s.h \ caml/compatibility.h caml/misc.h caml/memory.h caml/gc.h \ caml/mlvalues.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/version.h + caml/address_class.h caml/osdeps.h caml/version.h obj.o: obj.c caml/alloc.h caml/compatibility.h caml/misc.h caml/config.h \ caml/../../config/m.h caml/../../config/s.h caml/mlvalues.h \ caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h caml/freelist.h \ @@ -204,7 +204,7 @@ startup_aux.o: startup_aux.c caml/backtr caml/compatibility.h caml/config.h caml/../../config/m.h \ caml/../../config/s.h caml/misc.h caml/exec.h caml/memory.h caml/gc.h \ caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/startup_aux.h + caml/osdeps.h caml/startup_aux.h str.o: str.c caml/alloc.h caml/compatibility.h caml/misc.h caml/config.h \ caml/../../config/m.h caml/../../config/s.h caml/mlvalues.h \ caml/fail.h @@ -269,10 +269,10 @@ custom.d.o: custom.c caml/alloc.h caml/c caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h debugger.d.o: debugger.c caml/alloc.h caml/compatibility.h caml/misc.h \ caml/config.h caml/../../config/m.h caml/../../config/s.h \ - caml/mlvalues.h caml/debugger.h caml/fail.h caml/fix_code.h \ - caml/instruct.h caml/intext.h caml/io.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/sys.h + caml/mlvalues.h caml/debugger.h caml/osdeps.h caml/fail.h \ + caml/fix_code.h caml/instruct.h caml/intext.h caml/io.h caml/stacks.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/sys.h dynlink.d.o: dynlink.c caml/config.h caml/../../config/m.h \ caml/../../config/s.h caml/compatibility.h caml/alloc.h caml/misc.h \ caml/mlvalues.h caml/dynlink.h caml/fail.h caml/memory.h caml/gc.h \ @@ -385,7 +385,7 @@ minor_gc.d.o: minor_gc.c caml/custom.h c misc.d.o: misc.c caml/config.h caml/../../config/m.h caml/../../config/s.h \ caml/compatibility.h caml/misc.h caml/memory.h caml/gc.h \ caml/mlvalues.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/version.h + caml/address_class.h caml/osdeps.h caml/version.h obj.d.o: obj.c caml/alloc.h caml/compatibility.h caml/misc.h caml/config.h \ caml/../../config/m.h caml/../../config/s.h caml/mlvalues.h \ caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h caml/freelist.h \ @@ -437,7 +437,7 @@ startup_aux.d.o: startup_aux.c caml/back caml/compatibility.h caml/config.h caml/../../config/m.h \ caml/../../config/s.h caml/misc.h caml/exec.h caml/memory.h caml/gc.h \ caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/startup_aux.h + caml/osdeps.h caml/startup_aux.h str.d.o: str.c caml/alloc.h caml/compatibility.h caml/misc.h caml/config.h \ caml/../../config/m.h caml/../../config/s.h caml/mlvalues.h \ caml/fail.h @@ -502,10 +502,10 @@ custom.i.o: custom.c caml/alloc.h caml/c caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h debugger.i.o: debugger.c caml/alloc.h caml/compatibility.h caml/misc.h \ caml/config.h caml/../../config/m.h caml/../../config/s.h \ - caml/mlvalues.h caml/debugger.h caml/fail.h caml/fix_code.h \ - caml/instruct.h caml/intext.h caml/io.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/sys.h + caml/mlvalues.h caml/debugger.h caml/osdeps.h caml/fail.h \ + caml/fix_code.h caml/instruct.h caml/intext.h caml/io.h caml/stacks.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/sys.h dynlink.i.o: dynlink.c caml/config.h caml/../../config/m.h \ caml/../../config/s.h caml/compatibility.h caml/alloc.h caml/misc.h \ caml/mlvalues.h caml/dynlink.h caml/fail.h caml/memory.h caml/gc.h \ @@ -614,7 +614,7 @@ minor_gc.i.o: minor_gc.c caml/custom.h c misc.i.o: misc.c caml/config.h caml/../../config/m.h caml/../../config/s.h \ caml/compatibility.h caml/misc.h caml/memory.h caml/gc.h \ caml/mlvalues.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/version.h + caml/address_class.h caml/osdeps.h caml/version.h obj.i.o: obj.c caml/alloc.h caml/compatibility.h caml/misc.h caml/config.h \ caml/../../config/m.h caml/../../config/s.h caml/mlvalues.h \ caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h caml/freelist.h \ @@ -666,7 +666,7 @@ startup_aux.i.o: startup_aux.c caml/back caml/compatibility.h caml/config.h caml/../../config/m.h \ caml/../../config/s.h caml/misc.h caml/exec.h caml/memory.h caml/gc.h \ caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/startup_aux.h + caml/osdeps.h caml/startup_aux.h str.i.o: str.c caml/alloc.h caml/compatibility.h caml/misc.h caml/config.h \ caml/../../config/m.h caml/../../config/s.h caml/mlvalues.h \ caml/fail.h @@ -731,10 +731,10 @@ custom.pic.o: custom.c caml/alloc.h caml caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h debugger.pic.o: debugger.c caml/alloc.h caml/compatibility.h caml/misc.h \ caml/config.h caml/../../config/m.h caml/../../config/s.h \ - caml/mlvalues.h caml/debugger.h caml/fail.h caml/fix_code.h \ - caml/instruct.h caml/intext.h caml/io.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/sys.h + caml/mlvalues.h caml/debugger.h caml/osdeps.h caml/fail.h \ + caml/fix_code.h caml/instruct.h caml/intext.h caml/io.h caml/stacks.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/sys.h dynlink.pic.o: dynlink.c caml/config.h caml/../../config/m.h \ caml/../../config/s.h caml/compatibility.h caml/alloc.h caml/misc.h \ caml/mlvalues.h caml/dynlink.h caml/fail.h caml/memory.h caml/gc.h \ @@ -843,7 +843,7 @@ minor_gc.pic.o: minor_gc.c caml/custom.h misc.pic.o: misc.c caml/config.h caml/../../config/m.h caml/../../config/s.h \ caml/compatibility.h caml/misc.h caml/memory.h caml/gc.h \ caml/mlvalues.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/version.h + caml/address_class.h caml/osdeps.h caml/version.h obj.pic.o: obj.c caml/alloc.h caml/compatibility.h caml/misc.h caml/config.h \ caml/../../config/m.h caml/../../config/s.h caml/mlvalues.h \ caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h caml/freelist.h \ @@ -895,7 +895,7 @@ startup_aux.pic.o: startup_aux.c caml/ba caml/compatibility.h caml/config.h caml/../../config/m.h \ caml/../../config/s.h caml/misc.h caml/exec.h caml/memory.h caml/gc.h \ caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/startup_aux.h + caml/osdeps.h caml/startup_aux.h str.pic.o: str.c caml/alloc.h caml/compatibility.h caml/misc.h caml/config.h \ caml/../../config/m.h caml/../../config/s.h caml/mlvalues.h \ caml/fail.h
  42. Download patch .pc/CVE-2017-9772.patch/byterun/dynlink.c
  43. Download patch .pc/CVE-2017-9772.patch/otherlibs/unix/unix.ml
  44. Download patch asmcomp/s390x/emit.mlp

    --- 4.04.0-2/asmcomp/s390x/emit.mlp 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/asmcomp/s390x/emit.mlp 2017-10-10 12:10:52.000000000 +0000 @@ -611,7 +611,7 @@ let emit_instr i = | Lraise k -> begin match k with | Cmm.Raise_withtrace -> - ` brasl %r14, {emit_symbol "caml_raise_exn"}\n`; + ` {emit_call "caml_raise_exn"}\n`; let lbl = record_frame Reg.Set.empty true i.dbg in `{emit_label lbl}:\n` | Cmm.Raise_notrace ->
  45. Download patch asmrun/spacetime.c

    --- 4.04.0-2/asmrun/spacetime.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/asmrun/spacetime.c 2017-10-10 12:10:52.000000000 +0000 @@ -38,6 +38,7 @@ #include "caml/minor_gc.h" #include "caml/misc.h" #include "caml/mlvalues.h" +#include "caml/osdeps.h" #include "caml/roots.h" #include "caml/signals.h" #include "caml/stack.h" @@ -209,7 +210,7 @@ void caml_spacetime_initialize(void) int dir_ok = 1; user_specified_automatic_snapshot_dir = - getenv("OCAML_SPACETIME_SNAPSHOT_DIR"); + caml_secure_getenv("OCAML_SPACETIME_SNAPSHOT_DIR"); if (user_specified_automatic_snapshot_dir == NULL) { #ifdef HAS_GETCWD
  46. Download patch .pc/CVE-2017-9772.patch/byterun/startup_aux.c

    --- 4.04.0-2/.pc/CVE-2017-9772.patch/byterun/startup_aux.c 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.0-2ubuntu4/.pc/CVE-2017-9772.patch/byterun/startup_aux.c 2016-11-04 16:08:24.000000000 +0000 @@ -0,0 +1,105 @@ +/**************************************************************************/ +/* */ +/* OCaml */ +/* */ +/* Xavier Leroy and Damien Doligez, INRIA Rocquencourt */ +/* */ +/* Copyright 1996 Institut National de Recherche en Informatique et */ +/* en Automatique. */ +/* */ +/* All rights reserved. This file is distributed under the terms of */ +/* the GNU Lesser General Public License version 2.1, with the */ +/* special exception on linking described in the file LICENSE. */ +/* */ +/**************************************************************************/ + +#define CAML_INTERNALS + +/* Some runtime initialization functions that are common to bytecode + and native code. */ + +#include <stdio.h> +#include "caml/backtrace.h" +#include "caml/memory.h" +#include "caml/startup_aux.h" + + +/* Initialize the atom table */ + +CAMLexport header_t caml_atom_table[256]; +void caml_init_atom_table(void) +{ + int i; + for(i = 0; i < 256; i++) { +#ifdef NATIVE_CODE + caml_atom_table[i] = Make_header_allocated_here(0, i, Caml_white); +#else + caml_atom_table[i] = Make_header(0, i, Caml_white); +#endif + } + if (caml_page_table_add(In_static_data, + caml_atom_table, caml_atom_table + 256) != 0) { + caml_fatal_error("Fatal error: not enough memory for initial page table"); + } +} + + +/* Parse the OCAMLRUNPARAM environment variable. */ + +uintnat caml_init_percent_free = Percent_free_def; +uintnat caml_init_max_percent_free = Max_percent_free_def; +uintnat caml_init_minor_heap_wsz = Minor_heap_def; +uintnat caml_init_heap_chunk_sz = Heap_chunk_def; +uintnat caml_init_heap_wsz = Init_heap_def; +uintnat caml_init_max_stack_wsz = Max_stack_def; +uintnat caml_init_major_window = Major_window_def; +extern int caml_parser_trace; +uintnat caml_trace_level = 0; + + +static void scanmult (char *opt, uintnat *var) +{ + char mult = ' '; + unsigned int val = 1; + sscanf (opt, "=%u%c", &val, &mult); + sscanf (opt, "=0x%x%c", &val, &mult); + switch (mult) { + case 'k': *var = (uintnat) val * 1024; break; + case 'M': *var = (uintnat) val * (1024 * 1024); break; + case 'G': *var = (uintnat) val * (1024 * 1024 * 1024); break; + default: *var = (uintnat) val; break; + } +} + +void caml_parse_ocamlrunparam(void) +{ + char *opt = getenv ("OCAMLRUNPARAM"); + uintnat p; + + if (opt == NULL) opt = getenv ("CAMLRUNPARAM"); + + if (opt != NULL){ + while (*opt != '\0'){ + switch (*opt++){ + case 'a': scanmult (opt, &p); caml_set_allocation_policy (p); break; + case 'b': scanmult (opt, &p); caml_record_backtrace(Val_bool (p)); break; + case 'h': scanmult (opt, &caml_init_heap_wsz); break; + case 'H': scanmult (opt, &caml_use_huge_pages); break; + case 'i': scanmult (opt, &caml_init_heap_chunk_sz); break; + case 'l': scanmult (opt, &caml_init_max_stack_wsz); break; + case 'o': scanmult (opt, &caml_init_percent_free); break; + case 'O': scanmult (opt, &caml_init_max_percent_free); break; + case 'p': scanmult (opt, &p); caml_parser_trace = p; break; + case 'R': break; /* see stdlib/hashtbl.mli */ + case 's': scanmult (opt, &caml_init_minor_heap_wsz); break; + case 't': scanmult (opt, &caml_trace_level); break; + case 'v': scanmult (opt, &caml_verb_gc); break; + case 'w': scanmult (opt, &caml_init_major_window); break; + case 'W': scanmult (opt, &caml_runtime_warnings); break; + } + while (*opt != '\0'){ + if (*opt++ == ',') break; + } + } + } +}
  47. Download patch debian/patches/0011-arm64-hide-symbols-for-stricter-binutils.patch

    --- 4.04.0-2/debian/patches/0011-arm64-hide-symbols-for-stricter-binutils.patch 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.0-2ubuntu4/debian/patches/0011-arm64-hide-symbols-for-stricter-binutils.patch 2017-07-31 10:41:45.000000000 +0000 @@ -0,0 +1,52 @@ +Description: Mark certain symbols as .hidden in arm64 codegen + binutils 2.29 arm64 linker is more strict about when to perform pc-relative + relocations for global symbols. Specifically, they must be marked as .hidden. + ocaml arm64 codegen does not do this, so tests/lib-dynlink-native/ fails as + some symbols were not relocated. This patch fixes that by marking (hopefully) + the appropriate symbols as .hidden. +Author: Jiong Wang <jiong.wang@foss.arm.com> +Bug: https://caml.inria.fr/mantis/view.php?id=7585 +--- a/asmcomp/arm64/emit.mlp ++++ b/asmcomp/arm64/emit.mlp +@@ -324,6 +324,7 @@ + + let emit_load_symbol_addr dst s = + if (not !Clflags.dlcode) || Compilenv.symbol_in_current_unit s then begin ++ ` .hidden {emit_symbol s}\n`; + ` adrp {emit_reg dst}, {emit_symbol s}\n`; + ` add {emit_reg dst}, {emit_reg dst}, #:lo12:{emit_symbol s}\n` + end else begin +@@ -575,6 +576,7 @@ + ` fmov {emit_reg i.res.(0)}, #{emit_printf "0x%Lx" f}\n` + else begin + let lbl = float_literal f in ++ ` .hidden {emit_label lbl}\n`; + ` adrp {emit_reg reg_tmp1}, {emit_label lbl}\n`; + ` ldr {emit_reg i.res.(0)}, [{emit_reg reg_tmp1}, #:lo12:{emit_label lbl}]\n` + end +@@ -609,6 +611,7 @@ + match addr with + | Iindexed _ -> i.arg.(0) + | Ibased(s, ofs) -> ++ ` .hidden {emit_symbol s}\n`; + ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; + reg_tmp1 in + begin match size with +@@ -636,6 +639,7 @@ + match addr with + | Iindexed _ -> i.arg.(1) + | Ibased(s, ofs) -> ++ ` .hidden {emit_symbol s}\n`; + ` adrp {emit_reg reg_tmp1}, {emit_symbol_offset s ofs}\n`; + reg_tmp1 in + begin match size with +--- a/asmcomp/compilenv.ml ++++ b/asmcomp/compilenv.ml +@@ -161,7 +161,6 @@ + + let symbol_in_current_unit name = + let prefix = "caml" ^ current_unit.ui_symbol in +- name = prefix || + (let lp = String.length prefix in + String.length name >= 2 + lp + && String.sub name 0 lp = prefix
  48. Download patch .pc/0001-PR-7405-s390x-Fix-address-of-caml_raise_exn-in-nativ.patch/asmcomp/s390x/emit.mlp
  49. Download patch .pc/CVE-2017-9772.patch/asmrun/spacetime.c
  50. Download patch .pc/CVE-2017-9772.patch/configure
  51. Download patch .pc/CVE-2017-9772.patch/byterun/misc.c
  52. Download patch otherlibs/unix/unix.ml

    --- 4.04.0-2/otherlibs/unix/unix.ml 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/otherlibs/unix/unix.ml 2017-10-10 12:10:52.000000000 +0000 @@ -187,6 +187,7 @@ let handle_unix_error f arg = external environment : unit -> string array = "unix_environment" external getenv: string -> string = "caml_sys_getenv" +(* external unsafe_getenv: string -> string = "caml_sys_unsafe_getenv" *) external putenv: string -> string -> unit = "unix_putenv" type process_status =
  53. Download patch byterun/unix.c

    --- 4.04.0-2/byterun/unix.c 2016-11-04 16:08:24.000000000 +0000 +++ 4.04.0-2ubuntu4/byterun/unix.c 2017-10-10 12:10:52.000000000 +0000 @@ -19,6 +19,7 @@ #define _GNU_SOURCE /* Helps finding RTLD_DEFAULT in glibc */ + /* also secure_getenv */ #include <stddef.h> #include <stdlib.h> @@ -381,3 +382,20 @@ int caml_executable_name(char * name, in } #endif + +char *caml_secure_getenv (char const *var) +{ +#ifdef HAS_SECURE_GETENV + return secure_getenv (var); +#elif defined(HAS_ISSETUGID) + if (!issetugid ()) + return CAML_SYS_GETENV (var); + else + return NULL; +#else + if (geteuid () == getuid () && getegid () == getgid ()) + return CAML_SYS_GETENV (var); + else + return NULL; +#endif +}

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: ocaml-zarith

ocaml-zarith (1.5-0ubuntu1) artful; urgency=medium * New upstream release * Drop patches, applied upstream * Update watch file to point at github -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 03 Jul 2017 02:45:09 +0100 ocaml-zarith (1.4.1-2build1) artful; urgency=high * No change rebuild against ocaml 4.04. -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 27 Jun 2017 13:37:40 +0100

Modifications :
  1. Download patch debian/control

    --- 1.5-1/debian/control 2017-09-22 13:16:52.000000000 +0000 +++ 1.5-0ubuntu1/debian/control 2017-06-27 12:37:40.000000000 +0000 @@ -1,7 +1,8 @@ Source: ocaml-zarith Section: ocaml Priority: optional -Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> Uploaders: Mehdi Dogguy <mehdi@debian.org> Build-Depends: debhelper (>= 9), @@ -11,9 +12,9 @@ Build-Depends: autotools-dev, ocaml-findlib Standards-Version: 3.9.6 -Vcs-Browser: https://anonscm.debian.org/git/pkg-ocaml-maint/packages/ocaml-zarith.git -Vcs-Git: https://anonscm.debian.org/git/pkg-ocaml-maint/packages/ocaml-zarith.git -Homepage: https://github.com/ocaml/Zarith +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ocaml-maint/packages/ocaml-zarith.git +Vcs-Git: https://anonscm.debian.org/git/git/pkg-ocaml-maint/packages/ocaml-zarith.git +Homepage: https://forge.ocamlcore.org/projects/zarith/ Package: libzarith-ocaml-dev Architecture: any
  2. Download patch debian/watch

    --- 1.5-1/debian/watch 2017-09-22 13:06:37.000000000 +0000 +++ 1.5-0ubuntu1/debian/watch 2017-07-03 01:44:31.000000000 +0000 @@ -1,2 +1,4 @@ -version=3 -https://github.com/ocaml/Zarith/releases .*/release-(.*)\.tar\.gz +version=4 +opts="filenamemangle=s%(?:.*?/)?release-(\d[\d.]*)\.tar\.gz%Zarith-$1.tar.gz%" \ + https://github.com/ocaml/Zarith/tags \ + (?:.*?/)?release-(\d[\d.]*)\.tar\.gz
  3. Download patch debian/gbp.conf

    --- 1.5-1/debian/gbp.conf 2017-09-22 13:03:59.000000000 +0000 +++ 1.5-0ubuntu1/debian/gbp.conf 2016-01-26 13:36:51.000000000 +0000 @@ -1,2 +0,0 @@ -[DEFAULT] -pristine-tar = True

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: otags

otags (4.04.1-0ubuntu1) artful; urgency=medium * New upstream release -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 03 Jul 2017 17:39:27 +0100 otags (4.02.2-2build1) artful; urgency=high * No change rebuild against ocaml 4.04. -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 29 Jun 2017 10:09:55 +0100

Modifications :
  1. Download patch vi.ml

    --- 4.02.2-2/vi.ml 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/vi.ml 2017-01-05 20:50:11.000000000 +0000 @@ -1,36 +1,32 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: vi.ml,v 1.11 2016/01/10 20:57:40 tews Exp $ - * * write vi tags files * *) open Global -open Types +open Otags_types open Source_channel -module Loc = Camlp4.PreCast.Loc - type vi_tag = { tag : string; @@ -132,21 +128,39 @@ let add_tag vs tag = let start_unit vs file = - let mod_name = Misc.module_name file in + let mod_name = Otags_misc.module_name file in add_tag vs {tag = mod_name; tag_file = file; address = "1"; position = 0} let write_tag vs loc tag = - let loc_line = Misc.input_line_at (get_channel loc) (Loc.start_bol loc) in + let loc_line = + (* if loc is wrong (eg, because of line directives), input_line + * will throw End_of_file. + *) + try + Otags_misc.input_line_at (get_channel loc) + loc.Location.loc_start.Lexing.pos_bol + with + | End_of_file -> + raise + (Otags_parsing_error( + loc, + (Printf.sprintf + ("The parser delivered an invalid location " + ^^ "(char position %d-%d),\n" + ^^ "maybe there are line directives in the input?") + loc.Location.loc_start.Lexing.pos_bol + loc.Location.loc_end.Lexing.pos_cnum))) + in let address = if String.length loc_line <= 1 - then string_of_int (Loc.start_line loc) + then string_of_int loc.Location.loc_start.Lexing.pos_lnum else ex_search_line loc_line in add_tag vs {tag = tag; - tag_file = Loc.file_name loc; + tag_file = Otags_misc.file_of_loc loc; address = address; - position = Loc.start_off loc; + position = loc.Location.loc_start.Lexing.pos_cnum; }
  2. Download patch otags_types.ml

    --- 4.02.2-2/otags_types.ml 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/otags_types.ml 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,64 @@ +(* Otags III + * + * Hendrik Tews Copyright (C) 2010 - 2016 + * + * This file is part of "Otags III". + * + * "Otags III" 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 3 of the + * License, or (at your option) any later version. + * + * "Otags III" 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 in file COPYING in this or one of the parent + * directories for more details. + * + * You should have received a copy of the GNU General Public License + * along with "Otags III". If not, see + * <http://www.gnu.org/licenses/>. + * + * global type definitions + * + *) + +type unit_type = + | Signature + | Structure + +let string_of_unit_type = function + | Signature -> "signature" + | Structure -> "structure" + +type comp_ast = + | Sig_ast of Parsetree.signature + | Struct_ast of Parsetree.structure + + +(* the type for the write_tag entry in the tag_functions record *) +type write_tag_t = Location.t -> string -> unit + + +(* The common interface of the vi and emacs tagging modules is captured + * in this record. It contains the functions necessary for tagging. + *) +type tag_functions = { + (* start_unit file + * start tagging compilation unit file + *) + start_unit : string -> unit; + + (* write_tag loc tag + * write tag tag at loc + *) + write_tag : write_tag_t; + + (* finish one compilation unit *) + finish_unit : unit -> unit; + + (* finish all tagging *) + finish_tagging : unit -> unit; +} + +exception Otags_parsing_error of Location.t * string
  3. Download patch test/.gitignore

    --- 4.02.2-2/test/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/test/.gitignore 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,8 @@ +*.cmi +*.cmo +ccsl.NEWTAGS +ccsl.newtags +cpp_h.generated.ml +cppo_h.generated.ml +test.NEWTAGS +test.newtags
  4. Download patch util/catch_quot_error.ml

    --- 4.02.2-2/util/catch_quot_error.ml 2010-08-31 12:05:01.000000000 +0000 +++ 4.04.1-0ubuntu1/util/catch_quot_error.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -(* Exercise in exception handling: Catch a Quotation error exception *) - -module Quotation = Camlp4.Struct.Quotation.Make(Camlp4.PreCast.Ast) - -module Syntax = - Camlp4.OCamlInitSyntax.Make(Camlp4.PreCast.Ast)(Camlp4.PreCast.Gram)(Quotation) - -module S1 = Camlp4OCamlRevisedParser.Make(Syntax) - -module S2 = Camlp4OCamlParser.Make(Syntax) - -let start_loc = Syntax.Loc.mk "-" - -let input_stream = Stream.of_string - "leöt empty_sig_ast = Sig_ast(<:sig_item@no_loc< >>)" - -let _ = - try - Syntax.parse_implem start_loc input_stream - with - | ex1 -> - prerr_endline (Printexc.to_string ex1); - (match ex1 with - | Syntax.Loc.Exc_located(_loc, ex2) -> - prerr_endline(Printexc.to_string ex2); - (match ex2 with - | Syntax.Quotation.Error.E error -> - prerr_endline (Syntax.Quotation.Error.to_string error) - | Camlp4.PreCast.Lexer.Error.E error -> - prerr_endline (Camlp4.PreCast.Lexer.Error.to_string error) - | _ -> - prerr_endline "ex2 match failed" - ) - | _ -> - prerr_endline "ex1 match failed" - ); - exit 1 - - - -(*** Local Variables: ***) -(*** compile-command: "ocamlc -o catch_quot_error -g -I +camlp4 -I +camlp4/Camlp4Parsers dynlink.cma camlp4fulllib.cma catch_quot_error.ml" ***) -(*** End: ***)
  5. Download patch test/f.ml

    --- 4.02.2-2/test/f.ml 2010-08-16 07:24:18.000000000 +0000 +++ 4.04.1-0ubuntu1/test/f.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -type t = A | B with sexp - -(*** Local Variables: ***) -(*** compile-command: "ocamlc -c -i -pp \"camlp4o -I /usr/lib/ocaml/type-conv -I /usr/lib/ocaml/sexplib pa_type_conv.cmo pa_sexp_conv.cmo\" -I /usr/lib/ocaml/sexplib f.ml " ***) -(*** End: ***)
  6. Download patch emacs.mli

    --- 4.02.2-2/emacs.mli 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/emacs.mli 2017-01-05 20:50:11.000000000 +0000 @@ -1,31 +1,29 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: emacs.mli,v 1.5 2016/01/10 20:57:39 tews Exp $ - * * write emacs tags files * *) -open Types +open Otags_types (* Initialize the internal machinery for writing tags to the
  7. Download patch util/test_qot.ml

    --- 4.02.2-2/util/test_qot.ml 2010-09-06 13:05:23.000000000 +0000 +++ 4.04.1-0ubuntu1/util/test_qot.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,145 +0,0 @@ -(* This test program demonstrates that Camlp4QuotationCommon.Make installs - * quotations per side-effect in the Quotation submodule of its Syntax - * argument. For creating a new syntax one therefore has to use fresh - * Quotation submodules. -*) - -module PC = Camlp4.PreCast - - -(* The simple functors for fresh grammars, which I use here, - * reuse certain modules from PreCast, therefore I need additional - * equations in Camlp4Syntax to state the equality with those - * PreCast modules. - *) -module type Camlp4Syntax = Camlp4.Sig.Camlp4Syntax - with module Loc = PC.Loc - and module Ast = PC.Ast - - -(* Functor for building a fresh grammar that reuses the quotation module - * from PreCast. - *) -module FreshGrammar(Unit : sig end) - : Camlp4Syntax with module Token = PC.Gram.Token - and module Gram = PC.Gram -= Camlp4.OCamlInitSyntax.Make(PC.Ast)(PC.Gram)(PC.Quotation) - - -(* Functor for building a fresh grammar that contains a fresh - * quotation module. - *) -module QuotFreshGrammar(Unit : sig end) - : Camlp4Syntax with module Token = PC.Gram.Token - and module Gram = PC.Gram -= Camlp4.OCamlInitSyntax.Make(PC.Ast)(PC.Gram) - (Camlp4.Struct.Quotation.Make(PC.Ast)) - - -(* Functor to add quotations to a syntax *) -module Add_quotation - (HostSyntax : Camlp4Syntax) - (MakeQuotationSyntax : functor(EmptySyntax : Camlp4Syntax) -> Camlp4Syntax) - : Camlp4Syntax - = -struct - module XXX = struct - module New_gram = PC.MakeGram(PC.Lexer) - module EmptySyntax = - Camlp4.OCamlInitSyntax.Make(PC.Ast)(New_gram)(HostSyntax.Quotation) - module QuotationSyntax = MakeQuotationSyntax(EmptySyntax) - module X = - Camlp4QuotationCommon.Make(QuotationSyntax)(HostSyntax.AntiquotSyntax) - end - include HostSyntax -end - -(* Module type for printout information *) -module type Pos = sig - val pos : string -end - -(* Functor to check a syntax for the presence of the str_item - * quotation expander and print the result to stdout. - *) -module Check_quot(P : Pos)(S : Camlp4Syntax) = struct - let _ = - try - S.Quotation.find "str_item" S.Quotation.DynAst.str_item_tag; - Printf.printf "%s: quotation found\n%!" P.pos - with - | Not_found -> - Printf.printf "%s: NO QUOTATION\n%!" P.pos -end - - - -module A = FreshGrammar(struct end) -(* A is fresh and contains no quotations *) - -module B = Camlp4OCamlRevisedParser.Make(A) -(* B is fresh revised syntax and contains no quotations *) - - -module X_A_1 = Check_quot(struct let pos = "A1" end)(A) -module X_B_1 = Check_quot(struct let pos = "B1" end)(B) - - -module C = Add_quotation(B)(Camlp4OCamlRevisedParser.Make) -(* Now A,B,C contain quotations *) - -module X_A_2 = Check_quot(struct let pos = "A2" end)(A) -module X_B_2 = Check_quot(struct let pos = "B2" end)(B) -module X_C_2 = Check_quot(struct let pos = "C2" end)(C) - - -module D = FreshGrammar(struct end) -(* D is an empty grammar, but it contains quotations, because it - * shares the quotation module with A,B,C *) - -module X_A_3 = Check_quot(struct let pos = "A3" end)(A) -module X_B_3 = Check_quot(struct let pos = "B3" end)(B) -module X_C_3 = Check_quot(struct let pos = "C3" end)(C) -module X_D_3 = Check_quot(struct let pos = "D3" end)(D) - - -module E = Camlp4OCamlRevisedParser.Make(D) -(* E is a new revised syntax that contains already quotations *) - -module X_A_4 = Check_quot(struct let pos = "A4" end)(A) -module X_B_4 = Check_quot(struct let pos = "B4" end)(B) -module X_C_4 = Check_quot(struct let pos = "C4" end)(C) -module X_D_4 = Check_quot(struct let pos = "D4" end)(D) -module X_E_4 = Check_quot(struct let pos = "E4" end)(E) - - -module F = QuotFreshGrammar(struct end) -module G = Camlp4OCamlRevisedParser.Make(F) -(* G is a fresh revised syntax with a fresh quotation module. - * It contains no quotations. - *) - -module X_G_5 = Check_quot(struct let pos = "G5" end)(G) - - -module H = Add_quotation(G)(Camlp4OCamlRevisedParser.Make) -(* Now F,G,H contain quotations *) - -module X_G_6 = Check_quot(struct let pos = "G6" end)(G) -module X_H_6 = Check_quot(struct let pos = "H6" end)(H) - - -module I = QuotFreshGrammar(struct end) -module J = Camlp4OCamlRevisedParser.Make(I) -(* J is another fresh revised syntax with a fresh quotation module. - * It contains no quotations. - *) - -module X_G_7 = Check_quot(struct let pos = "G7" end)(G) -module X_H_7 = Check_quot(struct let pos = "H7" end)(H) -module X_J_7 = Check_quot(struct let pos = "J7" end)(J) - - -(*** Local Variables: ***) -(*** compile-command: "ocamlc.opt -I +camlp4 -I +camlp4/Camlp4Parsers dynlink.cma camlp4fulllib.cma test_qot.ml" ***) -(*** End: ***)
  8. Download patch source_channel.mli

    --- 4.02.2-2/source_channel.mli 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/source_channel.mli 2017-01-05 20:50:11.000000000 +0000 @@ -1,36 +1,33 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: source_channel.mli,v 1.4 2016/01/10 20:57:40 tews Exp $ - * * hold the in_channel of the source file * *) -open Types - val reset : unit -> unit -val get_channel : ?primary_file:bool -> loc_t -> in_channel +val get_channel : ?primary_file:bool -> Location.t -> in_channel -val full_string_of_loc : Camlp4.PreCast.Loc.t -> string +(* XXX needed? *) +val full_string_of_loc : Location.t -> string
  9. Download patch global.ml

    --- 4.02.2-2/global.ml 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/global.ml 2017-01-05 20:50:11.000000000 +0000 @@ -1,26 +1,24 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: global.ml,v 1.15 2016/01/10 20:57:39 tews Exp $ - * * global variables * *)
  10. Download patch contrib/update-otags

    --- 4.02.2-2/contrib/update-otags 2012-05-23 20:13:54.000000000 +0000 +++ 4.04.1-0ubuntu1/contrib/update-otags 2017-01-05 20:50:11.000000000 +0000 @@ -15,13 +15,13 @@ test -x "$OTAGS" || exit 0 rm -f $TAGSDIR/TAGS $TAGSDIR/tags -$OTAGS -parser-hints /usr/share/otags/hints -q -r -o $TAGSDIR/TAGS $OCAMLDIR +$OTAGS -q -r -o $TAGSDIR/TAGS $OCAMLDIR status=$? if [ $status -gt 1 ] ; then exit $status fi -$OTAGS -parser-hints /usr/share/otags/hints -q -r -vi -o $TAGSDIR/tags $OCAMLDIR +$OTAGS -q -r -vi -o $TAGSDIR/tags $OCAMLDIR status=$? if [ $status -gt 1 ] ; then exit $status
  11. Download patch test-distribution

    --- 4.02.2-2/test-distribution 2012-02-06 12:40:39.000000000 +0000 +++ 4.04.1-0ubuntu1/test-distribution 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -#!/bin/bash - -# invoke as test-distribution tag config-args - -set -e - -tag=$1 -shift -config_args="$*" - -echo ===================================================================== -echo ========= TEST $tag $config_args -echo ===================================================================== - - -tmpdir=/tmp/tews -otags_version=$(./configure -abra-print-version) -name="otags-$otags_version" -dir=$tmpdir/test-$name/$tag - -rm -rf $dir -mkdir -p $dir - -if [ ! -f $tmpdir/$name.tar.gz ] ; then - echo no $tmpdir/$name.tar.gz found! - exit 1 -fi - -pushd $dir -tar -xzf $tmpdir/$name.tar.gz - -popd - -# tocopy="test/lablgtk* test/Ccslc*" -tocopy="" - -for f in $tocopy ; do - # echo cp $f $dir/$name/$f - cp $f $dir/$name/$f -done - -if [ ! -d $dir/$name ] ; then - echo $dir/$name does not exist !! - exit 1 -fi -pushd $dir/$name - -set -x -./configure --prefix $dir/install $config_args -set +x - -make -make test 2>/dev/null -if [ $? = 0 ] ; then - echo ===================================================================== - echo ========= TEST PASSED $tag $config_args - echo ===================================================================== -else - echo ===================================================================== - echo ========= TEST FAILED $tag $config_args - echo ===================================================================== - exit 1 -fi
  12. Download patch test/cppo_i.include.ml

    --- 4.02.2-2/test/cppo_i.include.ml 2016-01-14 07:58:29.000000000 +0000 +++ 4.04.1-0ubuntu1/test/cppo_i.include.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - -let cppo_i_inc_a = 2 - - -let cppo_i_inc_b = 2 - -#ifdef HAVE_XXX -type cppo_i_inc_b = int -#else -type cppo_i_inc_c = int -#endif -
  13. Download patch otags_misc.ml

    --- 4.02.2-2/otags_misc.ml 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/otags_misc.ml 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,138 @@ +(* Otags III + * + * Hendrik Tews Copyright (C) 2010 - 2016 + * + * This file is part of "Otags III". + * + * "Otags III" 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 3 of the + * License, or (at your option) any later version. + * + * "Otags III" 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 in file COPYING in this or one of the parent + * directories for more details. + * + * You should have received a copy of the GNU General Public License + * along with "Otags III". If not, see + * <http://www.gnu.org/licenses/>. + * + * some misc functions + * + *) + +module U = Unix +module UL = Unix.LargeFile + +open Global + + +let the = function + | Some x -> x + | None -> assert false + +let option_map f = function + | None -> () + | Some x -> f x + +(* return true if s2 is an initial substring of s1 *) +let starts_with s1 s2 = + let s1_len = String.length s1 in + let s2_len = String.length s2 in + if s1_len >= s2_len then + (String.sub s1 0 s2_len) = s2 + else false + + +let module_name file_name = + let base = Filename.basename file_name in + let module_name = + if Filename.check_suffix base ".ml" + then Filename.chop_suffix base ".ml" + else if Filename.check_suffix base ".mli" + then Filename.chop_suffix base ".mli" + else base + in + String.capitalize_ascii module_name + + +(** Split string [s] at occurrences of [c]. Return the list of (non-zero) + strings between sequences of [c]. + + @param c split character + @param s string to split +*) +let string_split c s = + let len = String.length s in + let rec iter i res = + if i >= len + then List.rev res + else + let j = + try String.index_from s i c + with Not_found -> len + in + iter (j + 1) + (if i = j then res + else (String.sub s i (j - i)) :: res) + in + iter 0 [] + + +(** Strip spaces and tabs at start and end of the argument. *) +let strip_white_space s = + let len = String.length s in + let i = ref 0 in + while !i < len && (s.[!i] = ' ' || s.[!i] = '\t') do + incr i + done; + let j = ref (len - 1) in + while !j >= !i && (s.[!j] = ' ' || s.[!j] = '\t') do + decr j + done; + String.sub s !i (!j - !i + 1) + + +(* cut_out in_channel start end + * cuts the string from start - end out of in_channel + *) +let cut_out inc start_pos end_pos = + (* + * 3.11 FIX + * work around out-of-file end positions in 3.11 + * this is fixed in 3.12 + * let end_pos = min end_pos (in_channel_length inc) in + *) + seek_in inc start_pos; + really_input_string inc (end_pos - start_pos) + + +let input_line_at ic pos = + seek_in ic pos; + input_line ic + + + +exception Skip_entry + + +(** Check whether the first argument is a directory. Raise + {!Skip_entry} for errors. Errors are reported if the second argument + is true and depending on {!Global.silent} and {!Global.verbose}. +*) +let is_directory f explicitly_listed = + try + (UL.stat f).UL.st_kind = U.S_DIR + with + | U.Unix_error(error, _, _) -> + if explicitly_listed && (not !silent) || !verbose then + Printf.eprintf "stat failure on %s: %s\n" + f + (U.error_message error); + exit_status := 1; + raise Skip_entry + + +let file_of_loc loc = loc.Location.loc_start.Lexing.pos_fname
  14. Download patch util/test_loc_name.ml

    --- 4.02.2-2/util/test_loc_name.ml 2012-01-23 12:39:52.000000000 +0000 +++ 4.04.1-0ubuntu1/util/test_loc_name.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,173 +0,0 @@ -(* Attempt to fix the global Loc.name problem by turning the - * Loc module into a functor. - * - * For the Make_Loc functor I reuse the original Loc source code - * via INCLUDE of pa_macro, however, this forces me to use the - * revised syntax. Additionally, the Loc source code uses the debug - * syntax extension, which requires Camlp4DebugParser.cmo. - * - * To check Loc.name I parse some code with a quotation print the - * expansion. The code would be invalid, if really compiled with a - * changed Loc.name. - *) - -module PC = Camlp4.PreCast; - -module type Camlp4Syntax = Camlp4.Sig.Camlp4Syntax; - -(* the following abbreviation is needed, because Loc.ml names - * ErrorHandler directly, while in the distribution it is packed - * in the Camlp4 module. - *) -module ErrorHandler = Camlp4.ErrorHandler; - -module Make_Loc(Unit : sig end) : Camlp4.Sig.Loc = -struct - INCLUDE "/usr/local/src/ocaml-3.12.1/camlp4/Camlp4/Struct/Loc.ml"; -end; - - -(* functor to build a fresh, empty syntax - * this version implicitely reuses PreCast.Loc and therefore - * Loc.name is shared for all grammars build with this functor. - *) -module FreshGrammar(Unit : sig end) : Camlp4Syntax = - Camlp4.OCamlInitSyntax.Make(PC.Ast) - (Camlp4.Struct.Grammar.Static.Make(PC.Lexer)) - (Camlp4.Struct.Quotation.Make(PC.Ast)); - - -(* functor to build a fresh, empty syntax - * This version builds a fresh Loc module, everytime it is used. - * Loc.name is not shared any longer. - *) -module LocFreshGrammar(Unit : sig end) : Camlp4Syntax = -struct - module XXX = struct - module Loc = Make_Loc(Unit); - module Ast = Camlp4.Struct.Camlp4Ast.Make Loc; - module Token = Camlp4.Struct.Token.Make Loc; - module Lexer = Camlp4.Struct.Lexer.Make Token; - module Gram = Camlp4.Struct.Grammar.Static.Make Lexer; - module Quotation = Camlp4.Struct.Quotation.Make Ast; - module Fresh_Syntax = - Camlp4.OCamlInitSyntax.Make Ast Gram Quotation; - end; - include XXX.Fresh_Syntax; -end; - - -(* functor to add revised quotations to some syntax *) -module Add_quotations(HostSyntax : Camlp4Syntax) : Camlp4Syntax = -struct - module XXX = struct - module Lexer = Camlp4.Struct.Lexer.Make(HostSyntax.Token); - module New_gram = Camlp4.Struct.Grammar.Static.Make(Lexer); - module EmptySyntax = - Camlp4.OCamlInitSyntax.Make(HostSyntax.Ast)(New_gram) - (HostSyntax.Quotation); - module QuotationSyntax = Camlp4OCamlRevisedParser.Make(EmptySyntax); - module X = - Camlp4QuotationCommon.Make(QuotationSyntax)(HostSyntax.AntiquotSyntax); - end; - include HostSyntax; -end; - - -(* give Names to all modules, because otherwise typing may fail *) -module Unit = struct end; - -(* Functor to build a fresh ocaml syntax with revised quotations. - * The argument FreshGram is used to build an fresh, empty grammar, - * it can either be FreshGrammar or LocFreshGrammar. - *) -module Camlp4or(FreshGram : functor(Unit : sig end) -> Camlp4Syntax) - : Camlp4Syntax = - (* this version is fine *) - Add_quotations - (Camlp4.Printers.OCaml.Make - (Camlp4OCamlParser.Make - (Camlp4OCamlRevisedParser.Make(FreshGram Unit)))); - - -(* functor to change Loc.name of some syntax *) -module Change_loc(S : Camlp4Syntax) : Camlp4Syntax = -struct - do { S.Loc.name.val := "_xxx" }; - include S; -end; - - -(* module type for debugging position info *) -module type Pos = sig - value pos : string; -end; - - -(* functor that checks Loc.name by expanding and pretty-printing some - * quotation code. - *) -module Check_loc(P : Pos)(S : Camlp4Syntax) = struct - value loc_input = "let f _loc = <:expr< 5 >>"; - value ast = - try - S.parse_implem (S.Loc.mk "-") (Stream.of_string loc_input) - with [ - S.Loc.Exc_located(_, ex) -> - do { - Printf.eprintf "XXX: %s\n" (Printexc.to_string ex); - raise ex - } - ]; - do { - print_string P.pos; - print_string ": "; - S.print_implem ast - }; -end; - - -module A = Camlp4or(FreshGrammar); -(* A is the first syntax, it has Loc.name = "_loc" *) - -module X_A_1 = Check_loc(struct value pos = "A1"; end)(A); - -module B = Change_loc(A); -(* now A and B have Loc.name = "_xxx" *) - -module X_A_2 = Check_loc(struct value pos = "A2"; end)(A); -module X_B_2 = Check_loc(struct value pos = "B2"; end)(B); - -module C = Camlp4or(FreshGrammar); -(* next fresh syntax, because of the Loc.name sharing problem - * also C has Loc.name = "_xxx" *) - -module X_A_3 = Check_loc(struct value pos = "A3"; end)(A); -module X_B_3 = Check_loc(struct value pos = "B3"; end)(B); -module X_C_3 = Check_loc(struct value pos = "C3"; end)(C); - - -module D = Camlp4or(LocFreshGrammar); -(* The next grammar with a fresh Loc module inside. - * D has Loc.name = "_loc" *) - -module X_D_4 = Check_loc(struct value pos = "D4"; end)(D); - -module E = Change_loc(D); -(* Now D and E have Loc.name = "_xxx" *) - -module X_D_5 = Check_loc(struct value pos = "D5"; end)(D); -module X_E_5 = Check_loc(struct value pos = "E5"; end)(E); - -module F = Camlp4or(LocFreshGrammar); -(* The next fresh syntax F has Loc.name "_loc" again *) - -module X_D_6 = Check_loc(struct value pos = "D6"; end)(D); -module X_E_6 = Check_loc(struct value pos = "E6"; end)(E); -module X_F_6 = Check_loc(struct value pos = "F6"; end)(F); - - - -(*** Local Variables: ***) -(*** compile-command: "ocamlc.opt -g -pp 'camlp4r -parser macro Camlp4DebugParser.cmo' -I +camlp4 -I +camlp4/Camlp4Parsers dynlink.cma camlp4/camlp4fulllib.cma test_loc_name.ml" ***) -(*** End: ***)
  15. Download patch parser_hints.ml

    --- 4.02.2-2/parser_hints.ml 2016-01-15 20:13:27.000000000 +0000 +++ 4.04.1-0ubuntu1/parser_hints.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: parser_hints.ml,v 1.4 2016/01/15 20:13:27 tews Exp $ - * - * parser hints functionality - * - *) - -module U = Unix - -open Misc -open Camlp4_names - - -let hints = Hashtbl.create 2039 - -let try_split_last_colon line = - let i = ref ((String.length line) - 1) in - while !i >= 0 && (line.[!i] = ' ' || line.[!i] = '\t') do - decr i - done; - if !i >= 0 && line.[!i] = ':' - then Some(String.sub line 0 !i) - else None - -let normalize_parser_list parsers = - List.fold_left - (fun (internal, res) new_parser -> - try - (internal, res @ (normalize_parser res new_parser)) - with - | Not_found -> (false, res @ [new_parser]) - ) - (true, []) - parsers - - - -let process_hints_file ic file = - let parser_info = ref (true, []) in - try - while true do - let line = input_line ic in - if String.length line > 0 && line.[0] <> '#' - then - match try_split_last_colon line with - | Some line_without_colon -> - parser_info := - normalize_parser_list (string_split ' ' line_without_colon) - | None -> - if snd !parser_info = [] - then begin - Printf.eprintf - ("Parser hints error in %s:\n" ^^ - "First non-empty line must specify a parser list\n") - file; - exit 2; - end - else - Hashtbl.add hints (strip_white_space line) !parser_info - done - with - | End_of_file -> () - - -let rec process_parser_hint file = - match is_directory file false with - | true -> process_parser_hint_dir file - | false -> - (try - let ic = open_in file in - process_hints_file ic file; - close_in ic - with - | Sys_error sys_msg -> - Printf.eprintf "Cannot read %s\n%!" sys_msg; - exit 2 - ) - | exception Skip_entry -> - Printf.eprintf "Cannot read %s. Aborting.\n%!" file; - exit 2 - -and process_parser_hint_dir dir = - let handle = U.opendir dir in - let not_finished = ref true in - while !not_finished do - match - try Some(U.readdir handle) with End_of_file -> None - with - | Some entry -> - if entry = Filename.current_dir_name || - entry = Filename.parent_dir_name - then () - else process_parser_hint (Filename.concat dir entry) - | None -> - not_finished := false - done; - U.closedir handle - - -let process_parser_hints = - List.iter process_parser_hint - - -let parser_hint file = Hashtbl.find hints file
  16. Download patch debian/control

    --- 4.02.2-2/debian/control 2017-01-01 14:57:38.000000000 +0000 +++ 4.04.1-0ubuntu1/debian/control 2017-06-29 09:09:55.000000000 +0000 @@ -1,7 +1,8 @@ Source: otags Section: ocaml Priority: optional -Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org> Uploaders: Mike Furr <mfurr@debian.org>, Mehdi Dogguy <mehdi@debian.org>,
  17. Download patch parser_factory.ml
  18. Download patch source_channel.ml

    --- 4.02.2-2/source_channel.ml 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/source_channel.ml 2017-01-05 20:50:11.000000000 +0000 @@ -1,34 +1,31 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: source_channel.ml,v 1.4 2016/01/10 20:57:40 tews Exp $ - * * hold the in_channel of the source file * *) -open Types (* for Otags_parsing_error *) -module Loc = Camlp4.PreCast.Loc - +open Otags_misc +open Otags_types (* for Otags_parsing_error *) let current_file_name = ref "" @@ -57,15 +54,17 @@ let open_file ?(primary_file = false) fi let get_channel ?primary_file loc = - if Loc.file_name loc <> !current_file_name - then open_file ?primary_file (Loc.file_name loc) loc; + if file_of_loc loc <> !current_file_name + then open_file ?primary_file (file_of_loc loc) loc; !current_in_channel -let full_string_of_loc loc = - Printf.sprintf "[%s: sl %d(%d) so %d el %d(%d) eo %d%s]" - (Loc.file_name loc) - (Loc.start_line loc) (Loc.start_bol loc) (Loc.start_off loc) - (Loc.stop_line loc) (Loc.stop_bol loc) (Loc.stop_off loc) - (if Loc.is_ghost loc then " GHOST" else " REAL") +let full_string_of_loc _loc = "XXX" + (* XXX fix + * Printf.sprintf "[%s: sl %d(%d) so %d el %d(%d) eo %d%s]" + * (Loc.file_name loc) + * (Loc.start_line loc) (Loc.start_bol loc) (Loc.start_off loc) + * (Loc.stop_line loc) (Loc.stop_bol loc) (Loc.stop_off loc) + * (if Loc.is_ghost loc then " GHOST" else " REAL") + *)
  19. Download patch add_quotation.mli

    --- 4.02.2-2/add_quotation.mli 2016-01-10 20:57:38.000000000 +0000 +++ 4.04.1-0ubuntu1/add_quotation.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: add_quotation.mli,v 1.4 2016/01/10 20:57:38 tews Exp $ - * - * higher-order functor for adding quotations to some syntax module - * - *) - -module type Camlp4Syntax = Camlp4.Sig.Camlp4Syntax - with module Loc = Camlp4.PreCast.Loc - and module Ast = Camlp4.PreCast.Ast - -module Make - (HostSyntax : Camlp4Syntax) - (MakeQuotationSyntax : functor(EmptySyntax : Camlp4Syntax) -> Camlp4Syntax) - : sig end
  20. Download patch otags_types.mli

    --- 4.02.2-2/otags_types.mli 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/otags_types.mli 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,73 @@ +(* Otags III + * + * Hendrik Tews Copyright (C) 2010 - 2016 + * + * This file is part of "Otags III". + * + * "Otags III" 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 3 of the + * License, or (at your option) any later version. + * + * "Otags III" 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 in file COPYING in this or one of the parent + * directories for more details. + * + * You should have received a copy of the GNU General Public License + * along with "Otags III". If not, see + * <http://www.gnu.org/licenses/>. + * + * global type definitions + * + *) + +type unit_type = + | Signature + | Structure + +val string_of_unit_type : unit_type -> string + + +type comp_ast = + | Sig_ast of Parsetree.signature + | Struct_ast of Parsetree.structure + + +(* the type for the write_tag entry in the tag_functions record *) +type write_tag_t = Location.t -> string -> unit + + +(* The common interface of the vi and emacs tagging modules is captured + * in this record. It contains the functions necessary for tagging. + *) +type tag_functions = { + (* start_unit file + * start tagging compilation unit file + *) + start_unit : string -> unit; + + (* write_tag loc tag + * write tag tag at loc + *) + write_tag : write_tag_t; + + (* finish one compilation unit *) + finish_unit : unit -> unit; + + (* finish all tagging *) + finish_tagging : unit -> unit; +} + + +(* Exception to wrap an error message and a location to be reported by + * otags before continuing on the next input file. Lots of other + * exceptions are transformed into Otags_parsing_error's, these are + * those exceptions from which otags can recover. Therefore, when this + * exceptions is raised, the internal state must be in a relatively + * good shape. After this exception is caught the tags for the current + * file are written to output, therefore no half tags entry should be + * laying around somewhere. + *) +exception Otags_parsing_error of Location.t * string
  21. Download patch ChangeLog
  22. Download patch util/.gitignore

    --- 4.02.2-2/util/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/util/.gitignore 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,8 @@ +*.cmi +*.cmo +*.cmx +*.cma +dump-camlp4 +filter_for_tag +test_qot +ppx_flush_catchall
  23. Download patch test/usr-lib-ocaml-hints

    --- 4.02.2-2/test/usr-lib-ocaml-hints 2012-05-22 13:46:45.000000000 +0000 +++ 4.04.1-0ubuntu1/test/usr-lib-ocaml-hints 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -r: - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/plexer.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/diff.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/fstream.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/stdpp.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/pretty.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/extfold.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/token.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/ploc.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/grammar.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/extfun.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/prtools.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/pprintf.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/eprinter.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/gramext.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/reloc.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/quotation.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp5/plexing.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/ledit/cursor.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/ledit/ledit.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/ocsigen/simplexmlparser.mli - -o m: - /tmp/tews/otags-test/root/usr/lib/ocaml/dose3/input.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/mlpost/mlpost.mli - -o rq: - /tmp/tews/otags-test/root/usr/lib/ocaml/odn/pa_noodn.ml - /tmp/tews/otags-test/root/usr/lib/ocaml/sqlexpr/pa_sql.ml - -o q: - /tmp/tews/otags-test/root/usr/lib/ocaml/odn/pa_odn.ml - -o q g: - /tmp/tews/otags-test/root/usr/lib/ocaml/ocamlviz/camlp4/pa_ocamlviz.ml - -rf debug: - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/camlp4prof.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/unmaintained/etc/parserify.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/unmaintained/lib/fstream.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/unmaintained/lib/extfun.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/unmaintained/odyl/odyl_main.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/test/fixtures/macrotest.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Options.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Register.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/ErrorHandler.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/PreCast.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Debug.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/Token.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/CommentFilter.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/EmptyPrinter.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/Loc.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/FreeVars.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/DynLoader.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/EmptyError.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/Grammar/Fold.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/Grammar/Print.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Struct/Grammar/Parser.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Printers/Null.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Printers/OCamlr.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Printers/OCaml.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Printers/DumpOCamlAst.mli - /tmp/tews/otags-test/root/usr/lib/ocaml/camlp4/Camlp4/Printers/DumpCamlp4Ast.mli
  24. Download patch test/ocaml-3121-hints
  25. Download patch .pc/applied-patches

    --- 4.02.2-2/.pc/applied-patches 2017-07-03 19:12:25.941853087 +0000 +++ 4.04.1-0ubuntu1/.pc/applied-patches 2017-07-03 19:12:25.705846632 +0000 @@ -1 +0,0 @@ -disable-sexplib-tests.patch
  26. Download patch test/.cvsignore

    --- 4.02.2-2/test/.cvsignore 2012-03-28 20:46:10.000000000 +0000 +++ 4.04.1-0ubuntu1/test/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -*.cmi -*.cmo -ccsl.NEWTAGS -ccsl.newtags -cpp_h.generated.ml -cpp_i.generated.ml -test.NEWTAGS -test.newtags
  27. Download patch contrib/update-otags.8

    --- 4.02.2-2/contrib/update-otags.8 2016-01-10 18:51:14.000000000 +0000 +++ 4.04.1-0ubuntu1/contrib/update-otags.8 2017-01-05 20:50:11.000000000 +0000 @@ -60,15 +60,6 @@ System-wide tags table for .B Emacs and .B vi\fR/\fBvim\fR. -.IP "/usr/share/otags/hints" -Directory for parsing hints. Packages that install files in -non-standard syntax can install a parser hints file for -.B otags -in this directory, see option -.B -parser-hints -in the -.B otags\fR(1) -manual. .\" .\" ========================================================================== .\" ================ Bugs ==================================================== @@ -76,28 +67,9 @@ manual. .\" .SH BUGS .\" ============= pervasives ================================================= -.B Camlp4 -(and therefore -.B otags -too) -cannot parse all legal -.B OCaml -sources. Most notably, -.B camlp4 -dies on -.I pervasives.mli -because it cannot parse block attributes (those starting with -.I [@@\fR). -Therefore, none of the core library functions are tagged. -.\" ============= other syntax =============================================== -.P -Various files in the system-wide -.B OCaml -directory are written in the revised syntax or require other -syntax extensions. In principle these files can all be properly -tagged, but the dumb -.B update-otags -script tries to parse all files with the original syntax. +See the sections KNOWN PROBLEMS and MISSING FEATURES in the +.B otags(1) +manual. .\" .\" ========================================================================== .\" ================ Credits =================================================
  28. Download patch add_quotation.ml

    --- 4.02.2-2/add_quotation.ml 2016-01-10 20:57:38.000000000 +0000 +++ 4.04.1-0ubuntu1/add_quotation.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: add_quotation.ml,v 1.5 2016/01/10 20:57:38 tews Exp $ - * - * higher-order functor for adding quotations to some syntax module - * - *) - -module PreCast = Camlp4.PreCast -module type Camlp4Syntax = Camlp4.Sig.Camlp4Syntax - with module Loc = PreCast.Loc - and module Ast = PreCast.Ast - -module Make - (HostSyntax : Camlp4Syntax) - (MakeQuotationSyntax : functor(EmptySyntax : Camlp4Syntax) -> Camlp4Syntax) - = -struct - module Gram = PreCast.MakeGram(PreCast.Lexer) - module EmptySyntax = - Camlp4.OCamlInitSyntax.Make(PreCast.Ast)(Gram)(HostSyntax.Quotation) - module QuotationSyntax = MakeQuotationSyntax(EmptySyntax) - module X = - Camlp4QuotationCommon.Make(QuotationSyntax)(HostSyntax.AntiquotSyntax) -end
  29. Download patch tags.ml
  30. Download patch otags_dump_ast.ml

    --- 4.02.2-2/otags_dump_ast.ml 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/otags_dump_ast.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: otags_dump_ast.ml,v 1.3 2016/01/10 20:57:39 tews Exp $ - * - * camlp4 extension to dump ast - * - *) - - -module ID = struct - let name = "otags_dump_ast - dump camlp4 ast with line directive info" - let version = Conf.otags_version -end - -module Make(Syntax : Camlp4.Sig.Camlp4Syntax) - : Camlp4.Sig.Printer(Syntax.Ast).S = -struct - include Syntax - - let with_open_out_file file_name_opt f = - match file_name_opt with - | Some file -> - let oc = open_out_bin file in - f oc; - flush oc; - close_out oc - | None -> - set_binary_mode_out stdout true; - f stdout; - flush stdout - - let print_interf ?input_file:_ ?output_file ast = - with_open_out_file output_file - (fun oc -> - output_string oc Conf.otags_camlp4_ast_intf_magic; - output_char oc '\n'; - output_value oc - (!Monitor_line_directive.parsed_line_directives : - Monitor_line_directive.line_directive_record list); - (* XXX One should specify here that the ast has type - * Camlp4.PreCast.Syntax.Ast.sig_item, because it is read with - * that type again. - *) - output_value oc (ast : Syntax.Ast.sig_item)) - - let print_implem ?input_file:_ ?output_file ast = - with_open_out_file output_file - (fun oc -> - output_string oc Conf.otags_camlp4_ast_impl_magic; - output_char oc '\n'; - output_value oc - (!Monitor_line_directive.parsed_line_directives : - Monitor_line_directive.line_directive_record list); - output_value oc (ast : Syntax.Ast.str_item)) - -end - -module X = - Camlp4.Register.OCamlSyntaxExtension - (ID)(Monitor_line_directive.Line_directive_monitor) -module Y = Camlp4.Register.OCamlPrinter(ID)(Make) - - -(*** Local Variables: ***) -(*** compile-command: "ocamlc.opt -a -o otags_dump_ast.cma -I +camlp4 conf.mli conf.ml camlp4_types.ml monitor_line_directive.ml otags_dump_ast.ml" ***) -(*** End: ***)
  31. Download patch monitor_line_directive.mli

    --- 4.02.2-2/monitor_line_directive.mli 2016-01-14 20:17:46.000000000 +0000 +++ 4.04.1-0ubuntu1/monitor_line_directive.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: monitor_line_directive.mli,v 1.3 2016/01/14 20:17:46 tews Exp $ - * - * filter and store line directives - * - *) - - -(** Record for storing line directives for correcting character - offsets in locations. - *) -type line_directive_record = { - ld_file : string; (** the file name of the line directive *) - ld_line : int; (** the line number of the line directive *) - ld_parse_offset : int; (** the character offset of the end of the line - directive in the parsed character stream *) - mutable ld_file_offset : int; (** cache for the character offset of line - ld_line in file ld_file, -1 when invalid, - written in Tranlate_location when needed. *) -} - -(** list of all line directives after parsing completed. Should be reset - after each parsed unit. - *) -val parsed_line_directives : line_directive_record list ref - -(** Last filename seen in a line directive for cppo, which emits - line directives without filenames. Not used outside of this module, - but should be reset together with parsed_line_directives. - *) -val last_filename : string option ref - -module Line_directive_monitor : - functor(Syn : Camlp4.Sig.Camlp4Syntax) -> Camlp4.Sig.Camlp4Syntax
  32. Download patch make-distribution
  33. Download patch doc/.gitignore

    --- 4.02.2-2/doc/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/doc/.gitignore 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,3 @@ +internal +otags.html +otags.man
  34. Download patch .gitignore

    --- 4.02.2-2/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/.gitignore 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,15 @@ +*.cmi +*.cmo +*.cmx +*.cma +*.o +*.odoc-dump +Makefile +Makefile.deps +camlp4-dump +conf.ml +otags +version.ml +*~ +TAGS +tags
  35. Download patch vi.mli

    --- 4.02.2-2/vi.mli 2016-01-10 20:57:41.000000000 +0000 +++ 4.04.1-0ubuntu1/vi.mli 2017-01-05 20:50:11.000000000 +0000 @@ -1,31 +1,29 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: vi.mli,v 1.4 2016/01/10 20:57:41 tews Exp $ - * * write vi tags files * *) -open Types +open Otags_types (* Initialize the internal machinery for writing tags to the
  36. Download patch camlp4_names.mli

    --- 4.02.2-2/camlp4_names.mli 2016-01-10 20:57:38.000000000 +0000 +++ 4.04.1-0ubuntu1/camlp4_names.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: camlp4_names.mli,v 1.7 2016/01/10 20:57:38 tews Exp $ - * - * names and aliases of camlp4 modules and executables - * - *) - -(* The new camlp4 prefers long names for parsing extensions, for instance - * "Camlp4OCamlRevisedParser". To make succint command lines possible - * and to provide some backwards compatibility there exist a number - * of alias names. Camlp4OCamlRevisedParser can for instance be referred - * under all of "pa_r.cmo", "r", "ocamlr" "ocamlrevised", - * "camlp4ocamlrevisedparser.com". Further, there are more dependencies - * between the syntax extensions, for instance the original syntax is - * now an extension of the revised one. Again for backwards compatibility - * and for succint command lines dependencies are computed by camlp4, - * such that "pa_op.cmo" translates to a whole bunch of modules to be - * loaded. All this is done in CamlprBin.rewrite_and_load. Unfortunately - * one cannot reuse this code. - * - * This module contains contains a copy of the relevant code from - * CamlprBin.rewrite_and_load to achieve compatibility with camlp4. - *) - - - -(* Translates a parser name in the canonical camlp4 name with dependencies. - * Knows and translates aliases like "of" or "rf". - * Raises Not_found for an unrecognized argument. - *) -(* val parser_name_and_dependency : string -> string list *) - -(** Translate a parser name into its canonical name and add its - dependencies. Return the list of those parsers that are not - already present in the first argument. Raise [Not_found] if the - new parser is not one of the standard camlp4 parsers. -*) -val normalize_parser : string list -> string -> string list - - -(** Convert a list with canonical parser names into a string with - shorter names. -*) -val short_string_of_parser_list : string list -> string - -(* Takes a list of parser extensions and determines the camlp4 - * variant to use and the remaining parser extensions that need - * to be loaded at runtime. - * The typical example is that the default parser list - * results in "camlp4o" with no remaining parsers. - *) -val camlp4_variant : string list -> string * string list
  37. Download patch .pc/disable-sexplib-tests.patch/test/test.TAGS
  38. Download patch configure
  39. Download patch util/filter_for_tag.ml

    --- 4.02.2-2/util/filter_for_tag.ml 2010-08-31 12:05:01.000000000 +0000 +++ 4.04.1-0ubuntu1/util/filter_for_tag.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,147 +0,0 @@ -(* This program reads a _tags file and classifies all files inside a - * directory hierarchy according to some tags on the command line. - * - * It links with some modules of ocamlbuild to load _tags files and - * read the information therein. - *) - - -open Ocamlbuild_pack - - -(* - * for the ocaml directory tree: - * keep files with suffix - * .ml .mli .mlast .mlbuild .mlp .ml4 - * - * flush files with suffix - * .mll .mlpack .mllib .c - * .S .h .s .depend .cvsignore .asm - * .ico .rc .boot README .in .mly .sh - * .clib .dlib .itarget - * - * flush files that match pattern: - * "boot/ocaml" "/man/" emacs Makefile - *) - - -let report_all = ref false - -let suffixes = [".ml"; ".mli"; ".mlast"; ".mlbuild"; ".mlp"; ".ml4"] - - -let sort_file tags files entry = - if !report_all - || List.exists (fun suf -> Filename.check_suffix entry suf) suffixes - then - let i = ref 0 in - let tags_len = Array.length tags in - let not_found = ref true in - let entry_tags = Configuration.tags_of_filename entry in - while !i < tags_len && !not_found do - if Tags.mem tags.(!i) entry_tags - then begin - files.(!i) <- entry :: files.(!i); - not_found := false; - end; - incr i; - done; - if !not_found then - files.(!i) <- entry :: files.(!i) - - -let print_entry tag files = - print_endline tag; - List.iter - (fun f -> print_string " "; print_endline f) - files - - -let print_sorted_entries tags files = - for i = 0 to Array.length tags - 1 do - print_entry tags.(i) files.(i) - done; - print_entry "unmatched" files.(Array.length files - 1) - - -module U = Unix -module UL = Unix.LargeFile -let is_directory f = (UL.stat f).UL.st_kind = U.S_DIR - - -let rec walk_directory file_fun base = - let subdirs = ref [] in - let handle = U.opendir base in - let not_finished = ref true in - while !not_finished do - match - try Some(U.readdir handle) with End_of_file -> None - with - | Some ("." | "..") -> () - | Some entry -> - let file = Filename.concat base entry in - if is_directory file - then - subdirs := file :: !subdirs - else - file_fun file - | None -> - not_finished := false - done; - List.iter (walk_directory file_fun) !subdirs - - -let base_dir = ref None - -let tags_list = ref [] - - -let anon_fun x = match !base_dir with - | None -> base_dir := Some x - | Some _ -> tags_list := x::!tags_list - -let usage_message = - Printf.sprintf - "Usage %s [option] ... directory tag ...\n\ - Recognized options are:" - Sys.argv.(0) - -let arguments = Arg.align [ - ("-all", Arg.Set report_all, - " sort all files and not only those with interesting suffixes"); -] - - -let main() = - Arg.parse arguments anon_fun usage_message; - if !base_dir = None || !tags_list = [] then begin - Arg.usage arguments usage_message; - exit 1; - end; - - let base = match !base_dir with - | Some x -> x - | None -> assert false - in - let tags = Array.of_list !tags_list in - let files = Array.make (1 + Array.length tags) [] in - - Configuration.parse_file ~dir:base (Filename.concat base "_tags"); - - walk_directory (sort_file tags files) base; - - print_sorted_entries tags files; - () - - -let main_ex = - try - Printexc.record_backtrace true; - main() - with - | e -> - let backtrace = Printexc.get_backtrace() in - prerr_string "\nFatal error: escaping exception "; - prerr_endline (Printexc.to_string e); - prerr_string backtrace; - exit 2
  40. Download patch emacs.ml

    --- 4.02.2-2/emacs.ml 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/emacs.ml 2017-01-05 20:50:11.000000000 +0000 @@ -1,36 +1,32 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: emacs.ml,v 1.13 2016/01/10 20:57:39 tews Exp $ - * * write emacs tags files * *) open Global -open Types +open Otags_types open Source_channel -module Loc = Camlp4.PreCast.Loc - (* For files with INCLUDE or line directives we suddenly get tags with * locations from different files. We cannot tag with the main source file @@ -79,7 +75,7 @@ let emacs_tag_line line tag line_number let start_unit es file = assert(file <> ""); assert(Hashtbl.length es.buffers = 0); - let mod_name = Misc.module_name file in + let mod_name = Otags_misc.module_name file in let module_tag = emacs_tag_line "" mod_name 1 0 in make_current_buffer es file; Buffer.add_string es.current_buf module_tag @@ -93,15 +89,36 @@ let write_tag es loc tag = * (Loc.start_bol loc) * (Misc.cut_out (get_channel loc) (Loc.start_bol loc) (Loc.stop_off loc)); *) - if es.file <> Loc.file_name loc + if es.file <> Otags_misc.file_of_loc loc then - make_current_buffer es (Loc.file_name loc); + make_current_buffer es (Otags_misc.file_of_loc loc); + let line_fragment = + (* if loc is wrong (eg, because of line directives) cut_out will + * throw End_of_file. + *) + try + Otags_misc.cut_out + (get_channel loc) + loc.Location.loc_start.Lexing.pos_bol + loc.Location.loc_end.Lexing.pos_cnum + with + | End_of_file -> + raise + (Otags_parsing_error( + loc, + (Printf.sprintf + ("The parser delivered an invalid location " + ^^ "(char position %d-%d),\n" + ^^ "maybe there are line directives in the input?") + loc.Location.loc_start.Lexing.pos_bol + loc.Location.loc_end.Lexing.pos_cnum))) + in Buffer.add_string es.current_buf (emacs_tag_line - (Misc.cut_out (get_channel loc) (Loc.start_bol loc) (Loc.stop_off loc)) + line_fragment tag - (Loc.start_line loc) - (Loc.start_bol loc)) + loc.Location.loc_start.Lexing.pos_lnum + loc.Location.loc_start.Lexing.pos_bol) (* Buffer, never to be really used, serves as a placeholder for the
  41. Download patch doc/otags.html
  42. Download patch monitor_line_directive.ml

    --- 4.02.2-2/monitor_line_directive.ml 2016-01-14 20:17:46.000000000 +0000 +++ 4.04.1-0ubuntu1/monitor_line_directive.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,129 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: monitor_line_directive.ml,v 1.3 2016/01/14 20:17:46 tews Exp $ - * - * filter and store line directives - * - *) - -type line_directive_record = { - ld_file : string; - ld_line : int; - ld_parse_offset : int; - mutable ld_file_offset : int; -} - -let parsed_line_directives = ref [] - -let last_filename = ref None - - -let parse_line_directive file line parse_offset = - parsed_line_directives := - { ld_file = file; - ld_line = line; - ld_parse_offset = parse_offset; - ld_file_offset = -1 - } :: !parsed_line_directives - - -module Sig = Camlp4.Sig - -module Line_directive_monitor(Syn : Sig.Camlp4Syntax) : Sig.Camlp4Syntax = -struct - include Syn - - (* - * type token_filter = (t, Loc.t) stream_filter - * type token_filter = (t * Loc.t) Stream.t -> (t * Loc.t) Stream.t - *) - - let monitor_line_directive token loc = match token with - | Sig.LINE_DIRECTIVE(line, file_opt) -> - (* - * Printf.eprintf - * ("LD [%s: sl %d(%d) so %d el %d(%d) eo %d%s] : %d %s " - * ^^ "(last file %s)\n%!") - * (Loc.file_name loc) - * (Loc.start_line loc) (Loc.start_bol loc) (Loc.start_off loc) - * (Loc.stop_line loc) (Loc.stop_bol loc) (Loc.stop_off loc) - * (if Loc.is_ghost loc then " GHOST" else " REAL") - * line - * (match file_opt with - * | Some f -> f - * | None -> "<no file>" - * ) - * (match !last_filename with - * | None -> "<no last filename>" - * | Some f -> f - * ); - *) - let file = match file_opt with - | None -> - (match !last_filename with - | Some file -> file - | None -> assert false - ) - | Some file -> - last_filename := Some file; - file - in - parse_line_directive file line (Loc.stop_off loc) - - | Sig.KEYWORD _ - | Sig.SYMBOL _ - | Sig.LIDENT _ - | Sig.UIDENT _ - | Sig.ESCAPED_IDENT _ - | Sig.INT _ - | Sig.INT32 _ - | Sig.INT64 _ - | Sig.NATIVEINT _ - | Sig.FLOAT _ - | Sig.CHAR _ - | Sig.STRING _ - | Sig.LABEL _ - | Sig.OPTLABEL _ - | Sig.QUOTATION _ - | Sig.ANTIQUOT _ - | Sig.COMMENT _ - | Sig.BLANKS _ - | Sig.NEWLINE - | Sig.EOI - -> () - - let monitor_map_stream stream = - let next _ = match Stream.peek stream with - | Some (token, loc) as peek_res -> - Stream.junk stream; - monitor_line_directive token loc; - peek_res - | None -> None - in - Stream.from next - - let _ = - Gram.Token.Filter.define_filter - (Gram.get_filter ()) - (fun f s -> f (monitor_map_stream s)) -end -
  43. Download patch INSTALL

    --- 4.02.2-2/INSTALL 2012-12-05 09:29:31.000000000 +0000 +++ 4.04.1-0ubuntu1/INSTALL 2017-01-05 20:50:11.000000000 +0000 @@ -1,10 +1,7 @@ INSTALLATION =========================================================================== -1- optional: If you want to run the regression test after compilation - you need sexplib and its dependency type-conv (Debian packages - libsexplib-camlp4-dev and libtype-conv-camlp4-dev). If you only - want to compile and use otags then don't install those packages. +1- no dependencies only the ocaml compiler is needed 2- configure with @@ -15,7 +12,6 @@ --bindir <path> user executables [PREFIX/bin] --mandir <path> man pages [PREFIX/share/man] --bytecode don't use native compiler (for testing only) - --ocamllibdir <path> ocaml library directory (for testing only) --no-version-check don't check for correct ocaml version (not recommended) @@ -25,19 +21,10 @@ it at your own risk (for instance when your working with the latest cvs version of ocaml). - The option --ocamllibdir sets the directory in which - type-conf/pa_type_conv.cma and sexplib/pa_sexp_conv.cma can be - found if you have them installed and they cannot be found - automatically using ocamlfind. - [If you want to know the details: The configure script checks for - ocamlc and ocamlopt.opt. When the latter is found native compilation - is used. It further checks wheter all of ocamldep, camlp4, camlp4of, - camlp4oof, camlp4orf, camlp4rf, camlp4rf, camlp4o and camlp4r are - installed and have the same version as ocamlc and ocamlopt.opt. The - location of the camlp4 executables is hardwired in the executable - (via conf.ml.in). The script uses "ocamlfind query" to determine the - location of sexplib and type_conv. + ocamlc and ocamlopt.opt. When the latter is found native + compilation is used. It further checks wheter ocamldep is + installed and has the same version as ocamlc and ocamlopt.opt. ] 3- compile with @@ -48,7 +35,6 @@ make install - 5- optional, if you want update-otags, check the path' in contrib/update-otags and contrib/Makefile and do then
  44. Download patch conf.mli

    --- 4.02.2-2/conf.mli 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/conf.mli 2017-01-05 20:50:11.000000000 +0000 @@ -1,38 +1,28 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: conf.mli,v 1.5 2016/01/10 20:57:39 tews Exp $ - * * configuration * *) -val camlp4_exec_path : string - -val camlp4_mod_path : string - val ocaml_version : string val otags_version : string - -val otags_camlp4_ast_intf_magic : string - -val otags_camlp4_ast_impl_magic : string
  45. Download patch parser_hints.mli

    --- 4.02.2-2/parser_hints.mli 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/parser_hints.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: parser_hints.mli,v 1.2 2016/01/10 20:57:40 tews Exp $ - * - * parser hints functionality - * - *) - - -(** Parse and record the parser hints in all files and directories in - the argument list. -*) -val process_parser_hints : string list -> unit - - -(** Lookup parser hints. Raise Not_found if no hints have been recorded. *) -val parser_hint : string -> (bool * string list)
  46. Download patch contrib/.gitignore

    --- 4.02.2-2/contrib/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/contrib/.gitignore 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1 @@ +update-otags.man
  47. Download patch types.mli

    --- 4.02.2-2/types.mli 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/types.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: types.mli,v 1.11 2016/01/10 20:57:40 tews Exp $ - * - * global type definitions - * - *) - -type unit_type = - | Signature - | Structure - -val string_of_unit_type : unit_type -> string - - -(* XXX Why/What about type loc_t = Caml4.Struct.Loc.t ??? *) -type loc_t = Camlp4.PreCast.Loc.t -type str_item_t = Camlp4.PreCast.Ast.str_item -type sig_item_t = Camlp4.PreCast.Ast.sig_item - -type comp_ast = - | Sig_ast of sig_item_t - | Struct_ast of str_item_t - - -(* the type for the write_tag entry in the tag_functions record *) -type write_tag_t = loc_t -> string -> unit - - -(* The common interface of the vi and emacs tagging modules is captured - * in this record. It contains the functions necessary for tagging. - *) -type tag_functions = { - (* start_unit file - * start tagging compilation unit file - *) - start_unit : string -> unit; - - (* write_tag loc tag - * write tag tag at loc - *) - write_tag : write_tag_t; - - (* finish one compilation unit *) - finish_unit : unit -> unit; - - (* finish all tagging *) - finish_tagging : unit -> unit; -} - - -(* Exception to wrap an error message and a location to be reported by - * otags before continuing on the next input file. Lots of other - * exceptions are transformed into Otags_parsing_error's, these are - * those exceptions from which otags can recover. Therefore, when this - * exceptions is raised, the internal state must be in a relatively - * good shape. After this exception is caught the tags for the current - * file are written to output, therefore no half tags entry should be - * laying around somewhere. - *) -exception Otags_parsing_error of loc_t * string
  48. Download patch .pc/disable-sexplib-tests.patch/Makefile.in
  49. Download patch global.mli

    --- 4.02.2-2/global.mli 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/global.mli 2017-01-05 20:50:11.000000000 +0000 @@ -1,26 +1,24 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: global.mli,v 1.14 2016/01/10 20:57:39 tews Exp $ - * * global variables * *)
  50. Download patch .pc/disable-sexplib-tests.patch/test/test.tags
  51. Download patch misc.ml

    --- 4.02.2-2/misc.ml 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/misc.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,134 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: misc.ml,v 1.11 2016/01/10 20:57:39 tews Exp $ - * - * some misc functions - * - *) - -module U = Unix -module UL = Unix.LargeFile - -open Global - - -let the = function - | Some x -> x - | None -> assert false - - -(* return true if s2 is an initial substring of s1 *) -let starts_with s1 s2 = - let s1_len = String.length s1 in - let s2_len = String.length s2 in - if s1_len >= s2_len then - (String.sub s1 0 s2_len) = s2 - else false - - -let module_name file_name = - let base = Filename.basename file_name in - let module_name = - if Filename.check_suffix base ".ml" - then Filename.chop_suffix base ".ml" - else if Filename.check_suffix base ".mli" - then Filename.chop_suffix base ".mli" - else base - in - String.capitalize module_name - - -(** Split string [s] at occurrences of [c]. Return the list of (non-zero) - strings between sequences of [c]. - - @param c split character - @param s string to split -*) -let string_split c s = - let len = String.length s in - let rec iter i res = - if i >= len - then List.rev res - else - let j = - try String.index_from s i c - with Not_found -> len - in - iter (j + 1) - (if i = j then res - else (String.sub s i (j - i)) :: res) - in - iter 0 [] - - -(** Strip spaces and tabs at start and end of the argument. *) -let strip_white_space s = - let len = String.length s in - let i = ref 0 in - while !i < len && (s.[!i] = ' ' || s.[!i] = '\t') do - incr i - done; - let j = ref (len - 1) in - while !j >= !i && (s.[!j] = ' ' || s.[!j] = '\t') do - decr j - done; - String.sub s !i (!j - !i + 1) - - -(* cut_out in_channel start end - * cuts the string from start - end out of in_channel - *) -let cut_out inc start_pos end_pos = - (* - * 3.11 FIX - * work around out-of-file end positions in 3.11 - * this is fixed in 3.12 - * let end_pos = min end_pos (in_channel_length inc) in - *) - seek_in inc start_pos; - really_input_string inc (end_pos - start_pos) - - -let input_line_at ic pos = - seek_in ic pos; - input_line ic - - - -exception Skip_entry - - -(** Check whether the first argument is a directory. Raise - {!Skip_entry} for errors. Errors are reported if the second argument - is true and depending on {!Global.silent} and {!Global.verbose}. -*) -let is_directory f explicitly_listed = - try - (UL.stat f).UL.st_kind = U.S_DIR - with - | U.Unix_error(error, _, _) -> - if explicitly_listed && (not !silent) || !verbose then - Printf.eprintf "stat failure on %s: %s\n" - f - (U.error_message error); - exit_status := 1; - raise Skip_entry
  52. Download patch debian/patches/series

    --- 4.02.2-2/debian/patches/series 2017-01-01 14:57:38.000000000 +0000 +++ 4.04.1-0ubuntu1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -disable-sexplib-tests.patch
  53. Download patch util/ppx_flush_catchall.ml

    --- 4.02.2-2/util/ppx_flush_catchall.ml 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/util/ppx_flush_catchall.ml 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,164 @@ +(* Otags III + * + * Hendrik Tews Copyright (C) 2010 - 2016 + * + * This file is part of "Otags III". + * + * "Otags III" 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 3 of the + * License, or (at your option) any later version. + * + * "Otags III" 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 in file COPYING in this or one of the parent + * directories for more details. + * + * You should have received a copy of the GNU General Public License + * along with "Otags III". If not, see + * <http://www.gnu.org/licenses/>. + * + * ppx preprocessor for deleting last catch-all match cases + * + *) + +open Longident +open Asttypes +open Parsetree +open Ast_mapper + +let rec list_split_last = function + | [] -> assert false + | [x] -> ([], x) + | x::l -> + let (rest, last) = list_split_last l in + (x::rest, last) + +type catch_all_error = + | Only_one_pattern + | No_catch_all + | No_matching + +let only_one_pattern = + "misplaced @flushcatchall - cannot delete the only match case" + +let no_catch_all = + "misplaced @flushcatchall - no catchall match case found" + +let no_matching = + "misplaced @flushcatchall - there is no pattern matching here" + +let string_of_catch_all_err = function + | Only_one_pattern -> only_one_pattern + | No_catch_all -> no_catch_all + | No_matching -> no_matching + +exception Catch_all_error of catch_all_error + +(** compile an attribute that cases the compiler to emit a warnign *) +let make_warning attr_loc err = + let warning = string_of_catch_all_err err in + ({txt = "ocaml.ppwarning"; loc = attr_loc}, + PStr [{pstr_desc = + Pstr_eval( + {pexp_desc = Pexp_constant(Pconst_string(warning, None)); + pexp_loc = attr_loc; + pexp_attributes = []; + }, + [] + ); + pstr_loc = attr_loc}] + ) + + +(** check whether there is a @flushcatchall attribute *) +let rec check_catchall_attr = function + | [] -> (None, []) + | ({txt = "flushcatchall"; loc}, PStr []) :: rest -> + (Some loc, rest) + | attr :: attrs -> + let (loc_opt, rest) = check_catchall_attr attrs in + (loc_opt, attr :: rest) + +(** or patterns are compiled into nested Ppat_or's. This function + splits off the last/rightmost pattern in an Ppat_or chain + *) +let rec split_last_or_pattern = function + | Ppat_or(left, ({ppat_desc = Ppat_or(_, _) as right_desc; _} as right)) -> + let (rest_or, last) = split_last_or_pattern right_desc in + (Ppat_or(left, {right with ppat_desc = rest_or}), last) + | Ppat_or(left, right) -> (left.ppat_desc, right.ppat_desc) + | _ -> assert false + +(** delete the last catch-all match of the form _ -> () in case_list + and return the remaining match cases. Raise Catch_all_error if it + cannot find such a catch-all. + *) +let flush_catch_all case_list = + let (cases, catch_all) = list_split_last case_list in + match catch_all with + | {pc_lhs = {ppat_desc = Ppat_any; _}; + pc_guard = None; + pc_rhs = {pexp_desc = Pexp_construct({txt = Lident "()"; _}, None); _} + } -> + if cases = [] + then raise(Catch_all_error Only_one_pattern) + else cases + | {pc_lhs = {ppat_desc = Ppat_or(_, _) as pat_desc; _}; + pc_guard = None; + pc_rhs = {pexp_desc = Pexp_construct({txt = Lident "()"; _}, None); _} + } -> + let (rest_or, last_or) = split_last_or_pattern pat_desc in + (match last_or with + | Ppat_any -> + cases @ [{catch_all with + pc_lhs = {catch_all.pc_lhs with + ppat_desc = rest_or}}] + | _ -> raise(Catch_all_error No_catch_all) + ) + | _ -> raise(Catch_all_error No_catch_all) + +(** Mapper that is mostly the identity on the syntax tree, but deletes + the last catch-all in function or match ... with pattern matches + that have a @flushcatchall attribute. + *) +let flush_catchall_mapper _argv = + {default_mapper with + expr = + fun mapper expr -> + let (catchall_loc_opt, attributes) = + check_catchall_attr expr.pexp_attributes in + let expr = + match catchall_loc_opt with + | None -> expr + | Some loc -> + try + match expr.pexp_desc with + | Pexp_function matching -> + {expr with + pexp_desc = Pexp_function(flush_catch_all matching); + pexp_attributes = attributes} + | Pexp_match(oexp, matching) -> + {expr with + pexp_desc = Pexp_match(oexp, flush_catch_all matching); + pexp_attributes = attributes} + | _ -> + raise (Catch_all_error No_matching) + with + | Catch_all_error err -> + {expr with + pexp_attributes = (make_warning loc err) :: attributes} + in + default_mapper.expr mapper expr + } + +let () = + register "flush_catchall_mapper" flush_catchall_mapper + + +(*** + * Local Variables: + * compile-command: "ocamlopt.opt -w A-4 -I +compiler-libs -o ppx_flush_catchall ocamlcommon.cmxa ppx_flush_catchall.ml" + * End: + ***)
  54. Download patch otags.ml
  55. Download patch util/.cvsignore

    --- 4.02.2-2/util/.cvsignore 2012-05-16 07:28:32.000000000 +0000 +++ 4.04.1-0ubuntu1/util/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -*.cmi -*.cmo -*.cmx -*.cma -dump-camlp4 -filter_for_tag -test_qot
  56. Download patch test/test.TAGS
  57. Download patch README

    --- 4.02.2-2/README 2012-01-26 21:26:47.000000000 +0000 +++ 4.04.1-0ubuntu1/README 2017-01-05 20:50:11.000000000 +0000 @@ -1,5 +1,5 @@ - Otags Reloaded: TAGS generation for emacs and vi from OCaml sources + Otags III: TAGS generation for emacs and vi from OCaml sources =========================================================================== =========================================================================== @@ -8,12 +8,14 @@ Summary ======= Otags can be used to build TAGS tables for emacs and vi, like etags -does, but for OCaml code source files. It is based on the camlp4 -parsers, which makes it more accurate than versions based on regexps: -otags finds references to constructors of sum types, fields of -records, etc. The downside of the camlp4 approach is that you can only -tag syntactically correct files and that otags only accepts what -camlp4 thinks is correct (which is sometimes different from ocamlc). +does, but for OCaml code source files. It is based on the official +OCaml parser from the compiler-libs library. Otags is therefore more +accurate than an regexp based tagger for OCaml: otags finds references +to constructors of sum types, fields of records, etc. The downside of +the parser approach is that you can only tag syntactically correct +files. (Previous versions of otags supported camlp4 syntax extensions +- this version only supports OCaml standard syntax without -pp or -ppx +preprocessors.) =========================================================================== =========================================================================== @@ -21,13 +23,9 @@ camlp4 thinks is correct (which is somet USAGE ===== -To build an emacs TAGS table for ocaml.ml in standard syntax and -for quotation.ml in standard syntax with revised quotations do: +To build an emacs TAGS table for ocaml.ml do: - otags ocaml.ml -pa rq quotation.ml - -(Note that otags switches the parsing engine between the two -files.) + otags ocaml.ml Most important options are -r for recursive directory tagging and -vi for generating vi/vim tags tables. @@ -38,22 +36,29 @@ subdirectory or online at http://askra.d =========================================================================== =========================================================================== -CREDITS / MISC +CREDITS / HISTORY ============== -The first camlp4 based OCaml tagger has been written by -Cuihtlauac Alvarado (http://perso.rd.francetelecom.fr/alvarado) -and Jean-Francois MONIN (http://www-verimag.imag.fr/~monin). -Around 2005 I became maintainer. All otags versions released up +The first camlp4 based OCaml tagger has been written by Cuihtlauac +Alvarado (http://perso.rd.francetelecom.fr/alvarado) and Jean-Francois +Monin (http://www-verimag.imag.fr/~monin). Around 2005 I took over and +released a few versions for OCaml 3.09. All otags versions released up to 3.09.3.3 were written for the original camlp4, which is now -available as camlp5. - -This version has been completely rewritten for the new camlp4. Its -most distinct new features are that it can tag files in different -syntax at once and that files with arbitrary combinations of the -standard Camlp4 syntax extensions are parsed with full native speed -without exernal Camlp4 processes. +available as camlp5. +For 3.11 I rewrote otags from scratch for the new camlp4 and released +several versions under the name "otags reloaded". The modular +structure of camlp4 made it possible to switch the parsing engine at +runtime between files and to parse all syntax supported by camlp4 at +full native speed without external camlp4 processes. However, the +increasing incompatibility between camlp4 and OCaml and camlp4's +sloppiness on parsing locations created more and more difficulties. +For instance, otags 4.02 failed on the OCaml standard library because +camlp4 was unable to digest the attribute annotations in there. + +Starting from 4.03, otags is based on the standard OCaml parser from +the compiler-libs library and has been renamed to "otags III". Support +for -pp or -ppx preprocessors is not yet available. =========================================================================== ===========================================================================
  58. Download patch util/test_keywords.ml

    --- 4.02.2-2/util/test_keywords.ml 2012-02-06 12:33:11.000000000 +0000 +++ 4.04.1-0ubuntu1/util/test_keywords.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -(* This sample program demonstrates that keywords are stored inside - * the Grammar module. Therefore, for a fresh syntax one needs a fresh - * grammar. -*) - -module PC = Camlp4.PreCast - - -module type Camlp4Syntax = Camlp4.Sig.Camlp4Syntax - with module Loc = PC.Loc - and module Ast = PC.Ast - - -(* functor to build a fresh, empty syntax with reusing the grammar - * module from Camlp4.PreCast - *) -module FreshGrammar(Unit : sig end) : Camlp4Syntax -= Camlp4.OCamlInitSyntax.Make(PC.Ast)(PC.Gram) - (Camlp4.Struct.Quotation.Make(PC.Ast)) - - -(* functor to build a fresh, empty syntax with a fresh grammar *) -module FreshFreshGrammar(Unit : sig end) : Camlp4Syntax -= Camlp4.OCamlInitSyntax.Make(PC.Ast) - (Camlp4.Struct.Grammar.Static.Make(PC.Lexer)) - (Camlp4.Struct.Quotation.Make(PC.Ast)) - - -(* module type for debugging position info *) -module type Pos = sig - val pos : string -end - - -(* functor that checks whether "val" is a keyword in syntax S *) -module Check_keyword_val(P : Pos)(S : Camlp4Syntax) = struct - let token_filter = S.Token.Filter.filter (S.Gram.get_filter()) - let val_token_stream = [< '( Camlp4.Sig.SYMBOL("val"), S.Loc.ghost) >] - let filtered_stream = token_filter val_token_stream - let _ = match filtered_stream with parser - | [< '(Camlp4.Sig.KEYWORD x, _ ) >] -> - Printf.printf "%s: KEYWORD %s\n%!" P.pos x - | [< '(Camlp4.Sig.SYMBOL x, _ ) >] -> - Printf.printf "%s: SYMBOL %s\n%!" P.pos x -end - - -module A = FreshGrammar(struct end) -(* now A is empty *) - -module X_A_1 = Check_keyword_val(struct let pos = "A1" end)(A) - -module B = Camlp4OCamlRevisedParser.Make(A) -(* now A, B parse the revised syntax, val is no keyword *) - -module X_A_2 = Check_keyword_val(struct let pos = "A2" end)(A) -module X_B_2 = Check_keyword_val(struct let pos = "B2" end)(B) - -module C = Camlp4OCamlParser.Make(B) -(* now A,B,C parse the original syntax, val is a keyword *) - -module X_A_3 = Check_keyword_val(struct let pos = "A3" end)(A) -module X_B_3 = Check_keyword_val(struct let pos = "B3" end)(B) -module X_C_3 = Check_keyword_val(struct let pos = "C3" end)(C) - -module D = FreshGrammar(struct end) -(* D is fresh but shares the grammar module with A,B,C and - * therefore also the hashtable with keywords. Therefore - * val is a keyword in D - *) - -module X_A_4 = Check_keyword_val(struct let pos = "A4" end)(A) -module X_B_4 = Check_keyword_val(struct let pos = "B4" end)(B) -module X_C_4 = Check_keyword_val(struct let pos = "C4" end)(C) -module X_D_4 = Check_keyword_val(struct let pos = "D4" end)(D) - -module E = Camlp4OCamlRevisedParser.Make(D) -(* D,E parse the revised syntax, but "val" is filtered as - * a keyword! - *) - -module X_A_5 = Check_keyword_val(struct let pos = "A5" end)(A) -module X_B_5 = Check_keyword_val(struct let pos = "B5" end)(B) -module X_C_5 = Check_keyword_val(struct let pos = "C5" end)(C) -module X_D_5 = Check_keyword_val(struct let pos = "D5" end)(D) -module X_E_5 = Check_keyword_val(struct let pos = "E5" end)(E) - -module F = FreshFreshGrammar(struct end) -(* F is fresh with a fresh grammar module, val is no keyword in F *) - -module X_A_6 = Check_keyword_val(struct let pos = "A6" end)(A) -module X_B_6 = Check_keyword_val(struct let pos = "B6" end)(B) -module X_C_6 = Check_keyword_val(struct let pos = "C6" end)(C) -module X_D_6 = Check_keyword_val(struct let pos = "D6" end)(D) -module X_E_6 = Check_keyword_val(struct let pos = "E6" end)(E) -module X_F_6 = Check_keyword_val(struct let pos = "F6" end)(F) - -module G = Camlp4OCamlRevisedParser.Make(F) -(* now F,G really parse the revised syntax without val being a keyword *) - -module X_A_7 = Check_keyword_val(struct let pos = "A7" end)(A) -module X_B_7 = Check_keyword_val(struct let pos = "B7" end)(B) -module X_C_7 = Check_keyword_val(struct let pos = "C7" end)(C) -module X_D_7 = Check_keyword_val(struct let pos = "D7" end)(D) -module X_E_7 = Check_keyword_val(struct let pos = "E7" end)(E) -module X_F_7 = Check_keyword_val(struct let pos = "F7" end)(F) -module X_G_7 = Check_keyword_val(struct let pos = "G7" end)(G) - -(*** Local Variables: ***) -(*** compile-command: "ocamlc.opt -g -pp camlp4o -I +camlp4 -I +camlp4/Camlp4Parsers dynlink.cma camlp4fulllib.cma test_keywords.ml" ***) -(*** End: ***)
  59. Download patch camlp4_names.ml
  60. Download patch misc.mli

    --- 4.02.2-2/misc.mli 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/misc.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: misc.mli,v 1.7 2016/01/10 20:57:39 tews Exp $ - * - * some misc functions - * - *) - -(* Returns the contents of the option, asserting that the - * argument is not None. - *) -val the : 'a option -> 'a - -(* starts_with big small - * returns true if small is an initial substring of big - *) -val starts_with : string -> string -> bool - - -(* return the module name for a given file name *) -val module_name : string -> string - - -(** Split string [s] at occurrences of [c]. Return the list of (non-zero) - strings between sequences of [c]. - - @param c split character - @param s string to split -*) -val string_split : char -> string -> string list - - -(** Strip spaces and tabs at start and end of the argument. *) -val strip_white_space : string -> string - - -(* cut_out ic start stop returns the part from start to stop (exclusive) - * from the file ic - *) -val cut_out : in_channel -> int -> int -> string - - -(* input_line_at ic pos - * inputs one line like input_line starting at pos in ic - *) -val input_line_at : in_channel -> int -> string - - -exception Skip_entry - -(** Check whether the first argument is a directory. Errors are - reported if the second argument is true and depending on - {!Global.silent} and {!Global.verbose}. -*) -val is_directory : string -> bool -> bool
  61. Download patch parser_factory.mli

    --- 4.02.2-2/parser_factory.mli 2016-01-10 20:57:39.000000000 +0000 +++ 4.04.1-0ubuntu1/parser_factory.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: parser_factory.mli,v 1.7 2016/01/10 20:57:39 tews Exp $ - * - * build new camlp4 parsers - * - *) - -open Types - -type parser_functions = { - mkloc : string -> loc_t; - parse_implem : - ?directive_handler:(str_item_t -> str_item_t option) -> - loc_t -> char Stream.t -> str_item_t; - parse_interf : - ?directive_handler:(sig_item_t -> sig_item_t option) -> - loc_t -> char Stream.t -> sig_item_t; -} - - -val update_syntax : string list -> parser_functions
  62. Download patch doc/.cvsignore

    --- 4.02.2-2/doc/.cvsignore 2012-05-22 09:54:13.000000000 +0000 +++ 4.04.1-0ubuntu1/doc/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -internal -otags.html -otags.man
  63. Download patch test/test.tags

    --- 4.02.2-2/test/test.tags 2017-07-03 19:12:25.000000000 +0000 +++ 4.04.1-0ubuntu1/test/test.tags 2017-01-05 20:50:11.000000000 +0000 @@ -57,10 +57,6 @@ C4 test/c.mli /^module C4 = C3$/; C6 test/c.mli /^type c5 += C6 of int * string$/; C7 test/c.mli /^type c5 += C7$/; C9 test/c.mli /^module rec C9 : C4$/; -Cpp_h.generated test/cpp_h.generated.ml 1; -Cpp_i.generated test/cpp_i.generated.ml 1; -Cppo_h.generated test/cppo_h.generated.ml 1; -Cppo_i.generated test/cppo_i.generated.ml 1; D test/d.ml 1; E test/e.mli 1; END test/d.ml /^module type END = sig $/; @@ -91,14 +87,7 @@ a38 test/a.ml /^ mutable a38 : int * in a40 test/a.ml /^ class type a40 = object end$/; a41 test/a.ml /^ class ['a, 'b ] a41 : int -> a40$/; a42 test/a.ml /^ class a42 : object$/; -a43 test/a.ml /^ method a43 : int$/; a44 test/a.ml /^class type virtual ['a, 'b] a44 = $/; -a45 test/a.ml /^ method a45 : unit$/; -a46 test/a.ml /^ method private a46 : unit$/; -a47 test/a.ml /^ method private virtual a47 : unit$/; -a48 test/a.ml /^ method virtual a48 : unit$/; -a49 test/a.ml /^ val a49 : int$/; -a50 test/a.ml /^ val mutable a50 : int$/; a53 test/a.ml /^class type a53 = object end$/; a54 test/a.ml /^class virtual ['a, 'b] a54 a b = $/; a55 test/a.ml /^ inherit object method a55 = 0 end as anon$/; @@ -111,10 +100,8 @@ a63 test/a.ml /^method private a63 = 8$/ a64 test/a.ml /^let a64 = "\\\\" (* \/\\ *)$/; a65 test/a.ml /^let a65 = '\/' (* \\\/ *)$/; a66 test/a.ml /^class type a66 = object$/; -a67 test/a.ml /^ inherit object method a67 : int end$/; a67 test/a.ml /^class a67 = $/; a68 test/a.ml /^ method a68 = 5$/; -a68 test/a.ml /^ method a68 : int$/; a7 test/a.ml /^let (a7 : int) = 1$/; a80 test/a.ml /^type a80 = A81$/; a82 test/a.ml /^type a82 = a80 = A81$/; @@ -151,31 +138,12 @@ c5 test/c.mli /^type c5 += C7$/; c6 test/c.mli /^type c6$/; c7 test/c.mli /^type 'aaaa c7$/; c8 test/c.mli /^type ('aaaa, 'bbbbbb) c8$/; -ccp_h_a test/cpp_h.source.ml /^let ccp_h_a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"$/; -ccp_i_a test/cpp_i.source.ml /^let ccp_i_a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"$/; compare test/a.ml /^ val compare : tx -> tx -> int$/; compare test/a.ml /^ let compare x y = 1$/; compare test/a.ml /^ let compare x y = 1$/; compare test/a.ml /^ let compare = compare$/; -cpp_i_inc_a test/cpp_i.include.ml /^let cpp_i_inc_a = 2$/; -cpp_i_inc_b test/cpp_i.include.ml /^let cpp_i_inc_b = 2$/; -cpp_inc_a test/cpp_h.include.ml /^let cpp_inc_a = 2$/; -cpp_inc_b test/cpp_h.include.ml /^let cpp_inc_b = 2$/; -cppo_h_a test/cppo_h.source.ml /^let cppo_h_a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"$/; -cppo_h_a1 test/cppo_h.source.ml /^type cppo_h_a1 = int$/; -cppo_h_c test/cppo_h.source.ml /^type cppo_h_c = int$/; -cppo_h_e test/cppo_h.source.ml /^type cppo_h_e = int$/; -cppo_i_a test/cppo_i.source.ml /^let cppo_i_a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"$/; -cppo_i_a1 test/cppo_i.source.ml /^type cppo_i_a1 = int$/; -cppo_i_c test/cppo_i.source.ml /^type cppo_i_c = int$/; -cppo_i_e test/cppo_i.source.ml /^type cppo_i_e = int$/; -cppo_i_inc_a test/cppo_i.include.ml /^let cppo_i_inc_a = 2$/; -cppo_i_inc_b test/cppo_i.include.ml /^let cppo_i_inc_b = 2$/; -cppo_i_inc_c test/cppo_i.include.ml /^type cppo_i_inc_c = int$/; -cppo_inc_a test/cppo_h.include.ml /^let cppo_inc_a = 2$/; -cppo_inc_b test/cppo_h.include.ml /^let cppo_inc_b = 2$/; -cppo_inc_c test/cppo_h.include.ml /^type cppo_inc_c = int$/; d test/d.ml /^and ['a] d (a : 'a ) = object $/; +d20 test/d.ml /^let Modu.(d20) = 20$/; dm test/d.ml /^ method dm = a $/; end_t test/d.ml /^ type end_t $/; end_t test/e.mli /^ type end_t $/; @@ -193,9 +161,6 @@ f7 test/d.ml /^let f7 : int -> int = fun f8 test/d.ml /^let f8 : int -> int = fun x -> x$/; g test/d.ml /^type b = {g:int; rr:int}$/; get test/d.ml /^ method get = value r;$/; -get test/e.mli /^ method get : 'a$/; -get test/e.mli /^ method get : 'a$/; -get test/e.mli /^ method get : 'a$/; int_value test/d.ml /^class int_value init = object (self)$/; int_value1 test/e.mli /^class ['a] int_value1 : object $/; int_value2 test/e.mli /^class type ['a] int_value2 = object $/; @@ -203,14 +168,8 @@ int_value3 test/e.mli /^class ['a] int_v mof test/d.ml /^ struct let mof = 3 end$/; or test/a.ml /^let ( or ) l1 l2 = l1 @ l2$/; r test/d.ml /^ val mutable r = init;$/; -r test/e.mli /^ val mutable r : 'a $/; -r test/e.mli /^ val mutable r : 'a $/; -r test/e.mli /^ val mutable r : 'a $/; rr test/d.ml /^type b = {g:int; rr:int}$/; set test/d.ml /^ method set n = r <- Some n;$/; -set test/e.mli /^ method set : 'a -> unit$/; -set test/e.mli /^ method set : 'a -> unit$/; -set test/e.mli /^ method set : 'a -> unit$/; tx test/a.ml /^ type tx$/; tx test/a.ml /^ type tx = int$/; tx test/a.ml /^ type tx = int$/; @@ -220,4 +179,3 @@ value test/d.ml /^let value = function$/ x test/d.ml /^class x = $/; x test/d.ml /^ (fun o -> object method x = o end) 5$/; x_class test/d.ml /^class type x_class = object$/; -y test/d.ml /^ val mutable y : int$/;
  64. Download patch test/g.mli

    --- 4.02.2-2/test/g.mli 2013-10-01 08:04:16.000000000 +0000 +++ 4.04.1-0ubuntu1/test/g.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -type t with sexp
  65. Download patch .cvsignore

    --- 4.02.2-2/.cvsignore 2012-05-22 06:16:46.000000000 +0000 +++ 4.04.1-0ubuntu1/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -*.cmi -*.cmo -*.cmx -*.cma -*.odoc-dump -Makefile -Makefile.deps -camlp4-dump -conf.ml -otags -version.ml
  66. Download patch conf.ml.in

    --- 4.02.2-2/conf.ml.in 2016-01-10 20:57:38.000000000 +0000 +++ 4.04.1-0ubuntu1/conf.ml.in 2017-01-05 20:50:11.000000000 +0000 @@ -1,26 +1,24 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: conf.ml.in,v 1.5 2016/01/10 20:57:38 tews Exp $ - * * configuration variables (partially generated by configure) * *) @@ -32,30 +30,6 @@ *) -(* Path to the camlp4 executable at *compile-time*. - * - * otags is linked to a specific camlp4 version at compile-time. At runtime - * otags can read abstract syntax trees from external camlp4 commands. If - * they are from a different ocaml version, strange things will happen. - *) -let camlp4_exec_path = "@CAMLP4PATH@" - -(** Path to the camlp4 dump ast extension. Needed for external - parsing. -*) -let camlp4_mod_path = "@LIBDIR@" - let ocaml_version = "@REQUIRED_OCAML_VERSION@" let otags_version = ocaml_version ^ "." ^ "@OTAGS_VERSION@" - -let otags_camlp4_ast_impl_magic = - "Otags camlp4 struct ast with line directive info. Version " ^ - otags_version ^ " / " ^ - Camlp4_config.camlp4_ast_impl_magic_number - -let otags_camlp4_ast_intf_magic = - "Otags camlp4 sig ast with line directive info. Version " ^ - otags_version ^ " / " ^ - Camlp4_config.camlp4_ast_intf_magic_number -
  67. Download patch translate_location.mli

    --- 4.02.2-2/translate_location.mli 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/translate_location.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: translate_location.mli,v 1.3 2016/01/10 20:57:40 tews Exp $ - * - * translate locations after line directives - * - *) - -open Types - -val prepare_line_directives : unit -> unit - -val translate_loc : loc_t -> loc_t
  68. Download patch tags.mli

    --- 4.02.2-2/tags.mli 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/tags.mli 2017-01-05 20:50:11.000000000 +0000 @@ -1,44 +1,29 @@ -(* Otags reloaded +(* Otags III * * Hendrik Tews Copyright (C) 2010 - 2016 * - * This file is part of "Otags reloaded". + * This file is part of "Otags III". * - * "Otags reloaded" is free software: you can redistribute it and/or + * "Otags III" 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 3 of the * License, or (at your option) any later version. * - * "Otags reloaded" is distributed in the hope that it will be useful, + * "Otags III" 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 in file COPYING in this or one of the parent * directories for more details. * * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see + * along with "Otags III". If not, see * <http://www.gnu.org/licenses/>. * - * $Id: tags.mli,v 1.10 2016/01/10 20:57:40 tews Exp $ - * * recursive tagging function * *) -open Types - -(* Empty ast of an interface. Used when parsing fails to output - * at least the tag for the module. Defined here, because tags.ml is - * the only file compiled with quotations on. - *) -val empty_sig_ast : comp_ast - - -(* Empty ast of an implementation unit. Used when parsing fails, see - * empty_sig_ast. - *) -val empty_str_ast : comp_ast - +open Otags_types (* generate_tags write_tag unit_ast file * generates tags for unit_ast of file file by calling write_tag
  69. Download patch otags_misc.mli

    --- 4.02.2-2/otags_misc.mli 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/otags_misc.mli 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,80 @@ +(* Otags III + * + * Hendrik Tews Copyright (C) 2010 - 2016 + * + * This file is part of "Otags III". + * + * "Otags III" 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 3 of the + * License, or (at your option) any later version. + * + * "Otags III" 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 in file COPYING in this or one of the parent + * directories for more details. + * + * You should have received a copy of the GNU General Public License + * along with "Otags III". If not, see + * <http://www.gnu.org/licenses/>. + * + * some misc functions + * + *) + +(* Returns the contents of the option, asserting that the + * argument is not None. + *) +val the : 'a option -> 'a + +(** Apply the function if something is contained in the option value. + *) +val option_map : ('a -> unit) -> 'a option -> unit + +(* starts_with big small + * returns true if small is an initial substring of big + *) +val starts_with : string -> string -> bool + + +(* return the module name for a given file name *) +val module_name : string -> string + + +(** Split string [s] at occurrences of [c]. Return the list of (non-zero) + strings between sequences of [c]. + + @param c split character + @param s string to split +*) +val string_split : char -> string -> string list + + +(** Strip spaces and tabs at start and end of the argument. *) +val strip_white_space : string -> string + + +(* cut_out ic start stop returns the part from start to stop (exclusive) + * from the file ic + *) +val cut_out : in_channel -> int -> int -> string + + +(* input_line_at ic pos + * inputs one line like input_line starting at pos in ic + *) +val input_line_at : in_channel -> int -> string + + +exception Skip_entry + +(** Check whether the first argument is a directory. Errors are + reported if the second argument is true and depending on + {!Global.silent} and {!Global.verbose}. +*) +val is_directory : string -> bool -> bool + + +(** return the file name of the starting position *) +val file_of_loc : Location.t -> string
  70. Download patch translate_location.ml

    --- 4.02.2-2/translate_location.ml 2016-01-14 20:17:46.000000000 +0000 +++ 4.04.1-0ubuntu1/translate_location.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: translate_location.ml,v 1.5 2016/01/14 20:17:46 tews Exp $ - * - * translate locations after line directives - * - *) - -(** See translate_loc below for more information. *) - -open Monitor_line_directive -open Types -open Source_channel - -module Loc = Camlp4.PreCast.Loc - - -let line_directive_array = ref [| |] -let current_index = ref(-1) - -(** Copy the contents of parsed_line_directives into the - line_directive_array, suitable for binary search. Ensure that the - array is sorted and that the ld_file_offset fields are invalid, - i.e., -1 - *) -let prepare_line_directives () = - line_directive_array := Array.of_list (List.rev !parsed_line_directives); - parsed_line_directives := []; - last_filename := None; - current_index := -1; - assert( - snd(Array.fold_left - (fun (prev_off, res) ld -> - (ld.ld_parse_offset, - res && prev_off < ld.ld_parse_offset && ld.ld_file_offset = -1)) - (0, true) - !line_directive_array)) - - -(** Search the last line directive before parse_off using binary search - in line_directive_array. Return the index of the found line directive - in line_directive_array. Can only be called if there is at least one - line directive and if parse_off is behind the first line directive. - Assumes that line_directive_array is ordered. - *) -let rec search_directive_array parse_off si ei = - assert(parse_off >= !line_directive_array.(si).ld_parse_offset && - (ei + 1 = Array.length !line_directive_array || - parse_off < !line_directive_array.(ei + 1).ld_parse_offset)); - if si = ei then si - else - let middle = (si + ei + 1) / 2 in - if parse_off < !line_directive_array.(middle).ld_parse_offset - then search_directive_array parse_off si (middle - 1) - else search_directive_array parse_off middle ei - - -(** Search the last line directive before parse_off using binary search - in line_directive_array. Return the index of the found line directive - in line_directive_array or -1 if parse_off is before the first line - directive. - *) -let get_directive_index parse_off = - if Array.length !line_directive_array = 0 || - parse_off < !line_directive_array.(0).ld_parse_offset - then -1 - else if !current_index >= 0 && - !line_directive_array.(!current_index).ld_parse_offset <= parse_off && - (!current_index + 1 = Array.length !line_directive_array || - parse_off < - !line_directive_array.(!current_index + 1).ld_parse_offset) - then - !current_index - else begin - current_index := - search_directive_array parse_off 0 - (Array.length !line_directive_array - 1); - (* Printf.eprintf "GDI search %d gives %d\n%!" parse_off !current_index; *) - !current_index - end - - -(** Return the character offset of the start of line line *) -let get_line_offset file_name line = - (* Printf.eprintf "GLO %s line %d\n%!" file_name line; *) - let loc = Loc.of_tuple (file_name, line, 0, 0, line, 0, 0, true) in - let ic = get_channel loc in - let line_count = ref 1 in - let pos = ref 0 in - seek_in ic 0; - try - while !line_count < line do - if input_char ic = '\n' - then incr line_count; - incr pos; - done; - !pos - with - | End_of_file -> raise(Otags_parsing_error(loc, "Invalid location")) - - -(** Lookup the character offset of the beginning of the line mentioned - in directive. This offset is cached in the ld_file_offset field in - the directive. If not present (i.e., if ld_file_offset = -1) the - offset is computed from the file. - *) -let source_line_offset directive = - if directive.ld_file_offset >= 0 then directive.ld_file_offset - else - let file_offset = get_line_offset directive.ld_file directive.ld_line in - directive.ld_file_offset <- file_offset; - file_offset - - -(** Correct character offsets in loc for line directives. - - OCaml and Camlp4 locations have the problem that character offsets are - wrong after line directives, see OCaml bug #5159, the documentation - for Lexing.position and Camlp4.Sig.Loc.t. Line directives only update - the file and the line number but not the offset. Therefore, after a - line directive, the offset cannot be used to find a position in a - file. This functions corrects all the character offsets in loc, - relying on character offset information of the line directives that - was recorded during lexing from the Camlp4 token filter in - Monitor_line_directives.Line_directive_monitor and on character - offsets of the beginning of lines in the original source file that is - computed on the fly here. - - To correct an offset, I take the character difference between a - location and the character following a line directive. This latter - character is the first character of the start of the line that the - line directive refers to. I just need its position in the original - source file to correct the character offsets. - - *) -let translate_loc loc = - let stop_parse_off = Loc.stop_off loc in - let stop_dir_index = get_directive_index stop_parse_off in - if stop_dir_index = -1 - then begin - (* Printf.eprintf "TL stop -1\n%!"; *) - loc - end - else - let stop_dir = !line_directive_array.(stop_dir_index) in - let stop_diff = stop_dir.ld_parse_offset - (source_line_offset stop_dir) in - let stop_off = stop_parse_off - stop_diff in - let stop_bol = (Loc.stop_bol loc) - stop_diff in - let start_parse_off = Loc.start_off loc in - let start_dir_index = get_directive_index start_parse_off in - let (start_off, start_bol) = - if start_dir_index = -1 - then (start_parse_off, Loc.start_bol loc) - else - let start_dir = !line_directive_array.(start_dir_index) in - let start_diff = - start_dir.ld_parse_offset - (source_line_offset start_dir) in - let start_off = start_parse_off - start_diff in - let start_bol = (Loc.start_bol loc) - start_diff in - (start_off, start_bol) - in - let (file_name, start_line, _bol1, _off1, stop_line, _bol2, _off2, ghost) = - Loc.to_tuple loc - in - (* - * Printf.eprintf "TL start index %d stop index %d\n%!" - * start_dir_index stop_dir_index; - *) - Loc.of_tuple (file_name, start_line, start_bol, start_off, - stop_line, stop_bol, stop_off, ghost)
  71. Download patch test/d.ml

    --- 4.02.2-2/test/d.ml 2010-08-05 14:45:45.000000000 +0000 +++ 4.04.1-0ubuntu1/test/d.ml 2017-01-05 20:50:11.000000000 +0000 @@ -1,6 +1,4 @@ -(* $Id: d.ml,v 1.1.1.1 2010/08/05 14:45:45 tews Exp $ *) - let f1 x = 12 (* type a = @@ -92,6 +90,8 @@ end let ( <:> ) x y = x + y;; +let Modu.(d20) = 20 + (*** Local Variables: ***) (*** compile-command: "make -C .. test" ***)
  72. Download patch contrib/.cvsignore

    --- 4.02.2-2/contrib/.cvsignore 2012-01-27 10:24:10.000000000 +0000 +++ 4.04.1-0ubuntu1/contrib/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -update-otags.man
  73. Download patch reparse.ml
  74. Download patch util/dump-camlp4.ml

    --- 4.02.2-2/util/dump-camlp4.ml 2016-01-08 22:03:51.000000000 +0000 +++ 4.04.1-0ubuntu1/util/dump-camlp4.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ -(* Standalone utility to dump the Camlp4 AST in a readable form. - * Use camlp4 to parse stdin and save the AST in file dump-file. - * Next a toplevel is started to read that file and use the - * toplevel printer to print the AST. - *) - - -let standard_syntax = ref true - -let parse_impl = ref true - -let ocaml_path = ref "" - -let verbose = ref false - -let dump_file = ref None - -let print_locations = ref true - -let input_file = ref None - -let arguments = Arg.align [ - ("-r", Arg.Clear standard_syntax, - " parse revised syntax"); - ("-i", Arg.Clear parse_impl, - " parse interface"); - ("-ocaml", Arg.Set_string ocaml_path, - "path set the path to the ocaml bin-dir"); - ("-f", Arg.String(fun f -> input_file := Some f), - "input-file parse input-file (instead of stdin)"); - ("-dump", Arg.String(fun f -> dump_file := Some f), - "dump-file print ast from dump-file instead of parsing input"); - ("-noloc", Arg.Clear print_locations, - " don't print locations"); - ("-v", Arg.Set verbose, - " verbose"); -] - -let usage = "dump-camlp4" - -let _ = Arg.parse arguments (fun _ -> assert false) usage - -let camlp4_name = match !standard_syntax with - | true -> "camlp4o" - | false -> "camlp4r" - -let camlp4_name = Filename.concat !ocaml_path camlp4_name - -let mode_flag = match !parse_impl with - | true -> "-impl" - | false -> "-intf" - -let input_source = match !input_file with - | Some f -> f - | None -> "-" - -let parse_command = - camlp4_name ^ " " ^ mode_flag ^ " " ^ input_source - ^ " -printer d > camlp4-dump" - -let _ = - match !dump_file with - | None -> - if !verbose then - Printf.eprintf "Run: %s\n%!" parse_command; - ignore(Sys.command parse_command) - | Some f -> - if !verbose then - Printf.eprintf "don't parse any input, use dump in %s\n%!" f - - -let ast_file = match !dump_file with - | None -> "camlp4-dump" - | Some f -> f - -let loc_printer = - if !print_locations - then - "let loc_printer ff loc = - Format.fprintf ff \"[%s: sl %d(%d) so %d el %d(%d) eo %d%s]\" - (Loc.file_name loc) - (Loc.start_line loc) (Loc.start_bol loc) (Loc.start_off loc) - (Loc.stop_line loc) (Loc.stop_bol loc) (Loc.stop_off loc) - (if Loc.is_ghost loc then \" GHOST\" else \" REAL\");;" - else - "let loc_printer ff (loc : Loc.t) = Format.pp_print_string ff \"-\";;" - - -(* - * #print_depth 1073741823;; - * #print_length 1073741823;; - * #load "dynlink.cma";; - * #load "camlp4lib.cma";; - * open Camlp4.PreCast;; - * let loc_printer ff (loc : Loc.t) = Format.pp_print_string ff "-" - * let loc_printer ff loc = - * Format.fprintf ff "[%s: sl %d(%d) so %d el %d(%d) eo %d%s]" - * (Loc.file_name loc) - * (Loc.start_line loc) (Loc.start_bol loc) (Loc.start_off loc) - * (Loc.stop_line loc) (Loc.stop_bol loc) (Loc.stop_off loc) - * (if Loc.is_ghost loc then " GHOST" else " REAL");; - * #install_printer loc_printer;; - * open Camlp4.PreCast.Ast;; - * let ic = open_in "../camlp4-dump";; - * ignore(really_input_string ic 14); (* cut-off tag in first 14 bytes *) - * (input_value ic : Ast.str_item);; - *) - - -let input = - "#print_depth 1073741823;; - #print_length 1073741823;; - #load \"dynlink.cma\";; - #load \"camlp4lib.cma\";; - open Camlp4.PreCast;; - " - ^ loc_printer ^ "\n" - ^ - (* #directory "+compiler-libs";; *) - "#install_printer loc_printer;; - open Camlp4.PreCast.Ast;; - let ic = open_in \"" - ^ ast_file ^ - "\" in - ignore(really_input_string ic 14); - (input_value ic : Ast." - ^ - (if !parse_impl then "str_item" - else "sig_item") - ^ ");; -" - -let ocaml_command = - "echo '" ^ input ^ "' | " ^ (Filename.concat !ocaml_path "ocaml") -;; - -if !verbose then - Printf.eprintf "Run: %s\n%!" ocaml_command; -Sys.command ocaml_command - - -(*** Local Variables: ***) -(*** compile-command: "ocamlopt.opt -safe-string dump-camlp4.ml -o dump-camlp4" ***) -(*** End: ***)
  75. Download patch test/cppo_i.source.ml

    --- 4.02.2-2/test/cppo_i.source.ml 2016-01-14 07:58:29.000000000 +0000 +++ 4.04.1-0ubuntu1/test/cppo_i.source.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - -#ifdef HAVE_XXX -type cppo_i_a0 = int -#else -type cppo_i_a1 = int -#endif - -let cppo_i_a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - -#include "cppo_i.include.ml" - -#ifdef HAVE_XXX -type cppo_i_b = int -#else -type cppo_i_c = int -#endif - - -#ifdef HAVE_XXX -type cppo_i_c = int -#else -type cppo_i_e = int -#endif
  76. Download patch doc/otags.1
  77. Download patch types.ml

    --- 4.02.2-2/types.ml 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/types.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: types.ml,v 1.11 2016/01/10 20:57:40 tews Exp $ - * - * global type definitions - * - *) - -type unit_type = - | Signature - | Structure - -let string_of_unit_type = function - | Signature -> "signature" - | Structure -> "structure" - - -(* XXX Why/What about type loc_t = Caml4.Struct.Loc.t ??? *) -type loc_t = Camlp4.PreCast.Loc.t -type str_item_t = Camlp4.PreCast.Ast.str_item -type sig_item_t = Camlp4.PreCast.Ast.sig_item - -type comp_ast = - | Sig_ast of sig_item_t - | Struct_ast of str_item_t - - -(* the type for the write_tag entry in the tag_functions record *) -type write_tag_t = loc_t -> string -> unit - - -(* The common interface of the vi and emacs tagging modules is captured - * in this record. It contains the functions necessary for tagging. - *) -type tag_functions = { - (* start_unit file - * start tagging compilation unit file - *) - start_unit : string -> unit; - - (* write_tag loc tag - * write tag tag at loc - *) - write_tag : write_tag_t; - - (* finish one compilation unit *) - finish_unit : unit -> unit; - - (* finish all tagging *) - finish_tagging : unit -> unit; -} - -exception Otags_parsing_error of loc_t * string
  78. Download patch reparse.mli

    --- 4.02.2-2/reparse.mli 2016-01-10 20:57:40.000000000 +0000 +++ 4.04.1-0ubuntu1/reparse.mli 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -(* Otags reloaded - * - * Hendrik Tews Copyright (C) 2010 - 2016 - * - * This file is part of "Otags reloaded". - * - * "Otags reloaded" 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 3 of the - * License, or (at your option) any later version. - * - * "Otags reloaded" 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 in file COPYING in this or one of the parent - * directories for more details. - * - * You should have received a copy of the GNU General Public License - * along with "Otags reloaded". If not, see - * <http://www.gnu.org/licenses/>. - * - * $Id: reparse.mli,v 1.9 2016/01/10 20:57:40 tews Exp $ - * - * location-parsing hack for those ast nodes that do not provide - * sufficient location info - *) - -open Types - -(* Return the character at the start position. - *) -val start_char : loc_t -> char - - -(* Return the end character, that is, the character before - * the end position - *) -val stop_char : loc_t -> char - - -(* computes the location of the n-th word in the string described - * by loc - *) -val loc_of_nth_word : int -> loc_t -> loc_t - - -(* same as loc_of_nth_word 1 - *) -val loc_of_first_word : loc_t -> loc_t - - -(* same as loc_of_nth_word 2 - *) -val loc_of_second_word : loc_t -> loc_t - - -(* same as loc_of_nth_word 3 - *) -val loc_of_third_word : loc_t -> loc_t - - -(* returns location without the first word and the following white space - *) -val loc_without_first_word : loc_t -> loc_t - - -(* returns the location of the word after skipping over one - * type parameter. The start position must be the start position - * of the type parameter. - *) -val loc_of_word_after_type_param : loc_t -> loc_t - - -(* return the location of the word after the first closing parenthesis ')' - *) -val loc_of_word_after_paren : loc_t -> loc_t - - -(* loc_of_first_word_after_word word loc - * returns the location of the first word in the string designated by loc, - * except for the case when this string starts with word, then the - * location of the second word is returned. - *) -val loc_of_first_word_after_word : string -> loc_t -> loc_t - -(* loc_of_last_word loc - * computes the location of the last word in the string described - * by loc in channel ic - *) -val loc_of_last_word : loc_t -> loc_t - - -(* chop parenthesis on start and end and skip the surrounding - * white space. - *) -val loc_inside_parens : loc_t -> loc_t
  79. Download patch doc/changes.html

    --- 4.02.2-2/doc/changes.html 2016-01-15 20:27:18.000000000 +0000 +++ 4.04.1-0ubuntu1/doc/changes.html 2017-01-05 20:50:11.000000000 +0000 @@ -33,6 +33,36 @@ pre { ! - </UL> --> +<DT>2017-01-05: otags 4.04.1 released +<DD> +<UL> +<LI>Update for OCaml 4.04 +</LI> +<LI>Improved future compatibility: Otags can now be compiled with +future OCaml versions as long as they only add constructors in the +abstract syntax tree. +<P></P> +</LI> +</UL> + +<DT>2016-09-22: otags 4.03.1 released +<DD> +<UL> +<LI>Switch to OCaml standard parser from the compiler-libs +library and drop the dependency on camlp4. All options +controlling the camlp4 engine (-pa, -extern, ...) are gone. +</LI> +<LI>Restrict input to what ocamlc accepts: no syntax extensions +or toplevel directives. Additionally, files with line directives +(from ocamlyacc, ocamllex or cppo) are not supported. +</li> +<li>Fix file descriptor leakage for option -r. +<P></P> +</LI> +</UL> + +<!-- RECENT CHANGES END --> + <DT>2016-01-15: otags 4.02.2 released <DD> <UL> @@ -60,8 +90,6 @@ missing support in camlp4) </LI> </UL> -<!-- RECENT CHANGES END --> - <DT>2013-08-22: otags 4.00.2 released <DD> <UL> @@ -170,7 +198,7 @@ HREF="http://caml.inria.fr/mantis/view.p <HR noshade size=2> <FONT SIZE="-2"> last changed on -<!-- hhmts start -->15 Jan 2016 +<!-- hhmts start --> 5 Jan 2017 <!-- hhmts end --> by <A HREF="/index.html.en">Hendrik</A> </FONT></BODY> </HTML>
  80. Download patch test/err.ml

    --- 4.02.2-2/test/err.ml 1970-01-01 00:00:00.000000000 +0000 +++ 4.04.1-0ubuntu1/test/err.ml 2017-01-05 20:50:11.000000000 +0000 @@ -0,0 +1,6 @@ + +let err01 = 5 + +let err02 a b = a + b + +let (err, 03 = (5, 6)
  81. Download patch test/cpp_i.source.ml

    --- 4.02.2-2/test/cpp_i.source.ml 2012-03-28 20:46:10.000000000 +0000 +++ 4.04.1-0ubuntu1/test/cpp_i.source.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ - -let ccp_i_a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - -#include "cpp_i.include.ml"
  82. Download patch test/cpp_i.include.ml

    --- 4.02.2-2/test/cpp_i.include.ml 2012-03-28 20:46:10.000000000 +0000 +++ 4.04.1-0ubuntu1/test/cpp_i.include.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ - -let cpp_i_inc_a = 2 - - -let cpp_i_inc_b = 2
  83. Download patch Makefile.in
  1. ben
  2. mldonkey
  3. ocaml
  4. ocaml-zarith
  5. otags