ocaml-augeas.git
4 years agocaml_named_value returns const value pointer in OCaml 4.09+ master
Richard W.M. Jones [Sat, 7 Dec 2019 11:08:54 +0000 (11:08 +0000)]
caml_named_value returns const value pointer in OCaml 4.09+

5 years agoUse ocamlopt -g option.
Richard W.M. Jones [Tue, 20 Aug 2019 14:06:57 +0000 (15:06 +0100)]
Use ocamlopt -g option.

Originally from Fedora.

5 years agoVersion 0.6. v0.6
Richard W.M. Jones [Tue, 20 Aug 2019 13:59:10 +0000 (14:59 +0100)]
Version 0.6.

5 years agobuild: build with CAML_NAME_SPACE
Pino Toscano [Wed, 29 May 2019 09:48:47 +0000 (11:48 +0200)]
build: build with CAML_NAME_SPACE

This way no non-namespaced OCaml C symbols are used, reducing the risk
of clashes with other code.

5 years agoSwitch away from non-namespaced OCaml symbols
Pino Toscano [Wed, 29 May 2019 09:48:46 +0000 (11:48 +0200)]
Switch away from non-namespaced OCaml symbols

Use the namespaced symbols, available since OCaml 3.08.0.

5 years agoAdd error message to Augeas.Error
Pino Toscano [Wed, 29 May 2019 09:48:45 +0000 (11:48 +0200)]
Add error message to Augeas.Error

In addition to all the details already added, provide also the Augeas
message as-is.

This breaks the API compatibility for the current users once more,
although this hopefully is the last change to Augeas.Error.

5 years agoAdd Augeas.label
Pino Toscano [Wed, 29 May 2019 09:48:44 +0000 (11:48 +0200)]
Add Augeas.label

Simple binding for aug_label.

5 years agoAdd Augeas.setm
Pino Toscano [Wed, 29 May 2019 09:48:43 +0000 (11:48 +0200)]
Add Augeas.setm

Simple binding for aug_setm.

5 years agoAdd Augeas.mv
Pino Toscano [Wed, 29 May 2019 09:48:42 +0000 (11:48 +0200)]
Add Augeas.mv

Simple binding for aug_mv.

5 years agoAdd Augeas.defnode
Pino Toscano [Wed, 29 May 2019 09:48:41 +0000 (11:48 +0200)]
Add Augeas.defnode

Simple binding for aug_defnode.

5 years agoAdd Augeas.defvar
Pino Toscano [Wed, 29 May 2019 09:48:40 +0000 (11:48 +0200)]
Add Augeas.defvar

Simple binding for aug_defvar.

5 years agoSplit the Optstring_val helper
Pino Toscano [Wed, 29 May 2019 09:48:39 +0000 (11:48 +0200)]
Split the Optstring_val helper

Split the Optstring_val helper function, so it can be used also in more
places.

5 years agoImprove error reporting on init
Pino Toscano [Wed, 29 May 2019 09:48:38 +0000 (11:48 +0200)]
Improve error reporting on init

Invoke aug_init with AUG_NO_ERR_CLOSE, so it is possible to provide a
detailed Augeas.Error exception.

5 years agoEnhance raise_error to be able to close handle
Pino Toscano [Wed, 29 May 2019 09:48:37 +0000 (11:48 +0200)]
Enhance raise_error to be able to close handle

Rename raise_error to raise_error_and_maybe_close, and add the
possibility to close the specified handle before raising the OCaml
exception.

raise_error is left as non-closing macro.

5 years agoAdd more init flags
Pino Toscano [Wed, 29 May 2019 09:48:36 +0000 (11:48 +0200)]
Add more init flags

Add all the init flags available in augeas 1.2.0.

5 years agoBump requirement to 1.2.0
Pino Toscano [Wed, 29 May 2019 09:48:35 +0000 (11:48 +0200)]
Bump requirement to 1.2.0

Augeas 1.2.0 is old enough to be available also in non-recent
distributions.  Also, it allows ocaml-augeas to bind all the available
opening flags.

7 years agoMark ocaml_augeas_source w/o aug_source as noreturn
Pino Toscano [Mon, 9 Oct 2017 10:52:57 +0000 (12:52 +0200)]
Mark ocaml_augeas_source w/o aug_source as noreturn

If aug_source is not available, the implementation of
ocaml_augeas_source just raises Failure: the caml_failwith function used
for that is marked as noreturn, and thus with more strict compiler flags
it can fail to build.

As solution, mark it as noreturn when aug_source is not available.

7 years agoAdd function prototypes for OCaml APIs
Pino Toscano [Mon, 9 Oct 2017 10:52:56 +0000 (12:52 +0200)]
Add function prototypes for OCaml APIs

This allows us to add attribute to them, which cannot be done directly
in a function definition.

