Commit ddab04c5 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-12-01 16:34:26 by afrisch] Handle large files

Original author: afrisch
Date: 2003-12-01 16:34:26+00:00
parent ba492492
......@@ -121,11 +121,13 @@ parser/ast.cmx: misc/q_symbol.cmo types/builtin_defs.cmx types/chars.cmx types/i
parser/parser.cmo: misc/q_symbol.cmo parser/ast.cmo types/atoms.cmi types/chars.cmi \
misc/encodings.cmi types/ident.cmo types/intervals.cmi \
parser/location.cmi misc/ns.cmi schema/schema_parser.cmi \
types/sequence.cmi types/types.cmi parser/ulexer.cmi parser/parser.cmi
types/sequence.cmi types/types.cmi parser/ulexer.cmi misc/url.cmi \
parser/parser.cmx: misc/q_symbol.cmo parser/ast.cmx types/atoms.cmx types/chars.cmx \
misc/encodings.cmx types/ident.cmx types/intervals.cmx \
parser/location.cmx misc/ns.cmx schema/schema_parser.cmx \
types/sequence.cmx types/types.cmx parser/ulexer.cmx parser/parser.cmi
types/sequence.cmx types/types.cmx parser/ulexer.cmx misc/url.cmx \
typing/typed.cmo: misc/q_symbol.cmo types/ident.cmo parser/location.cmi types/patterns.cmi \
schema/schema_types.cmi types/types.cmi
typing/typed.cmx: misc/q_symbol.cmo types/ident.cmx parser/location.cmx types/patterns.cmx \
......@@ -2,15 +2,18 @@ open Curl
type url = Filename of string | Url of string
let process_url s =
let _ = Neturl.extract_url_scheme s in
let buff = ref "" in
let connection = init () in
setopt connection (CURLOPT_URL s);
setopt connection (CURLOPT_WRITEFUNCTION (fun s -> buff:=s));
perform connection;
Url (!buff);
with Neturl.Malformed_URL -> Filename s
let is_url s =
try let _ = Neturl.extract_url_scheme s in true
with Neturl.Malformed_URL -> false
let load_url s =
let buff = Buffer.create 4096 in
let conn = init () in
set_url conn s;
set_writefunction conn (Buffer.add_string buff);
perform conn;
Buffer.contents buff
let process_url s =
if is_url s then Url (load_url s)
else Filename s
......@@ -193,6 +193,9 @@ style-sheet (we performed benchmarks with
the xsltproc tools from the Gnome libxslt library).
The named CDuce was coined by Francesco Zappa Nardelli.
......@@ -201,6 +204,8 @@ the xsltproc tools from the Gnome libxslt library).
<p>Our plans concerning the design of the core language
<li>interface with other languages and type systems;</li>
<li>efficient evaluation strategies, high-level optimizations;</li>
<li>a module system to support incremental programming;</li>
<li>parametric polymorphism;</li>
<li>XML-friendly primitives, to mimic XSLT transformations.</li>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment