~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to debugger/unix_tools.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Glondu
  • Date: 2009-06-24 12:47:31 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624124731-7wao0d0mnk4d71ee
Remove build-dependency to docbook-* (not needed anymore, since
policy has been moved to dh-ocaml)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
(*                                                                     *)
12
12
(***********************************************************************)
13
13
 
14
 
(* $Id: unix_tools.ml,v 1.9 2008/07/29 08:31:41 xleroy Exp $ *)
 
14
(* $Id: unix_tools.ml,v 1.9.2.1 2009/04/02 09:44:21 xclerc Exp $ *)
15
15
 
16
16
(****************** Tools for Unix *************************************)
17
17
 
22
22
(*** Convert a socket name into a socket address. ***)
23
23
let convert_address address =
24
24
  try
25
 
    let n = string_pos address ':' in
 
25
    let n = String.index address ':' in
26
26
      let host = String.sub address 0 n
27
27
      and port = String.sub address (n + 1) (String.length address - n - 1)
28
28
      in
90
90
let rec expand_path ch =
91
91
  let rec subst_variable ch =
92
92
    try
93
 
      let pos = string_pos ch '$' in
 
93
      let pos = String.index ch '$' in
94
94
        if (pos + 1 < String.length ch) && (ch.[pos + 1] = '$') then
95
95
          (String.sub ch 0 (pos + 1))
96
96
            ^ (subst_variable
121
121
      in
122
122
        if ch.[0] = '~' then
123
123
          try
124
 
            match string_pos ch '/' with
 
124
            match String.index ch '/' with
125
125
              1 ->
126
126
                (let tail = String.sub ch 2 (String.length ch - 2)
127
127
                 in