7 years agoFully initialize the custom_operations struct
Pino Toscano [Mon, 9 Oct 2017 10:52:55 +0000 (12:52 +0200)]
Fully initialize the custom_operations struct

Use also custom_compare_ext_default for the compare_ext field.

This also implicitly raises the minimum OCaml version required to
3.12.1, since it is when this field was introduced (at least, according
to the git logs).

7 years agoconfigure: When overriding LIBS, include old $LIBS value.
Richard W.M. Jones [Fri, 6 Oct 2017 09:31:58 +0000 (10:31 +0100)]
configure: When overriding LIBS, include old $LIBS value.

Fixes commit a4165c822baf74f5c1906593a984f996b11058d1.

7 years agolib: Allow compilation with Augeas < 1.8.0 which lacked ‘aug_source’ function.
Richard W.M. Jones [Thu, 5 Oct 2017 10:15:24 +0000 (11:15 +0100)]
lib: Allow compilation with Augeas < 1.8.0 which lacked ‘aug_source’ function.

Fixes commit 05f00ac539c2cd0cf5dcbf90d031023a7e973ae7.

7 years agolib: Use caml_failwith instead of compat wrapper failwith.
Richard W.M. Jones [Thu, 5 Oct 2017 10:15:01 +0000 (11:15 +0100)]
lib: Use caml_failwith instead of compat wrapper failwith.

7 years agoAdd Augeas.source
Pino Toscano [Fri, 15 Sep 2017 14:42:08 +0000 (16:42 +0200)]
Add Augeas.source

Easy way to get the root node representing a source file.

7 years agoAdd Augeas.transform
Pino Toscano [Fri, 15 Sep 2017 14:42:07 +0000 (16:42 +0200)]
Add Augeas.transform

Simple binding for aug_transform, so it is possible to add/remove file
transformations.

7 years agotest_augeas: print also the values of nodes
Pino Toscano [Fri, 15 Sep 2017 14:42:06 +0000 (16:42 +0200)]
test_augeas: print also the values of nodes

Easy way to exercise Augeas.get too.

7 years agoDo not crash with NULL values from aug_get
Pino Toscano [Fri, 15 Sep 2017 14:42:05 +0000 (16:42 +0200)]
Do not crash with NULL values from aug_get

The Augeas documentation states that NULL can be a valid value
associated to a note.  Hence, make sure to not crash, and return None
in case there is a single node with NULL value.

Easily reproducible with:
  let v = Augeas.get aug "/files" in

7 years agoMore constness in C variables
Pino Toscano [Fri, 15 Sep 2017 14:42:04 +0000 (16:42 +0200)]
More constness in C variables

Use 'const' where possible, to avoid accidentally changing read-only
variables.

7 years agoAdd Augeas.set
Pino Toscano [Fri, 15 Sep 2017 14:42:03 +0000 (16:42 +0200)]
Add Augeas.set

Simple binding for aug_set, so it is possible to actually change the
value of nodes.

7 years agoEnhance the Augeas.Error exception
Pino Toscano [Wed, 13 Sep 2017 16:25:01 +0000 (18:25 +0200)]
Enhance the Augeas.Error exception

Augeas.Error is very limited, and only provides an error string provided
by ocaml-augeas itself: this makes it hard to actually understand what
is an Augeas.Error that was raised, and eventually perform different
actions based on that.

To overcome that, Augeas.Error is changed to be a tuple containing the
error code (as reported by Augeas), still the ocaml-augeas error string,
and error message and details of the Augeas error -- all the
informations that Augeas provides.
This breaks API compatibility with current users, but unfortunately
there is no way around that.

7 years agoRaise Out_of_memory when Augeas fails with AUG_ENOMEM
Pino Toscano [Wed, 13 Sep 2017 16:25:00 +0000 (18:25 +0200)]
Raise Out_of_memory when Augeas fails with AUG_ENOMEM

This is more in style with what OCaml reports in this kind of
situations.

7 years agoPass the augeas_t to raise_error
Pino Toscano [Wed, 13 Sep 2017 16:24:59 +0000 (18:24 +0200)]
Pass the augeas_t to raise_error

This will help improving the error reporting done by that function.

7 years agoCreate a separate raise_init_error function
Pino Toscano [Wed, 13 Sep 2017 16:24:58 +0000 (18:24 +0200)]
Create a separate raise_init_error function

Used only on init, when there is no augeas pointer available.

7 years agoImplement Augeas.load API.
Richard W.M. Jones [Tue, 6 Jun 2017 14:14:46 +0000 (15:14 +0100)]
Implement Augeas.load API.

