From f5e75663fef044cad02eef3eb7aef295312c1158 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Wed, 9 Oct 2019 15:07:23 +0000
Subject: Add path_canonicalize, prepare for 2.9.1.0
---
NEWS | 6 ++++
doc/index.html | 2 +-
doc/libstddjb/djbunix.html | 13 ++++++++
doc/upgrade.html | 6 ++++
package/deps.mak | 1 +
package/info | 2 +-
src/include/skalibs/djbunix.h | 2 ++
src/libstddjb/path_canonicalize.c | 69 +++++++++++++++++++++++++++++++++++++++
8 files changed, 99 insertions(+), 2 deletions(-)
create mode 100644 src/libstddjb/path_canonicalize.c
diff --git a/NEWS b/NEWS
index 27b7eae..8ed0191 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
Changelog for skalibs.
+In 2.9.1.0
+----------
+
+ - Added path_canonicalize()
+
+
In 2.9.0.0
----------
diff --git a/doc/index.html b/doc/index.html
index 18fa214..8a903f1 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -60,7 +60,7 @@ with a standard C development environment
Download
- - The current released version of skalibs is 2.9.0.0.
+ - The current released version of skalibs is 2.9.1.0.
- Alternatively, you can checkout a copy of the
skalibs
git repository:
diff --git a/doc/libstddjb/djbunix.html b/doc/libstddjb/djbunix.html
index dca3a2c..6223bf4 100644
--- a/doc/libstddjb/djbunix.html
+++ b/doc/libstddjb/djbunix.html
@@ -808,5 +808,18 @@ Sleeps n milliseconds. Signals received during that time are handled,
but do not interrupt the sleep.
+ Miscellaneous functions
+
+
+ size_t path_canonicalize (char *out, char const *in, int check)
+Writes into out the canonical form of the Unix path given in
+in. The out array must be preallocated with at least
+strlen(in)+2 bytes. Returns the length of the out path, without
+counting the terminating null byte. If check is nonzero, in is tested
+for every foobar/.. element, and the function returns 0, and sets errno
+appropriately, if foobar is not a valid directory; in that case, out
+contains the problematic path.
+
+