Blame


1 c3f94f68 2017-11-05 stsp /*
2 c3f94f68 2017-11-05 stsp * Copyright (c) 2017 Stefan Sperling <stsp@openbsd.org>
3 c3f94f68 2017-11-05 stsp *
4 c3f94f68 2017-11-05 stsp * Permission to use, copy, modify, and distribute this software for any
5 c3f94f68 2017-11-05 stsp * purpose with or without fee is hereby granted, provided that the above
6 c3f94f68 2017-11-05 stsp * copyright notice and this permission notice appear in all copies.
7 c3f94f68 2017-11-05 stsp *
8 c3f94f68 2017-11-05 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 c3f94f68 2017-11-05 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 c3f94f68 2017-11-05 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 c3f94f68 2017-11-05 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 c3f94f68 2017-11-05 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 c3f94f68 2017-11-05 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 c3f94f68 2017-11-05 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 c3f94f68 2017-11-05 stsp */
16 c3f94f68 2017-11-05 stsp
17 c3f94f68 2017-11-05 stsp /* Utilities for dealing with filesystem paths. */
18 c3f94f68 2017-11-05 stsp
19 c3f94f68 2017-11-05 stsp /* Determine whether a path is an absolute path. */
20 c3f94f68 2017-11-05 stsp int got_path_is_absolute(const char *);
21 c3f94f68 2017-11-05 stsp
22 c3f94f68 2017-11-05 stsp /*
23 c3f94f68 2017-11-05 stsp * Return an absolute version of a relative path.
24 c3f94f68 2017-11-05 stsp * The result is allocated with malloc(3).
25 c3f94f68 2017-11-05 stsp */
26 c3f94f68 2017-11-05 stsp char *got_path_get_absolute(const char *);
27 c3f94f68 2017-11-05 stsp
28 c3f94f68 2017-11-05 stsp /*
29 c3f94f68 2017-11-05 stsp * Normalize a path for internal processing.
30 c3f94f68 2017-11-05 stsp * The result is allocated with malloc(3).
31 c3f94f68 2017-11-05 stsp */
32 c3f94f68 2017-11-05 stsp char *got_path_normalize(const char *);