7 years agoImplement AugNoStdinc, AugSaveNoop and AugNoLoad flags.
Richard W.M. Jones [Tue, 6 Jun 2017 14:14:19 +0000 (15:14 +0100)]
Implement AugNoStdinc, AugSaveNoop and AugNoLoad flags.

7 years agoPath parameter did not work in Augeas.rm and Augeas.count_matches bindings.
Richard W.M. Jones [Tue, 6 Jun 2017 14:13:37 +0000 (15:13 +0100)]
Path parameter did not work in Augeas.rm and Augeas.count_matches bindings.

7 years agoFix a few GCC warnings.
Richard W.M. Jones [Tue, 6 Jun 2017 14:13:09 +0000 (15:13 +0100)]
Fix a few GCC warnings.

7 years agoRegenerate dependencies with newer OCaml.
Richard W.M. Jones [Tue, 6 Jun 2017 13:47:19 +0000 (14:47 +0100)]
Regenerate dependencies with newer OCaml.

7 years agoRename augeas_c.c -> augeas-c.c
Richard W.M. Jones [Tue, 6 Jun 2017 13:46:27 +0000 (14:46 +0100)]
Rename augeas_c.c -> augeas-c.c

Just a file rename, no other change.

9 years agoAdd autoconf ocaml macros.
Richard W.M. Jones [Tue, 21 Jul 2015 10:50:14 +0000 (11:50 +0100)]
Add autoconf ocaml macros.

12 years agoVersion 0.5.
Richard W.M. Jones [Mon, 11 Jun 2012 12:59:59 +0000 (13:59 +0100)]
Version 0.5.

12 years agoFix 'make dist' rule.
Richard W.M. Jones [Mon, 11 Jun 2012 13:02:33 +0000 (14:02 +0100)]
Fix 'make dist' rule.

12 years agoUpdate dependencies.
Richard W.M. Jones [Mon, 11 Jun 2012 12:59:52 +0000 (13:59 +0100)]
Update dependencies.

12 years agoAdd 'make check' rule.
Richard W.M. Jones [Mon, 11 Jun 2012 12:59:37 +0000 (13:59 +0100)]
Add 'make check' rule.

12 years agoAugeas.matches: Fix silly typo in binding.
Richard W.M. Jones [Mon, 11 Jun 2012 12:59:15 +0000 (13:59 +0100)]
Augeas.matches: Fix silly typo in binding.

12 years agoUse pkg-config to detect Augeas and libxml2.
Richard W.M. Jones [Mon, 11 Jun 2012 12:52:13 +0000 (13:52 +0100)]
Use pkg-config to detect Augeas and libxml2.

12 years agoRemove generated files from the repository.
Richard W.M. Jones [Mon, 11 Jun 2012 12:51:42 +0000 (13:51 +0100)]
Remove generated files from the repository.

15 years agoAdd .gitignore file.
Richard Jones [Mon, 16 Nov 2009 12:41:34 +0000 (12:41 +0000)]
Add .gitignore file.

15 years agoInstall *.so files.
Richard W.M. Jones [Mon, 16 Nov 2009 12:39:21 +0000 (12:39 +0000)]
Install *.so files.

16 years agoUpdated MANIFEST for release 0.4.
Richard W.M. Jones [Wed, 7 May 2008 07:48:59 +0000 (08:48 +0100)]
Updated MANIFEST for release 0.4.

16 years agoMake 'check-manifest' work with HG.
Richard W.M. Jones [Wed, 7 May 2008 07:48:53 +0000 (08:48 +0100)]
Make 'check-manifest' work with HG.

16 years agoAdded this file.
Richard W.M. Jones [Wed, 7 May 2008 07:48:36 +0000 (08:48 +0100)]
Added this file.

16 years agoAdded Augeas.count_matches
Richard W.M. Jones [Wed, 7 May 2008 07:46:51 +0000 (08:46 +0100)]
Added Augeas.count_matches

16 years agoCompile with -Wall -Werror
Richard W.M. Jones [Wed, 7 May 2008 07:46:31 +0000 (08:46 +0100)]
Compile with -Wall -Werror

16 years agoVersion number to 0.4
Richard W.M. Jones [Wed, 7 May 2008 07:43:01 +0000 (08:43 +0100)]
Version number to 0.4

16 years agoIgnore a few more files.
Richard W.M. Jones [Wed, 7 May 2008 07:42:52 +0000 (08:42 +0100)]
Ignore a few more files.

16 years agoFix test program to work with /etc/hosts and display all files recursively.
Richard W.M. Jones [Wed, 7 May 2008 07:42:41 +0000 (08:42 +0100)]
Fix test program to work with /etc/hosts and display all files recursively.

16 years agoImported version 0.3 from old CVS repository.
Richard W.M. Jones [Wed, 7 May 2008 07:21:12 +0000 (08:21 +0100)]
Imported version 0.3 from old CVS repository.