ocaml-augeas.git
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.